diff --git a/src/views/mes/dailyReportNew/index.vue b/src/views/mes/dailyReportNew/index.vue index 58eb9258..5baa0657 100644 --- a/src/views/mes/dailyReportNew/index.vue +++ b/src/views/mes/dailyReportNew/index.vue @@ -74,10 +74,10 @@ - + - + diff --git a/src/views/mes/mesLine/index.vue b/src/views/mes/mesLine/index.vue index 06dc58de..a893a7e0 100644 --- a/src/views/mes/mesLine/index.vue +++ b/src/views/mes/mesLine/index.vue @@ -24,18 +24,18 @@ @keyup.enter.native="handleQuery" /> - + - + 导出 + + 导入 + + - - - - - - - + + + + + + + + - + + + + + + + + + + + + @@ -187,65 +210,47 @@ - - + + - - - - - 人员分配 - - 删除 - - - - - - - 选择产品 - - - - - - - - - - - 删除 - - - - - + + + + + + 将文件拖到此处,或点击上传 + + 仅允许导入xls、xlsx格式文件。 + 下载模板 + + + + + + " + response.msg + "", "导入结果", {dangerouslyUseHTMLString: true}); + this.getList(); + }, + // 导入-提交上传文件 + submitFileForm() { + this.$refs.upload.submit(); + }, + // 导入-下载模板 + importTemplate() { + this.download('/mes/mesLine/importTemplate', {}, `mes_product_template_${new Date().getTime()}.xlsx`) }, //物料选择确认 onSelectMaterial(obj) { - obj.map(item => { - if(item.productCode) { - if(this.form.productList.some(e => e.productCode === item.productCode)) { - this.$modal.msgError("该物料已存在"); - return; - } - this.form.productList.push(item); - } - }) - console.log(this.form.productList); + this.form.productName = obj[0].productName; + this.form.productCode = obj[0].productCode; }, deleteProduct(row) { const productCode = row.productCode; @@ -543,7 +593,12 @@ export default { return ''; } }, - + //产品编码格式化 + productCodeFormate(row, column, cellValue) { + if (cellValue != null) { + return cellValue.slice(7, 18); //返回值 + } + }, }, }; diff --git a/src/views/mes/mesLine/selectMaterial.vue b/src/views/mes/mesLine/selectMaterial.vue index e326fc78..4dfee3a7 100644 --- a/src/views/mes/mesLine/selectMaterial.vue +++ b/src/views/mes/mesLine/selectMaterial.vue @@ -135,7 +135,12 @@ export default { // 多选框选中数据 handleBomSelectionChange(selection) { - this.productList = selection; + if(selection.length==1){ + this.productList = selection; + }else{ + this.$modal.msgSuccess("请选择一个产品"); + } + },