Commit 627664a5 by cen

fix:按钮逻辑显示

1 parent b27823b3
const target = ['ip', 'dev', 'uat', 'prod', 'beta'] const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 1 const index = 4
/** /**
* *
0本地 0本地
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
<view v-if="subStatus == 1" class="common-btn gray-btn ml-24" @click.stop="handleClick('signing')">签约中</view> <view v-if="subStatus == 1" class="common-btn gray-btn ml-24" @click.stop="handleClick('signing')">签约中</view>
<view v-if="subStatus == 2 || subStatus == 3" class="common-btn gray-btn ml-24" @click.stop="handleClick('paying')">支付中</view> <view v-if="subStatus == 2 || subStatus == 3" class="common-btn gray-btn ml-24" @click.stop="handleClick('paying')">支付中</view>
<view v-if="status == 30 && !subStatus" class="common-btn ml-24" @click.stop="handleClick('cancelSign', 'app_evaluate_cancel_sign')">取消签约</view> <view v-if="status == 30 && !subStatus" class="common-btn ml-24" @click.stop="handleClick('cancelSign', 'app_evaluate_cancel_sign')">取消签约</view>
<view v-if="status == 31 && !subStatus" class="common-btn ml-24" @click.stop="handleClick('cancelSign', 'app_evaluate_cancel_sign')">确认代保管</view> <view v-if="status == 31 && !subStatus" class="common-btn blue-btn ml-24" @click.stop="handleClick('signAgreement', 'app_evaluate_cancel_sign')">确认代保管</view>
<view v-if="status == 30 && !subStatus && paymentType == 1" class="common-btn blue-btn ml-24" @click.stop="handleClick('payDeposit', 'app_evaluate_pay_deposit')">支付定金</view> <view v-if="status == 30 && !subStatus && paymentType == 1" class="common-btn blue-btn ml-24" @click.stop="handleClick('payDeposit', 'app_evaluate_pay_deposit')">支付定金</view>
<view v-if="(status == 30 && !subStatus && paymentType == 2 && previousStatus == '-1') || (status == 31 && !subStatus && paymentType == 2 && previousStatus == 30)" class="common-btn blue-btn ml-24" @click.stop="handleClick('payFull', 'app_evaluate_pay_full')">支付全款</view> <view v-if="(status == 30 && !subStatus && paymentType == 2 && previousStatus == '-1') || (status == 31 && !subStatus && paymentType == 2 && previousStatus == 30)" class="common-btn blue-btn ml-24" @click.stop="handleClick('payFull', 'app_evaluate_pay_full')">支付全款</view>
<view v-if="status == 31 && !subStatus && paymentType == 1 && (previousStatus == 40 || previousStatus == '-1')" class="common-btn blue-btn ml-24" @click.stop="handleClick('payFull', 'app_evaluate_pay_final')">支付尾款</view> <view v-if="status == 32 && !subStatus && paymentType == 1" class="common-btn blue-btn ml-24" @click.stop="handleClick('payFull', 'app_evaluate_pay_final')">支付尾款</view>
<view v-if="(status == 30 && !subStatus && paymentType == 2 && previousStatus == 20) || (status == 40 && !subStatus && previousStatus == 30 && paymentType == 1)" class="common-btn blue-btn ml-24" @click.stop="handleClick('confirmDelivery', 'app_evaluate_confirm_delivery')">确认交车</view> <view v-if="(status == 30 && !subStatus && paymentType == 2 && previousStatus == 20) || (status == 40 && !subStatus && previousStatus == 30 && paymentType == 1)" class="common-btn blue-btn ml-24" @click.stop="handleClick('confirmDelivery', 'app_evaluate_confirm_delivery')">确认交车</view>
<view v-if="status == '-1'" class="common-btn blue-btn ml-24" @click.stop="handleClick('reSubmit', 'app_evaluate_re_submit')">重新提交</view> <view v-if="status == '-1'" class="common-btn blue-btn ml-24" @click.stop="handleClick('reSubmit', 'app_evaluate_re_submit')">重新提交</view>
</div> </div>
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<view class="title">确认交车提醒</view> <view class="title">确认交车提醒</view>
<view class="tipsConent"> <view class="tipsConent">
<view>{{ showTips }}</view> <view>{{ showTips }}</view>
<view>请确定车辆已经交付:代保管人 {{ custodianName }}。</view> <!-- <view>请确定车辆已经交付:代保管人 {{ custodianName }}。</view> -->
</view> </view>
</view> </view>
</template> </template>
...@@ -281,7 +281,7 @@ export default { ...@@ -281,7 +281,7 @@ export default {
if (res.data.code == 0) { if (res.data.code == 0) {
// this.$set(this.formData, 'handoverAddress', res.data.data.evalCarBase.carProvinceName + '-' + res.data.data.evalCarBase.carCityName) // this.$set(this.formData, 'handoverAddress', res.data.data.evalCarBase.carProvinceName + '-' + res.data.data.evalCarBase.carCityName)
console.log('res.data.data', JSON.parse(res.data.data.custodyContract.electronicContractField)) console.log('res.data.data', JSON.parse(res.data.data.custodyContract.electronicContractField))
this.custodianName = JSON.parse(res.data.data.custodyContract.electronicContractField).custodianName || '' // this.custodianName = JSON.parse(res.data.data.custodyContract.electronicContractField).custodianName || ''
this.formData.handoverTime = dayjs().format('YYYY-MM-DD HH:mm:00') this.formData.handoverTime = dayjs().format('YYYY-MM-DD HH:mm:00')
// this.evalOrderSimpleDetail = res.data.data // this.evalOrderSimpleDetail = res.data.data
} else { } else {
......
...@@ -247,7 +247,8 @@ export default { ...@@ -247,7 +247,8 @@ export default {
{ name: '银行转账', value: '1' }, { name: '银行转账', value: '1' },
{ name: '冲账', value: '2' } { name: '冲账', value: '2' }
], ],
currentRadio: 0 currentRadio: 0,
signAgreementObjDetail: null
} }
}, },
mounted() { mounted() {
...@@ -387,6 +388,8 @@ export default { ...@@ -387,6 +388,8 @@ export default {
this.jumpToDetails(e) this.jumpToDetails(e)
} else if (e.type === 'reSubmit') { } else if (e.type === 'reSubmit') {
this.reSubmit(e) this.reSubmit(e)
} else if (e.type === 'signAgreement') {
this.signAgreement(e)
} }
}, },
async reSubmit(e) { async reSubmit(e) {
...@@ -467,26 +470,6 @@ export default { ...@@ -467,26 +470,6 @@ export default {
} }
} else { } else {
uni.showLoading() uni.showLoading()
uni.$api.evaluationApi
.checkSignAgreement({
evalOrderNo: this.payPopupObj.evalOrderNo
})
.then(async res => {
console.log('res:', res)
if (res.data.code == 0) {
uni.hideLoading()
console.log('res.data.data:', res.data.data)
if (!res.data.data) {
this.signAgreementObj = {
evalOrderNo: '',
custodianName: '',
custodianIdentityCode: '',
custodianAddress: '',
custodianPhone: ''
}
that.$refs.signAgreementPopup.open()
} else {
uni.showLoading()
const res = await uni.$api.evaluationApi.signAgreement({ const res = await uni.$api.evaluationApi.signAgreement({
evalOrderNo: this.payPopupObj.evalOrderNo, evalOrderNo: this.payPopupObj.evalOrderNo,
paymentMethod: this.payPopupObj.paymentMethod paymentMethod: this.payPopupObj.paymentMethod
...@@ -497,6 +480,10 @@ export default { ...@@ -497,6 +480,10 @@ export default {
title: this.payPopupObj.status == 40 && this.payPopupObj.paymentType == 1 ? '尾款已申请,请等待付款审批' : '全款已申请,请等待付款审批', title: this.payPopupObj.status == 40 && this.payPopupObj.paymentType == 1 ? '尾款已申请,请等待付款审批' : '全款已申请,请等待付款审批',
icon: 'none' icon: 'none'
}) })
setTimeout(() => {
that.currentPage = 1
that.search()
}, 1000)
} else { } else {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
...@@ -505,9 +492,6 @@ export default { ...@@ -505,9 +492,6 @@ export default {
}) })
} }
} }
}
})
}
}, },
async confirmSignAgreement() { async confirmSignAgreement() {
const that = this const that = this
...@@ -519,18 +503,18 @@ export default { ...@@ -519,18 +503,18 @@ export default {
return return
} }
uni.showLoading() uni.showLoading()
uni.$api.evaluationApi.sendCustodyAgreement({ ...that.signAgreementObj, evalOrderNo: this.payPopupObj.evalOrderNo }).then(res => { uni.$api.evaluationApi.sendCustodyAgreement({ ...that.signAgreementObj, evalOrderNo: this.signAgreementObjDetail.evalOrderNo }).then(res => {
console.log(res, 'res') console.log(res, 'res')
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading() uni.hideLoading()
// uni.showToast({
// title: '电子签约已发送,请注意查收短信,全款款项已申请,完成代保管协议电子签约后将安排支付全款',
// icon: 'none'
// })
uni.showToast({ uni.showToast({
title: this.payPopupObj.status == 40 && this.payPopupObj.paymentType == 1 ? '尾款款项已申请,完成代保管协议电子签约后将安排支付尾款' : '全款款项已申请,完成代保管协议电子签约后将安排支付全款', title: '电子签约已发送,请注意查收短信',
icon: 'none' icon: 'none'
}) })
// uni.showToast({
// title: this.payPopupObj.status == 40 && this.payPopupObj.paymentType == 1 ? '尾款款项已申请,完成代保管协议电子签约后将安排支付尾款' : '全款款项已申请,完成代保管协议电子签约后将安排支付全款',
// icon: 'none'
// })
this.$refs.signAgreementPopup.closePopup() this.$refs.signAgreementPopup.closePopup()
setTimeout(() => { setTimeout(() => {
that.currentPage = 1 that.currentPage = 1
...@@ -640,6 +624,34 @@ export default { ...@@ -640,6 +624,34 @@ export default {
// this.$refs.cancleSignPopup.closePopup() // this.$refs.cancleSignPopup.closePopup()
}) })
}, },
signAgreement(e) {
this.signAgreementObjDetail = e
const that = this
uni.showLoading()
uni.$api.evaluationApi
.checkSignAgreement({
evalOrderNo: e.evalOrderNo
})
.then(async res => {
console.log('res:', res)
if (res.data.code == 0) {
uni.hideLoading()
console.log('res.data.data:', res.data.data)
if (!res.data.data) {
this.signAgreementObj = {
evalOrderNo: '',
custodianName: '',
custodianIdentityCode: '',
custodianAddress: '',
custodianPhone: ''
}
// that.addSignAgreementObj.evalOrderNo = e.evalOrderNo
that.$refs.signAgreementPopup.open()
} else {
}
}
})
},
cancelSign(e) { cancelSign(e) {
this.cancelSignObj.evalOrderNo = e.evalOrderNo this.cancelSignObj.evalOrderNo = e.evalOrderNo
this.$refs.cancleSignPopup.open() this.$refs.cancleSignPopup.open()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!