Commit f11e342e by 张立顺

功能开发

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