|
|
@@ -1118,7 +1118,7 @@ export default {
|
|
|
// this.getAccordShareList()
|
|
|
// this.getPharmacyID()
|
|
|
// this.getTableDrug('', 1, 0)
|
|
|
- this.customerQuery();
|
|
|
+ this.loaded();
|
|
|
// this._getPharmacyIDS();
|
|
|
this.getProver();
|
|
|
this.getSelectType("中药药品用法", 0);
|
|
|
@@ -1130,7 +1130,21 @@ export default {
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
async loaded(props) {
|
|
|
- if (!this.pharmacyTypes.length) await this.customerQuery(props).catch(() => void 0);
|
|
|
+ if (!this.pharmacyTypes.length) await this.customerQuery().catch(() => void 0);
|
|
|
+
|
|
|
+ let defaultProps = {};
|
|
|
+ try {
|
|
|
+ this.recipe_tabs_c = props.recipe_tabs_c || 0;
|
|
|
+ defaultProps = props.recipe_tabs[this.recipe_tabs_c];
|
|
|
+ } catch(e) {}
|
|
|
+ try {
|
|
|
+ defaultProps = {...this.pharmacyTypes[0], ...defaultProps};
|
|
|
+ this.recipe_tabs[this.recipe_tabs_c].pharmacyID = defaultProps.pharmacyID || this.pharmacyList[0].pid;
|
|
|
+ this.recipe_tabs[this.recipe_tabs_c].radio = defaultProps.radio || defaultProps.ptype;
|
|
|
+ this.recipe_tabs[this.recipe_tabs_c].lastType = defaultProps.radio || defaultProps.ptype;
|
|
|
+ } catch (e) {}
|
|
|
+ this.$forceUpdate();
|
|
|
+ await this.getPharmacyMsg(this.recipe_tabs[this.recipe_tabs_c].pharmacyID);
|
|
|
return this;
|
|
|
},
|
|
|
_splitDataToView(totalData) {
|
|
|
@@ -2351,7 +2365,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 选择药房
|
|
|
- async customerQuery(defaultProps = {}) {
|
|
|
+ async customerQuery() {
|
|
|
let res = await customerQuery({
|
|
|
type: 0
|
|
|
});
|
|
|
@@ -2367,14 +2381,8 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
- defaultProps = {...pharmacyTypes[0], ...defaultProps};
|
|
|
- this.recipe_tabs[this.recipe_tabs_c].pharmacyID = res.Data[0].pid;
|
|
|
- this.recipe_tabs[this.recipe_tabs_c].radio = defaultProps.ptype;
|
|
|
- this.recipe_tabs[this.recipe_tabs_c].lastType = defaultProps.ptype;
|
|
|
this.pharmacyList = res.Data;
|
|
|
this.pharmacyTypes = pharmacyTypes;
|
|
|
- this.$forceUpdate();
|
|
|
- this.getPharmacyMsg(res.Data[0].pid);
|
|
|
}
|
|
|
},
|
|
|
// 获取药房id
|