|
@@ -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>
|
|
@@ -41,15 +41,14 @@
|
|
|
<el-button size="small" @click="handleMaterialType">维护物料类别</el-button>
|
|
|
<el-button size="small" @click="handleIsInvoke" :key="count">
|
|
|
<!-- 0:启用 2:停用 -->
|
|
|
- {{ basicData.value.isEnable == '0' ? '停用' : '启用' }}
|
|
|
+ {{ basicData.value.isEnable == '已启用' ? '停用' : '启用' }}
|
|
|
</el-button>
|
|
|
<!-- <el-dropdown split-button size="small" @click="handleIsInvoke(true)" @command="handleIsInvoke">
|
|
|
启用
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<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-menu></el-dropdown> -->
|
|
|
</el-button-group>
|
|
|
</el-col>
|
|
|
|
|
@@ -58,7 +57,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 +65,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>
|
|
|
|
|
@@ -93,7 +92,7 @@
|
|
|
<el-col :span="1.5">
|
|
|
<el-button-group>
|
|
|
<el-button size="small" @click="handleOtherEdit">修改</el-button>
|
|
|
- <!-- <el-button size="small" @click="handleOtherDel">删除</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 +111,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 +123,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>
|
|
|
|
|
@@ -163,30 +162,38 @@
|
|
|
<!-- 多选框 -->
|
|
|
<el-form-item v-if="f.attribute == 'checkbox'" style="text-align: left;"
|
|
|
:rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]" :prop="f.prop">
|
|
|
+
|
|
|
<el-checkbox :label="f.name" name="type" v-model="basicData.value[f.prop]" true-label="0"
|
|
|
false-label="2" :disabled="handleJudge(f)">
|
|
|
</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'"
|
|
|
:id="(updateButtonGroup && f.apiUrl) ? 'selected' : ''"
|
|
|
:prop="f.apiUrl ? `${f.prop}Name` : f.prop"
|
|
|
:rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]">
|
|
|
|
|
|
+ <template slot="label">
|
|
|
+ <el-tooltip class="item" effect="dark" placement="top-start" :disabled="f.name.length < 10">
|
|
|
+ <span>{{ f.name }}</span>
|
|
|
+ <div slot="content">
|
|
|
+ <p>{{ f.name }}</p>
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+
|
|
|
<el-select v-if="f.apiUrl" v-model="basicData.value[`${f.prop}Name`]" :placeholder="f.name"
|
|
|
:key="basicData.value[f.prop]" :disabled="handleJudge(f)"
|
|
|
@focus="f.apiUrl && handleQueryMore(f, '', { name: 'basicData', prop: f.prop })">
|
|
|
- <!-- <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>
|
|
|
</el-select>
|
|
|
|
|
|
- <el-select v-else v-model="basicData.value[f.prop]" :placeholder="f.name"
|
|
|
- :key="basicData.value[f.prop]" :disabled="handleJudge(f)"
|
|
|
- @focus="f.apiUrl && handleQueryMore(f, '', { name: 'basicData', prop: f.prop })">
|
|
|
- <el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictCode" :label="d.dictLabel"
|
|
|
- :value="d.dictCode">
|
|
|
+
|
|
|
+ <el-select v-if="f.dictId" v-model="basicData.value[f.prop]" :placeholder="f.name"
|
|
|
+ :key="basicData.value[f.prop]" :disabled="handleJudge(f)">
|
|
|
+ <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>
|
|
|
|
|
@@ -200,8 +207,18 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<!--attribute 文本 数字 文本域 为null -->
|
|
|
- <el-form-item v-else :label="f.name" :prop="f.prop"
|
|
|
+ <el-form-item v-else :prop="f.prop"
|
|
|
:rules="[{ required: f.required, message: `请输入${f.name}`, trigger: 'blur' }]">
|
|
|
+
|
|
|
+ <template slot="label">
|
|
|
+ <el-tooltip class="item" effect="dark" placement="top-start" :disabled="f.name.length < 10">
|
|
|
+ <span>{{ f.name }}</span>
|
|
|
+ <div slot="content">
|
|
|
+ <p>{{ f.name }}</p>
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+
|
|
|
<el-input size="small" v-model="basicData.value[f.prop]" :type="f.attribute || 'text'"
|
|
|
:readonly="handleJudge(f)" :placeholder="f.name">
|
|
|
</el-input>
|
|
@@ -219,7 +236,15 @@
|
|
|
<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.attribute == 'select' ? `${m.prop}Name` : m.prop" show-overflow-tooltip />
|
|
|
+ :prop="m.attribute == 'select' ? `${m.prop}Name` : m.prop" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ m.attribute == 'select' ? scope.row[`${m.prop}Name`] :
|
|
|
+ (m.attribute == 'checkbox' ?
|
|
|
+ (scope.row[m.prop] == '0' ? '是' : '否')
|
|
|
+ : scope.row[m.prop])
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
</div>
|
|
@@ -258,7 +283,7 @@
|
|
|
@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> -->
|
|
|
+ :label="d.dictLabel" :value="d.dictValue"></el-option> -->
|
|
|
|
|
|
<div slot="empty"></div>
|
|
|
</el-select>
|
|
@@ -303,7 +328,15 @@
|
|
|
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.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip />
|
|
|
+ :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ v.attribute == 'select' ? scope.row[`${v.prop}Name`] :
|
|
|
+ (v.attribute == 'checkbox' ?
|
|
|
+ (scope.row[v.prop] == '0' ? '是' : '否')
|
|
|
+ : scope.row[v.prop])
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 辅助属性 -->
|
|
@@ -311,7 +344,15 @@
|
|
|
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.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip />
|
|
|
+ :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ v.attribute == 'select' ? scope.row[`${v.prop}Name`] :
|
|
|
+ (v.attribute == 'checkbox' ?
|
|
|
+ (scope.row[v.prop] == '0' ? '是' : '否')
|
|
|
+ : scope.row[v.prop])
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
</template>
|
|
@@ -394,7 +435,7 @@
|
|
|
<el-option v-if="mt.dictId" v-for="d in mt.dictId" :key="d.dictValue" :label="d.dictLabel"
|
|
|
:value="d.dictValue">
|
|
|
</el-option>
|
|
|
- </el-select> -->
|
|
|
+ </el-select> -->
|
|
|
|
|
|
<!-- 其他类型 -->
|
|
|
|
|
@@ -446,7 +487,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>
|
|
@@ -457,7 +498,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>
|
|
@@ -1322,7 +1363,43 @@ export default {
|
|
|
},
|
|
|
// 其他标签详情弹窗-删除
|
|
|
handleOtherDel() {
|
|
|
- console.log(`${this.activeMainTab}其他标签详情弹窗-删除`, this.mainMsg.checkedList);
|
|
|
+ let ids = this.mainMsg.checkedList.map(i => i.id);
|
|
|
+
|
|
|
+ console.log(`${this.activeMainTab}其他标签详情弹窗-删除---id合集`, ids);
|
|
|
+ if (ids.length) {
|
|
|
+ switch (this.activeMainTab) {
|
|
|
+ // 财物信息
|
|
|
+ case 'material_finance':
|
|
|
+ this.handleDelFinance(ids);
|
|
|
+ break;
|
|
|
+ // 利润中心信息
|
|
|
+ case 'profit_center':
|
|
|
+ this.handledDelCenter(ids);
|
|
|
+ break;
|
|
|
+ // 采购信息
|
|
|
+ case 'material_purchase':
|
|
|
+ this.handledelPurchase(ids);
|
|
|
+ break;
|
|
|
+ // 库存信息
|
|
|
+ case 'material_inventory':
|
|
|
+ this.handleDelInventory(ids);
|
|
|
+ break;
|
|
|
+ // 计划信息
|
|
|
+ case 'material_plan':
|
|
|
+ this.handleDelPlan(ids);
|
|
|
+ break;
|
|
|
+ // 成本信息
|
|
|
+ case 'material_cost':
|
|
|
+ this.handleDelCost(ids);
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择需要删除的数据!',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
// 修改
|
|
|
handleBasicEdit() {
|
|
@@ -1378,7 +1455,7 @@ export default {
|
|
|
// 启用
|
|
|
handleIsInvoke(e) {
|
|
|
console.log('启用', this.basicData.value.isEnable);
|
|
|
- if (this.basicData.value.isEnable == '0') {
|
|
|
+ if (this.basicData.value.isEnable == '已启用') {
|
|
|
this.basicData.value.isEnable = '2';
|
|
|
} else {
|
|
|
// this.basicData.isEnable 为空或者为2
|
|
@@ -1715,39 +1792,42 @@ export default {
|
|
|
// 删除利润中心信息
|
|
|
handledDelCenter(ids) {
|
|
|
console.log('删除利润中心信息');
|
|
|
- materialApi.delCenter({ ids }).then(res => {
|
|
|
+ materialApi.delCenter(ids).then(res => {
|
|
|
})
|
|
|
},
|
|
|
// 删除库存信息
|
|
|
handleDelInventory(ids) {
|
|
|
console.log('删除库存信息');
|
|
|
- materialApi.delInventory({ ids }).then(res => {
|
|
|
+ materialApi.delInventory(ids).then(res => {
|
|
|
})
|
|
|
},
|
|
|
// 删除成本信息
|
|
|
handleDelCost(ids) {
|
|
|
console.log('删除成本信息');
|
|
|
- materialApi.delCost({ ids }).then(res => {
|
|
|
+ materialApi.delCost(ids).then(res => {
|
|
|
})
|
|
|
},
|
|
|
// 删除计划信息
|
|
|
handleDelPlan(ids) {
|
|
|
console.log('删除计划信息');
|
|
|
- materialApi.delPlan({ ids }).then(res => {
|
|
|
+ materialApi.delPlan(ids).then(res => {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
// 删除财物信息
|
|
|
handleDelFinance(ids) {
|
|
|
console.log('删除财物信息');
|
|
|
- materialApi.delFinance({ ids }).then(res => {
|
|
|
+ materialApi.delFinance(ids).then(res => {
|
|
|
|
|
|
+ // if(res.code == 200){
|
|
|
+ // this.handleOtherRefresh();
|
|
|
+ // }
|
|
|
})
|
|
|
},
|
|
|
// 删除采购信息
|
|
|
handledelPurchase(ids) {
|
|
|
console.log('删除采购信息');
|
|
|
- materialApi.delPurchase({ ids }).then(res => {
|
|
|
+ materialApi.delPurchase(ids).then(res => {
|
|
|
|
|
|
});
|
|
|
},
|