|
@@ -10,7 +10,7 @@
|
|
|
<el-button-group>
|
|
|
<!-- <el-button size="small" @click="handleInster">新增</el-button> -->
|
|
|
<el-button size="small" @click="handleBasicEdit">修改</el-button>
|
|
|
- <el-button size="small" @click="handleDel">删除</el-button>
|
|
|
+ <!-- <el-button size="small" @click="handleDel">删除</el-button> -->
|
|
|
<!-- <el-button size="small" @click="handleCopy">复制</el-button> -->
|
|
|
</el-button-group>
|
|
|
</el-col>
|
|
@@ -29,7 +29,7 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
|
|
|
- <el-button size="small" @click="handleQuery">查询</el-button> -->
|
|
|
+ <el-button size="small" @click="handleQuery">查询</el-button> -->
|
|
|
<el-button size="small" @click="handleRefresh">刷新</el-button>
|
|
|
|
|
|
</el-button-group>
|
|
@@ -49,7 +49,7 @@
|
|
|
<el-dropdown-item :command="isInvoke(true)">启用</el-dropdown-item>
|
|
|
<el-dropdown-item :command="isInvoke(false)">停用</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
- </el-dropdown> -->
|
|
|
+ </el-dropdown> -->
|
|
|
</el-button-group>
|
|
|
</el-col>
|
|
|
|
|
@@ -58,7 +58,7 @@
|
|
|
<el-button-group>
|
|
|
<el-button size="small" @click="handleQueryForm">申请单查询</el-button>
|
|
|
</el-button-group>
|
|
|
- </el-col> -->
|
|
|
+ </el-col> -->
|
|
|
|
|
|
<!-- 导入导出 -->
|
|
|
<!-- <el-col :span="1.5">
|
|
@@ -66,7 +66,7 @@
|
|
|
<el-button size="small" @click="handleImport">批量导入</el-button>
|
|
|
<el-button size="small" @click="handleExport">批量导出</el-button>
|
|
|
</el-button-group>
|
|
|
- </el-col> -->
|
|
|
+ </el-col> -->
|
|
|
|
|
|
</el-row>
|
|
|
|
|
@@ -92,8 +92,8 @@
|
|
|
<el-row :gutter="10" class="mb10" v-show="activeMainTab != 'material'">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button-group>
|
|
|
- <el-button size="small" @click="handleEdit">修改</el-button>
|
|
|
- <el-button size="small" @click="handleDel">删除</el-button>
|
|
|
+ <el-button size="small" @click="handleOtherEdit">修改</el-button>
|
|
|
+ <!-- <el-button size="small" @click="handleOtherDel">删除</el-button> -->
|
|
|
</el-button-group>
|
|
|
<el-button-group>
|
|
|
<el-button size="small" @click="handleRefresh">刷新</el-button>
|
|
@@ -112,7 +112,7 @@
|
|
|
<!-- 附件管理 -->
|
|
|
<!-- <el-button-group>
|
|
|
<el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button>
|
|
|
- </el-button-group> -->
|
|
|
+ </el-button-group> -->
|
|
|
|
|
|
<!-- 切换 -->
|
|
|
<!-- <el-button-group>
|
|
@@ -124,7 +124,7 @@
|
|
|
@click="handleChangePage('next')" />
|
|
|
<el-button size="small" icon="el-icon-d-arrow-right" :disabled="!handleBasicEdit"
|
|
|
@click="handleChangePage('end')" />
|
|
|
- </el-button-group> -->
|
|
|
+ </el-button-group> -->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
@@ -170,11 +170,11 @@
|
|
|
<el-form-item v-else-if="f.attribute == 'select'" :label="f.name"
|
|
|
:id="(updateButtonGroup && f.apiUrl) ? 'selected' : ''">
|
|
|
|
|
|
- <el-select v-model="basicData.value[`${f.prop}Label`]" :placeholder="f.name"
|
|
|
+ <el-select v-model="basicData.value[`${f.prop}Name`]" :placeholder="f.name"
|
|
|
:key="basicData.value[f.prop]" :disabled="!(updateButtonGroup && f.edit)"
|
|
|
@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 v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictCode" :label="d.dictLabel"
|
|
|
+ :value="d.dictCode">
|
|
|
</el-option>
|
|
|
|
|
|
<div slot="empty"></div>
|
|
@@ -205,8 +205,8 @@
|
|
|
@selection-change="handleMainChange">
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
<el-table-column type="index" label="序号" width="55" align="center" />
|
|
|
- <el-table-column v-for="m in mainMsg.form" v-if="m.show" :label="m.name" align="center" :prop="m.prop"
|
|
|
- show-overflow-tooltip />
|
|
|
+ <el-table-column v-for="m in mainMsg.form" v-if="m.show" :label="m.name" align="center"
|
|
|
+ :prop="m.attribute == 'select' ? `${m.prop}Name` : m.prop" show-overflow-tooltip />
|
|
|
</el-table>
|
|
|
|
|
|
</div>
|
|
@@ -236,7 +236,7 @@
|
|
|
<!-- 下拉框 -->
|
|
|
<el-form-item v-else-if="m.attribute == 'select'" :label="m.name">
|
|
|
|
|
|
- <el-select v-model="medcineData.value[`${m.prop}Label`]" :placeholder="m.name"
|
|
|
+ <el-select v-model="medcineData.value[`${m.prop}Name`]" :placeholder="m.name"
|
|
|
:key="medcineData.value[m.prop]" :disabled="!updateButtonGroup"
|
|
|
@focus="m.apiUrl && handleQueryMore(m, '', { name: 'medcineData', prop: m.prop })">
|
|
|
|
|
@@ -274,7 +274,7 @@
|
|
|
class="material-table">
|
|
|
<el-table-column type="index" label="序号" width="55" 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 />
|
|
|
+ :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip />
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 辅助属性 -->
|
|
@@ -282,7 +282,7 @@
|
|
|
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 />
|
|
|
+ :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip />
|
|
|
</el-table>
|
|
|
|
|
|
</template>
|
|
@@ -295,13 +295,13 @@
|
|
|
<el-divider content-position="left">审计信息</el-divider>
|
|
|
<el-form :inline="true" label-position="right" :model="basicData.value">
|
|
|
<el-form-item label="创建人">
|
|
|
- <el-input v-model="basicData.value.createBy" size="small" readonly placeholder="创建人"></el-input>
|
|
|
+ <el-input v-model="basicData.value.createByName" size="small" readonly placeholder="创建人"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="创建时间">
|
|
|
<el-input v-model="basicData.value.createTime" size="small" readonly placeholder="创建时间"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="最后修改人">
|
|
|
- <el-input v-model="basicData.value.updateBy" size="small" readonly placeholder="最后修改人"></el-input>
|
|
|
+ <el-input v-model="basicData.value.updateByName" size="small" readonly placeholder="最后修改人"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="最后修改时间">
|
|
|
<el-input v-model="basicData.value.updateTime" size="small" readonly placeholder="最后修改时间"></el-input>
|
|
@@ -385,16 +385,16 @@
|
|
|
<el-dialog :title="otherDeatils.title" :visible.sync="otherDeatils.show" show-close width="70%"
|
|
|
:before-close="handleCloseOtherDetails" :close-on-press-escape="false" :close-on-click-modal="false"
|
|
|
class="otherDialog">
|
|
|
- <div>
|
|
|
+ <div v-loading="otherDeatils.loading">
|
|
|
<!-- 其他标签页操作 修改、删除 -->
|
|
|
<el-row :gutter="10" class="mb10">
|
|
|
<el-col :span="1.5" v-if="!otherDeatils.isEdit">
|
|
|
<el-button-group>
|
|
|
- <el-button size="small" @click="handleEdit">修改</el-button>
|
|
|
- <el-button size="small" @click="handleDel">删除</el-button>
|
|
|
+ <el-button size="small" @click="handleOtherEdit">修改</el-button>
|
|
|
+ <!-- <el-button size="small" @click="handleOtherDel">删除</el-button> -->
|
|
|
</el-button-group>
|
|
|
<el-button-group>
|
|
|
- <el-button size="small" @click="handleRefresh">刷新</el-button>
|
|
|
+ <el-button size="small" @click="handleOtherRefresh">刷新</el-button>
|
|
|
</el-button-group>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5" v-else>
|
|
@@ -410,8 +410,7 @@
|
|
|
<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-input v-model="basicData.value.orgName" placeholder="所属组织"></el-input></el-form-item> -->
|
|
|
<el-form-item label="物料编码">
|
|
|
<el-input v-model="basicData.value.code" size="small" readonly placeholder="物料编码"></el-input>
|
|
|
</el-form-item>
|
|
@@ -422,8 +421,7 @@
|
|
|
<el-input v-model="basicData.value.enName" size="small" readonly placeholder="英文名称"></el-input>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="版本号">
|
|
|
- <el-input v-model="basicData.value.version" placeholder="版本号"></el-input>
|
|
|
- </el-form-item> -->
|
|
|
+ <el-input v-model="basicData.value.version" placeholder="版本号"></el-input></el-form-item> -->
|
|
|
|
|
|
</el-form>
|
|
|
</el-collapse-item>
|
|
@@ -439,15 +437,15 @@
|
|
|
<template v-if="f.show">
|
|
|
<!-- 多选框 -->
|
|
|
<el-form-item v-if="f.attribute == 'checkbox'" style="text-align: left;" class="od-msg-checkedbx">
|
|
|
- <el-checkbox :label="f.name" name="type" v-model="otherDeatils.value[f.prop]"
|
|
|
- :disabled="!(otherDeatils.isEdit && f.edit)">
|
|
|
+ <el-checkbox :label="f.name" name="type" v-model="otherDeatils.value[f.prop]" true-label="0"
|
|
|
+ false-label="2" :disabled="!(otherDeatils.isEdit && f.edit)">
|
|
|
</el-checkbox>
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- 下拉框 -->
|
|
|
<el-form-item v-else-if="f.attribute == 'select'" :label="f.name">
|
|
|
|
|
|
- <el-select v-model="otherDeatils.value[`${f.prop}Label`]" :placeholder="f.name"
|
|
|
+ <el-select v-model="otherDeatils.value[`${f.prop}Name`]" :placeholder="f.name"
|
|
|
:key="otherDeatils.value[f.prop]" :disabled="!(otherDeatils.isEdit && f.edit)"
|
|
|
@focus="f.apiUrl && handleQueryMore(f, '', { name: 'otherDeatils', prop: f.prop })">
|
|
|
|
|
@@ -485,13 +483,13 @@
|
|
|
<div class="md-auditInfo">
|
|
|
<el-form :inline="true" label-position="right" :model="basicData.value">
|
|
|
<el-form-item label="创建人">
|
|
|
- <el-input v-model="basicData.value.createBy" size="small" readonly placeholder="创建人"></el-input>
|
|
|
+ <el-input v-model="basicData.value.createByName" size="small" readonly placeholder="创建人"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="创建时间">
|
|
|
<el-input v-model="basicData.value.createTime" size="small" readonly placeholder="创建时间"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="最后修改人">
|
|
|
- <el-input v-model="basicData.value.updateBy" size="small" readonly placeholder="最后修改人"></el-input>
|
|
|
+ <el-input v-model="basicData.value.updateByName" size="small" readonly placeholder="最后修改人"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="最后修改时间">
|
|
|
<el-input v-model="basicData.value.updateTime" size="small" readonly placeholder="最后修改时间"></el-input>
|
|
@@ -625,7 +623,7 @@ export default {
|
|
|
// 副信息
|
|
|
viceMsg: {
|
|
|
form: [],
|
|
|
- value: []
|
|
|
+ value: [],
|
|
|
},
|
|
|
// 操作弹窗
|
|
|
optionDialog: {
|
|
@@ -634,6 +632,7 @@ export default {
|
|
|
},
|
|
|
// 其他页签操作弹窗
|
|
|
otherDeatils: {
|
|
|
+ loading: false,
|
|
|
show: false,
|
|
|
title: '',
|
|
|
// 查询关键字-物料id
|
|
@@ -720,42 +719,42 @@ export default {
|
|
|
case 'material_finance':
|
|
|
this.getTagList('material_finance', (form) => {
|
|
|
this.mainMsg.form = form;
|
|
|
- this.getFinanceList('');
|
|
|
+ this.getFinanceList(this.materialId);
|
|
|
});
|
|
|
break;
|
|
|
// 利润中心信息
|
|
|
case 'profit_center':
|
|
|
this.getTagList('profit_center', (form) => {
|
|
|
this.mainMsg.form = form;
|
|
|
- this.getCenterList('');
|
|
|
+ this.getCenterList(this.materialId);
|
|
|
});
|
|
|
break;
|
|
|
// 采购信息
|
|
|
case 'material_purchase':
|
|
|
this.getTagList('material_purchase', (form) => {
|
|
|
this.mainMsg.form = form;
|
|
|
- this.getPurchaseList();
|
|
|
+ this.getPurchaseList(this.materialId);
|
|
|
});
|
|
|
break;
|
|
|
// 库存信息
|
|
|
case 'material_inventory':
|
|
|
this.getTagList('material_inventory', (form) => {
|
|
|
this.mainMsg.form = form;
|
|
|
- this.getInventoryList();
|
|
|
+ this.getInventoryList(this.materialId);
|
|
|
});
|
|
|
break;
|
|
|
// 计划信息
|
|
|
case 'material_plan':
|
|
|
this.getTagList('material_plan', (form) => {
|
|
|
this.mainMsg.form = form;
|
|
|
- this.getPlanList('');
|
|
|
+ this.getPlanList(this.materialId);
|
|
|
});
|
|
|
break;
|
|
|
// 成本信息
|
|
|
case 'material_cost':
|
|
|
this.getTagList('material_cost', (form) => {
|
|
|
this.mainMsg.form = form;
|
|
|
- this.getCostList('');
|
|
|
+ this.getCostList(this.materialId);
|
|
|
});
|
|
|
break;
|
|
|
default: break;
|
|
@@ -872,6 +871,7 @@ export default {
|
|
|
id,
|
|
|
templateCode,
|
|
|
).then(res => {
|
|
|
+ this.loading = false;
|
|
|
console.log(res, '物料基本信息');
|
|
|
let { code, data } = res;
|
|
|
if (code == 200) {
|
|
@@ -879,59 +879,59 @@ export default {
|
|
|
_this.basicData.value = data.data;
|
|
|
// this.basicData.form = data.form;
|
|
|
|
|
|
- _this.handleAddReferLabel('basicData');
|
|
|
+ // _this.handleAddReferLabel('basicData');
|
|
|
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 添加参照中的label
|
|
|
- handleAddReferLabel(dataName) {
|
|
|
- let _this = this;
|
|
|
- this[dataName].form.map(item => {
|
|
|
- // 查参照
|
|
|
- if (item.apiUrl && item.apiUrl != '') {
|
|
|
+ // handleAddReferLabel(dataName) {
|
|
|
+ // let _this = this;
|
|
|
+ // this[dataName].form.map(item => {
|
|
|
+ // // 查参照
|
|
|
+ // if (item.apiUrl && item.apiUrl != '') {
|
|
|
|
|
|
- let param = {};
|
|
|
+ // let param = {};
|
|
|
|
|
|
- if (item.relevance && item.relevance != '') {
|
|
|
- let reList = item.relevance.split(',');
|
|
|
- console.log(reList, 'reList-------------------');
|
|
|
- reList.forEach(i => {
|
|
|
- param[i] = this.basicData.value[i]
|
|
|
- })
|
|
|
- console.log(param, 'param/////////////////////////');
|
|
|
- }
|
|
|
+ // if (item.relevance && item.relevance != '') {
|
|
|
+ // let reList = item.relevance.split(',');
|
|
|
+ // console.log(reList, 'reList-------------------');
|
|
|
+ // reList.forEach(i => {
|
|
|
+ // param[i] = this.basicData.value[i]
|
|
|
+ // })
|
|
|
+ // console.log(param, 'param/////////////////////////');
|
|
|
+ // }
|
|
|
|
|
|
- _this.getExecuteMethods(item.apiUrl, param, (data) => {
|
|
|
- let { tableBody } = data;
|
|
|
+ // _this.getExecuteMethods(item.apiUrl, param, (data) => {
|
|
|
+ // let { tableBody } = data;
|
|
|
|
|
|
- // 维护物料类别 --- 属于列表中获取label
|
|
|
- if (dataName == 'materialType') {
|
|
|
+ // // 维护物料类别 --- 属于列表中获取label
|
|
|
+ // if (dataName == 'materialType') {
|
|
|
|
|
|
- _this[dataName].value.length && (_this[dataName].value = _this[dataName].value.map(d => {
|
|
|
+ // _this[dataName].value.length && (_this[dataName].value = _this[dataName].value.map(d => {
|
|
|
|
|
|
- let Blabel = tableBody.filter((t) => t.id == d[item.prop])[0];
|
|
|
- console.log(Blabel, 'Blabel``````````````````````````');
|
|
|
- d[`${item.prop}Label`] = (Blabel && Blabel.name) || Blabel || '';
|
|
|
- return d;
|
|
|
- }))
|
|
|
+ // let Blabel = tableBody.filter((t) => t.id == d[item.prop])[0];
|
|
|
+ // console.log(Blabel, 'Blabel``````````````````````````');
|
|
|
+ // d[`${item.prop}Label`] = (Blabel && Blabel.name) || Blabel || '';
|
|
|
+ // return d;
|
|
|
+ // }))
|
|
|
|
|
|
- } else {
|
|
|
+ // } else {
|
|
|
|
|
|
- let Blabel = tableBody.filter((t) => t.id == _this[dataName].value[item.prop])[0];
|
|
|
- console.log(Blabel, 'Blabel``````````````````````````');
|
|
|
- _this[dataName].value[`${item.prop}Label`] = (Blabel && Blabel.name) || Blabel || '';
|
|
|
- }
|
|
|
+ // let Blabel = tableBody.filter((t) => t.id == _this[dataName].value[item.prop])[0];
|
|
|
+ // console.log(Blabel, 'Blabel``````````````````````````');
|
|
|
+ // _this[dataName].value[`${item.prop}Label`] = (Blabel && Blabel.name) || Blabel || '';
|
|
|
+ // }
|
|
|
|
|
|
- // this.count++;
|
|
|
- this.loading = false;
|
|
|
- console.log(_this[dataName].value, `${dataName}//////////////////////`);
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- this.materialType.loading = false;
|
|
|
+ // // this.count++;
|
|
|
+ // this.loading = false;
|
|
|
+ // console.log(_this[dataName].value, `${dataName}//////////////////////`);
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // this.materialType.loading = false;
|
|
|
|
|
|
- },
|
|
|
+ // },
|
|
|
|
|
|
|
|
|
// 查询财务信息列表
|
|
@@ -939,8 +939,7 @@ export default {
|
|
|
materialApi.financeList({ materialId }).then(res => {
|
|
|
console.log(res, '查询财务信息列表');
|
|
|
if (res.code == 200) {
|
|
|
- this.mainMsg.value = res.rows;
|
|
|
-
|
|
|
+ this.mainMsg.value = res.data.tableBody.rows;
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -995,7 +994,7 @@ export default {
|
|
|
console.log(type, id, '查询其他标签页列表详情');
|
|
|
this.otherDeatils.form = this.mainMsg.form;
|
|
|
console.log(this.otherDeatils.form, 'this.otherDeatils.form');
|
|
|
-
|
|
|
+ this.otherDeatils.loading = true;
|
|
|
switch (type) {
|
|
|
// 财物信息
|
|
|
case 'material_finance':
|
|
@@ -1027,33 +1026,36 @@ export default {
|
|
|
// 查询财务信息详情
|
|
|
getFinanceDetails(id) {
|
|
|
materialApi.financeDetails(id).then(res => {
|
|
|
+ this.otherDeatils.loading = false;
|
|
|
let _this = this;
|
|
|
console.log('查询财务信息详情', res);
|
|
|
if (res.code == 200) {
|
|
|
this.otherDeatils.value = res.data.data;
|
|
|
- _this.handleAddReferLabel('otherDeatils');
|
|
|
+ // _this.handleAddReferLabel('otherDeatils');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 获取利润中心详情
|
|
|
- getCenterDetails(materialId) {
|
|
|
+ getCenterDetails(id) {
|
|
|
let _this = this;
|
|
|
- materialApi.centerDetails(materialId).then(res => {
|
|
|
+ materialApi.centerDetails(id).then(res => {
|
|
|
+ this.otherDeatils.loading = false;
|
|
|
console.log(res, '获取利润中心详情');
|
|
|
if (res.code == 200) {
|
|
|
this.otherDeatils.value = res.data.data;
|
|
|
- _this.handleAddReferLabel('otherDeatils');
|
|
|
+ // _this.handleAddReferLabel('otherDeatils');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 获取采购详细信息详情
|
|
|
- getPurchaseDetails(materialId) {
|
|
|
+ getPurchaseDetails(id) {
|
|
|
let _this = this;
|
|
|
- materialApi.purchaseDetails(materialId).then(res => {
|
|
|
+ materialApi.purchaseDetails(id).then(res => {
|
|
|
+ this.otherDeatils.loading = false;
|
|
|
console.log(res, '获取采购详细信息详情');
|
|
|
if (res.code == 200) {
|
|
|
this.otherDeatils.value = res.data.data;
|
|
|
- _this.handleAddReferLabel('otherDeatils');
|
|
|
+ // _this.handleAddReferLabel('otherDeatils');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1061,10 +1063,11 @@ export default {
|
|
|
getCostDetails(id) {
|
|
|
let _this = this;
|
|
|
materialApi.costDetails(id).then(res => {
|
|
|
+ this.otherDeatils.loading = false;
|
|
|
console.log(res, '获取成本信息详情');
|
|
|
if (res.code == 200) {
|
|
|
this.otherDeatils.value = res.data.data;
|
|
|
- _this.handleAddReferLabel('otherDeatils');
|
|
|
+ // _this.handleAddReferLabel('otherDeatils');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1072,21 +1075,23 @@ export default {
|
|
|
getPlanDetails(id) {
|
|
|
let _this = this;
|
|
|
materialApi.planDetails(id).then(res => {
|
|
|
+ this.otherDeatils.loading = false;
|
|
|
console.log(res, '获取计划信息详情');
|
|
|
if (res.code == 200) {
|
|
|
this.otherDeatils.value = res.data.data;
|
|
|
- _this.handleAddReferLabel('otherDeatils');
|
|
|
+ // _this.handleAddReferLabel('otherDeatils');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 获取库存详细信息详情
|
|
|
- getInventoryDetails(materialId) {
|
|
|
+ getInventoryDetails(id) {
|
|
|
let _this = this;
|
|
|
- materialApi.inventoryDetails(materialId).then(res => {
|
|
|
+ materialApi.inventoryDetails(id).then(res => {
|
|
|
+ this.otherDeatils.loading = false;
|
|
|
console.log(res, '获取库存详细信息详情');
|
|
|
if (res.code == 200) {
|
|
|
this.otherDeatils.value = res.data.data;
|
|
|
- _this.handleAddReferLabel('otherDeatils');
|
|
|
+ // _this.handleAddReferLabel('otherDeatils');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1100,13 +1105,13 @@ export default {
|
|
|
let _this = this;
|
|
|
console.log(id);
|
|
|
materialApi.medcineDetailsInfo(id).then((res) => {
|
|
|
-
|
|
|
+ this.loading = false;
|
|
|
console.log(res, '医药行业');
|
|
|
let { code, data } = res;
|
|
|
if (code == 200) {
|
|
|
_this.medcineData.value = data.data || {};
|
|
|
// this.medcineData.form = data.form;
|
|
|
- _this.handleAddReferLabel('medcineData');
|
|
|
+ // _this.handleAddReferLabel('medcineData');
|
|
|
console.log(' _this.medcineData', _this.medcineData, res);
|
|
|
}
|
|
|
})
|
|
@@ -1192,7 +1197,7 @@ export default {
|
|
|
console.log(res, '根据物料id获取物料类别维护列表');
|
|
|
if (res.code == 200) {
|
|
|
_this.materialType.value = res.data.tableBody.rows;
|
|
|
- _this.handleAddReferLabel('materialType');
|
|
|
+ // _this.handleAddReferLabel('materialType');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1206,7 +1211,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 除基本信息之后的修改
|
|
|
- handleEdit() {
|
|
|
+ handleOtherEdit() {
|
|
|
console.log('除基本信息之后的修改', this.otherDeatils.queryKey);
|
|
|
|
|
|
if ((this.otherDeatils.queryKey && this.otherDeatils.queryKey != '') || this.mainMsg.checkedList.length == 1) {
|
|
@@ -1227,6 +1232,14 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ // 其他标签详情弹窗-刷新
|
|
|
+ handleOtherRefresh() {
|
|
|
+ this.getOtherListDetails(this.activeMainTab, this.otherDeatils.queryKey);
|
|
|
+ },
|
|
|
+ // 其他标签详情弹窗-删除
|
|
|
+ handleOtherDel() {
|
|
|
+
|
|
|
+ },
|
|
|
// 修改
|
|
|
handleBasicEdit() {
|
|
|
console.log('修改基本信息');
|
|
@@ -1242,7 +1255,8 @@ export default {
|
|
|
},
|
|
|
// 删除
|
|
|
handleDel() {
|
|
|
- console.log('删除');
|
|
|
+ console.log('删除----基本信息');
|
|
|
+
|
|
|
},
|
|
|
// 复制
|
|
|
handleCopy() {
|
|
@@ -1314,7 +1328,8 @@ export default {
|
|
|
handleSave() {
|
|
|
console.log('保存修改');
|
|
|
this.handleSaveMaterial(() => {
|
|
|
- this.$router.go(0)
|
|
|
+ this.updateButtonGroup = false;
|
|
|
+ this.handleRefresh();
|
|
|
});
|
|
|
},
|
|
|
// 物料类别列表选中
|
|
@@ -1432,8 +1447,38 @@ export default {
|
|
|
this.optionDialog.op = '修改';
|
|
|
},
|
|
|
// 其他标签页弹窗保存
|
|
|
- handleOtherSave() {
|
|
|
- console.log('其他标签页弹窗保存');
|
|
|
+ async handleOtherSave() {
|
|
|
+ console.log('其他标签页弹窗保存', this.activeMainTab);
|
|
|
+ let data = this.otherDeatils.value;
|
|
|
+ console.log(data, 'params');
|
|
|
+ switch (this.activeMainTab) {
|
|
|
+ // 财物信息
|
|
|
+ case 'material_finance':
|
|
|
+ await this.handleSaveFinance(data);
|
|
|
+ break;
|
|
|
+ // 利润中心信息
|
|
|
+ case 'profit_center':
|
|
|
+ await this.handleSaveCenter(data);
|
|
|
+ break;
|
|
|
+ // 采购信息
|
|
|
+ case 'material_purchase':
|
|
|
+ await this.handleSavePurchase(data);
|
|
|
+ break;
|
|
|
+ // 库存信息
|
|
|
+ case 'material_inventory':
|
|
|
+ await this.handleSaveInventoryEdit(data);
|
|
|
+ break;
|
|
|
+ // 计划信息
|
|
|
+ case 'material_plan':
|
|
|
+ await this.handleSavePlan(data);
|
|
|
+ break;
|
|
|
+ // 成本信息
|
|
|
+ case 'material_cost':
|
|
|
+ await this.handleSaveCost(data);
|
|
|
+ break;
|
|
|
+ default: break;
|
|
|
+ }
|
|
|
+ this.handleOtherRefresh();
|
|
|
},
|
|
|
// 其他页签详情弹窗关闭事件
|
|
|
handleCloseOtherDetails(done) {
|
|
@@ -1476,9 +1521,9 @@ export default {
|
|
|
// 参照弹窗过滤
|
|
|
handleFilterRefer() {
|
|
|
// this.MoreDataDialog.key =
|
|
|
- console.log(this.MoreDataDialog.key, '查询关键字');
|
|
|
+ console.log(this.MoreDataDialog.key, '查询关键字', this.MoreDataDialog.target);
|
|
|
|
|
|
- this.handleQueryMore(this.MoreDataDialog.msg, this.MoreDataDialog.key);
|
|
|
+ this.handleQueryMore(this.MoreDataDialog.msg, this.MoreDataDialog.key, this.MoreDataDialog.target);
|
|
|
|
|
|
},
|
|
|
// 操作提示弹窗关闭
|
|
@@ -1506,33 +1551,42 @@ export default {
|
|
|
// 基本信息
|
|
|
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`], '//////////基本信息///////////');
|
|
|
+ // this.basicData.value[`${this.MoreDataDialog.target.prop}Label`] = this.MoreDataDialog.value.name;
|
|
|
+ this.basicData.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
|
|
|
+
|
|
|
+ console.log(this.MoreDataDialog.target.prop, 'props-----------------', this.MoreDataDialog.value);
|
|
|
+
|
|
|
+ console.log(this.basicData.value[`${this.MoreDataDialog.target.prop}`], '值', this.basicData.value[`${this.MoreDataDialog.target.prop}Name`], '//////////基本信息///////////');
|
|
|
|
|
|
} else if (this.MoreDataDialog.target.name == 'medcineData') {
|
|
|
- console.log('this.MoreDataDialog.value', this.MoreDataDialog.value, this.MoreDataDialog.target.prop, this.medcineData);
|
|
|
- if (this.MoreDataDialog.target.prop === 'dosageFrom')
|
|
|
- this.medcineData.form = this.medcineData.form.map((item) => {
|
|
|
- if (item.prop === "dosageFrom") item.dictValue = [{ dictLabel: this.MoreDataDialog.value.name, dictValue: this.MoreDataDialog.value.id }]
|
|
|
- return item
|
|
|
- })
|
|
|
+ // console.log('this.MoreDataDialog.value', this.MoreDataDialog.value, this.MoreDataDialog.target.prop, this.medcineData);
|
|
|
+ // if (this.MoreDataDialog.target.prop === 'dosageFrom')
|
|
|
+ // this.medcineData.form = this.medcineData.form.map((item) => {
|
|
|
+ // if (item.prop === "dosageFrom") item.dictValue = [{ dictLabel: this.MoreDataDialog.value.name, dictValue: this.MoreDataDialog.value.id }]
|
|
|
+ // return item
|
|
|
+ // })
|
|
|
// 医药信息
|
|
|
this.medcineData.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
|
|
|
|
|
|
- this.medcineData.value[`${this.MoreDataDialog.target.prop}Label`] = this.MoreDataDialog.value.name;
|
|
|
+ // this.medcineData.value[`${this.MoreDataDialog.target.prop}Label`] = this.MoreDataDialog.value.name;
|
|
|
+ this.medcineData.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
|
|
|
+
|
|
|
+ console.log(this.MoreDataDialog.target.prop, 'props-----------------', this.MoreDataDialog.value);
|
|
|
|
|
|
- console.log(this.medcineData.value[`${this.MoreDataDialog.target.prop}Label`], '//////医药信息//////////');
|
|
|
+ console.log(this.medcineData.value[`${this.MoreDataDialog.target.prop}Name`], '//////医药信息//////////');
|
|
|
|
|
|
} 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;
|
|
|
+ // this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Label`] = this.MoreDataDialog.value.name;
|
|
|
+ this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
|
|
|
|
|
|
- console.log(this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Label`], '/////////其他页签///////');
|
|
|
+ console.log(this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Name`], '/////////其他页签///////');
|
|
|
|
|
|
}
|
|
|
+ this.count++;
|
|
|
this.MoreDataDialog.show = false;
|
|
|
},
|
|
|
// 取消-关闭参照弹窗
|
|
@@ -1563,6 +1617,60 @@ export default {
|
|
|
if (res.code == 200) cb();
|
|
|
})
|
|
|
},
|
|
|
+ // 保存财务信息——单个数据
|
|
|
+ handleSaveFinance(data) {
|
|
|
+ console.log(data, '保存财务信息——单个数据');
|
|
|
+ materialApi.financeEdit(data).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.otherDeatils.isEdit = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 保存利润中心信息
|
|
|
+ handleSaveCenter(data) {
|
|
|
+ console.log(data, '保存利润中心信息');
|
|
|
+ materialApi.centerEdit(data).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.otherDeatils.isEdit = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 保存采购信息
|
|
|
+ handleSavePurchase(data) {
|
|
|
+ console.log(data, '保存采购信息');
|
|
|
+ materialApi.purchaseEdit(data).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.otherDeatils.isEdit = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 保存库存信息
|
|
|
+ handleSaveInventoryEdit(data) {
|
|
|
+ console.log(data, '保存库存信息');
|
|
|
+ materialApi.inventoryEdit(data).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.otherDeatils.isEdit = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 保存计划信息
|
|
|
+ handleSavePlan(data) {
|
|
|
+ console.log(data, '保存计划信息');
|
|
|
+ materialApi.planEdit(data).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.otherDeatils.isEdit = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 保存成本信息
|
|
|
+ handleSaveCost(data) {
|
|
|
+ console.log(data, '保存成本信息');
|
|
|
+ materialApi.costEdit(data).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.otherDeatils.isEdit = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
|
|
|
// 重新加载
|
|
@@ -1581,6 +1689,7 @@ export default {
|
|
|
this.medcineData.form = form;
|
|
|
this.getMedcineDetails(this.materialId, 'material_medcine');
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
@@ -1610,6 +1719,10 @@ export default {
|
|
|
padding: 12px;
|
|
|
overflow-y: auto;
|
|
|
overflow-x: auto;
|
|
|
+
|
|
|
+ .el-select {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.md-content {
|
|
@@ -1622,10 +1735,17 @@ export default {
|
|
|
|
|
|
.md-main {
|
|
|
// height: calc(100vh - 625px);
|
|
|
- max-height: 160px;
|
|
|
margin-bottom: 10px;
|
|
|
- overflow-y: auto;
|
|
|
- overflow-x: hidden;
|
|
|
+
|
|
|
+ .el-form {
|
|
|
+ max-height: 200px;
|
|
|
+ overflow-y: auto;
|
|
|
+ overflow-x: hidden;
|
|
|
+
|
|
|
+ .el-checkbox {
|
|
|
+ padding: 0 58%;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.md-vice-content {
|
|
@@ -1650,6 +1770,13 @@ export default {
|
|
|
padding-bottom: 12px;
|
|
|
}
|
|
|
|
|
|
+ .el-form {
|
|
|
+ .el-checkbox {
|
|
|
+ width: 100%;
|
|
|
+ padding: 0 10%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.el-dialog__body {
|
|
|
padding: 12px 20px;
|
|
|
height: 80%;
|