|
@@ -6,16 +6,22 @@
|
|
|
@click="backToList">返回列表
|
|
|
</el-button>
|
|
|
<div class="upper_right_button">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="editHandle"
|
|
|
+ v-if="editDisable"
|
|
|
+ >编 辑</el-button>
|
|
|
<el-button type="primary"
|
|
|
size="small"
|
|
|
- :disabled="!form.id"
|
|
|
+ :disabled="!form.id || editDisable"
|
|
|
@click="postMessage"
|
|
|
>发送消息</el-button>
|
|
|
<el-button type="warning"
|
|
|
size="small"
|
|
|
class="el-button--small-yh"
|
|
|
:buttonLoading="buttonLoading"
|
|
|
- :disabled="!form.id"
|
|
|
+ :disabled="!form.id || editDisable"
|
|
|
@click.stop="confirmSettlement"
|
|
|
>{{financeDisabled?"收费":"撤销收费"}}
|
|
|
</el-button>
|
|
@@ -23,7 +29,7 @@
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
:buttonLoading="buttonLoading"
|
|
|
- :disabled="!financeDisabled"
|
|
|
+ :disabled="!financeDisabled || editDisable"
|
|
|
@click.stop="saveSettlement"
|
|
|
>保存数据
|
|
|
</el-button>
|
|
@@ -38,7 +44,7 @@
|
|
|
<crop-select
|
|
|
v-model="form.corpId"
|
|
|
corpType="KG"
|
|
|
- :disabled="!financeDisabled"
|
|
|
+ :disabled="!financeDisabled || editDisable"
|
|
|
@getCorpData="returnBack"
|
|
|
style="width: 100%"
|
|
|
></crop-select>
|
|
@@ -46,7 +52,7 @@
|
|
|
<template slot="accountNo">
|
|
|
<el-select v-model="form.accountNo"
|
|
|
placeholder="请选择"
|
|
|
- :disabled="!financeDisabled"
|
|
|
+ :disabled="!financeDisabled || editDisable"
|
|
|
@change="accountNoChange"
|
|
|
clearable
|
|
|
filterable>
|
|
@@ -65,7 +71,7 @@
|
|
|
v-model="form.caseOverPayment"
|
|
|
@change="caseOverPaymentChange"
|
|
|
v-input-limit="2"
|
|
|
- :disabled="dataList.length == 0"
|
|
|
+ :disabled="dataList.length == 0 || !financeDisabled || editDisable"
|
|
|
></el-input>
|
|
|
</template>
|
|
|
<template slot="remark">
|
|
@@ -96,7 +102,7 @@
|
|
|
<el-button type="primary"
|
|
|
size="small"
|
|
|
icon="el-icon-shopping-cart-2"
|
|
|
- :disabled="!financeDisabled"
|
|
|
+ :disabled="!financeDisabled || editDisable"
|
|
|
:buttonLoading="buttonLoading"
|
|
|
@click="selectRecipt"
|
|
|
>选择销售合同
|
|
@@ -125,7 +131,7 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
icon="el-icon-edit"
|
|
|
- :disabled="!financeDisabled"
|
|
|
+ :disabled="!financeDisabled || editDisable"
|
|
|
@click.stop="rowCell(scope.row,scope.index)"
|
|
|
> {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
|
|
|
</el-button>
|
|
@@ -133,7 +139,7 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
icon="el-icon-delete"
|
|
|
- :disabled="!financeDisabled"
|
|
|
+ :disabled="!financeDisabled || editDisable"
|
|
|
@click.stop="rowDel(scope.row,scope.index)"
|
|
|
>删除
|
|
|
</el-button>
|
|
@@ -403,6 +409,7 @@
|
|
|
value: '停用',
|
|
|
label: '停用'
|
|
|
}],
|
|
|
+ editDisable: false, //编辑状态禁用
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -427,6 +434,7 @@
|
|
|
this.getWorkDicts("currency").then(res =>{
|
|
|
this.currencyDic = res.data.data
|
|
|
})
|
|
|
+ this.detailData.disabled && (this.editDisable = true)
|
|
|
if (this.detailData.id) {
|
|
|
this.buttonLoading = true
|
|
|
this.id = this.detailData.id;//字符串转数字 超长用BigInt
|
|
@@ -610,8 +618,12 @@
|
|
|
settlementType:1
|
|
|
}
|
|
|
|
|
|
+ // 如果有id解锁,没有跳过
|
|
|
+ this.form.id && this.unLock({moduleName: 'sf',tableName: 'finance_settlement', billId: this.form.id})
|
|
|
saveOrEdit(params).then(res=>{
|
|
|
this.$message.success("操作成功!")
|
|
|
+ this.detailData.disabled = true
|
|
|
+ this.editDisable = true
|
|
|
this.afterEcho(res.data.data)
|
|
|
}).finally(()=>{
|
|
|
this.buttonLoading = false
|
|
@@ -632,7 +644,7 @@
|
|
|
|
|
|
this.financeDisabled = this.form.financeStatus === "待结算"?true:false;
|
|
|
|
|
|
- if(this.financeDisabled){
|
|
|
+ if(this.financeDisabled || !this.editDisable){
|
|
|
this.option.column.forEach(item =>{
|
|
|
if( item.prop === "remark"){
|
|
|
this.$set(item,"disabled",false)
|
|
@@ -643,7 +655,7 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- if(this.financeDisabled === false){
|
|
|
+ if(this.financeDisabled === false || this.editDisable){
|
|
|
this.option.column.forEach(item =>{
|
|
|
if( item.prop === "remark"){
|
|
|
this.$set(item,"disabled",false)
|
|
@@ -710,6 +722,31 @@
|
|
|
closeDialog() {
|
|
|
this.messageVisble = false
|
|
|
},
|
|
|
+ editHandle() {
|
|
|
+ const data = {
|
|
|
+ moduleName: 'sf',
|
|
|
+ tableName: 'finance_settlement',
|
|
|
+ billId: this.form.id,
|
|
|
+ no: 1
|
|
|
+ }
|
|
|
+ this.checkLock(data).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.onLock(data).then(response => {
|
|
|
+ })
|
|
|
+ this.detailData.disabled = false;
|
|
|
+ this.editDisable = false;
|
|
|
+ this.buttonLoading = true
|
|
|
+ getDetail(this.form.id).then(data => {
|
|
|
+ this.afterEcho(data.data.data)
|
|
|
+ }).finally(()=>{
|
|
|
+ this.buttonLoading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ }).finally(() => {
|
|
|
+ this.buttonLoading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|