|
@@ -8,10 +8,10 @@
|
|
|
<!-- 新增、修改、删除、复制 -->
|
|
|
<el-col :span="1.5">
|
|
|
<el-button-group>
|
|
|
- <el-button size="small" @click="handleInster">新增</el-button>
|
|
|
+ <!-- <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="handleCopy">复制</el-button>
|
|
|
+ <!-- <el-button size="small" @click="handleDel">删除</el-button> -->
|
|
|
+ <!-- <el-button size="small" @click="handleCopy">复制</el-button> -->
|
|
|
</el-button-group>
|
|
|
</el-col>
|
|
|
|
|
@@ -19,7 +19,7 @@
|
|
|
<el-col :span="1.5">
|
|
|
<el-button-group>
|
|
|
|
|
|
- <el-dropdown size="small" @command="handleFilter">
|
|
|
+ <!-- <el-dropdown size="small" @command="handleFilter">
|
|
|
<el-button size="small">
|
|
|
过滤<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
@@ -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,24 +49,24 @@
|
|
|
<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>
|
|
|
|
|
|
<!-- 申请单查询 -->
|
|
|
- <el-col :span="1.5">
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
<el-button-group>
|
|
|
<el-button size="small" @click="handleQueryForm">申请单查询</el-button>
|
|
|
</el-button-group>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
|
|
|
<!-- 导入导出 -->
|
|
|
- <el-col :span="1.5">
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
<el-button-group>
|
|
|
<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>
|
|
|
|
|
@@ -75,8 +75,8 @@
|
|
|
<el-col :span="1.5">
|
|
|
<el-button-group>
|
|
|
<el-button size="small" @click="handleSave">保存</el-button>
|
|
|
- <el-button size="small" @click="handleSaveAdd" :disabled="true">保存新增</el-button>
|
|
|
- <el-button size="small" @click="handleUpdateImport">更新导入</el-button>
|
|
|
+ <!-- <el-button size="small" @click="handleSaveAdd" :disabled="true">保存新增</el-button> -->
|
|
|
+ <!-- <el-button size="small" @click="handleUpdateImport">更新导入</el-button> -->
|
|
|
</el-button-group>
|
|
|
</el-col>
|
|
|
|
|
@@ -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>
|
|
@@ -110,12 +110,12 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6" style="text-align: right;">
|
|
|
<!-- 附件管理 -->
|
|
|
- <el-button-group>
|
|
|
+ <!-- <el-button-group>
|
|
|
<el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button>
|
|
|
- </el-button-group>
|
|
|
+ </el-button-group> -->
|
|
|
|
|
|
<!-- 切换 -->
|
|
|
- <el-button-group>
|
|
|
+ <!-- <el-button-group>
|
|
|
<el-button size="small" icon="el-icon-d-arrow-left" :disabled="!handleBasicEdit"
|
|
|
@click="handleChangePage('first')" />
|
|
|
<el-button size="small" icon="el-icon-arrow-left" :disabled="!handleBasicEdit"
|
|
@@ -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>
|
|
|
|
|
@@ -162,7 +162,7 @@
|
|
|
<!-- 多选框 -->
|
|
|
<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]"
|
|
|
- :disabled="!updateButtonGroup">
|
|
|
+ :disabled="!(updateButtonGroup && f.edit)">
|
|
|
</el-checkbox>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -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"
|
|
|
- :key="basicData.value[f.prop]" :disabled="!updateButtonGroup"
|
|
|
+ <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>
|
|
@@ -191,7 +191,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'"
|
|
|
- :readonly="!updateButtonGroup" :placeholder="f.name">
|
|
|
+ :readonly="!(updateButtonGroup && f.edit)" :placeholder="f.name">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
@@ -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 })">
|
|
|
|
|
@@ -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>
|
|
@@ -411,7 +411,7 @@
|
|
|
<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>
|
|
@@ -423,7 +423,7 @@
|
|
|
</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>
|
|
@@ -439,15 +439,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 +485,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 +625,7 @@ export default {
|
|
|
// 副信息
|
|
|
viceMsg: {
|
|
|
form: [],
|
|
|
- value: []
|
|
|
+ value: [],
|
|
|
},
|
|
|
// 操作弹窗
|
|
|
optionDialog: {
|
|
@@ -634,6 +634,7 @@ export default {
|
|
|
},
|
|
|
// 其他页签操作弹窗
|
|
|
otherDeatils: {
|
|
|
+ loading: false,
|
|
|
show: false,
|
|
|
title: '',
|
|
|
// 查询关键字-物料id
|
|
@@ -720,42 +721,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;
|
|
@@ -789,7 +790,7 @@ export default {
|
|
|
this.getTagList('material_property', (form) => {
|
|
|
|
|
|
this.propertyDetail.form = form;
|
|
|
- this.getPropertyList('');
|
|
|
+ this.getPropertyList(this.materialId);
|
|
|
});
|
|
|
break;
|
|
|
|
|
@@ -872,6 +873,7 @@ export default {
|
|
|
id,
|
|
|
templateCode,
|
|
|
).then(res => {
|
|
|
+ this.loading = false;
|
|
|
console.log(res, '物料基本信息');
|
|
|
let { code, data } = res;
|
|
|
if (code == 200) {
|
|
@@ -879,59 +881,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 +941,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 +996,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 +1028,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 +1065,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 +1077,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 +1107,14 @@ 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);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1120,8 +1128,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 查询物料辅助属性列表+表头字段
|
|
|
- getPropertyList() {
|
|
|
- materialApi.propertyList().then(res => {
|
|
|
+ getPropertyList(materialId) {
|
|
|
+ materialApi.propertyList({ materialId }).then(res => {
|
|
|
console.log(res, '料辅助属性列表');
|
|
|
if (res.code == 200) {
|
|
|
this.propertyDetail.value = res.data.data || [];
|
|
@@ -1191,14 +1199,12 @@ export default {
|
|
|
console.log(res, '根据物料id获取物料类别维护列表');
|
|
|
if (res.code == 200) {
|
|
|
_this.materialType.value = res.data.tableBody.rows;
|
|
|
- _this.handleAddReferLabel('materialType');
|
|
|
+ // _this.handleAddReferLabel('materialType');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
// 新增
|
|
|
handleInster() {
|
|
|
this.$message({
|
|
@@ -1207,7 +1213,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 除基本信息之后的修改
|
|
|
- handleEdit() {
|
|
|
+ handleOtherEdit() {
|
|
|
console.log('除基本信息之后的修改', this.otherDeatils.queryKey);
|
|
|
|
|
|
if ((this.otherDeatils.queryKey && this.otherDeatils.queryKey != '') || this.mainMsg.checkedList.length == 1) {
|
|
@@ -1228,6 +1234,14 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ // 其他标签详情弹窗-刷新
|
|
|
+ handleOtherRefresh() {
|
|
|
+ this.getOtherListDetails(this.activeMainTab, this.otherDeatils.queryKey);
|
|
|
+ },
|
|
|
+ // 其他标签详情弹窗-删除
|
|
|
+ handleOtherDel() {
|
|
|
+
|
|
|
+ },
|
|
|
// 修改
|
|
|
handleBasicEdit() {
|
|
|
console.log('修改基本信息');
|
|
@@ -1243,7 +1257,8 @@ export default {
|
|
|
},
|
|
|
// 删除
|
|
|
handleDel() {
|
|
|
- console.log('删除');
|
|
|
+ console.log('删除----基本信息');
|
|
|
+
|
|
|
},
|
|
|
// 复制
|
|
|
handleCopy() {
|
|
@@ -1315,7 +1330,8 @@ export default {
|
|
|
handleSave() {
|
|
|
console.log('保存修改');
|
|
|
this.handleSaveMaterial(() => {
|
|
|
- this.$router.go(0)
|
|
|
+ this.updateButtonGroup = false;
|
|
|
+ this.handleRefresh();
|
|
|
});
|
|
|
},
|
|
|
// 物料类别列表选中
|
|
@@ -1433,8 +1449,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) {
|
|
@@ -1477,9 +1523,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);
|
|
|
|
|
|
},
|
|
|
// 操作提示弹窗关闭
|
|
@@ -1507,28 +1553,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;
|
|
|
|
|
|
- } else if (this.MoreDataDialog.target.name == 'medcineData') {
|
|
|
+ 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
|
|
|
+ // })
|
|
|
// 医药信息
|
|
|
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;
|
|
|
},
|
|
|
// 取消-关闭参照弹窗
|
|
@@ -1559,6 +1619,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;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
|
|
|
// 重新加载
|
|
@@ -1571,9 +1685,13 @@ export default {
|
|
|
})
|
|
|
// 医疗行业
|
|
|
await this.getTagList('material_medcine', (form) => {
|
|
|
+ form.forEach((item) => {
|
|
|
+ this.medcineData.value[item.prop] = ''
|
|
|
+ })
|
|
|
this.medcineData.form = form;
|
|
|
this.getMedcineDetails(this.materialId, 'material_medcine');
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
@@ -1588,7 +1706,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
-
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -1602,6 +1719,12 @@ export default {
|
|
|
height: calc(100vh - 160px);
|
|
|
box-sizing: border-box;
|
|
|
padding: 12px;
|
|
|
+ overflow-y: auto;
|
|
|
+ overflow-x: auto;
|
|
|
+
|
|
|
+ .el-select {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.md-content {
|
|
@@ -1613,11 +1736,18 @@ export default {
|
|
|
overflow: auto;
|
|
|
|
|
|
.md-main {
|
|
|
- height: calc(100vh - 625px);
|
|
|
- // max-height: 290px;
|
|
|
+ // height: calc(100vh - 625px);
|
|
|
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 {
|
|
@@ -1642,6 +1772,13 @@ export default {
|
|
|
padding-bottom: 12px;
|
|
|
}
|
|
|
|
|
|
+ .el-form {
|
|
|
+ .el-checkbox {
|
|
|
+ width: 100%;
|
|
|
+ padding: 0 10%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.el-dialog__body {
|
|
|
padding: 12px 20px;
|
|
|
height: 80%;
|