diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue
index a14fdb10..11fb15f9 100644
--- a/src/views/wpm_gx/handover.vue
+++ b/src/views/wpm_gx/handover.vue
@@ -15,16 +15,23 @@
v-auth="'handover.create'"
v-if="mgroupName!=='切片'"
>返工
- 打印机
+
+
+
@@ -215,7 +222,7 @@
@closed="dialog.save = false"
>
-
+
@@ -291,9 +298,10 @@ export default {
mtask: "",
mlogId: "",
codeText:"",
+ codeText2:"",
printer_name: "",
printVisible:false,
- setNameVisible: false,
+ // setNameVisible: false,
};
},
mounted() {
@@ -305,9 +313,7 @@ export default {
that.$refs.table.refresh();
},
methods: {
- printSetting(){
- this.setNameVisible = true;
- },
+
//添加
table_add(type) {
this.dialog.save = true;
@@ -316,20 +322,22 @@ export default {
this.$refs.saveDialog.open("add",'',10);
});
},
- codeTextChange(type){
+ codeTextChange10(codeText){
let that = this;
- this.dialog.save = true;
- this.type = type;
- this.$nextTick(() => {
- this.$refs.saveDialog.open("add",that.codeText,10);
+ that.type = 10;
+ that.codeText = codeText;
+ that.dialog.save = true;
+ that.$nextTick(() => {
+ that.$refs.saveDialog.open("add",codeText,10);
});
},
- codeTextChange2(type){
+ codeTextChange20(codeText2){
let that = this;
+ this.type = 20;
+ that.codeText2 = codeText2;
this.dialog.save = true;
- this.type = type;
this.$nextTick(() => {
- this.$refs.saveDialog.open("add",that.codeText);
+ this.$refs.saveDialog.open("add",codeText2,20);
});
},
//编辑
@@ -405,12 +413,12 @@ export default {
that.handoverItem = row;
that.printVisible = true;
},
- savePrinter() {
- let that = this;
- localStorage.setItem("printer_name", that.printer_name);
- that.setNameVisible = false;
- that.$message.success("打印机设置成功,请重新进行打印操作。");
- },
+ // savePrinter() {
+ // let that = this;
+ // localStorage.setItem("printer_name", that.printer_name);
+ // that.setNameVisible = false;
+ // that.$message.success("打印机设置成功,请重新进行打印操作。");
+ // },
//本地更新数据
//新增岗位后更新数据
handleSaveSuccess(data, mode) {
diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue
index b5940154..cc1d9657 100644
--- a/src/views/wpm_gx/handover_form.vue
+++ b/src/views/wpm_gx/handover_form.vue
@@ -16,7 +16,17 @@
手动添加
-
+
+
+
+
{{ totalCount }}
@@ -284,6 +294,7 @@ export default {
listParams:{},
totalCount: 0,
deptID:'',
+ codeText: "",
userList: [],
userList2: [],
mgroupOptions: [],
@@ -580,21 +591,29 @@ export default {
let that = this;
that.scanVisible = true;
},
- scanClose(data){
+ codeTextChange(data){
if(data==''||data==undefined||data==null){
return;
}
let that = this;
+ data = data.replace(' ','');
let id = data.split('#')[1];
console.log('id',id);
this.$API.cm.labelmat.item.req(id).then((res) => {
+ console.log('res',res);
let arr = that.form.handoverb.filter((item) => {
return item.batch == res.batch;
})
+ console.log('arr',arr);
if(arr.length>0){
that.$message.error("该批次已存在")
}else{
+ console.log('that.materialOptions',that.materialOptions);
that.materialOptions.forEach((item) => {
+ console.log('item',item);
+ console.log('item.batch',item.batch);
+ console.log('res.batch',res.batch);
+ console.log('item.batch == res.batch',item.batch == res.batch);
if(item.batch == res.batch){
let obj = {};
obj.wm = item.id;
diff --git a/src/views/wpm_gx/inm.vue b/src/views/wpm_gx/inm.vue
index 90e18158..608a7f79 100644
--- a/src/views/wpm_gx/inm.vue
+++ b/src/views/wpm_gx/inm.vue
@@ -6,6 +6,8 @@
返修
报废
合批
+
+
{
+ that.$refs.scrapDialog.open("add",codeText2,10);
+ });
+ },
+ codeTextChange40(codeText4){
+ let that = this;
+ that.type = 40;
+ that.codeText4 = codeText4;
+ that.dialog.scrap = true;
+ that.$nextTick(() => {
+ that.$refs.scrapDialog.open("add",codeText4,10);
+ });
+ },
handleScrapSuccess(){
this.dialog.scrap = false;
this.$refs.table.refresh();
diff --git a/src/views/wpm_gx/inmOut.vue b/src/views/wpm_gx/inmOut.vue
index dc88371e..3a5e9c70 100644
--- a/src/views/wpm_gx/inmOut.vue
+++ b/src/views/wpm_gx/inmOut.vue
@@ -6,6 +6,8 @@
返修
报废
合批
+
+
{
+ that.$refs.scrapDialog.open("add",codeText2,10);
+ });
+ },
+ codeTextChange40(codeText4){
+ let that = this;
+ that.type = 40;
+ that.codeText4 = codeText4;
+ that.dialog.scrap = true;
+ that.$nextTick(() => {
+ that.$refs.scrapDialog.open("add",codeText4,10);
+ });
+ },
batchConcat(){
this.changebatch = true;
let handoverb = [];
diff --git a/src/views/wpm_gx/inm_record.vue b/src/views/wpm_gx/inm_record.vue
index 94b6210f..7aa10c22 100644
--- a/src/views/wpm_gx/inm_record.vue
+++ b/src/views/wpm_gx/inm_record.vue
@@ -135,6 +135,15 @@
icon="el-icon-plus"
@click="table_add"
>
+
+
@@ -339,6 +348,7 @@ export default {
name: [{ required: true, message: "请输入" }],
},
mioId:null,
+ codeText:"",
routepack: "",
tableData:[],
userOption: [],//仓库执行人
@@ -471,6 +481,13 @@ export default {
}
},
+ codeTextChange(codeText){
+ this.codeText = codeText;
+ this.dialog.save = true;
+ this.$nextTick(() => {
+ this.$refs.saveDialog.open("add",codeText);
+ });
+ },
table_add() {
this.dialog.save = true;
this.$nextTick(() => {
diff --git a/src/views/wpm_gx/inm_record_form.vue b/src/views/wpm_gx/inm_record_form.vue
index e2a9b655..68efd522 100644
--- a/src/views/wpm_gx/inm_record_form.vue
+++ b/src/views/wpm_gx/inm_record_form.vue
@@ -42,7 +42,7 @@
{{item.material_.name}}|{{ item.batch }}
-
+
+
+
{{ item.batch }}
-
+
+
+
-
+
{
that.wbatchOptions = res;
+ if(res.length>0&&that.codeText!==''){
+ that.codeTextChange(that.codeText);
+ // let arr = [];
+ // arr = res.filter(item => item.batch == that.codeText);
+ // if(arr.length>0){
+ // that.selectBatch = arr[0].id;
+ // that.form.batch = arr[0].batch;
+ // that.form.wm = arr[0].id;
+ // that.form.count = arr[0].count;
+ // }else{
+ // this.$message.warning("该物料没有库存");
+ // }
+ }
});
}
},
@@ -222,14 +254,77 @@ export default {
obj.page = 0;
obj.material = that.form.material;
this.$API.inm.warehouse.batch.req(obj).then((res) => {
- this.batchOptions = res;
- });
+ this.batchOptions = res;
+ if(res.length>0&&that.codeText!==''){
+ that.codeTextChange(that.codeText);
+ // let arr = [];
+ // arr = res.filter(item => item.batch == that.codeText);
+ // if(arr.length>0){
+ // that.form.material = arr[0].material
+ // that.selectBatch = arr[0].id;
+ // that.form.batch = arr[0].batch;
+ // that.form.warehouse = arr[0].warehouse;
+ // that.form.mb = arr[0].id;
+ // that.form.count = arr[0].count;
+ // }else{
+ // this.$message.warning("该物料没有库存");
+ // }
+ }
+ });
},
- scanClose(data){
+ codeTextChange(data){
let that = this;
+ if(data==''||data==undefined||data==null){
+ return;
+ }
+ data = data.replace(' ','');
let id = data.split('#')[1];
- console.log('id',id);
- that.form.batch = id;
+ this.$API.cm.labelmat.item.req(id).then((res) => {
+ console.log('res',res);
+ let arr = [];
+ if(this.cate == 'do_out'){//领料---仓库
+ arr = this.batchOptions.filter(item => item.batch == res.batch);
+ }else{//入库----工段
+ arr = this.wbatchOptions.filter(item => item.batch == res.batch);
+ }
+ console.log('arr',arr);
+ if(arr.length>0){
+ that.form.material = arr[0].material;
+ that.selectBatch = arr[0].id;
+ that.form.batch = arr[0].batch;
+ that.form.count = arr[0].count;
+ if(this.cate == 'do_out'){
+ that.form.mb = arr[0].id;
+ that.form.warehouse = arr[0].warehouse;
+ }else{
+ that.form.wm = arr[0].id;
+ }
+ }else{
+ that.$message.error("该批次不存在")
+ }
+ })
+ // that.form.batch = id;
+ // let arr = [];
+ // if(this.cate == 'do_out'){//领料---仓库
+ // arr = this.batchOptions.filter(item => item.batch == that.codeText);
+ // }else{//入库----工段
+ // arr = this.wbatchOptions.filter(item => item.batch == that.codeText);
+ // }
+ // console.log('arr',arr);
+ // if(arr.length>0){
+ // that.form.material = arr[0].material
+ // that.selectBatch = arr[0].id;
+ // that.form.batch = arr[0].batch;
+ // that.form.count = arr[0].count;
+ // if(this.cate == 'do_out'){
+ // that.form.mb = arr[0].id;
+ // that.form.warehouse = arr[0].warehouse;
+ // }else{
+ // that.form.wm = arr[0].id;
+ // }
+ // }else{
+ // this.$message.warning("该物料没有库存");
+ // }
},
selectMaterialChange() {
this.getBatchOptions();
@@ -249,6 +344,7 @@ export default {
//选择车间库存物料后的处理
selectwmChange(item){
let that = this;
+ that.form.batch = item.batch;
that.form.wm = item.id;
},
selectBatchClear() {
@@ -256,8 +352,11 @@ export default {
this.form.warehouse = "";
},
//显示
- open(mode = "add") {
+ open(mode = "add",codeText="") {
this.mode = mode;
+ if(codeText&&codeText!=''){
+ this.codeText = codeText;
+ }
this.visible = true;
return this;
},