Commit 37745a5a by cen

fix: 定时器

1 parent e67dc8de
...@@ -1100,6 +1100,7 @@ export default { ...@@ -1100,6 +1100,7 @@ export default {
}) })
console.log('提交的表单数据:', this.formData) console.log('提交的表单数据:', this.formData)
if (this.query.type === 'add') { if (this.query.type === 'add') {
uni.showLoading()
const res = await uni.$api.evaluationApi.evalOrderCreate(this.formData) const res = await uni.$api.evaluationApi.evalOrderCreate(this.formData)
console.log('res:', res) console.log('res:', res)
if (res.data.code == 0) { if (res.data.code == 0) {
...@@ -1121,6 +1122,7 @@ export default { ...@@ -1121,6 +1122,7 @@ export default {
}) })
} }
} else if (this.query.type === 'edit') { } else if (this.query.type === 'edit') {
uni.showLoading()
const res = await uni.$api.evaluationApi.evalOrderUpdate(this.formData) const res = await uni.$api.evaluationApi.evalOrderUpdate(this.formData)
console.log('res:', res) console.log('res:', res)
if (res.data.code == 0) { if (res.data.code == 0) {
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
<view class="sprites-icon icon-play"></view> <view class="sprites-icon icon-play"></view>
</view> </view>
</view> </view>
<cover-view class="delete-icon" @click.stop="deleteMedia(field.key, index)"> <view class="delete-icon" @click.stop="deleteMedia(field.key, index)">
<uni-icons type="clear" size="16" color="#fff"></uni-icons> <uni-icons type="clear" size="16" color="#fff"></uni-icons>
</cover-view> </view>
</view> </view>
<!-- 上传按钮,当未达到最大限制时显示 --> <!-- 上传按钮,当未达到最大限制时显示 -->
<view v-if="!hasReachedMax(field)" class="upload-item" @click="handleMediaUpload(field)"> <view v-if="!hasReachedMax(field)" class="upload-item" @click="handleMediaUpload(field)">
......
...@@ -267,7 +267,7 @@ export default { ...@@ -267,7 +267,7 @@ export default {
if (field.type === 'pdf') { if (field.type === 'pdf') {
this.$refs.addAgreementPopup.open().then(() => { this.$refs.addAgreementPopup.open().then(() => {
console.log('this.supplementaryClauseText', this.supplementaryClauseText) console.log('this.supplementaryClauseText', this.supplementaryClauseText)
uni.showLoading()
uni.$api.evaluationApi uni.$api.evaluationApi
.salesAgreementPreview({ .salesAgreementPreview({
evalOrderNo: this.query.evalOrderNo, evalOrderNo: this.query.evalOrderNo,
...@@ -275,6 +275,7 @@ export default { ...@@ -275,6 +275,7 @@ export default {
}) })
.then(res => { .then(res => {
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading()
this.$refs.addAgreementPopup.closePopup() this.$refs.addAgreementPopup.closePopup()
this.formFields.forEach(item => { this.formFields.forEach(item => {
if (item.key === field.key) { if (item.key === field.key) {
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
</view> </view>
</template> </template>
</GeneralPopup> </GeneralPopup>
<GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" @confirm="confirmTips" :noTitle="true"> <GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" :noTitle="true">
<template #content> <template #content>
<view> <view>
<image class="tipsPopupBg" :src="bg" /> <image class="tipsPopupBg" :src="bg" />
...@@ -340,10 +340,12 @@ export default { ...@@ -340,10 +340,12 @@ export default {
} }
}, },
async reSubmit(e) { async reSubmit(e) {
uni.showLoading()
const res = await uni.$api.evaluationApi.evalOrderConfirmVehicleDelivery({ const res = await uni.$api.evaluationApi.evalOrderConfirmVehicleDelivery({
evalOrderNo: e.evalOrderNo evalOrderNo: e.evalOrderNo
}) })
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading()
uni.showToast({ uni.showToast({
title: '重新提交成功', title: '重新提交成功',
icon: 'none' icon: 'none'
...@@ -365,20 +367,23 @@ export default { ...@@ -365,20 +367,23 @@ export default {
}, },
async amountRequested(e) { async amountRequested(e) {
const that = this const that = this
uni.showLoading()
const res = await uni.$api.evaluationApi.getContractDetail({ const res = await uni.$api.evaluationApi.getContractDetail({
contractNo: e.saleContractNo contractNo: e.saleContractNo
}) })
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading()
const contractDetail = res.data.data const contractDetail = res.data.data
console.log('res:', contractDetail) console.log('res:', contractDetail)
this.payPopupObj = { ...that.payPopupObj, ...JSON.parse(contractDetail.electronicContractField), ...e } this.payPopupObj = { ...that.payPopupObj, ...JSON.parse(contractDetail.electronicContractField), ...e }
that.$refs.amountRequestedPopup.open().then(async () => { that.$refs.amountRequestedPopup.open().then(async () => {
if (e.type == 'payDeposit') { if (e.type == 'payDeposit') {
uni.showLoading()
const res = await uni.$api.evaluationApi.payDepositApplication({ const res = await uni.$api.evaluationApi.payDepositApplication({
evalOrderNo: e.evalOrderNo evalOrderNo: e.evalOrderNo
}) })
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading()
uni.showToast({ uni.showToast({
title: '定金已申请,请等待付款审批', title: '定金已申请,请等待付款审批',
icon: 'none' icon: 'none'
...@@ -387,6 +392,7 @@ export default { ...@@ -387,6 +392,7 @@ export default {
that.search() that.search()
} }
} else { } else {
uni.showLoading()
uni.$api.evaluationApi uni.$api.evaluationApi
.checkSignAgreement({ .checkSignAgreement({
evalOrderNo: e.evalOrderNo evalOrderNo: e.evalOrderNo
...@@ -397,6 +403,7 @@ export default { ...@@ -397,6 +403,7 @@ export default {
that.$refs.signAgreementPopup.open().then(() => { that.$refs.signAgreementPopup.open().then(() => {
uni.$api.evaluationApi.sendCustodyAgreement({ ...that.signAgreementObj, evalOrderNo: e.evalOrderNo }).then(res => { uni.$api.evaluationApi.sendCustodyAgreement({ ...that.signAgreementObj, evalOrderNo: e.evalOrderNo }).then(res => {
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading()
uni.showToast({ uni.showToast({
title: '代保管协议已发送', title: '代保管协议已发送',
icon: 'none' icon: 'none'
...@@ -407,10 +414,12 @@ export default { ...@@ -407,10 +414,12 @@ export default {
}) })
}) })
} else { } else {
uni.showLoading()
const res = await uni.$api.evaluationApi.signAgreement({ const res = await uni.$api.evaluationApi.signAgreement({
evalOrderNo: e.evalOrderNo evalOrderNo: e.evalOrderNo
}) })
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading()
uni.showToast({ uni.showToast({
title: e.status == 40 && e.paymentType == 1 ? '尾款款项已申请,完成代保管协议电子签约后将安排支付尾款' : '全款款项已申请,完成代保管协议电子签约后将安排支付全款', title: e.status == 40 && e.paymentType == 1 ? '尾款款项已申请,完成代保管协议电子签约后将安排支付尾款' : '全款款项已申请,完成代保管协议电子签约后将安排支付全款',
icon: 'none' icon: 'none'
...@@ -489,9 +498,12 @@ export default { ...@@ -489,9 +498,12 @@ export default {
} }
this.$refs.tipsPopup this.$refs.tipsPopup
.open() .open()
.then(() => { .then(async () => {
const res = uni.$api.evaluationApi.evalOrderCancelContract(this.cancelSignObj) uni.showLoading()
const res = await uni.$api.evaluationApi.evalOrderCancelContract(this.cancelSignObj)
console.log('res:', res)
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading()
uni.showToast({ uni.showToast({
title: '取消签约成功', title: '取消签约成功',
icon: 'none' icon: 'none'
...@@ -515,25 +527,27 @@ export default { ...@@ -515,25 +527,27 @@ export default {
this.$refs.orderPopup.open() this.$refs.orderPopup.open()
}, },
async addSignAgreement() { async addSignAgreement() {
if (!this.addSignAgreementObj.custodianName) {
uni.showToast({ title: '请输入签约保管人', icon: 'none' })
return Promise.reject()
}
if (!this.addSignAgreementObj.custodianIdentityCode) {
uni.showToast({ title: '请输入身份证号', icon: 'none' })
return Promise.reject()
}
if (!this.addSignAgreementObj.custodianPhone) {
uni.showToast({ title: '请输入手机号', icon: 'none' })
return Promise.reject()
}
if (!this.addSignAgreementObj.custodianAddress) {
uni.showToast({ title: '请输入地址', icon: 'none' })
return Promise.reject()
}
this.$refs.addSignAgreementPopup.open().then(() => { this.$refs.addSignAgreementPopup.open().then(() => {
if (!this.addSignAgreementObj.custodianName) {
uni.showToast({ title: '请输入签约保管人', icon: 'none' })
return Promise.reject()
}
if (!this.addSignAgreementObj.custodianIdentityCode) {
uni.showToast({ title: '请输入身份证号', icon: 'none' })
return Promise.reject()
}
if (!this.addSignAgreementObj.custodianPhone) {
uni.showToast({ title: '请输入手机号', icon: 'none' })
return Promise.reject()
}
if (!this.addSignAgreementObj.custodianAddress) {
uni.showToast({ title: '请输入地址', icon: 'none' })
return Promise.reject()
}
uni.showLoading()
uni.$api.evaluationApi.addCustodyAgreement(this.addSignAgreementObj).then(res => { uni.$api.evaluationApi.addCustodyAgreement(this.addSignAgreementObj).then(res => {
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading()
console.log('res:', res) console.log('res:', res)
this.currentPage = 1 this.currentPage = 1
this.search() this.search()
......
...@@ -496,10 +496,12 @@ export default { ...@@ -496,10 +496,12 @@ export default {
this.query = options this.query = options
}, },
async getEvalOrderSimpleDetail() { async getEvalOrderSimpleDetail() {
uni.showLoading()
const res = await uni.$api.evaluationApi.evalOrderSimpleDetail({ const res = await uni.$api.evaluationApi.evalOrderSimpleDetail({
evalOrderNo: this.query.evalOrderNo evalOrderNo: this.query.evalOrderNo
}) })
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading()
this.$set(this.formData, 'partAName', res.data.data.evalCarLicense.previousOwnerName) this.$set(this.formData, 'partAName', res.data.data.evalCarLicense.previousOwnerName)
this.$set(this.formData, 'payeeName', res.data.data.evalCarLicense.previousOwnerName) this.$set(this.formData, 'payeeName', res.data.data.evalCarLicense.previousOwnerName)
this.$set(this.formData, 'phone', res.data.data.evalCarLicense.previousOwnerPhone) this.$set(this.formData, 'phone', res.data.data.evalCarLicense.previousOwnerPhone)
...@@ -938,10 +940,12 @@ export default { ...@@ -938,10 +940,12 @@ export default {
delete this.formData.depositPrice delete this.formData.depositPrice
delete this.formData.finalPrice delete this.formData.finalPrice
} }
uni.showLoading()
const res = uni.$api.evaluationApi.evalOrderSignContract({ ...this.formData, evalOrderNo: this.query.evalOrderNo }) const res = uni.$api.evaluationApi.evalOrderSignContract({ ...this.formData, evalOrderNo: this.query.evalOrderNo })
res.then(res => { res.then(res => {
console.log('res:', res) console.log('res:', res)
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading()
uni.showToast({ uni.showToast({
title: '电子签约已发送,请注意查收短信', title: '电子签约已发送,请注意查收短信',
icon: 'none' icon: 'none'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!