|
@@ -81,12 +81,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="hui-drawer-submit" v-if="detail.status !== 2 && detail.id">
|
|
|
|
- <el-button size="medium" type="primary" @click="paymentOperation('record')" v-if="!detail.status">
|
|
|
|
- 账单付款
|
|
|
|
- </el-button>
|
|
|
|
- <el-button size="medium" type="primary" @click="paymentOperation('invoice')" v-if="detail.status === 1">
|
|
|
|
- 账单发票
|
|
|
|
|
|
+ <div class="hui-drawer-submit" v-if="operationBtn.length > 0">
|
|
|
|
+ <el-button size="medium" type="primary" v-for="(item,index) in operationBtn"
|
|
|
|
+ @click="paymentOperation(item.type)" :key="item.id">
|
|
|
|
+ {{item.name}}
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
<el-dialog title="新增" :visible.sync="visible" width="900px" :append-to-body="true">
|
|
<el-dialog title="新增" :visible.sync="visible" width="900px" :append-to-body="true">
|
|
@@ -106,7 +104,7 @@
|
|
import invoiceForm from '@/components/work/bill/common/invoiceForm';
|
|
import invoiceForm from '@/components/work/bill/common/invoiceForm';
|
|
import upload from '@/components/common/upload'
|
|
import upload from '@/components/common/upload'
|
|
export default {
|
|
export default {
|
|
- props: ['detailId'],
|
|
|
|
|
|
+ props: ['detailId', 'showType'],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
detail: {
|
|
detail: {
|
|
@@ -118,7 +116,8 @@
|
|
paymentInvoiceList: []
|
|
paymentInvoiceList: []
|
|
},
|
|
},
|
|
visible: false,
|
|
visible: false,
|
|
- type: ''
|
|
|
|
|
|
+ type: '',
|
|
|
|
+ operationBtn: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -126,9 +125,24 @@
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
init() {
|
|
init() {
|
|
|
|
+ this.operationBtn = [];
|
|
getPaymentDetailById(this.detailId).then(res => {
|
|
getPaymentDetailById(this.detailId).then(res => {
|
|
if (res.state) {
|
|
if (res.state) {
|
|
- this.detail = res.data
|
|
|
|
|
|
+ this.detail = res.data;
|
|
|
|
+ if (!this.detail.status && this.showType === 2) {
|
|
|
|
+ this.operationBtn.push({
|
|
|
|
+ id: 1,
|
|
|
|
+ name: '账单付款',
|
|
|
|
+ type: 'record'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if (this.detail.status === 1 && this.showType === 1) {
|
|
|
|
+ this.operationBtn.push({
|
|
|
|
+ id: 2,
|
|
|
|
+ name: '账单发票',
|
|
|
|
+ type: 'invoice'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|