|
@@ -10,7 +10,7 @@
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button-group>
|
|
<el-button-group>
|
|
<el-button size="small" @click="handleSave"
|
|
<el-button size="small" @click="handleSave"
|
|
- v-hasPermi="['system:material:add', `${maintainNewVersion ? '' : 'system:material:versions'}`]">
|
|
|
|
|
|
+ v-hasPermi="['system:material:add', `${maintainNewVersion ? '' : 'system:material:versions'}`]">
|
|
保存
|
|
保存
|
|
</el-button>
|
|
</el-button>
|
|
</el-button-group>
|
|
</el-button-group>
|
|
@@ -71,7 +71,7 @@
|
|
<el-row :gutter="10" class="mb10" v-show="activeMainTab != 'material'">
|
|
<el-row :gutter="10" class="mb10" v-show="activeMainTab != 'material'">
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button-group>
|
|
<el-button-group>
|
|
- <el-button size="small" @click="handleOtherEdit">修改</el-button>
|
|
|
|
|
|
+ <el-button size="small" @click="handleOtherEdit('table')">修改</el-button>
|
|
<el-button size="small" v-show="activeMainTab != 'material_finance'" @click="handleOtherDel">删除</el-button>
|
|
<el-button size="small" v-show="activeMainTab != 'material_finance'" @click="handleOtherDel">删除</el-button>
|
|
</el-button-group>
|
|
</el-button-group>
|
|
<el-button-group>
|
|
<el-button-group>
|
|
@@ -128,12 +128,12 @@
|
|
<div class="md-main">
|
|
<div class="md-main">
|
|
|
|
|
|
<!-- 基本信息展示表单 -->
|
|
<!-- 基本信息展示表单 -->
|
|
- <el-form
|
|
|
|
- v-if="activeMainTab == 'material'"
|
|
|
|
- :inline="true"
|
|
|
|
|
|
+ <el-form
|
|
|
|
+ v-if="activeMainTab == 'material'"
|
|
|
|
+ :inline="true"
|
|
label-position="right"
|
|
label-position="right"
|
|
- :hide-required-asterisk="true"
|
|
|
|
- :model="basicData.value"
|
|
|
|
|
|
+ :hide-required-asterisk="true"
|
|
|
|
+ :model="basicData.value"
|
|
ref="basicMessageRef"
|
|
ref="basicMessageRef"
|
|
>
|
|
>
|
|
|
|
|
|
@@ -144,14 +144,14 @@
|
|
|
|
|
|
<!-- 多选框 -->
|
|
<!-- 多选框 -->
|
|
<el-form-item v-if="f.attribute == 'checkbox'" style="text-align: left;" :prop="f.prop"
|
|
<el-form-item v-if="f.attribute == 'checkbox'" style="text-align: left;" :prop="f.prop"
|
|
- :rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]" >
|
|
|
|
|
|
+ :rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]">
|
|
<!-- :rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]" -->
|
|
<!-- :rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]" -->
|
|
|
|
|
|
- <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]"
|
|
true-label="0"
|
|
true-label="0"
|
|
- false-label="2"
|
|
|
|
|
|
+ false-label="2"
|
|
:disabled="handleJudge(f)"
|
|
:disabled="handleJudge(f)"
|
|
size="mini"
|
|
size="mini"
|
|
>
|
|
>
|
|
@@ -176,7 +176,8 @@
|
|
|
|
|
|
<!-- 参照 -->
|
|
<!-- 参照 -->
|
|
<el-select v-if="f.apiUrl" v-model="basicData.value[`${f.prop}Name`]" placeholder="请选择"
|
|
<el-select v-if="f.apiUrl" v-model="basicData.value[`${f.prop}Name`]" placeholder="请选择"
|
|
- size="mini" :rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]"
|
|
|
|
|
|
+ size="mini"
|
|
|
|
+ :rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]"
|
|
:key="basicData.value[f.prop]" :disabled="handleJudge(f)"
|
|
:key="basicData.value[f.prop]" :disabled="handleJudge(f)"
|
|
@focus="f.apiUrl && handleQueryMore(f, '', { name: 'basicData', prop: f.prop })">
|
|
@focus="f.apiUrl && handleQueryMore(f, '', { name: 'basicData', prop: f.prop })">
|
|
<div slot="empty"></div>
|
|
<div slot="empty"></div>
|
|
@@ -202,7 +203,8 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<!--attribute 文本 数字 文本域 为null -->
|
|
<!--attribute 文本 数字 文本域 为null -->
|
|
- <el-form-item v-else :prop="f.prop" :rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]">
|
|
|
|
|
|
+ <el-form-item v-else :prop="f.prop"
|
|
|
|
+ :rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]">
|
|
<!-- :rules="[{ required: f.required, message: `请输入${f.name}`, trigger: 'blur' }]" -->
|
|
<!-- :rules="[{ required: f.required, message: `请输入${f.name}`, trigger: 'blur' }]" -->
|
|
|
|
|
|
<template slot="label">
|
|
<template slot="label">
|
|
@@ -217,7 +219,7 @@
|
|
<el-input size="mini" v-model="basicData.value[f.prop]" :type="f.attribute || 'text'"
|
|
<el-input size="mini" v-model="basicData.value[f.prop]" :type="f.attribute || 'text'"
|
|
:readonly="handleJudge(f)"
|
|
:readonly="handleJudge(f)"
|
|
:rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]"
|
|
:rules="[{ required: f.required, message: `请选择${f.name}`, trigger: 'change' }]"
|
|
- >
|
|
|
|
|
|
+ >
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
@@ -456,12 +458,12 @@
|
|
|
|
|
|
|
|
|
|
<!-- 其他页签的操作 -->
|
|
<!-- 其他页签的操作 -->
|
|
- <el-dialog
|
|
|
|
- :title="otherDeatils.title"
|
|
|
|
- :visible.sync="otherDeatils.show"
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
+ :title="otherDeatils.title"
|
|
|
|
+ :visible.sync="otherDeatils.show"
|
|
show-close width="70%"
|
|
show-close width="70%"
|
|
- :before-close="handleCloseOtherDetails"
|
|
|
|
- :close-on-press-escape="false"
|
|
|
|
|
|
+ :before-close="handleCloseOtherDetails"
|
|
|
|
+ :close-on-press-escape="false"
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
class="otherDialog"
|
|
class="otherDialog"
|
|
>
|
|
>
|
|
@@ -470,7 +472,7 @@
|
|
<el-row :gutter="10" class="mb10">
|
|
<el-row :gutter="10" class="mb10">
|
|
<el-col :span="1.5" v-if="!otherDeatils.isEdit">
|
|
<el-col :span="1.5" v-if="!otherDeatils.isEdit">
|
|
<el-button-group>
|
|
<el-button-group>
|
|
- <el-button size="small" @click="handleOtherEdit">修改</el-button>
|
|
|
|
|
|
+ <el-button size="small" @click="handleOtherEdit('form')">修改</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-group>
|
|
<el-button-group>
|
|
@@ -1346,22 +1348,26 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 除基本信息之后的修改
|
|
// 除基本信息之后的修改
|
|
- handleOtherEdit() {
|
|
|
|
- console.log('除基本信息之后的修改');
|
|
|
|
- if (this.mainMsg.checkedList.length == 1) {
|
|
|
|
- this.otherDeatils.show = true;
|
|
|
|
- this.otherDeatils.isEdit = true;
|
|
|
|
- let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
|
|
|
|
- this.otherDeatils.queryKey = this.mainMsg.checkedList[0].id;
|
|
|
|
- this.otherDeatils.title = activeTab.label;
|
|
|
|
- console.log(this.otherDeatils, 'this.otherDeatils');
|
|
|
|
|
|
+ handleOtherEdit(type) {
|
|
|
|
+ console.log('除基本信息之后的修改', type);
|
|
|
|
+ this.otherDeatils.show = true;
|
|
|
|
+ this.otherDeatils.isEdit = true;
|
|
|
|
+ let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
|
|
|
|
+ this.otherDeatils.title = activeTab.label;
|
|
|
|
+ if ('table' === type) {
|
|
|
|
+ if (this.mainMsg.checkedList.length == 1) {
|
|
|
|
+ this.otherDeatils.queryKey = this.mainMsg.checkedList[0].id;
|
|
|
|
+ console.log(this.otherDeatils, 'this.otherDeatils');
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '修改请选择单个数据!',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (this.otherDeatils.queryKey) {
|
|
// 查询其他标签页列表详情
|
|
// 查询其他标签页列表详情
|
|
this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
|
|
this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- message: '修改请选择单个数据!',
|
|
|
|
- type: 'warning'
|
|
|
|
- });
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 其他标签详情弹窗-刷新
|
|
// 其他标签详情弹窗-刷新
|
|
@@ -1582,8 +1588,8 @@
|
|
handleSave() {
|
|
handleSave() {
|
|
console.log('保存修改');
|
|
console.log('保存修改');
|
|
this.$refs['basicMessageRef'].validate(async (valid) => {
|
|
this.$refs['basicMessageRef'].validate(async (valid) => {
|
|
-
|
|
|
|
- if(valid){
|
|
|
|
|
|
+
|
|
|
|
+ if (valid) {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
// 普通保存修改
|
|
// 普通保存修改
|
|
this.updateButtonGroup && this.handleSaveMaterial(() => {
|
|
this.updateButtonGroup && this.handleSaveMaterial(() => {
|
|
@@ -1596,13 +1602,13 @@
|
|
this.maintainNewVersion = false;
|
|
this.maintainNewVersion = false;
|
|
this.handleRefresh();
|
|
this.handleRefresh();
|
|
})
|
|
})
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
this.$message.error('存在必填项未填写');
|
|
this.$message.error('存在必填项未填写');
|
|
console.log('error submit!!');
|
|
console.log('error submit!!');
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
// 物料类别列表选中
|
|
// 物料类别列表选中
|
|
handleSelectionType(list) {
|
|
handleSelectionType(list) {
|
|
@@ -2105,11 +2111,11 @@
|
|
},
|
|
},
|
|
"basicData.value.isMedicine": {
|
|
"basicData.value.isMedicine": {
|
|
handler(nVal, oVal) {
|
|
handler(nVal, oVal) {
|
|
- this.basicData.form = this.basicData.form.map(formItem =>{
|
|
|
|
|
|
+ this.basicData.form = this.basicData.form.map(formItem => {
|
|
|
|
|
|
- if(formItem.prop === 'productionPermit'){
|
|
|
|
|
|
+ if (formItem.prop === 'productionPermit') {
|
|
|
|
|
|
- formItem.required = nVal == '0' ? true :false;
|
|
|
|
|
|
+ formItem.required = nVal == '0' ? true : false;
|
|
|
|
|
|
}
|
|
}
|
|
return formItem;
|
|
return formItem;
|