feat:wpr喷码板段页面添加工装列
This commit is contained in:
parent
0bbac578e9
commit
5d53e1dafc
|
|
@ -62,6 +62,25 @@
|
|||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工装" min-width="80px">
|
||||
<template #default="scope">
|
||||
<el-select
|
||||
v-model="scope.row.tooling"
|
||||
placeholder="选择工装"
|
||||
clearable
|
||||
size="small"
|
||||
style="width:100%"
|
||||
@change="handleToolingChange(scope.row, scope.row.tooling)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in toolingOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
|
|
@ -147,6 +166,7 @@ export default {
|
|||
wmtype:'',
|
||||
scQr_code:'',
|
||||
wprList:[],
|
||||
toolingOptions:[],
|
||||
selectedRows:[],
|
||||
batchCoderLoading: false,
|
||||
batchCoderLoading2: false,
|
||||
|
|
@ -171,6 +191,7 @@ export default {
|
|||
this.params.wm = this.wm;
|
||||
this.visible = true;
|
||||
this.getRowWpr();
|
||||
this.getToolingOptions();
|
||||
that.$nextTick(() => {
|
||||
let heights = document.getElementsByClassName("el-drawer__body")[0].clientHeight;
|
||||
that.wprTableHeight = heights-20;
|
||||
|
|
@ -183,6 +204,18 @@ export default {
|
|||
that.wprList = res;
|
||||
})
|
||||
},
|
||||
getToolingOptions(){
|
||||
let that = this;
|
||||
that.$API.mtm.material.list.req({type: 60, page: 0}).then((res) => {
|
||||
that.toolingOptions = Array.isArray(res) ? res : (res.results || []);
|
||||
});
|
||||
},
|
||||
handleToolingChange(row, toolingId){
|
||||
let that = this;
|
||||
that.$API.wpm.wpr.patch.req(row.id, { tooling: toolingId || null }).then(() => {
|
||||
that.$message.success("工装更新成功");
|
||||
});
|
||||
},
|
||||
QRCode(row){
|
||||
this.showQrCode = true;
|
||||
this.$nextTick(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue