|
|
@@ -45,6 +45,12 @@
|
|
|
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="存货类型:" prop="attributeType">
|
|
|
+ <!-- <DictSelection
|
|
|
+ dictName="存货类型"
|
|
|
+ clearable
|
|
|
+ v-model="form.attributeType"
|
|
|
+ >
|
|
|
+ </DictSelection> -->
|
|
|
<el-select
|
|
|
v-model="form.attributeType"
|
|
|
filterable
|
|
|
@@ -399,7 +405,7 @@
|
|
|
import { deepClone } from '@/utils/index';
|
|
|
import { finishPageTab, reloadPageTab } from '@/utils/page-tab-util';
|
|
|
import { produceTypeList } from '@/enum/dict.js';
|
|
|
-import { copyObj } from '@/utils/util';
|
|
|
+ import { copyObj } from '@/utils/util';
|
|
|
|
|
|
const defCategoryQms = [
|
|
|
{
|
|
|
@@ -542,27 +548,10 @@ import { copyObj } from '@/utils/util';
|
|
|
value: 4
|
|
|
}
|
|
|
],
|
|
|
- attributeList: [
|
|
|
- {
|
|
|
- label: '成品',
|
|
|
- value: 1
|
|
|
- },
|
|
|
- {
|
|
|
- label: '半成品',
|
|
|
- value: 2
|
|
|
- },
|
|
|
- {
|
|
|
- label: '零件',
|
|
|
- value: 3
|
|
|
- },
|
|
|
- {
|
|
|
- label: '原材料',
|
|
|
- value: 4
|
|
|
- }
|
|
|
- ],
|
|
|
+ attributeList: [],
|
|
|
remarkform: {
|
|
|
remarkAttach: [],
|
|
|
- remark:''
|
|
|
+ remark: ''
|
|
|
},
|
|
|
categorySales: {},
|
|
|
categoryPurchase: { purchaseMultiplier: 1, measuringUnit: '' },
|
|
|
@@ -681,7 +670,7 @@ import { copyObj } from '@/utils/util';
|
|
|
this.purchaseInfo = {};
|
|
|
this.remarkform = {
|
|
|
remarkAttach: [],
|
|
|
- remark:''
|
|
|
+ remark: ''
|
|
|
};
|
|
|
this.categoryAps = {};
|
|
|
this.categoryMes = {
|
|
|
@@ -697,7 +686,7 @@ import { copyObj } from '@/utils/util';
|
|
|
this.categoryMold = {};
|
|
|
this.categoryPallet = {};
|
|
|
this.categoryQms = [...copyObj(defCategoryQms)];
|
|
|
-
|
|
|
+
|
|
|
this.categoryVehicle = {};
|
|
|
this.categoryWms = {
|
|
|
isUnpack: 1,
|
|
|
@@ -779,6 +768,7 @@ import { copyObj } from '@/utils/util';
|
|
|
}
|
|
|
|
|
|
this.getFieldModel();
|
|
|
+ this.getAttributeList('inventory_type');
|
|
|
|
|
|
this.getDictList('zeroPartPros');
|
|
|
},
|
|
|
@@ -906,7 +896,7 @@ import { copyObj } from '@/utils/util';
|
|
|
this.form = {
|
|
|
...info.category
|
|
|
};
|
|
|
- this.remarkform.remark=info.category.remark;
|
|
|
+ this.remarkform.remark = info.category.remark;
|
|
|
// if (this.form.measuringUnit && this.form.packingUnit) {
|
|
|
// this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
|
|
|
// }
|
|
|
@@ -958,12 +948,13 @@ import { copyObj } from '@/utils/util';
|
|
|
} else {
|
|
|
this.categoryPurchase = info.categoryPurchase;
|
|
|
}
|
|
|
- if (!info.categoryQms||!info.categoryQms?.length) {
|
|
|
+ if (!info.categoryQms || !info.categoryQms?.length) {
|
|
|
this.categoryQms = [...copyObj(defCategoryQms)];
|
|
|
- } else if(info.categoryQms.length==1) { //历史数据处理
|
|
|
- this.categoryQms = [info.categoryQms[0],copyObj(defCategoryQms[1])];
|
|
|
- }else{
|
|
|
- this.categoryQms=info.categoryQms
|
|
|
+ } else if (info.categoryQms.length == 1) {
|
|
|
+ //历史数据处理
|
|
|
+ this.categoryQms = [info.categoryQms[0], copyObj(defCategoryQms[1])];
|
|
|
+ } else {
|
|
|
+ this.categoryQms = info.categoryQms;
|
|
|
}
|
|
|
if (typeof info.categoryVehicle == 'string') {
|
|
|
this.categoryVehicle = {};
|
|
|
@@ -1052,6 +1043,26 @@ import { copyObj } from '@/utils/util';
|
|
|
// });
|
|
|
},
|
|
|
|
|
|
+ async getAttributeList(code) {
|
|
|
+ let res = await getByCode(code);
|
|
|
+
|
|
|
+ // this.attributeList = res.data.map((item) => {
|
|
|
+ // let values = Object.keys(item);
|
|
|
+ // return {
|
|
|
+ // value: values[0],
|
|
|
+ // label: item[values[0]]
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+
|
|
|
+ let list = res.data.map((item) => {
|
|
|
+ let key = Object.keys(item)[0];
|
|
|
+ return { value: Number(key), label: item[key] };
|
|
|
+ });
|
|
|
+ this.attributeList = list;
|
|
|
+
|
|
|
+ console.log(this.attributeList, 'this.attributeList');
|
|
|
+ },
|
|
|
+
|
|
|
openCategory() {
|
|
|
this.$refs.categoryRefs.open();
|
|
|
},
|