fix:dialog回显单选框的值优化

This commit is contained in:
zhangxuanming 2025-01-03 16:42:36 +08:00
parent 54ad1c08df
commit 47e5b4b9ee
29 changed files with 79 additions and 46 deletions

View File

@ -213,6 +213,10 @@
this.getProcess(); this.getProcess();
}, },
methods: { methods: {
handleOpen(id) {
this.showFlag = true
this.selectedTaskId = id
},
/** 查询生产任务列表 */ /** 查询生产任务列表 */
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -95,7 +95,7 @@
<el-table-column label="联系人" align="center" prop="contact1" /> <el-table-column label="联系人" align="center" prop="contact1" />
<el-table-column label="联系人-电话" align="center" prop="contact1Tel" /> <el-table-column label="联系人-电话" align="center" prop="contact1Tel" />
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -159,13 +159,17 @@ export default {
contact2Email: null, contact2Email: null,
creditCode: null, creditCode: null,
enableFlag: null, enableFlag: null,
} }
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
handleOpen(id) {
this.showFlag = true
this.selectedClientId = id
},
/** 查询客户列表 */ /** 查询客户列表 */
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -165,6 +165,10 @@ export default {
this.getTreeselect(); this.getTreeselect();
}, },
methods: { methods: {
handleOpen(id) {
this.showFlag = true
this.selectedItemId = id
},
/** 查询物料编码列表 */ /** 查询物料编码列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -235,4 +239,4 @@ export default {
} }
} }
}; };
</script> </script>

View File

@ -174,6 +174,10 @@ export default {
this.getTreeselect(); this.getTreeselect();
}, },
methods: { methods: {
handleOpen(id) {
this.showFlag = true
this.selectedMachineryId = id
},
/** 查询物料编码列表 */ /** 查询物料编码列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -262,4 +266,4 @@ export default {
} }
} }
}; };
</script> </script>

View File

@ -153,6 +153,10 @@ export default {
}) })
}, },
methods: { methods: {
handleOpen(id) {
this.showFlag = true
this.selectedId = id
},
/** 查询到货通知单列表 */ /** 查询到货通知单列表 */
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -94,7 +94,7 @@
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item> <el-form-item>
@ -103,7 +103,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -112,7 +112,7 @@
<template v-slot="scope"> <template v-slot="scope">
<el-radio v-model="selectedId" :label="scope.row.materialStockId" @change="handleRowChange(scope.row)">{{""}}</el-radio> <el-radio v-model="selectedId" :label="scope.row.materialStockId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" /> <el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/> <el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
@ -132,7 +132,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -240,6 +240,11 @@ export default {
this.getTreeselect(); this.getTreeselect();
}, },
methods: { methods: {
handleOpen(id) {
this.showFlag = true
this.getList()
this.selectedId = id
},
/** 查询库存记录列表 */ /** 查询库存记录列表 */
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -100,7 +100,7 @@
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/> <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -126,7 +126,7 @@ export default {
selectedVendorId: undefined, selectedVendorId: undefined,
selectedRow: undefined, selectedRow: undefined,
// //
loading: true, loading: true,
// //
single: true, single: true,
// //
@ -174,6 +174,10 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
handleOpen(id) {
this.showFlag = true
this.selectedVendorId = id
},
/** 查询供应商列表 */ /** 查询供应商列表 */
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -49,7 +49,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -74,7 +74,7 @@
<el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/> <el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="productSpc" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="productSpc" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="工单数量" align="center" prop="quantity" /> <el-table-column label="工单数量" align="center" prop="quantity" />
<el-table-column label="客户编码" align="center" prop="clientCode" /> <el-table-column label="客户编码" align="center" prop="clientCode" />
<el-table-column label="客户名称" align="center" prop="clientName" :show-overflow-tooltip="true"/> <el-table-column label="客户名称" align="center" prop="clientName" :show-overflow-tooltip="true"/>
<el-table-column label="需求日期" align="center" prop="requestDate" width="180"> <el-table-column label="需求日期" align="center" prop="requestDate" width="180">
@ -105,7 +105,7 @@
dicts: ['mes_order_status','mes_workorder_sourcetype'], dicts: ['mes_order_status','mes_workorder_sourcetype'],
props:{ props:{
workorder: { workorder: {
type: Object, type: Object,
default: function(){ default: function(){
return {'workorderType': 'SELF'} return {'workorderType': 'SELF'}
}} // }} //
@ -163,6 +163,10 @@
this.getList(); this.getList();
}, },
methods:{ methods:{
handleOpen(id) {
this.showFlag = true
this.selectedWorkorderId = id
},
/** 查询生产工单列表 */ /** 查询生产工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -214,4 +218,4 @@
} }
} }
} }
</script> </script>

View File

@ -68,7 +68,7 @@
<el-table-column label="工作站地点" align="center" prop="workstationAddress" /> <el-table-column label="工作站地点" align="center" prop="workstationAddress" />
<el-table-column label="所在车间名称" align="center" prop="workshopName" /> <el-table-column label="所在车间名称" align="center" prop="workshopName" />
<el-table-column label="所属工序" align="center" prop="processName" /> <el-table-column label="所属工序" align="center" prop="processName" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
@ -145,6 +145,10 @@ export default {
this.getProcess(); this.getProcess();
}, },
methods: { methods: {
handleOpen(id) {
this.showFlag = true
this.selectedWorkstationId = id
},
/** 查询工作站列表 */ /** 查询工作站列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -156,7 +160,7 @@ export default {
}, },
// //
getWorkshops(){ getWorkshops(){
listAllWorkshop().then( response => { listAllWorkshop().then( response => {
this.workshopOptions = response.data; this.workshopOptions = response.data;
}); });
}, },

View File

@ -483,7 +483,7 @@ export default {
}, },
// //
handleMachineryAdd(){ handleMachineryAdd(){
this.$refs.machinerySelect.showFlag = true; this.$refs.machinerySelect.handleOpen(this.form.machineryId)
}, },
// //
onMachineryAdd(row){ onMachineryAdd(row){

View File

@ -582,7 +582,7 @@ export default {
}, },
// //
handleWorkorderSelect(){ handleWorkorderSelect(){
this.$refs.woSelect.showFlag = true; this.$refs.woSelect.handleOpen(this.form.workorderId)
}, },
onWorkorderSelected(row){ onWorkorderSelected(row){
if(row != undefined && row != null){ if(row != undefined && row != null){
@ -597,8 +597,7 @@ export default {
} }
}, },
handleTaskSelect(){ handleTaskSelect(){
this.$refs.taskSelect.showFlag = true; this.$refs.taskSelect.handleOpen(this.form.taskId)
this.$refs.taskSelect.getList();
}, },
onTaskSelected(row){ onTaskSelected(row){
debugger; debugger;

View File

@ -353,7 +353,7 @@ export default {
}, },
// //
handleWorkorderSelect(){ handleWorkorderSelect(){
this.$refs.woSelect.showFlag = true; this.$refs.woSelect.handleOpen(this.form.workorderId)
}, },
onWorkorderSelected(row){ onWorkorderSelected(row){
if(row != undefined && row != null){ if(row != undefined && row != null){

View File

@ -710,7 +710,7 @@ export default {
}).catch(() => {}); }).catch(() => {});
}, },
handleSelectProduct(){ handleSelectProduct(){
this.$refs.itemSelect.showFlag = true; this.$refs.itemSelect.handleOpen(this.form.productId)
}, },
handleSelectClient(){ handleSelectClient(){
this.$refs.clientSelect.showFlag = true; this.$refs.clientSelect.showFlag = true;

View File

@ -665,11 +665,10 @@ export default {
}, },
// //
handleWorkorderSelect(){ handleWorkorderSelect(){
this.$refs.woSelect.showFlag = true; this.$refs.woSelect.handleOpen(this.form.workorderId)
}, },
onWorkorderSelected(row){ onWorkorderSelected(row){
if(row != undefined && row != null){ if(row != undefined && row != null){
debugger;
this.form.workorderId = row.workorderId; this.form.workorderId = row.workorderId;
this.form.workorderCode = row.workorderCode; this.form.workorderCode = row.workorderCode;
this.form.workorderName = row.workorderName; this.form.workorderName = row.workorderName;
@ -682,7 +681,7 @@ export default {
} }
}, },
handleWorkstationSelect(){ handleWorkstationSelect(){
this.$refs.wsSelect.showFlag = true; this.$refs.wsSelect.handleOpen(this.form.workstationId)
}, },
onWorkstationSelected(row){ onWorkstationSelected(row){
if(row != undefined && row != null){ if(row != undefined && row != null){

View File

@ -637,7 +637,7 @@ export default {
}).catch(() => {}); }).catch(() => {});
}, },
handleSelectProduct(){ handleSelectProduct(){
this.$refs.itemSelect.showFlag = true; this.$refs.itemSelect.handleOpen(this.form.itemId)
}, },
// //
onItemSelected(obj){ onItemSelected(obj){
@ -650,7 +650,7 @@ export default {
} }
}, },
handleSelectClient(){ handleSelectClient(){
this.$refs.clientSelect.showFlag = true; this.$refs.clientSelect.handleOpen(this.form.clientId)
}, },
// //
onClientSelected(obj){ onClientSelected(obj){

View File

@ -419,7 +419,7 @@ export default {
// //
handleSelectVendor(){ handleSelectVendor(){
this.resetForm("form"); this.resetForm("form");
this.$refs.vendorSelect.showFlag = true; this.$refs.vendorSelect.handleOpen(this.form.vendorId)
}, },
// //
onVendorSelected(obj){ onVendorSelected(obj){

View File

@ -301,7 +301,7 @@ export default {
}, `arrivalnoticeline_${new Date().getTime()}.xlsx`) }, `arrivalnoticeline_${new Date().getTime()}.xlsx`)
}, },
handleSelectProduct(){ handleSelectProduct(){
this.$refs.itemSelect.showFlag = true; this.$refs.itemSelect.handleOpen(this.form.itemId)
}, },
// //
onItemSelected(obj){ onItemSelected(obj){

View File

@ -529,7 +529,7 @@ export default {
}, },
// //
handleWorkstationSelect(){ handleWorkstationSelect(){
this.$refs.wsSelect.showFlag = true; this.$refs.wsSelect.handleOpen(this.form.workstationId)
}, },
onWorkstationSelected(row){ onWorkstationSelected(row){
debugger; debugger;
@ -541,7 +541,7 @@ export default {
}, },
// //
handleWorkorderSelect(){ handleWorkorderSelect(){
this.$refs.woSelect.showFlag = true; this.$refs.woSelect.handleOpen(this.form.workorderId)
}, },
onWorkorderSelected(row){ onWorkorderSelected(row){
if(row != undefined && row != null){ if(row != undefined && row != null){

View File

@ -541,7 +541,7 @@ export default {
// //
handleSelectVendor(){ handleSelectVendor(){
this.$refs.form.resetFields() this.$refs.form.resetFields()
this.$refs.vendorSelect.showFlag = true; this.$refs.vendorSelect.handleOpen(this.form.vendorId)
}, },
// //
onVendorSelected(obj){ onVendorSelected(obj){
@ -550,11 +550,12 @@ export default {
this.form.vendorCode = obj.vendorCode; this.form.vendorCode = obj.vendorCode;
this.form.vendorName = obj.vendorName; this.form.vendorName = obj.vendorName;
this.form.vendorNick = obj.vendorNick; this.form.vendorNick = obj.vendorNick;
console.log(this.form, '----this.form----')
} }
}, },
// //
handleSelectNotice(){ handleSelectNotice(){
this.$refs.noticeSelect.showFlag = true; this.$refs.noticeSelect.handleOpen(this.form.noticeId)
}, },
// //
onNoticeSelected(obj){ onNoticeSelected(obj){

View File

@ -473,7 +473,7 @@ export default {
}, },
// //
handleWorkorderSelect(){ handleWorkorderSelect(){
this.$refs.woSelect.showFlag = true; this.$refs.woSelect.handleOpen(this.form.workorderId)
}, },
onWorkorderSelected(row){ onWorkorderSelected(row){
if(row != undefined && row != null){ if(row != undefined && row != null){

View File

@ -446,7 +446,7 @@ export default {
}, },
// //
handleWorkorderSelect(){ handleWorkorderSelect(){
this.$refs.woSelect.showFlag = true; this.$refs.woSelect.handleOpen(this.form.workorderId)
}, },
onWorkorderSelected(row){ onWorkorderSelected(row){
if(row != undefined && row != null){ if(row != undefined && row != null){

View File

@ -480,7 +480,7 @@ export default {
}, },
// //
handleSelectClient(){ handleSelectClient(){
this.$refs.clientSelect.showFlag = true; this.$refs.clientSelect.handleOpen(this.form.clientId)
}, },
// //
onClientSelected(obj){ onClientSelected(obj){

View File

@ -448,11 +448,10 @@ export default {
}, },
// //
handleWorkorderSelect(){ handleWorkorderSelect(){
this.$refs.woSelect.showFlag = true; this.$refs.woSelect.handleOpen(this.form.workorderId)
}, },
onWorkorderSelected(row){ onWorkorderSelected(row){
if(row != undefined && row != null){ if(row != undefined && row != null){
debugger;
this.form.workorderId = row.workorderId; this.form.workorderId = row.workorderId;
this.form.workorderCode = row.workorderCode; this.form.workorderCode = row.workorderCode;
this.form.workorderName = row.workorderName; this.form.workorderName = row.workorderName;

View File

@ -520,7 +520,7 @@ export default {
} }
}, },
handleSelectClient(){ handleSelectClient(){
this.$refs.clientSelect.showFlag = true; this.$refs.clientSelect.handleOpen(this.form.clientId)
}, },
// //
onClientSelected(obj){ onClientSelected(obj){

View File

@ -395,8 +395,7 @@ export default {
}, `productsalseline_${new Date().getTime()}.xlsx`) }, `productsalseline_${new Date().getTime()}.xlsx`)
}, },
handleSelectStock(){ handleSelectStock(){
this.$refs.stockSelect.showFlag = true; this.$refs.stockSelect.handleOpen(this.form.materialStockId)
this.$refs.stockSelect.getList();
}, },
// //
onStockSelected(obj){ onStockSelected(obj){

View File

@ -479,7 +479,7 @@ export default {
}, },
// //
handleWorkorderSelect(){ handleWorkorderSelect(){
this.$refs.woSelect.showFlag = true; this.$refs.woSelect.handleOpen(this.form.workorderId)
}, },
onWorkorderSelected(row){ onWorkorderSelected(row){
if(row != undefined && row != null){ if(row != undefined && row != null){

View File

@ -457,7 +457,7 @@ export default {
}, },
// //
handleSelectClient(){ handleSelectClient(){
this.$refs.clientSelect.showFlag = true; this.$refs.clientSelect.handleOpen(this.form.clientId)
}, },
// //
handleClientSelect(obj){ handleClientSelect(obj){

View File

@ -449,7 +449,7 @@ export default {
}, },
// //
handleSelectVendor(){ handleSelectVendor(){
this.$refs.vendorSelect.showFlag = true; this.$refs.vendorSelect.handleOpen(this.form.vendorId)
}, },
// //
onVendorSelected(obj){ onVendorSelected(obj){

View File

@ -332,8 +332,7 @@ export default {
}).catch(() => {}); }).catch(() => {});
}, },
handleSelectStock(){ handleSelectStock(){
this.$refs.stockSelect.showFlag = true; this.$refs.stockSelect.handleOpen(this.form.materialStockId)
this.$refs.stockSelect.getList();
}, },
// //
onStockSelected(obj){ onStockSelected(obj){