|
@@ -33,7 +33,9 @@
|
|
<avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
|
|
<avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
|
|
</trade-card>
|
|
</trade-card>
|
|
<trade-card title="箱信息">
|
|
<trade-card title="箱信息">
|
|
- <avue-crud ref="crudBox" :option="optionBox" :data="dataListBox">
|
|
|
|
|
|
+ <avue-crud ref="crudBox" :key="key" :option="optionBox" :data="dataListBox"
|
|
|
|
+ @resetColumn="resetColumn('crudBox','optionBox','optionBoxTwo',201.1)"
|
|
|
|
+ @saveColumn="saveColumn('crudBox','optionBox','optionBoxTwo',201.1)">
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
@@ -54,7 +56,9 @@
|
|
</avue-crud>
|
|
</avue-crud>
|
|
</trade-card>
|
|
</trade-card>
|
|
<trade-card title="代理信息">
|
|
<trade-card title="代理信息">
|
|
- <avue-crud ref="crudAgent" :option="optionAgent" :data="dataListAgent">
|
|
|
|
|
|
+ <avue-crud ref="crudAgent" :key="key" :option="optionAgent" :data="dataListAgent"
|
|
|
|
+ @resetColumn="resetColumn('crudAgent','optionAgent','optionAgentTwo',201.2)"
|
|
|
|
+ @saveColumn="saveColumn('crudAgent','optionAgent','optionAgentTwo',201.2)">
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
@@ -75,7 +79,9 @@
|
|
</avue-crud>
|
|
</avue-crud>
|
|
</trade-card>
|
|
</trade-card>
|
|
<trade-card title="投标对比">
|
|
<trade-card title="投标对比">
|
|
- <avue-crud ref="crudAgent" :option="optionBid" :data="dataListBid">
|
|
|
|
|
|
+ <avue-crud ref="crudBid" :key="key" :option="optionBid" :data="dataListBid"
|
|
|
|
+ @resetColumn="resetColumn('crudBid','optionBid','optionBidTwo',201.3)"
|
|
|
|
+ @saveColumn="saveColumn('crudBid','optionBid','optionBidTwo',201.3)">
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
@@ -153,7 +159,6 @@ export default {
|
|
watch: {
|
|
watch: {
|
|
form: {
|
|
form: {
|
|
handler(newValue, oldValue) {
|
|
handler(newValue, oldValue) {
|
|
- console.log(this.form.status)
|
|
|
|
if (this.form.status > 0){
|
|
if (this.form.status > 0){
|
|
this.$set(this.optionForm,'disabled',true)
|
|
this.$set(this.optionForm,'disabled',true)
|
|
this.$set(this.optionBox,'addRowBtn',false)
|
|
this.$set(this.optionBox,'addRowBtn',false)
|
|
@@ -187,6 +192,7 @@ export default {
|
|
checkScheduleDialog:false,
|
|
checkScheduleDialog:false,
|
|
checkId: '',
|
|
checkId: '',
|
|
batchNo:'',
|
|
batchNo:'',
|
|
|
|
+ key:0,
|
|
checkData: {},
|
|
checkData: {},
|
|
fullscreenLoading: false,
|
|
fullscreenLoading: false,
|
|
optionForm: {
|
|
optionForm: {
|
|
@@ -397,7 +403,8 @@ export default {
|
|
span: 24,
|
|
span: 24,
|
|
}]
|
|
}]
|
|
},
|
|
},
|
|
- optionBox: {
|
|
|
|
|
|
+ optionBox:{},
|
|
|
|
+ optionBoxTwo: {
|
|
align: 'center',
|
|
align: 'center',
|
|
index: true,
|
|
index: true,
|
|
refreshBtn: false,
|
|
refreshBtn: false,
|
|
@@ -457,7 +464,8 @@ export default {
|
|
index:7,
|
|
index:7,
|
|
}]
|
|
}]
|
|
},
|
|
},
|
|
- optionAgent: {
|
|
|
|
|
|
+ optionAgent:{},
|
|
|
|
+ optionAgentTwo: {
|
|
align: 'center',
|
|
align: 'center',
|
|
index: true,
|
|
index: true,
|
|
refreshBtn: false,
|
|
refreshBtn: false,
|
|
@@ -511,7 +519,8 @@ export default {
|
|
index:6,
|
|
index:6,
|
|
}]
|
|
}]
|
|
},
|
|
},
|
|
- optionBid: {
|
|
|
|
|
|
+ optionBid:{},
|
|
|
|
+ optionBidTwo: {
|
|
align: 'center',
|
|
align: 'center',
|
|
index:true,
|
|
index:true,
|
|
refreshBtn: false,
|
|
refreshBtn: false,
|
|
@@ -588,7 +597,7 @@ export default {
|
|
type: Object
|
|
type: Object
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
|
|
+ async created() {
|
|
if (this.id) {
|
|
if (this.id) {
|
|
this.refreshData(this.id)
|
|
this.refreshData(this.id)
|
|
}
|
|
}
|
|
@@ -596,8 +605,59 @@ export default {
|
|
this.checkDisabled = true
|
|
this.checkDisabled = true
|
|
this.batchNo = this.detailData.check.batchNo
|
|
this.batchNo = this.detailData.check.batchNo
|
|
}
|
|
}
|
|
|
|
+ this.optionBox = await this.getColumnData(this.getColumnName(201.1), this.optionBoxTwo);
|
|
|
|
+ this.optionAgent = await this.getColumnData(this.getColumnName(201.2), this.optionAgentTwo);
|
|
|
|
+ this.optionBid = await this.getColumnData(this.getColumnName(201.3), this.optionBidTwo);
|
|
|
|
+ this.key++
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //自定义列保存
|
|
|
|
+ async saveColumn(ref, option, optionBack, code) {
|
|
|
|
+ /**
|
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
|
+ */
|
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
|
+ if (inSave) {
|
|
|
|
+ this.$message.success("保存成功");
|
|
|
|
+ //关闭窗口
|
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //自定义列重置
|
|
|
|
+ async resetColumn(ref, option, optionBack, code) {
|
|
|
|
+ this[option] = this[optionBack];
|
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
|
+ if (inSave) {
|
|
|
|
+ this.$message.success("重置成功");
|
|
|
|
+ if (this.form.status > 0){
|
|
|
|
+ this.$set(this.optionForm,'disabled',true)
|
|
|
|
+ this.$set(this.optionBox,'addRowBtn',false)
|
|
|
|
+ this.$set(this.optionAgent,'addRowBtn',false)
|
|
|
|
+ this.optionBox.column.forEach(item=>{
|
|
|
|
+ this.$set(item,'disabled',true)
|
|
|
|
+ if (item.prop === "remark"){
|
|
|
|
+ this.$set(item,'disabled',false)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.optionAgent.column.forEach(item=>{
|
|
|
|
+ this.$set(item,'disabled',true)
|
|
|
|
+ if (item.prop === "remark"){
|
|
|
|
+ this.$set(item,'disabled',false)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ this.$set(this.optionForm,'disabled',false)
|
|
|
|
+ this.findObject(this.optionForm.column, "status").disabled = true
|
|
|
|
+ this.$set(this.optionBox,'disabled',false)
|
|
|
|
+ this.findObject(this.optionBox.column, "status").disabled = true
|
|
|
|
+ this.$set(this.optionAgent,'disabled',false)
|
|
|
|
+ this.findObject(this.optionAgent.column, "status").disabled = true
|
|
|
|
+ }
|
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
edit(row){
|
|
edit(row){
|
|
if (row.$cellEdit){
|
|
if (row.$cellEdit){
|
|
this.$set(row,'$cellEdit',false)
|
|
this.$set(row,'$cellEdit',false)
|