@@ -671,6 +721,14 @@ export default {
count_qt = data.管料退火_count_notok - count;
return count_qt;
}
+ }else if(type=='工前检验'){
+ if(data.六车间_工前检验_count_notok){
+ if (data.六车间_工前检验_count_n_dl !== undefined) {
+ count += data.六车间_工前检验_count_n_dl ;
+ }
+ count_qt = data.六车间_工前检验_count_notok - count;
+ return count_qt;
+ }
}else if(type=='开槽'){
if(data.六车间_开槽_count_notok){
if (data.六车间_开槽_count_n_dl !== undefined) {
diff --git a/src/views/statistics/stock_statistics.vue b/src/views/statistics/stock_statistics.vue
index c93e10e1..66262d97 100644
--- a/src/views/statistics/stock_statistics.vue
+++ b/src/views/statistics/stock_statistics.vue
@@ -14,13 +14,6 @@
:value="item.id">
-
-
-
-
-
导出
@@ -74,6 +67,13 @@
库存出入库统计
+
+
+
+
+
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/handover_form2.vue b/src/views/wpm_bx/handover_form2.vue
index d6d2c92b..ca2cd6cf 100644
--- a/src/views/wpm_bx/handover_form2.vue
+++ b/src/views/wpm_bx/handover_form2.vue
@@ -59,6 +59,9 @@
{{ item2.number }}
+
+ {{ item3 }}
+
@@ -229,8 +232,11 @@ export default {
})
//如果arrs里有不是这个批次的wpr,提示错误
let diff = arrs.filter(item => !barchArrs.includes(item));
+ that.diff = diff;
+ console.log('diff',diff)
if(diff.length>0){
- that.$confirm("物料"+diff.join(",")+"不在该批次中", "提示", {type: "warning",}).then(() => {});
+ that.$message.warning("物料"+diff.join(",")+"不在该批次中");
+ // that.$confirm("物料"+diff.join(",")+"不在该批次中", "提示", {type: "warning",}).then(() => {});
}
}else{
//放入对应的行中的handoverb中,并且在列表中disabled
@@ -251,7 +257,8 @@ export default {
}
})
}
- this.$refs.codeInput.focus();
+ console.log('this.$refs.codeInput',this.$refs.codeInput)
+ this.$refs.codeInput[index].focus();
},
deleteWpr(index1,index2,wpr){
let that = this;
@@ -356,6 +363,10 @@ export default {
margin-right: 20px;
margin-top: 5px;
}
+.disabledItem{
+ color: #fff;
+ background: #f56c6c;
+}
.circleCloseFilled{
position: absolute;
top: -7px;
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 @@
>