Commit e0977c0b by zhangxw

次新车支持订单补录需求开发

1 parent da3c2141
Showing 26 changed files with 1278 additions and 14 deletions
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
{ {
"root": "subvehicleConversion", "root": "subvehicleConversion",
"name": "subvehicleConversion", "name": "subvehicleConversion",
"pages": ["pages/index/index", "pages/activityManagement/activityManagement", "pages/visitor/visitor", "pages/order/order"] "pages": ["pages/index/index", "pages/activityManagement/activityManagement", "pages/visitor/visitor", "pages/order/order", "pages/supplementaryOrderList/supplementaryOrderList", "pages/supplementaryOrderPay/supplementaryOrderPay", "pages/relatedFinalPayment/relatedFinalPayment"]
} }
], ],
"usingComponents": { "usingComponents": {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* 3生产环境 * 3生产环境
* 4预发布 * 4预发布
*/ */
let index = 1 let index = 2
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
......
...@@ -20,6 +20,7 @@ Component({ ...@@ -20,6 +20,7 @@ Component({
exhibitionToolsList: [ exhibitionToolsList: [
{title: '活动管理', imgName: 'managementOfActivities', isOpen: true,path:'activityManagement'}, {title: '活动管理', imgName: 'managementOfActivities', isOpen: true,path:'activityManagement'},
{title: '话术库', imgName: 'speechLibrary', isOpen: false}, {title: '话术库', imgName: 'speechLibrary', isOpen: false},
{title: '订单补录', imgName: 'speechLibrary', isOpen: true, path: 'supplementaryOrderList'}
] ]
}, },
methods: { methods: {
......
// subvehicleConversion/components/supplementaryOrderDetail/supplementaryOrderDetail.js
Component({
/**
* 组件的属性列表
*/
properties: {
navBarHeight: Number
},
/**
* 组件的初始数据
*/
data: {
userInfo: {},
storeInfo: {},
tabIndex: 0,
pageSize: 4,
pageNum: 1,
tabList: ['全部', '待支付', '已支付', '已退款'],
btnTxt: {
0: '去支付',
1: '去退款',
4: '去退款'
},
orderStatusObj: {
0: '待支付',
1: '已支付',
2: '已退款',
3: '预支付',
4: '退定金', // 正常流程 自定义值
5: '退定金' // 预支付状态下退定金 自定义值
},
orderStatusList: [
{
confName: '全部',
confId: ''
}, {
confName: '待支付',
confId: '0'
}, {
confName: '已支付',
confId: '1'
},
{
confName: '已退款',
confId: '2'
}
],
subOrderCodeCopy: '',
searchObj: {},
orderObj: [
{
label: '商品名称',
key: 'goodsName'
},
{
label: '订金金额',
key: 'activityPrice',
type: 'price'
},
{
label: '订金支付时间',
key: 'payedDateStr'
},
{
label: '订单编号',
key: 'subOrderCode'
},
{
label: '尾款金额',
key: 'tailPayment',
type: 'price'
},
{
label: '转化人员',
key: 'transfer'
},
],
list: [{
tailOrderStatus: 0
}],
isToBottom: false,
selectData: ['客户姓名','订单编号','手机号'], // 下拉列表的数据
selectIndex: 0, // 选择的下拉列表下标
showSelect: false, // 下拉框
confirmFlag: false,
total: 0
},
lifetimes: {
attached() {
this.setData({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion || {},
userInfo: wx.$util.getUserInfo() || {}
})
this.onLoad(true)
}
},
/**
* 组件的方法列表
*/
methods: {
onLoad(noGetList) {
this.setData({
nothing: false,
pageNum: 1,
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion || {}
})
if (!noGetList) this.getList(true)
},
search() {
this.setData({
pageNum: 1,
nothing: false,
total: 0
})
this.getList(true)
},
getList() {
},
// tab切换
tabClick(e) {
let {searchObj} = this.data
delete searchObj.statusList
this.setData({
tabIndex: e?.detail,
searchObj
})
this.search()
},
// 查询条件类型切换
selectTap() {
this.setData({
showSelect: !this.data.showSelect
});
},
optionTap(e) {
let { index } = e.currentTarget.dataset
this.setData({
selectIndex: index,
showSelect: !this.data.showSelect
})
},
closeSelect() {
this.setData({
showSelect: false
})
},
// 复制文案
copyData(e) {
const {target, flag} = e.currentTarget.dataset
let copyItem = flag == 1 ? `${target.customerName}\t${target.customerPhone}` : target.subOrderCode
wx.setClipboardData({
data: copyItem
})
},
handleClickBtn(e) {
const {target} = e.currentTarget.dataset
let { confirmFlag } = this.data
this.setData({
subOrderCodeCopy: target.subOrderCode
})
if (target.tailOrderStatus == 0) {
let {accountName} = wx.$util.getUserInfo()
const {goodsId: shopmallGoodsId, subOrderCode} = target
let params = {
subOrderCode,
orderPaySource: 1, // 订单支付源(1.正常付尾款,2关联尾款单,3未收款新增,4已收款补录)
shopmallGoodsId,
selectPayType:1, // 支付方式(1:线上微信支付,2:线下收款,3:POS机收款, 4:支付宝支付) 默认使用微信支付
updatedBy: accountName,
remark: target?.remark
}
if (confirmFlag) return
wx.$router.go('supplementaryOrderPay')
return
wx.$util.showLoading()
this.setData({confirmFlag: true})
Api.createPayOrderAPI(params).then(res => {
let {code, data, message} = res
wx.$util.hideLoading()
if (code == '0') {
// wx.$router.reLaunch
wx.$router.go('activityPay', {orderCode: target.subOrderCode, paramsActivityPrice: target.payedDate ? target.activityPrice : '', paramsActivityId: target.activityId, supplementOrderFlag: target.supplementOrderFlag, orderPaySource: 1, goodsNumber: target.goodsNumber || 1, shopmallGoodsId})
setTimeout(() => {
this.setData({
confirmFlag: false
})
}, 3000)
} else {
wx.$util.showToast(message || '接口异常')
this.setData({
confirmFlag: false
})
}
})
} else if (target.tailOrderStatus == 1) { // 已支付
wx.showModal({
title: '退款确认',
content: '请确定将此订单标记为已退款',
complete: (res) => {
if (res.confirm) {
}
}
})
}
},
// 关联尾款单
handlefinalPayment(e) {
const {target} = e.currentTarget.dataset
wx.$router.go('relatedFinalPayment', {list: target})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--subvehicleConversion/components/supplementaryOrderDetail/supplementaryOrderDetail.wxml-->
<view class="main">
<view class="to-box">
<view class="search-box">
<view class='select_box'>
<view class='select' catchtap='selectTap'>
<view class='select_text'>{{selectData[selectIndex]}}</view>
<image class='select_img {{showSelect&&"select_img_rotate"}}' src='../../../images/arrow-right.png'></image>
</view>
<view class='option_box' wx:if="{{showSelect}}" style="padding: {{ showSelect ? '20rpx 34rpx' : ''}}">
<view class='option' wx:for='{{selectData}}' wx:key='this' data-index='{{index}}' catchtap='optionTap'>{{item}}</view>
</view>
<view class="mask_class" wx:if="{{showSelect}}" bindtap="closeSelect"></view>
</view>
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="请输入{{selectData[selectIndex]}}搜索" class="input" confirm-type="search" value="{{inputValue}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{inputValue}}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset" />
</block>
</view>
</view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" />
</view>
<view class="total-box">
{{tabIndex == 0 ? '总订单' : tabList[tabIndex]}} · {{total}}
<view wx:if="{{tabIndex == 0}}" class="total-tips">
</view>
</view>
<view class="order-box">
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="search" bindscrolltolower="onBottomRefresh" class="list" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<block wx:if="{{list.length > 0}}">
<view class="empty"></view>
<view wx:for="{{list}}" wx:key="index" class="item">
<view class="item-content">
<view class="item-header">
<view class="header-cust">
<view class="cust-name">{{item.customerName}}</view>
<view class="cust-phone">{{item.customerPhone}}</view>
<image class="copy-icon" bindtap="copyData" data-target="{{item}}" data-flag="1" src="../../images/copy-text.png" mode=""/>
</view>
<view class="header-status">
<view wx:if="{{ item.tailOrderStatus =='1'}}">
<span class="green-txt">{{orderStatusObj[item.tailOrderStatus]}}</span>
<span class="header-price">¥{{filter.priceFilter(item.supplementOrderFlag == 1 ? (item.crowdFundingPrice) : (item.tailPayment || 0))}}</span>
</view>
<view wx:else class="{{item.tailOrderStatus == '2' ? 'red-txt' : (item.tailOrderStatus == '4' || item.tailOrderStatus == '5' ? 'blue-txt' : '') }}">
{{orderStatusObj[item.tailOrderStatus] || '--'}}
</view>
</view>
</view>
<!-- 内容 -->
<view class="order-list" style="padding-bottom: {{(item.tailOrderStatus == '0' || item.tailOrderStatus == '1' || item.tailOrderStatus == '4') && !userInfo.isSuper && userInfo.userType == 2 ? 0 : 20}}rpx">
<block wx:for="{{orderObj}}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
<block >
<view class="order">
<view class="order-label">{{i.label}} </view>
<view class="order-value">
<block wx:if="{{i.type == 'price' && (item[i.key]+'')}}">¥{{filter.priceFilter(item[i.key])}}</block>
<block wx:else>
<view wx:if="{{i.key == 'subOrderCode'}}" class="ordercode-class">
{{item[i.key] || ''}}
<image class="copy-icon" bindtap="copyData" data-target="{{item}}" data-flag="2" src="../../images/copy-text.png" mode=""/>
</view>
<view wx:else>
{{item[i.key] || ''}}
</view>
</block>
</view>
</view>
</block>
</block>
<view class="order" wx:if="{{item.tailOrderStatus == 1}}">
<view class="order-label">尾款支付时间 </view>
<view class="order-value">
<block>{{item['tailPayedDateStr']}}</block>
</view>
</view>
<view class="order refund_text" wx:if="{{item.tailOrderStatus == 2}}">
<view class="order-label">退款原因 </view>
<view class="order-value">
<block>{{item['refundRemark']}}</block>
</view>
</view>
<!-- 待支付订单无备注字段 -->
<view class="order refund_text" wx:if="{{item.tailOrderStatus !== 0}}">
<view class="order-label">备注 </view>
<view class="order-value">
<block>{{item['remark']}}</block>
</view>
</view>
</view>
</view>
<!-- footer -->
<!-- 超管isSuper/商户号类型 userType 2(员工号)账号不可操作 -->
<view class="item-footer" wx:if="{{(item.tailOrderStatus == '0' || item.tailOrderStatus == '1' || item.tailOrderStatus == '4') && !userInfo.isSuper && userInfo.userType == 2}}">
<!-- 待支付 -->
<view wx:if="{{item.tailOrderStatus == '0'&& item.supplementOrderFlag != 1}}" class="order-btn default-btn mar-btn" bindtap="handlefinalPayment" data-target="{{item}}">
关联尾款单
</view>
<!-- 待支付/已支付/退定金 -->
<view wx:if="{{item.tailOrderStatus == '0' || item.tailOrderStatus == '1' || item.tailOrderStatus == '4'}}" class="order-btn" bindtap="handleClickBtn" data-target="{{item}}">
{{btnTxt[item.tailOrderStatus]}}
</view>
</view>
</view>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<view class="no-data" wx:else>
<image class="no-data-img" src="/subvehicleConversion/images/noData.png" />
<view class="list-not">暂无数据</view>
</view>
</scroll-view>
</view>
</view>
/* subvehicleConversion/components/supplementaryOrderDetail/supplementaryOrderDetail.wxss */
.main {
margin-top: -20rpx;
background: #FFFFFF;
border-radius: 48rpx 48rpx 0 0;
overflow: hidden;
height: 100%;
}
.to-box {
position: sticky;
left: 0;
z-index: 2;
/* box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.10); */
}
.search-box {
width: calc(100% - 64rpx);
margin: 53rpx 32rpx 0;
display: flex;
background-color: #fff;
position: sticky;
top: 0;
left: 0;
z-index: 1009;
box-sizing: border-box;
background: #F7F8FA;
border-radius: 38rpx;
}
.search-box .select_box{
width: 200rpx;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #999999;
}
.search-box .select_box .select{
display: flex;
align-items: center;
justify-content: center;
padding: 0 18rpx;
border-right: 2rpx solid #CDCDD1;
}
.search-box .select_box .select .select_text{
width: 100%;
}
.search-box .select_box .select .select_img{
transform: rotate(90deg);
width: 10rpx;
height: 20rpx;
flex-shrink: 0;
margin-left: 6rpx;
}
.search-box .select_box .select .select_img_rotate{
transform: rotate(-90deg);
}
.search-box .select_box .option_box{
position: absolute;
z-index: 200;
top: 80rpx;
width: 180rpx;
box-sizing: border-box;
background: #FFFFFF;
box-shadow: 0 6rpx 12rpx 0 #0000000d;
border-radius: 20rpx;
height: 190rpx;
}
.search-box .select_box .option_box .option{
display: block;
height: 50rpx;
line-height: 50rpx;
text-align: center;
color: #333333;
}
.search-box .search-input {
width: 100%;
height: 72rpx;
display: flex;
align-items: center;
}
.search-box .search-input .search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 10rpx 0 26rpx;
}
.search-box .search-input .search-clear {
width: 36rpx;
height: 36rpx;
margin: 0 26rpx 0 10rpx;
}
.search-box .search-input .input {
font-size: 28rpx;
width: calc(100% - 136rpx);
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
.search-box .search {
width: 144rpx;
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 24rpx;
}
.search-box .search .text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
height: 50rpx;
color: #888;
}
.search-box .search .text-center .search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
.total-box {
display: flex;
padding: 24rpx 30rpx;
font-weight: 400;
font-size: 28rpx;
color: #222222;
}
.total-tips {
font-size: 26rpx;
color: #6C6C70;
margin-left: 24rpx;
}
.order-box {
background-color: #fdfdfd;
height: calc(100% - 125rpx - 104rpx - 76rpx);
}
.list {
box-sizing: border-box;
width: 100%;
padding: 0 20rpx;
height: calc(100% - 20rpx);
}
.list .empty{
width: 100%;
height: 20rpx;
background-color: transparent;
}
.list .item {
box-sizing: border-box;
background: #FFFFFF;
box-shadow: 0 6rpx 16rpx 0 rgba(205, 205, 209, 0.5);
border-radius: 16rpx;
margin: 0 6rpx 20rpx;
}
/* .list .item:first-child {
margin-top: 20rpx;
} */
.item .item-content {
padding: 20rpx 32rpx 0;
}
.list .item-header {
display: flex;
justify-content: space-between;
}
.item-header .header-cust {
display: flex;
align-items: center;
font-size: 32rpx;
color: #333333;
}
.item-header .header-cust .cust-name{
font-weight: 500;
}
.item-header .header-cust .cust-phone{
font-weight: 400;
font-size: 28rpx;
margin-left: 24rpx;
}
.item-header .header-cust .copy-icon{
width: 32rpx;
height: 32rpx;
margin-left: 16rpx;
}
.list .icon-sex {
width: 24rpx;
height: 24rpx;
margin-left: 12rpx;
}
.list .header-status {
font-weight: 500;
font-size: 28rpx;
color: #FF9D0A;
}
.header-price {
color: #222222;
margin-left: 12rpx;
}
.green-txt {
color: #4AC18E;
}
.red-txt {
color: #EB4E4E;
}
.blue-txt {
color: #3582EE;
}
.list .content {
width: 100%;
margin-right: 0;
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-transform: translateX(72px);
transform: translateX(72px);
margin-left: -72px;
}
.list .item .name {
display: flex;
align-items: center;
margin-bottom: 40rpx;
}
.list .item.gray .name {
color: #999999;
}
.list .item .name image {
width: 46rpx;
height: 46rpx;
}
.list .item.gray .name image {
filter: grayscale(100%);
}
.list .item .name .name-text {
margin-left: 26rpx;
width: 404rpx;
}
.list .item .goods-list {
padding-bottom: 20rpx;
border-bottom: 1rpx solid rgba(195, 195, 195, .29);
}
.list .item .goods-list .goods {
display: flex;
align-items: center;
padding-left: 32rpx;
/* margin-bottom: 20rpx; */
position: relative;
justify-content: space-between;
}
.list .item .goods-list .goods:nth-child(n+2) {
margin-top: 20rpx;
}
.list .item .goods-list .goods::after {
position: absolute;
width: 12rpx;
height: 12rpx;
top: 50%;
left: 0;
transform: translateY(-50%);
content: '';
background: #3582EE;
border-radius: 100%;
}
.list .item .goods-list .goods .goods-name {
font-size: 28rpx;
color: #3582EE;
max-width: 430rpx;
}
.list .item.gray .goods-list .goods .goods-name {
color: #666666;
}
.list .item.gray .goods-list .goods::after {
background: #666;
}
.list .item .goods-list .goods .goods-price {
font-size: 20rpx;
color: #666666;
display: flex;
align-items: baseline;
}
.list .item .goods-list .goods .goods-price text {
font-size: 24rpx;
color: #2A2A2A;
}
.list .item .goods-more {
padding-left: 32rpx;
font-size: 24rpx;
color: #888888;
display: flex;
align-items: center;
}
.list .item .goods-more text {
font-size: 28rpx;
color: #3582EE;
margin-right: 20rpx;
}
.list .item.gray .goods-more text {
color: #666;
}
.list .item .order-list {
padding: 20rpx 0 0;
margin-bottom: 24rpx;
}
.list .item .order-detail {
display: flex;
align-items: center;
background: #F4F5F7;
border-radius: 8rpx;
padding: 16rpx;
font-weight: 400;
font-size: 24rpx;
color: #222222;
margin-bottom: 24rpx;
}
.order-detail .detail-item {
width: 33%;
text-align: center;
border-right: 1rpx solid #E1E2E6;
}
.detail-item .detail-label {
color: #9B9B9E;
margin-bottom: 8rpx;
}
.order-detail .detail-item:last-child {
border: none;
}
.item-footer {
display: flex;
justify-content: flex-end;
/* margin-left: 200rpx; */
align-items: center;
font-size: 24rpx;
color: #9B9B9E;
border-top: 1rpx solid #EDEDED;
padding: 20rpx 32rpx;
}
.orange-txt {
color: #EB9B2F;
}
.icon-info {
width: 28rpx;
height: 28rpx;
margin-right: 8rpx;
vertical-align: middle;
}
.order-btn {
box-sizing: border-box;
height: 56rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #3582EE;
border-radius: 32rpx;
padding: 8rpx 40rpx;
}
.mar-btn{
margin-right: 15rpx;
}
.order-btn.default-btn {
background: #FFFFFF;
border: 2rpx solid #3582EE;
border-radius: 32rpx;
color: #3582EE;
}
.list .item .order {
font-size: 24rpx;
color: #333333;
margin-bottom: 20rpx;
display: flex;
align-items: center;
}
.list .item .refund_text{
align-items: flex-start;
}
.list .item .order:last-of-type {
margin-bottom: 0;
}
.list .item .order .order-label {
width: 165rpx;
color: #9B9B9E;
}
.list .item .order .order-value {
width: calc(100% - 136rpx);
display: flex;
align-items: center;
}
.list .item .refund_text .order-value{
text-overflow:ellipsis;
display: -webkit-box;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.list .item .refund_text .order-value .placeholder_class{
color: #C8C8C8;
}
.list .item .order .order-value .ordercode-class{
display: flex;
align-items: center;
}
.list .item .order .order-value .ordercode-class .copy-icon{
width: 32rpx;
height: 32rpx;
margin-left: 16rpx;
}
.list .item .order .order-value .order-value-item:first-of-type {
max-width: 70%;
}
.list .item .order .order-value .order-value-item .split {
margin: 0 6rpx;
}
.list .item .order-price {
display: flex;
justify-content: flex-end;
/* align-items: center; */
align-items: flex-end;
font-size: 24rpx;
color: #666666;
/* padding-top: 8rpx; */
}
.list .item .order-price .price {
box-sizing: border-box;
color: #F24724;
font-size: 40rpx;
margin-left: 20rpx;
margin-bottom: -8rpx;
/* margin-top: 8rpx; */
}
.list .item.gray .order-price .price {
color: #666 !important;
}
.list .item .order-price .price .unit {
font-size: 28rpx;
}
.list .item .order-payType {
font-size: 24rpx;
color: #333333;
/* margin-top: 50rpx; */
display: flex;
justify-content: space-between;
align-items: flex-end;
}
.list .item .btn {
border: 2rpx solid #666666;
border-radius: 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #666666;
position: absolute;
right: 40rpx;
bottom: 30rpx;
width: 192rpx;
height: 64rpx;
}
.no-data {
text-align: center;
padding-top: 128rpx;
}
.no-data-img {
width: 160rpx;
height: 160rpx;
}
.list-nothing,
.list-not {
text-align: center;
}
.mask_class{
width: 100vw;
height: 100vh;
background: transparent;
position: fixed;
top: 0;
left: 0;
z-index: 100;
}
...@@ -10,18 +10,18 @@ Component({ ...@@ -10,18 +10,18 @@ Component({
properties: { properties: {
items: { items: {
type: Array, type: Array,
value: [], value: []
},
show: {
type: Boolean,
observer: function (n) { observer: function (n) {
let { selectObj, defaultSelectInfo } = this.data let { selectObj, defaultSelectInfo, items } = this.data
if (n && selectObj.key) { if (n && selectObj.key && items) {
let defaultSelectIndex = n?.findIndex(v => {return v[selectObj.key] == defaultSelectInfo[selectObj.key]}) > -1 ? n?.findIndex(v => {return v[selectObj.key] == defaultSelectInfo[selectObj.key]}) : 0 let defaultSelectIndex = items?.findIndex(v => {return v[selectObj.key] == defaultSelectInfo[selectObj.key]}) > -1 ? items?.findIndex(v => {return v[selectObj.key] == defaultSelectInfo[selectObj.key]}) : 0
this.setData({defaultSelectIndex: [defaultSelectIndex], selectIndex: defaultSelectIndex}) this.setData({defaultSelectIndex: [defaultSelectIndex], selectIndex: defaultSelectIndex})
} }
} }
}, },
show: {
type: Boolean,
},
defaultSelectInfo: { defaultSelectInfo: {
type: Object type: Object
}, },
...@@ -99,6 +99,11 @@ Component({ ...@@ -99,6 +99,11 @@ Component({
this.setData({ this.setData({
selectIndex: e.detail.value[0] selectIndex: e.detail.value[0]
}) })
},
cancel() {
this.setData({
show: false
})
} }
} }
}) })
<!--packageEquity/components/storePicker/storePicker.wxml--> <!--packageEquity/components/storePicker/storePicker.wxml-->
<popup class="date-background" show="{{show}}" bindconfirm="confirm" height="800rpx"> <popup class="date-background" show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="800rpx">
<view class='date-container'> <view class='date-container'>
<view class='date-confirm'> <view class='date-confirm'>
<view class="search-box"> <view class="search-box">
......
...@@ -74,7 +74,9 @@ Page({ ...@@ -74,7 +74,9 @@ Page({
let default4SStoreInfo_newCarConversion = storeListRange[value] let default4SStoreInfo_newCarConversion = storeListRange[value]
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), default4SStoreInfo_newCarConversion }) wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), default4SStoreInfo_newCarConversion })
this.setData({ this.setData({
userInfo: { ...wx.$util.getUserInfo(), ...default4SStoreInfo_newCarConversion } userInfo: { ...wx.$util.getUserInfo(), ...default4SStoreInfo_newCarConversion },
showStorePicker: false,
defaultSelectInfo: default4SStoreInfo_newCarConversion
}) })
// 获取门店下活动列表 // 获取门店下活动列表
this.selectComponent(`#activityList-list`)?.onLoad && this.selectComponent(`#activityList-list`).onLoad() this.selectComponent(`#activityList-list`)?.onLoad && this.selectComponent(`#activityList-list`).onLoad()
......
...@@ -110,7 +110,9 @@ Page({ ...@@ -110,7 +110,9 @@ Page({
let default4SStoreInfo_newCarConversion = storeListRange[value] let default4SStoreInfo_newCarConversion = storeListRange[value]
wx.$util.setUserInfo({...wx.$util.getUserInfo(), default4SStoreInfo_newCarConversion}) wx.$util.setUserInfo({...wx.$util.getUserInfo(), default4SStoreInfo_newCarConversion})
this.setData({ this.setData({
userInfo: {...wx.$util.getUserInfo(), default4SStoreInfo_newCarConversion} userInfo: {...wx.$util.getUserInfo(), default4SStoreInfo_newCarConversion},
showStorePicker: false,
defaultSelectInfo: default4SStoreInfo_newCarConversion
}) })
const {merchantId} = this.data.userInfo const {merchantId} = this.data.userInfo
this.getOutputValue(default4SStoreInfo_newCarConversion?.merchantId) this.getOutputValue(default4SStoreInfo_newCarConversion?.merchantId)
...@@ -146,8 +148,12 @@ Page({ ...@@ -146,8 +148,12 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
let {userInfo} = this.data let userInfo = wx.$util.getUserInfo()
this.getOutputValue(userInfo?.default4SStoreInfo_newCarConversion?.merchantId) this.setData({
userInfo,
defaultSelectInfo: userInfo?.default4SStoreInfo_newCarConversion
})
this.getOutputValue(userInfo?.default4SStoreInfo_newCarConversion?.merchantId)
}, },
/** /**
......
// subvehicleConversion/pages/relatedFinalPayment/relatedFinalPayment.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* subvehicleConversion/pages/relatedFinalPayment/relatedFinalPayment.wxss */
\ No newline at end of file \ No newline at end of file
<!--subvehicleConversion/pages/relatedFinalPayment/relatedFinalPayment.wxml-->
<text>subvehicleConversion/pages/relatedFinalPayment/relatedFinalPayment.wxml</text>
/* subvehicleConversion/pages/relatedFinalPayment/relatedFinalPayment.wxss */
\ No newline at end of file \ No newline at end of file
// subvehicleConversion/pages/suplementaryOrderList/suplementaryOrderList.js
import {get4SStoreList} from '~/store/index'
Page({
/**
* 页面的初始数据
*/
data: {
showStorePicker: false,
userInfo: {},
navBarHeight: 0,
selectObj: {
key: 'merchantId',
label: 'merchantName',
placeholder: '门店'
},
defaultSelectInfo: {},
},
init(userInfo) {
this.setData({ userInfo })
this.getStoreList()
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
showStorePicker() {
this.setData({
showStorePicker: true
})
},
getStoreList(e) {
// 获取园区店下的4s店数据 超管拉全部数据
let { userInfo } = this.data
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
scene: 3,
merchantName: e?.detail.value,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
}
this.setData({
defaultSelectInfo: userInfo?.default4SStoreInfo_newCarConversion
})
get4SStoreList(params)
.then(result => {
userInfo = wx.$util.getUserInfo()
let selectStroeIndex =
result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo_newCarConversion?.merchantId
}) > -1
? result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo_newCarConversion?.merchantId
})
: 0
this.setData({
storeListRange: result,
userInfo,
selectStroeIndex,
showPage: true
})
})
.catch(err => {})
},
changePicker(e) {
let { storeListRange, selectStroeIndex } = this.data
let value = (e.detail ?? '') === '' ? selectStroeIndex : e.detail
let default4SStoreInfo_newCarConversion = storeListRange[value]
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), default4SStoreInfo_newCarConversion })
this.setData({
userInfo: { ...wx.$util.getUserInfo(), ...default4SStoreInfo_newCarConversion },
showStorePicker: false,
defaultSelectInfo: default4SStoreInfo_newCarConversion
})
// 获取门店下活动列表
this.selectComponent(`#order-detail`)?.onLoad && this.selectComponent(`#order-detail`).onLoad()
},
back() {
wx.$router.back()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"top-select-picker": "../../components/topSelectPicker/topSelectPicker",
"order-detail": "../../components/supplementaryOrderDetail/supplementaryOrderDetail"
},
"navigationStyle": "custom"
}
\ No newline at end of file \ No newline at end of file
<!--subvehicleConversion/pages/suplementaryOrderList/suplementaryOrderList.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back">
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_newCarConversion && userInfo.default4SStoreInfo_newCarConversion.merchantName}}</view>
<view class="arrow">
<image src="/images/back.png"/>
</view>
</view>
</navigation-bar>
<view class="layout" style="padding-top:{{navBarHeight}}px;position: relative;height: calc(100vh - {{navBarHeight}}px);">
<block wx:if="{{navBarHeight && showPage}}">
<order-detail id="order-detail" navBarHeight="{{navBarHeight}}"></order-detail>
</block>
</view>
<top-select-picker show="{{showStorePicker}}" selectObj="{{selectObj}}" bindsearch="getStoreList" defaultSelectInfo="{{defaultSelectInfo}}" items="{{storeListRange}}" bindconfirm="changePicker"></top-select-picker>
/* subvehicleConversion/pages/suplementaryOrderList/suplementaryOrderList.wxss */
.navigation-header .navigation-bar {
background-color: transparent;
box-shadow: none;
}
.hide {
display: none;
}
.show {
display: block;
}
.navigation-title {
display: flex;
align-items: center;
justify-content: center;
}
.navigation-title-text {
text-align: center;
max-width: calc(100% - 24rpx);
}
.navigation-title .arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
margin-left: 4rpx;
transform: rotate(180deg);
transition: all 0.5s;
}
.navigation-title .move {
transform: rotate(270deg);
}
\ No newline at end of file \ No newline at end of file
// subvehicleConversion/pages/supplementaryOrderPay/supplementaryOrderPay.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* subvehicleConversion/pages/supplementaryOrderPay/supplementaryOrderPay.wxss */
\ No newline at end of file \ No newline at end of file
<!--subvehicleConversion/pages/supplementaryOrderPay/supplementaryOrderPay.wxml-->
<text>subvehicleConversion/pages/supplementaryOrderPay/supplementaryOrderPay.wxml</text>
/* subvehicleConversion/pages/supplementaryOrderPay/supplementaryOrderPay.wxss */
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!