Commit 2cc1b3cf by zhangxw

联调修改

1 parent d5026eb0
Showing 43 changed files with 296 additions and 228 deletions
...@@ -146,5 +146,12 @@ module.exports = { ...@@ -146,5 +146,12 @@ module.exports = {
// 获取园区店下的4s店 // 获取园区店下的4s店
getSceneMerchantRefStoreList(data) { getSceneMerchantRefStoreList(data) {
return api.post('dj.api.scenemerchantref.query4SRefByYqShop', data) return api.post('dj.api.scenemerchantref.query4SRefByYqShop', data)
},
// 获取门店下的员工(推荐人)众筹场景
getStaffListByMerchantAPI(data) {
let params = data || {}
params.sceneList = [3]
return api.post('dj.api.smartcarlife.employee.getByMerchantId', params)
} }
} }
...@@ -82,8 +82,8 @@ ...@@ -82,8 +82,8 @@
{ {
"root": "packageCrowdFunding", "root": "packageCrowdFunding",
"name": "packageCrowdFunding", "name": "packageCrowdFunding",
"pages": ["pages/index/index", "pages/paidOrder/paidOrder","pages/activityList/activityList","pages/activityPay/activityPay","pages/paymentSuccess/paymentSuccess", "pages": ["pages/paidOrder/paidOrder","pages/activityList/activityList","pages/activityPay/activityPay","pages/paymentSuccess/paymentSuccess",
"pages/balanceNote/balanceNote","pages/newOrder/newOrder"] "pages/balanceNote/balanceNote","pages/newOrder/newOrder", "pages/additionRecordOrder/additionRecordOrder"]
} }
], ],
"usingComponents": { "usingComponents": {
......
...@@ -28,4 +28,9 @@ module.exports = { ...@@ -28,4 +28,9 @@ module.exports = {
let params = data || {} let params = data || {}
return api.post('dj.api.smartcarlife.weapp.waitinputorder.page', params) return api.post('dj.api.smartcarlife.weapp.waitinputorder.page', params)
}, },
// 创建子订单(已收款补录订单)
creatFullPayOrderAPI(data) {
return api.post('dj.api.smartcarlife.shopmallSubOrder.createFullPayOrder', data)
}
} }
...@@ -78,7 +78,7 @@ Component({ ...@@ -78,7 +78,7 @@ Component({
handleCellClick(e) { handleCellClick(e) {
let { target, idx } = e.currentTarget.dataset let { target, idx } = e.currentTarget.dataset
switch (target.type) { switch (target.type) {
case 'orderNo': case 'outTradeNo':
this.setData({ this.setData({
targetIdx: idx targetIdx: idx
}) })
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
<text wx:if="{{item.suffix}}" class="input-suffix">{{item.suffix}}</text> <text wx:if="{{item.suffix}}" class="input-suffix">{{item.suffix}}</text>
</view> </view>
<!-- 流水号 --> <!-- 流水号 -->
<view wx:if="{{item.type == 'orderNo'}}" class="orderNo"> <view wx:if="{{item.type == 'outTradeNo'}}" class="no_class">
<view wx:if="{{formData.orderNo}}"> <view wx:if="{{formData.outTradeNo}}" class="text-hide">
{{formData.orderNo}} {{formData.outTradeNo}}
</view> </view>
<view wx:else class="placeholder-class">{{item.placeholder || '请选择'}}</view> <view wx:else class="placeholder-class">{{item.placeholder || '请选择'}}</view>
</view> </view>
......
...@@ -47,7 +47,9 @@ ...@@ -47,7 +47,9 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.orderNo { .no_class {
text-align: right; text-align: right;
padding: 40rpx 0; padding: 40rpx 0;
margin-left: 30rpx;
max-width: 100%;
} }
\ No newline at end of file \ No newline at end of file
// packageCrowdFunding/components/OrderNoPopup/OrderNoPopup.js // packageCrowdFunding/components/OrderNoPopup/OrderNoPopup.js
import api from '../../../api/api.js'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -8,22 +9,12 @@ Component({ ...@@ -8,22 +9,12 @@ Component({
type: Boolean, type: Boolean,
observer: function(n) { observer: function(n) {
if (n) { if (n) {
// 获取交易参考号数据 this.getWaitinputorder()
let { orderNoList, orderInfo } = this.data
orderNoList.map(i => {
i.active = false
if (i.orderNo == orderInfo.orderNo) {
i.active = true
}
return i
})
this.setData({orderNoList})
} }
} }
}, },
title: String, title: String,
orderInfo: Object, orderInfo: Object
orderNoList: Array
}, },
/** /**
...@@ -33,16 +24,20 @@ Component({ ...@@ -33,16 +24,20 @@ Component({
itemFormObj: [ itemFormObj: [
{ {
label: '交易参考号', label: '交易参考号',
prop: 'orderNo' prop: 'outTradeNo'
}, { }, {
label: '支付时间', label: '支付时间',
prop: 'payTime' prop: 'accountDate'
}, { }, {
label: '交易金额', label: '交易金额',
prop: 'payAmount', prop: 'totalFee',
type: 'price' type: 'price'
} }
] ],
currentPage: 1,
pageSize: 10,
pages: '',
orderNoList: []
}, },
/** /**
...@@ -55,13 +50,52 @@ Component({ ...@@ -55,13 +50,52 @@ Component({
let { orderNoList } = this.data let { orderNoList } = this.data
orderNoList.map(i => { orderNoList.map(i => {
i.active = false i.active = false
if (i.orderNo == target.orderNo) { if (i.outTradeNo == target.outTradeNo) {
i.active = true i.active = true
} }
return i return i
}) })
this.setData({orderNoList}) this.setData({orderNoList})
}, },
restPageNum() {
this.setData({
currentPage: 1
})
this.getWaitinputorder()
},
scrollonReachBottom() {
let { pages, currentPage } = this.data
// 判断当前页是否是末页
if (pages == currentPage) return wx.$util.showToast('列表已到底')
this.setData({
currentPage: currentPage + 1
})
this.getWaitinputorder()
},
getWaitinputorder() {
let { currentPage, pageSize, orderNoList, orderInfo } = this.data
api
.waitinputorder({ currentPage, pageSize })
.then(result => {
let { code, data } = result
if (code == 0) {
data.list.forEach(element => {
element.accountDate = new Date(element.accountDate).format('yyyy-MM-dd hh:mm:ss')
element.totalFee = element.totalFee / 100
element.active = false
if (element.outTradeNo == orderInfo.outTradeNo) {
element.active = true
}
})
this.setData({
orderNoList: currentPage == 1 ? data.list : [...orderNoList, ...data.list],
pages: data.pages,
triggered: false
})
}
})
.catch(err => {})
},
confirm() { confirm() {
let { orderNoList, orderInfo } = this.data let { orderNoList, orderInfo } = this.data
let arr = orderNoList?.filter(v => v.active) || [] let arr = orderNoList?.filter(v => v.active) || []
...@@ -72,7 +106,7 @@ Component({ ...@@ -72,7 +106,7 @@ Component({
}) })
} }
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
orderInfo.orderNo = arr[0]?.orderNo || '' orderInfo.outTradeNo = arr[0]?.outTradeNo || ''
thisPage.setData({ thisPage.setData({
orderInfo, orderInfo,
orderNoPopup: false orderNoPopup: false
......
...@@ -2,7 +2,15 @@ ...@@ -2,7 +2,15 @@
<wxs src="index.wxs" module="filter" /> <wxs src="index.wxs" module="filter" />
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="60%"> <popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="60%">
<view class="sub-title text-center">{{title}}</view> <view class="sub-title text-center">{{title}}</view>
<scroll-view class="order_no_box" scroll-y enhanced="{{true}}" show-scrollbar="{{false}}"> <scroll-view
class="order_no_box"
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<block wx:for="{{orderNoList}}" wx:key="index"> <block wx:for="{{orderNoList}}" wx:key="index">
<view class="order_no_item {{item.active?'active':''}}" bindtap="changeOrderNo" data-target="{{item}}"> <view class="order_no_item {{item.active?'active':''}}" bindtap="changeOrderNo" data-target="{{item}}">
<view class="message"> <view class="message">
......
...@@ -38,6 +38,9 @@ Component({ ...@@ -38,6 +38,9 @@ Component({
wx.$router.go(choiceList[0].url,{ wx.$router.go(choiceList[0].url,{
activityName: this.data.activityName activityName: this.data.activityName
}) })
this.setData({
show: false
})
}, },
cancel() { cancel() {
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
<!--</popup>--> <!--</popup>-->
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="460rpx"> <popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="480rpx">
<view class="sub-title text-center">请选择创建订单方式</view> <view class="sub-title text-center">请选择创建订单方式</view>
<block wx:for="{{optionList}}" wx:key="index"> <block wx:for="{{optionList}}" wx:key="index">
<view class="picker_item {{item.active?'active':''}}" bindtap="changeitem" data-target="{{item}}"> <view class="picker_item {{item.active?'active':''}}" bindtap="changeitem" data-target="{{item}}">
......
...@@ -6,7 +6,7 @@ Page({ ...@@ -6,7 +6,7 @@ Page({
*/ */
data: { data: {
tabIndex: 0, tabIndex: 0,
navBarHeight:100, navBarHeight: 0,
defaultOderSelect:'', defaultOderSelect:'',
showPicker:false, showPicker:false,
oderSelectItem:[{merchantName:1},{merchantName:2}], oderSelectItem:[{merchantName:1},{merchantName:2}],
...@@ -24,8 +24,15 @@ Page({ ...@@ -24,8 +24,15 @@ Page({
}) })
}, },
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
back() { back() {
wx.$router.reLaunch('pages.sceneIndex') wx.$router.back()
}, },
/** /**
......
<!--packageCrowdFunding/pages/activityList/activityList.wxml--> <!--packageCrowdFunding/pages/activityList/activityList.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{true}}" bindback="back"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back">
<view class="navigation-title" bindtap="showStorePicker"> <view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{activityName}}</view> <view class="navigation-title-text text-hide">{{activityName}}</view>
<view class="arrow"> <view class="arrow">
......
.navigation-title{
display: flex;
align-items: center;
justify-content: center;
}
.navigation-title .arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
margin-left: 4rpx;
transform: rotate(180deg);
transition: all 0.5s;
}
.headerBar { .headerBar {
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
......
/* packageCrowdFunding/pages/activityPay/activityPay.wxss */
\ No newline at end of file \ No newline at end of file
// packageCrowdFunding/pages/additionRecordOrder/additionRecordOrder.js // packageCrowdFunding/pages/additionRecordOrder/additionRecordOrder.js
import constantData from './constant/data' import constantData from './constant/data'
import api from "../../api"
const app = getApp()
Page({ Page({
/** /**
...@@ -7,50 +9,23 @@ Page({ ...@@ -7,50 +9,23 @@ Page({
*/ */
data: { data: {
orderObj: constantData.orderObj, orderObj: constantData.orderObj,
orderInfo: {orderNo: '52632145854', goodId: 2, referrerId: 2}, orderInfo: {},
orderNoPopup: false, orderNoPopup: false
orderNoList: [{
orderNo: '52632145852',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}, {
orderNo: '52632145854',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}, {
orderNo: '52632145853',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}, {
orderNo: '52632145855',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}, {
orderNo: '52632145856',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}, {
orderNo: '52632145857',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}]
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
// 推荐人
let { orderObj } = this.data let { orderObj } = this.data
orderObj.orderFormList[3].optionList = [{ if (app.globalData?.staffListRange && orderObj?.orderFormList) {
referrerId: 1, orderObj.orderFormList[orderObj.orderFormList.length - 1].optionList = app.globalData.staffListRange
referrerName: '张三' }
}, { this.setData({orderObj})
referrerId: 2, },
referrerName: '李四'
}] onRoute(options) {
this.setData({
orderObj
})
}, },
// 交易流水号 // 交易流水号
...@@ -71,6 +46,7 @@ Page({ ...@@ -71,6 +46,7 @@ Page({
confirm() { confirm() {
let { orderInfo } = this.data let { orderInfo } = this.data
let userInfo = wx.$util.getUserInfo()
let validObj = wx.$util.checkRule(orderInfo, constantData.formRule) let validObj = wx.$util.checkRule(orderInfo, constantData.formRule)
if (validObj) { if (validObj) {
wx.$util.showToast(validObj.message) wx.$util.showToast(validObj.message)
...@@ -83,7 +59,16 @@ Page({ ...@@ -83,7 +59,16 @@ Page({
confirmColor: '#3582EE', confirmColor: '#3582EE',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
// _this.getInviteDetail(id) let params = {
outTradeNo: orderInfo.outTradeNo,
customerName: orderInfo.customerName,
customerPhone: orderInfo.customerPhone,
userId: orderInfo.uuid,
employeeName: orderInfo.staffName,
merchantId: userInfo?.default4SStoreInfo?.merchantId,
merchantName: userInfo?.default4SStoreInfo?.merchantName
}
api.creatFullPayOrderAPI(params)
} }
} }
}) })
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
</view> </view>
</view> </view>
<order-no-popup <order-no-popup
wx:if="{{orderNoPopup}}"
show="{{orderNoPopup}}" show="{{orderNoPopup}}"
title="请选择交易参考号" title="请选择交易参考号"
orderInfo="{{orderInfo}}" orderInfo="{{orderInfo}}"/>
orderNoList="{{orderNoList}}"/>
<picker-select <picker-select
show="{{showPickerSelect}}" show="{{showPickerSelect}}"
title="请选择{{pickerTitle}}" title="请选择{{pickerTitle}}"
......
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/
const formRule = { const formRule = {
orderNo: [{ required: true, message: '交易流水号不能为空' }], outTradeNo: [{ required: true, message: '交易流水号不能为空' }],
customerName: [{ required: true, message: '客户名称不能为空' }], customerName: [{ required: true, message: '客户名称不能为空' }],
customerPhone: [ customerPhone: [
{ required: true, message: '联系电话不能为空' }, { required: true, message: '联系电话不能为空' },
...@@ -10,15 +10,15 @@ const formRule = { ...@@ -10,15 +10,15 @@ const formRule = {
} }
} }
], ],
referrerId: [{ required: true, message: '推荐人不能为空' }], uuid: [{ required: true, message: '推荐人不能为空' }],
} }
const orderObj = { const orderObj = {
orderFormList: [ orderFormList: [
{ {
label: '交易流水号', label: '交易流水号',
name: 'referrer', name: 'outTradeNo',
type: 'orderNo', type: 'outTradeNo',
haveArrow: true, haveArrow: true,
noCellHeight: true, noCellHeight: true,
placeholder: '请选择' placeholder: '请选择'
...@@ -36,11 +36,11 @@ const orderObj = { ...@@ -36,11 +36,11 @@ const orderObj = {
}, },
{ {
label: '推荐人', label: '推荐人',
name: 'referrer', name: 'uuid',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'referrerId', optionId: 'uuid',
optionName: 'referrerName', optionName: 'staffName',
noBorder: true noBorder: true
} }
], ],
...@@ -49,15 +49,7 @@ const orderObj = { ...@@ -49,15 +49,7 @@ const orderObj = {
label: '商品名称', label: '商品名称',
name: 'shopName', name: 'shopName',
type: 'select', type: 'select',
optionList: [{ readonly: true
goodId: 1,
goodName: '商品1'
}, {
goodId: 2,
goodName: '商品2'
}],
optionId: 'goodId',
optionName: 'goodName'
}, },
{ {
label: '订金金额', label: '订金金额',
......
...@@ -47,7 +47,7 @@ Page({ ...@@ -47,7 +47,7 @@ Page({
wx.$router.go('activityPay') wx.$router.go('activityPay')
}, },
back() { back() {
wx.$router.go('activityList') wx.$router.back()
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;
margin-top: 40rpx;
.sum{ .sum{
font-size: 34rpx } } font-size: 34rpx } }
......
/* packageCrowdFunding/pages/balanceNote/balanceNote.wxss */
\ No newline at end of file \ No newline at end of file
// packageCrowdFunding/pages/index/index.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
/* packageCrowdFunding/pages/index/index.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageCrowdFunding/pages/index/index.wxml-->
<text>packageCrowdFunding/pages/index/index.wxml</text>
...@@ -26,8 +26,8 @@ const orderObj = { ...@@ -26,8 +26,8 @@ const orderObj = {
name: 'employeeName', name: 'employeeName',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'referrerId', optionId: 'uuid',
optionName: 'referrerName' optionName: 'staffName'
} }
], ],
shopFormList: [ shopFormList: [
......
// packageCrowdFunding/pages/newOrder/newOrder.js // packageCrowdFunding/pages/newOrder/newOrder.js
import constantData from './constant/data' import constantData from './constant/data'
const app = getApp()
Page({ Page({
/** /**
...@@ -14,22 +15,15 @@ Page({ ...@@ -14,22 +15,15 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options) // 推荐人
console.log(this.data.orderObj)
let { orderObj } = this.data let { orderObj } = this.data
orderObj.orderFormList[3].optionList = [{ if (app.globalData?.staffListRange && orderObj?.orderFormList) {
referrerId: 1, orderObj.orderFormList[orderObj.orderFormList.length - 1].optionList = app.globalData.staffListRange
referrerName: '张三' }
}, { this.setData({orderObj})
referrerId: 2,
referrerName: '李四'
}]
this.setData({
orderObj
})
}, },
back(){ back(){
wx.$router.go('activityList') wx.$router.back()
}, },
confirm(e){ confirm(e){
......
/* packageCrowdFunding/pages/newOrder/newOrder.wxss */
\ No newline at end of file \ No newline at end of file
import { get4SStoreList } from '~/store/index' import { get4SStoreList, getStaffListByMerchant } from '~/store/index'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -22,7 +22,13 @@ Page({ ...@@ -22,7 +22,13 @@ Page({
getStoreList(e) { getStoreList(e) {
// 获取园区店下的4s店数据 超管拉全部数据 // 获取园区店下的4s店数据 超管拉全部数据
let { userInfo } = this.data let { userInfo } = this.data
get4SStoreList({ yqMerchantId: userInfo?.isSuper ? '' : userInfo?.merchantId, merchantName: e?.detail.value }) let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
scene: 3,
merchantName: e?.detail.value,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
}
get4SStoreList(params)
.then(result => { .then(result => {
userInfo = wx.$util.getUserInfo() userInfo = wx.$util.getUserInfo()
let selectStroeIndex = let selectStroeIndex =
...@@ -33,6 +39,11 @@ Page({ ...@@ -33,6 +39,11 @@ Page({
return v.merchantId == userInfo?.default4SStoreInfo?.merchantId return v.merchantId == userInfo?.default4SStoreInfo?.merchantId
}) })
: 0 : 0
// 获取门店下的员工(推荐人)
let params = {
merchantId: userInfo?.default4SStoreInfo?.merchantId
}
getStaffListByMerchant({...params})
this.setData({ this.setData({
storeListRange: result, storeListRange: result,
userInfo, userInfo,
...@@ -48,10 +59,14 @@ Page({ ...@@ -48,10 +59,14 @@ Page({
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 })
this.selectComponent('#page-0')?.onLoad()
this.setData({ this.setData({
userInfo: { ...wx.$util.getUserInfo(), default4SStoreInfo } userInfo: { ...wx.$util.getUserInfo(), default4SStoreInfo }
}) })
// 获取门店下的员工(推荐人)
let params = {
merchantId: storeListRange[value]?.merchantId
}
getStaffListByMerchant({...params})
}, },
......
/* packageCrowdFunding/pages/paymentSuccess/paymentSuccess.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -17,6 +17,7 @@ Page({ ...@@ -17,6 +17,7 @@ Page({
// 倒计时10s功能 // 倒计时10s功能
countDownTimer() { countDownTimer() {
let sec = 10 let sec = 10
let { id, orderId } = this.data
let that = this let that = this
timer = setInterval(() => { timer = setInterval(() => {
let objNameStr = 'textNameObj.confirmName' let objNameStr = 'textNameObj.confirmName'
...@@ -28,18 +29,21 @@ Page({ ...@@ -28,18 +29,21 @@ Page({
if (sec == -1) { if (sec == -1) {
clearInterval(timer) // 清除定时器 clearInterval(timer) // 清除定时器
// 跳转提单页面 // 跳转提单页面
this.navigator() // this.navigator()
// 跳转签名页面
wx.$router.redirectTo('signature', { id, orderId })
} }
}, 1000) }, 1000)
}, },
btnTap(e) { btnTap(e) {
console.log(e) console.log(e)
let { name } = e.detail let { name } = e.detail
let { id, orderId } = this.data
if (name == 'confirm') { if (name == 'confirm') {
this.navigator() wx.$router.redirectTo('signature', { id, orderId })
} else { } else {
// this.triggerEvent('editSave') // this.triggerEvent('editSave')
wx.$router.redirectTo('signature', { id }) this.navigator()
// wx.$router.reLaunch('packageEquity.equityPage') // wx.$router.reLaunch('packageEquity.equityPage')
// wx.$router.reLaunch('packageEquity.index') // wx.$router.reLaunch('packageEquity.index')
} }
...@@ -71,12 +75,12 @@ Page({ ...@@ -71,12 +75,12 @@ Page({
}) })
}, },
onRoute(options) { onRoute(options) {
console.log(options) let { orderDetail, orderCode, orderId, id } = options
let { orderDetail, orderCode, orderId } = options
this.setData({ this.setData({
orderCode: orderCode, orderCode: orderCode,
orderDetail, orderDetail,
orderId orderId,
id
}) })
this.getOrderDetail() this.getOrderDetail()
// this.countDownTimer() // this.countDownTimer()
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="descText"> <view class="descText">
<text>1.</text> <text>1.</text>
<text class="fontBold">客户服务合同</text> <text class="fontBold">客户服务合同</text>
<text>:手机端支持ocr快速出单,点下一步去提单或权益订单补录;</text> <text>:手机端支持ocr快速出单,点下一步去签名;</text>
</view> </view>
<view class="descText"> <view class="descText">
2. 2.
......
...@@ -189,7 +189,8 @@ Page({ ...@@ -189,7 +189,8 @@ Page({
}).then(res => { }).then(res => {
// _this.saveToHttp(img) // _this.saveToHttp(img)
let { data } = res let { data } = res
_this.saveToHttp(data) // _this.saveToHttp(data)
this.changeOrderStatus(data)
}) })
}, },
fail() { fail() {
...@@ -197,6 +198,21 @@ Page({ ...@@ -197,6 +198,21 @@ Page({
} }
}) })
}, },
changeOrderStatus(signUrl) {
let { id } = this.data
updateOrderStatus({ id, orderStatus: 3, customerNameUrl: signUrl })
.then(result => {
this.navigator()
})
.catch(err => {})
},
navigator() {
let { orderId } = this.data
wx.$router.go('serviceInfo', {
orderId: orderId,
apiName: 'handler'
})
},
// 上传签名到后端 // 上传签名到后端
saveToHttp(signUrl) { saveToHttp(signUrl) {
let { id } = this.data let { id } = this.data
......
// packageEquity/pages/carQuotation/index/index.js // packageEquity/pages/carQuotation/index/index.js
import { quotationPage, getQuotationStatistics } from '../../../api' import { quotationPage, getQuotationStatistics, updateOrderStatus } from '../../../api'
import data from '../constant/data' import data from '../constant/data'
import constantData from '../constant/data' import constantData from '../constant/data'
Component({ Component({
...@@ -251,14 +251,33 @@ Component({ ...@@ -251,14 +251,33 @@ Component({
}) })
break break
} }
this.setData({
id: target.id
})
}, },
remarkCancel() { remarkCancel() {
this.setData({ this.setData({
showRemark: false showRemark: false
}) })
}, },
remarkConfirm() { remarkConfirm(e) {
// 战败接口 let value = e.detail
let { id } = this.data
if (value) {
updateOrderStatus({
id,
orderStatus: -1,
remark: value
}).then(res => {
let { code, message } = res
if (code == 0) {
wx.$util.showToast('提交成功')
this.onLoad()
} else {
wx.$util.showToast(message)
}
})
} }
},
} }
}) })
...@@ -157,4 +157,4 @@ ...@@ -157,4 +157,4 @@
<!-- 超管isSuper/商户类型 userType 1账号不可操作 --> <!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<image data-target="addOrder" wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}" bind:tap="handleClickOrderBtn" class="addOrder" src="/packageEquity/images/addOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" /> <image data-target="addOrder" wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}" bind:tap="handleClickOrderBtn" class="addOrder" src="/packageEquity/images/addOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" />
</view> </view>
<remark-popup wx:if="{{showRemark}}" title="战败原因" show="{{showRemark}}" required="{{true}}" bindcancel="remarkCancel" bindconfirm="remarkConfirm" placeholder="请填写战败原因" maxlength="30" value="{{sufferReason}}" /> <remark-popup wx:if="{{showRemark}}" title="战败原因" show="{{showRemark}}" required="{{true}}" bindcancel="remarkCancel" bindconfirm="remarkConfirm" placeholder="请填写战败原因" maxlength="15" value="{{sufferReason}}" />
// packageEquity/pages/carQuotation/schemeConfirmation/schemeConfirmation.js // packageEquity/pages/carQuotation/schemeConfirmation/schemeConfirmation.js
import { quotationPicture, updateOrderStatus, quotationGenerate } from '../../../api' import { quotationPicture, updateOrderStatus, quotationGenerate, quotationUpgrade } from '../../../api'
import { quotedImgUrl } from '~/config' import { quotedImgUrl } from '~/config'
Page({ Page({
/** /**
...@@ -67,7 +67,18 @@ Page({ ...@@ -67,7 +67,18 @@ Page({
console.log(wx.$router) console.log(wx.$router)
// this.triggerEvent('confirm') // this.triggerEvent('confirm')
// wx.$router.redirectTo('signature', { id }) // wx.$router.redirectTo('signature', { id })
wx.$router.redirectTo('CarQuotationPay', { id }) // 报价单支付订单生成
let para = {
id,
customerNameUrl: '',
orderStatus: 2
}
quotationUpgrade(para).then(res => {
wx.$util.hideLoading()
console.log(res, 'res')
let { code, data } = res
code == 0 && wx.$router.redirectTo('CarQuotationPay', { data, id })
})
} else if (name == 'edit') { } else if (name == 'edit') {
// this.triggerEvent('editSave') // this.triggerEvent('editSave')
this.backEdit() this.backEdit()
......
...@@ -14,7 +14,7 @@ Page({ ...@@ -14,7 +14,7 @@ Page({
y: 0 y: 0
}, },
textNameObj: { textNameObj: {
confirmName: '前往提单', confirmName: '已完成,去提单',
// editName: '修改', // editName: '修改',
cancelName: '稍后处理' cancelName: '稍后处理'
}, },
...@@ -28,8 +28,10 @@ Page({ ...@@ -28,8 +28,10 @@ Page({
}, },
onRoute(options) { onRoute(options) {
let id = options.id || 10 let id = options.id || 10
let orderId = options.orderId
this.setData({ this.setData({
id id,
orderId
}) })
}, },
onLoad(options) { onLoad(options) {
...@@ -199,7 +201,9 @@ Page({ ...@@ -199,7 +201,9 @@ Page({
file: `${type}@${_res.data}` file: `${type}@${_res.data}`
}).then(res => { }).then(res => {
let { data } = res let { data } = res
_this.saveToHttp(data) // _this.saveToHttp(data)
// 更新报价单状态
this.changeOrderStatus(data)
}) })
}, },
fail() { fail() {
...@@ -207,6 +211,21 @@ Page({ ...@@ -207,6 +211,21 @@ Page({
} }
}) })
}, },
changeOrderStatus(signUrl) {
let { id } = this.data
updateOrderStatus({ id, orderStatus: 3, customerNameUrl: signUrl })
.then(result => {
this.navigator()
})
.catch(err => {})
},
navigator() {
let { orderId } = this.data
wx.$router.go('serviceInfo', {
orderId: orderId,
apiName: 'handler'
})
},
// 上传签名到后端 // 上传签名到后端
saveToHttp(signUrl) { saveToHttp(signUrl) {
let { id } = this.data let { id } = this.data
......
...@@ -202,7 +202,7 @@ Page({ ...@@ -202,7 +202,7 @@ Page({
if (v.sceneOpenFlag === 0) openSceneArr.push(v.scene) if (v.sceneOpenFlag === 0) openSceneArr.push(v.scene)
}) })
if (!openSceneArr.length) { if (!openSceneArr.length) {
wx.$util.showToast('暂无开通场景') wx.$util.showToast('暂无开通业务,请联系总部管理员')
} else { } else {
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), openSceneArr }) wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), openSceneArr })
// 只开通一个场景直接跳转页面 // 只开通一个场景直接跳转页面
......
...@@ -247,3 +247,22 @@ export const get4SStoreList = options => { ...@@ -247,3 +247,22 @@ export const get4SStoreList = options => {
}) })
}) })
} }
/** 获取门店下的员工(推荐人) */
export const getStaffListByMerchant = options => {
return new Promise((resolve, reject) => {
const app = getApp()
api
.getStaffListByMerchantAPI(options)
.then(res => {
let { code, data } = res
if (code == 0) {
app.globalData.staffListRange = data
resolve(app.globalData.staffListRange)
}
})
.catch(error => {
console.log(error)
})
})
}
...@@ -120,12 +120,4 @@ module.exports = { ...@@ -120,12 +120,4 @@ module.exports = {
waitinputorderSelectById(data) { waitinputorderSelectById(data) {
return api.post('dj.api.smartcarlife.weapp.waitinputorder.selectById', data) return api.post('dj.api.smartcarlife.weapp.waitinputorder.selectById', data)
}, },
/** 获取门店是否配置施工技师 */
getMerchantIsSettingArtificer(data) {
return api.post('', data)
},
/** 获取门店下的所有技师 */
getArtificerListByMerchant(data) {
return api.post('', data)
}
} }
...@@ -252,8 +252,10 @@ Page({ ...@@ -252,8 +252,10 @@ Page({
customerObj customerObj
}) })
} }
// 校验是否显示选择技师 // 有配置技师
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data) this.isArtificer(data)
}
} else { } else {
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
...@@ -272,7 +274,7 @@ Page({ ...@@ -272,7 +274,7 @@ Page({
}, },
isArtificer(data) { isArtificer(data) {
let { customerObj } = this.data let { customerObj, orderInfo } = this.data
customerObj[customerObj.length] = { customerObj[customerObj.length] = {
label: '选择技师:', label: '选择技师:',
key: 'subShopMerchantName', key: 'subShopMerchantName',
...@@ -280,23 +282,8 @@ Page({ ...@@ -280,23 +282,8 @@ Page({
callBack: 'selectArtificer' callBack: 'selectArtificer'
} }
this.setData({ this.setData({
customerObj
})
api.getMerchantIsSettingArtificer({merchantId: data?.merchantId}).then(res => {
let { code, data, message } = res
if (code == 0) {
let { customerObj, orderInfo } = this.data
customerObj[customerObj.length] = {
label: '选择技师:',
key: 'subShopMerchantName'
}
this.setData({
customerObj, customerObj,
orderInfo artificerList: orderInfo?.technicianConfigDTOList
})
} else {
wx.$util.showToast(message)
}
}) })
}, },
......
...@@ -211,8 +211,10 @@ Page({ ...@@ -211,8 +211,10 @@ Page({
customerObj customerObj
}) })
} }
// 获取门店是否配置技师 // 门店是否配置技师
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data) this.isArtificer(data)
}
} else { } else {
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
...@@ -235,7 +237,7 @@ Page({ ...@@ -235,7 +237,7 @@ Page({
orderInfo.isOpenArtificer = true orderInfo.isOpenArtificer = true
customerObj[customerObj.length] = { customerObj[customerObj.length] = {
label: '选择技师:', label: '选择技师:',
key: 'subShopMerchantName' key: 'technicianName'
} }
this.setData({ this.setData({
customerObj, customerObj,
...@@ -247,7 +249,7 @@ Page({ ...@@ -247,7 +249,7 @@ Page({
let { customerObj, orderInfo } = this.data let { customerObj, orderInfo } = this.data
customerObj[customerObj.length] = { customerObj[customerObj.length] = {
label: '选择技师:', label: '选择技师:',
key: 'subShopMerchantName' key: 'technicianName'
} }
this.setData({ this.setData({
customerObj, customerObj,
......
...@@ -203,8 +203,10 @@ Page({ ...@@ -203,8 +203,10 @@ Page({
customerObj customerObj
}) })
} }
// 获取门店是否配置技师 // 门店是否配置技师
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data) this.isArtificer(data)
}
} else { } else {
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
......
...@@ -225,7 +225,6 @@ Page({ ...@@ -225,7 +225,6 @@ Page({
orderObj[e] = options[e] orderObj[e] = options[e]
} }
}) })
console.log(orderObj)
if (!orderObj.customer) orderObj.customer = orderObj.customerInfo if (!orderObj.customer) orderObj.customer = orderObj.customerInfo
if (!orderObj.customer.customerSex) orderObj.customer.customerSex = 1 if (!orderObj.customer.customerSex) orderObj.customer.customerSex = 1
...@@ -233,7 +232,8 @@ Page({ ...@@ -233,7 +232,8 @@ Page({
this.setData({ this.setData({
orderObj, orderObj,
first: true, first: true,
flag: true flag: true,
artificerList: orderObj?.technicianConfigDTOList
}) })
}, },
getSetting() { getSetting() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!