|
@@ -7,8 +7,10 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
+ <el-button class="el-button--small-yh" style="margin-left: 6px;" size="small" @click="submit">提 交
|
|
|
+ </el-button>
|
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
|
|
|
- @click="submit">保 存
|
|
|
+ @click="save" :disabled="form.approvalStatus=='审核提交'">保 存
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -16,8 +18,9 @@
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
<template slot="menuForm">
|
|
|
- <el-button icon="el-icon-search" type="primary" @click="searchChange">获取配置信息</el-button>
|
|
|
- <el-button icon="el-icon-search" type="success" :disabled="data.length == 0"
|
|
|
+ <el-button icon="el-icon-search" type="primary" :disabled="data.length > 0||form.approvalStatus=='审核提交'"
|
|
|
+ @click="searchChange">获取配置信息</el-button>
|
|
|
+ <el-button icon="el-icon-search" type="success" :disabled="data.length == 0||form.approvalStatus=='审核提交'"
|
|
|
@click="getData">获取原始信息</el-button>
|
|
|
</template>
|
|
|
</avue-form>
|
|
@@ -29,9 +32,9 @@
|
|
|
@saveColumn="saveColumn('crud', 'option', 'optionBack', 415)">
|
|
|
<template slot-scope="{type,size,row,index}" slot="menu">
|
|
|
<el-button size="small" type="text" icon="el-icon-edit"
|
|
|
- @click.stop="$refs.crud.rowEdit(row, index)">编 辑
|
|
|
+ @click.stop="$refs.crud.rowEdit(row, index)" :disabled="form.approvalStatus=='审核提交'">编 辑
|
|
|
</el-button>
|
|
|
- <el-button size="small" icon="el-icon-delete" type="text" @click.stop="rowDel(row, index)">删
|
|
|
+ <el-button size="small" icon="el-icon-delete" type="text" @click.stop="rowDel(row, index)" :disabled="form.approvalStatus=='审核提交'">删
|
|
|
除</el-button>
|
|
|
</template>
|
|
|
<template slot-scope="{type,disabled}" slot="fieldValueNewNameForm">
|
|
@@ -39,7 +42,7 @@
|
|
|
v-model="rowFrom.fieldValueNewName"></el-input>
|
|
|
<dic-select v-if="rowFrom.fieldValueType == '选择器'" v-model="rowFrom.fieldValueNewName" key="id"
|
|
|
res="records" :label="rowFrom.fieldValueRetrieval" :url="rowFrom.fieldValueUrl"
|
|
|
- :filterable="true" :remote="true" :dataName="rowFrom.fieldValueRetrieval"
|
|
|
+ :filterable="true" :remote="true" :dataName="rowFrom.fieldValueRetrieval" placeholder=""
|
|
|
@selectChange="dicChange(rowFrom.fieldValueNewName, $event)"></dic-select>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
@@ -167,8 +170,10 @@ export default {
|
|
|
delBtn: false,
|
|
|
refreshBtn: false,
|
|
|
selection: true,
|
|
|
+ selectionFixed: false,
|
|
|
align: 'center',
|
|
|
index: true,
|
|
|
+ indexFixed: false,
|
|
|
column: [
|
|
|
{
|
|
|
label: "更改时间",
|
|
@@ -187,11 +192,26 @@ export default {
|
|
|
prop: "fieldValueName",
|
|
|
overHidden: true,
|
|
|
editDisplay: false,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "字段新值",
|
|
|
prop: "fieldValueNewName",
|
|
|
+ span: 24,
|
|
|
overHidden: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
]
|
|
|
},
|
|
@@ -211,6 +231,10 @@ export default {
|
|
|
this.roleName = localStorage.getItem('roleName').split(',')
|
|
|
this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content
|
|
|
this.option = await this.getColumnData(this.getColumnName(415), this.optionBack);
|
|
|
+ if (this.$route.query.billId) {
|
|
|
+ this.getDetails(this.$route.query.billId)
|
|
|
+ }
|
|
|
+ console.log(this.detailData.id,123123)
|
|
|
if (this.detailData.id) {
|
|
|
this.getDetails(this.detailData.id)
|
|
|
}
|
|
@@ -231,15 +255,19 @@ export default {
|
|
|
this.$refs["form"].validate((valid, done) => {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
- getItemDetail(this.form).then(res => {
|
|
|
- let obj=res.data.data
|
|
|
- this.data.forEach(row=>{
|
|
|
- if(row.fieldValueType=='选择器'){
|
|
|
- row.fieldValue=obj[row.mainFieldId]
|
|
|
- row.fieldValueName=obj[row.mainFieldCname]
|
|
|
- }else{
|
|
|
- row.fieldValue=obj[row.fieldDescribe]
|
|
|
- row.fieldValueName=obj[row.fieldDescribe]
|
|
|
+ let obj = {
|
|
|
+ ...this.form
|
|
|
+ }
|
|
|
+ delete obj.updateItemList
|
|
|
+ getItemDetail(obj).then(res => {
|
|
|
+ let obj = res.data.data
|
|
|
+ this.data.forEach(row => {
|
|
|
+ if (row.fieldValueType == '选择器') {
|
|
|
+ row.fieldValue = obj[row.mainFieldId]
|
|
|
+ row.fieldValueName = obj[row.mainFieldCname]
|
|
|
+ } else {
|
|
|
+ row.fieldValue = obj[row.field]
|
|
|
+ row.fieldValueName = obj[row.field]
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -283,31 +311,73 @@ export default {
|
|
|
});
|
|
|
getDetail({ id: id }).then(res => {
|
|
|
this.form = res.data.data
|
|
|
+ this.data = res.data.data.updateItemList
|
|
|
+ if(res.data.data.approvalStatus=="审核提交"){
|
|
|
+ this.optionForm.disabled=true
|
|
|
+ }
|
|
|
}).finally(() => {
|
|
|
loading.close()
|
|
|
})
|
|
|
},
|
|
|
inEdit() {
|
|
|
},
|
|
|
- submit(type) {
|
|
|
+ save(type) {
|
|
|
this.$refs["form"].validate((valid, done) => {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
- if (this.$refs.feeInfo.submitValidate()) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ this.form.updateItemList = this.data
|
|
|
+ submit(this.form).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.getDetails(res.data.data.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ this.$refs["form"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ for (let row of this.data) {
|
|
|
+ if (!row.fieldValueName || !row.fieldValueNewName) {
|
|
|
+ this.$refs.crud.rowCell(row, row.$index)
|
|
|
+ return this.$message.error("请完善字段明细");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$confirm('是否提交数据?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {
|
|
|
+ ...this.form,
|
|
|
+ updateItemList: this.data,
|
|
|
+ url: '/serviceConfiguration/modifyData/index',
|
|
|
+ pageStatus: '',
|
|
|
+ pageLabel: '修改数据',
|
|
|
+ }
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: '加载中',
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(255,255,255,0.7)'
|
|
|
});
|
|
|
- this.form.businessDate = this.form.contractDate
|
|
|
- submit(this.form).then(res => {
|
|
|
+ checkUpdate(obj).then(res => {
|
|
|
this.$message.success("保存成功");
|
|
|
this.getDetails(res.data.data.id)
|
|
|
}).finally(() => {
|
|
|
loading.close();
|
|
|
})
|
|
|
- }
|
|
|
+ })
|
|
|
|
|
|
} else {
|
|
|
return false;
|