|
@@ -121,8 +121,7 @@
|
|
|
|
|
|
<div class="md-content">
|
|
|
<el-form :inline="true" label-position="right" :model="basicData.value">
|
|
|
- <!-- <el-form-item label="所属组织">
|
|
|
- <el-input v-model="basicData.value.orgName" placeholder="所属组织"></el-input> </el-form-item> -->
|
|
|
+ <!-- <el-form-item label="所属组织"></el-form-item> -->
|
|
|
<el-form-item label="物料编码">
|
|
|
<el-input v-model="basicData.value.code" size="small" placeholder="物料编码"></el-input>
|
|
|
</el-form-item>
|
|
@@ -132,9 +131,7 @@
|
|
|
<el-form-item label="英文名称">
|
|
|
<el-input v-model="basicData.value.enName" size="small" placeholder="英文名称"></el-input>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="版本号">
|
|
|
- <el-input v-model="basicData.value.version" placeholder="版本号"></el-input> </el-form-item> -->
|
|
|
-
|
|
|
+ <!-- <el-form-item label="版本号"></el-form-item> -->
|
|
|
</el-form>
|
|
|
|
|
|
<dr-tabs :tabList="detailsTabs" :handleTabClick="handleMainTabClick">
|
|
@@ -155,22 +152,24 @@
|
|
|
<!-- :disabled="!(headerParam.isEdit && f.edit)" -->
|
|
|
<!-- 多选框 -->
|
|
|
<el-form-item v-if="f.attribute == 'checkbox'" style="text-align: left;">
|
|
|
- <el-checkbox :label="f.name" name="type" v-model="basicData.value[f.prop]">
|
|
|
+ <el-checkbox :label="f.name" name="type" v-model="basicData.value[f.prop]"
|
|
|
+ :disabled="!updateButtonGroup">
|
|
|
</el-checkbox>
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- 下拉框 -->
|
|
|
- <el-form-item v-else-if="f.attribute == 'select'" :label="f.name">
|
|
|
+ <el-form-item v-else-if="f.attribute == 'select'" :label="f.name"
|
|
|
+ :id="(updateButtonGroup && f.apiUrl) ? 'selected' : ''">
|
|
|
|
|
|
- <el-select v-if="f.dictId" v-model="basicData.value[f.prop]" :placeholder="f.name">
|
|
|
- <el-option v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
|
|
|
+ <el-select v-model="basicData.value[`${f.prop}Label`]" :placeholder="f.name"
|
|
|
+ :key="basicData.value[f.prop]" :disabled="!updateButtonGroup"
|
|
|
+ @focus="f.apiUrl && handleQueryMore(f, '', { name: 'basicData', prop: f.prop })">
|
|
|
+ <el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
|
|
|
:value="d.dictValue">
|
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
|
|
|
- <el-input v-if="f.apiUrl" size="small" v-model="basicData.value[f.prop]" :placeholder="f.name">
|
|
|
- <el-button slot="append" icon="el-icon-search" @click="handleQueryMore(f)"></el-button>
|
|
|
- </el-input>
|
|
|
+ <div slot="empty"></div>
|
|
|
+ </el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@@ -183,7 +182,7 @@
|
|
|
<!--attribute 文本 数字 文本域 为null -->
|
|
|
<el-form-item v-else :label="f.name">
|
|
|
<el-input size="small" v-model="basicData.value[f.prop]" :type="f.attribute || 'text'"
|
|
|
- :placeholder="f.name">
|
|
|
+ :readonly="!updateButtonGroup" :placeholder="f.name">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
@@ -221,17 +220,23 @@
|
|
|
|
|
|
<!-- 多选框 -->
|
|
|
<el-form-item v-if="m.attribute == 'checkbox'">
|
|
|
- <el-checkbox :label="m.name" name="type" v-model="medcineData.value[m.prop]">
|
|
|
+ <el-checkbox :label="m.name" name="type" v-model="medcineData.value[m.prop]"
|
|
|
+ :disabled="!updateButtonGroup">
|
|
|
</el-checkbox>
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- 下拉框 -->
|
|
|
<el-form-item v-else-if="m.attribute == 'select'" :label="m.name">
|
|
|
|
|
|
- <el-select v-model="medcineData.value[m.prop]" :placeholder="m.name">
|
|
|
- <el-option v-for="d in m.dictValue" :key="d.dictValue" :label="d.dictLabel"
|
|
|
- :value="d.dictValue">
|
|
|
+ <el-select v-model="medcineData.value[`${m.prop}Label`]" :placeholder="m.name"
|
|
|
+ :key="medcineData.value[m.prop]" :disabled="!updateButtonGroup"
|
|
|
+ @focus="m.apiUrl && handleQueryMore(m, '', { name: 'medcineData', prop: m.prop })">
|
|
|
+
|
|
|
+ <el-option v-if="m.dictId" v-for="d in m.dictValue" :key="d.dictValue"
|
|
|
+ :label="d.dictLabel" :value="d.dictValue">
|
|
|
</el-option>
|
|
|
+
|
|
|
+ <div slot="empty"></div>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -244,7 +249,7 @@
|
|
|
<!-- 文本、数字、textarae -->
|
|
|
<el-form-item v-else :label="m.name">
|
|
|
<el-input size="small" v-model="medcineData.value[m.prop]" :type="m.attribute || 'text'"
|
|
|
- :placeholder="m.name">
|
|
|
+ :placeholder="m.name" :readonly="!updateButtonGroup">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
@@ -256,11 +261,23 @@
|
|
|
</el-form>
|
|
|
|
|
|
<!-- 其他展示为列表 -->
|
|
|
- <el-table v-else :data="viceMsg.value" class="material-table">
|
|
|
+
|
|
|
+ <!-- 辅计量 -->
|
|
|
+ <el-table v-else-if="activeViceTab == 'material_unit'" :data="unitDetails.value"
|
|
|
+ class="material-table">
|
|
|
<el-table-column type="index" label="序号" width="55" align="center" />
|
|
|
- <el-table-column v-for="v in viceMsg.form" v-if="v.show" :label="v.name" align="center"
|
|
|
+ <el-table-column v-for="v in unitDetails.form" v-if="v.show" :label="v.name" align="center"
|
|
|
:prop="v.prop" show-overflow-tooltip />
|
|
|
</el-table>
|
|
|
+
|
|
|
+ <!-- 辅助属性 -->
|
|
|
+ <el-table v-else-if="activeViceTab == 'material_property'" :data="propertyDetail.value"
|
|
|
+ class="material-table">
|
|
|
+ <el-table-column type="index" label="序号" width="55" align="center" />
|
|
|
+ <el-table-column v-for="v in propertyDetail.form" v-if="v.show" :label="v.name" align="center"
|
|
|
+ :prop="v.prop" show-overflow-tooltip />
|
|
|
+ </el-table>
|
|
|
+
|
|
|
</template>
|
|
|
</dr-tabs>
|
|
|
|
|
@@ -329,11 +346,12 @@
|
|
|
</el-row>
|
|
|
|
|
|
<el-collapse v-model="collapseActive" @change="handleCollapseChange">
|
|
|
+
|
|
|
<el-collapse-item title="物料基本信息" name="basic">
|
|
|
<el-form :inline="true" label-position="right" :model="basicData.value">
|
|
|
<!-- <el-form-item label="所属组织">
|
|
|
<el-input v-model="basicData.value.orgName" placeholder="所属组织"></el-input>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item label="物料编码">
|
|
|
<el-input v-model="basicData.value.code" size="small" readonly placeholder="物料编码"></el-input>
|
|
|
</el-form-item>
|
|
@@ -345,10 +363,11 @@
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="版本号">
|
|
|
<el-input v-model="basicData.value.version" placeholder="版本号"></el-input>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item> -->
|
|
|
|
|
|
</el-form>
|
|
|
</el-collapse-item>
|
|
|
+
|
|
|
<el-collapse-item :title="otherDeatils.title" :name="activeMainTab">
|
|
|
<div class="od-msg">
|
|
|
|
|
@@ -368,12 +387,17 @@
|
|
|
<!-- 下拉框 -->
|
|
|
<el-form-item v-else-if="f.attribute == 'select'" :label="f.name">
|
|
|
|
|
|
- <el-select v-model="otherDeatils.value[f.prop]" :placeholder="f.name"
|
|
|
- :disabled="!(otherDeatils.isEdit && f.edit)">
|
|
|
- <el-option v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
|
|
|
+ <el-select v-model="otherDeatils.value[`${f.prop}Label`]" :placeholder="f.name"
|
|
|
+ :key="otherDeatils.value[f.prop]" :disabled="!(otherDeatils.isEdit && f.edit)"
|
|
|
+ @focus="f.apiUrl && handleQueryMore(f, '', { name: 'otherDeatils', prop: f.prop })">
|
|
|
+
|
|
|
+ <el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
|
|
|
:value="d.dictValue">
|
|
|
</el-option>
|
|
|
+
|
|
|
+ <div slot="empty"></div>
|
|
|
</el-select>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item v-else-if="f.attribute == 'image'" :label="f.name">
|
|
@@ -422,11 +446,31 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
-
|
|
|
- <el-dialog :title="MoreDataDialog.title" :visible.sync="MoreDataDialog.show" width="70%" class="MoreDataDialog"
|
|
|
- :close-on-press-escape="false" :close-on-click-modal="false">
|
|
|
+ <!-- 参照弹窗 -->
|
|
|
+ <el-dialog :title="MoreDataDialog.msg.name" :visible.sync="MoreDataDialog.show" width="70%" class="MoreDataDialog"
|
|
|
+ :close-on-press-escape="false" :close-on-click-modal="false" :before-close="handleCloseRefer">
|
|
|
<div>
|
|
|
- 数据展示
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-input v-model="MoreDataDialog.key" placeholder="过滤" size="small" @change="handleFilterRefer" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <!-- 树形 -->
|
|
|
+ <el-tree v-if="MoreDataDialog.type == 'tree'" :data="MoreDataDialog.list" @node-click="handleNodeClick"></el-tree>
|
|
|
+
|
|
|
+ <!-- 列表 -->
|
|
|
+ <el-table v-else :data="MoreDataDialog.list" style="width: 100%" @row-click="handleCurentRow"
|
|
|
+ highlight-current-row>
|
|
|
+ <el-table-column type="index" label="序号" width="55" align="center" />
|
|
|
+ <el-table-column v-for="m in MoreDataDialog.form" v-if="m.show" :prop="m.prop" :label="m.name" />
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <!-- 按钮 -->
|
|
|
+ <el-row class="more-button">
|
|
|
+ <el-button round size="small" @click="handleConcalRefer">取消</el-button>
|
|
|
+ <el-button round size="small" type="primary" @click="handleConfirmRefer">确认</el-button>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
@@ -447,6 +491,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ count: 1,
|
|
|
// 详情固定标签页
|
|
|
detailsTabs,
|
|
|
// 标签页当前激活状态
|
|
@@ -484,6 +529,16 @@ export default {
|
|
|
value: {},
|
|
|
form: []
|
|
|
},
|
|
|
+ // 辅助属性
|
|
|
+ propertyDetail: {
|
|
|
+ value: [],
|
|
|
+ form: []
|
|
|
+ },
|
|
|
+ // 辅计量管理
|
|
|
+ unitDetails: {
|
|
|
+ value: [],
|
|
|
+ form: []
|
|
|
+ },
|
|
|
// 主标签信息
|
|
|
mainMsg: {
|
|
|
form: [],
|
|
@@ -517,7 +572,20 @@ export default {
|
|
|
show: false,
|
|
|
// 查询关键字
|
|
|
key: '',
|
|
|
- title: ''
|
|
|
+ // 需要查看参照的表单头信息
|
|
|
+ msg: '',
|
|
|
+ type: 'table',
|
|
|
+ // 查询出的参照数据
|
|
|
+ list: [],
|
|
|
+ // 查询出的参照表头
|
|
|
+ form: [],
|
|
|
+ // 选中的参照数据
|
|
|
+ value: '',
|
|
|
+ // 参照最后应该赋值的地方
|
|
|
+ target: {
|
|
|
+ name: '',
|
|
|
+ prop: ''
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -638,14 +706,16 @@ export default {
|
|
|
case 'material_unit':
|
|
|
this.getTagList('material_unit', (form) => {
|
|
|
console.log(form, 'form');
|
|
|
- this.viceMsg.form = form;
|
|
|
+ this.unitDetails.form = form;
|
|
|
+ this.getUnitDetails(this.materialId);
|
|
|
});
|
|
|
break;
|
|
|
// 辅助属性
|
|
|
case 'material_property':
|
|
|
this.getTagList('material_property', (form) => {
|
|
|
|
|
|
- this.viceMsg.form = form;
|
|
|
+ this.propertyDetail.form = form;
|
|
|
+ this.getPropertyDetails(this.materialId);
|
|
|
});
|
|
|
break;
|
|
|
|
|
@@ -662,7 +732,6 @@ export default {
|
|
|
console.log(activeTab, 'activeTab');
|
|
|
this.otherDeatils.title = activeTab.label;
|
|
|
|
|
|
- // 查询其他标签页列表详情
|
|
|
this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
|
|
|
},
|
|
|
// 主页签 列表数据选择
|
|
@@ -671,13 +740,40 @@ export default {
|
|
|
this.mainMsg.checkedList = e;
|
|
|
},
|
|
|
// 编辑状态下,弹窗显示查询数据
|
|
|
- handleQueryMore(msg) {
|
|
|
- console.log('编辑状态下,弹窗显示查询数据', msg);
|
|
|
+ handleQueryMore(msg, val, target) {
|
|
|
+ console.log('编辑状态下,弹窗显示查询数据', msg, 'val', val, target);
|
|
|
+
|
|
|
this.MoreDataDialog.show = true;
|
|
|
- this.MoreDataDialog.title = msg.name;
|
|
|
+ this.MoreDataDialog.msg = msg;
|
|
|
+ this.MoreDataDialog.target = target;
|
|
|
+
|
|
|
+ this.getExecuteMethods(msg.apiUrl, { param: this.MoreDataDialog.key }, (data) => {
|
|
|
+
|
|
|
+ console.log(data, '编辑状态下,弹窗显示查询数据');
|
|
|
+ this.MoreDataDialog.type = data.type;
|
|
|
+ this.MoreDataDialog.list = data.tableBody;
|
|
|
+ if (data.type == 'tree') {
|
|
|
+ } else {
|
|
|
+ this.MoreDataDialog.form = data.tableHeader;
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log(this.MoreDataDialog.list, 'this.MoreDataDialog.list');
|
|
|
+ console.log(this.MoreDataDialog.form, 'this.MoreDataDialog.form');
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 根据apiUrl获取对应参照的值
|
|
|
+ getExecuteMethods(methodName, params, cb) {
|
|
|
+ materialApi.executeMethods(methodName, params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ cb(res.data);
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 获取物料基本信息详细信息
|
|
|
getMaterialDetails(id, templateCode) {
|
|
|
+ let _this = this;
|
|
|
materialApi.materialDetails(
|
|
|
id,
|
|
|
templateCode,
|
|
@@ -685,12 +781,37 @@ export default {
|
|
|
console.log(res, '物料基本信息');
|
|
|
let { code, data } = res;
|
|
|
if (code == 200) {
|
|
|
- this.basicData.value = data.data;
|
|
|
+
|
|
|
+ _this.basicData.value = data.data;
|
|
|
// this.basicData.form = data.form;
|
|
|
|
|
|
+ _this.handleAddReferLabel('basicData');
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 添加参照中的label
|
|
|
+ handleAddReferLabel(dataName) {
|
|
|
+ let _this = this;
|
|
|
+ this[dataName].form.map(item => {
|
|
|
+ // 查参照
|
|
|
+ if (item.apiUrl && item.apiUrl != '') {
|
|
|
+
|
|
|
+ _this.getExecuteMethods(item.apiUrl, {}, (data) => {
|
|
|
+
|
|
|
+ let { tableBody } = data;
|
|
|
+
|
|
|
+ let Blabel = tableBody.filter((t) => t.id == _this[dataName].value[item.prop])[0];
|
|
|
+
|
|
|
+ _this[dataName].value[`${item.prop}Label`] = Blabel || '';
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ console.log(_this[dataName].value, '_this[dataName].value//////////////////////');
|
|
|
+ },
|
|
|
+
|
|
|
|
|
|
// 查询财务信息列表
|
|
|
getFinanceList(materialId) {
|
|
@@ -698,6 +819,7 @@ export default {
|
|
|
console.log(res, '查询财务信息列表');
|
|
|
if (res.code == 200) {
|
|
|
this.mainMsg.value = res.rows;
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -746,15 +868,17 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
// 查询其他标签页列表详情
|
|
|
getOtherListDetails(type, id) {
|
|
|
console.log(type, id, '查询其他标签页列表详情');
|
|
|
this.otherDeatils.form = this.mainMsg.form;
|
|
|
+ console.log(this.otherDeatils.form, 'this.otherDeatils.form');
|
|
|
|
|
|
switch (type) {
|
|
|
// 财物信息
|
|
|
case 'material_finance':
|
|
|
-
|
|
|
+ this.getFinanceDetails(id);
|
|
|
break;
|
|
|
// 利润中心信息
|
|
|
case 'profit_center':
|
|
@@ -770,39 +894,78 @@ export default {
|
|
|
break;
|
|
|
// 计划信息
|
|
|
case 'material_plan':
|
|
|
-
|
|
|
+ this.getPlanDetails(id);
|
|
|
break;
|
|
|
// 成本信息
|
|
|
case 'material_cost':
|
|
|
-
|
|
|
+ this.getCostDetails(id);
|
|
|
break;
|
|
|
default: break;
|
|
|
}
|
|
|
},
|
|
|
+ // 查询财务信息详情
|
|
|
+ getFinanceDetails(id) {
|
|
|
+ materialApi.financeDetails(id).then(res => {
|
|
|
+ let _this = this;
|
|
|
+ console.log('查询财务信息详情', res);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.otherDeatils.value = res.data.data;
|
|
|
+ _this.handleAddReferLabel('otherDeatils');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取利润中心详情
|
|
|
getCenterDetails(materialId) {
|
|
|
+ let _this = this;
|
|
|
materialApi.centerDetails(materialId).then(res => {
|
|
|
console.log(res, '获取利润中心详情');
|
|
|
if (res.code == 200) {
|
|
|
this.otherDeatils.value = res.data.data;
|
|
|
+ _this.handleAddReferLabel('otherDeatils');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 获取采购详细信息详情
|
|
|
getPurchaseDetails(materialId) {
|
|
|
+ let _this = this;
|
|
|
materialApi.purchaseDetails(materialId).then(res => {
|
|
|
console.log(res, '获取采购详细信息详情');
|
|
|
if (res.code == 200) {
|
|
|
this.otherDeatils.value = res.data.data;
|
|
|
+ _this.handleAddReferLabel('otherDeatils');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取成本信息详情
|
|
|
+ getCostDetails(id) {
|
|
|
+ let _this = this;
|
|
|
+ materialApi.costDetails(id).then(res => {
|
|
|
+ console.log(res, '获取成本信息详情');
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.otherDeatils.value = res.data.data;
|
|
|
+ _this.handleAddReferLabel('otherDeatils');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取计划信息详情
|
|
|
+ getPlanDetails(id) {
|
|
|
+ let _this = this;
|
|
|
+ materialApi.planDetails(id).then(res => {
|
|
|
+ console.log(res, '获取计划信息详情');
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.otherDeatils.value = res.data.data;
|
|
|
+ _this.handleAddReferLabel('otherDeatils');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 获取库存详细信息详情
|
|
|
getInventoryDetails(materialId) {
|
|
|
+ let _this = this;
|
|
|
materialApi.inventoryDetails(materialId).then(res => {
|
|
|
console.log(res, '获取库存详细信息详情');
|
|
|
if (res.code == 200) {
|
|
|
this.otherDeatils.value = res.data.data;
|
|
|
+ _this.handleAddReferLabel('otherDeatils');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -829,9 +992,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 获取物料辅助属性详细信息+表单列段属性
|
|
|
- getPropertyDetails() {
|
|
|
- materialApi.propertyDetails().then(res => {
|
|
|
+ getPropertyDetails(id) {
|
|
|
+ materialApi.propertyDetails(id).then(res => {
|
|
|
console.log(res, '物料辅助属性详细信息');
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.propertyDetail.value = res.data.data || [];
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
// 查询物料辅助属性列表+表头字段
|
|
@@ -841,9 +1007,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//获取辅助计量单位基本信息+表单列段属性
|
|
|
- getUnitDetails() {
|
|
|
- materialApi.unitDetails().then(res => {
|
|
|
+ getUnitDetails(materialId) {
|
|
|
+ materialApi.unitDetails(materialId).then(res => {
|
|
|
console.log(res, '辅助计量单位基本信息');
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.unitDetails.value = res.data.data || [];
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
//获取辅计量管理列表信息+表头字段
|
|
@@ -862,16 +1031,17 @@ export default {
|
|
|
|
|
|
res.data.map(item => {
|
|
|
|
|
|
- if (item.dictId) {
|
|
|
+ // 查字典
|
|
|
+ if (item.dictId && item.dictId != '') {
|
|
|
// 通过接口获取有dict的对应的数据
|
|
|
- getDicts(item.dictId).then(res => {
|
|
|
- if (res.data) {
|
|
|
- item['dictValue'] = res.data;
|
|
|
+ getDicts(item.dictId).then(dict => {
|
|
|
+ if (dict.data) {
|
|
|
+ item['dictValue'] = dict.data;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- })
|
|
|
|
|
|
+ })
|
|
|
|
|
|
// 动态更改dict
|
|
|
// res.data.forEach(item => {
|
|
@@ -1007,7 +1177,7 @@ export default {
|
|
|
},
|
|
|
// 其他页签详情弹窗关闭事件
|
|
|
handleCloseOtherDetails(done) {
|
|
|
- console.log('其他页签详情弹窗关闭事件', done);
|
|
|
+ console.log('其他页签详情弹窗关闭事件');
|
|
|
// 处于编辑状态
|
|
|
if (this.otherDeatils.isEdit) {
|
|
|
this.$message({
|
|
@@ -1031,6 +1201,8 @@ export default {
|
|
|
console.log('确认弹窗操作');
|
|
|
this.optionDialog.show = false;
|
|
|
this.updateButtonGroup = false;
|
|
|
+ this.handleRest();
|
|
|
+
|
|
|
//需要禁止点击其他标签
|
|
|
this.detailsTabs = this.detailsTabs.map(item => {
|
|
|
item['disabled'] = false;
|
|
@@ -1041,26 +1213,89 @@ export default {
|
|
|
this.otherDeatils.isEdit = false;
|
|
|
}
|
|
|
},
|
|
|
- // 控制显隐
|
|
|
+ // 参照弹窗过滤
|
|
|
+ handleFilterRefer() {
|
|
|
+ // this.MoreDataDialog.key =
|
|
|
+ console.log(this.MoreDataDialog.key, '查询关键字');
|
|
|
+ this.handleQueryMore(this.MoreDataDialog.msg, this.MoreDataDialog.key);
|
|
|
+
|
|
|
+ },
|
|
|
+ // 操作提示弹窗关闭
|
|
|
handleOptionCancal() {
|
|
|
this.optionDialog.show = false;
|
|
|
this.otherDeatils.isEdit = true;
|
|
|
+ },
|
|
|
+ // 树形节点选择
|
|
|
+ handleNodeClick(e) {
|
|
|
+ console.log(e, '树形节点选择');
|
|
|
+ },
|
|
|
|
|
|
- }
|
|
|
+ // 修改-更多数据表格——选择行
|
|
|
+ handleCurentRow(row) {
|
|
|
+ console.log(row, '修改-更多数据表格——选择行');
|
|
|
+ this.MoreDataDialog.value = row;
|
|
|
+ },
|
|
|
+ // 参照弹窗确认
|
|
|
+ handleConfirmRefer() {
|
|
|
+ console.log('确认参照弹窗', `{this.${this.MoreDataDialog.target}:${this.MoreDataDialog.value.id}}`);
|
|
|
+
|
|
|
+ if (this.MoreDataDialog.target.name == 'basicData') {
|
|
|
+ // 基本信息
|
|
|
+ this.basicData.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
|
|
|
+
|
|
|
+ this.basicData.value[`${this.MoreDataDialog.target.prop}Label`] = this.MoreDataDialog.value.name;
|
|
|
+ console.log(this.basicData.value[`${this.MoreDataDialog.target.prop}Label`], '/////////////////////');
|
|
|
|
|
|
+ } else if (this.MoreDataDialog.target.name == 'medcineData') {
|
|
|
|
|
|
+ // 基本信息
|
|
|
+ this.medcineData.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
|
|
|
+
|
|
|
+ this.medcineData.value[`${this.MoreDataDialog.target.prop}Label`] = this.MoreDataDialog.value.name;
|
|
|
+
|
|
|
+ console.log(this.medcineData.value[`${this.MoreDataDialog.target.prop}Label`], '////////////////');
|
|
|
+
|
|
|
+ } else if (this.MoreDataDialog.target.name == 'otherDeatils') {
|
|
|
+
|
|
|
+ // 基本信息
|
|
|
+ this.otherDeatils.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
|
|
|
+
|
|
|
+ this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Label`] = this.MoreDataDialog.value.name;
|
|
|
+
|
|
|
+ console.log(this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Label`], '////////////////');
|
|
|
+
|
|
|
+ }
|
|
|
+ this.MoreDataDialog.show = false;
|
|
|
+ },
|
|
|
+ // 取消-关闭参照弹窗
|
|
|
+ handleConcalRefer() {
|
|
|
+ console.log('关闭参照弹窗');
|
|
|
+ this.MoreDataDialog.show = false;
|
|
|
+ this.MoreDataDialog.key = '';
|
|
|
+ },
|
|
|
+ // 关闭参照弹窗前
|
|
|
+ handleCloseRefer(done) {
|
|
|
+ this.MoreDataDialog.key = '';
|
|
|
+ done();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 取消之后重新查询页面
|
|
|
+ handleRest() {
|
|
|
+ // 基本信息
|
|
|
+ this.getTagList('material', (form) => {
|
|
|
+ this.basicData.form = form;
|
|
|
+ this.getMaterialDetails(this.materialId, 'material');
|
|
|
+ })
|
|
|
+ // 医疗行业
|
|
|
+ this.getTagList('material_medcine', (form) => {
|
|
|
+ this.medcineData.form = form;
|
|
|
+ this.getMedcineDetails(this.materialId, 'material_medcine');
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
// 基本信息
|
|
|
- this.getTagList('material', (form) => {
|
|
|
- this.basicData.form = form;
|
|
|
- this.getMaterialDetails(this.materialId, 'material');
|
|
|
- })
|
|
|
- // 医疗行业
|
|
|
- this.getTagList('material_medcine', (form) => {
|
|
|
- this.medcineData.form = form;
|
|
|
- this.getMedcineDetails(this.materialId, 'material_medcine');
|
|
|
- })
|
|
|
+ this.handleRest();
|
|
|
},
|
|
|
|
|
|
}
|
|
@@ -1111,8 +1346,13 @@ export default {
|
|
|
}
|
|
|
|
|
|
.otherDialog {
|
|
|
- .el-dialog__body {
|
|
|
|
|
|
+ .el-collapse-item__content {
|
|
|
+ padding-bottom: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dialog__body {
|
|
|
+ padding: 12px 20px;
|
|
|
height: 80%;
|
|
|
overflow: auto;
|
|
|
}
|
|
@@ -1123,8 +1363,60 @@ export default {
|
|
|
overflow-y: auto;
|
|
|
overflow-x: hidden;
|
|
|
}
|
|
|
+
|
|
|
+ .el-dialog__header {
|
|
|
+ background-color: rgb(244, 244, 244);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ .MoreDataDialog {
|
|
|
+
|
|
|
+ .el-dialog__body {
|
|
|
+ height: 500px;
|
|
|
+ padding: 20px 15px;
|
|
|
+
|
|
|
+ .el-table {
|
|
|
+ margin-top: 10px;
|
|
|
+
|
|
|
+ .el-table__body-wrapper {
|
|
|
+ height: 340px;
|
|
|
+ overflow-y: auto;
|
|
|
+ overflow-x: hidden;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dialog__header {
|
|
|
+ background-color: rgb(244, 244, 244);
|
|
|
+ }
|
|
|
+
|
|
|
+ .more-button {
|
|
|
+ margin-top: 10px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 修改下拉框样式
|
|
|
+#selected {
|
|
|
+ /*很关键:将默认的select选择框样式清除*/
|
|
|
+ // appearance: none;
|
|
|
+ // -moz-appearance: none;
|
|
|
+ // -webkit-appearance: none;
|
|
|
+ // /*为下拉小箭头留出一点位置,避免被文字覆盖*/
|
|
|
+ // padding-right: 14px;
|
|
|
+ // /*自定义图片*/
|
|
|
+ // background: url("../images/search@2x.png") no-repeat scroll right center transparent;
|
|
|
+ // /*自定义图片的大小*/
|
|
|
+ // background-size: 16px 16px;
|
|
|
+
|
|
|
+ // /*将小箭头的样式去去掉*/
|
|
|
+ // .el-icon-arrow-up:before {
|
|
|
+ // content: '';
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
}
|
|
|
</style>
|
|
|
|
|
@@ -1215,16 +1507,11 @@ export default {
|
|
|
overflow-x: auto;
|
|
|
}
|
|
|
|
|
|
-.otherDialog>>>.el-collapse-item__content {
|
|
|
+/* .otherDialog>>>.el-collapse-item__content {
|
|
|
padding-bottom: 12px;
|
|
|
}
|
|
|
|
|
|
.otherDialog>>>.el-dialog__body {
|
|
|
padding: 12px 20px;
|
|
|
-}
|
|
|
-
|
|
|
-.otherDialog>>>.el-dialog__header,
|
|
|
-.MoreDataDialog>>>.el-dialog__header {
|
|
|
- background-color: rgb(244, 244, 244);
|
|
|
-}
|
|
|
+} */
|
|
|
</style>
|