diff --git a/src/views/workOrder/accounting.vue b/src/views/workOrder/accounting.vue index 4ed19b90..87edf1c5 100644 --- a/src/views/workOrder/accounting.vue +++ b/src/views/workOrder/accounting.vue @@ -122,11 +122,11 @@ - - - - - + +
+ + +
@@ -222,11 +222,11 @@
- - - - - + +
+ + +
@@ -239,7 +239,7 @@ import { selectRecordPictureList, deleteImage } from "@/api/mine" import { ImagePreview } from "vant"; -import TwoCommonBtn from "@/components/twoBtnCommon.vue" +// import TwoCommonBtn from "@/components/twoBtnCommon.vue" export default { name: "accountingView", mixins:[myMixins], @@ -349,6 +349,9 @@ export default { auditSuccessRemark:'', accountStatus: '' }, + noClick:true, + loading: false, + loading1: false } }, async mounted() { @@ -527,6 +530,7 @@ export default { this.$alert('已进入后续流程,不允许操作'); return; } + this.loading = true; let accountStatus = 0 if(this.accountStatus == 0) accountStatus = 1 if(this.accountStatus == 1) accountStatus = 1 @@ -565,7 +569,57 @@ export default { this.$router.back() },2000) } + this.loading = false; }, + async confirmAudit(){ + if(this.accountStatus >= 4){ + this.$alert('已进入后续流程,不允许操作'); + return; + } + this.loading1 = true; + this.form.supplierExtraPrice = this.form.extraPrice || 0 + this.form.supplierBasePrice = this.form.basePrice || 0 + this.form.supplierBridgeAmountAb = this.form.bridgeAmountAb || 0 + this.form.supplierBridgeAmountBc = this.form.bridgeAmountBc || 0 + this.form.supplierBridgeAmountCa = this.form.bridgeAmountCa || 0 + this.form.supplierBridgeAmount = this.form.supplierBridgeAmountAb + this.form.supplierBridgeAmountBc + this.form.supplierBridgeAmountCa + this.form.supplierCustomerAmount = this.form.customerAmount || 0 + this.form.supplierDilemmaAmount = this.form.dilemmaAmount || 0 + this.form.supplierOtherAmount = this.form.otherAmount || 0 + this.form.supplierSettleAmount = this.form.settleAmount || 0 + this.form.supplierTyreAmount = this.form.tyreAmount || 0 + this.form.supplierSettleMileageAb = this.form.settleMileageAb || 0 + this.form.supplierSettleMileageBc = this.form.settleMileageBc || 0 + this.form.supplierSettleMileageCa = this.form.settleMileageCa || 0 + this.form.supplierWaitAmount = this.form.waitAmount || 0 + this.form.supplierBasementFee = this.form.basementFee || 0 + let accountStatus = 11 + if(this.form.financePrice >= this.form.settleAmount){//服务商确认中道价格,且等于财务金额,则直接到审核完成 + accountStatus = 4 + } + const formData = new FormData(); + let obj = this.form; + Object.keys(obj).forEach((key) => { + formData.append(key, obj[key]); + }); + this.files.forEach((file) => { + formData.append('file', file.file); + }); + formData.append('accountStatus', accountStatus); + formData.append('state', 0); + formData.append('postfix', this.postfix); + formData.append('supplierBridgeAmount', parseInt(this.form.supplierBridgeAmountAb || 0) + parseInt(this.form.supplierBridgeAmountBc || 0) + parseInt(this.form.supplierBridgeAmountCa || 0)); + let res = await updateAccountRecordInfo( formData); + if(res.code === 200){ + this.$toast('操作成功') + setTimeout(()=>{ + this.$router.back() + },2000) + } + this.loading1 = false; + }, + + async delSupplierPhoto(item){ this.show = true this.imgId=item.id @@ -579,7 +633,7 @@ export default { }, }, components:{ - TwoCommonBtn + // TwoCommonBtn } } @@ -587,6 +641,32 @@ export default {