diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue
index be7124e5..0b19cc46 100644
--- a/src/views/inm/mioitem.vue
+++ b/src/views/inm/mioitem.vue
@@ -141,7 +141,13 @@
-
+
+
+
+
+ 否
+ 是
+
@@ -158,8 +164,7 @@
link
type="primary"
@click="table_check(scope.row)"
- v-if="project_code=='bxerp'&&mioObj.state == 10 &&
- (type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
+ v-if="project_code=='bxerp'&&mioObj.state == 10 &&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
v-auth="'mioitem.test'"
>检验
-
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
+
{
@@ -1325,13 +1354,15 @@ export default {
if (valid) {
that.isSaveing = true;
try {
- if (that.type == "pur_in") {
+ if (that.type == "pur_in"&&that.project_code!="gx") {
console.log(that.form);
let arr = [];
- that.weight_kgs.forEach((item) => {
- arr.push(item.value);
- });
- that.form.weight_kgs = arr;
+ if(that.weight_kgs.length>0){
+ that.weight_kgs.forEach((item) => {
+ arr.push(item.value);
+ });
+ that.form.weight_kgs = arr;
+ }
console.log('that.form',that.form);
that.$API.inm.mioitem.testpurin
.req(that.mioitemId, that.form)
diff --git a/src/views/qm/behavior.vue b/src/views/qm/behavior.vue
index a0f26bfd..106cf8f8 100644
--- a/src/views/qm/behavior.vue
+++ b/src/views/qm/behavior.vue
@@ -119,7 +119,7 @@
prop="val_xj"
>
- {{state_xj[scope.row.val_xj]}}
+ {{state_xj[scope.row.val_xj]}}
-
+
{{ scope.row[item.text+'_'+item1] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -87,45 +102,83 @@ export default {
methods: {
getData(){
let that = this;
+ that.lists = [];
that.mgruops = [];
that.tableData = [];
+ that.titleList = [];
+ that.coefficient = [];
let params = {};
params.query = that.query;
that.$API.bi.dataset.exec.req('lineDay_p', params).then((res) => {
- let data = res.data2.ds0;
- that.lists = [];
- let coefficient = [];
- data.forEach(item=>{
- let obj = item.工序物料生产数?JSON.parse(item.工序物料生产数):{};
- for(let key in obj){
- if(coefficient.indexOf(key)<0){
- coefficient.push(key);
- }
- let mgroup = key.split('_')[0];
- let pname = key.split('_')[1];
- if(that.mgruops.indexOf(mgroup)<0){
- that.mgruops.push(mgroup);
- that.lists.push({text:mgroup,value:[pname]});
- }else{
- var index = that.mgruops.indexOf(mgroup);
- if(that.lists[index].value.indexOf(pname)<0){
- that.lists[index].value.push(pname);
+ let data = res.data2.ds0;
+ let coefficient = [];
+ if(data.length>0){
+ data.forEach(item=>{
+ let obj = item.工序物料生产数?JSON.parse(item.工序物料生产数):{};
+ for(let key in obj){
+ if(coefficient.indexOf(key)<0){
+ coefficient.push(key);
}
+ let mgroup = key.split('_')[0];
+ let pname = key.split('_')[1];
+ if(that.mgruops.indexOf(mgroup)<0){
+ that.mgruops.push(mgroup);
+ that.lists.push({text:mgroup,value:[pname]});
+ }else{
+ var index = that.mgruops.indexOf(mgroup);
+ if(that.lists[index].value.indexOf(pname)<0){
+ that.lists[index].value.push(pname);
+ }
+ }
+ item[key]= obj[key];
+ item[pname]= obj[key];
}
- item[key]= obj[key];
- item[pname]= obj[key];
- }
- })
- let item0 = {日期:'系数',操作人:'',indexs:0};
- coefficient.forEach(cof=>{
- item0[cof]= 1;
- })
- if(data.length>0){
+ })
+ that.coefficient = coefficient;
+ let item0 = {日期:'系数',操作人:'',indexs:0};
+ coefficient.forEach(cof=>{
+ item0[cof]= 1;
+ })
data.unshift(item0);
- }
- that.tableData = data;
+ data.forEach(item1 => {
+ item1.time_other=0;
+ let all = 0;
+ coefficient.forEach(item2 => {
+ if(item1[item2]){
+ all = all+ Number(item1[item2])
+ }
+ })
+ item1.time_all = all;
+ })
+ }
+ that.tableData = data;
});
},
+ xishuChange(){
+ let that = this;
+ that.tableData.forEach((item1,index1) => {
+ if(index1>0){
+ let all = 0;
+ that.coefficient.forEach(item2 => {
+ if(item1[item2]){
+ all = all+ Number(item1[item2])*Number(that.tableData[0][item2])
+ }
+ })
+ item1.time_all = all+Number(item1.time_other);
+ }
+ })
+ },
+ otherChange(index){
+ let that = this;
+ let all = 0;
+ console.log('index',index)
+ that.coefficient.forEach(item2 => {
+ if(that.tableData[index][item2]){
+ all = all+ Number(that.tableData[index][item2])*Number(that.tableData[0][item2])
+ }
+ that.tableData[index].time_all = all+Number(that.tableData[index].time_other);
+ })
+ },
deptChange(){
this.getData();
},
diff --git a/src/views/wpm/mlog6_form.vue b/src/views/wpm/mlog6_form.vue
index 5b93a337..99f7d990 100644
--- a/src/views/wpm/mlog6_form.vue
+++ b/src/views/wpm/mlog6_form.vue
@@ -86,9 +86,11 @@
controls-position="right"
:min="0"
:step="1"
+ :max="count_cando"
:step-strictly="true"
style="width: 100%"
placeholder="请输入领用数量"
+ @change="countUseChange"
>
@@ -100,6 +102,7 @@
controls-position="right"
:min="0"
:step="1"
+ :max="form.count_use"
:step-strictly="true"
style="width: 100%"
placeholder="请输入加工数量"
@@ -114,6 +117,7 @@
controls-position="right"
:min="0"
:step="1"
+ disabled="true"
:step-strictly="true"
style="width: 100%"
placeholder="请输入合格数"
@@ -586,6 +590,7 @@ export default {
handle_user: "",
},
+ count_cando:0,
mlogb: [],
userList: [],
batchOptions: [],
@@ -663,9 +668,31 @@ export default {
},
batchChange(){
let that = this;
- that.form.count_use = that.selectBatch.count_cando;
- that.form.count_real = that.selectBatch.count_cando;
- that.form.count_ok = that.selectBatch.count_cando;
+ this.form.count_notok =
+ this.form.count_n_hs =
+ this.form.count_n_cs =
+ this.form.count_n_zz =
+ this.form.count_n_tw =
+ this.form.count_n_zdd =
+ this.form.count_n_d =
+ this.form.count_n_dl =
+ this.form.count_n_qp =
+ this.form.count_n_bl =
+ this.form.count_n_hw =
+ this.form.count_n_yp =
+ this.form.count_n_bp =
+ this.form.count_n_sc =
+ this.form.count_n_zjd =
+ this.form.count_n_zjx =
+ this.form.count_n_qx =
+ this.form.count_n_js =
+ this.form.count_n_tydd =
+ this.form.count_n_sw =
+ this.form.count_n_bhpcd =
+ this.form.count_n_wq =
+ this.form.count_n_qt =
+ this.form.count_n_zw = 0;
+ that.count_cando = that.form.count_use = that.form.count_real = that.form.count_ok = that.selectBatch.count_cando;
},
//获取车间物料批次号
getBatchs() {
@@ -699,6 +726,12 @@ export default {
this.visible = true;
return this;
},
+ countUseChange(){
+ if(this.form.count_real>this.form.count_use){
+ this.form.count_real = this.form.count_use;
+ this.count_ok = this.form.count_real - this.form.count_notok;
+ }
+ },
countNotOkSun() {
this.form.count_notok =
Number(this.form.count_n_hs) +
@@ -724,7 +757,7 @@ export default {
Number(this.form.count_n_wq) +
Number(this.form.count_n_qt) +
Number(this.form.count_n_zw);
- this.form.count_real = this.form.count_use-this.form.count_notok;
+ this.form.count_ok = this.form.count_real-this.form.count_notok;
},
//提交
submit() {
diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue
index 28038b6f..1df7de81 100644
--- a/src/views/wpm_bx/handover_form.vue
+++ b/src/views/wpm_bx/handover_form.vue
@@ -117,6 +117,7 @@
+
@@ -197,12 +198,12 @@
-
+
-
+
-
+
请手动录入新批次号,不要用已有批次!
@@ -265,6 +266,10 @@ export default {
type: Object,
default: () => ({}),
},
+ new_wm:{
+ type: String,
+ default: "",
+ },
},
components: {
scanDialog
@@ -364,6 +369,7 @@ export default {
totalCount: 0,
deptID:'',
bwIndex:0,
+ checkedStatus:[],
userList: [],
userList2: [],
deptOptions:[],
@@ -383,7 +389,7 @@ export default {
let that = this;
that.form.type = that.type;
if(that.type==50){
- that.form.mtype=30;
+ that.mtype=30;
that.change_batch = true;
}
let arr = that.$route.path.split("/");
@@ -392,6 +398,10 @@ export default {
that.materialObj = materialObj;
that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
that.form.send_mgroup = that.mgroupId;
+ if(that.new_wm!==''){
+ that.mtype==30;
+ that.form.new_wm = that.new_wm;
+ }
if(that.wmItem.wm){
that.form.new_batch = that.wmItem.batch;
that.form.material_changed = that.wmItem.material;
@@ -427,6 +437,7 @@ export default {
methods: {
deletebw(index){
let that = this;
+ that.checkedStatus.splice(index,1);
this.form.handoverb[this.bwIndex].handoverbw.splice(index,1);
this.form.handoverb[this.bwIndex].count--;
let totalCount = 0;
@@ -612,7 +623,11 @@ export default {
open(mode = "add",data,mtype) {
let that = this;
that.mode = mode;
- that.mtype = mtype;
+ if(mtype!==undefined&&mtype!==null){
+ that.mtype = mtype;
+ }
+ that.checkedStatus=[];
+ that.selectItems=[];
if(mtype==30){
that.change_batch = true;
}
@@ -621,12 +636,12 @@ export default {
that.totalCount = 0;
data.forEach((item,index)=>{
item.wm = item.id;
+ that.checkedStatus.push(true)
+ that.selectItems.push(item.id)
that.totalCount += Number(item.count);
that.getWprList(item.wm,index);
})
- console.log('that.isFeiPinku',that.isFeiPinku);
if(that.isFeiPinku){
- console.log('data[0].material',data[0].material);
that.form.new_batch = data[0].batch;
that.form.material_changed = data[0].material;
that.form.material_changed_fname = data[0].material_name;
@@ -699,9 +714,19 @@ export default {
that.form.handoverb[index].handoverbw = handoverbw;
})
},
+ checkAllChange(index){
+ this.form.handoverb[index].handoverbw.forEach(item=>{
+ item.checked = this.checkedStatus[index]
+ })
+ },
handleChange(index){
let trueCount = this.form.handoverb[index].handoverbw.filter(item => item.checked === true).length;
this.form.handoverb[index].count = trueCount;
+ if(trueCount==this.form.handoverb[index].handoverbw.length){
+ this.checkedStatus[index] = true;
+ }else{
+ this.checkedStatus[index] = false;
+ }
this.countChange();
},
countChange(){
@@ -961,31 +986,46 @@ export default {
that.form.handoverb[indexs].handoverbw.push(obj1);
}
}else{//handoverb里没有有这个物料批次
- that.materialOptions.forEach((item) => {
- if(item.id == res[0].wm){
- if(that.type==50){
- that.form.new_batch = item.batch+'-G';
- }
- let params = {material: item.material,type: that.type};
- that.$API.wpm.handover.mgroups.req(params).then((res1) => {
- that.mgroupOptions = res1;
- })
- let obj2 = {};
- obj2.wm = item.id;
- obj2.batch = item.batch;
- if(item.material_.process_name){
- obj2.process = item.material_.process_name;
- }
- obj2.count_cando = item.count_canhandover;
- obj2.handoverbw = [];
- obj2.count = 1;
- let obj3 = {};
- obj3.wpr = res[0].id;
- obj3.number = res[0].number;
- obj2.handoverbw.push(obj3);
- that.form.handoverb.push(obj2);
- }
- })
+ if(that.new_wm==''){
+ that.materialOptions.forEach((item) => {
+ if(item.id == res[0].wm){
+ if(that.type==50){
+ that.form.new_batch = item.batch+'-G';
+ }
+ let params = {material: item.material,type: that.type};
+ that.$API.wpm.handover.mgroups.req(params).then((res1) => {
+ that.mgroupOptions = res1;
+ })
+ let obj2 = {};
+ obj2.wm = item.id;
+ obj2.batch = item.batch;
+ if(item.material_.process_name){
+ obj2.process = item.material_.process_name;
+ }
+ obj2.count_cando = item.count_canhandover;
+ obj2.handoverbw = [];
+ obj2.count = 1;
+ let obj3 = {};
+ obj3.wpr = res[0].id;
+ obj3.number = res[0].number;
+ obj2.handoverbw.push(obj3);
+ that.form.handoverb.push(obj2);
+ }
+ })
+ }else{
+ console.log('res[0]',res[0])
+ let obj2 = {};
+ obj2.wm = res[0].wm;
+ obj2.batch = res[0].wm_batch;
+ obj2.process = res[0].process_name;
+ obj2.handoverbw = [];
+ obj2.count = 1;
+ let obj3 = {};
+ obj3.wpr = res[0].id;
+ obj3.number = res[0].number;
+ obj2.handoverbw.push(obj3);
+ that.form.handoverb.push(obj2);
+ }
}
}else{
that.$message.error("该批次不存在")
diff --git a/src/views/wpm_bx/inmIn.vue b/src/views/wpm_bx/inmIn.vue
index 7df7f0d0..b6e305be 100644
--- a/src/views/wpm_bx/inmIn.vue
+++ b/src/views/wpm_bx/inmIn.vue
@@ -245,6 +245,7 @@
ref="scrapDialog"
:type="type"
:tag="tag"
+ :new_wm="new_wm"
:wmItem="wmItem"
:mgroupName="mgroup_name"
:mgroupId="mgroupId"
@@ -496,6 +497,7 @@ export default {
if(this.selection.length>0){
this.selection.forEach(item=>{
let obj = {};
+ obj.id = item.id;
obj.wm = item.id;
obj.batch = item.batch;
obj.process = item.material_.process_name;
@@ -701,6 +703,7 @@ export default {
handleAddWpr(row){
this.dialog.scrap = true;
this.type = 50;
+ this.new_wm = row.id;
let obj = {};
obj.wm = row.id;
obj.batch = row.batch;
@@ -710,7 +713,7 @@ export default {
obj.material_name = row.material_name;
this.wmItem = obj;
this.$nextTick(() => {
- this.$refs.scrapDialog.open("add");
+ this.$refs.scrapDialog.open("add",'',30);
});
},
handleWprSuccess(row){},
diff --git a/src/views/wpm_bx/inmOut.vue b/src/views/wpm_bx/inmOut.vue
index 1da2472c..291a43df 100644
--- a/src/views/wpm_bx/inmOut.vue
+++ b/src/views/wpm_bx/inmOut.vue
@@ -164,9 +164,6 @@
type="primary"
style="margin-left: 10px;"
>检验
-
@@ -234,7 +231,6 @@
>
物料标签
- 添加物料
@@ -519,6 +515,7 @@ export default {
if(this.selection.length>0){
this.selection.forEach(item=>{
let obj = {};
+ obj.id = item.id;
obj.wm = item.id;
obj.batch = item.batch;
obj.process = item.material_.process_name;
diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue
index d8b83af2..2f8a4a99 100644
--- a/src/views/wpm_gx/handover_form.vue
+++ b/src/views/wpm_gx/handover_form.vue
@@ -535,8 +535,10 @@ export default {
this.form.handoverb = [];
data.forEach(item=>{
let obj = {};
- obj.wm = item.id;
+ obj.wm = item.wm;
+ obj.label = item.label;
obj.batch = item.batch;
+ obj.count_cando = item.count_canhandover;
obj.count = item.count_canhandover;
this.form.handoverb.push(obj);
this.totalCount += Number(item.count_canhandover);