|
@@ -969,7 +969,6 @@
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<el-tab-pane label="" name="工艺文件">
|
|
<el-tab-pane label="" name="工艺文件">
|
|
|
<ele-pro-table
|
|
<ele-pro-table
|
|
|
ref="fileTable"
|
|
ref="fileTable"
|
|
@@ -1074,6 +1073,11 @@
|
|
|
<jobDialog ref="jobRef" @chooseModal="chooseJob"></jobDialog>
|
|
<jobDialog ref="jobRef" @chooseModal="chooseJob"></jobDialog>
|
|
|
<ParamModal ref="paramRefs" @chooseModal="chooseModal"></ParamModal>
|
|
<ParamModal ref="paramRefs" @chooseModal="chooseModal"></ParamModal>
|
|
|
<ProductModal ref="productRefs" @changeProduct="determineChoose" />
|
|
<ProductModal ref="productRefs" @changeProduct="determineChoose" />
|
|
|
|
|
+ <ProductModalMultiple
|
|
|
|
|
+ ref="productMultipleRefs"
|
|
|
|
|
+ @selection="addProductList"
|
|
|
|
|
+ ></ProductModalMultiple>
|
|
|
|
|
+
|
|
|
<div class="btns">
|
|
<div class="btns">
|
|
|
<el-button type="primary" size="small" @click="save">{{
|
|
<el-button type="primary" size="small" @click="save">{{
|
|
|
isView ? '确定' : '保存'
|
|
isView ? '确定' : '保存'
|
|
@@ -1091,6 +1095,7 @@
|
|
|
import { workingProcedureUpdate } from '@/api/material/BOM';
|
|
import { workingProcedureUpdate } from '@/api/material/BOM';
|
|
|
import ParamModal from '@/views/technology/productParam/components/ParamModal.vue';
|
|
import ParamModal from '@/views/technology/productParam/components/ParamModal.vue';
|
|
|
import ProductModal from '@/components/select/bom/ProductModal.vue';
|
|
import ProductModal from '@/components/select/bom/ProductModal.vue';
|
|
|
|
|
+ import ProductModalMultiple from './ProductModalMultiple.vue';
|
|
|
import userSearch from './user-search.vue';
|
|
import userSearch from './user-search.vue';
|
|
|
import jobDialog from './jobDialog.vue';
|
|
import jobDialog from './jobDialog.vue';
|
|
|
export default {
|
|
export default {
|
|
@@ -1099,7 +1104,8 @@
|
|
|
ParamModal,
|
|
ParamModal,
|
|
|
fileUpload,
|
|
fileUpload,
|
|
|
ProductModal,
|
|
ProductModal,
|
|
|
- jobDialog
|
|
|
|
|
|
|
+ jobDialog,
|
|
|
|
|
+ ProductModalMultiple
|
|
|
},
|
|
},
|
|
|
mixins: [dictMixins],
|
|
mixins: [dictMixins],
|
|
|
data() {
|
|
data() {
|
|
@@ -1519,11 +1525,81 @@
|
|
|
}
|
|
}
|
|
|
this.tableData.taskParam[this.currentIndex][type].splice(index, 1);
|
|
this.tableData.taskParam[this.currentIndex][type].splice(index, 1);
|
|
|
},
|
|
},
|
|
|
|
|
+ addProductList(list) {
|
|
|
|
|
+ console.log(list);
|
|
|
|
|
+ let subCode = 0;
|
|
|
|
|
+ let array = [];
|
|
|
|
|
+ list.map((item, index) => {
|
|
|
|
|
+ // let max = '';
|
|
|
|
|
+ // if (
|
|
|
|
|
+ // this.tableData.taskParam[this.currentIndex]['materialQuota']
|
|
|
|
|
+ // .length > 0
|
|
|
|
|
+ // ) {
|
|
|
|
|
+ // max = Number(
|
|
|
|
|
+ // Math.max(
|
|
|
|
|
+ // ...this.tableData.taskParam[this.currentIndex][
|
|
|
|
|
+ // 'materialQuota'
|
|
|
|
|
+ // ].map((i) => i.subCode)
|
|
|
|
|
+ // )
|
|
|
|
|
+ // );
|
|
|
|
|
+ // subCode = max + index + 1;
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // max = 1;
|
|
|
|
|
+ // subCode = max + index;
|
|
|
|
|
+ // }
|
|
|
|
|
+ let max = '';
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.tableData.taskParam[this.currentIndex]['materialQuota']
|
|
|
|
|
+ .length > 0
|
|
|
|
|
+ ) {
|
|
|
|
|
+ max =
|
|
|
|
|
+ Math.max(
|
|
|
|
|
+ ...this.tableData.taskParam[this.currentIndex][
|
|
|
|
|
+ 'materialQuota'
|
|
|
|
|
+ ].map((i) => i.subCode)
|
|
|
|
|
+ ) +
|
|
|
|
|
+ 10 * ++index +
|
|
|
|
|
+ '';
|
|
|
|
|
+ console.log(max);
|
|
|
|
|
+ if (max.length < 4) {
|
|
|
|
|
+ max = new Array(4 - max.length).fill('0').join('') + max;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ max = 10 * ++index + '';
|
|
|
|
|
+ if (max.length < 4) {
|
|
|
|
|
+ max = new Array(4 - max.length).fill('0').join('') + max;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ subCode = max.substring(0, max.length - 1) + '0';
|
|
|
|
|
+ array.push({
|
|
|
|
|
+ subCode,
|
|
|
|
|
+ categoryId: item.categoryId,
|
|
|
|
|
+ categoryName: item.name,
|
|
|
|
|
+ categoryCode: item.categoryCode,
|
|
|
|
|
+ isReworkBom: 0,
|
|
|
|
|
+ brandNum: item.brandNum,
|
|
|
|
|
+ weightUnit: item.weightUnit,
|
|
|
|
|
+ count: '',
|
|
|
|
|
+ modelType: item.modelType,
|
|
|
|
|
+ unit: item.measuringUnit
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(array);
|
|
|
|
|
+ this.tableData.taskParam[this.currentIndex].materialQuota =
|
|
|
|
|
+ this.tableData.taskParam[this.currentIndex].materialQuota.concat(
|
|
|
|
|
+ array
|
|
|
|
|
+ );
|
|
|
|
|
+ console.log(this.tableData.taskParam[this.currentIndex].materialQuota);
|
|
|
|
|
+ this.$refs.materialTable.setData(
|
|
|
|
|
+ this.tableData.taskParam[this.currentIndex].materialQuota
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
add() {
|
|
add() {
|
|
|
let subCode = '0010';
|
|
let subCode = '0010';
|
|
|
let type = '';
|
|
let type = '';
|
|
|
if (this.activeName === '材料定额') {
|
|
if (this.activeName === '材料定额') {
|
|
|
- type = 'materialQuota';
|
|
|
|
|
|
|
+ this.$refs.productMultipleRefs.open(1);
|
|
|
|
|
+ return;
|
|
|
} else if (this.activeName === '制造资源') {
|
|
} else if (this.activeName === '制造资源') {
|
|
|
type = 'resource';
|
|
type = 'resource';
|
|
|
} else if (this.activeName === '替代料') {
|
|
} else if (this.activeName === '替代料') {
|