|
@@ -110,6 +110,8 @@
|
|
|
@selection-change="selectionChange"
|
|
|
@current-change="currentChange"
|
|
|
@size-change="sizeChange"
|
|
|
+ @resetColumn="resetColumnTwo('crud','itemsOption','optionList',64.1)"
|
|
|
+ @saveColumn="saveColumnTwo('crud','itemsOption','optionList',64.1)"
|
|
|
@refresh-change="refreshChange">
|
|
|
<template slot="menuLeft">
|
|
|
<el-button type="primary"
|
|
@@ -233,10 +235,11 @@
|
|
|
return {
|
|
|
category: '',
|
|
|
form: {},
|
|
|
- itemsForm:{},
|
|
|
- params:{},
|
|
|
- buttonLoading:false,
|
|
|
- itemsOption: option,
|
|
|
+ itemsForm: {},
|
|
|
+ params: {},
|
|
|
+ buttonLoading: false,
|
|
|
+ itemsOption: {},
|
|
|
+ optionList: option,
|
|
|
option: {
|
|
|
menuBtn: false,
|
|
|
labelWidth: 100,
|
|
@@ -244,7 +247,7 @@
|
|
|
{
|
|
|
label: '所属公司',
|
|
|
prop: 'salesCompany',
|
|
|
- sort:true,
|
|
|
+ sort: true,
|
|
|
span: 8,
|
|
|
rules: [
|
|
|
{
|
|
@@ -476,14 +479,15 @@
|
|
|
statementData: {},
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ async created() {
|
|
|
+ this.itemsOption = await this.getColumnData(this.getColumnName(64.1), this.optionList);
|
|
|
// 人民币金额默认为0
|
|
|
- this.$set(this.form,"amount", 0)
|
|
|
- getUserInfo().then(res=>{
|
|
|
+ this.$set(this.form, "amount", 0)
|
|
|
+ getUserInfo().then(res => {
|
|
|
this.category = res.data.data.billType
|
|
|
if (this.category == 2) {
|
|
|
- this.$set(this.form,"overPayment", 0)
|
|
|
- this.$set(this.form,"caseOverPayment", 0)
|
|
|
+ this.$set(this.form, "overPayment", 0)
|
|
|
+ this.$set(this.form, "caseOverPayment", 0)
|
|
|
this.option.column.forEach(item => {
|
|
|
if (item.prop == 'caseOverPayment' || item.prop == 'overPayment') {
|
|
|
item.display = true
|
|
@@ -874,6 +878,29 @@
|
|
|
onClose(val) {
|
|
|
this.switchDialog = val;
|
|
|
},
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumnTwo(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 resetColumnTwo(ref, option, optionBack, code) {
|
|
|
+ this[option] = this[optionBack];
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
// 跳转页面
|
|
|
jumpPage(row, index) {
|
|
|
if (this.category == 2) {
|