-
- {{ coilNo }}
-
+
+
+
+
+ 可输入入场卷号或厂家卷号,两者互通匹配
+
+
+
+
+ {{ coilNo }}
+
+
+
+
+
+ {{ coilNo }}
+
+
+
+
-
-
+
@@ -488,6 +519,9 @@ export default {
enterCoilNoLoading: false,
selectedEnterCoilNos: [],
tempEnterCoilNo: '',
+ selectedSupplierCoilNos: [],
+ tempSupplierCoilNo: '',
+ supplierCoilNoLoading: false,
attachmentOpen: false,
attachmentTitle: '',
attachmentLoading: false,
@@ -558,6 +592,8 @@ export default {
this.resetTaskForm();
this.selectedEnterCoilNos = [];
this.tempEnterCoilNo = '';
+ this.selectedSupplierCoilNos = [];
+ this.tempSupplierCoilNo = '';
this.taskOpen = true;
this.taskTitle = "添加检验任务";
},
@@ -581,6 +617,13 @@ export default {
this.selectedEnterCoilNos = [];
}
this.tempEnterCoilNo = '';
+ // 初始化已选择的厂家卷号
+ if (response.data.supplierCoilNos) {
+ this.selectedSupplierCoilNos = response.data.supplierCoilNos.split(',').filter(item => item.trim());
+ } else {
+ this.selectedSupplierCoilNos = [];
+ }
+ this.tempSupplierCoilNo = '';
this.taskLoading = false;
this.taskOpen = true;
this.taskTitle = "修改检验任务";
@@ -636,7 +679,7 @@ export default {
handleQuickCreate() {
this.schemeVisible = true;
},
- handleSchemeConfirm({ template, taskCode, taskType, belongCompany, coilIds, enterCoilNos }) {
+ handleSchemeConfirm({ template, taskCode, taskType, belongCompany, coilIds, enterCoilNos, supplierCoilNos }) {
this.taskLoading = true;
addInspectionTaskWithItems({
taskCode: taskCode,
@@ -645,7 +688,8 @@ export default {
belongCompany: belongCompany,
taskType: taskType,
coilIds: coilIds || undefined,
- enterCoilNos: enterCoilNos || undefined
+ enterCoilNos: enterCoilNos || undefined,
+ supplierCoilNos: supplierCoilNos || undefined
}).then(() => {
this.$modal.msgSuccess("快捷创建成功");
this.getTaskList();
@@ -757,6 +801,43 @@ export default {
this.selectedEnterCoilNos.splice(index, 1);
this.taskForm.enterCoilNos = this.selectedEnterCoilNos.join(',');
},
+ querySupplierCoilNo(queryString, cb) {
+ if (!queryString || queryString.length < 2) {
+ cb([]);
+ return;
+ }
+ this.supplierCoilNoLoading = true;
+ listMaterialCoil({
+ supplierCoilNo: queryString,
+ pageNum: 1,
+ pageSize: 20
+ }).then(response => {
+ const options = (response.rows || []).map(item => ({
+ value: item.supplierCoilNo,
+ label: item.supplierCoilNo,
+ enterCoilNo: item.enterCoilNo
+ })).filter(opt => !this.selectedSupplierCoilNos.includes(opt.value));
+ cb(options);
+ }).finally(() => {
+ this.supplierCoilNoLoading = false;
+ });
+ },
+ handleSelectSupplierCoilNo(item) {
+ if (!this.selectedSupplierCoilNos.includes(item.value)) {
+ this.selectedSupplierCoilNos.push(item.value);
+ }
+ this.taskForm.supplierCoilNos = this.selectedSupplierCoilNos.join(',');
+ if (item.enterCoilNo && !this.selectedEnterCoilNos.includes(item.enterCoilNo)) {
+ this.selectedEnterCoilNos.push(item.enterCoilNo);
+ this.taskForm.enterCoilNos = this.selectedEnterCoilNos.join(',');
+ this.$refs["taskForm"].validateField('enterCoilNos');
+ }
+ this.tempSupplierCoilNo = '';
+ },
+ removeSupplierCoilNo(index) {
+ this.selectedSupplierCoilNos.splice(index, 1);
+ this.taskForm.supplierCoilNos = this.selectedSupplierCoilNos.join(',');
+ },
cancelTask() {
this.taskOpen = false;
this.resetTaskForm();
@@ -787,6 +868,8 @@ export default {
this.taskCoilList = [];
this.selectedEnterCoilNos = [];
this.tempEnterCoilNo = '';
+ this.selectedSupplierCoilNos = [];
+ this.tempSupplierCoilNo = '';
this.resetForm("taskForm");
},