fix:玻纤交接记录添加退料
This commit is contained in:
parent
eba83606be
commit
e2b57e6a92
|
@ -24,11 +24,6 @@
|
|||
v-auth="'handover.create'"
|
||||
>改版</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="printSetting"
|
||||
>打印机</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-select
|
||||
|
@ -120,18 +115,11 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="交接类别" prop="type" width="80">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.type == 10" type="success"
|
||||
>正常</el-tag
|
||||
>
|
||||
<el-tag v-if="scope.row.type == 20" type="warning"
|
||||
>返工</el-tag
|
||||
>
|
||||
<el-tag v-if="scope.row.type == 30" type="primary"
|
||||
>检验</el-tag
|
||||
>
|
||||
<el-tag v-if="scope.row.type == 40" type="danger"
|
||||
>报废</el-tag
|
||||
>
|
||||
<el-tag v-if="scope.row.type == 10" type="success">正常</el-tag>
|
||||
<el-tag v-if="scope.row.type == 20" type="warning">返工</el-tag>
|
||||
<el-tag v-if="scope.row.type == 30" type="primary">检验</el-tag>
|
||||
<el-tag v-if="scope.row.type == 40" type="danger">报废</el-tag>
|
||||
<el-tag v-if="scope.row.type == 60" type="warning">退料</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -171,6 +159,13 @@
|
|||
type="success"
|
||||
v-if="(scope.row.recive_mgroup == mgroupId||scope.row.recive_dept == deptId)&&scope.row.submit_time == null"
|
||||
>接收</el-button>
|
||||
<el-button
|
||||
link
|
||||
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"
|
||||
>退回</el-button>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
|
@ -222,10 +217,33 @@
|
|||
@closed="dialog.save = false"
|
||||
>
|
||||
</save-dialog>
|
||||
<el-dialog title="打印机设置" v-model="setNameVisible" width="600px">
|
||||
<el-form label-width="100px">
|
||||
<el-form-item label="打印机名称">
|
||||
<el-input v-model="printer_name"></el-input>
|
||||
<el-dialog title="退料操作" v-model="backDialogVisible" style="width: 70%;">
|
||||
<el-row v-for="item in handoverbList" :key="item.id" style="padding: 10px 10px 0 20px;">
|
||||
<el-col style="display: flex;border-bottom: 1px dashed #eee;">
|
||||
<el-checkbox v-model="item.checked" :label="item.batch"/>
|
||||
<el-form-item label="退料数量" label-width="150px" style="margin-bottom: 10px;">
|
||||
<el-input-number v-model="item.count" :min="0" controls-position="right"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form ref="backForm" label-width="100px" :rules="rules" :model="form" style="margin-top: 15px;">
|
||||
<el-form-item label="接收工段" prop="recive_mgroup">
|
||||
<el-select
|
||||
v-model="form.recive_mgroup"
|
||||
placeholder="接收工段"
|
||||
disabled
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mgroupOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料原因">
|
||||
<el-input v-model="form.note"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer>
|
||||
|
@ -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;
|
||||
});
|
||||
},
|
||||
//本地更新数据
|
||||
//新增岗位后更新数据
|
||||
|
|
Loading…
Reference in New Issue