新增
@@ -443,6 +456,36 @@
+
+
+
+
+
+
+
+
+ {{ scope.row.material_out_.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -526,14 +569,13 @@ export default {
handover: false
},
handoverVisible: false,
+ paramsDate:'',
// apiObj: this.$API.pm.mtask.list,
params7: {
- belong_dept_name: '7车间',
- date: '2023-10-24'
+ mgroup__belong_dept__name: '7车间'
},
params10: {
- belong_dept_name: '10车间',
- date: '2023-10-20'
+ mgroup__belong_dept__name: '10车间'
},
params8: {
mgroup__belong_dept__name: '8车间',
@@ -547,7 +589,7 @@ export default {
apiObjMlog: null,
apiObjHandover: null,
apiObjWMaterial: this.$API.wpm.wmaterial.list,
- apiObjMtask: null,
+ apiObjMtask: this.$API.pm.mtask.list,
apiObj: null,
apiObjMetarial: this.$API.wpm.wmaterial.list,
@@ -606,10 +648,9 @@ export default {
let rightHeight = heights - 100;
this.rightHeight = rightHeight / 2 + 'px';
let NowDate = new Date();
- let month = NowDate.getMonth() > 8 ? NowDate.getMonth() + 1 : '0' + (NowDate.getMonth() + 1)
- this.params7.date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
- this.params10.date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
- this.apiObjMtask = this.$API.pm.mtask.daylist;
+ let paramsDate = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
+ // NowDate.getMonth() > 8 ? NowDate.getMonth() + 1 : '0' + (NowDate.getMonth() + 1)
+ this.apiObjMtask = this.$API.pm.mtask.list;
this.apiObjMlog = this.$API.wpm.mlog.list;
this.apiObjHandover = this.$API.wpm.handover.list;
this.getGroup();
@@ -636,14 +677,39 @@ export default {
},
handleClick(val) {
console.log(val.index);
- if (val.index == 0 || val.index == 1) {
+ if (val.index == 0) {
this.activeSpan = 24
- } else {
- this.activeSpan = 12
+ }else if(val.index == 1) {
+ this.activeSpan = 24;
+ this.paramsMaterial.belong_dept__name = '8车间';
+ this.$refs.table8wM.refresh();
+ }else if(val.index == 2){
+ this.activeSpan = 12;
+ this.paramsMaterial.belong_dept__name = '7车间';
+ this.$refs.table8wM.refresh();
}
+ else if(val.index == 3){
+ this.activeSpan = 12;
+ this.paramsMaterial.belong_dept__name = '10车间';
+ this.$refs.table8wM.refresh();
+ }
+
this.choseData = null;
this.flogs = [];
},
+ handleQuerys(){
+ if(this.activeName=='7车间'){
+ this.params7.start_date = this.paramsDate;
+ this.params7.end_date = this.paramsDate;
+ console.log('paramsDate',this.paramsDate)
+ console.log('7车间',this.params7)
+ this.$refs.table7.queryData(this.params7);
+ }else{
+ this.params10.start_date = this.paramsDate;
+ this.params10.end_date = this.paramsDate;
+ this.$refs.table10.queryData(this.params10);
+ }
+ },
table_submit(row) {
let obj = {};
obj.ids = [];
@@ -652,6 +718,12 @@ export default {
debugger;
})
},
+ //退火日志提交
+ table_tuihuo_submit(row){
+ this.$API.wpm.mlog.submit.req(row.id,row).then(res => {
+ console.log(res)
+ })
+ },
//自定义新增任务
addTask(taskId) {
var $this = this;
@@ -732,11 +804,11 @@ export default {
handleSuccess() {
},
- handleQuery() {
- // this.$refs.table.queryData(this.query)
- debugger;
- generateExcel(this.columns, this.flogsData, '测试')
- },
+ // handleQuery() {
+ // // this.$refs.table.queryData(this.query)
+ // debugger;
+ // generateExcel(this.columns, this.flogsData, '测试')
+ // },
resetQuery() {
this.query = {};
},
diff --git a/src/views/wpm/worktask_form.vue b/src/views/wpm/worktask_form.vue
index 04da8973..4253d864 100644
--- a/src/views/wpm/worktask_form.vue
+++ b/src/views/wpm/worktask_form.vue
@@ -111,110 +111,185 @@
-
+
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+ 不合格原因及数量:
+
-
-
+
-
-
+
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ placeholder="请输入检测数">
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -621,7 +696,7 @@
关联产品计数:
-
+
{
let obj = {};
obj.material_out = item;
- obj.count_ok = 0;
+ obj.count_ok = null;
mlogb.push(obj)
})
- this.form.mlogb = mlogb;
+ this.mlogb = mlogb;
}
}
this.getWorkShopMaterial();
@@ -910,11 +986,13 @@
this.form.count_notok = this.form.count_n_zw+this.form.count_n_tw+this.form.count_n_qp+this.form.count_n_wq+this.form.count_n_qt;
}else if(this.activeType=='10车间'){
this.form.count_notok = this.form.count_n_wq+this.form.count_n_tw+this.form.count_n_dl+this.form.count_n_pb+this.form.count_n_dxt+this.form.count_n_jsqx;
- }
+ }else if(this.activeType=='退火'){
+ this.form.count_notok = this.form.count_n_wq+this.form.count_n_tw+this.form.count_n_dl+this.form.count_n_pb+this.form.count_n_dxt+this.form.count_n_jsqx+this.form.count_break;
+ }
},
countOkSun(){
let ok_number = 0;
- this.form.mlogb.forEach(item=>{
+ this.mlogb.forEach(item=>{
ok_number+=item.count_ok;
})
this.form.count_ok = ok_number;
@@ -934,14 +1012,32 @@
this.form.mtask = this.mtask;
this.form.count_notok = this.form.count_n_wq+this.form.count_n_tw+this.form.count_n_dl+this.form.count_n_pb+this.form.count_n_dxt+this.form.count_n_jsqx;
let ok_number = 0;
- this.form.mlogb.forEach(item=>{
+ this.mlogb.forEach(item=>{
ok_number+=item.count_ok;
})
this.form.count_ok = ok_number;
+ }else if(this.activeType=='退火'){
+ this.form.mgroup = '3428194648706011136';
+ this.form.count_notok = this.form.count_n_wq+this.form.count_n_tw+this.form.count_n_dl+this.form.count_n_pb+this.form.count_n_dxt+this.form.count_n_jsqx+this.form.count_break;
}
- let sun = this.form.count_ok+this.form.count_notok;
- if(sun==this.form.count_real){
- if (this.mode == "add") {
+ if(this.activeType=='10车间'){
+ let mlogb = this.mlogb;
+ let newArr = [];
+ mlogb.forEach(item=>{
+ if(item.count_ok!==null&&item.count_ok!==''){
+ newArr.push(item)
+ }
+ })
+ this.form.mlogb = newArr;
+ }
+ // let sun = this.form.count_ok+this.form.count_notok;
+ // if(sun==this.form.count_real){
+
+ // }else{
+ // this.isSaveing = false;
+ // this.$message.error("合格总数与不合格总数与出管总数不对等");
+ // }
+ if (this.mode == "add") {
this.$API.wpm.mlog.create.req(this.form).then(res=>{
this.isSaveing = false;
this.$emit("success", this.form, this.mode);
@@ -964,10 +1060,6 @@
return err;
})
}
- }else{
- this.isSaveing = false;
- this.$message.error("合格总数与不合格总数与出管总数不对等");
- }
}
});
},