|
@@ -677,7 +677,7 @@
|
|
|
import { addMaterial } from '@/api/material/list.js';
|
|
import { addMaterial } from '@/api/material/list.js';
|
|
|
import { deepClone } from '@/utils/index';
|
|
import { deepClone } from '@/utils/index';
|
|
|
import { finishPageTab, reloadPageTab } from '@/utils/page-tab-util';
|
|
import { finishPageTab, reloadPageTab } from '@/utils/page-tab-util';
|
|
|
- import { produceTypeList } from '@/enum/dict.js';
|
|
|
|
|
|
|
+ // import { produceTypeList } from '@/enum/dict.js';
|
|
|
import { copyObj } from '@/utils/util';
|
|
import { copyObj } from '@/utils/util';
|
|
|
import { parameterGetByCode } from '@/api/system/dictionary/index.js';
|
|
import { parameterGetByCode } from '@/api/system/dictionary/index.js';
|
|
|
import GetCodeDialog from '@/components/addDoc/getCode.vue';
|
|
import GetCodeDialog from '@/components/addDoc/getCode.vue';
|
|
@@ -769,7 +769,7 @@
|
|
|
isReadOnly: false,
|
|
isReadOnly: false,
|
|
|
isShow: true,
|
|
isShow: true,
|
|
|
industryAttribute: '',
|
|
industryAttribute: '',
|
|
|
- produceTypeList,
|
|
|
|
|
|
|
+ produceTypeList:[],
|
|
|
packagingSpecificationList: [],
|
|
packagingSpecificationList: [],
|
|
|
loading: false,
|
|
loading: false,
|
|
|
productImgs: [],
|
|
productImgs: [],
|
|
@@ -842,24 +842,7 @@
|
|
|
needProductSequence: 0
|
|
needProductSequence: 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- lbjtList: [
|
|
|
|
|
- {
|
|
|
|
|
- label: '自制件',
|
|
|
|
|
- value: 1
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '采购件',
|
|
|
|
|
- value: 2
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '外协件',
|
|
|
|
|
- value: 3
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '受托件',
|
|
|
|
|
- value: 4
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ lbjtList: [],
|
|
|
attributeList: [],
|
|
attributeList: [],
|
|
|
remarkform: {
|
|
remarkform: {
|
|
|
remarkAttach: [],
|
|
remarkAttach: [],
|
|
@@ -1151,15 +1134,6 @@
|
|
|
this.industryAttribute = res.value;
|
|
this.industryAttribute = res.value;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
- parameterGetByCode({
|
|
|
|
|
- code: 'component_attribute'
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- this.lbjtList = this.parseComponentAttributeOptions(
|
|
|
|
|
- res?.name || res?.value
|
|
|
|
|
- );
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
//新增
|
|
//新增
|
|
|
|
|
|
|
|
this.$set(
|
|
this.$set(
|
|
@@ -1197,6 +1171,8 @@
|
|
|
this.getAttributeList('inventory_type');
|
|
this.getAttributeList('inventory_type');
|
|
|
|
|
|
|
|
this.getDictList('zeroPartPros');
|
|
this.getDictList('zeroPartPros');
|
|
|
|
|
+ this.getLbjtListList('categoryComponentAttribute');
|
|
|
|
|
+ this.getProduceTypeList('categoryProduceTypeList');
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
if (this.clientEnvironmentId == 4) {
|
|
if (this.clientEnvironmentId == 4) {
|
|
@@ -1643,34 +1619,32 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 生产类型字典
|
|
// 生产类型字典
|
|
|
- // async getProduceTypeList(code) {
|
|
|
|
|
- // let { data: res } = await getByCode(code);
|
|
|
|
|
- // console.log('res----', res);
|
|
|
|
|
-
|
|
|
|
|
- // this.produceTypeList = res.map((item) => {
|
|
|
|
|
- // let values = Object.keys(item);
|
|
|
|
|
- // return {
|
|
|
|
|
- // value: values[0],
|
|
|
|
|
- // label: item[values[0]]
|
|
|
|
|
- // };
|
|
|
|
|
- // });
|
|
|
|
|
- // console.log('produceTypeList',this.produceTypeList);
|
|
|
|
|
- // },
|
|
|
|
|
- parseComponentAttributeOptions(value) {
|
|
|
|
|
- if (!value) {
|
|
|
|
|
- return [];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ async getProduceTypeList(code) {
|
|
|
|
|
+ let { data: res } = await getByCode(code);
|
|
|
|
|
+ console.log('res----', res);
|
|
|
|
|
|
|
|
- const options = [];
|
|
|
|
|
- const optionRegExp = /(\d+)\s*[::]\s*([^;;))]+)/g;
|
|
|
|
|
- let match;
|
|
|
|
|
- while ((match = optionRegExp.exec(String(value))) !== null) {
|
|
|
|
|
- options.push({
|
|
|
|
|
- value: Number(match[1]),
|
|
|
|
|
- label: match[2].trim()
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- return options;
|
|
|
|
|
|
|
+ this.produceTypeList = res.map((item) => {
|
|
|
|
|
+ let values = Object.keys(item);
|
|
|
|
|
+ return {
|
|
|
|
|
+ value: values[0],
|
|
|
|
|
+ label: item[values[0]]
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log('produceTypeList',this.produceTypeList);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 属性类型字典
|
|
|
|
|
+ async getLbjtListList(code) {
|
|
|
|
|
+ let { data: res } = await getByCode(code);
|
|
|
|
|
+ console.log('res----', res);
|
|
|
|
|
+
|
|
|
|
|
+ this.lbjtList = res.map((item) => {
|
|
|
|
|
+ let values = Object.keys(item);
|
|
|
|
|
+ return {
|
|
|
|
|
+ value: Number(values[0]),
|
|
|
|
|
+ label: item[values[0]]
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log('lbjtList',this.lbjtList);
|
|
|
},
|
|
},
|
|
|
async getDictList(code) {
|
|
async getDictList(code) {
|
|
|
let { data: res } = await getByCode(code);
|
|
let { data: res } = await getByCode(code);
|