|
@@ -6,10 +6,18 @@
|
|
|
@click="backToList">返回列表
|
|
|
</el-button>
|
|
|
<div v-if="!auditDisabled" class="upper_right_button">
|
|
|
+ <el-button type="primary"
|
|
|
+ size="small"
|
|
|
+ v-if="viewDisabled"
|
|
|
+ class="el-button--small-yh "
|
|
|
+ :loading="buttonLoading"
|
|
|
+ @click.stop="openEdit()">编辑
|
|
|
+ </el-button>
|
|
|
|
|
|
<el-dropdown style="padding: 0 8px;line-height: 0">
|
|
|
<el-button
|
|
|
type="warning"
|
|
|
+ :disabled="viewDisabled"
|
|
|
:loading="buttonLoading"
|
|
|
size="small"
|
|
|
>
|
|
@@ -18,16 +26,16 @@
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item
|
|
|
:loading="buttonLoading"
|
|
|
- :disabled="checkDisabled"
|
|
|
+ :disabled="checkDisabled || viewDisabled"
|
|
|
@click.native="paymentCheck">{{form.checkStatus == '审批中'?'审批中':'审批提交'}}
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
:loading="buttonLoading"
|
|
|
- :disabled="!checkDisabled"
|
|
|
+ :disabled="!checkDisabled || viewDisabled"
|
|
|
@click.native="checkScheduleDialog = true,checkId=form.id">审批进度
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
- :disabled="!recallDisabled"
|
|
|
+ :disabled="!recallDisabled || viewDisabled"
|
|
|
@click.native="cancelAudit">撤销审批
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
@@ -36,11 +44,12 @@
|
|
|
size="small"
|
|
|
:loading="buttonLoading"
|
|
|
class="el-button--small-yh"
|
|
|
- :disabled="form.checkStatus !== '审批通过'"
|
|
|
+ :disabled="form.checkStatus !== '审批通过' || viewDisabled"
|
|
|
@click.stop="settlement">结算
|
|
|
</el-button>
|
|
|
<el-button type="primary"
|
|
|
size="small"
|
|
|
+ :disabled="viewDisabled"
|
|
|
:loading="buttonLoading"
|
|
|
class="el-button--small-yh"
|
|
|
@click.stop="confirmEdit">保存数据
|
|
@@ -73,16 +82,24 @@
|
|
|
<crop-select
|
|
|
v-model="form.corpId"
|
|
|
corpType="KG"
|
|
|
- :disabled="checkDisabled || auditDisabled"
|
|
|
+ :disabled="checkDisabled || auditDisabled || viewDisabled"
|
|
|
@getCorpData="returnBack"
|
|
|
style="width: 100%"
|
|
|
></crop-select>
|
|
|
</template>
|
|
|
+ <template slot="belongToCorpId">
|
|
|
+ <crop-select
|
|
|
+ v-model="form.belongToCorpId"
|
|
|
+ corpType="GS"
|
|
|
+ :disabled="checkDisabled || auditDisabled || viewDisabled"
|
|
|
+ style="width: 100%"
|
|
|
+ ></crop-select>
|
|
|
+ </template>
|
|
|
<template slot="accountNo">
|
|
|
<el-select v-model="form.accountNo"
|
|
|
placeholder="请选择"
|
|
|
@change="accountNoChange"
|
|
|
- :disabled="checkDisabled || auditDisabled"
|
|
|
+ :disabled="checkDisabled || auditDisabled || viewDisabled"
|
|
|
clearable
|
|
|
allow-create
|
|
|
default-first-option
|
|
@@ -98,6 +115,7 @@
|
|
|
<template slot="remark">
|
|
|
<el-input type="textarea"
|
|
|
v-model="form.remark"
|
|
|
+ :disabled="viewDisabled"
|
|
|
size="small"
|
|
|
rows="2"
|
|
|
autocomplete="off"
|
|
@@ -126,7 +144,7 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
icon="el-icon-edit"
|
|
|
- :disabled="checkDisabled || auditDisabled"
|
|
|
+ :disabled="checkDisabled || auditDisabled || viewDisabled"
|
|
|
@click="rowCell(scope.row,scope.index)"
|
|
|
>{{ scope.row.$cellEdit ? '修改完成' : '修改' }}
|
|
|
</el-button>
|
|
@@ -134,7 +152,7 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
icon="el-icon-delete"
|
|
|
- :disabled="checkDisabled || auditDisabled"
|
|
|
+ :disabled="checkDisabled || auditDisabled || viewDisabled"
|
|
|
@click.stop="rowDel(scope.row,scope.index)"
|
|
|
>删除
|
|
|
</el-button>
|
|
@@ -240,6 +258,7 @@
|
|
|
itemForm: {},
|
|
|
checkData:{},
|
|
|
itemOption: itemOption,
|
|
|
+ viewDisabled:false,
|
|
|
checkDisabled:false,
|
|
|
auditDisabled:false,
|
|
|
buttonDisabled:true,
|
|
@@ -362,6 +381,19 @@
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
+ label: '所属公司',
|
|
|
+ prop: 'belongToCorpId',
|
|
|
+ sort:true,
|
|
|
+ span: 8,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: false,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '申请人',
|
|
|
prop: 'createUserName',
|
|
|
span: 8,
|
|
@@ -414,6 +446,11 @@
|
|
|
this.getWorkDicts("currency").then(res =>{
|
|
|
this.currencyDic = res.data.data
|
|
|
})
|
|
|
+ if(this.detailData.view){
|
|
|
+ this.viewDisabled = true
|
|
|
+ this.option.disabled = true
|
|
|
+ }
|
|
|
+
|
|
|
if (this.detailData.id) {
|
|
|
this.id = this.detailData.id;
|
|
|
this.buttonLoading = true;
|
|
@@ -622,7 +659,26 @@
|
|
|
this.oldDataList = this.deepClone(data.itemsList)
|
|
|
}
|
|
|
},
|
|
|
+ async openEdit() {
|
|
|
+ //标签页保存key
|
|
|
+ this.inDetailsKey(this.$route.name,this.detailData.lockData);
|
|
|
+ //单据是否锁定
|
|
|
+ if(!await this.checkLocks(this.detailData.lockData)){
|
|
|
+ this.onLock(this.detailData.lockData); //上锁
|
|
|
+ this.viewDisabled = false
|
|
|
+ this.option = this.$options.data().option;
|
|
|
+ }else{
|
|
|
+ this.$message.warning('此单据已被锁定,请稍后再进行操作!')
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
backToList() {
|
|
|
+ //如果为审核页面 则直接返回
|
|
|
+ if(this.viewDisabled || this.detailData.check){
|
|
|
+ this.$emit("goBack");
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
|
|
|
){
|
|
|
this.$confirm("是否保存当前页面?", "提示", {
|
|
@@ -633,9 +689,18 @@
|
|
|
this.editCustomer(true)
|
|
|
}).catch(()=>{
|
|
|
this.$emit("goBack");
|
|
|
+ }).finally(()=>{
|
|
|
+ if(this.form.id){
|
|
|
+ this.unLock(this.detailData.lockData);
|
|
|
+ this.leaveDetailsKey(this.$route.name);
|
|
|
+ }
|
|
|
})
|
|
|
}else{
|
|
|
this.$emit("goBack");
|
|
|
+ if(this.form.id){
|
|
|
+ this.unLock(this.detailData.lockData);
|
|
|
+ this.leaveDetailsKey(this.$route.name);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
//列保存触发
|