diff --git a/src/components/XyDialog/index.vue b/src/components/XyDialog/index.vue index e80b322..8691ecd 100644 --- a/src/components/XyDialog/index.vue +++ b/src/components/XyDialog/index.vue @@ -33,6 +33,10 @@ export default { }, okText:{ type:String + }, + loading:{ + type:Boolean, + default:false } }, data() { @@ -45,16 +49,16 @@ export default { if(this.type === 'form'){ return (
- - + +
) } if(this.type === 'normal'){ return (
- - + +
) } @@ -90,6 +94,9 @@ export default { if(this.type === 'normal'){ return } + if(this.loading){ + return + } this.$refs['elForm'].validate().then(res=>{ if(res)this.$emit('submit') }).catch(err=>{ @@ -149,6 +156,16 @@ export default { } } return ( +
+
) }else{ return ( @@ -226,6 +244,10 @@ export default { overflow: scroll; } +.xy-dialog-form-loading { + position: relative; + min-height: 260px; +} .xy-table-item{ display: flex; align-items: center; diff --git a/src/views/contract/components/paymentRegistration.vue b/src/views/contract/components/paymentRegistration.vue index 19461ed..71eeed4 100644 --- a/src/views/contract/components/paymentRegistration.vue +++ b/src/views/contract/components/paymentRegistration.vue @@ -6,6 +6,7 @@ :is-show.sync="isShowPaymentRegistration" type="form" class="payment-registration" + :loading="detailLoading" :form="paymentRegistrationForm" :rules="paymentRegistrationRules" @submit="submit" @@ -167,6 +168,8 @@ filterable allow-create clearable + popper-append-to-body + :popper-options="{ boundariesElement: 'body', gpuAcceleration: false }" > { - return { - plan_id: item.id, - use_money: item.useMoney, - new_money: item.money, - }; - }); + this.paymentRegistrationForm.plan = (this.contract.plans || []).map((item) => { + return { + plan_id: item.id, + use_money: item.useMoney, + new_money: item.money, + } + }) - this.form.audit_money = this.contract.audit_money; + this.form.audit_money = this.contract.audit_money - const res = await getFundLog({ - contract_id: this.contract.id, - }); + const res = await getFundLog({ + contract_id: this.contract.id, + }) - this.payment = res.data; - this.fileList = res.files_detail?.map(i => { - return { - url: i?.url, - name: i?.original_name, - response: i - } - }) + this.payment = res.data || [] + this.fileList = res.files_detail?.map(i => { + return { + url: i?.url, + name: i?.original_name, + response: i + } + }) || [] + } catch (error) { + this.isShowPaymentRegistration = false + Message({ + type: 'error', + message: '加载合同信息失败,请重试', + }) + } finally { + this.detailLoading = false + } }, submit() { + if (this.detailLoading || !this.contract?.id) { + return + } let data = { contract_id: this.contract.id, apply_money: this.paymentRegistrationForm.applyMoney, @@ -598,7 +618,11 @@ export default { watch: { isShowPaymentRegistration(newVal) { if (newVal) { - this.getBudgets(); + this.getBudgets() + } else { + this.detailLoading = false + this.contract = {} + this.payment = [] } }, }, diff --git a/src/views/contract/components/splitContract.vue b/src/views/contract/components/splitContract.vue index 6b983ae..1437e18 100644 --- a/src/views/contract/components/splitContract.vue +++ b/src/views/contract/components/splitContract.vue @@ -6,18 +6,43 @@ 新增标段 +
+
已拆分标段(不可修改)
+
+ 已拆分 {{ index + 1 }} + + + {{ item.section_name }} + + + {{ formatMoney(item.plan_price) }} + + + + + +
+
+ +
新增标段
+ -
+
- 标段 {{ index + 1 }} + 标段 {{ existingSections.length + index + 1 }} 删除
- - - - - - - + - -
- + + - 添加分摊行
@@ -51,14 +84,12 @@ - + diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index a575489..c034568 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -378,7 +378,7 @@ >招标审查 -