feat:wpr喷码板段页面添加工装列
This commit is contained in:
parent
0bbac578e9
commit
5d53e1dafc
|
|
@ -62,6 +62,25 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
|
|
@ -147,6 +166,7 @@ export default {
|
||||||
wmtype:'',
|
wmtype:'',
|
||||||
scQr_code:'',
|
scQr_code:'',
|
||||||
wprList:[],
|
wprList:[],
|
||||||
|
toolingOptions:[],
|
||||||
selectedRows:[],
|
selectedRows:[],
|
||||||
batchCoderLoading: false,
|
batchCoderLoading: false,
|
||||||
batchCoderLoading2: false,
|
batchCoderLoading2: false,
|
||||||
|
|
@ -171,6 +191,7 @@ export default {
|
||||||
this.params.wm = this.wm;
|
this.params.wm = this.wm;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.getRowWpr();
|
this.getRowWpr();
|
||||||
|
this.getToolingOptions();
|
||||||
that.$nextTick(() => {
|
that.$nextTick(() => {
|
||||||
let heights = document.getElementsByClassName("el-drawer__body")[0].clientHeight;
|
let heights = document.getElementsByClassName("el-drawer__body")[0].clientHeight;
|
||||||
that.wprTableHeight = heights-20;
|
that.wprTableHeight = heights-20;
|
||||||
|
|
@ -183,6 +204,18 @@ export default {
|
||||||
that.wprList = res;
|
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){
|
QRCode(row){
|
||||||
this.showQrCode = true;
|
this.showQrCode = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue