Commit fe00424a by 前端

Merge branch 'hotfix_V4.51.2' into 'develop'

上线合并

See merge request !370
2 parents 4db397b0 6b38a26a
Showing 30 changed files with 416 additions and 97 deletions
...@@ -112,7 +112,8 @@ ...@@ -112,7 +112,8 @@
"pages/staffDaily/staffDaily", "pages/staffDaily/staffDaily",
"pages/upgradeStaffDaily/upgradeStaffDaily", "pages/upgradeStaffDaily/upgradeStaffDaily",
"pages/supervisorDaily/supervisorDaily", "pages/supervisorDaily/supervisorDaily",
"pages/residentManage/residentManage" "pages/residentManage/residentManage",
"pages/mentorshipManage/mentorshipManage"
] ]
}, },
{ {
...@@ -165,7 +166,8 @@ ...@@ -165,7 +166,8 @@
"pages/aiCheck/redundance/redundance", "pages/aiCheck/redundance/redundance",
"pages/aiCheck/detail/detail", "pages/aiCheck/detail/detail",
"pages/receptionDetail/receptionDetail", "pages/receptionDetail/receptionDetail",
"pages/aiCheck/defense/defense" "pages/aiCheck/defense/defense",
"pages/extract/extract/extract"
] ]
}, },
{ {
......
...@@ -223,5 +223,9 @@ module.exports = { ...@@ -223,5 +223,9 @@ module.exports = {
// 校验流水号 // 校验流水号
checkRecord(data) { checkRecord(data) {
return api.post("dj.api.smartcarlife.vehicle.damage.upgrade.quotation.record.check", data) return api.post("dj.api.smartcarlife.vehicle.damage.upgrade.quotation.record.check", data)
},
// 校验订单是否需要上传合同协议
checkZyPayFlag(data) {
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.check', data)
} }
} }
// packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.js // packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.js
import { getOrderDetail,getQuotationInfoById } from '../../../api' import { getOrderDetail,getQuotationInfoById, updateCustomerInfo } from '../../../api'
let timer = null let timer = null
Page({ Page({
/** /**
...@@ -11,11 +11,13 @@ Page({ ...@@ -11,11 +11,13 @@ Page({
// editName: '修改', // editName: '修改',
// cancelName: '稍后处理', // cancelName: '稍后处理',
timer: null timer: null
} },
showZyPopup: false,
zyFlag: false
}, },
// 倒计时10s功能 // 倒计时10s功能
countDownTimer() { countDownTimer(zyFlag) {
let sec = 10 let sec = 10
let { id, orderId, timer } = this.data let { id, orderId, timer } = this.data
let that = this let that = this
...@@ -23,13 +25,17 @@ Page({ ...@@ -23,13 +25,17 @@ Page({
let objNameStr = 'textNameObj.confirmName' let objNameStr = 'textNameObj.confirmName'
// const str = '前往提单(10s)' // const str = '前往提单(10s)'
that.setData({ that.setData({
[objNameStr]: `下一步·去签名(4/4)(${sec}s)` [objNameStr]: `${zyFlag ? '下一步·上传协议(4/4)' : '下一步·去签名(4/4)'}(${sec}s)`,
showBtnFlag: true
}) })
sec-- sec--
if (sec == -1) { if (sec == -1) {
clearInterval(timer) // 清除定时器 clearInterval(timer) // 清除定时器
// 跳转提单页面 // 跳转提单页面
// this.navigator() // this.navigator()
if (zyFlag) { // 需要上传合同协议
return this.setData({ showZyPopup: true }) // 上传合同协议弹窗
}
// 跳转签名页面 // 跳转签名页面
wx.$router.redirectTo('signature', { id, orderId }) wx.$router.redirectTo('signature', { id, orderId })
} }
...@@ -39,9 +45,10 @@ Page({ ...@@ -39,9 +45,10 @@ Page({
btnTap(e) { btnTap(e) {
console.log(e) console.log(e)
let { name } = e.detail let { name } = e.detail
let { id, orderId, timer } = this.data let { id, orderId, timer, zyFlag } = this.data
if (name == 'confirm') { if (name == 'confirm') {
clearInterval(timer) clearInterval(timer)
if (zyFlag) return this.setData({showZyPopup: true})
wx.$router.redirectTo('signature', { id, orderId }) wx.$router.redirectTo('signature', { id, orderId })
} else { } else {
// this.triggerEvent('editSave') // this.triggerEvent('editSave')
...@@ -50,6 +57,36 @@ Page({ ...@@ -50,6 +57,36 @@ Page({
// wx.$router.reLaunch('packageEquity.index') // wx.$router.reLaunch('packageEquity.index')
} }
}, },
// 合同协议上传确定
zyPayConfirm(e) {
wx.$util.showLoading()
let { zyPayOrderInfo } = this.data
// 更新客户信息
updateCustomerInfo({ ...zyPayOrderInfo, zyPayUrl: e.detail?.zyPayUrl?.join(',') }).then(result => {
wx.$util.hideLoading()
let { code, message } = result
if (code == 0) {
// 返回到报价单列表
wx.$router.reLaunch("packageEquity.equityPage", {
tabIndex: 1,
})
} else {
wx.$util.showToast(message)
}
})
},
getInsurance(res) {
let obj = wx.$util.deepClone(res), orderInfo = {};
let { default4SStoreInfo } = wx.$util.getUserInfo();
orderInfo.check = true
orderInfo.id = obj.id
orderInfo.orderId = obj.orderId
orderInfo.merchantId4s = default4SStoreInfo?.merchantId;
orderInfo.merchantName4s = default4SStoreInfo?.merchantName;
orderInfo.referrer = obj.referrer
orderInfo.referrerId = obj.referrerId
return orderInfo;
},
navigator() { navigator() {
let { orderId } = this.data let { orderId } = this.data
wx.$router.go('serviceInfo', { wx.$router.go('serviceInfo', {
...@@ -85,16 +122,22 @@ Page({ ...@@ -85,16 +122,22 @@ Page({
} }
}) })
} }
// 处理用于上传合同协议更新客户信息接口的参数
let zyPayOrderInfo = this.getInsurance(data)
this.setData({ this.setData({
orderCode: payId, orderCode: payId,
merchantAddress, merchantAddress,
merchantName4s, merchantName4s,
orderId, orderId,
['orderDetail.quotationGoodsInfoList']:quotationGoodsInfoList ['orderDetail.quotationGoodsInfoList']:quotationGoodsInfoList,
zyPayOrderInfo
// quotationGoodsInfoList // quotationGoodsInfoList
// id // id
}) })
this.createWxQrcode() this.setData({
zyFlag: data?.zyPayStatus == 1 && data.orderStatus == 7
})
this.countDownTimer(data?.zyPayStatus == 1 && data.orderStatus == 7)
}) })
}, },
getOrderDetail() { getOrderDetail() {
...@@ -137,7 +180,7 @@ Page({ ...@@ -137,7 +180,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {
this.countDownTimer() // this.countDownTimer()
}, },
/** /**
...@@ -148,12 +191,16 @@ Page({ ...@@ -148,12 +191,16 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() {
clearInterval(timer) // 清除定时器
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() {
clearInterval(timer) // 清除定时器
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
......
{ {
"usingComponents": { "usingComponents": {
"Gl-Button-Group": "../../../components/GlButtonGroup/GlButtonGroup", "Gl-Button-Group": "../../../components/GlButtonGroup/GlButtonGroup",
"order-info": "../../../components/orderInfoCom/orderInfoCom" "order-info": "../../../components/orderInfoCom/orderInfoCom",
"zy-pay-popup": "../components/zyPayPopup/zyPayPopup"
}, },
"navigationBarTitleText": "订单详情" "navigationBarTitleText": "订单详情"
} }
...@@ -60,3 +60,6 @@ ...@@ -60,3 +60,6 @@
width: var(--fontSize710); width: var(--fontSize710);
margin: 0 auto; margin: 0 auto;
} }
.btn_box {
padding: 0 var(--fontSize64)
}
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="descText"> <view class="descText">
<text>1.</text> <text>1.</text>
<text class="fontBold">客户服务合同</text> <text class="fontBold">客户服务合同</text>
<text>:手机端支持ocr快速出单,点下一步去签名;</text> <text>:手机端支持ocr快速出单,点权益提单-选择待补录-去录单;</text>
</view> </view>
<view class="descText"> <view class="descText">
2. 2.
...@@ -21,5 +21,9 @@ ...@@ -21,5 +21,9 @@
<view class="order-info"> <view class="order-info">
<order-info OderType="detail" orderInfo="{{orderDetail}}" /> <order-info OderType="detail" orderInfo="{{orderDetail}}" />
</view> </view>
<Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{textNameObj}}" /> <view class="btn_box">
<Gl-Button-Group bindbtnTap="btnTap" wx:if="{{showBtnFlag}}" textNameObj="{{textNameObj}}" />
</view>
<!-- 上传合同协议 -->
<zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}" onlinePaymentFlag="{{true}}" bindconfirm="zyPayConfirm"></zy-pay-popup>
...@@ -80,11 +80,12 @@ Page({ ...@@ -80,11 +80,12 @@ Page({
// 生成小程序码 // 生成小程序码
createWxQrcode() { createWxQrcode() {
let _this = this let _this = this
let { zyVoucherStatus } = _this.data
let oParams = {} let oParams = {}
oParams.appId = 'wx06d1198e751435d1' oParams.appId = 'wx06d1198e751435d1'
oParams.qrcodeType = 'QR_WXA_UNLIMIT' oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'packagesPayment/pages/payment/index' oParams.path = 'packagesPayment/pages/payment/index'
oParams.scene = `orderCode=${_this.data.orderCode}&workWxSessionId=${wx.getStorageSync('dj_boutique_sessionId')}` oParams.scene = `orderCode=${_this.data.orderCode}&workWxSessionId=${wx.getStorageSync('dj_boutique_sessionId')}&zyVoucherStatus=${zyVoucherStatus}`
oParams.channelType = 1 oParams.channelType = 1
// B端小程序调用接口生成领券码时,传参userId用uuid,类型由int变string // B端小程序调用接口生成领券码时,传参userId用uuid,类型由int变string
createQrcodeImage(oParams).then(res => { createQrcodeImage(oParams).then(res => {
...@@ -235,10 +236,10 @@ Page({ ...@@ -235,10 +236,10 @@ Page({
onRoute(options) { onRoute(options) {
// console.log(options,'options'); // console.log(options,'options');
// console.log(options = 19) // console.log(options = 19)
let { data, id } = options let { data, id, zyVoucherStatus } = options
// id = 150 // id = 150
// orderCode: 230724111753590 // orderCode: 230724111753590
this.setData({ id }) this.setData({ id, zyVoucherStatus })
this.getQuotationInfoById() this.getQuotationInfoById()
}, },
/** /**
......
...@@ -41,7 +41,7 @@ Component({ ...@@ -41,7 +41,7 @@ Component({
this.setOrderStatusListDisabled(n) this.setOrderStatusListDisabled(n)
} }
}, },
zyStatus: { // 延保协议状态 zyStatus: { // 合同协议状态
type: String, type: String,
value: null, value: null,
observer: function (n) { observer: function (n) {
...@@ -146,7 +146,7 @@ Component({ ...@@ -146,7 +146,7 @@ Component({
value: 5 value: 5
} }
], ],
// 延保协议状态数据 // 合同协议状态数据
zyPayStatus: [{ zyPayStatus: [{
name: '全部', name: '全部',
active: true, active: true,
...@@ -316,7 +316,7 @@ Component({ ...@@ -316,7 +316,7 @@ Component({
i.active = false i.active = false
}) })
target[index].active = true target[index].active = true
// 切换延保协议,将支付状态置为全部 // 切换合同协议,将支付状态置为全部
if (listName === 'zyPayStatus' && index != 0) { if (listName === 'zyPayStatus' && index != 0) {
let { orderStatus } = this.data.form let { orderStatus } = this.data.form
orderStatus?.map((val, idx) => { orderStatus?.map((val, idx) => {
...@@ -327,7 +327,7 @@ Component({ ...@@ -327,7 +327,7 @@ Component({
'form.orderStatus': orderStatus 'form.orderStatus': orderStatus
}) })
} }
// 切换订单状态,非全部,将延保协议置为全部 // 切换订单状态,非全部,将合同协议置为全部
if (listName === 'orderStatus' && index != 0) { if (listName === 'orderStatus' && index != 0) {
let { zyPayStatus } = this.data.form let { zyPayStatus } = this.data.form
zyPayStatus?.map((val, idx) => { zyPayStatus?.map((val, idx) => {
...@@ -353,7 +353,7 @@ Component({ ...@@ -353,7 +353,7 @@ Component({
orderStatus.map((e, index) => { orderStatus.map((e, index) => {
e.active = e.value == statusType e.active = e.value == statusType
}) })
if (statusType !== '') { // 有订单状态,将延保协议状态置为全部 if (statusType !== '') { // 有订单状态,将合同协议状态置为全部
zyPayStatus.map((e, index) => { zyPayStatus.map((e, index) => {
e.active = false e.active = false
if (index == 0) e.active = true if (index == 0) e.active = true
...@@ -366,10 +366,10 @@ Component({ ...@@ -366,10 +366,10 @@ Component({
['form.orderStatus']: wx.$util.deepClone(orderStatus) ['form.orderStatus']: wx.$util.deepClone(orderStatus)
}) })
}, },
// 延保协议 // 合同协议
setZyPayStatus(value) { setZyPayStatus(value) {
let { zyPayStatus, orderStatus } = this.data let { zyPayStatus, orderStatus } = this.data
if (value !== '') { // 没有延保协议状态时 防止干扰 if (value !== '') { // 没有合同协议状态时 防止干扰
orderStatus.map((e, index) => { orderStatus.map((e, index) => {
e.active = false e.active = false
if (index == 0) e.active = true if (index == 0) e.active = true
...@@ -464,7 +464,7 @@ Component({ ...@@ -464,7 +464,7 @@ Component({
val.active = false val.active = false
if (index == 0) val.active = true if (index == 0) val.active = true
}) })
// 将延保协议状态置为全部 // 将合同协议状态置为全部
zyPayStatus?.map((val, index) => { zyPayStatus?.map((val, index) => {
val.active = false val.active = false
if (index == 0) val.active = true if (index == 0) val.active = true
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
</view> </view>
<view class="box"> <view class="box">
<view class="title"> <view class="title">
延保协议 合同协议
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.zyPayStatus}}" wx:key="index"> <block wx:for="{{form.zyPayStatus}}" wx:key="index">
......
...@@ -23,7 +23,9 @@ Component({ ...@@ -23,7 +23,9 @@ Component({
} }
} }
}, },
isListShow: Boolean isListShow: Boolean, // 是否报价单列表
onlinePaymentFlag: Boolean, // 是否线上支付
supplementaryFlag: Boolean // 是否订单补录
}, },
/** /**
...@@ -54,15 +56,19 @@ Component({ ...@@ -54,15 +56,19 @@ Component({
uploadImages() { uploadImages() {
let _this = this let _this = this
let { fileList } = _this.data let { fileList } = _this.data
wx.chooseImage({ wx.chooseMedia({
count: 9 - fileList?.length, count: 9 - fileList?.length,
sizeType: ['original'], // 选择图片为原图
mediaType: ['image'],
success(res) { success(res) {
_this.setData({ _this.setData({
loadingFlag: true loadingFlag: true
}) })
const uploadImages = async (tempFilePaths) => { console.log(res)
const uploadImages = async (tempFiles) => {
try { try {
for (const val of tempFilePaths) { for (const item of tempFiles) {
const val = item.tempFilePath
const imgType = val.split('.')[1] const imgType = val.split('.')[1]
const type = imgType === 'unknown' ? 'jpg' : imgType const type = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => { const _res = await new Promise((resolve, reject) => {
...@@ -96,7 +102,7 @@ Component({ ...@@ -96,7 +102,7 @@ Component({
}) })
} }
} }
uploadImages(res?.tempFilePaths) uploadImages(res?.tempFiles)
} }
}) })
}, },
...@@ -202,8 +208,12 @@ Component({ ...@@ -202,8 +208,12 @@ Component({
}, },
close(e, pageBackNum) { close(e, pageBackNum) {
// pageBackNum 从h5返回页面层级数 // pageBackNum 从h5返回页面层级数
let { isListShow } = this.data let { isListShow, onlinePaymentFlag, supplementaryFlag } = this.data
if (isListShow) return this.setData({show: false, fileList: []}) if (isListShow) return this.setData({show: false, fileList: []})
// 线上收款/补录订单稍后补录 跳转到数字报价单列表
if (onlinePaymentFlag || supplementaryFlag) return wx.$router.reLaunch("packageEquity.equityPage", {
tabIndex: 1,
})
let thisPage = wx.$router.getPageInstance(pageBackNum || 1) let thisPage = wx.$router.getPageInstance(pageBackNum || 1)
thisPage.setData({ thisPage.setData({
['orderInfo.zyPayUrl']: '', ['orderInfo.zyPayUrl']: '',
...@@ -213,10 +223,11 @@ Component({ ...@@ -213,10 +223,11 @@ Component({
}, },
confirm(e, pageBackNum) { confirm(e, pageBackNum) {
// pageBackNum 从h5返回页面层级数 // pageBackNum 从h5返回页面层级数
let { fileList, isListShow } = this.data let { fileList, isListShow, onlinePaymentFlag, supplementaryFlag } = this.data
let thisPage = wx.$router.getPageInstance(pageBackNum || 1) let thisPage = wx.$router.getPageInstance(pageBackNum || 1)
if (fileList.length) { if (fileList.length) {
if (isListShow) { // 报价单列表上传协议或者线上支付方式上传协议或者补录订单上传协议
if (isListShow || onlinePaymentFlag || supplementaryFlag) {
this.triggerEvent('confirm', {zyPayUrl: fileList.map(item => item.url)}) this.triggerEvent('confirm', {zyPayUrl: fileList.map(item => item.url)})
} else { } else {
thisPage.setData({ thisPage.setData({
...@@ -226,7 +237,7 @@ Component({ ...@@ -226,7 +237,7 @@ Component({
thisPage.handleSecondConfirm() thisPage.handleSecondConfirm()
} }
} else { } else {
wx.$util.showToast('请上传延保协议') wx.$util.showToast('请上传合同协议')
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block wx:if="{{!showChangeFileType && !loadingFlag}}"> <block wx:if="{{!showChangeFileType && !loadingFlag}}">
<popup <popup
title="{{'上传延保协议'}}" title="{{'上传合同协议'}}"
show="{{show}}" show="{{show}}"
bindconfirm="confirm" bindconfirm="confirm"
bindcancel="close" bindcancel="close"
......
...@@ -11,7 +11,9 @@ import { ...@@ -11,7 +11,9 @@ import {
staffDailyReportMerchantValid, staffDailyReportMerchantValid,
updateOrderStatus, updateOrderStatus,
orderSettingList, orderSettingList,
checkRecord checkRecord,
checkZyPayFlag,
updateCustomerInfo
} from "../../../api"; } from "../../../api";
import { quotedImgUrl } from "~/config"; import { quotedImgUrl } from "~/config";
import dataForm from '../components/constant/stepData' import dataForm from '../components/constant/stepData'
...@@ -102,7 +104,7 @@ Page({ ...@@ -102,7 +104,7 @@ Page({
showVinDialog: false, showVinDialog: false,
secFormData: {}, secFormData: {},
tempVin: '', tempVin: '',
showZyPopup: false // 上传延保协议弹窗 showZyPopup: false // 上传合同协议弹窗
}, },
closeTips() { closeTips() {
this.setData({ this.setData({
...@@ -206,6 +208,7 @@ Page({ ...@@ -206,6 +208,7 @@ Page({
}); });
}, },
setQuotationRecording() { setQuotationRecording() {
this.setData({supplementaryFlag: true}) // 补录订单标识
// 获取保险信息 // 获取保险信息
let { outTradeNo } = this.data; let { outTradeNo } = this.data;
let orderInfo = this.getInsurance(); let orderInfo = this.getInsurance();
...@@ -216,7 +219,7 @@ Page({ ...@@ -216,7 +219,7 @@ Page({
orderInfo.outTradeNo = outTradeNo; orderInfo.outTradeNo = outTradeNo;
wx.showLoading("提交中..."); wx.showLoading("提交中...");
quotationRecording(orderInfo) quotationRecording(orderInfo)
.then((result) => { .then(async (result) => {
wx.hideLoading(); wx.hideLoading();
console.log(result); console.log(result);
let { code, data, message } = result; let { code, data, message } = result;
...@@ -224,6 +227,15 @@ Page({ ...@@ -224,6 +227,15 @@ Page({
this.setData({ this.setData({
confirmStatus: false, confirmStatus: false,
}); });
// 校验下单商品是否需要上传合同协议
const params = {
goodsIds: orderInfo?.vdQuotationGoodsList?.map(v => v.goodsId)
}
let res = await checkZyPayFlag(params)
if (res?.code == 0) {
if (res?.data) {
return this.setData({showZyPopup: true, supplementaryOrderId: data})
}
wx.showToast({ wx.showToast({
title: "补录订单成功", title: "补录订单成功",
icon: "success", icon: "success",
...@@ -237,6 +249,12 @@ Page({ ...@@ -237,6 +249,12 @@ Page({
this.setData({ this.setData({
confirmStatus: false, confirmStatus: false,
}); });
wx.$util.showToast(result?.message)
}
} else {
this.setData({
confirmStatus: false,
});
wx.$util.showToast(message); wx.$util.showToast(message);
} }
}) })
...@@ -244,6 +262,44 @@ Page({ ...@@ -244,6 +262,44 @@ Page({
console.log(err); console.log(err);
}); });
}, },
// 补录订单上传合同协议点击确定
zyPayConfirm(e) {
let { supplementaryOrderId } = this.data // 补录订单id
getQuotationInfoById({
id: supplementaryOrderId
}).then(res => {
let { code, message, data } = res
if (code == 0) {
let obj = wx.$util.deepClone(data), orderInfo = {};
let { default4SStoreInfo } = wx.$util.getUserInfo();
orderInfo.check = true
orderInfo.id = obj.id
orderInfo.orderId = obj.orderId
orderInfo.merchantId4s = default4SStoreInfo?.merchantId;
orderInfo.merchantName4s = default4SStoreInfo?.merchantName;
orderInfo.referrer = obj.referrer
orderInfo.referrerId = obj.referrerId
// 更新客户信息
updateCustomerInfo({ ...orderInfo, zyPayUrl: e.detail?.zyPayUrl?.join(',') }).then(result => {
this.setData({
showZyPopup: false
}, () => {
wx.showToast({
title: "补录订单成功",
icon: "success",
});
setTimeout(() => {
wx.$router.reLaunch("packageEquity.equityPage", {
tabIndex: 1,
});
}, 1000);
})
})
} else {
wx.$util.showToast(message)
}
})
},
staffDailyReportMerchantValid(userInfo) { staffDailyReportMerchantValid(userInfo) {
// let { userInfo } = this.data // let { userInfo } = this.data
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -309,7 +365,7 @@ Page({ ...@@ -309,7 +365,7 @@ Page({
async handleSecondConfirm(e) { async handleSecondConfirm(e) {
// debugger // debugger
let { orderInfo, outTradeNo, confirmStatus, userInfo, carBrandList } = this.data; let { orderInfo, outTradeNo, confirmStatus, userInfo } = this.data;
let staffCheck = await this.staffDailyReportMerchantValid(userInfo); let staffCheck = await this.staffDailyReportMerchantValid(userInfo);
if (staffCheck) return false;; if (staffCheck) return false;;
...@@ -388,27 +444,30 @@ Page({ ...@@ -388,27 +444,30 @@ Page({
console.log("id", id); console.log("id", id);
// { orderId:data.orderId, id } // { orderId:data.orderId, id }
// return // return
// 线上支付判断是否需要上传协议
let obj = this.getInsurance()
const params = {
goodsIds: obj?.vdQuotationGoodsList?.map(v => v.goodsId)
}
let res = await checkZyPayFlag(params)
let zyPayFlag = res?.code == 0 && res?.data
status.code == 0 status.code == 0
? this.navigatorNext({ ? this.navigatorNext({
id, id,
orderId: status.data.orderId, orderId: status.data.orderId,
zyVoucherStatus: zyPayFlag ? 1 : 0 // "中邮凭证上传状态:0-无需上传,1-待上传,2-已上传")
}) })
: wx.$util.showToast(status.message || "报价失败"); : wx.$util.showToast(status.message || "报价失败");
} else { } else {
console.log(message); console.log(message);
wx.hideLoading(); wx.hideLoading();
// 将延保协议弹窗关闭 清空延保协议上传内容,支付凭证内容清空 // 将合同协议弹窗关闭 清空合同协议上传内容,支付凭证内容清空
let owner = this.getOwnerInfo();
if (orderInfo.payType == 2 && carBrandList?.includes(owner?.carChildsBrandId)) {
this.setData({ this.setData({
confirmStatus: false,
showZyPopup: false, showZyPopup: false,
['orderInfo.zyPayUrl']: '', ['orderInfo.zyPayUrl']: '',
['orderInfo.transactionNo']: '', ['orderInfo.transactionNo']: '',
['orderInfo.paymentDocList']: [] ['orderInfo.paymentDocList']: []
})
}
this.setData({
confirmStatus: false
}); });
wx.$util.showToast(message || "报价失败"); wx.$util.showToast(message || "报价失败");
} }
...@@ -487,7 +546,6 @@ Page({ ...@@ -487,7 +546,6 @@ Page({
return owner; return owner;
}, },
handleSecondConfirmCheck(check, detail) { handleSecondConfirmCheck(check, detail) {
let { carBrandList } = this.data
// 获取保险信息 // 获取保险信息
let orderInfo = this.getInsurance(); let orderInfo = this.getInsurance();
let owner = this.getOwnerInfo(); let owner = this.getOwnerInfo();
...@@ -496,14 +554,26 @@ Page({ ...@@ -496,14 +554,26 @@ Page({
orderInfo.check = check; orderInfo.check = check;
orderInfo.paymentDocList = orderInfo.paymentDocList || []; orderInfo.paymentDocList = orderInfo.paymentDocList || [];
console.log("orderInfo", orderInfo); console.log("orderInfo", orderInfo);
// 门店收款且是智界/享界车型 弹出上传延保协议 // 商品信息包含权益服务/延保类目并且是第三方 弹出上传合同协议
try { try {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
// 当延保协议弹窗点击稍后补录会传值detail:cancel, 提交表单时不会重复弹出延保协议弹出 标记错误订单的补录时无需上传延保协议 // 当合同协议弹窗点击稍后补录会传值detail:cancel, 提交表单时不会重复弹出合同协议弹出
if (check && orderInfo.payType == 2 && carBrandList?.includes(orderInfo?.owner?.carChildsBrandId) && detail != 'cancel' && !orderInfo?.zyPayUrl && !orderInfo.resetOrder) { if (check && (orderInfo.payType == 2 || orderInfo.payType == 5) && detail != 'cancel' && !orderInfo?.zyPayUrl) {
// 添加流水号校验
wx.hideLoading() wx.hideLoading()
let result = await checkRecord({ transactionNo: orderInfo.transactionNo }) // 请求接口判断是否需要上传合同协议
const params = {
goodsIds: orderInfo?.vdQuotationGoodsList?.map(v => v.goodsId)
}
let res = await checkZyPayFlag(params)
if (res?.code == 0) {
if (res?.data) {
// 添加流水号校验
let result = {}
if (!orderInfo.resetOrder) {
result = await checkRecord({ transactionNo: orderInfo.transactionNo })
} else { // 错误工单不做校验 赋值
result = {code: 0}
}
let { code, message } = result let { code, message } = result
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
...@@ -519,6 +589,14 @@ Page({ ...@@ -519,6 +589,14 @@ Page({
return wx.$util.showToast(message) return wx.$util.showToast(message)
} }
} }
} else {
reject()
this.setData({
confirmStatus: false
})
return wx.$util.showToast(res?.message)
}
}
// let { orderInfo } = this.data // let { orderInfo } = this.data
console.log("调接口---"); console.log("调接口---");
// 标记错误--补录订单 // 标记错误--补录订单
...@@ -645,9 +723,10 @@ Page({ ...@@ -645,9 +723,10 @@ Page({
// item.price = // item.price =
return pre; return pre;
}, []); }, []);
// 标识为补录工单 // 标识为错误工单
if (this.resetOrder) { if (this.resetOrder) {
orderInfo.resetOrder = this.resetOrder; orderInfo.resetOrder = this.resetOrder;
tableInfo.zyPayUrl = '' // 标记错误工单重新下单,将合同协议字段清除,需重新校验是否上传并重新上传
tableInfo.payType = 2; tableInfo.payType = 2;
} }
tableInfo.owner.salesType = tableInfo.owner.salesType =
...@@ -736,15 +815,6 @@ Page({ ...@@ -736,15 +815,6 @@ Page({
}); });
}); });
}, },
// 获取智界、享界车系id
async getCarBrandList() {
const {
carBrandList
} = await wx.$util.getMockData()
this.setData({
carBrandList
})
},
// 不需要检验 存草稿 // 不需要检验 存草稿
async handleEditSave() { async handleEditSave() {
...@@ -987,7 +1057,6 @@ Page({ ...@@ -987,7 +1057,6 @@ Page({
firstEnter: false firstEnter: false
}); });
this.orderSettingList() this.orderSettingList()
this.getCarBrandList()
}, },
setCustomerInfo(customerInfo) { setCustomerInfo(customerInfo) {
let { owner, orderInfo } = this.data; let { owner, orderInfo } = this.data;
......
...@@ -28,5 +28,5 @@ ...@@ -28,5 +28,5 @@
<order-popup orderType="{{orderInfo.payType }}" resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}" resetOrder="{{orderInfo.resetOrder}}" wx:if="{{showPopup}}" show="{{showPopup}}" /> <order-popup orderType="{{orderInfo.payType }}" resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}" resetOrder="{{orderInfo.resetOrder}}" wx:if="{{showPopup}}" show="{{showPopup}}" />
<!-- vin二次复核 --> <!-- vin二次复核 -->
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog> <vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog>
<!-- 上传延保协议 -->
<zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}"></zy-pay-popup>
\ No newline at end of file \ No newline at end of file
<!-- 上传合同协议 -->
<zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}" supplementaryFlag="{{supplementaryFlag}}" bindconfirm="zyPayConfirm"></zy-pay-popup>
\ No newline at end of file \ No newline at end of file
...@@ -148,7 +148,7 @@ Component({ ...@@ -148,7 +148,7 @@ Component({
repealVisible: false, repealVisible: false,
repealReason: '', repealReason: '',
repealId: '', repealId: '',
zyPayStatus: '', // 延保协议状态 zyPayStatus: '', // 合同协议状态
selectType: 1 selectType: 1
}, },
observers: { observers: {
...@@ -342,15 +342,17 @@ Component({ ...@@ -342,15 +342,17 @@ Component({
let tempList = this.dealListData(list || []) let tempList = this.dealListData(list || [])
console.log(tempList); console.log(tempList);
tempList = tempList.map((item) => { tempList = tempList.map((item) => {
item.createdTime = wx.$util.tsFormatTime( // item.createdTime = wx.$util.tsFormatTime(
item.createdTime, // item.createdTime,
"Y/M/D h:m:s" // "Y/M/D h:m:s"
); // );
item.createdTime = item.createdTime?.replace(/-/g, '/')
if (item.payTime) { if (item.payTime) {
item.payTime = wx.$util.tsFormatTime( // item.payTime = wx.$util.tsFormatTime(
item.payTime, // item.payTime,
"Y/M/D h:m:s" // "Y/M/D h:m:s"
); // );
item.payTime = item.payTime?.replace(/-/g, '/')
} }
item.isTouchMove = false; item.isTouchMove = false;
// onlyRepeal 战败且为超管,或者是待报价、待支付的非融合都可撤销 // onlyRepeal 战败且为超管,或者是待报价、待支付的非融合都可撤销
...@@ -439,7 +441,7 @@ Component({ ...@@ -439,7 +441,7 @@ Component({
this.screenForm.orderStatus = orderStatus; this.screenForm.orderStatus = orderStatus;
this.filterTag = false; this.filterTag = false;
} }
// 筛选页只会存在延保协议状态 // 筛选页只会存在合同协议状态
if (this.screenForm && e.zyPayStatus && !e.orderStatus) { if (this.screenForm && e.zyPayStatus && !e.orderStatus) {
this.screenForm.zyPayStatus = e.zyPayStatus this.screenForm.zyPayStatus = e.zyPayStatus
this.filterTag = true; this.filterTag = true;
...@@ -472,7 +474,7 @@ Component({ ...@@ -472,7 +474,7 @@ Component({
async handleClickBtn(e) { async handleClickBtn(e) {
let { target, type } = e.currentTarget.dataset; let { target, type } = e.currentTarget.dataset;
console.log(target); console.log(target);
// 上传延保协议 // 上传合同协议
if (target?.zyPayStatus == '1' && type == 'upload') { if (target?.zyPayStatus == '1' && type == 'upload') {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true);
...@@ -510,6 +512,7 @@ Component({ ...@@ -510,6 +512,7 @@ Component({
// 去支付 // 去支付
wx.$router.go("CarQuotationPay", { wx.$router.go("CarQuotationPay", {
id: target.id, id: target.id,
zyVoucherStatus: target?.zyPayStatus
}); });
} else { } else {
// 战败 // 战败
...@@ -581,7 +584,7 @@ Component({ ...@@ -581,7 +584,7 @@ Component({
orderInfo.referrerId = obj.referrerId orderInfo.referrerId = obj.referrerId
return orderInfo; return orderInfo;
}, },
// 延保协议上传确定 // 合同协议上传确定
zyPayConfirm(e) { zyPayConfirm(e) {
let { showZyTarget } = this.data let { showZyTarget } = this.data
getQuotationInfoById({ getQuotationInfoById({
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</view> </view>
</block> </block>
<view class="header-status"> <view class="header-status">
<!-- 待上传延保协议且是已支付的订单 --> <!-- 待上传合同协议且是已支付的订单 -->
<block wx:if="{{item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4 || item.orderStatus == 7)}}"> <block wx:if="{{item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4 || item.orderStatus == 7)}}">
<view class="default-txt">待上传</view> <view class="default-txt">待上传</view>
</block> </block>
......
// packageEquity/pages/extract/extract/extract.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/extract/extract/extract.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageEquity/pages/extract/extract/extract.wxml-->
<text>packageEquity/pages/extract/extract/extract.wxml</text>
\ No newline at end of file \ No newline at end of file
// pages/h5AuthPhone/h5AuthPhone.js // pages/h5AuthPhone/h5AuthPhone.js
import api from '../../api/api.js' import api from '../../api/api.js'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import {
setConfigInfo
} from '~/store/index'
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
routeObj: {} routeObj: {},
IMG_URL
}, },
/** /**
...@@ -15,7 +21,6 @@ Page({ ...@@ -15,7 +21,6 @@ Page({
onShow(options) { onShow(options) {
// this.init() // this.init()
// console.log(options); // console.log(options);
}, },
onLoad(options) { onLoad(options) {
console.log(options, '-------'); console.log(options, '-------');
...@@ -24,7 +29,7 @@ Page({ ...@@ -24,7 +29,7 @@ Page({
}) })
this.login() this.login()
}, },
jumpH5(target) { async jumpH5(target) {
const { routeObj } = this.data const { routeObj } = this.data
routeObj.authphone = target.phone routeObj.authphone = target.phone
let str = '' let str = ''
...@@ -33,7 +38,9 @@ Page({ ...@@ -33,7 +38,9 @@ Page({
str = str + (str ? '&' : '?') + item + '=' + routeObj[item] str = str + (str ? '&' : '?') + item + '=' + routeObj[item]
} }
}) })
const url = 'https://scrm.glsx.com.cn/glsx-bi-report/#/' + routeObj.h5Page + str // 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
const url = (baseConfigData.jumpBIUrl || 'https://scrm.glsx.com.cn/glsx-bi-report/#/') + routeObj.h5Page + str
console.log(url, 'url') console.log(url, 'url')
wx.navigateTo({ wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(url)}` url: `/pages/webView/webView?url=${encodeURIComponent(url)}`
......
/* pages/h5AuthPhone/h5AuthPhone.wxss */ /* pages/h5AuthPhone/h5AuthPhone.wxss */
.button { page {
width: 100% !important; text-align: center;
}
.auth-img {
width: 160rpx;
height: 160rpx;
margin: 160rpx 0 24rpx;
}
.title {
color: #292d33;
font-size: 30rpx;
margin-bottom: 528rpx;
font-family: PingFangSC-Regular;
}
.custom-button {
width: 480rpx !important;
height: 88rpx; height: 88rpx;
background: var(--btnColor);
border-radius: 16rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
line-height: 88rpx; line-height: 88rpx;
border-radius: 842rpx;
font-size: 30rpx;
color: #347bff;
padding: 0; padding: 0;
transition: all .1s; transition: all .1s;
background-color: black; background-color: #eff5fe;
}
.custom-button::after {
border: none; /* 去掉按钮的默认点击边框(小程序按钮的默认样式是通过::after实现的) */
} }
\ No newline at end of file \ No newline at end of file
/* pages/h5AuthPhone/h5AuthPhone.wxss */
\ No newline at end of file \ No newline at end of file
<!--pages/h5AuthPhone/h5AuthPhone.wxml--> <!--pages/h5AuthPhone/h5AuthPhone.wxml-->
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view> <view>
<button class="button" hover-class="btn-hover" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">授权登录 <image class="auth-img" src="{{IMG_URL}}icon-logo.png" />
<view class="title">生意助手员工版</view>
<button class="custom-button" hover-class="btn-hover" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">授权登录
</button> </button>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -95,7 +95,7 @@ Page({ ...@@ -95,7 +95,7 @@ Page({
flag: false flag: false
}) })
} }
// 中邮上传延保协议页面 // 中邮上传合同协议页面
if (url.includes('zyUpload')) { if (url.includes('zyUpload')) {
const eventChannel = this.getOpenerEventChannel(); const eventChannel = this.getOpenerEventChannel();
if (!this.data.isH5Bind) { if (!this.data.isH5Bind) {
......
...@@ -256,11 +256,15 @@ export const checkScene = options => { ...@@ -256,11 +256,15 @@ export const checkScene = options => {
console.log(options, query, 'options') console.log(options, query, 'options')
console.log(userInfo, 'userInfo'); console.log(userInfo, 'userInfo');
wx.$SCENE = options wx.$SCENE = options
// 跳转登录页就去掉这个跳转逻辑
if (options.path == "pages/wxLogin/wxLogin") {
wx.$SCENE = null
}
if (query.merchantId && !query.reportDate && !query.title) { if (query.merchantId && !query.reportDate && !query.title) {
// &&options.patch == 'tabIndex/pages/index/index' // &&options.patch == 'tabIndex/pages/index/index'
// 需要当前门店的 不是就重新登录 // 需要已登录并且是当前门店的 不是就重新登录
if (userInfo?.subLoginUser?.merchantId != query.merchantId) { if (userInfo?.subLoginUser?.merchantId && (userInfo?.subLoginUser?.merchantId != query.merchantId)) {
wx.$SCENE = null wx.$SCENE = null
// return this.login(true) // return this.login(true)
// return true // 重新登录 // return true // 重新登录
......
// tabWorkOrder/pages/mentorshipManage/mentorshipManage.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/mentorshipManage/mentorshipManage.wxss */
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/mentorshipManage/mentorshipManage.wxml-->
<text>tabWorkOrder/pages/mentorshipManage/mentorshipManage.wxml</text>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!