diff --git a/src/views/bigScreen/bxerp/chejiankanban.vue b/src/views/bigScreen/bxerp/chejiankanban.vue
index 661df2d5..39a1298f 100644
--- a/src/views/bigScreen/bxerp/chejiankanban.vue
+++ b/src/views/bigScreen/bxerp/chejiankanban.vue
@@ -444,9 +444,8 @@ export default {
//每个人日生产量:个人绩效
this.getCount();
//车间整体产品统计:最后一个工序的产品统计
- this.getMaterials();
//产品占比:最后一个工序的产品占比
- this.getMaterials();
+ // this.getMaterials();// this.getmgroupMaterial();
})
},
methods: {
@@ -526,7 +525,6 @@ export default {
//库存统计列表
getmgroupMaterial(item) {
let that = this;
- console.log('item',item);
let params = { tag: 'done',page_size:1,mgroup: item.id };
that.$API.wpm.wmaterial.list.req(params).then((res) => {
let obj = {};
@@ -556,13 +554,10 @@ export default {
}
})
let maxNum = valuelist.sort((a, b) => b - a)[0]+2;
- console.log('maxNum',maxNum);
- console.log('maxNum',maxNum);
let arr = [];
valuelist.forEach((item)=>{
arr.push(maxNum)
})
- console.log('arr',arr);
that.chartOption2.yAxis[0].data = namelist;
that.chartOption2.yAxis[1].data = valuelist;
that.chartOption2.series[0].data = valuelist;
@@ -580,7 +575,7 @@ export default {
let that = this;
let params = {
page: 0, belong_dept:that.deptId,
- query: " { id, name, number, model, state ,mgroup_name }"
+ // query: " { id, name, number, model, state ,mgroup_name }"
};
that.config_middle_bottom.data = [];
that.$API.em.equipment.list.req(params).then((res) => {
@@ -588,7 +583,7 @@ export default {
res.forEach((item) => {
let arr = [];
let state_ = that.state_[item.state];
- let running_state_ = runningStateEnum[scope.row.running_state]?.text;
+ let running_state_ = runningStateEnum[item.running_state]?.text;
arr[0] = item.name;
arr[1] = item.number;
arr[2] = state_;
@@ -603,8 +598,8 @@ export default {
let that = this;
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
let params = {
- // query: {start_date:date,end_date:date,dept_name:that.deptName},
- query: {start_date:'2025-06-11',end_date:'2025-06-11',dept_name:that.deptName},
+ query: {start_date:date,end_date:date,dept_name:that.deptName},
+ // query: {start_date:'2025-06-11',end_date:'2025-06-11',dept_name:that.deptName},
};
let namelist = [],valuelist = [];
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
diff --git a/src/views/bigScreen/index_gx.vue b/src/views/bigScreen/index_gx.vue
index b5ef4570..5ed56cb2 100644
--- a/src/views/bigScreen/index_gx.vue
+++ b/src/views/bigScreen/index_gx.vue
@@ -706,12 +706,12 @@ export default {
let week = nowDate.getDay();//当前时间的week数
let weekFirst = week-1;//第一天对应的天数
let weekLast = 7-week;//最后一天对应的天数
- let first = new Date(new Date(nowDate.getTime() - (weekFirst * ondDayTime)));//本周周一
- let last = new Date(new Date(nowDate.getTime() + (weekLast * ondDayTime)));//本周周日
+ let first = that.$TOOL.dateFormat2(new Date(nowDate.getTime() - (weekFirst * ondDayTime)));//本周周一
+ let last = that.$TOOL.dateFormat2(new Date(nowDate.getTime() + (weekLast * ondDayTime)));//本周周日
let objWeek = {query:{
start_date:first,end_date:last,mgroup_name:'二次超洗',
group_bys_date:',月,周',order_bys_date:',月,周',
- select_cols_date:', EXTRACT ( MONTH FROM mlog.work_end_time) AS 月,EXTRACT(WEEK FROM mlog.work_end_time) AS 周'
+ select_cols_date:', EXTRACT ( MONTH FROM mlog.handle_date) AS 月,EXTRACT(WEEK FROM mlog.handle_date) AS 周'
}};
that.$API.bi.dataset.exec.req('lineDay_m2', objWeek).then((res1) => {
if(res1.data2.ds0&&res1.data2.ds0.length>0){
@@ -723,7 +723,7 @@ export default {
let objMonth = {query:{
start_date:start_month,end_date:end_month,mgroup_name:'二次超洗',
group_bys_date:',月',order_bys_date:',月',
- select_cols_date:', EXTRACT ( MONTH FROM mlog.work_end_time) AS 月'
+ select_cols_date:', EXTRACT ( MONTH FROM mlog.handle_date) AS 月'
}};
that.$API.bi.dataset.exec.req('lineDay_m2', objMonth).then((res2) => {
if(res2.data2.ds0&&res2.data2.ds0.length>0){
diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue
index ecaa70da..6eb5d4ac 100644
--- a/src/views/inm/mioitem.vue
+++ b/src/views/inm/mioitem.vue
@@ -61,7 +61,7 @@
type="primary"
icon="el-icon-plus"
@click="table_add"
- v-if="mioObj.state == 10"
+ v-if="mioObj.state == 10&&mode!=='show'"
>新增
@@ -145,6 +145,7 @@
fixed="right"
align="center"
width="150px"
+ v-if=" mode!=='show'"
>
+
+
+
@@ -269,6 +277,8 @@ export default {
},
mounted() {
let that = this;
+ let url1 = window.location.href;
+ this.url_code = url1.split('/')[3];
let config_base = that.$TOOL.data.get("BASE_INFO").base;
that.project_code = config_base.base_code;
},
@@ -398,7 +408,7 @@ export default {
});
},
selectChange(item){
- console.log(item)
+ // console.log(item)
let that = this;
that.wbatchOptions.forEach((item) => {
if(that.form.batch == item.batch){
@@ -411,6 +421,7 @@ export default {
var that = this;
var type = this.form.type;
that.form.material = that.selectObj.id;
+ that.form.batch = that.selectObj.bin_number_main;
that.mTracking = that.selectObj.tracking;
if (type == "do_in") {
if (that.selectObj.is_assemb) {
@@ -511,6 +522,7 @@ export default {
}
}
that.form.mioitemw = that.mioitemw;
+ // console.log(that.form);
try {
let res;
if (that.mode == "add") {
diff --git a/src/views/inm/mioitemlist.vue b/src/views/inm/mioitemlist.vue
new file mode 100644
index 00000000..f0d3587c
--- /dev/null
+++ b/src/views/inm/mioitemlist.vue
@@ -0,0 +1,218 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.material_.number }}
+
+
+
+
+ {{ scope.row.material_.name }}
+
+
+
+
+ {{ scope.row.material_.bin_number_main }}
+
+
+
+
+ {{ scope.row.material_.specification }}
+
+
+
+
+ {{ scope.row.material_.model }}
+
+
+
+
+ {{ scope.row.material_.unit }}
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.mio_.submit_user_name }}
+
+
+
+
+ {{ scope.row.mio_.number }}
+
+
+
+
+ {{ typeDict[scope.row.mio_.type] }}
+
+
+
+
+
+
+
+
+
diff --git a/src/views/inm/miolist.vue b/src/views/inm/miolist.vue
new file mode 100644
index 00000000..23409a5c
--- /dev/null
+++ b/src/views/inm/miolist.vue
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ typeDict[scope.row.type] }}
+
+
+
+
+ {{ stateDict[scope.row.state] }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mtm/materials_form_gx.vue b/src/views/mtm/materials_form_gx.vue
index 9990e240..a519a763 100644
--- a/src/views/mtm/materials_form_gx.vue
+++ b/src/views/mtm/materials_form_gx.vue
@@ -113,6 +113,13 @@
+
+
+
+
+
+
+
+
+
+
@@ -252,6 +264,9 @@ export default {
},
typeChange(val) {
this.getMaterial(val);
+ if(this.form.type == 40) {
+ this.form.into_wm = false;
+ }
},
//提交
submit() {
@@ -300,6 +315,7 @@ export default {
that.form.is_hidden = data.is_hidden;
that.form.unit_price = data.unit_price;
that.form.photo = data.photo;
+ that.form.into_wm = data.into_wm;
that.form.photo_number = data.photo_number;
}else{
Object.assign(this.form, data);
diff --git a/src/views/mtm/materials_gx.vue b/src/views/mtm/materials_gx.vue
index ee4b0cfa..b707e949 100644
--- a/src/views/mtm/materials_gx.vue
+++ b/src/views/mtm/materials_gx.vue
@@ -107,6 +107,8 @@
width="80"
>
+
+
批次
diff --git a/src/views/statistics/wpr_statistics.vue b/src/views/statistics/wpr_statistics.vue
index 7f73d87e..5d00b5f1 100644
--- a/src/views/statistics/wpr_statistics.vue
+++ b/src/views/statistics/wpr_statistics.vue
@@ -248,13 +248,13 @@ export default {
material_start__type:30,
},
params_mio:{
- item_mio_w_mioitem_number:'',
+ item_mio__w_mioitem__number:'',
},
params_mlog:{
- b_mlog_wmlogb_number:'',
+ b_mlog__w_mlogb__number:'',
},
params_handover:{
- b_handover_w_handoverb_number:'',
+ b_handover__w_handoverb__number:'',
},
stateDict: {
10: "创建中",
@@ -293,12 +293,15 @@ export default {
that.wprItem = res.wm_;
that.wprItem.number = row.number;
}
- that.params_mio.item_mio_w_mioitem_number = row.number;
- that.params_mlog.b_mlog_wmlogb_number = row.number;
- that.params_handover.b_handover_w_handoverb_number = row.number;
+ that.params_mio.item_mio__w_mioitem__number = row.number;
+ that.params_mlog.b_mlog__w_mlogb__number = row.number;
+ that.params_handover.b_handover__w_handoverb__number = row.number;
that.apiObj_mlog = that.$API.wpm.mlog.list;
that.apiObj_handover = that.$API.wpm.handover.list;
that.apiObj_mio = that.$API.inm.mio.list;
+ that.$refs.tableMlog.queryData(that.params_mlog);
+ that.$refs.tableHandover.queryData(that.params_handover);
+ that.$refs.tableMio.queryData(that.params_mio);
})
},
diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue
index 7e19f621..fd9ad916 100644
--- a/src/views/wpm_bx/handover_form.vue
+++ b/src/views/wpm_bx/handover_form.vue
@@ -22,7 +22,7 @@
@change="formWminChange(wm_in)"
style="width: 300px;margin-left: 10px;"
>
-
+
{{ totalCount }}
diff --git a/src/views/wpm_bx/inmIn.vue b/src/views/wpm_bx/inmIn.vue
index 02d96aad..6a731c4b 100644
--- a/src/views/wpm_bx/inmIn.vue
+++ b/src/views/wpm_bx/inmIn.vue
@@ -465,28 +465,35 @@ export default {
if(type=='wm'){
let params = {};
params.tid = row.id;
+ let materialname = row.material_.name + '|' + row.material_.process_name;
+ let specification = row.material_.specification;
if(that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
params.label_template_name = '工序带板段号打印模板';
that.wprParams.wm = row.id;
let numbers = ['','','','','','',''];
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
let leng = res.length;
+ let slice_count = null;//获取这批板段一个板段能切几片?
+ let wprItem = res[0].oinfo;
+ for(let key in wprItem){
+ if(wprItem[key].name=='切片数'){
+ slice_count = wprItem[key].val;
+ }
+ }
if(leng>0){
- let nums = leng/4;
+ let nums = leng/3;
for(let i=0;i {
let obj = {};
obj.printer_commands = res.commands;
diff --git a/src/views/wpm_bx/inmOut.vue b/src/views/wpm_bx/inmOut.vue
index 1d657f86..37cb02de 100644
--- a/src/views/wpm_bx/inmOut.vue
+++ b/src/views/wpm_bx/inmOut.vue
@@ -466,28 +466,36 @@ export default {
if(type=='wm'){
let params = {};
params.tid = row.id;
+ let materialname = row.material_.name + '|' + row.material_.process_name;
+ let specification = row.material_.specification;
if(that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'){
+ console.log('route_code',that.route_code);
params.label_template_name = '工序带板段号打印模板';
that.wprParams.wm = row.id;
let numbers = ['','','','','','',''];
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
let leng = res.length;
+ let slice_count = null;//获取这批板段一个板段能切几片?
+ let wprItem = res[0].oinfo;
+ for(let key in wprItem){
+ if(wprItem[key].name=='切片数'){
+ slice_count = wprItem[key].val;
+ }
+ }
if(leng>0){
- let nums = leng/4;
+ let nums = leng/3;
for(let i=0;i {
let obj = {};
obj.printer_commands = res.commands;
diff --git a/src/views/wpm_bx/inm_record_form.vue b/src/views/wpm_bx/inm_record_form.vue
index 17f20900..5f59a722 100644
--- a/src/views/wpm_bx/inm_record_form.vue
+++ b/src/views/wpm_bx/inm_record_form.vue
@@ -63,7 +63,7 @@
>
-
+
@@ -91,7 +91,7 @@
>
-
+
diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue
index 0f78c843..be8bb86f 100644
--- a/src/views/wpm_bx/mlog_detail.vue
+++ b/src/views/wpm_bx/mlog_detail.vue
@@ -118,7 +118,7 @@
+ >删除
diff --git a/src/views/wpm_bx/mlogb_form.vue b/src/views/wpm_bx/mlogb_form.vue
index b780f9bf..b86059fa 100644
--- a/src/views/wpm_bx/mlogb_form.vue
+++ b/src/views/wpm_bx/mlogb_form.vue
@@ -58,7 +58,7 @@
-
+
diff --git a/src/views/wpm_bx/mlogs.vue b/src/views/wpm_bx/mlogs.vue
index 5625b972..aaef461e 100644
--- a/src/views/wpm_bx/mlogs.vue
+++ b/src/views/wpm_bx/mlogs.vue
@@ -205,7 +205,9 @@ export default {
data() {
return {
apiObj: null,
- params: { mgroup: "" ,submit_time__isnull:true},
+ params: { mgroup: "" ,submit_time__isnull:true,
+ query: " { id,equipment, material_out_name, equipment_name, reminder_interval_list ,mstate_json,belong_dept_name, mgroup_name,handle_user_name,work_start_time,work_end_time,submit_time}"
+ },
query: {submit_time__isnull:true},
dialog: {
save: false,
diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue
index 4376d7ff..15f41672 100644
--- a/src/views/wpm_gx/handover.vue
+++ b/src/views/wpm_gx/handover.vue
@@ -185,7 +185,7 @@
size="small"
@click="table_reBack(scope.row)"
type="danger"
- v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&scope.row.type == 10&&scope.row.mtype == 10"
+ v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&(scope.row.type == 10||scope.row.type == 20)&&scope.row.mtype == 10"
>退回
{
- this.$refs.saveDialog.open("add",codeText2,20);
+ this.$refs.saveDialog.open("add",codeText2,10);
});
},
//编辑
diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue
index b8ee7a0d..ea64b8e1 100644
--- a/src/views/wpm_gx/handover_form.vue
+++ b/src/views/wpm_gx/handover_form.vue
@@ -35,7 +35,26 @@
-
+
+
+ 不合格
+ 返工
+ {{ scope.row.batch }}({{ scope.row.material_name }})
+ {{ scope.row.defect_name }}
+
+
+
+
+
-
+
-
+
-
+
{{ listItem.count_cando }}
-
+
{
- that.materialOptions = res;
- res.forEach(item=>{
- if(that.codeText!==''&&item.batch === that.codeText){
- let obj = {};
- obj.wm = item.id;
- obj.batch = item.batch;
- obj.count = item.count_cando;
- obj.count_cando = item.count_cando;
- that.totalCount = item.count_cando;
- that.form.handoverb.push(obj)
- that.getResaveMgroups(item.material);
- }
- })
- });
- },
+ // getMaterial() {
+ // let that = this;
+ // var req = {
+ // page: 0,
+ // state:10,
+ // tag:'done'
+ // };
+ // that.materialOptions = [];
+ // req.mgroup = that.mgroupId;
+ // that.listParams = req;
+ // this.$API.wpm.wmaterial.list.req(req).then((res) => {
+ // that.materialOptions = res;
+ // res.forEach(item=>{
+ // if(that.codeText!==''&&item.batch === that.codeText){
+ // let obj = {};
+ // obj.wm = item.id;
+ // obj.batch = item.batch;
+ // obj.count = item.count_cando;
+ // obj.count_cando = item.count_cando;
+ // that.totalCount = item.count_cando;
+ // that.form.handoverb.push(obj)
+ // that.getResaveMgroups(item.material);
+ // }
+ // })
+ // });
+ // },
getResaveMgroups(material){
let that = this;
let params = {
@@ -393,45 +420,45 @@ export default {
})
},
//获取车间不合格物料
- getMaterialNotok() {
- let that = this;
- that.materialOptions = [];
- var req = {
- mgroupx: that.mgroupId,
- page: 0,
- state:20
- };
- that.listParams = req;
- this.$API.wpm.wmaterial.list.req(req).then((res) => {
- that.materialOptions = res;
- });
- },
- getMaterialRework(){
- let that = this;
- that.materialOptions = [];
- var req = {
- mgroup: that.mgroupId,
- page: 0,
- tag : 'done'
- };
- that.listParams = req;
- this.$API.wpm.wmaterial.list.req(req).then((res) => {
- that.materialOptions = res;
- });
- },
+ // getMaterialNotok() {
+ // let that = this;
+ // that.materialOptions = [];
+ // var req = {
+ // mgroupx: that.mgroupId,
+ // page: 0,
+ // state:20
+ // };
+ // that.listParams = req;
+ // this.$API.wpm.wmaterial.list.req(req).then((res) => {
+ // that.materialOptions = res;
+ // });
+ // },
+ // getMaterialRework(){
+ // let that = this;
+ // that.materialOptions = [];
+ // var req = {
+ // mgroup: that.mgroupId,
+ // page: 0,
+ // tag : 'done'
+ // };
+ // that.listParams = req;
+ // this.$API.wpm.wmaterial.list.req(req).then((res) => {
+ // that.materialOptions = res;
+ // });
+ // },
//获取废品库物料
- getMaterialFP() {
- let that = this;
- that.materialOptions = [];
- var obj = {
- page: 0,
- state : 50,
- state_all: 1
- };
- that.$API.wpm.wmaterial.list.req(obj).then((res) => {
- that.materialOptions = res;
- });
- },
+ // getMaterialFP() {
+ // let that = this;
+ // that.materialOptions = [];
+ // var obj = {
+ // page: 0,
+ // state : 50,
+ // state_all: 1
+ // };
+ // that.$API.wpm.wmaterial.list.req(obj).then((res) => {
+ // that.materialOptions = res;
+ // });
+ // },
//获取交送工段人员
getUserList() {
let that = this;
@@ -521,21 +548,47 @@ export default {
this.visible = true;
return this;
},
- materialChange() {
+ materialChange0(){
let that = this;
- let totalCount = 0;
- let data = that.materialOptions.filter((item) => {
- return that.selectItems.indexOf(item.id)>-1;
- });
- data.forEach(item=>{
- item.wm = item.id;
- item.count = item.count_cando;
- totalCount += Number(item.count_cando);
- })
- that.totalCount = totalCount;
- that.form.handoverb = data;
- that.getResaveMgroups(data[0].material);
+ let obj = {};
+ obj.wm = that.selectObj.id;
+ obj.batch = that.selectObj.batch;
+ obj.label = that.selectObj.defect !== null?that.selectObj.batch+'('+that.selectObj.material_name+')'+that.selectObj.defect_name:that.selectObj.batch+'('+that.selectObj.material_name+')';
+ obj.count = that.selectObj.count_cando;
+ obj.defect_name = that.selectObj.defect_name;
+ obj.count_cando = that.selectObj.count_cando;
+ obj.material = that.selectObj.material;
+ if(that.form.handoverb.length>0){
+ let datas = that.form.handoverb.filter((item) => {
+ return item.wm==that.selectObj.id;
+ });
+ if(datas.length>0){
+ that.$message.warning('该物料已存在');
+ }else{
+ that.totalCount += Number(obj.count_cando);
+ that.form.handoverb.push(obj);
+ }
+ }else{
+ that.totalCount += Number(obj.count_cando);
+ that.form.handoverb.push(obj);
+ }
+ that.getResaveMgroups(obj.material);
},
+ // materialChange() {
+ // let that = this;
+ // let totalCount = 0;
+ // let data = that.materialOptions.filter((item) => {
+ // return that.selectItems.indexOf(item.id)>-1;
+ // });
+ // data.forEach(item=>{
+ // item.wm = item.id;
+ // item.count = item.count_cando;
+ // totalCount += Number(item.count_cando);
+ // })
+ // that.totalCount = totalCount;
+ // that.form.handoverb = data;
+ // that.getResaveMgroups(data[0].material);
+ // },
countChange(){
let that = this;
let totalCount = 0;
@@ -628,17 +681,35 @@ export default {
if(arr.length>0){
that.$message.error("该批次已存在")
}else{
- that.materialOptions.forEach((item) => {
- if(item.batch == res.batch){
- let obj = {};
- obj.wm = item.id;
- obj.batch = item.batch;
- obj.counts = item.count;
- obj.count = item.count;
- that.form.handoverb.push(obj)
- that.getResaveMgroups(item.material);
- }
- })
+ let params = {mgroup: that.mgroupId,page: 0,state__in:res.state,search:res.batch,tag : 'done'};
+ if(that.type==10){
+ params.state__in = '10';
+ }else if(that.type==20){
+ params.state__in = '20,34';
+ }
+ that.$API.wpm.wmaterial.list.req(params).then((res1) => {
+ if(res1.length>0){
+ res1.forEach(item=>{
+ let cando = Number(item.count_canhandover);
+ if(cando>0&&item.defect_name==res.defect_name){
+ let obj = {};
+ obj.wm = item.id;
+ obj.batch = item.batch;
+ obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
+ obj.count = item.count_cando;
+ obj.defect_name = item.defect_name;
+ obj.count_cando = item.count_cando;
+ obj.material = item.material;
+ that.form.handoverb.push(obj)
+ that.getResaveMgroups(obj.material);
+ }
+ // else{
+ // that.$message.error("该批次物料没有可交接的数量")
+ // }
+ })
+ }
+ that.codeText = '';
+ });
}
})
//根据扫描内容,获取物料详情匹配当前库存物料
diff --git a/src/views/wpm_gx/mlog_detail.vue b/src/views/wpm_gx/mlog_detail.vue
index 39632e2a..ed33a910 100644
--- a/src/views/wpm_gx/mlog_detail.vue
+++ b/src/views/wpm_gx/mlog_detail.vue
@@ -339,7 +339,7 @@
:mlog="mlogId"
:mgroup="mgroup"
:is_fix = "is_fix"
- :mlogbindefect = "mlogbindefect"
+ :mlogbdefect = "mlogbdefect"
:mgroupMtype="mgroupMtype"
:mgroupName = "mgroupName"
:codeText = "codeText"
@@ -561,7 +561,7 @@ export default {
options: [],
tableData:[],
tableData2:[],
- mlogbindefect:[],
+ mlogbdefect:[],
mlogboutdefect:[],
saveInDialog: false,
ticketDialog:false,
@@ -699,17 +699,17 @@ export default {
if (valid) {
that.isSaveing = true;
let obj = {};
- let count_pn_jgqbl = 0,mlogbindefect=[];
+ let count_pn_jgqbl = 0,mlogbdefect=[];
that.qct_defects.forEach(item => {
count_pn_jgqbl += that.defectinform[item.defect_name] ;
let obj = {};
obj.defect = item.defect;
obj.count = that.defectinform[item.defect_name];
obj.mlogb = that.saveInForm.id;
- mlogbindefect.push(obj);
+ mlogbdefect.push(obj);
})
obj.count_use = that.saveInForm.count_use;
- obj.mlogbindefect = mlogbindefect;
+ obj.mlogbdefect = mlogbdefect;
obj.count_pn_jgqbl = count_pn_jgqbl;
that.$API.wpm.mlogb.updateIn.req(that.saveInForm.id, obj).then((res) => {
that.isSaveing = false;
@@ -804,6 +804,7 @@ export default {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open();
+ this.codeText = '';
});
},
handleSaveSuccess() {
diff --git a/src/views/wpm_gx/mlogb_form.vue b/src/views/wpm_gx/mlogb_form.vue
index 7cc8d2fb..28c891b2 100644
--- a/src/views/wpm_gx/mlogb_form.vue
+++ b/src/views/wpm_gx/mlogb_form.vue
@@ -18,6 +18,27 @@
+
+
+
+
+ 不合格
+ 返工
+ {{ scope.row.batch }}({{ scope.row.material_name }})
+ {{ scope.row.defect_name }}
+
+
+
+
+
+
@@ -76,7 +99,7 @@
[]
},
@@ -238,6 +261,7 @@ export default {
},
],
},
+ selectObj:{count:0},
batch_count:null,
codeBatch:"",
materialFix:"",
@@ -249,20 +273,37 @@ export default {
visible: false,
isSaveing: false,
setFiltersVisible: false,
+ apiObjM:this.$API.wpm.wmaterial.list,
+ paramsM:{},
};
},
mounted() {
let that = this;
+ that.paramsM.mtaskx =that.form.mtask;
+ that.paramsM.mgroup = that.mgroup;
+ // that.paramsM.query = "{id,batch,count,material,material_name,defect_name}";
+ that.paramsM.page =0;
+ if(that.is_fix){//来料未完成的返修品&&出料已完成的返修品和不合格品
+ that.paramsM.tag = 'canfix';
+ }else{
+ that.paramsM.material =that.materialIn;
+ that.paramsM.state =10;
+ that.paramsM.tag = 'todo';
+ }
if(that.codeText!==''){
let id = that.codeText.split('#')[1];
this.$API.cm.labelmat.item.req(id).then((res) => {
that.codeBatch = res.batch;
- this.getMaterial();
+ that.paramsM.search = that.codeBatch;
+ that.apiObjM = that.$API.wpm.wmaterial.list;
+ // this.getMaterial();
}).catch((err) => {
- that.getMaterial();
+ that.apiObjM = that.$API.wpm.wmaterial.list;
+ // that.getMaterial();
})
}else{
- that.getMaterial();
+ that.apiObjM = that.$API.wpm.wmaterial.list;
+ // that.getMaterial();
}
if(that.is_fix){}else{
this.getdefects();
@@ -292,6 +333,8 @@ export default {
let obj = {};
obj.mtaskx =that.form.mtask;
obj.mgroup = that.mgroup;
+ obj.search = that.codeBatch;
+ // obj.query = "{id,batch,count,material,material_name,defect_name}";
obj.page =0;
if(that.is_fix){//来料未完成的返修品&&出料已完成的返修品和不合格品
obj.tag = 'canfix';
@@ -328,9 +371,9 @@ export default {
})
that.qct_defects=res.qct_defects;
let count_pn_jgqbl = 0;
- if(data.mlogbindefect.length>0){
+ if(data.mlogbdefect.length>0){
that.qct_defects.forEach(item => {
- data.mlogbindefect.forEach(item2=>{
+ data.mlogbdefect.forEach(item2=>{
if(item.defect==item2.defect){
count_pn_jgqbl+=item2.count;
that.defectform[item.defect_name] = item2.count;
@@ -413,6 +456,8 @@ export default {
if (valid) {
that.isSaveing = true;
that.form.mlog = that.mlog;
+ that.form.batch = that.selectObj.batch;
+ that.form.count_use = that.selectObj.count_cando;
if(that.mgroupMtype==10&&that.cellsList.length>0){
that.form.count_json_from = that.cellsList;
}
@@ -428,6 +473,8 @@ export default {
})
that.form.mlogbdefect = mlogbdefect;
that.form.count_pn_jgqbl = count_pn_jgqbl;
+ console.log(that.form);
+ console.log(that.selectObj);
that.$API.wpm.mlogb.in.req(that.form).then((res) => {
that.isSaveing = false;
that.$emit("success");