Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f11e342e
authored
Jul 11, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
功能开发
1 parent
df483d55
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
321 additions
and
362 deletions
components/orderSwitchPopup/orderSwitchPopup.js
config.js
packageEquity/api.js
packageEquity/components/GlButtonGroup/GlButtonGroup.wxml
packageEquity/pages/TabBar/equityPage.js
packageEquity/pages/TabBar/equityPage.json
packageEquity/pages/TabBar/equityPage.wxml
packageEquity/pages/TabBar/equityPage.wxss
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.js
packageEquity/pages/carQuotation/components/SecondStep/SecondStep.js
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/carQuotation/index/index.wxss
project.private.config.json
tabIndex/pages/index/index.js
tabWorkOrder/pages/additionRecordOrder/additionRecordOrder.js
components/orderSwitchPopup/orderSwitchPopup.js
View file @
f11e342
...
@@ -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
:
{
...
...
config.js
View file @
f11e342
...
@@ -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
()
...
...
packageEquity/api.js
View file @
f11e342
...
@@ -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/GlButtonGroup/GlButtonGroup.wxml
View file @
f11e342
<!-- 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"
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>
\ No newline at end of file
\ No newline at end of file
packageEquity/pages/TabBar/equityPage.js
View file @
f11e342
// 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,23 +34,55 @@ Page({
...
@@ -26,23 +34,55 @@ 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
&&
merchantMode
({
merchantId4s
:
storeInfo
?.
merchantId
})
.
then
(
result
=>
{
.
then
(
result
=>
{
console
.
log
(
result
,
'mode'
)
console
.
log
(
result
,
'mode'
)
let
{
data
,
code
}
=
result
let
{
data
,
code
}
=
result
if
(
code
==
0
&&
data
?.
mode
!=
null
)
{
if
(
code
==
0
&&
data
?.
mode
!=
null
)
{
const
isStaff
=
app
.
globalData
.
isStaff
&&
data
.
mode
!=
-
1
this
.
setData
({
this
.
setData
({
mode
:
data
.
mode
mode
:
data
.
mode
,
isStaff
})
})
}
else
{
// 是员工并且有配置规则 轮询 未补录订单
isStaff
&&
this
.
getWaitOrder
()
}
else
{
// wx.showModal({
// wx.showModal({
// title: '温馨提示',
// title: '温馨提示',
// content: '商品已下架或计算规则未配置,请联系客服处理。',
// content: '商品已下架或计算规则未配置,请联系客服处理。',
...
@@ -51,14 +91,14 @@ Page({
...
@@ -51,14 +91,14 @@ Page({
// confirmColor: '#3582EE',
// confirmColor: '#3582EE',
// })
// })
this
.
setData
({
this
.
setData
({
mode
:
-
1
mode
:
-
1
})
})
wx
.
showModal
({
wx
.
showModal
({
title
:
'温馨提示'
,
title
:
'温馨提示'
,
content
:
'未配置权益规则,请联系客服处理。'
,
content
:
'未配置权益规则,请联系客服处理。'
,
showCancel
:
false
,
showCancel
:
false
,
confirmText
:
'确定'
,
confirmText
:
'确定'
,
confirmColor
:
'#3582EE'
,
confirmColor
:
'#3582EE'
// success(res) {
// success(res) {
// if (res.confirm) {
// if (res.confirm) {
// that.globalData.yqdInfo = {}
// that.globalData.yqdInfo = {}
...
@@ -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
()
// this.selectComponent('#page-1')?.onLoad && this.selectComponent('#page-1').onLoad()
// let { tabIndex } = this.data
// this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad()
},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
()
{},
onHide
()
{
time
&&
clearTimeout
(
time
)
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
()
{},
onUnload
()
{
time
&&
clearTimeout
(
time
)
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
...
...
packageEquity/pages/TabBar/equityPage.json
View file @
f11e342
...
@@ -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"
}
}
packageEquity/pages/TabBar/equityPage.wxml
View file @
f11e342
...
@@ -2,39 +2,39 @@
...
@@ -2,39 +2,39 @@
<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
packageEquity/pages/TabBar/equityPage.wxss
View file @
f11e342
...
@@ -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
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.js
View file @
f11e342
...
@@ -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: '存草稿'
}
})
}
}
},
},
/**
/**
...
...
packageEquity/pages/carQuotation/components/SecondStep/SecondStep.js
View file @
f11e342
...
@@ -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)'
}
})
}
},
/**
/**
* 组件的初始数据
* 组件的初始数据
*/
*/
...
...
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
View file @
f11e342
...
@@ -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/carQuotation/createOrderCarQuotation/createOrderCarQuotation.js
View file @
f11e342
// 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
,
...
@@ -135,12 +114,8 @@ Page({
...
@@ -135,12 +114,8 @@ 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
)
...
@@ -154,11 +129,7 @@ Page({
...
@@ -154,11 +129,7 @@ Page({
// 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,11 +343,7 @@ Page({
...
@@ -404,11 +343,7 @@ Page({
this
.
setData
({
this
.
setData
({
orderInfo
orderInfo
})
})
let
{
let
{
code
,
data
,
message
}
=
await
this
.
handleSecondConfirmCheck
(
false
)
code
,
data
,
message
}
=
await
this
.
handleSecondConfirmCheck
(
false
)
// let =
// let =
if
(
code
==
0
&&
data
)
{
if
(
code
==
0
&&
data
)
{
this
.
setData
({
this
.
setData
({
...
@@ -421,28 +356,25 @@ Page({
...
@@ -421,28 +356,25 @@ 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
)
return
wx
.
showModal
({
title
:
'温馨提示'
,
title
:
'温馨提示'
,
content
:
'商品已下架或计算规则未配置,请联系客服处理。'
,
content
:
'商品已下架或计算规则未配置,请联系客服处理。'
,
showCancel
:
false
,
showCancel
:
false
,
confirmText
:
'确定'
,
confirmText
:
'确定'
,
confirmColor
:
'#3582EE'
,
confirmColor
:
'#3582EE'
})
})
data
=
data
.
map
(
item
=>
{
data
=
data
.
map
(
item
=>
{
return
{
return
{
...
@@ -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
()
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
f11e342
// packageEquity/pages/carEquity/serviceInfo/serviceInfo.js quotationGoods
// packageEquity/pages/carEquity/serviceInfo/serviceInfo.js quotationGoods
import
{
import
{
getQuotationInfo
,
quotationAdd
,
updateQuotation
,
quotationUpgrade
,
getQuotationInfoById
,
quotationPicture
,
listByMerchantIdAndIds
}
from
'../../../api'
getQuotationInfo
,
import
{
priceCounter
}
from
'~/packageEquity/api'
quotationAdd
,
import
{
quotedImgUrl
}
from
'~/config'
updateQuotation
,
quotationUpgrade
,
getQuotationInfoById
,
quotationPicture
,
listByMerchantIdAndIds
}
from
'../../../api'
import
{
priceCounter
}
from
'~/packageEquity/api'
import
{
quotedImgUrl
}
from
'~/config'
// console.log(quotedImgUrl, 'quotedImgUrl')
// console.log(quotedImgUrl, 'quotedImgUrl')
Page
({
Page
({
/**
/**
...
@@ -71,16 +59,9 @@ Page({
...
@@ -71,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
,
...
@@ -90,12 +71,7 @@ Page({
...
@@ -90,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
,
...
@@ -137,12 +113,8 @@ Page({
...
@@ -137,12 +113,8 @@ 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
)
...
@@ -156,11 +128,7 @@ Page({
...
@@ -156,11 +128,7 @@ Page({
// 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
)
}
}
...
@@ -170,24 +138,17 @@ Page({
...
@@ -170,24 +138,17 @@ Page({
async
handleSecondConfirm
()
{
async
handleSecondConfirm
()
{
// 先校验
// 先校验
let
status
=
this
.
selectComponent
(
`#FirstStep`
).
handleConfirm
()
let
status
=
this
.
selectComponent
(
`#FirstStep`
).
handleConfirm
()
if
(
!
status
)
return
false
if
(
!
status
)
return
false
let
{
orderInfo
}
=
this
.
data
let
{
orderInfo
}
=
this
.
data
if
(
!
orderInfo
.
goodsId
)
return
wx
.
$util
.
showToast
(
'请选择增值车损险'
)
if
(
!
orderInfo
.
goodsId
)
return
wx
.
$util
.
showToast
(
'请选择增值车损险'
)
// 修改权益报价逻辑
// 修改权益报价逻辑
let
{
let
{
modifyEquityQuotation
,
confirmStatus
}
=
this
.
data
modifyEquityQuotation
,
confirmStatus
}
=
this
.
data
wx
.
showLoading
(
'报价中...'
)
wx
.
showLoading
(
'报价中...'
)
this
.
setData
({
this
.
setData
({
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
(
result
)
console
.
log
(
result
)
if
(
id
)
{
if
(
id
)
{
...
@@ -200,10 +161,12 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -200,10 +161,12 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
console
.
log
(
'id'
,
id
)
console
.
log
(
'id'
,
id
)
// { orderId:data.orderId, id }
// { orderId:data.orderId, id }
// return
// return
status
.
code
==
0
?
this
.
navigatorNext
({
status
.
code
==
0
?
this
.
navigatorNext
({
id
,
id
,
orderId
:
status
.
data
.
orderId
orderId
:
status
.
data
.
orderId
})
:
wx
.
$util
.
showToast
(
status
.
message
||
'报价失败'
)
})
:
wx
.
$util
.
showToast
(
status
.
message
||
'报价失败'
)
}
else
{
}
else
{
console
.
log
(
message
)
console
.
log
(
message
)
wx
.
hideLoading
()
wx
.
hideLoading
()
...
@@ -216,13 +179,9 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -216,13 +179,9 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
// 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
...
@@ -249,9 +208,7 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -249,9 +208,7 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
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
)
||
''
...
@@ -283,10 +240,7 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -283,10 +240,7 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
}
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
)
}
}
...
@@ -301,20 +255,14 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -301,20 +255,14 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
// wx.$router.redirectTo('schemeConfirmation', { id })
// wx.$router.redirectTo('schemeConfirmation', { id })
},
},
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
.
insurancePrice
=
this
.
divideByHundred
(
tableInfo
.
insurancePrice
)
tableInfo
.
insurancePrice
=
this
.
divideByHundred
(
tableInfo
.
insurancePrice
)
...
@@ -365,25 +313,22 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -365,25 +313,22 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
let
orderInfo
=
this
.
getInsurance
()
let
orderInfo
=
this
.
getInsurance
()
let
owner
=
this
.
getOwnerInfo
()
let
owner
=
this
.
getOwnerInfo
()
orderInfo
.
owner
=
owner
orderInfo
.
owner
=
owner
priceCounter
(
orderInfo
).
then
((
result
)
=>
{
priceCounter
(
orderInfo
)
console
.
log
(
result
,
'priceCounter'
);
.
then
(
result
=>
{
let
{
code
,
data
}
=
result
console
.
log
(
result
,
'priceCounter'
)
let
{
code
,
data
}
=
result
if
(
code
==
0
)
{
if
(
code
==
0
)
{
this
.
setData
({
this
.
setData
({
[
'orderInfo.minEquityPrice'
]
:
this
.
divideByHundred
(
data
.
minEquityPrice
),
[
'orderInfo.minEquityPrice'
]:
this
.
divideByHundred
(
data
.
minEquityPrice
),
[
'orderInfo.quotedPriceUpdate'
]
:
this
.
divideByHundred
(
data
.
quotedPriceUpdate
)
[
'orderInfo.quotedPriceUpdate'
]:
this
.
divideByHundred
(
data
.
quotedPriceUpdate
)
})
})
}
}
})
}).
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
])
...
@@ -394,9 +339,7 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -394,9 +339,7 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
// 放大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
])
...
@@ -406,12 +349,7 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -406,12 +349,7 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
},
},
// 不需要检验 存草稿
// 不需要检验 存草稿
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'
)
}
}
...
@@ -430,35 +368,31 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -430,35 +368,31 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
saveStatus
:
false
saveStatus
:
false
})
})
console
.
log
(
'id'
,
res
)
console
.
log
(
'id'
,
res
)
let
{
code
,
data
,
message
}
=
res
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
if
(
code
==
0
)
{
wx
.
$router
.
redirectTo
(
'packageEquity.equityPage'
)
wx
.
$router
.
redirectTo
(
'packageEquity.equityPage'
)
}
else
{
}
else
{
return
wx
.
$util
.
showToast
(
res
.
message
||
'保存错误'
)
return
wx
.
$util
.
showToast
(
res
.
message
||
'保存错误'
)
}
}
// this.navigatorNext()
// this.navigatorNext()
// wx.$router.go('packageEquity.index')
// wx.$router.go('packageEquity.index')
},
},
getQuotationInfo
()
{
getQuotationInfo
()
{
let
{
let
{
default4SStoreInfo
}
=
wx
.
$util
.
getUserInfo
()
default4SStoreInfo
}
=
wx
.
$util
.
getUserInfo
()
console
.
log
(
default4SStoreInfo
,
'default4SStoreInfo'
)
console
.
log
(
default4SStoreInfo
,
'default4SStoreInfo'
)
listByMerchantIdAndIds
({
listByMerchantIdAndIds
({
merchantId
:
default4SStoreInfo
.
merchantId
merchantId
:
default4SStoreInfo
.
merchantId
})
})
.
then
(
result
=>
{
.
then
(
result
=>
{
console
.
log
(
result
)
console
.
log
(
result
)
let
{
let
{
data
}
=
result
data
if
(
!
data
.
length
)
}
=
result
return
wx
.
showModal
({
if
(
!
data
.
length
)
return
wx
.
showModal
({
title
:
'温馨提示'
,
title
:
'温馨提示'
,
content
:
'商品已下架或计算规则未配置,请联系客服处理。'
,
content
:
'商品已下架或计算规则未配置,请联系客服处理。'
,
showCancel
:
false
,
showCancel
:
false
,
confirmText
:
'确定'
,
confirmText
:
'确定'
,
confirmColor
:
'#3582EE'
,
confirmColor
:
'#3582EE'
})
})
// let { id: appreciation, goodsInfo, upgradeGoodsName: goodsName, upgradeGoodsServiceItemsList } = data[0]
// let { id: appreciation, goodsInfo, upgradeGoodsName: goodsName, upgradeGoodsServiceItemsList } = data[0]
data
=
data
.
map
(
item
=>
{
data
=
data
.
map
(
item
=>
{
...
@@ -528,9 +462,7 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -528,9 +462,7 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
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'
)
...
@@ -548,11 +480,8 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -548,11 +480,8 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
},
},
init
()
{
init
()
{
wx
.
$eventbus
.
on
(
'delete_goodsSelect'
,
res
=>
{
wx
.
$eventbus
.
on
(
'delete_goodsSelect'
,
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
);
let
{
orderInfo
}
=
this
.
data
let
{
orderInfo
}
=
this
.
data
const
resetItemName
=
[
'quotedPriceUpdate'
,
'minEquityPrice'
,
'goodsId'
,
'goodsName'
]
const
resetItemName
=
[
'quotedPriceUpdate'
,
'minEquityPrice'
,
'goodsId'
,
'goodsName'
]
resetItemName
.
forEach
(
element
=>
{
resetItemName
.
forEach
(
element
=>
{
...
@@ -585,12 +514,19 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
...
@@ -585,12 +514,19 @@ if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
// 判断是编辑还是新增
// 判断是编辑还是新增
// 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
})
}
this
.
getQuotationInfo
()
this
.
getQuotationInfo
()
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
)
...
...
packageEquity/pages/carQuotation/index/index.wxss
View file @
f11e342
...
@@ -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;
...
@@ -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% -
6
0rpx);
height: calc(100% -
3
0rpx);
/* 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: 2
0
0rpx;
bottom: 2
5
0rpx;
}
}
.no-data {
.no-data {
...
...
project.private.config.json
View file @
f11e342
...
@@ -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
}
}
]
]
}
}
...
...
tabIndex/pages/index/index.js
View file @
f11e342
...
@@ -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轮询一次待补录
...
...
tabWorkOrder/pages/additionRecordOrder/additionRecordOrder.js
View file @
f11e342
...
@@ -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
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment