diff --git a/src/views/wpm_bx/handover.vue b/src/views/wpm_bx/handover.vue
index 965fe3bd..bab4c654 100644
--- a/src/views/wpm_bx/handover.vue
+++ b/src/views/wpm_bx/handover.vue
@@ -24,11 +24,6 @@
v-auth="'handover.create'"
>改版
- 打印机
- 正常
- 返工
- 检验
- 报废
+ 正常
+ 返工
+ 检验
+ 报废
+ 退料
接收
+ 退回
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -269,10 +287,12 @@ export default {
{ name: "交送", value: "send" },
{ name: "接收", value: "recive" },
],
+ form:{},
searchType: "",
options: ["交送", "接收"],
tableData: [],
selection: [],
+ handoverbList:[],
handoverItem:{},
values: "交送",
deptId:'',
@@ -283,7 +303,7 @@ export default {
processCate: "",
printer_name: "",
printVisible:false,
- setNameVisible: false,
+ backDialogVisible: false,
mgroup_name:'',
};
},
@@ -301,8 +321,24 @@ export default {
},
mounted() {
this.getMgroupInfo();
+ this.getMgroupOptions();
},
methods: {
+ //获取工段列表
+ getMgroupOptions() {
+ let that = this;
+ that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => {
+ that.mgroupOptions = res;
+ if(that.type==40){
+ res.forEach(item=>{
+ if(item.name=="废品库"){
+ that.form.recive_mgroup = item.id;
+ }
+ })
+ that.getCkUserList();//废品库接收人
+ }
+ });
+ },
getMgroupInfo(){
let that = this;
console.log('that.mgroupName',that.mgroupName);
@@ -321,9 +357,6 @@ export default {
that.$refs.table.refresh();
});
},
- printSetting(){
- this.setNameVisible = true;
- },
//添加
table_add(type) {
this.dialog.save = true;
@@ -400,6 +433,29 @@ export default {
that.$refs.table.queryData(that.query);
});
},
+ //退回
+ table_reBack(row){
+ let that = this;
+ let form = {};
+ form.send_mgroup = row.recive_mgroup;
+ form.recive_mgroup = row.send_mgroup;
+ form.handoverb = [];
+ that.handoverbList = [];
+ row.handoverb.forEach((item) => {
+ let obj = {};
+ obj.wm = item.wm_to;
+ obj.checked = true;
+ obj.batch = item.batch;
+ obj.count = item.count;
+ form.handoverb.push(obj);
+ that.handoverbList.push(obj);
+ })
+ form.send_user = that.$TOOL.data.get('USER_INFO').id;
+ form.send_date = that.$TOOL.dateFormat2(new Date());
+ form.type = 60;//退料
+ that.form = form;
+ that.backDialogVisible = true;
+ },
table_print(row) {
let that = this;
that.handoverItem = row;
@@ -407,9 +463,25 @@ export default {
},
savePrinter() {
let that = this;
- localStorage.setItem("printer_name", that.printer_name);
- that.setNameVisible = false;
- that.$message.success("打印机设置成功,请重新进行打印操作。");
+ that.form.handoverb = [];
+ that.handoverbList.forEach(item=>{
+ if(item.checked){
+ let obj = {};
+ obj.wm = item.wm;
+ obj.batch = item.batch;
+ obj.count = item.count;
+ that.form.handoverb.push(obj);
+ }
+ })
+ // console.log(that.form)
+ that.$API.wpm.handover.create.req(that.form).then((res) => {
+ that.$message.success("操作成功");
+ that.backDialogVisible = false;
+ that.$refs.table.refresh();
+ that.form = {};
+ }).catch((err) => {
+ return err;
+ });
},
//本地更新数据
//新增岗位后更新数据