feat(qc/inspection): 新增检验任务方案选择的公司和默认选中参数
1. 给SchemeSelect组件新增company和scheme两个props 2. 组件内新增模板单位查询参数并关联传入的company值 3. 组件挂载/重置时自动匹配并选中传入的默认方案 4. 同步更新表单内的归属公司和任务类型字段初始化
This commit is contained in:
@@ -180,6 +180,14 @@ export default {
|
|||||||
visible: {
|
visible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
company: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
scheme: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -194,11 +202,16 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 999,
|
pageSize: 999,
|
||||||
templateName: undefined
|
templateName: undefined,
|
||||||
|
templateUnit: undefined
|
||||||
},
|
},
|
||||||
selectedCoils: [],
|
selectedCoils: [],
|
||||||
form: {
|
form: {
|
||||||
taskCode: undefined
|
taskCode: undefined,
|
||||||
|
taskType: undefined,
|
||||||
|
belongCompany: undefined,
|
||||||
|
enterCoilNos: undefined,
|
||||||
|
supplierCoilNos: undefined
|
||||||
},
|
},
|
||||||
schemeAddOpen: false,
|
schemeAddOpen: false,
|
||||||
schemeAddLoading: false,
|
schemeAddLoading: false,
|
||||||
@@ -239,12 +252,16 @@ export default {
|
|||||||
this.selectedTemplate = null;
|
this.selectedTemplate = null;
|
||||||
this.checkItemList = [];
|
this.checkItemList = [];
|
||||||
this.form.taskCode = undefined;
|
this.form.taskCode = undefined;
|
||||||
|
this.form.belongCompany = undefined;
|
||||||
|
this.form.taskType = undefined;
|
||||||
this.selectedCoils = [];
|
this.selectedCoils = [];
|
||||||
this.selectedEnterCoilNos = [];
|
this.selectedEnterCoilNos = [];
|
||||||
this.tempEnterCoilNo = '';
|
this.tempEnterCoilNo = '';
|
||||||
this.selectedSupplierCoilNos = [];
|
this.selectedSupplierCoilNos = [];
|
||||||
this.tempSupplierCoilNo = '';
|
this.tempSupplierCoilNo = '';
|
||||||
this.enterCoilNoError = false;
|
this.enterCoilNoError = false;
|
||||||
|
this.queryParams.templateName = undefined;
|
||||||
|
this.queryParams.templateUnit = this.company || undefined;
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -256,6 +273,12 @@ export default {
|
|||||||
this.templateList = response.rows || [];
|
this.templateList = response.rows || [];
|
||||||
this.total = response.total || 0;
|
this.total = response.total || 0;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
if (this.scheme && this.templateList.length > 0) {
|
||||||
|
const match = this.templateList.find(t => t.templateName === this.scheme);
|
||||||
|
if (match) {
|
||||||
|
this.handleSchemeClick(match);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
|||||||
@@ -406,7 +406,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<SchemeSelect :visible.sync="schemeVisible" @confirm="handleSchemeConfirm" />
|
<SchemeSelect :visible.sync="schemeVisible" @confirm="handleSchemeConfirm" :company="selectedCompany" :scheme="selectedScheme" />
|
||||||
|
|
||||||
<el-dialog :title="attachmentTitle" :visible.sync="attachmentOpen" width="500px" append-to-body>
|
<el-dialog :title="attachmentTitle" :visible.sync="attachmentOpen" width="500px" append-to-body>
|
||||||
<file-upload v-model="attachmentFiles" :limit="10" />
|
<file-upload v-model="attachmentFiles" :limit="10" />
|
||||||
|
|||||||
Reference in New Issue
Block a user