|
@@ -23,7 +23,7 @@
|
|
<a-icon type="exclamation-circle" />
|
|
<a-icon type="exclamation-circle" />
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
</span>
|
|
</span>
|
|
- <j-dict-select-tag type="list" v-model="model.ratetype" dictCode="energy_rate_type" placeholder="请选择费率类型" @change="handleChangeType"/>
|
|
|
|
|
|
+ <j-dict-select-tag type="list" v-model="model.ratetype" dictCode="energy_rate_type" placeholder="请选择费率类型" @change="handleChangeType" :disabled="ratetypeDisabled"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="12">
|
|
<a-col :xs="24" :sm="12">
|
|
@@ -166,6 +166,7 @@
|
|
model:{
|
|
model:{
|
|
loading: false,
|
|
loading: false,
|
|
data: [],
|
|
data: [],
|
|
|
|
+ baseEnergyRateDetailList: [],
|
|
columns1: []
|
|
columns1: []
|
|
},
|
|
},
|
|
validatorRules: {
|
|
validatorRules: {
|
|
@@ -244,11 +245,13 @@
|
|
add: "/energyRate/energyRate/add",
|
|
add: "/energyRate/energyRate/add",
|
|
edit: "/energyRate/energyRate/edit",
|
|
edit: "/energyRate/energyRate/edit",
|
|
baseEnergyRateDetail: {
|
|
baseEnergyRateDetail: {
|
|
- list: '/energyRate/energyRate/queryDetailByMainId'
|
|
|
|
|
|
+ list: '/energyRate/energyRate/queryDetailByMainId',
|
|
|
|
+ list2: '/energyRate/energyRate/xqqueryById'
|
|
},
|
|
},
|
|
},
|
|
},
|
|
count: 1,
|
|
count: 1,
|
|
ratetype: '',
|
|
ratetype: '',
|
|
|
|
+ ratetypeDisabled: false,
|
|
dictCode: 'ems_pandv'
|
|
dictCode: 'ems_pandv'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -295,16 +298,96 @@
|
|
},
|
|
},
|
|
// 新增
|
|
// 新增
|
|
add(){
|
|
add(){
|
|
- this.model = {}
|
|
|
|
|
|
+ // this.model = {}
|
|
this.visible = true;
|
|
this.visible = true;
|
|
},
|
|
},
|
|
// 修改
|
|
// 修改
|
|
edit (record) {
|
|
edit (record) {
|
|
- getAction(this.url.baseEnergyRateDetail.list, {id:record.id}).then((res) => {
|
|
|
|
|
|
+ this.ratetypeDisabled = true
|
|
|
|
+ getAction(this.url.baseEnergyRateDetail.list2, {id:record.id}).then((res) => {
|
|
console.log(77777,res)
|
|
console.log(77777,res)
|
|
|
|
+ this.model = res.result
|
|
|
|
+ this.model.data = this.model.baseEnergyRateDetailList
|
|
|
|
+ if (this.model.ratetype == 1) {
|
|
|
|
+ this.model.columns1 = [
|
|
|
|
+ {
|
|
|
|
+ title: '分时开始时间',
|
|
|
|
+ dataIndex: 'begintime',
|
|
|
|
+ key: 'begintime',
|
|
|
|
+ width:"200px",
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'begintime' },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '分时结束时间',
|
|
|
|
+ dataIndex: 'endtime',
|
|
|
|
+ key: 'endtime',
|
|
|
|
+ width:"200px",
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'endtime' },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '峰平谷',
|
|
|
|
+ dataIndex: 'pandv',
|
|
|
|
+ key: 'pandv',
|
|
|
|
+ width:"200px",
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'pandv' },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '价格',
|
|
|
|
+ dataIndex: 'price',
|
|
|
|
+ key: 'price',
|
|
|
|
+ width:"200px",
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'price' },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '操作',
|
|
|
|
+ key: 'operation',
|
|
|
|
+ align: 'center',
|
|
|
|
+ width:"100px",
|
|
|
|
+ scopedSlots: { customRender: 'operation' }
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ } else {
|
|
|
|
+ this.model.columns1 = [
|
|
|
|
+ {
|
|
|
|
+ title: '起始量',
|
|
|
|
+ dataIndex: 'beginamount',
|
|
|
|
+ key: 'beginamount',
|
|
|
|
+ width:"200px",
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'beginamount' },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '结束量',
|
|
|
|
+ dataIndex: 'endamount',
|
|
|
|
+ key: 'endamount',
|
|
|
|
+ width:"200px",
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'endamount' },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '价格',
|
|
|
|
+ dataIndex: 'price',
|
|
|
|
+ key: 'price',
|
|
|
|
+ width:"200px",
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'price' },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '操作',
|
|
|
|
+ key: 'operation',
|
|
|
|
+ align: 'center',
|
|
|
|
+ width:"100px",
|
|
|
|
+ scopedSlots: { customRender: 'operation' }
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
})
|
|
})
|
|
// this.model = Object.assign({}, record);
|
|
// this.model = Object.assign({}, record);
|
|
- // this.visible = true;
|
|
|
|
|
|
+ this.visible = true;
|
|
},
|
|
},
|
|
/** 调用完edit()方法之后会自动调用此方法 */
|
|
/** 调用完edit()方法之后会自动调用此方法 */
|
|
editAfter() {
|
|
editAfter() {
|
|
@@ -494,6 +577,7 @@
|
|
// 触发表单验证
|
|
// 触发表单验证
|
|
this.$refs.form.validate(valid => {
|
|
this.$refs.form.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ that.model.baseEnergyRateDetailList = that.model.data
|
|
that.confirmLoading = true;
|
|
that.confirmLoading = true;
|
|
let httpurl = '';
|
|
let httpurl = '';
|
|
let method = '';
|
|
let method = '';
|