记账提交和确定审核按钮需加判断条件
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<button :class=" { 'loading1': loading1, 'cancel' : title1 == '取消', 'submit' : title1 != '取消' } " @click="noMultipleClicks( title1 == '提交' ? submitClick1 :cancelClick )">{{ title1 }}</button>
|
<button :class=" { 'loading1': loading1, 'cancel' : title1 == '取消', 'submit' : title1 != '取消' } " @click="noMultipleClicks( title1 == '提交' ? submitClick1 :cancelClick )">{{ title1 }}</button>
|
||||||
<button class="submit" @click="noMultipleClicks(submitClick)" :class="{'loading': loading}">{{ title2}}</button>
|
<button class="submit" @click="noMultipleClicks(submitClick)" :class="{'loading': loading}">{{ title2}}</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -107,4 +107,5 @@ export default {
|
|||||||
background-color: #354D93;
|
background-color: #354D93;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
@ -122,7 +122,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<textarea v-model="form.supplierRemark" class="multipleTxt" placeholder="报备描述"></textarea>
|
<textarea v-model="form.supplierRemark" class="multipleTxt" placeholder="报备描述"></textarea>
|
||||||
<two-common-btn class="btn" @cancelClick="cancelBtn" @submitClick="save" />
|
<!-- <two-common-btn class="btn" @cancelClick="cancelBtn" @submitClick="save" />-->
|
||||||
|
<div class="btn">
|
||||||
|
<button class="cancel" @click="noMultipleClicks(cancelBtn)">取消</button>
|
||||||
|
<button v-if="orderInfo.checkCount < 3" :class=" { 'loading1': loading1, 'submit' : true } " @click="noMultipleClicks(save)" >提交</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="dataType" v-show="auditFormShow">
|
<div class="dataType" v-show="auditFormShow">
|
||||||
<table>
|
<table>
|
||||||
@ -217,7 +222,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<van-dialog v-model="show" title="确定删除此照片吗" show-cancel-button @confirm="handleConfirm"></van-dialog>
|
<van-dialog v-model="show" title="确定删除此照片吗" show-cancel-button @confirm="handleConfirm"></van-dialog>
|
||||||
<two-common-btn v-show="auditFormShow" class="btn" title1="提交" title2="确定审核" @submitClick1="save" @submitClick="save" />
|
<!-- <two-common-btn v-show="auditFormShow" class="btn" title1="提交" title2="确定审核" @submitClick1="save" @submitClick="save" />-->
|
||||||
|
<div class="btn">
|
||||||
|
<button v-if="orderInfo.checkCount < 3" :class=" { 'loading1': loading1, 'submit' : true } " class="submit loading1" @click="noMultipleClicks(save)" >提交</button>
|
||||||
|
<button v-if="accountStatus == 2 || accountStatus == 3" :class=" { 'loading': loading, 'submit' : true } " @click="noMultipleClicks(confirmAudit)" >确定审核</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -230,7 +239,7 @@ import {
|
|||||||
selectRecordPictureList, deleteImage
|
selectRecordPictureList, deleteImage
|
||||||
} from "@/api/mine"
|
} from "@/api/mine"
|
||||||
import { ImagePreview } from "vant";
|
import { ImagePreview } from "vant";
|
||||||
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
// import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
||||||
export default {
|
export default {
|
||||||
name: "accountingView",
|
name: "accountingView",
|
||||||
mixins:[myMixins],
|
mixins:[myMixins],
|
||||||
@ -340,6 +349,9 @@ export default {
|
|||||||
auditSuccessRemark:'',
|
auditSuccessRemark:'',
|
||||||
accountStatus: ''
|
accountStatus: ''
|
||||||
},
|
},
|
||||||
|
noClick:true,
|
||||||
|
loading: false,
|
||||||
|
loading1: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@ -518,6 +530,7 @@ export default {
|
|||||||
this.$alert('已进入后续流程,不允许操作');
|
this.$alert('已进入后续流程,不允许操作');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.loading1=true;
|
||||||
let accountStatus = 0
|
let accountStatus = 0
|
||||||
if(this.accountStatus == 0) accountStatus = 1
|
if(this.accountStatus == 0) accountStatus = 1
|
||||||
if(this.accountStatus == 1) accountStatus = 1
|
if(this.accountStatus == 1) accountStatus = 1
|
||||||
@ -556,7 +569,56 @@ export default {
|
|||||||
this.$router.back()
|
this.$router.back()
|
||||||
},2000)
|
},2000)
|
||||||
}
|
}
|
||||||
|
this.loading1=false
|
||||||
},
|
},
|
||||||
|
async confirmAudit(){
|
||||||
|
if(this.accountStatus >= 4){
|
||||||
|
this.$alert('已进入后续流程,不允许操作');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loading = 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.loading = false;
|
||||||
|
},
|
||||||
|
|
||||||
async delSupplierPhoto(item){
|
async delSupplierPhoto(item){
|
||||||
this.show = true
|
this.show = true
|
||||||
this.imgId=item.id
|
this.imgId=item.id
|
||||||
@ -570,7 +632,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
TwoCommonBtn
|
// TwoCommonBtn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -578,6 +640,47 @@ export default {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import "@/styles/mixin.scss";
|
@import "@/styles/mixin.scss";
|
||||||
@import "@/styles/common.scss";
|
@import "@/styles/common.scss";
|
||||||
|
.loading,.loading1 {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading::after,.loading1::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border: 2px solid #000;
|
||||||
|
border-top-color: transparent;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
0% {
|
||||||
|
transform: translate(-50%, -50%) rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translate(-50%, -50%) rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
@include flexColBet;
|
||||||
|
button{
|
||||||
|
@include whLin(152px,39px);
|
||||||
|
border-radius: 5px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
@include fontWeightSize(bold,14px)
|
||||||
|
}
|
||||||
|
.cancel{
|
||||||
|
background: #9EA7C0;
|
||||||
|
}
|
||||||
|
.submit{
|
||||||
|
background-color: #354D93;
|
||||||
|
}
|
||||||
|
}
|
||||||
.wrap{
|
.wrap{
|
||||||
@include wh(100%,100%);
|
@include wh(100%,100%);
|
||||||
background-color: #F4F5F7;
|
background-color: #F4F5F7;
|
||||||
|
Reference in New Issue
Block a user