Commit f11e342e by 张立顺

功能开发

1 parent df483d55
...@@ -48,6 +48,11 @@ Component({ ...@@ -48,6 +48,11 @@ Component({
type: Boolean, type: Boolean,
value: true value: true
} }
// merchantId: {
// //是否根据4s店查询
// type: String,
// value: ''
// }
}, },
/* 组件的初始数据 */ /* 组件的初始数据 */
data: { data: {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* 3生产环境 * 3生产环境
* 4预发布 * 4预发布
*/ */
let index = 3 let index = 1
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
......
...@@ -82,5 +82,16 @@ module.exports = { ...@@ -82,5 +82,16 @@ module.exports = {
/** 商品查询 */ /** 商品查询 */
listByMerchantIdAndIds(data) { listByMerchantIdAndIds(data) {
return api.post('dj.api.smartcarlife.quotationGoods.listByMerchantIdAndIds', data) return api.post('dj.api.smartcarlife.quotationGoods.listByMerchantIdAndIds', data)
},
/** 待补录订单统计 */
waitinputorder(data) {
let params = data || {}
params.inputStatus = 0
// params.payType = 1
return api.post('dj.api.smartcarlife.weapp.waitinputorder.count', params)
},
/** 订单补录接口 */
quotationRecording(data) {
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.additional.recording', data)
} }
} }
<!-- packageEquity/components/GlButton/GlButton.wxml --> <!-- packageEquity/components/GlButton/GlButton.wxml -->
<!-- <text>packageEquity/components/GlButton/GlButton.wxml</text> --> <!-- <text>packageEquity/components/GlButton/GlButton.wxml</text> -->
<view class="btnCom"> <view class="btnCom">
<view class="btn confirmBtn" data-name="confirm" bindtap="btnTap"> <view class="btn confirmBtn" data-name="confirm" bindtap="btnTap">{{textNameObj.confirmName}}</view>
{{textNameObj.confirmName}} <view class="btn editBtn" data-name="edit" bindtap="btnTap" wx:if="{{ textNameObj.editName }}">{{textNameObj.editName}}</view>
</view> <view class="btn editBtn" data-name="editOrderName" bindtap="btnTap" wx:if="{{ textNameObj.editOrderName }}">{{textNameObj.editOrderName}}</view>
<view <view class="btn cancelBtn" data-name="cancel" bindtap="btnTap" wx:if="{{ textNameObj.cancelName }}">{{textNameObj.cancelName}}</view>
class="btn editBtn" </view>
data-name="edit"
bindtap="btnTap"
wx:if="{{textNameObj.editName}}">
{{textNameObj.editName}}
</view>
<view
class="btn editBtn"
data-name="editOrderName"
bindtap="btnTap"
wx:if="{{textNameObj.editOrderName}}">
{{textNameObj.editOrderName}}
</view>
<view class="btn cancelBtn" data-name="cancel" bindtap="btnTap">{{textNameObj.cancelName}}</view>
</view>
\ No newline at end of file \ No newline at end of file
// pages/equity/index.js // pages/equity/index.js
import { get4SStoreList } from '~/store/index' import { get4SStoreList } from '~/store/index'
import {merchantMode} from '../../api'; import { merchantMode, waitinputorder } from '../../api'
const app = getApp()
let time = null
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -18,6 +20,12 @@ Page({ ...@@ -18,6 +20,12 @@ Page({
selectedIconPath: '/images/tab-equity-active.png' selectedIconPath: '/images/tab-equity-active.png'
} }
], ],
tipsProps: {
tipsText: '该门店产生异常订单,请点击补录!',
showTips: true,
type: 2,
typeText: '补录订单'
},
tabIndex: 0, tabIndex: 0,
pageShow: [true, false], pageShow: [true, false],
navBarHeight: 0, navBarHeight: 0,
...@@ -26,52 +34,84 @@ Page({ ...@@ -26,52 +34,84 @@ Page({
selectStroeIndex: 0, selectStroeIndex: 0,
shopSideSelectPopup: false, shopSideSelectPopup: false,
mode: 1, mode: 1,
showOrderpop: false,
waitInputCount: 1,
isStaff: false
// hasMode:true // hasMode:true
}, },
navigator(e) {
console.log(e)
let { outTradeNo } = e.detail
let { mode } = this.data
this.closeSwitchPopup()
outTradeNo &&
wx.$router.go(mode ? 'createOrderCarQuotationSimple' : 'createOrderCarQuotation', {
...e.detail
})
// outTradeNo &&
// wx.$router.go('tabWorkOrder.additionRecordOrder', {
// ...e.detail
// })
},
tipsEvent() {
this.setData({
showOrderpop: true
})
},
closeSwitchPopup() {
this.setData({
showOrderpop: false
})
},
getMerchant4SMode() { getMerchant4SMode() {
let storeInfo = wx.$util.getUserInfo()?.default4SStoreInfo || {} let storeInfo = wx.$util.getUserInfo()?.default4SStoreInfo || {}
// console.log(wx.$util.getUserInfo()?.default4SStoreInfo ,'wx.$util.getUserInfo()?.default4SStoreInfo '); // console.log(wx.$util.getUserInfo()?.default4SStoreInfo ,'wx.$util.getUserInfo()?.default4SStoreInfo ');
// console.log(storeInfo,'storeInfo'); // console.log(storeInfo,'storeInfo');
// let { storeInfo } = this.data // let { storeInfo } = this.data
// 场景 // 场景
storeInfo?.merchantId&& merchantMode({ merchantId4s: storeInfo?.merchantId }) storeInfo?.merchantId &&
.then(result => { merchantMode({ merchantId4s: storeInfo?.merchantId })
console.log(result, 'mode') .then(result => {
let { data, code } = result console.log(result, 'mode')
if (code == 0&& data?.mode!= null) { let { data, code } = result
this.setData({ if (code == 0 && data?.mode != null) {
mode: data.mode const isStaff = app.globalData.isStaff && data.mode != -1
}) this.setData({
}else{ mode: data.mode,
// wx.showModal({ isStaff
// title: '温馨提示', })
// content: '商品已下架或计算规则未配置,请联系客服处理。', // 是员工并且有配置规则 轮询 未补录订单
// showCancel: false, isStaff && this.getWaitOrder()
// confirmText: '确定', } else {
// confirmColor: '#3582EE', // wx.showModal({
// }) // title: '温馨提示',
this.setData({ // content: '商品已下架或计算规则未配置,请联系客服处理。',
mode:-1 // showCancel: false,
}) // confirmText: '确定',
wx.showModal({ // confirmColor: '#3582EE',
title: '温馨提示', // })
content: '未配置权益规则,请联系客服处理。', this.setData({
showCancel: false, mode: -1
confirmText: '确定', })
confirmColor: '#3582EE', wx.showModal({
// success(res) { title: '温馨提示',
// if (res.confirm) { content: '未配置权益规则,请联系客服处理。',
// that.globalData.yqdInfo = {} showCancel: false,
// that.globalData.YQorderSetting = '' confirmText: '确定',
// util.removeStorage() confirmColor: '#3582EE'
// wx.$relogin = relogin // success(res) {
// router.reLaunch('pages.wxLogin') // if (res.confirm) {
// } // that.globalData.yqdInfo = {}
// } // that.globalData.YQorderSetting = ''
}) // util.removeStorage()
} // wx.$relogin = relogin
}) // router.reLaunch('pages.wxLogin')
.catch(err => {}) // }
// }
})
}
})
.catch(err => {})
}, },
init(userInfo) { init(userInfo) {
this.setData({ userInfo }) this.setData({ userInfo })
...@@ -115,50 +155,39 @@ Page({ ...@@ -115,50 +155,39 @@ Page({
}, },
showStorePicker() { showStorePicker() {
this.setData({ this.setData({
showPicker: true showPicker: true
}) })
}, },
changeTabBar(e) { changeTabBar(e) {
let { pageShow } = this.data, // let { pageShow } = this.data,
tabIndex = e.detail let tabIndex = e.detail
// this.setData({ // console.log(pageShow[tabIndex])
// tabIndex
// })
console.log(pageShow[tabIndex])
// if (!pageShow[tabIndex]) {
// this.getComponentPage().onLoad && this.getComponentPage().onLoad()
// }
this.setData({ this.setData({
[`pageShow[${tabIndex}]`]: true, [`pageShow[${tabIndex}]`]: true,
tabIndex tabIndex
}) })
this.onShow() // this.onShow()
}, this.initList()
getComponentPage() {
const { tabIndex } = this.data
return this.selectComponent(`#page-${tabIndex}`)
}, },
changePicker(e) { changePicker(e) {
console.log('changePicker'); console.log('changePicker')
let { storeListRange, selectStroeIndex, tabIndex } = this.data let { storeListRange, selectStroeIndex } = this.data
let value = (e.detail ?? '') === '' ? selectStroeIndex : e.detail let value = (e.detail ?? '') === '' ? selectStroeIndex : e.detail
let default4SStoreInfo = storeListRange[value] let default4SStoreInfo = storeListRange[value]
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), default4SStoreInfo }) wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), default4SStoreInfo })
// let { tabIndex } = this.data
this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad()
// this.selectComponent('#page-0').onLoad && this.selectComponent('#page-0').onLoad()
// this.selectComponent('#page-1').onLoad && this.selectComponent('#page-1').onLoad()
this.setData({ this.setData({
userInfo: { ...wx.$util.getUserInfo(), default4SStoreInfo } userInfo: { ...wx.$util.getUserInfo(), default4SStoreInfo }
}) })
this.getMerchant4SMode() this.getMerchant4SMode()
}, },
initList() {
let { tabIndex } = this.data
this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad()
},
back() { back() {
wx.$router.reLaunch('pages.sceneIndex') wx.$router.reLaunch('pages.sceneIndex')
}, },
...@@ -175,6 +204,34 @@ Page({ ...@@ -175,6 +204,34 @@ Page({
navBarHeight navBarHeight
}) })
}, },
setTime() {
let _this = this
time = setTimeout(() => {
// console.log(_this.getWaitOrder)
_this.getWaitOrder()
}, 10 * 1000)
},
// 10s轮询一次待补录
getWaitOrder() {
let { isStaff } = this.data
// console.log('isStaff', isStaff)
// let thisPage = wx.$router.getPageInstance()
// console.log(thisPage.route, ' thisPage.route')
// thisPage.route == 'tabIndex/pages/index/index' &&
isStaff &&
waitinputorder()
.then(result => {
// console.log(result)
let { code, data } = result
this.setTime()
if (code == 0) {
this.setData({
waitInputCount: data.waitInputCount
})
}
})
.catch(err => {})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -189,21 +246,25 @@ Page({ ...@@ -189,21 +246,25 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
let { tabIndex } = this.data this.initList()
this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad()
// let { tabIndex } = this.data
// this.selectComponent('#page-1')?.onLoad && this.selectComponent('#page-1').onLoad() // this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad()
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() {
time && clearTimeout(time)
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() {
time && clearTimeout(time)
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
"quotation-list": "../carQuotation/index/index", "quotation-list": "../carQuotation/index/index",
"equity-list": "../carEquity/components/EquityList/EquityList", "equity-list": "../carEquity/components/EquityList/EquityList",
"store-picker": "../../components/storePicker/storePicker", "store-picker": "../../components/storePicker/storePicker",
"side-select-popup": "../../../components/SideSelectPopup/SideSelectPopup" "side-select-popup": "../../../components/SideSelectPopup/SideSelectPopup",
"order-switchPopup": "/components/orderSwitchPopup/orderSwitchPopup"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
<!-- pages/equity/index.wxml --> <!-- pages/equity/index.wxml -->
<navigation-bar <navigation-bar
class="navigation-header" class="navigation-header"
bindnavbarReady="navbarReady" bindnavbarReady="navbarReady"
showMenu="{{true}}" showMenu="{{ true }}"
bindback="back" bindback="back"
bindshowMenuPopup="showMenuPopup"> bindshowMenuPopup="showMenuPopup"
<view class="navigation-title" bindtap="showStorePicker" wx:if="{{storeListRange.length}}"> >
<view class="navigation-title-text text-hide"> <view class="navigation-title" bindtap="showStorePicker" wx:if="{{ storeListRange.length }}">
{{userInfo && userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName}} <view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName}}</view>
</view>
<view class="arrow"> <view class="arrow">
<image src="/images/back.png" /> <image src="/images/back.png" />
</view> </view>
</view> </view>
</navigation-bar> </navigation-bar>
<!-- style="margin-top:{{navBarHeight}}px" --> <!-- style="margin-top:{{navBarHeight}}px" -->
<view class="layout" style="padding-top:{{navBarHeight}}px;position: relative;"> <view class="layout {{waitInputCount?'tipsHeigh':''}}" style="padding-top:{{ navBarHeight }}px;position: relative;">
<block wx:if="{{navBarHeight && showPage}}"> <block wx:if="{{ navBarHeight && showPage }}">
<quotation-list id="page-0" navBarHeight="{{navBarHeight}}" class="pagedetail {{tabIndex == 0?'':'hide'}}" mode="{{mode}}" /> <quotation-list id="page-0" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 0?'':'hide' }} " mode="{{ mode }}" />
<equity-list <equity-list
id="page-1" id="page-1"
outTabIndex="{{tabIndex}}" outTabIndex="{{ tabIndex }}"
navBarHeight="{{navBarHeight}}" navBarHeight="{{ navBarHeight }}"
class="pagedetail {{tabIndex == 1?'':'hide'}}" /> class="pagedetail {{ tabIndex == 1?'':'hide' }}"
/>
</block> </block>
</view> </view>
<custom-tabBar <view class="waitOrderCon" wx:if="{{ waitInputCount }}">
list="{{tabBarList}}" <tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
color="#6C6C70" </view>
selectedColor="#3582EE" <custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#3582EE" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" />
tabIndex="{{tabIndex}}" <store-picker items="{{ storeListRange }}" show="{{ showPicker }}" bindsearch="getStoreList" bindconfirm="changePicker" />
bindchange="changeTabBar" /> <side-select-popup show="{{ shopSideSelectPopup }}" />
<store-picker <order-switchPopup
items="{{storeListRange}}" bind:close="closeSwitchPopup"
show="{{showPicker}}" bind:success="navigator"
bindsearch="getStoreList" title="{{ '请选择支付订单号' }}"
bindconfirm="changePicker" /> wx:if="{{ showOrderpop }}"
<side-select-popup show="{{shopSideSelectPopup}}" /> flag="{{ showOrderpop }}"
/>
\ No newline at end of file \ No newline at end of file
...@@ -48,7 +48,18 @@ ...@@ -48,7 +48,18 @@
height: calc(100vh - 100rpx - constant(safe-area-inset-bottom)); height: calc(100vh - 100rpx - constant(safe-area-inset-bottom));
overflow: hidden; overflow: hidden;
} }
.layout .pagedetail{
.tipsHeigh{
height: calc(100vh - 100rpx - 72rpx - env(safe-area-inset-bottom));
height: calc(100vh - 100rpx - 72rpx - constant(safe-area-inset-bottom));
}
.layout .pagedetail {
height: 100%; height: 100%;
} }
.waitOrderCon {
position: absolute;
bottom: 85px;
width: 100%;
}
\ No newline at end of file \ No newline at end of file
...@@ -24,7 +24,6 @@ Component({ ...@@ -24,7 +24,6 @@ Component({
orderInfo: { orderInfo: {
type: Object, type: Object,
observer: function (n) { observer: function (n) {
if (n?.modifyEquityQuotation) { if (n?.modifyEquityQuotation) {
this.setData({ this.setData({
// activeNames: ['3'], // activeNames: ['3'],
...@@ -50,13 +49,22 @@ Component({ ...@@ -50,13 +49,22 @@ Component({
observers: { observers: {
'orderInfo.mode': function (value) { 'orderInfo.mode': function (value) {
// if (n.mode) { // if (n.mode) {
console.log(value,'mode'); console.log(value, 'mode')
// first: data.firstObj, // first: data.firstObj,
this.setData({ this.setData({
first:value?data.firstObjSimple:data.firstObj, first: value ? data.firstObjSimple : data.firstObj,
formRule:value?data.formRuleSimple:data.formRule formRule: value ? data.formRuleSimple : data.formRule
}) })
// } // }
},
'orderInfo.outTradeNo': function (value) {
console.log(value, 'outTradeNo')
this.setData({
textNameObj: {
confirmName: '下一步(1/4)'
// cancelName: '存草稿'
}
})
} }
}, },
/** /**
...@@ -177,7 +185,7 @@ Component({ ...@@ -177,7 +185,7 @@ Component({
wx.$util.showToast(validObj.message) wx.$util.showToast(validObj.message)
return false return false
} }
this.triggerEvent('confirm') this.triggerEvent('confirm')
return true return true
} }
......
...@@ -54,7 +54,16 @@ Component({ ...@@ -54,7 +54,16 @@ Component({
value: () => {} value: () => {}
} }
}, },
observers: {
'orderInfo.outTradeNo': function (value) {
console.log(value, 'outTradeNo')
this.setData({
textNameObj: {
confirmName: '下一步(1/4)'
}
})
}
},
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
......
...@@ -49,7 +49,16 @@ Component({ ...@@ -49,7 +49,16 @@ Component({
value: () => {} value: () => {}
} }
}, },
observers: {
'orderInfo.outTradeNo': function (value) {
console.log(value, 'outTradeNo')
this.setData({
textNameObj: {
confirmName: '下一步(1/4)'
}
})
}
},
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
...@@ -141,7 +150,7 @@ Component({ ...@@ -141,7 +150,7 @@ Component({
// }) // })
thisPage.setData({ thisPage.setData({
['orderInfo.quotedPriceUpdate']:wx.$util.divideByHundred(data.quotedPriceUpdate), ['orderInfo.quotedPriceUpdate']: wx.$util.divideByHundred(data.quotedPriceUpdate),
['orderInfo.minEquityPrice']: wx.$util.divideByHundred(data.minEquityPrice), ['orderInfo.minEquityPrice']: wx.$util.divideByHundred(data.minEquityPrice),
['orderInfo.goodsId']: goodsItem.id, ['orderInfo.goodsId']: goodsItem.id,
['orderInfo.goodsName']: goodsItem.goodsName ['orderInfo.goodsName']: goodsItem.goodsName
...@@ -149,7 +158,7 @@ Component({ ...@@ -149,7 +158,7 @@ Component({
// return // return
this.setData({ this.setData({
// insuranceCheck: true, // insuranceCheck: true,
showError:false, showError: false,
testQuotedPriceUpdate: wx.$util.divideByHundred(data.quotedPriceUpdate) testQuotedPriceUpdate: wx.$util.divideByHundred(data.quotedPriceUpdate)
}) })
} else { } else {
...@@ -193,8 +202,8 @@ Component({ ...@@ -193,8 +202,8 @@ Component({
['orderInfo.goodsId']: '', ['orderInfo.goodsId']: '',
['orderInfo.goodsName']: '', ['orderInfo.goodsName']: '',
['orderInfo.valueAddedVehicleLoss']: { ['orderInfo.valueAddedVehicleLoss']: {
appreciation:'', appreciation: '',
goodsName:'', goodsName: '',
type: 3 type: 3
} }
}) })
...@@ -303,14 +312,14 @@ Component({ ...@@ -303,14 +312,14 @@ Component({
this.setData({ this.setData({
showError showError
}) })
if (showError)return false if (showError) return false
} }
// ['orderInfo' + '.' + attrType] // ['orderInfo' + '.' + attrType]
// console.log(['orderInfo' + '.' + attrType], '2') // console.log(['orderInfo' + '.' + attrType], '2')
thisPage.setData({ thisPage.setData({
['orderInfo' + '.' + attrtype + '.' + attrname]: value ['orderInfo' + '.' + attrtype + '.' + attrname]: value
}) })
attrname!='quotedPriceUpdate'&&this.cancelInsuranceCheck() attrname != 'quotedPriceUpdate' && this.cancelInsuranceCheck()
// console.log(thisPage.data) // console.log(thisPage.data)
} }
// onChange (e){ // onChange (e){
......
// packageEquity/pages/carEquity/serviceInfo/serviceInfo.js // packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
import { import { getQuotationInfo, quotationAdd, updateQuotation, listByMerchantIdAndIds, getQuotationInfoById, quotationPicture, quotationRecording } from '../../../api'
getQuotationInfo, import { quotedImgUrl } from '~/config'
quotationAdd,
updateQuotation,
listByMerchantIdAndIds,
getQuotationInfoById,
quotationPicture
} from '../../../api'
import {
quotedImgUrl
} from '~/config'
// console.log(quotedImgUrl, 'quotedImgUrl') // console.log(quotedImgUrl, 'quotedImgUrl')
Page({ Page({
/** /**
...@@ -26,16 +17,16 @@ Page({ ...@@ -26,16 +17,16 @@ Page({
confirmStatus: false, confirmStatus: false,
saveStatus: false saveStatus: false
}, },
// owner: { owner: {
// owner: 'test2', owner: 'test2',
// phone: 15816539334, phone: 15816539334,
// certificateNo: '230182198012251659', certificateNo: '230182198012251659',
// carVin: '12345678912345678', carVin: '12345678912345678',
// seat: 5, seat: 5,
// price: 7, price: 7,
// confirmStatus: false, confirmStatus: false,
// saveStatus: false saveStatus: false
// }, },
quotationGoodsList: [], //权益商品列表 quotationGoodsList: [], //权益商品列表
orderInfo: { orderInfo: {
// 0-商业,1-交强,2-车船,3-增值车损,4-other 对应下面字段名字 // 0-商业,1-交强,2-车船,3-增值车损,4-other 对应下面字段名字
...@@ -68,16 +59,9 @@ Page({ ...@@ -68,16 +59,9 @@ Page({
}, },
reWrite(type, data) { reWrite(type, data) {
console.log(type, data) console.log(type, data)
let { let { owner } = this.data
owner
} = this.data
if (type == 'vehicleCertificate') { if (type == 'vehicleCertificate') {
let { let { vinNo: carVin, seatingCapacity: seat, engineNo: engineNumber, carColor } = data
vinNo: carVin,
seatingCapacity: seat,
engineNo: engineNumber,
carColor
} = data
owner = Object.assign(owner, { owner = Object.assign(owner, {
carVin, carVin,
seat, seat,
...@@ -87,12 +71,7 @@ Page({ ...@@ -87,12 +71,7 @@ Page({
} }
if (type == 'idCard') { if (type == 'idCard') {
// debugger // debugger
let { let { name, sex: ownerGender, address: addr, cardNo: certificateNo } = data
name,
sex: ownerGender,
address: addr,
cardNo: certificateNo
} = data
owner = Object.assign(owner, { owner = Object.assign(owner, {
owner: name, owner: name,
ownerGender, ownerGender,
...@@ -116,8 +95,8 @@ Page({ ...@@ -116,8 +95,8 @@ Page({
getQuotationGenerate(id) { getQuotationGenerate(id) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getQuotationInfoById({ getQuotationInfoById({
id id
}) })
.then(res => { .then(res => {
resolve(res) resolve(res)
// let { code, data, message } = res // let { code, data, message } = res
...@@ -135,30 +114,22 @@ Page({ ...@@ -135,30 +114,22 @@ Page({
}, },
updateEquityPrice(type) { updateEquityPrice(type) {
// quotationPicture // quotationPicture
let { let { orderInfo } = this.data
orderInfo const { id } = orderInfo
} = this.data
const {
id
} = orderInfo
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
const quotedPriceUpdate = this.multipliedByHundred(orderInfo?.modifyEquityQuotation?.quotedPriceUpdate) const quotedPriceUpdate = this.multipliedByHundred(orderInfo?.modifyEquityQuotation?.quotedPriceUpdate)
quotationPicture({ quotationPicture({
id, id,
quotedPriceUpdate, quotedPriceUpdate,
createQuotedUrl: quotedImgUrl + id createQuotedUrl: quotedImgUrl + id
}) })
.then(result => { .then(result => {
// debugger // debugger
wx.hideLoading() wx.hideLoading()
console.log(result) console.log(result)
let { let { code, data, message } = result
code,
data,
message
} = result
if (code == 0) { if (code == 0) {
type == 'saveEdit' ? wx.$router.reLaunch('packageEquity.equityPage') : this.navigatorNext(orderInfo.id) type == 'saveEdit' ? wx.$router.reLaunch('packageEquity.equityPage') : this.navigatorNext(orderInfo.id)
} }
...@@ -168,10 +139,7 @@ Page({ ...@@ -168,10 +139,7 @@ Page({
async handleSecondConfirm() { async handleSecondConfirm() {
// owner, orderInfo, // owner, orderInfo,
// 修改权益报价逻辑 // 修改权益报价逻辑
let { let { modifyEquityQuotation, confirmStatus } = this.data
modifyEquityQuotation,
confirmStatus
} = this.data
if (confirmStatus) return false if (confirmStatus) return false
if (modifyEquityQuotation) { if (modifyEquityQuotation) {
return this.updateEquityPrice() return this.updateEquityPrice()
...@@ -184,11 +152,7 @@ Page({ ...@@ -184,11 +152,7 @@ Page({
confirmStatus: true confirmStatus: true
}) })
let result = await this.handleSecondConfirmCheck(true) let result = await this.handleSecondConfirmCheck(true)
let { let { code, data: id, message } = result
code,
data: id,
message
} = result
// console.log(id) // console.log(id)
if (id) { if (id) {
...@@ -214,13 +178,9 @@ Page({ ...@@ -214,13 +178,9 @@ Page({
// wx.$router.go('packageEquity.index') // wx.$router.go('packageEquity.index')
}, },
getInsurance() { getInsurance() {
let { let { orderInfo } = this.data
orderInfo
} = this.data
orderInfo = wx.$util.deepClone(orderInfo) orderInfo = wx.$util.deepClone(orderInfo)
let { let { default4SStoreInfo } = wx.$util.getUserInfo()
default4SStoreInfo
} = wx.$util.getUserInfo()
orderInfo.merchantId4s = default4SStoreInfo?.merchantId orderInfo.merchantId4s = default4SStoreInfo?.merchantId
orderInfo.merchantName4s = default4SStoreInfo?.merchantName orderInfo.merchantName4s = default4SStoreInfo?.merchantName
...@@ -242,9 +202,7 @@ Page({ ...@@ -242,9 +202,7 @@ Page({
return orderInfo return orderInfo
}, },
getOwnerInfo() { getOwnerInfo() {
let { let { owner } = this.data
owner
} = this.data
owner = wx.$util.deepClone(owner) owner = wx.$util.deepClone(owner)
owner.price = this.multipliedByHundred(owner?.price) || '' owner.price = this.multipliedByHundred(owner?.price) || ''
...@@ -274,10 +232,7 @@ Page({ ...@@ -274,10 +232,7 @@ Page({
} else { } else {
// 新增提交 // 新增提交
let result = await quotationAdd(orderInfo) let result = await quotationAdd(orderInfo)
let { let { code, data } = result
code,
data
} = result
// console.log('result', result) // console.log('result', result)
return resolve(result) return resolve(result)
} }
...@@ -293,20 +248,14 @@ Page({ ...@@ -293,20 +248,14 @@ Page({
}) })
}, },
getOrderInfo() { getOrderInfo() {
let { let { id, orderInfo } = this.data
id,
orderInfo
} = this.data
// 先写死调试 // 先写死调试
getQuotationInfoById({ getQuotationInfoById({
id id
}) })
.then(result => { .then(result => {
console.log('result', result) console.log('result', result)
let { let { code, data: tableInfo } = result
code,
data: tableInfo
} = result
tableInfo.owner.price = this.divideByHundred(tableInfo.owner.price) tableInfo.owner.price = this.divideByHundred(tableInfo.owner.price)
// tableInfo.quotedPrice = this.divideByHundred(tableInfo.quotedPrice) // tableInfo.quotedPrice = this.divideByHundred(tableInfo.quotedPrice)
tableInfo.quotedPriceUpdate = this.divideByHundred(tableInfo.quotedPriceUpdate) tableInfo.quotedPriceUpdate = this.divideByHundred(tableInfo.quotedPriceUpdate)
...@@ -347,22 +296,19 @@ Page({ ...@@ -347,22 +296,19 @@ Page({
['orderInfo.goodsId']: '', ['orderInfo.goodsId']: '',
['orderInfo.goodsName']: '', ['orderInfo.goodsName']: '',
['orderInfo.valueAddedVehicleLoss']: { ['orderInfo.valueAddedVehicleLoss']: {
appreciation:'', appreciation: '',
goodsName:'', goodsName: '',
type: 3 type: 3
} }
}) })
} }
} }
}) })
.catch(err => {}) .catch(err => {})
}, },
// 缩小100 // 缩小100
divideByHundredObj(obj) { divideByHundredObj(obj) {
let { let { needChangeList } = this.data
needChangeList
} = this.data
for (const key in obj) { for (const key in obj) {
if (needChangeList.includes(key)) { if (needChangeList.includes(key)) {
obj[key] = this.divideByHundred(obj[key]) obj[key] = this.divideByHundred(obj[key])
...@@ -373,9 +319,7 @@ Page({ ...@@ -373,9 +319,7 @@ Page({
// 放大100 // 放大100
multipliedByHundredObj(obj) { multipliedByHundredObj(obj) {
console.log(obj, 'obj') console.log(obj, 'obj')
let { let { needChangeList } = this.data
needChangeList
} = this.data
for (const key in obj) { for (const key in obj) {
if (needChangeList.includes(key)) { if (needChangeList.includes(key)) {
obj[key] = this.multipliedByHundred(obj[key]) obj[key] = this.multipliedByHundred(obj[key])
...@@ -385,12 +329,7 @@ Page({ ...@@ -385,12 +329,7 @@ Page({
}, },
// 不需要检验 存草稿 // 不需要检验 存草稿
async handleEditSave() { async handleEditSave() {
let { let { owner, orderInfo, modifyEquityQuotation, saveStatus } = this.data
owner,
orderInfo,
modifyEquityQuotation,
saveStatus
} = this.data
if (modifyEquityQuotation) { if (modifyEquityQuotation) {
return this.updateEquityPrice('saveEdit') return this.updateEquityPrice('saveEdit')
} }
...@@ -404,12 +343,8 @@ Page({ ...@@ -404,12 +343,8 @@ Page({
this.setData({ this.setData({
orderInfo orderInfo
}) })
let { let { code, data, message } = await this.handleSecondConfirmCheck(false)
code, // let =
data,
message
} = await this.handleSecondConfirmCheck(false)
// let =
if (code == 0 && data) { if (code == 0 && data) {
this.setData({ this.setData({
saveStatus: false saveStatus: false
...@@ -421,29 +356,26 @@ Page({ ...@@ -421,29 +356,26 @@ Page({
} else { } else {
wx.$util.showToast(message || '存草稿失败') wx.$util.showToast(message || '存草稿失败')
} }
}, },
getQuotationInfo() { getQuotationInfo() {
let { let { default4SStoreInfo } = wx.$util.getUserInfo()
default4SStoreInfo
} = wx.$util.getUserInfo()
console.log(default4SStoreInfo, 'default4SStoreInfo') console.log(default4SStoreInfo, 'default4SStoreInfo')
let {orderInfo} = this.data
listByMerchantIdAndIds({ listByMerchantIdAndIds({
merchantId: default4SStoreInfo.merchantId merchantId: default4SStoreInfo.merchantId
}) })
.then(result => { .then(result => {
console.log(result) console.log(result)
let { let { data } = result
data
} = result
// if (!data.length) return wx.$util.showToast('请先添加权益配置') // if (!data.length) return wx.$util.showToast('请先添加权益配置')
if (!data.length) return wx.showModal({ if (!data.length)
title: '温馨提示', return wx.showModal({
content: '商品已下架或计算规则未配置,请联系客服处理。', title: '温馨提示',
showCancel: false, content: '商品已下架或计算规则未配置,请联系客服处理。',
confirmText: '确定', showCancel: false,
confirmColor: '#3582EE', confirmText: '确定',
}) confirmColor: '#3582EE'
})
data = data.map(item => { data = data.map(item => {
return { return {
...item, ...item,
...@@ -453,6 +385,12 @@ Page({ ...@@ -453,6 +385,12 @@ Page({
titlePictureUrl: item.goodsInfo.thumbUrl titlePictureUrl: item.goodsInfo.thumbUrl
} }
}) })
if (orderInfo.outTradeNo) {
data.forEach(item=>{
item.isSeletct = this.multipliedByHundred(item.shopMinPrice) >= orderInfo.totalFee
})
}
this.setData({ this.setData({
quotationGoodsList: data quotationGoodsList: data
}) })
...@@ -512,9 +450,7 @@ Page({ ...@@ -512,9 +450,7 @@ Page({
back() { back() {
console.log('back') console.log('back')
// wx.$router.reLaunch('pages.sceneIndex') // wx.$router.reLaunch('pages.sceneIndex')
let { let { step } = this.data
step
} = this.data
console.log('step', step) console.log('step', step)
if (step == 'first') { if (step == 'first') {
wx.$router.reLaunch('packageEquity.equityPage') wx.$router.reLaunch('packageEquity.equityPage')
...@@ -535,11 +471,18 @@ Page({ ...@@ -535,11 +471,18 @@ Page({
// 判断是编辑还是新增 // 判断是编辑还是新增
// options.id = 14 // options.id = 14
// options.modifyEquityQuotation = true // options.modifyEquityQuotation = true
let { outTradeNo, totalFee } = options
// outTradeNo
if (outTradeNo) {
this.setData({
// outTradeNo
totalFee: totalFee,
['orderInfo.outTradeNo']: outTradeNo
})
}
if (options.id) { if (options.id) {
// 修改权益报价 // 修改权益报价
let { let { modifyEquityQuotation } = options
modifyEquityQuotation
} = options
if (modifyEquityQuotation) { if (modifyEquityQuotation) {
let minEquityPrice = this.divideByHundred(modifyEquityQuotation.minEquityPrice) let minEquityPrice = this.divideByHundred(modifyEquityQuotation.minEquityPrice)
let quotedPriceUpdate = this.divideByHundred(modifyEquityQuotation.quotedPriceUpdate) let quotedPriceUpdate = this.divideByHundred(modifyEquityQuotation.quotedPriceUpdate)
...@@ -558,7 +501,6 @@ Page({ ...@@ -558,7 +501,6 @@ Page({
this.getOrderInfo() this.getOrderInfo()
} }
this.getQuotationInfo() this.getQuotationInfo()
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -608,4 +550,4 @@ Page({ ...@@ -608,4 +550,4 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() {}
})
\ No newline at end of file \ No newline at end of file
})
...@@ -124,11 +124,13 @@ ...@@ -124,11 +124,13 @@
height: 28rpx; height: 28rpx;
margin: 0 10rpx 0 26rpx; margin: 0 10rpx 0 26rpx;
} }
.search-box .search-input .clearBtn{
.search-box .search-input .clearBtn {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
position: relative; position: relative;
} }
.search-box .search-input .search-clear { .search-box .search-input .search-clear {
position: absolute; position: absolute;
left: 40rpx; left: 40rpx;
...@@ -170,7 +172,7 @@ ...@@ -170,7 +172,7 @@
height: 24rpx; height: 24rpx;
} }
.total-box { .total-box {
display: flex; display: flex;
padding: 24rpx 30rpx; padding: 24rpx 30rpx;
font-weight: 400; font-weight: 400;
...@@ -195,7 +197,7 @@ ...@@ -195,7 +197,7 @@
padding: 0 20rpx 20rpx; padding: 0 20rpx 20rpx;
padding-bottom: 0; padding-bottom: 0;
/* height: calc(100% - 20rpx); */ /* height: calc(100% - 20rpx); */
height: calc(100% - 60rpx); height: calc(100% - 30rpx);
/* height: 100%; */ /* height: 100%; */
} }
...@@ -418,7 +420,7 @@ ...@@ -418,7 +420,7 @@
vertical-align: middle; vertical-align: middle;
} }
.btn_class{ .btn_class {
display: flex; display: flex;
gap: 20rpx; gap: 20rpx;
} }
...@@ -439,7 +441,8 @@ ...@@ -439,7 +441,8 @@
border-radius: 32rpx; border-radius: 32rpx;
color: #3582EE; color: #3582EE;
} }
.padding_20{
.padding_20 {
padding: 8rpx 20rpx; padding: 8rpx 20rpx;
} }
...@@ -528,7 +531,7 @@ ...@@ -528,7 +531,7 @@
height: 112rpx; height: 112rpx;
position: fixed; position: fixed;
right: 32rpx; right: 32rpx;
bottom: 200rpx; bottom: 250rpx;
} }
.no-data { .no-data {
......
...@@ -354,6 +354,13 @@ ...@@ -354,6 +354,13 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "2.1 权益首页",
"pathName": "packageEquity/pages/TabBar/equityPage",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }
......
...@@ -318,7 +318,7 @@ Page({ ...@@ -318,7 +318,7 @@ Page({
let _this = this let _this = this
time = setTimeout(() => { time = setTimeout(() => {
// console.log(_this.getWaitOrder) // console.log(_this.getWaitOrder)
// _this.getWaitOrder() _this.getWaitOrder()
}, 10 * 1000) }, 10 * 1000)
}, },
// 10s轮询一次待补录 // 10s轮询一次待补录
......
...@@ -312,7 +312,7 @@ Page({ ...@@ -312,7 +312,7 @@ Page({
let { save } = i.currentTarget.dataset let { save } = i.currentTarget.dataset
// orderDisabled, // orderDisabled,
let { goodsList, orderObj, scene, totalFee, total, disabled } = this.data let { goodsList, orderObj, scene, totalFee, total, disabled } = this.data
// let orderObj =
if (disabled) { if (disabled) {
return this.showToast('提交中') return this.showToast('提交中')
} }
...@@ -413,35 +413,6 @@ Page({ ...@@ -413,35 +413,6 @@ Page({
disabled: true disabled: true
}) })
// const orderObj = {
// couponName: "流程测试新建001",
// customer: {customerName: "张立顺",
// customerPhone: "15817639334",
// customerSex: "2",
// experienceFlag: "Y",
// plateNumber: "",
// standNo: ""},
// customerCouponCode: "GH151S",
// employeeName: "刘伟",
// merchantCouponId: 11385,
// merchantId: 44211116,
// merchantName: "流程测试4s店",
// outTradeNo: "0120230630676252458305200128",
// remark: "",
// selectPayType: 2,
// sellerMerchantId: 44211025,
// sellerMerchantName: "流程测试园区门店",
// sellerName: "zhangls",
// sellerUserId: "bfe4919ab01143e5844846ef92aa3db3",
// subOrderList: [
// {baseGoodsId: null, totalPrice: 0.1, number: 1, merchantGoodsId: 7213},
// {baseGoodsId: null, totalPrice: 0.1, number: 1, merchantGoodsId: 5897}
// ],
// subShopMerchantId: 44211746,
// subShopMerchantName: "test_xjq03",
// // userId: "cbe5621e7afa4ccaac1b279c2a2ee98d",
// }
console.log(orderObj); console.log(orderObj);
// return // return
...@@ -822,7 +793,7 @@ Page({ ...@@ -822,7 +793,7 @@ Page({
onRoute(options) { onRoute(options) {
let { outTradeNo, totalFee, accountDate, supplementId } = options let { outTradeNo, totalFee, accountDate, supplementId } = options
console.log(options) console.log(options)
// 如果是扫码进来的 // 如果是扫码进来的
if (supplementId) { if (supplementId) {
return this.checkShowOrderInfo(options) return this.checkShowOrderInfo(options)
} else { } else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!