fix:日志相关问题更改
This commit is contained in:
parent
2b57e31589
commit
5752485618
|
|
@ -53,6 +53,13 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="baseCode!=='bxerp'">
|
||||
<el-form-item label="批号追加工段标识" label-width="130px">
|
||||
<el-switch
|
||||
v-model="form.batch_append_code"
|
||||
></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="排序">
|
||||
<el-input-number v-model="form.sort" :min="1" class="width-100"/>
|
||||
|
|
@ -111,6 +118,7 @@ const defaultForm = {
|
|||
cate: 'photon',
|
||||
belong_dept: '',
|
||||
need_enm: false,
|
||||
batch_append_code:false
|
||||
};
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
|
|
@ -154,7 +162,7 @@ export default {
|
|||
setFiltersVisible: false,
|
||||
materialList: [],
|
||||
addTemplate: { material_in: '', material_out: '', mgroup: '', isedit: true },
|
||||
baseCode :this.$TOOL.data.get('BASE_INFO').base.base_code.$API,
|
||||
baseCode :this.$TOOL.data.get('BASE_INFO').base.base_code,
|
||||
menuType:this.$TOOL.data.get('BASE_INFO').base.base_menucate,
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@
|
|||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-main style="padding: 0">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-position="right"
|
||||
label-width="100px"
|
||||
style="padding: 0 10px"
|
||||
style="padding: 0"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
|
|
@ -240,7 +240,7 @@
|
|||
<el-row>
|
||||
<el-col :span=12>
|
||||
<el-col>加工前不良</el-col>
|
||||
<el-row>
|
||||
<el-row style="width: 98%;">
|
||||
<el-col :md="12" :sm="24" v-for="item in qct_defects" :key="item.id">
|
||||
<el-form-item :label="item.defect_name">
|
||||
<el-input-number
|
||||
|
|
@ -254,9 +254,9 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span=12>
|
||||
<el-col>本工段不良</el-col>
|
||||
<el-row>
|
||||
<el-col :span=12 style="border-left:dotted 1px #ccc;">
|
||||
<el-col style="padding-left: 10px;">本工段不良</el-col>
|
||||
<el-row style="width: 98%;">
|
||||
<el-col :md="12" :sm="24" v-for="item in qct_defects" :key="item.id">
|
||||
<el-form-item :label="item.defect_name">
|
||||
<el-input-number
|
||||
|
|
|
|||
|
|
@ -44,69 +44,13 @@
|
|||
<scTable
|
||||
stripe
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
:data="tableData"
|
||||
row-key="id"
|
||||
:params="params"
|
||||
:query="params"
|
||||
hideDo
|
||||
hidePagination
|
||||
@row-click="table_detail"
|
||||
>
|
||||
<el-table-column type="index" width="50"></el-table-column>
|
||||
<!-- <el-table-column type="expand">
|
||||
<template #default="props">
|
||||
<div style="padding-left: 50px">
|
||||
<el-descriptions :column="2">
|
||||
<template v-for="item in props.row.mlogb_full" :key="item.id">
|
||||
<el-descriptions-item :label="item.material_out!==null?'输出物料':'输入物料'">
|
||||
<span v-if="item.material_out!==null">{{item.batch}}</span>
|
||||
<span v-else>{{item.batch}}</span>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
<el-divider></el-divider>
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="划伤" v-if="props.row.count_n_hs>0">
|
||||
{{props.row.count_n_hs}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="气泡" v-if="props.row.count_n_qp>0">
|
||||
{{props.row.count_n_qp}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="水纹" v-if="props.row.count_n_swen>0">
|
||||
{{props.row.count_n_swen}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="崩边" v-if="props.row.count_n_bb>0">
|
||||
{{props.row.count_n_bb}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="小崩边" v-if="props.row.count_n_xbb>0">
|
||||
{{props.row.count_n_xbb}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="雾面" v-if="props.row.count_n_wm>0">
|
||||
{{props.row.count_n_wm}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="麻点" v-if="props.row.count_n_md>0">
|
||||
{{props.row.count_n_md}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="线痕" v-if="props.row.count_n_xh>0">
|
||||
{{props.row.count_n_xh}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="破损" v-if="props.row.count_n_ps>0">
|
||||
{{props.row.count_n_ps}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品外径" v-if="props.row.count_n_wj>0">
|
||||
{{props.row.count_n_wj}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品圆度" v-if="props.row.count_n_xh>0">
|
||||
{{props.row.count_n_xh}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品同心度" v-if="props.row.count_n_yd>0">
|
||||
{{props.row.count_n_yd}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="其它" v-if="props.row.count_n_qt>0">
|
||||
{{props.row.count_n_ps}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="批次号" prop="batch" min-width="80"></el-table-column>
|
||||
<el-table-column label="操作员" prop="handle_user_name" min-width="80"></el-table-column>
|
||||
<el-table-column label="设备" prop="equipment_name" min-width="150"></el-table-column>
|
||||
|
|
@ -116,8 +60,6 @@
|
|||
<el-table-column label="合格数" prop="count_ok"></el-table-column>
|
||||
<el-table-column label="不合格数" prop="count_notok"></el-table-column>
|
||||
<el-table-column label="操作日期" prop="handle_date"></el-table-column>
|
||||
<!-- <el-table-column label="开始时间" prop="work_start_time"></el-table-column>
|
||||
<el-table-column label="结束时间" prop="work_end_time"></el-table-column> -->
|
||||
<el-table-column label="班次" prop="shift_name"></el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
|
|
@ -150,12 +92,14 @@
|
|||
</scTable>
|
||||
</el-card>
|
||||
<!-- 工段物料库存 -->
|
||||
<el-card style="width: 100%; margin: 1vh 0" header="工段物料列表" shadow="never">
|
||||
<el-card style="width: 100%; margin: 1vh 0;" header="工段物料列表" shadow="never">
|
||||
<scTable
|
||||
ref="tableWm"
|
||||
:apiObj="apiObjWm"
|
||||
:params="paramsWm"
|
||||
stripe
|
||||
hideDo
|
||||
:height="300"
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column label="物料名称" prop="material_name" show-overflow-tooltip>
|
||||
|
|
@ -288,7 +232,7 @@ export default {
|
|||
this.getfmlogItem();
|
||||
this.params.fmlog = this.fmlogId;
|
||||
this.paramsWm.mgroup = this.mgroup;
|
||||
this.apiObj = this.$API.wpm.mlog.list;
|
||||
// this.apiObj = this.$API.wpm.mlog.list;
|
||||
},
|
||||
methods: {
|
||||
open(codeText="") {
|
||||
|
|
@ -307,6 +251,13 @@ export default {
|
|||
that.fmlogItem = res;
|
||||
that.route = res.route;
|
||||
that.paramsWm.mgroup = res.mgroup;
|
||||
that.apiObjWm = that.$API.wpm.wmaterial.list;
|
||||
that.getMlogs();
|
||||
|
||||
});
|
||||
},
|
||||
getMlogs(){
|
||||
let that = this;
|
||||
that.$API.wpm.mlog.list.req(that.params).then((res) => {
|
||||
that.tableData = res;
|
||||
if(res.length>0){
|
||||
|
|
@ -317,7 +268,6 @@ export default {
|
|||
that.apiObjWm = that.$API.wpm.wmaterial.list;
|
||||
}else{}
|
||||
});
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
|
|
@ -348,22 +298,23 @@ export default {
|
|||
that.isSaveing = true;
|
||||
that.$API.wpm.mlog.submit.req(row.id).then((res) => {
|
||||
that.isSaveing = false;
|
||||
this.$refs.table.refresh();
|
||||
that.getMlogs();
|
||||
that.$message.success("操作成功");
|
||||
});
|
||||
},
|
||||
//日志撤回
|
||||
mlogRevert(row) {
|
||||
this.$confirm(`确定撤回该日志吗?`, "提示", {
|
||||
let that = this;
|
||||
that.$confirm(`确定撤回该日志吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
var id = row.id;
|
||||
this.$API.wpm.mlog.revert.req(id).then((res) => {
|
||||
that.$API.wpm.mlog.revert.req(id).then((res) => {
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
that.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("撤回成功");
|
||||
that.getMlogs();
|
||||
that.$message.success("撤回成功");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -371,25 +322,25 @@ export default {
|
|||
//日志删除
|
||||
table_del(row) {
|
||||
let that = this;
|
||||
this.$confirm(`确定删除该日志吗?`, "提示", {
|
||||
that.$confirm(`确定删除该日志吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
var id = row.id;
|
||||
this.$API.wpm.mlog.delete.req(id).then((res) => {
|
||||
that.$API.wpm.mlog.delete.req(id).then((res) => {
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
that.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
that.getMlogs();
|
||||
that.$message.success("删除成功");
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
handleSaveSuccess() {
|
||||
this.$refs.table.refresh();
|
||||
this.getMlogs();
|
||||
},
|
||||
handleCheckSuccess() {
|
||||
this.$refs.table.refresh();
|
||||
this.getMlogs();
|
||||
},
|
||||
fileUPSuccess(res) {
|
||||
console.log('res',res);
|
||||
|
|
@ -405,9 +356,6 @@ export default {
|
|||
that.$nextTick(() => {
|
||||
that.printVisible = true;
|
||||
})
|
||||
// that.$API.wpm.mlog.list.req(that.params).then((res) => {
|
||||
// that.tableData = res;
|
||||
// });
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
|
|
|
|||
|
|
@ -276,6 +276,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="不合格数量" prop="count_notok">
|
||||
</el-table-column>
|
||||
<el-table-column label="抽检人" prop="test_user_name">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
|
|
|
|||
|
|
@ -309,6 +309,13 @@ export default {
|
|||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
work_end_time: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择生产结束时间",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
route: [
|
||||
{
|
||||
required: true,
|
||||
|
|
|
|||
|
|
@ -176,6 +176,18 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="mgroupName=='外观检验'">
|
||||
<el-form-item label="抽检人" prop="test_user">
|
||||
<ehsSelect
|
||||
filterable
|
||||
v-model="form.test_user"
|
||||
:showName="form.test_user_name"
|
||||
:apiObj="this.$API.system.user.list"
|
||||
:params="{ depts: deptId }"
|
||||
style="width: 100%;"
|
||||
></ehsSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||
<el-form-item label="层抽检数" required>
|
||||
<el-input-number
|
||||
|
|
@ -265,6 +277,10 @@ export default {
|
|||
mgroupMtype:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
deptId:{
|
||||
type: String,
|
||||
default: "",
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
@ -302,7 +318,14 @@ export default {
|
|||
message: "请填写层抽检数量",
|
||||
trigger: "blur",
|
||||
}
|
||||
]
|
||||
],
|
||||
test_user: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择抽检人",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
defectform:{},
|
||||
cells:0,
|
||||
|
|
@ -331,17 +354,16 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log('mgroupMtype',this.mgroupMtype)
|
||||
if (this.form.batch != null) {
|
||||
this.batchDisabled = true;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(data) {
|
||||
console.log(data)
|
||||
this.visible = true;
|
||||
this.mlogbItem = data;
|
||||
this.count_json = []
|
||||
let that = this;
|
||||
that.visible = true;
|
||||
that.mlogbItem = data;
|
||||
that.count_json = []
|
||||
if(data.count_json_from.length>0){
|
||||
data.count_json_from.forEach((item) => {
|
||||
let cells = item.end-item.start+1;
|
||||
|
|
@ -356,38 +378,42 @@ export default {
|
|||
count_test:1,
|
||||
count_notok:0
|
||||
};
|
||||
this.count_json.push(obj);
|
||||
that.count_json.push(obj);
|
||||
}
|
||||
})
|
||||
}
|
||||
data.count_json.forEach((item) => {
|
||||
item.count_notok = 0;
|
||||
item.count_test = this.count_cell;
|
||||
this.count_json.push(item);
|
||||
item.count_test = that.count_cell;
|
||||
that.count_json.push(item);
|
||||
})
|
||||
that.form.batch = data.batch;
|
||||
if(data.mlogbdefect.length>0){
|
||||
data.mlogbdefect.forEach((item2) => {
|
||||
that.defectform[item2.defect_name] = Number(item2.count);
|
||||
})
|
||||
this.form.batch = data.batch;
|
||||
if(Number(data.count_notok)>0){
|
||||
this.form.count_real =data.count_real;
|
||||
this.form.count_ok= data.count_ok;
|
||||
this.form.count_notok= data.count_notok;
|
||||
}else{
|
||||
this.form.count_real =this.form.count_ok= data.count_real;
|
||||
}
|
||||
if(data.count_json_wx&&data.count_json_wx.ok_num){
|
||||
this.count_json_wx = data.count_json_wx;
|
||||
this.count_json_wx.count_canInm = true;
|
||||
that.form.count_real =Number(data.count_real);
|
||||
that.form.count_ok= Number(data.count_ok);
|
||||
that.form.count_notok= Number(data.count_notok);
|
||||
//外协
|
||||
if(that.mgroupMtype==20){
|
||||
if(data.count_json_wx.ok_num&&data.count_json_wx.ok_num!==null){
|
||||
that.count_json_wx = data.count_json_wx;
|
||||
that.count_json_wx.count_canInm = true;
|
||||
if(data.count_json_wx.ok_num!==null){
|
||||
this.form.count_ok = data.count_json_wx.ok_num;
|
||||
this.form.count_notok = data.count_json_wx.notok_num;
|
||||
that.form.count_ok = data.count_json_wx.ok_num;
|
||||
that.form.count_notok = data.count_json_wx.notok_num;
|
||||
}
|
||||
}else{
|
||||
this.canWrite = true;
|
||||
that.canWrite = true;
|
||||
this.form.count_ok=null;
|
||||
this.form.count_notok=null;
|
||||
}
|
||||
this.material_out = data.material_out;
|
||||
this.mgroupName = data.mgroup_name;
|
||||
this.getdefects();
|
||||
}
|
||||
that.material_out = data.material_out;
|
||||
that.mgroupName = data.mgroup_name;
|
||||
that.getdefects();
|
||||
},
|
||||
getdefects(){
|
||||
let that = this;
|
||||
|
|
@ -509,6 +535,9 @@ export default {
|
|||
obj_form.count_ok = that.form.count_ok;
|
||||
obj_form.count_notok = that.form.count_notok;
|
||||
}
|
||||
if(that.mgroupName=='外观检验'){
|
||||
obj_form.test_user = that.form.test_user;
|
||||
}
|
||||
obj_form.count_real = that.form.count_real;
|
||||
obj_form.mlogbdefect = that.form.mlogbdefect;
|
||||
if(that.mgroupName=='黑化'||that.mgroupName=='退火'){
|
||||
|
|
|
|||
Loading…
Reference in New Issue