|
@@ -354,7 +354,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-form v-if="status === 'audit' || status === 'taskFormDetail'" :disabled="status === 'taskFormDetail'" style="width: 100%" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
|
|
|
+ <el-form v-if="status === 'audit' || status === 'taskFormDetail'" :disabled="status === 'taskFormDetail' || isDisabled" style="width: 100%" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
|
|
|
label-width="160px" @submit.native.prevent>
|
|
|
<el-row :gutter="15">
|
|
|
<el-col :span="12" >
|
|
@@ -547,7 +547,7 @@
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
- <el-form :disabled="status === 'audit'?false:true">
|
|
|
+ <el-form :disabled="status === 'taskFormDetail'|| isDisabled">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
发票明细
|
|
|
<el-button style="margin-left: 20px" type="primary" :disabled="status === 'audit'?false:true" @click="insertEvent('detail')" plain>
|
|
@@ -610,12 +610,13 @@
|
|
|
>
|
|
|
<vxe-table-column field="code" title="发票代码" :edit-render="{}">
|
|
|
<template #edit="scope">
|
|
|
- <el-input v-model="scope.row.code" placeholder="请填写发票代码"/>
|
|
|
+ <el-input :disabled="isDisabled" v-model="scope.row.code" placeholder="请填写发票代码"/>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="number" title="发票号" :edit-render="{}">
|
|
|
<template #edit="scope">
|
|
|
<el-input
|
|
|
+ :disabled="isDisabled"
|
|
|
oninput ="value=value.replace(/\D|^/g,'')"
|
|
|
placeholder="请填写发票号"
|
|
|
maxlength="8"
|
|
@@ -628,6 +629,7 @@
|
|
|
<vxe-table-column field="account" title="开票金额(元)" :edit-render="{}">
|
|
|
<template #edit="scope">
|
|
|
<el-input-number
|
|
|
+ :disabled="isDisabled"
|
|
|
@blur="checkAccount(scope.row,scope.$rowIndex)"
|
|
|
v-model="scope.row.account"
|
|
|
controls-position="right"
|
|
@@ -644,6 +646,7 @@
|
|
|
<vxe-table-column field="rate" title="税率(%)" :edit-render="{}">
|
|
|
<template #edit="scope">
|
|
|
<el-input-number
|
|
|
+ :disabled="isDisabled"
|
|
|
@blur="checkRate(scope.row, scope.$rowIndex)"
|
|
|
v-model="scope.row.rate"
|
|
|
controls-position="right"
|
|
@@ -659,17 +662,18 @@
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="amount" title="金额" :edit-render="{}">
|
|
|
<template #edit="scope">
|
|
|
- <el-input :readonly="true" v-model="scope.row.amount" placeholder="请填写金额"/>
|
|
|
+ <el-input :disabled="isDisabled" :readonly="true" v-model="scope.row.amount" placeholder="请填写金额"/>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="tax" title="税额" :edit-render="{}">
|
|
|
<template #edit="scope">
|
|
|
- <el-input :readonly="true" v-model="scope.row.tax" placeholder="请填写税额"/>
|
|
|
+ <el-input :disabled="isDisabled" :readonly="true" v-model="scope.row.tax" placeholder="请填写税额"/>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="allAmount" title="累计登记金额" :edit-render="{}">
|
|
|
<template #edit="scope">
|
|
|
<el-input-number
|
|
|
+ :disabled="isDisabled"
|
|
|
v-model="scope.row.allAmount"
|
|
|
controls-position="right"
|
|
|
:controls="false"
|
|
@@ -684,7 +688,7 @@
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column title="操作" width="100">
|
|
|
<template v-slot="scope">
|
|
|
- <el-button type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</el-button>
|
|
|
+ <el-button :disabled="isDisabled" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</el-button>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
</vxe-table>
|
|
@@ -912,7 +916,8 @@
|
|
|
userName: this.$store.state.user.name,
|
|
|
userEmail: '',
|
|
|
userPhone: '',
|
|
|
- isPreInvoice:''
|
|
|
+ isPreInvoice:'',
|
|
|
+ isDisabled: false
|
|
|
}
|
|
|
},
|
|
|
commonApi: null,
|
|
@@ -1046,9 +1051,13 @@
|
|
|
financeInvoiceService.queryById(this.inputForm.id).then((data) => {
|
|
|
this.$refs.uploadComponent.clearUpload()
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
+ console.log('data',data)
|
|
|
if (this.commonJS.isEmpty(this.inputForm.actualDrawerEmailAddress)) {
|
|
|
this.inputForm.actualDrawerEmailAddress = this.userEmail
|
|
|
}
|
|
|
+ if (this.commonJS.isNotEmpty(data.isPreInvoice)){
|
|
|
+ this.isPreInvoice = data.isPreInvoice
|
|
|
+ }
|
|
|
this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
if (!this.commonJS.isEmpty(this.inputForm.billingWorkplaceRealId)) {
|
|
|
this.bankList = []
|
|
@@ -1111,6 +1120,15 @@
|
|
|
this.inputForm.billingDate = this.moment(new Date()).format('YYYY-MM-DD')
|
|
|
}
|
|
|
}
|
|
|
+ //判断当前审核节点是哪个节点
|
|
|
+ this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
|
|
|
+ if (this.commonJS.isNotEmpty(data)) {
|
|
|
+ if (data === '所长审批') {
|
|
|
+ this.isDisabled = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
/*if (this.commonJS.isEmpty(this.inputForm.billingDate)) {
|
|
|
this.inputForm.billingDate = this.moment(new Date()).format('YYYY-MM-DD')
|
|
|
}*/
|
|
@@ -1349,10 +1367,13 @@
|
|
|
|
|
|
//验证邮箱
|
|
|
this.checkEmail()
|
|
|
-
|
|
|
financeInvoiceService.saveForm(this.inputForm).then((data) => {
|
|
|
if (status === 'start' || status === 'reapply') {
|
|
|
- this.inputForm.title = `${this.$store.state.user.name} 发起了 ${data.no} [财务-发票申请]`
|
|
|
+ if (this.commonJS.isNotEmpty(this.isPreInvoice) && this.isPreInvoice === '1'){
|
|
|
+ this.inputForm.title = `${this.$store.state.user.name} 发起了 ${data.no} [财务-预开票申请]`
|
|
|
+ }else {
|
|
|
+ this.inputForm.title = `${this.$store.state.user.name} 发起了 ${data.no} [财务-发票申请]`
|
|
|
+ }
|
|
|
}
|
|
|
this.inputForm.id = data.businessId
|
|
|
console.log('data22', data)
|