diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue
index 7c3d615c..7d9feff0 100644
--- a/src/components/scTable/index.vue
+++ b/src/components/scTable/index.vue
@@ -291,13 +291,13 @@ export default {
},
//刷新数据
refresh() {
- this.$refs.scTable.clearSelection();
+ // this.$refs.scTable.clearSelection();
this.getData();
},
//查询数据 追加query
upData(query, page = 1) {
this.currentPage = page;
- this.$refs.scTable.clearSelection();
+ // this.$refs.scTable.clearSelection();
Object.assign(this.tableParams, query);
this.getData();
},
@@ -305,7 +305,7 @@ export default {
queryData(query, page = 1) {
this.currentPage = page;
Object.assign(this.tableParams, query);
- this.$refs.scTable.clearSelection();
+ // this.$refs.scTable.clearSelection();
this.$refs.scTable.clearFilter();
this.getData();
},
diff --git a/src/views/statistics/stock_statistics.vue b/src/views/statistics/stock_statistics.vue
index 88a50125..1c4908a3 100644
--- a/src/views/statistics/stock_statistics.vue
+++ b/src/views/statistics/stock_statistics.vue
@@ -321,15 +321,21 @@ export default {
that.initChartOptions();
},
initChartOptions() {
- this.$API.bi.dataset.exec.req("materialCount", {query: {
+ let that = this;
+ let query = {
"select_dept": "",
"groupby_dept": "",
"material_types": this.params.type,
- "select_material": "material.cate as cate",
- "groupby_material": "material.cate",
- "select_material_name": "",
- "groupby_material_name": ""
- }}).then((res) => {
+ "select_material": "",
+ "groupby_material": ""
+ };
+ if(that.params.type==40){
+ query.select_material="material.cate as cate";
+ query.groupby_material="material.cate";
+ query.select_material_name = "";
+ query.groupby_material_name = "";
+ }
+ this.$API.bi.dataset.exec.req("materialCount", {query:query }).then((res) => {
if (res.echart_options) {
this.echartsOptions = JSON.parse(res.echart_options);
}
diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue
index a39a5a1b..efc6e4fa 100644
--- a/src/views/wpm_bx/handover_form.vue
+++ b/src/views/wpm_bx/handover_form.vue
@@ -613,7 +613,7 @@ export default {
that.change_batch = true;
}
that.form.handoverb = data?data:[];
- if(data.length>0){
+ if(data&&data!==''&&data.length>0){
that.totalCount = 0;
data.forEach((item,index)=>{
that.totalCount += Number(item.count);
diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue
index 1c4fa3d8..00475a9f 100644
--- a/src/views/wpm_bx/mlog_detail.vue
+++ b/src/views/wpm_bx/mlog_detail.vue
@@ -882,7 +882,8 @@ export default {
saveMuserSubmit(row){
let that = this;
that.isSaveing = true;
- that.$API.wpm.mloguser.create.req(that.addTemplate).then((res) => {
+ row.mlog = that.mlogId;
+ that.$API.wpm.mloguser.create.req(row).then((res) => {
that.isSaveing = false;
that.$message.success("操作成功");
that.getProcessList();
@@ -895,7 +896,7 @@ export default {
that.$confirm("确定删除吗?").then(res=>{
that.$API.wpm.mloguser.delete.req(row.id).then((res) => {
that.$message.success("删除成功");
- that.$refs.tableMuser.refresh();
+ that.getProcessList();
})
})
},
diff --git a/src/views/wpm_bx/mlogbw_check.vue b/src/views/wpm_bx/mlogbw_check.vue
index 89110c5d..b2947711 100644
--- a/src/views/wpm_bx/mlogbw_check.vue
+++ b/src/views/wpm_bx/mlogbw_check.vue
@@ -36,6 +36,7 @@
:addTemplate="addTemplate"
placeholder="暂无数据"
:hideAdd="hideAdd"
+ :pushType="pushType"
:canMultiple = "canMultiple"
@selectChange="selectChange"
@selectAllChange="selectAllChange"
@@ -46,10 +47,11 @@
{{ scope.row.number }}
——{{ scope.row.wpr_number_out }}
@@ -507,6 +509,7 @@ export default {
wprNumber:"",
route_code:"",
wprInputText:"",
+ pushType:"unshift",
params: {mlogb:'',page:0},
insInput:false,
canMultiple:false,
@@ -582,7 +585,9 @@ export default {
}
if(that.mode == 'ins'){
if(that.route_code=='niuzhuan'){
+ that.getEquipment4();
that.gettestitem();
+ that.getOptions();
}else{
that.getOptions();
that.getList();
@@ -910,9 +915,9 @@ export default {
},
formTableEdit(row) {
let that = this;
- if(that.route_code=='niuzhuan'&&that.optionsEq.length==0){
- that.getEquipment4();
- }
+ // if(that.route_code=='niuzhuan'&&that.optionsEq.length==0){
+ // that.getEquipment4();
+ // }
that.mlogbwlist.forEach((item, index) => {
if (item.id == row.id) {
that.mlogbwlist[index].isEdit = true;
@@ -1170,9 +1175,9 @@ export default {
that.mlogbwlist[0].work_start_time = that.$TOOL.dateFormat(date, 'yyyy-MM-dd hh:mm:ss');
that.timeChange(that.mlogbwlist[0]);
}
- if(that.optionsEq.length==0){
- that.getEquipment4();
- }
+ // if(that.optionsEq.length==0){
+ // that.getEquipment4();
+ // }
}
if(that.setForm.cd_req_addr!==null&&!that.insInput){
//执行cd_req_addr,获取检测设备的数据
diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue
index 37a8cc28..22157a3d 100644
--- a/src/views/wpm_bx/mlogbw_check_table.vue
+++ b/src/views/wpm_bx/mlogbw_check_table.vue
@@ -204,7 +204,7 @@
-
+
@@ -216,11 +216,13 @@
-
+
-
+
+
+
@@ -231,7 +233,7 @@
保存
- 取消
+ 取消
@@ -366,7 +368,6 @@ export default {
selectWprList:[],
selectedindexes:[],
qct_defects_origin:[],
- selectWpr:[],
tableHeight:500,
apiObjPrint:this.$API.cm.labelmat.fromWm,
printer_name:localStorage.getItem("printer_name")
@@ -488,15 +489,6 @@ export default {
that.options = res;
})
},
- optionChange(row){
- let that = this;
- that.options.forEach((item) => {
- if(item.id == row.wpr){
- let index = that.mlogbwlist.indexOf(row);
- that.mlogbwlist[index].number = item.number;
- }
- })
- },
getList(){
let that = this;
let params = {};
@@ -766,7 +758,7 @@ export default {
that.qct_defects.forEach(item => {
if(that.form.defectids.indexOf(item.defect) > -1){
item.canEdit = true;
- item.value=null;
+ item.value=false;
that.defectlists.push(item);
}
})
@@ -783,7 +775,7 @@ export default {
if(that.checkAll){
that.qct_defects.forEach(item => {
item.canEdit = true;
- item.value=null;
+ item.value=false;
that.defectlists.push(item);
that.form.defectids.push(item.defect);
})
@@ -823,7 +815,6 @@ export default {
that.qct_testitems = [];
that.qct_testitems = that.testitemlists;
that.tableHeight = document.getElementById('mlogbwMain').clientHeight-80;
- // that.getList();
}).catch(() => {
that.isSaveing = false;
})
@@ -838,13 +829,11 @@ export default {
this.form.defectids = [];
this.checkVisible = false;
},
+ //批量操作
check_set(){
- this.wprNumber = "";
- this.selectWpr = [];
- if(this.selectWprList.length>0){
- this.selectWpr = this.selectWprList;
- }
- this.setVisible=true;
+ let that = this;
+ that.wprNumber = "";
+ that.setVisible=true;
},
//扫描物料将这一行放到第一行并编辑这一行
wprinputChange(){
@@ -912,24 +901,30 @@ export default {
let that = this;
that.mlogbwlist.forEach(item => {
if(item.number == wprNumber){
- that.selectWpr.push(item);
+ that.selectWprList.push(item);
that.wprNumber = "";
}
});
},
selectWprDel(row){
let that = this;
- that.selectWpr.forEach((item,index) => {
+ that.selectWprList.forEach((item,index) => {
if(item.number == row.number){
- that.selectWpr.splice(index,1);
+ that.selectWprList.splice(index,1);
}
});
},
+ defect_change(item){
+ let that = this;
+ that.selectWprList.forEach(row => {
+ row[item.defect_name] = item.value;
+ });
+ },
saveSetting(){
let that = this;
that.$refs.dialogForm.validate((valid) => {
if (valid) {
- that.selectWpr.forEach(item => {
+ that.selectWprList.forEach(item => {
if(!item.ftest){
item.ftest = {};
}
@@ -938,12 +933,12 @@ export default {
that.defectlists.forEach((item1) => {
let obj = {};
obj.defect = item1.defect;
- obj.has = item1.value;
+ obj.has = item[item1.defect_name]?item[item1.defect_name]:false;
item.ftest.ftestdefects.push(obj);
})
}
});
- that.$API.wpm.mlogbw.update.req("bulk",that.selectWpr).then((res) => {
+ that.$API.wpm.mlogbw.update.req("bulk",that.selectWprList).then((res) => {
that.setVisible = false;
that.selectedAll = false;
that.selectWprList = [];
@@ -958,6 +953,16 @@ export default {
}
});
},
+ saveSettingCancel(){
+ let that = this;
+ that.setVisible = false;
+ that.selectedAll = false;
+ that.selectWprList = [];
+ that.selectedindexes = [];
+ // that.defectlists.forEach(item => {
+ // item.value = false;
+ // });
+ },
},
};