|
@@ -982,7 +982,9 @@
|
|
// 医药行业
|
|
// 医药行业
|
|
case 'material_medcine':
|
|
case 'material_medcine':
|
|
this.getTagList('material_medcine', (form) => {
|
|
this.getTagList('material_medcine', (form) => {
|
|
- this.medcineData.form = form;
|
|
|
|
|
|
+ this.medcineData.form = [...form];
|
|
|
|
+ this.medcineData.value = initParams(this.medcineData.form,'prop');
|
|
|
|
+ this.medcineRules = initRules(form);
|
|
this.getMedcineDetails(this.materialId, 'material_medcine');
|
|
this.getMedcineDetails(this.materialId, 'material_medcine');
|
|
})
|
|
})
|
|
break;
|
|
break;
|
|
@@ -1122,7 +1124,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
// _this.handleAddReferLabel('basicData');
|
|
// _this.handleAddReferLabel('basicData');
|
|
-
|
|
|
|
|
|
+ this.count++;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -1437,7 +1439,7 @@
|
|
async getMedcineDetails(id) {
|
|
async getMedcineDetails(id) {
|
|
let _this = this;
|
|
let _this = this;
|
|
console.log(id);
|
|
console.log(id);
|
|
- materialApi.medcineDetailsInfo(id).then((res) => {
|
|
|
|
|
|
+ await materialApi.medcineDetailsInfo(id).then((res) => {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
console.log(res, '医药行业');
|
|
console.log(res, '医药行业');
|
|
let {code, data} = res;
|
|
let {code, data} = res;
|
|
@@ -1446,6 +1448,7 @@
|
|
// this.medcineData.form = data.form;
|
|
// this.medcineData.form = data.form;
|
|
// _this.handleAddReferLabel('medcineData');
|
|
// _this.handleAddReferLabel('medcineData');
|
|
console.log(' _this.medcineData', _this.medcineData, res);
|
|
console.log(' _this.medcineData', _this.medcineData, res);
|
|
|
|
+ this.count++;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -1486,27 +1489,30 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 获取物料列表表头
|
|
// 获取物料列表表头
|
|
- getTagList(templateCode, cb) {
|
|
|
|
- let _this = this
|
|
|
|
- materialApi.tagList({templateCode}).then(res => {
|
|
|
|
|
|
+ async getTagList(templateCode, cb) {
|
|
|
|
+ let _this = this;
|
|
|
|
+ await materialApi.tagList({templateCode}).then(async (res) => {
|
|
console.log(res, `获取${templateCode}表头`);
|
|
console.log(res, `获取${templateCode}表头`);
|
|
let dictIdList = [];
|
|
let dictIdList = [];
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
|
|
|
- res.data.map(item => {
|
|
|
|
-
|
|
|
|
- // 查字典
|
|
|
|
- if (item.dictId && item.dictId != '') {
|
|
|
|
- // 通过接口获取有dict的对应的数据
|
|
|
|
- getDicts(item.dictId).then(dict => {
|
|
|
|
- if (dict.data) {
|
|
|
|
- item['dictValue'] = dict.data;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ res.data.map(async(item) => {
|
|
|
|
+ // 查字典
|
|
|
|
+ if (item.dictId && item.dictId != '') {
|
|
|
|
+ // 通过接口获取有dict的对应的数据
|
|
|
|
+ await getDicts(item.dictId).then(dict => {
|
|
|
|
+ if (dict.data) {
|
|
|
|
+ item['dictValue'] = dict.data;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+ return cb(res.data);
|
|
|
|
+
|
|
|
|
+
|
|
// 动态更改dict
|
|
// 动态更改dict
|
|
// res.data.forEach(item => {
|
|
// res.data.forEach(item => {
|
|
// if (item.dictId) {
|
|
// if (item.dictId) {
|
|
@@ -1520,7 +1526,7 @@
|
|
|
|
|
|
// console.log(_this.dict, 'dicts');
|
|
// console.log(_this.dict, 'dicts');
|
|
|
|
|
|
- return cb(res.data);
|
|
|
|
|
|
+ // return cb(res.data);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -1630,7 +1636,10 @@
|
|
// 基本信息
|
|
// 基本信息
|
|
case 'material':
|
|
case 'material':
|
|
await this.getTagList('material', async(form) => {
|
|
await this.getTagList('material', async(form) => {
|
|
|
|
+ // this.basicData.form = [...form];
|
|
this.basicData.form = [...form];
|
|
this.basicData.form = [...form];
|
|
|
|
+ this.rules = initRules(form);
|
|
|
|
+ this.basicData.value = initParams(this.basicData.form,'prop')
|
|
await this.getMaterialDetails(this.materialId, 'material');
|
|
await this.getMaterialDetails(this.materialId, 'material');
|
|
})
|
|
})
|
|
break;
|
|
break;
|
|
@@ -2462,28 +2471,30 @@
|
|
async handleRest() {
|
|
async handleRest() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
// 基本信息
|
|
// 基本信息
|
|
- await this.getTagList('material', (form) => {
|
|
|
|
|
|
+ await this.getTagList('material', async(form) => {
|
|
this.basicData.form = [...form];
|
|
this.basicData.form = [...form];
|
|
this.rules = initRules(form);
|
|
this.rules = initRules(form);
|
|
this.basicData.value = initParams(this.basicData.form,'prop')
|
|
this.basicData.value = initParams(this.basicData.form,'prop')
|
|
- this.getMaterialDetails(this.materialId, 'material');
|
|
|
|
|
|
+ await this.getMaterialDetails(this.materialId, 'material');
|
|
})
|
|
})
|
|
// 医疗行业
|
|
// 医疗行业
|
|
- await this.getTagList('material_medcine', (form) => {
|
|
|
|
- form.forEach((item) => {
|
|
|
|
- this.medcineData.value[item.prop] = ''
|
|
|
|
- })
|
|
|
|
- this.medcineData.form = form;
|
|
|
|
|
|
+ await this.getTagList('material_medcine',async (form) => {
|
|
|
|
+ // form.forEach((item) => {
|
|
|
|
+ // this.medcineData.value[item.prop] = ''
|
|
|
|
+ // })
|
|
|
|
+ this.medcineData.form = [...form];
|
|
this.medcineData.value = initParams(this.medcineData.form,'prop');
|
|
this.medcineData.value = initParams(this.medcineData.form,'prop');
|
|
this.medcineRules = initRules(form);
|
|
this.medcineRules = initRules(form);
|
|
- this.getMedcineDetails(this.materialId, 'material_medcine');
|
|
|
|
|
|
+ await this.getMedcineDetails(this.materialId, 'material_medcine');
|
|
})
|
|
})
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
watch: {
|
|
watch: {
|
|
|
|
+
|
|
// 监听主标签修改标识,控制其他标签是否禁止点击
|
|
// 监听主标签修改标识,控制其他标签是否禁止点击
|
|
'updateButtonGroup': function (nVal, oVal) {
|
|
'updateButtonGroup': function (nVal, oVal) {
|
|
console.log(nVal, 'nVal', oVal, 'oVal');
|
|
console.log(nVal, 'nVal', oVal, 'oVal');
|