Commit 823d50e0 by 张立顺

Merge branch 'dev_v4.32.0_1130' of http://192.168.3.233:8090/saas_plus/dj-car-bo…

…utique-work-wechat into dev_v4.32.0_1130
2 parents 6a3d8a28 9a8e4d64
Showing 60 changed files with 911 additions and 363 deletions
...@@ -185,5 +185,14 @@ module.exports = { ...@@ -185,5 +185,14 @@ module.exports = {
// 按客户查找门店工单/预约 // 按客户查找门店工单/预约
searchOrderCustomer(data) { searchOrderCustomer(data) {
return api.post('dj.api.smartcarlife.order.searchOrderCustomer', data) return api.post('dj.api.smartcarlife.order.searchOrderCustomer', data)
} },
// 获取服务商库存管理模式(是否使用膜卷号)
getServiceFilmRollSetting(data) {
return api.post('dj.api.smarcarlife.stock.management.mode', data)
},
/**退出*/
logout() {
return api.post('dj.api.smartcarlife.logout')
},
} }
...@@ -27,7 +27,8 @@ Component({ ...@@ -27,7 +27,8 @@ Component({
type: Number type: Number
// value:0 // value:0
}, },
isSolarFilm: Boolean isSolarFilm: Boolean,
baseConfigData: Object
}, },
/** /**
...@@ -76,6 +77,18 @@ Component({ ...@@ -76,6 +77,18 @@ Component({
goodsList: data goodsList: data
}) })
}, },
// 删除数组重复项 都不保留
removeDuplicates(arr, property) {
var uniqueArray = []
for (var i = 0; i < arr.length; i++) {
var value = arr[i][property]
if (!uniqueArray.some(obj => obj[property] === value)) {
uniqueArray.push(arr[i])
}
}
return uniqueArray
},
// 去重保留第二项 // 去重保留第二项
arrayUnique(arr, name) { arrayUnique(arr, name) {
var hash = {} var hash = {}
...@@ -94,24 +107,33 @@ Component({ ...@@ -94,24 +107,33 @@ Component({
let chooseList = [] let chooseList = []
// 太阳膜下单 需保留已选的商品 // 太阳膜下单 需保留已选的商品
if (isSolarFilm) { if (isSolarFilm) {
let upgradeGoodsList = []
goodsList.map(e => { goodsList.map(e => {
let arr = this.arrayUnique(e.upgradeGoodsList.concat(chooseGoodsList), 'id') upgradeGoodsList = upgradeGoodsList.concat(e.upgradeGoodsList)
arr?.map(c => { })
if (c.active) { let selectActiveArr = []
if (!c.count) c.count = 1 for (var i = 0; i < upgradeGoodsList?.length; i++) {
if (chooseGoodsList.length > 0) { let val = upgradeGoodsList[i]
chooseGoodsList.map(x => { if (val.active) selectActiveArr.push(val)
if (x.id == c.id) { }
c.price = x.price || 0 if (!selectActiveArr?.length) return wx.$util.showToast('请勾选商品')
} // 将已选商品与当前弹窗数据对比处理数据
}) let arr = this.removeDuplicates(upgradeGoodsList.concat(chooseGoodsList), 'id')
} else { arr?.map(c => {
c.price = c.upgradePrice || 0 if (c.active) {
} if (!c.count) c.count = 1
if (!c.price) c.price = c.upgradePrice if (chooseGoodsList.length > 0) {
chooseList.push(c) chooseGoodsList.map(x => {
if (x.id == c.id) {
c.price = x.price || 0
}
})
} else {
c.price = c.upgradePrice || 0
} }
}) if (!c.price) c.price = c.upgradePrice
chooseList.push(c)
}
}) })
} else { } else {
goodsList.map(e => { goodsList.map(e => {
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
data-item="{{i}}"> data-item="{{i}}">
<view class="name text-hide {{i.active?'textWidth':''}}"> <view class="name text-hide {{i.active?'textWidth':''}}">
<text>{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsInfo.goodsName)}}</text> <text>{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsInfo.goodsName)}}</text>
<text wx:if="{{i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">{{'「' + i.positionStr+'」'}}</text> <text wx:if="{{i.merchantGoodsPosition && (i.goodsInfo.goodsType == 1 || i.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.positionStr+'」'}}</text>
<text class="warning_text" wx:if="{{!i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">无部位</text> <text class="warning_text" wx:if="{{!i.merchantGoodsPosition && (i.goodsInfo.goodsType == 1 || i.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text>
</view> </view>
<view class="last" wx:if="{{!i.active}}"> <view class="last" wx:if="{{!i.active}}">
<!-- | --> <!-- | -->
......
...@@ -31,10 +31,12 @@ Component({ ...@@ -31,10 +31,12 @@ Component({
copyStoreList: storeList, copyStoreList: storeList,
searchValue: '', searchValue: '',
edit: false, edit: false,
customStoreList: [],
customSearchFlag: false, customSearchFlag: false,
searchSelectIndex: 0 showSelect: false,
nothing: false,
pageNum: 1
}) })
this.searchEvent(true)
} }
} }
}, },
...@@ -193,10 +195,6 @@ Component({ ...@@ -193,10 +195,6 @@ Component({
keyword: searchValue, keyword: searchValue,
sellerMerchantId: userInfo?.isSuper ? '' : (userInfo?.merchantId || '') sellerMerchantId: userInfo?.isSuper ? '' : (userInfo?.merchantId || '')
} }
if (!searchValue) {
this.setData({customStoreList: []})
return
}
if (nothing) return if (nothing) return
api.searchOrderCustomer(params).then(res => { api.searchOrderCustomer(params).then(res => {
let { code, data, message } = res let { code, data, message } = res
...@@ -254,6 +252,7 @@ Component({ ...@@ -254,6 +252,7 @@ Component({
} else { // 搜门店 } else { // 搜门店
thisPage.changePicker && thisPage.changePicker(storeList[item.index], item.index) thisPage.changePicker && thisPage.changePicker(storeList[item.index], item.index)
} }
wx.$util.refreshPageData()
return return
} }
// 切换4s店 // 切换4s店
...@@ -366,6 +365,7 @@ Component({ ...@@ -366,6 +365,7 @@ Component({
userInfo: obj userInfo: obj
}) })
} }
wx.$util.refreshPageData()
// 除精品升级外 切换门店刷新数据 // 除精品升级外 切换门店刷新数据
thisPage.initList && thisPage.initList() thisPage.initList && thisPage.initList()
// 精品升级首页数据刷新 // 精品升级首页数据刷新
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<view><image src="{{IMG_URL}}/user_avatar.png"></image></view> <view><image src="{{IMG_URL}}/user_avatar.png"></image></view>
<view class="text_box"> <view class="text_box">
<view class="custom_text"> <view class="custom_text">
<view> <view class="name_phone">
<text class="custom_name">{{item.customer.customerName}}</text> <text class="custom_name">{{item.customer.customerName}}</text>
<text class="custom_phone">{{item.customer.customerPhone}}</text> <text class="custom_phone">{{item.customer.customerPhone}}</text>
</view> </view>
......
...@@ -259,6 +259,13 @@ ...@@ -259,6 +259,13 @@
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.wrapper .custom_element .text_box .custom_text .name_phone{
max-width: 260rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.wrapper .custom_element .text_box .custom_text .custom_name{ .wrapper .custom_element .text_box .custom_text .custom_name{
font-size: 28rpx; font-size: 28rpx;
} }
......
...@@ -64,12 +64,12 @@ Component({ ...@@ -64,12 +64,12 @@ Component({
let readyLeft = oldLeft > left ? left : oldLeft let readyLeft = oldLeft > left ? left : oldLeft
let readyWidth = oldLeft > left ? oldLeft - left : left - oldLeft let readyWidth = oldLeft > left ? oldLeft - left : left - oldLeft
this.setData({ this.setData({
activeStyle: `width:${readyWidth - oldWidth / 2 + width / 2}px;background-color:#347BFF;border-radius:3rpx;left:${readyLeft + oldWidth / 2}px;transition: all .1s;` activeStyle: `width: 64rpx;background-color:#347BFF;border-radius:3rpx;left:${readyLeft + readyWidth / 2}px;transition: all .1s;`
}) })
} }
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
activeStyle: `width:${width}px;left:${left}px;background-color:#347BFF;`, activeStyle: `width: 64rpx;left:${left + (width - 32) / 2}px;background-color:#347BFF;`,
tabIndex: index, tabIndex: index,
width width
}) })
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<block wx:for="{{tabList}}" wx:key="index"> <block wx:for="{{tabList}}" wx:key="index">
<!-- style="color:{{tabIndex==index?'#347BFF':''}};" --> <!-- style="color:{{tabIndex==index?'#347BFF':''}};" -->
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}"> <view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}">
<text id="tab-{{index}}"><text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count}}" style="font-size: 24rpx;">({{item.count}})</text></text> <text id="tab-{{index}}"><text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count >= 0}}" style="font-size: 20rpx;">({{item.count}})</text></text>
</view> </view>
</block> </block>
<view class="active-doc" style="{{activeStyle}}" /> <view class="active-doc" style="{{activeStyle}}" />
......
/* components/TabBar/TabBar.wxss */ /* components/TabBar/TabBar.wxss */
.tab { .tab {
background-color: #fff; background-color: #fff;
height: 104rpx; height: 88rpx;
box-sizing: border-box; box-sizing: border-box;
display: grid; display: grid;
align-items: center; align-items: center;
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
.active-doc { .active-doc {
position: absolute; position: absolute;
bottom: 1rpx; bottom: 1rpx;
height: 6rpx; height: 4rpx;
border-radius: 2rpx 2rpx 0 0;
transition: all .25s; transition: all .25s;
} }
......
...@@ -3,10 +3,9 @@ ...@@ -3,10 +3,9 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 20rpx; padding: 16rpx;
font-weight: 500; font-weight: 500;
background: #EFF5FE; background: #EFF5FE;
height: 72rpx;
width: 100%; width: 100%;
color: #347BFF; color: #347BFF;
font-size: 24rpx; font-size: 24rpx;
...@@ -15,10 +14,12 @@ ...@@ -15,10 +14,12 @@
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
margin-right: 8rpx; margin-right: 8rpx;
flex-shrink: 0;
} }
.closeIcon { .closeIcon {
width: 26rpx; width: 26rpx;
height: 26rpx; height: 26rpx;
flex-shrink: 0;
} }
.tips .contentText { .tips .contentText {
margin-right: auto; margin-right: auto;
......
...@@ -138,10 +138,10 @@ Component({ ...@@ -138,10 +138,10 @@ Component({
statisticsObj: data || {} statisticsObj: data || {}
}) })
this.setData({ this.setData({
['tabList[0]']: TABLIST[0] + '(' + (data.totalOder || 0) + ')', ['tabList[0]']: {text: TABLIST[0], count: data.totalOder || 0},
['tabList[1]']: TABLIST[1] + '(' + (data.ladingOder || 0) + ')', ['tabList[1]']: {text: TABLIST[1], count: data.ladingOder || 0},
['tabList[2]']: TABLIST[2] + '(' + (data.failed || 0) + ')', ['tabList[2]']: {text: TABLIST[2], count: data.failed || 0},
['tabList[3]']: TABLIST[3] + '(' + (data.success || 0) + ')' ['tabList[3]']: {text: TABLIST[3], count: data.success || 0}
}) })
} else { } else {
wx.$util.showToast(res.message || '接口异常') wx.$util.showToast(res.message || '接口异常')
...@@ -165,7 +165,7 @@ Component({ ...@@ -165,7 +165,7 @@ Component({
pageNum, pageNum,
customerName, customerName,
// item.confName == // item.confName ==
orderStatus: constantData.equityStatusList.find(item => tabList[tabIndex].includes(item.confName))?.confId || '', orderStatus: constantData.equityStatusList.find(item => tabList[tabIndex].text == item.confName)?.confId || '',
merchantId: storeInfo?.merchantId merchantId: storeInfo?.merchantId
} }
carLifeApi.equityPage(params).then(res => { carLifeApi.equityPage(params).then(res => {
......
...@@ -58,7 +58,8 @@ page{ ...@@ -58,7 +58,8 @@ page{
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: 28rpx; font-size: 32rpx;
font-weight: 500;
z-index: 99; z-index: 99;
flex-direction: column; flex-direction: column;
} }
......
// pages/accountItems/accountItems.js // pages/accountItems/accountItems.js
import api from '~/api/api' import api from '~/api/api'
const app = getApp() const app = getApp()
import { getYQorderInfo, get4SStoreList } from '~/store/index' import { getYQorderInfo, get4SStoreList, getServiceFilmRollSetting } from '~/store/index'
import { getShopSceneConfig } from '~/store/index' import { getShopSceneConfig } from '~/store/index'
Page({ Page({
/** /**
...@@ -339,12 +339,14 @@ Page({ ...@@ -339,12 +339,14 @@ Page({
// app.globalData.YQorderSetting = null // app.globalData.YQorderSetting = null
app.globalData.yqdInfo.merchantRange = null app.globalData.yqdInfo.merchantRange = null
app.globalData.YQorderSetting = null app.globalData.YQorderSetting = null
app.globalData.serviceFilmRollSetting = null
wx.$util.hideLoading() wx.$util.hideLoading()
wx.$util.setUserInfo(data.loginUserInfoList[0]) wx.$util.setUserInfo(data.loginUserInfoList[0])
app.gobalCheckYqdSuper(data.loginUserInfoList[0]) app.gobalCheckYqdSuper(data.loginUserInfoList[0])
// 获取园区店下单字段配置信息
getYQorderInfo() getYQorderInfo()
// 获取服务商是否使用膜卷号配置
getServiceFilmRollSetting()
// 超管跳过选择4s店 // 超管跳过选择4s店
if (data.loginUserInfoList[0] && data.loginUserInfoList[0].isSuper) { if (data.loginUserInfoList[0] && data.loginUserInfoList[0].isSuper) {
this.get4SStoreList(data.loginUserInfoList[0]) this.get4SStoreList(data.loginUserInfoList[0])
......
...@@ -385,7 +385,7 @@ Page({ ...@@ -385,7 +385,7 @@ Page({
}) })
}, },
search() { search() {
wx.$refresh = true wx.$dateListRefresh = false
let { let {
searchObj, searchObj,
userInfo userInfo
...@@ -532,8 +532,14 @@ Page({ ...@@ -532,8 +532,14 @@ Page({
}, },
searchObj searchObj
}) })
if (wx.$refresh) { if (wx.$dateListRefresh) {
this.search() // 清空筛选条件 搜索条件
this.setData({
searchObj: {},
keyword: ''
}, () => {
this.search()
})
} }
console.log(options, 'options'); console.log(options, 'options');
}, },
......
...@@ -64,7 +64,7 @@ page { ...@@ -64,7 +64,7 @@ page {
} }
.search-box .search .text-center { .search-box .search .text-center {
font-size: 24rpx; font-size: 28rpx;
/* background-color: #f7f7f7; */ /* background-color: #f7f7f7; */
border-radius: 12rpx; border-radius: 12rpx;
width: 100%; width: 100%;
...@@ -141,13 +141,17 @@ page { ...@@ -141,13 +141,17 @@ page {
.list .item .status { .list .item .status {
position: absolute; position: absolute;
font-size: 28rpx; font-size: 24rpx;
top: 32rpx; top: 32rpx;
font-weight: 500;
right: 32rpx; right: 32rpx;
height: 44rpx; height: 44rpx;
background: #F0F0F0; background: #F0F0F0;
border-radius: 4rpx; border-radius: 4rpx;
padding: 4rpx 8rpx; padding: 0rpx 8rpx;
display: flex;
justify-content: center;
align-items: center;
} }
.list .item .status .arc { .list .item .status .arc {
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
<view class="change_btn" bindtap="changeScene">切换场景</view> <view class="change_btn" bindtap="changeScene">切换场景</view>
</view> </view>
</view> --> </view> -->
<scroll-view scroll-y>
<view class="set_box"> <view class="set_box">
<view class="set_item item_1" bindtap="showWork"> <view class="set_item item_1" bindtap="showWork">
<view class="title">工位设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view> <view class="title">工位设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
...@@ -86,7 +85,6 @@ ...@@ -86,7 +85,6 @@
<image class="icon_image" src="{{IMG_URL}}mine_icon_7.png" mode=""/> <image class="icon_image" src="{{IMG_URL}}mine_icon_7.png" mode=""/>
</view> </view>
</view> </view>
</scroll-view>
<!-- <view class="version_box" bindtap="goVersionPage"> <!-- <view class="version_box" bindtap="goVersionPage">
<view class="item"> <view class="item">
......
/* tabComponents/pages/index/index.wxss */ /* tabComponents/pages/index/index.wxss */
.main { .main {
padding-bottom: 80rpx; padding-bottom: 80rpx;
background: #FFFFFF;
} }
.bg { .bg {
......
...@@ -56,9 +56,7 @@ Page({ ...@@ -56,9 +56,7 @@ Page({
// return animation; // return animation;
// }, // },
onPageScroll: function (e) { onPageScroll: function (e) {
console.log(e);
const {scrollTop} = e.detail const {scrollTop} = e.detail
console.log(scrollTop,'scrollTop');
// const animation = this.createAnimation(); // 创建动画实例 // const animation = this.createAnimation(); // 创建动画实例
// 滚动时隐藏第一个图标,显示第二个图标 // 滚动时隐藏第一个图标,显示第二个图标
this.setData({ this.setData({
...@@ -154,7 +152,6 @@ this.setData({ ...@@ -154,7 +152,6 @@ this.setData({
} else if (item.constructionFlag == 'Y' && item.status != 10) { } else if (item.constructionFlag == 'Y' && item.status != 10) {
wx.$router.go('tabWorkOrder.constructionOrderDetail', item) wx.$router.go('tabWorkOrder.constructionOrderDetail', item)
} else { } else {
// console.log(item)
wx.$router.go('tabWorkOrder.' + name, item) wx.$router.go('tabWorkOrder.' + name, item)
} }
}, },
...@@ -357,7 +354,7 @@ this.setData({ ...@@ -357,7 +354,7 @@ this.setData({
init(userInfo) {}, init(userInfo) {},
search() { search() {
wx.$refresh = true wx.$orderListRefresh = false
let { searchObj, userInfo } = this.data let { searchObj, userInfo } = this.data
let merchantId let merchantId
// 判断是不是超管,不是只能筛选当前4s店的 // 判断是不是超管,不是只能筛选当前4s店的
...@@ -550,7 +547,15 @@ this.setData({ ...@@ -550,7 +547,15 @@ this.setData({
}, },
searchObj searchObj
}) })
if (wx.$refresh) this.search() if (wx.$orderListRefresh) {
// 清空筛选条件 搜索条件
this.setData({
searchObj: {},
keyword: ''
}, () => {
this.search()
})
}
// if (wx.$refresh ) { // if (wx.$refresh ) {
// this.search() // this.search()
// // this.getStatByPeriod() // // this.getStatByPeriod()
......
...@@ -63,7 +63,7 @@ page { ...@@ -63,7 +63,7 @@ page {
} }
.search-box .search .text-center { .search-box .search .text-center {
font-size: 24rpx; font-size: 28rpx;
/* background-color: #f7f7f7; */ /* background-color: #f7f7f7; */
border-radius: 12rpx; border-radius: 12rpx;
width: 100%; width: 100%;
...@@ -148,12 +148,13 @@ page { ...@@ -148,12 +148,13 @@ page {
.list .item .status { .list .item .status {
position: absolute; position: absolute;
font-size: 24rpx; font-size: 24rpx;
font-weight: 500;
top: 32rpx; top: 32rpx;
right: 32rpx; right: 32rpx;
height: 44rpx; height: 44rpx;
background: #F0F0F0; background: #F0F0F0;
border-radius: 4rpx; border-radius: 4rpx;
padding: 4rpx 8rpx; padding: 0rpx 8rpx;
} }
.list .item .status .arc { .list .item .status .arc {
......
import api from '~/api/api.js' import api from '~/api/api.js'
import { envIndex } from '~/config'
// const app = getApp() // const app = getApp()
// console.log(app, 'app') // console.log(app, 'app')
// console.log(wx)globalData // console.log(wx)globalData
...@@ -134,25 +135,27 @@ export const getYQorderInfo = () => { ...@@ -134,25 +135,27 @@ export const getYQorderInfo = () => {
} }
export const setConfigInfo = globalData => { export const setConfigInfo = globalData => {
// const app = getApp() const app = getApp()
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// 如果有 直接返回 // 如果有 直接返回
// console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting') // console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting')
// console.log('app.globalData.YQorderSetting', app.globalData.YQorderSetting) // console.log('app.globalData.YQorderSetting', app.globalData.YQorderSetting)
let { configInfo } = globalData let { configInfo } = globalData
const target = ['develop', 'develop', 'test', 'production', 'beta']
if (configInfo) { if (configInfo) {
return resolve(configInfo) return resolve(configInfo)
} else { } else {
wx.request({ wx.request({
// url: `${domain}${path}?method=${method}`, // url: `${domain}${path}?method=${method}`,
url: `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config`, url: `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-boutique-work-wechat-miniapp&env=${target[envIndex]}`,
// data, // data,
method: 'GET', method: 'GET',
// header, // header,
dataType: 'json', dataType: 'json',
responseType: 'text', responseType: 'text',
success(response) { success(response) {
console.log(response, 'response') app.globalData.configInfo = response.data
resolve(response.data)
}, },
fail(error) { fail(error) {
console.log(error, 'error') console.log(error, 'error')
...@@ -344,4 +347,34 @@ export const getYQList = () => { ...@@ -344,4 +347,34 @@ export const getYQList = () => {
}) })
} }
}) })
}
\ No newline at end of file \ No newline at end of file
}
/** 获取服务商是否使用膜卷号 */
export const getServiceFilmRollSetting = () => {
const app = getApp()
return new Promise((resolve, reject) => {
// 如果有 直接返回
if (app.globalData.serviceFilmRollSetting) {
return resolve(app.globalData.serviceFilmRollSetting)
} else {
let userInfo = wx.$util.getUserInfo()
let { merchantId } = userInfo
wx.$util.showLoading()
api
.getServiceFilmRollSetting({
merchantId
})
.then(res => {
wx.$util.hideLoading()
let { code, data } = res
if (code == 0) {
app.globalData.serviceFilmRollSetting = data
resolve(app.globalData.serviceFilmRollSetting)
}
})
.catch(error => {
console.log(error)
})
}
})
}
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<view class='select_text'>{{selectData[selectIndex]}}</view> <view class='select_text'>{{selectData[selectIndex]}}</view>
<image class='select_img {{showSelect&&"select_img_rotate"}}' src='/images/arrow-right.png'></image> <image class='select_img {{showSelect&&"select_img_rotate"}}' src='/images/arrow-right.png'></image>
</view> </view>
<view class='option_box' wx:if="{{showSelect}}" style="padding: {{ showSelect ? '20rpx 34rpx' : ''}}"> <view class='option_box' wx:if="{{showSelect}}">
<view class='option' wx:for='{{selectData}}' wx:key='this' data-index='{{index}}' catchtap='optionTap'>{{item}}</view> <view class='option {{selectIndex == index ? "active" : ""}}' wx:for='{{selectData}}' wx:key='this' data-index='{{index}}' catchtap='optionTap'>{{item}}</view>
</view> </view>
<view class="mask_class" wx:if="{{showSelect}}" bindtap="closeSelect"></view> <view class="mask_class" wx:if="{{showSelect}}" bindtap="closeSelect"></view>
</view> </view>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</block> </block>
</block> </block>
<view class="order" wx:if="{{item.tailPayedDateStr}}"> <view class="order" wx:if="{{item.tailPayedDateStr}}">
<view class="order-label">尾款支付时间 </view> <view class="order-label">尾款支付</view>
<view class="order-value"> <view class="order-value">
<block>{{item['tailPayedDateStr']}}</block> <block>{{item['tailPayedDateStr']}}</block>
</view> </view>
......
...@@ -65,20 +65,59 @@ transform: rotate(-90deg); ...@@ -65,20 +65,59 @@ transform: rotate(-90deg);
.search-box .select_box .option_box{ .search-box .select_box .option_box{
position: absolute; position: absolute;
z-index: 200; z-index: 200;
top: 80rpx; top: 100rpx;
width: 180rpx; left: 32rpx;
width: 194rpx;
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 6rpx 12rpx 0 #0000000d; box-shadow: 0 6rpx 12rpx 0 #0000000d;
border-radius: 20rpx; border-radius: 16rpx;
height: 190rpx; height: 264rpx;
}
.search-box .select_box .option_box::after{
height: 0;
width: 0;
content: '';
position: absolute;
border: 14rpx solid transparent;
border-right: 14rpx solid #FFFFFF;
top: -24rpx;
left: 88rpx;
z-index:-1;
transform: rotate(90deg);
}
.search-box .select_box .option_box::before{
height: 0;
width: 0;
content: '';
position: absolute;
border: 14rpx solid transparent;
border-right: 14rpx solid #FFFFFF;
top: -24rpx;
left: 88rpx;
z-index:-1;
transform: rotate(90deg);
} }
.search-box .select_box .option_box .option{ .search-box .select_box .option_box .option{
display: block; display: block;
height: 50rpx; height: 88rpx;
line-height: 50rpx; line-height: 88rpx;
text-align: center; text-align: center;
color: #333333; color: #333333;
overflow: hidden;
}
.search-box .select_box .option_box .option:first-child{
border-radius: 16rpx 16rpx 0 0;
}
.search-box .select_box .option_box .option:last-child{
border-radius: 0 0 16rpx 16rpx;
}
.search-box .select_box .option_box .option.active{
background: #347bff1a;
color: #347BFF;
} }
.search-box .search-input { .search-box .search-input {
...@@ -177,7 +216,7 @@ background-color: transparent; ...@@ -177,7 +216,7 @@ background-color: transparent;
} */ } */
.item .item-content { .item .item-content {
padding: 20rpx 32rpx 0; padding: 32rpx 32rpx 0;
} }
.list .item-header { .list .item-header {
...@@ -224,7 +263,7 @@ margin-left: 16rpx; ...@@ -224,7 +263,7 @@ margin-left: 16rpx;
} }
.list .header-status view{ .list .header-status view{
padding: 4rpx 8rpx; padding: 0rpx 8rpx;
} }
.header-price { .header-price {
...@@ -238,7 +277,7 @@ margin-left: 16rpx; ...@@ -238,7 +277,7 @@ margin-left: 16rpx;
} }
.red-txt { .red-txt {
color: #EB4E4E; color: #F24724;
background: #FDECE9; background: #FDECE9;
} }
......
...@@ -83,7 +83,8 @@ Page({ ...@@ -83,7 +83,8 @@ Page({
if (code == '0') { if (code == '0') {
wx.$util.showToast("预约成功") wx.$util.showToast("预约成功")
this.refresh() this.refresh()
wx.$refresh = true // 仅刷新预约管理列表
wx.$util.refreshPageData(true)
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
......
...@@ -260,7 +260,8 @@ Page({ ...@@ -260,7 +260,8 @@ Page({
inviteDateStr inviteDateStr
}) })
.then(res => { .then(res => {
wx.$refresh = true // 仅刷新预约管理列表
wx.$util.refreshPageData(true)
wx.hideLoading() wx.hideLoading()
console.log(res) console.log(res)
let { let {
...@@ -306,7 +307,8 @@ Page({ ...@@ -306,7 +307,8 @@ Page({
wx.hideLoading() wx.hideLoading()
_this.showToast('取消成功!') _this.showToast('取消成功!')
_this.getInviteDetail(id) _this.getInviteDetail(id)
wx.$refresh = true // 状态更新 需刷新预约管理列表
wx.$util.refreshPageData(true)
} else { } else {
_this.showToast(message) _this.showToast(message)
} }
......
...@@ -324,7 +324,8 @@ page { ...@@ -324,7 +324,8 @@ page {
height: 80rpx; height: 80rpx;
background: #347BFF; background: #347BFF;
border-radius: 12rpx; border-radius: 12rpx;
font-size: 28rpx; font-size: 32rpx;
font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
margin: 10rpx 32rpx; margin: 10rpx 32rpx;
} }
......
...@@ -122,7 +122,8 @@ if (code!= 0 ) return ...@@ -122,7 +122,8 @@ if (code!= 0 ) return
wx.hideLoading() wx.hideLoading()
if (code == '0') { if (code == '0') {
wx.$util.showToast('编辑成功') wx.$util.showToast('编辑成功')
wx.$refresh = true // 仅刷新预约管理列表
wx.$util.refreshPageData(true)
wx.$router.back() wx.$router.back()
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
......
...@@ -71,7 +71,8 @@ ...@@ -71,7 +71,8 @@
background: #ffffff; background: #ffffff;
display: flex; display: flex;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 32rpx;
font-weight: 500;
} }
.btn-default { .btn-default {
......
...@@ -198,7 +198,7 @@ Page({ ...@@ -198,7 +198,7 @@ Page({
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
console.log(item) console.log(item)
if ('activeIndex' in item) { if ('activeIndex' in item) {
wx.$refresh = true wx.$util.refreshPageData()
item.url && wx.$router.go(item.url,{activeIndex:item.activeIndex}) item.url && wx.$router.go(item.url,{activeIndex:item.activeIndex})
} else { } else {
item.url && wx.$router.go(item.url) item.url && wx.$router.go(item.url)
......
...@@ -147,5 +147,15 @@ module.exports = { ...@@ -147,5 +147,15 @@ module.exports = {
/** 根据订单更新技师信息 */ /** 根据订单更新技师信息 */
updateTechnicianInfo(data) { updateTechnicianInfo(data) {
return api.post('dj.api.smartcarlife.order.updateTechnicianInfo', data) return api.post('dj.api.smartcarlife.order.updateTechnicianInfo', data)
},
/** 根据订单商品获取膜卷号 */
getfilmRollNoByGoods(data) {
return api.post('dj.api.smarcarlife.stock.filmroll.list', data)
},
/** 子订单设置膜卷号 */
setfilmRollNo(data) {
return api.post('dj.api.smartcarlife.order.updateFilmRoll', data)
} }
} }
// tabWorkOrder/components/filmRollNoPopup/filmRollNoPopup.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(n) {
if (n) {
let { copyfilmRollNoList, filmSelectedItem } = this.data
this.setData({
filmRollNoList: wx.$util.deepClone(copyfilmRollNoList),
selectedNumber: filmSelectedItem,
searchValue: ''
})
}
}
},
title: String,
filmSelectedItem: String,
copyfilmRollNoList: Array
},
/**
* 组件的初始数据
*/
data: {
orderObj: {},
IMG_URL,
filmRollNoList: [],
searchValue: ''
},
/**
* 组件的方法列表
*/
methods: {
search(e) {
let { copyfilmRollNoList } = wx.$util.deepClone(this.data)
let { value } = e.detail
if (!value) {
this.setData({
filmRollNoList: copyfilmRollNoList
})
} else {
let arr = []
copyfilmRollNoList.map(i => {
if (i.indexOf(value) != -1) {
arr.push(i)
}
})
this.setData({
filmRollNoList: arr
})
}
},
changeItem(e) {
let { target } = e.currentTarget.dataset
let { filmRollNoList } = this.data
let { copyfilmRollNoList } = wx.$util.deepClone(this.data)
this.setData({
filmRollNoList,
copyfilmRollNoList,
selectedNumber: target
})
},
cancel() {
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
filmRollNoPopup: false
})
},
// 打开生意助手小程序
goMiniprogram() {
wx.navigateToMiniProgram({
appId: 'wx2c28337db96364d2'
})
},
async confirm() {
let { selectedNumber } = this.data
if (!selectedNumber) {
wx.$util.showToast('请选择膜卷号')
}
this.triggerEvent('confirm', selectedNumber)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/components/filmRollNoPopup/filmRollNoPopup.wxml-->
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="60%">
<view class="film-roll-number-select-popup-box" >
<view class="box">
<view class="sub-title text-center">{{title}}</view>
<view class="film-roll-number-box">
<search-input bindsearch="search" value="{{searchValue}}" />
<view class="box-title">
<view>膜卷号</view>
</view>
<scroll-view scroll-y style="height: calc(100% - 194rpx);" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{filmRollNoList}}" wx:key="index">
<view class="film-roll-numberList {{item == selectedNumber?'active':''}}" bindtap="changeItem" data-target="{{item}}" data-index="{{index}}">
<view class="checked_img">
<image wx:if="{{item == selectedNumber}}" src="{{IMG_URL}}checked.png"></image>
</view>
<view class="text_box"><view class="text-hide">{{item}}</view></view>
</view>
</block>
</scroll-view>
</view>
</view>
</view>
</popup>
/* tabWorkOrder/components/filmRollNoPopup/filmRollNoPopup.wxss */
.film-roll-number-select-popup-box{
height: 100%;
width: calc(100% + 64rpx);
transform: translateX(-32rpx);
}
.sub-title {
height: 100rpx;
font-size: 32rpx;
color: #333333;
position: sticky;
left: 0;
top: 0;
background-color: #fff;
z-index: 2;
border-bottom: 2rpx solid #F9F9F9;
}
.text-hide {
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.text-center{
display: flex;
align-items: center;
justify-content: center;
}
.box{
height: 100%;
padding: 0 32rpx;
}
.artificer-box{
height: calc(100% - 102rpx);
overflow: hidden;
transition: all .25s;
}
.box-title{
color: #333333;
font-size: 32rpx;
height: 88rpx;
line-height: 88rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.box-title .tips{
color: #333333;
font-size: 24rpx;
}
.box-title .tips text{
color: #347BFF;
}
.film-roll-numberList {
width: calc(100% - 50rpx);
height: 98rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: #999999;
padding: 0 25rpx;
transition: all .5s;
}
.checked_img{
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 20rpx;
}
.film-roll-numberList .text_box{
flex: 1;
border-bottom: 2rpx solid #F9F9F9;
height: 100%;
line-height: 98rpx;
}
.film-roll-numberList.active {
color: #347BFF;
font-weight: 700;
position: relative;
}
// tabWorkOrder/pages/createOrder/createOrder.js // tabWorkOrder/pages/createOrder/createOrder.js
// import deepClone from '~/utils/deepClone' // import deepClone from '~/utils/deepClone'
import api from '../../api' import api from '../../api'
import { getYQorderInfo, getPositionList } from '~/store/index' import { getYQorderInfo, getPositionList, setConfigInfo } from '~/store/index'
import NP from 'number-precision' import NP from 'number-precision'
const app = getApp() const app = getApp()
let toastList = { let toastList = {
...@@ -75,7 +75,8 @@ Page({ ...@@ -75,7 +75,8 @@ Page({
currentWordNumber: 0, // 备注字数 currentWordNumber: 0, // 备注字数
frontGearArr: [], frontGearArr: [],
sideRearGearArr: [], sideRearGearArr: [],
skylightArr: [] skylightArr: [],
baseConfigData: {}
}, },
showCustomPop() { showCustomPop() {
this.setData({ this.setData({
...@@ -121,7 +122,8 @@ Page({ ...@@ -121,7 +122,8 @@ Page({
goodsData, goodsData,
copyGoodsData, copyGoodsData,
filmOrder, filmOrder,
orderObj: { selectPayType } orderObj: { selectPayType },
baseConfigData
} = this.data } = this.data
let { showName, type } = e.currentTarget.dataset let { showName, type } = e.currentTarget.dataset
let arr = [] let arr = []
...@@ -137,38 +139,40 @@ Page({ ...@@ -137,38 +139,40 @@ Page({
// type 产品类型 1前档 2侧后档 3天窗 4其它精品 根据类型过滤显示商品弹窗数据 // type 产品类型 1前档 2侧后档 3天窗 4其它精品 根据类型过滤显示商品弹窗数据
copyGoodsData?.forEach((val, index) => { copyGoodsData?.forEach((val, index) => {
if (type == 4) { if (type == 4) {
if (val.goodsType !== 1) { if (val.goodsType !== 1 && val.goodsType != baseConfigData?.selfBuildFilmType) {
arr.push(val) arr.push(val)
} }
} else { } else {
if (val.goodsType == 1 && type != 4) { if ((val.goodsType == 1 || val.goodsType == baseConfigData?.selfBuildFilmType) && type != 4) { // 太阳膜 自建商品-太阳膜商品
arr.push({ arr.push({
goodsType: val.goodsType, goodsType: val.goodsType,
goodsTypeName: val.goodsTypeName, goodsTypeName: val.goodsTypeName,
upgradeGoodsList: [] upgradeGoodsList: []
}) })
let arr2 = [] for (var i = 0; i < arr?.length; i++) {
val?.upgradeGoodsList?.forEach((subVal, subInd) => { let arr2 = []
if (type == 1 && [1].includes(subVal.merchantGoodsPosition)) { val?.upgradeGoodsList?.forEach((subVal, subInd) => {
arr2.push(subVal) if (type == 1 && [1].includes(subVal.merchantGoodsPosition)) {
arr[0].upgradeGoodsList = arr2 arr2.push(subVal)
} arr[i].upgradeGoodsList = arr2
if (type == 2 && [2, 3, 4].includes(subVal.merchantGoodsPosition)) { }
arr2.push(subVal) if (type == 2 && [2, 3, 4].includes(subVal.merchantGoodsPosition)) {
arr[0].upgradeGoodsList = arr2 arr2.push(subVal)
} arr[i].upgradeGoodsList = arr2
if (type == 3 && [5, 6, 7].includes(subVal.merchantGoodsPosition)) { }
arr2.push(subVal) if (type == 3 && [5, 6, 7].includes(subVal.merchantGoodsPosition)) {
arr[0].upgradeGoodsList = arr2 arr2.push(subVal)
} arr[i].upgradeGoodsList = arr2
}) }
})
}
} }
} }
}) })
if (arr[0]?.upgradeGoodsList?.length < 1 || arr?.length < 1) { // if (arr[0]?.upgradeGoodsList?.length < 1 || arr?.length < 1) {
let errorText = ['', '前档', '侧后档', '天窗', '其它精品'] // let errorText = ['', '前档', '侧后档', '天窗', '其它精品']
return this.showToast(selectPayType == 0 ? '门店无战败商品': `门店无配置${errorText[type]}商品`) // return this.showToast(selectPayType == 0 ? '门店无战败商品': `门店无配置${errorText[type]}商品`)
} // }
this.setData({ this.setData({
goodsData: arr goodsData: arr
}) })
...@@ -500,7 +504,7 @@ Page({ ...@@ -500,7 +504,7 @@ Page({
} }
}) })
} else { } else {
wx.$refresh = true wx.$util.refreshPageData()
// wx.$router.redirectTo('confirmOrder', data) // wx.$router.redirectTo('confirmOrder', data)
wx.$router.redirectTo('orderDetail', data) wx.$router.redirectTo('orderDetail', data)
wx.$storage.rm('outTradeNo') // 去除流水号 wx.$storage.rm('outTradeNo') // 去除流水号
...@@ -888,8 +892,11 @@ Page({ ...@@ -888,8 +892,11 @@ Page({
}) })
}) })
}, },
onRoute(options) { async onRoute(options) {
this.getGoodsPosition() this.getGoodsPosition()
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
this.setData({baseConfigData})
let { outTradeNo, totalFee, accountDate, supplementId, filmOrder } = options let { outTradeNo, totalFee, accountDate, supplementId, filmOrder } = options
// filmOrder补录类型 0太阳膜 1精品升级 // filmOrder补录类型 0太阳膜 1精品升级
console.log(options) console.log(options)
......
...@@ -545,7 +545,8 @@ ...@@ -545,7 +545,8 @@
bindconfirm="chooseGoods" bindconfirm="chooseGoods"
goodsData="{{goodsData}}" goodsData="{{goodsData}}"
chooseGoodsList="{{goodsList}}" chooseGoodsList="{{goodsList}}"
isSolarFilm="{{filmOrder !== 1}}"/> isSolarFilm="{{filmOrder !== 1}}"
baseConfigData="{{baseConfigData}}" />
<modal <modal
id="modal" id="modal"
class="modal" class="modal"
......
...@@ -321,7 +321,8 @@ page { ...@@ -321,7 +321,8 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: 28rpx; font-size: 32rpx;
font-weight: 500;
z-index: 99; z-index: 99;
flex-direction: column; flex-direction: column;
} }
......
...@@ -64,50 +64,9 @@ Page({ ...@@ -64,50 +64,9 @@ Page({
console.log(err) console.log(err)
}) })
}, },
updateCustomerInfo() {
let {
orderInfo
} = this.data
console.log(orderInfo)
if (!orderInfo?.customer?.orderCode) {
delete orderInfo?.customer?.orderCode
}
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianUuid', 'technicianId', 'technicianName']
let userInfo = {}
orderInfo = Object.assign(orderInfo, orderInfo.customer)
paramsList.map(item => {
userInfo[item] = orderInfo[item] || ''
})
api
.updateOrderInfo(userInfo)
.then(result => {
wx.$util.hideLoading()
if (result.code == 0 && result.data) {
this.checkPayType()
} else {
wx.showToast({
title: result.message,
icon: 'error'
})
}
})
.catch(err => {
// wx.$util.hideLoading()
console.log(err)
})
},
next() { next() {
let {
orderInfo
} = this.data
let _this = this let _this = this
// console.log(orderCode) _this.checkPayType()
// 有技师选项 并选择了技师 更新客户信息
if (orderInfo.isOpenArtificer && orderInfo.technicianId) {
_this.updateCustomerInfo()
} else {
_this.checkPayType()
}
}, },
checkPayType() { checkPayType() {
let { let {
...@@ -176,7 +135,8 @@ Page({ ...@@ -176,7 +135,8 @@ Page({
obj.outTradeNo = outTradeNo obj.outTradeNo = outTradeNo
} }
wx.$util.showLoading() wx.$util.showLoading()
wx.$refresh = true // 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData()
api.createPayOrder(obj).then(res => { api.createPayOrder(obj).then(res => {
console.log(res) console.log(res)
let { let {
...@@ -220,7 +180,8 @@ Page({ ...@@ -220,7 +180,8 @@ Page({
}) })
.then(res => { .then(res => {
console.log(res) console.log(res)
wx.$refresh = true // 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData()
let { let {
code, code,
message message
...@@ -266,7 +227,6 @@ Page({ ...@@ -266,7 +227,6 @@ Page({
} }
}, },
onRoute(options) { onRoute(options) {
// options.orderCode = '231019160629638'
if (options.orderCode) { if (options.orderCode) {
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
this.getDetail(options.orderCode) this.getDetail(options.orderCode)
...@@ -281,7 +241,6 @@ Page({ ...@@ -281,7 +241,6 @@ Page({
orderCode orderCode
}) })
.then(res => { .then(res => {
console.log(res)
let { let {
code, code,
message, message,
...@@ -299,7 +258,8 @@ Page({ ...@@ -299,7 +258,8 @@ Page({
let couponName = data.customerCoupon ? data.customerCoupon.couponName : '' let couponName = data.customerCoupon ? data.customerCoupon.couponName : ''
let total_price = 0 let total_price = 0
let warrantyCardList = [] let warrantyCardList = []
data.subOrderList.map(e => { for (var i = 0; i < data?.subOrderList?.length; i++) {
let e = data?.subOrderList[i]
total_price += e.totalPrice total_price += e.totalPrice
e.price = Number(wx.$util.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2) e.price = Number(wx.$util.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2)
e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || '' e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || ''
...@@ -309,7 +269,7 @@ Page({ ...@@ -309,7 +269,7 @@ Page({
goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName
}) })
} }
}) }
data = { data = {
...data.customer, ...data.customer,
...data.payOrder, ...data.payOrder,
......
...@@ -166,7 +166,6 @@ Page({ ...@@ -166,7 +166,6 @@ Page({
}, },
onRoute(options) { onRoute(options) {
console.log(options) console.log(options)
// options.orderCode = '231008175435623'
if (options.orderCode) { if (options.orderCode) {
this.setData({ this.setData({
orderCode: options.orderCode orderCode: options.orderCode
...@@ -220,7 +219,8 @@ Page({ ...@@ -220,7 +219,8 @@ Page({
let total_price = 0 let total_price = 0
let warrantyCardList = [] let warrantyCardList = []
data.subOrderList = data.subOrderList.filter(item => item.merchantGoodsId) data.subOrderList = data.subOrderList.filter(item => item.merchantGoodsId)
data.subOrderList.map(e => { for (var i = 0; i < data?.subOrderList?.length; i++) {
let e = data?.subOrderList[i]
total_price += e.totalPrice total_price += e.totalPrice
e.price = Number(wx.$util.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2) e.price = Number(wx.$util.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2)
e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || '' e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || ''
...@@ -231,7 +231,7 @@ Page({ ...@@ -231,7 +231,7 @@ Page({
cardCode: e.cardCode cardCode: e.cardCode
}) })
} }
}) }
data = { data = {
...data.customer, ...data.customer,
...data.payOrder, ...data.payOrder,
......
{ {
"navigationBarTitleText": "完成施工", "navigationBarTitleText": "完成施工",
"usingComponents": { "usingComponents": {
"orderRatingPopup": "../../components/orderRatingPopup/orderRatingPopup", "orderRatingPopup": "/tabWorkOrder/components/orderRatingPopup/orderRatingPopup"
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup"
} }
} }
...@@ -49,11 +49,14 @@ ...@@ -49,11 +49,14 @@
</view> </view>
<view class="subItem_box"> <view class="subItem_box">
<view style="{{!orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;'}}"> <view style="{{!orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;'}}">
<view class="position">{{item.positionStr || item.upgradeGoodsTypeName}}</view> <view class="position">{{item.positionStr || item.upgradeGoodsTypeName}}<text class="type">x{{item.number}}</text></view>
<view class="type">x{{item.number}}</view>
</view> </view>
<!-- 太阳膜类且配置技师 --> <!-- 膜卷号 -->
<view wx:if="{{orderInfo.isOpenArtificer && item.upgradeGoodsPosition}}" class="artificer" bindtap="selectArtificer" data-item="{{item}}"> <view wx:if="{{item.filmRollNo}}" class="film-roll disabled" data-item="{{item}}">
<text class="'text-hide'">{{item.filmRollNo}}</text><image src="/components/images/arrow-x.png" mode=""/>
</view>
<!-- 技师 -->
<view wx:if="{{orderInfo.isOpenArtificer && item.upgradeGoodsPosition}}" class="artificer disabled" data-item="{{item}}">
<text class="{{!item.technicianName ? 'grey_text' : ''}} 'text-hide'">{{item.technicianName || '选择技师'}}</text><image src="/components/images/arrow-x.png" mode=""/> <text class="{{!item.technicianName ? 'grey_text' : ''}} 'text-hide'">{{item.technicianName || '选择技师'}}</text><image src="/components/images/arrow-x.png" mode=""/>
</view> </view>
</view> </view>
...@@ -111,7 +114,7 @@ ...@@ -111,7 +114,7 @@
</block> </block>
<block wx:if="{{orderInfo.selectPayType == 2}}"> <block wx:if="{{orderInfo.selectPayType == 2}}">
<view class="cell"> <view class="cell">
<view class="label">付款凭证:</view> <view class="label">付款凭证</view>
<view class="image-box"> <view class="image-box">
<view class="value" bindtap="previewImage" wx:for="{{orderInfo.payVoucherList}}" wx:key="index" data-index="{{index}}" data-url="{{orderInfo.payVoucherList}}"> <view class="value" bindtap="previewImage" wx:for="{{orderInfo.payVoucherList}}" wx:key="index" data-index="{{index}}" data-url="{{orderInfo.payVoucherList}}">
<view class="image"> <view class="image">
...@@ -273,14 +276,6 @@ ...@@ -273,14 +276,6 @@
</view> </view>
</view> </view>
</modal> </modal>
<artificer-select-popup
show="{{artificerSelectPopup}}"
title="选择技师"
copyArtificerList="{{artificerList}}"
orderInfo="{{orderInfo}}"
artificerSelectObj="{{artificerSelectObj}}"
bindconfirm="changeArtificer" />
<orderRatingPopup <orderRatingPopup
bind:close="RatingPopupSetting" bind:close="RatingPopupSetting"
title="客户签字" title="客户签字"
......
...@@ -199,7 +199,7 @@ page { ...@@ -199,7 +199,7 @@ page {
width: 100%; width: 100%;
} }
.box .goods .item .subItem_box .artificer{ .box .goods .item .subItem_box .artificer,.film-roll{
height: 48rpx; height: 48rpx;
background: #FFFFFF; background: #FFFFFF;
border: 1rpx solid #DEE0E3; border: 1rpx solid #DEE0E3;
...@@ -212,15 +212,23 @@ page { ...@@ -212,15 +212,23 @@ page {
font-size: 24rpx; font-size: 24rpx;
} }
.box .goods .item .subItem_box .artificer.disabled,.film-roll.disabled{
color: #BEC1C7;
}
.artificer text{ .artificer text{
max-width: 170rpx; max-width: 96rpx;
} }
.artificer .grey_text{ .film-roll text{
max-width: 120rpx;
}
.artificer .grey_text,.film-roll .grey_text{
color: #BEC1C7; color: #BEC1C7;
} }
.artificer image{ .artificer image,.film-roll image{
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
margin-left: 8rpx; margin-left: 8rpx;
...@@ -605,6 +613,8 @@ margin-right: auto; ...@@ -605,6 +613,8 @@ margin-right: auto;
margin-left: 16rpx; margin-left: 16rpx;
margin-top: 3rpx; margin-top: 3rpx;
font-weight: normal; font-weight: normal;
display: flex;
align-items: center;
} }
......
...@@ -343,7 +343,8 @@ Page({ ...@@ -343,7 +343,8 @@ Page({
// console.log(orderObj, res) // console.log(orderObj, res)
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
wx.$refresh = true // 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData()
this.showToast({ this.showToast({
icon: 'success', icon: 'success',
title: '提交成功' title: '提交成功'
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
import api from '../../api' import api from '../../api'
import { import {
getYQorderInfo, getYQorderInfo,
getPositionList getPositionList,
setConfigInfo
} from '~/store/index' } from '~/store/index'
const app = getApp() const app = getApp()
let toastList = { let toastList = {
...@@ -82,7 +83,8 @@ Page({ ...@@ -82,7 +83,8 @@ Page({
isShowSubShopMerchant: false, isShowSubShopMerchant: false,
frontGearArr: [], // 前档 frontGearArr: [], // 前档
sideRearGearArr: [], // 侧后档 sideRearGearArr: [], // 侧后档
skylightArr: [] // 天窗 skylightArr: [], // 天窗
baseConfigData: {}
}, },
remarkInput(e) { remarkInput(e) {
...@@ -130,7 +132,8 @@ Page({ ...@@ -130,7 +132,8 @@ Page({
copyGoodsData, copyGoodsData,
orderObj: { orderObj: {
selectPayType selectPayType
} },
baseConfigData
} = this.data } = this.data
let { let {
showName, showName,
...@@ -141,37 +144,39 @@ Page({ ...@@ -141,37 +144,39 @@ Page({
// type 产品类型 1前档 2侧后档 3天窗 4其它精品 根据类型过滤显示商品弹窗数据 // type 产品类型 1前档 2侧后档 3天窗 4其它精品 根据类型过滤显示商品弹窗数据
copyGoodsData?.forEach((val, index) => { copyGoodsData?.forEach((val, index) => {
if (type == 4) { if (type == 4) {
if (val.goodsType !== 1) { if (val.goodsType !== 1 && val.goodsType !== baseConfigData?.selfBuildFilmType) { // 非太阳膜 非自建商品-太阳膜
arr.push(val) arr.push(val)
} }
} else { } else {
if (val.goodsType == 1 && type != 4) { if ((val.goodsType == 1 || val.goodsType == baseConfigData?.selfBuildFilmType) && type != 4) {
arr.push({ arr.push({
goodsType: val.goodsType, goodsType: val.goodsType,
goodsTypeName: val.goodsTypeName, goodsTypeName: val.goodsTypeName,
upgradeGoodsList: [] upgradeGoodsList: []
}) })
let arr2 = [] for (var i = 0; i < arr?.length; i++) {
val?.upgradeGoodsList?.forEach((subVal, subInd) => { let arr2 = []
if (type == 1 && [1].includes(subVal.merchantGoodsPosition)) { val?.upgradeGoodsList?.forEach((subVal, subInd) => {
arr2.push(subVal) if (type == 1 && [1].includes(subVal.merchantGoodsPosition)) {
arr[0].upgradeGoodsList = arr2 arr2.push(subVal)
} if (subVal?.goodsInfo?.goodsType == arr[i]?.goodsType || subVal?.upgradeGoodsType == arr[i]?.goodsType) arr[i].upgradeGoodsList = arr2
if (type == 2 && [2, 3, 4].includes(subVal.merchantGoodsPosition)) { }
arr2.push(subVal) if (type == 2 && [2, 3, 4].includes(subVal.merchantGoodsPosition)) {
arr[0].upgradeGoodsList = arr2 arr2.push(subVal)
} if (subVal?.goodsInfo?.goodsType == arr[i]?.goodsType || subVal?.upgradeGoodsType == arr[i]?.goodsType) arr[i].upgradeGoodsList = arr2
if (type == 3 && [5, 6, 7].includes(subVal.merchantGoodsPosition)) { }
arr2.push(subVal) if (type == 3 && [5, 6, 7].includes(subVal.merchantGoodsPosition)) {
arr[0].upgradeGoodsList = arr2 arr2.push(subVal)
} if (subVal?.goodsInfo?.goodsType == arr[i]?.goodsType || subVal?.upgradeGoodsType == arr[i]?.goodsType) arr[i].upgradeGoodsList = arr2
}) }
})
if (!arr[i]?.upgradeGoodsList?.length) arr.splice(i, 1)
}
} }
} }
}) })
if (arr[0]?.upgradeGoodsList?.length < 1 || arr?.length < 1) { if (arr?.length < 1) {
let errorText = ['', '前档', '侧后档', '天窗', '其它精品'] return this.showToast(`门店无配置其它精品商品`)
return this.showToast(selectPayType == 0 ? '门店无战败商品': `门店无配置${errorText[type]}商品`)
} }
} }
this.setData({ this.setData({
...@@ -498,8 +503,8 @@ Page({ ...@@ -498,8 +503,8 @@ Page({
success(_res_) { success(_res_) {
if (_res_.confirm) { if (_res_.confirm) {
if (apiName == 'createPrerecordedOrder') { if (apiName == 'createPrerecordedOrder') {
// 预录建档跳转到预约列表 // 预录建档跳转到预约列表 状态更新 需刷新工单列表和预约管理列表
wx.$refresh = true wx.$util.refreshPageData()
wx.$router.go('pages.tabDateIndex') wx.$router.go('pages.tabDateIndex')
wx.$util.pointRecord(30) wx.$util.pointRecord(30)
} else { } else {
...@@ -511,7 +516,8 @@ Page({ ...@@ -511,7 +516,8 @@ Page({
} }
}) })
} else { } else {
wx.$refresh = true // 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData()
wx.$router.redirectTo('confirmOrder', data) wx.$router.redirectTo('confirmOrder', data)
} }
} else { } else {
...@@ -522,6 +528,7 @@ Page({ ...@@ -522,6 +528,7 @@ Page({
checkGoods(save, subOrderList, priceDisabled, goodsList, orderObj) { checkGoods(save, subOrderList, priceDisabled, goodsList, orderObj) {
if (save) return false if (save) return false
// if (orderObj.selectPayType != 0) { // if (orderObj.selectPayType != 0) {
let { baseConfigData } = this.data
let filmArr = [] let filmArr = []
if (goodsList) { if (goodsList) {
goodsList.map(e => { goodsList.map(e => {
...@@ -533,7 +540,8 @@ Page({ ...@@ -533,7 +540,8 @@ Page({
merchantGoodsId: e.id || e.merchantGoodsId merchantGoodsId: e.id || e.merchantGoodsId
} }
if (e.price < e.shopMinPrice && orderObj.selectPayType != 0) priceDisabled = false if (e.price < e.shopMinPrice && orderObj.selectPayType != 0) priceDisabled = false
if (e?.goodsInfo?.goodsType == 1 || e?.upgradeGoodsType == 1) filmArr.push(obj) // 太阳膜 自建商品-太阳膜
if (e?.goodsInfo?.goodsType == 1 || e?.upgradeGoodsType == 1 || e?.goodsInfo?.goodsType == baseConfigData?.selfBuildFilmType || e?.upgradeGoodsType == baseConfigData?.selfBuildFilmType) filmArr.push(obj)
subOrderList.push(obj) subOrderList.push(obj)
}) })
orderObj.subOrderList = subOrderList orderObj.subOrderList = subOrderList
...@@ -797,7 +805,7 @@ Page({ ...@@ -797,7 +805,7 @@ Page({
showCancel: false, showCancel: false,
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
wx.$refresh = true wx.$util.refreshPageData()
wx.$router.go('index') wx.$router.go('index')
} }
} }
...@@ -879,7 +887,6 @@ Page({ ...@@ -879,7 +887,6 @@ Page({
val.active = true val.active = true
if (val.merchantGoodsId) val.id = val.merchantGoodsId // 改造商品数据 id为null if (val.merchantGoodsId) val.id = val.merchantGoodsId // 改造商品数据 id为null
}) })
console.log(subOrderList, 'subOrderList')
if (selectPayType) { if (selectPayType) {
//战败特殊处理 //战败特殊处理
// console.log(data[0], 'upgradeGoodsList') // console.log(data[0], 'upgradeGoodsList')
...@@ -1032,6 +1039,9 @@ Page({ ...@@ -1032,6 +1039,9 @@ Page({
// console.log(res, 'onroute') // console.log(res, 'onroute')
// res.scene = 'scene=1384' // res.scene = 'scene=1384'
// console.log() // console.log()
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
this.setData({baseConfigData})
if (res.orderCode && res.page) { if (res.orderCode && res.page) {
let result = await api.getOrderDetail({ let result = await api.getOrderDetail({
orderCode: res.orderCode orderCode: res.orderCode
......
...@@ -273,8 +273,8 @@ ...@@ -273,8 +273,8 @@
</view> </view>
<view class="bottom_box"> <view class="bottom_box">
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 --> <!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view class="position" wx:if="{{(item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1)}}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view> <view class="position" wx:if="{{(item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType)}}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view class="position red_text" wx:if="{{(item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition}}">无部位属性</view> <view class="position red_text" wx:if="{{(item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition}}">无部位属性</view>
<view class="position" wx:else></view> <view class="position" wx:else></view>
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
...@@ -317,9 +317,9 @@ ...@@ -317,9 +317,9 @@
</view> </view>
</view> </view>
<view class="bottom_box"> <view class="bottom_box">
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 --> <!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view class="position" wx:if="{{(item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1)}}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view> <view class="position" wx:if="{{(item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType)}}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view class="position red_text" wx:if="{{(item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition}}">无部位属性</view> <view class="position red_text" wx:if="{{(item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition}}">无部位属性</view>
<view class="position" wx:else></view> <view class="position" wx:else></view>
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
...@@ -363,8 +363,8 @@ ...@@ -363,8 +363,8 @@
</view> </view>
<view class="bottom_box"> <view class="bottom_box">
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 --> <!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view class="position" wx:if="{{(item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1)}}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view> <view class="position" wx:if="{{(item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType)}}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view class="position red_text" wx:if="{{(item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition}}">无部位属性</view> <view class="position red_text" wx:if="{{(item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition}}">无部位属性</view>
<view class="position" wx:else></view> <view class="position" wx:else></view>
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
...@@ -399,7 +399,7 @@ ...@@ -399,7 +399,7 @@
<view class="goods-box"> <view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index"> <block wx:for="{{ goodsList }}" wx:key="index">
<!-- 其它精品 --> <!-- 其它精品 -->
<view class="goods" wx:if="{{item.goodsInfo.goodsType !== 1 && item.upgradeGoodsType !== 1}}"> <view class="goods" wx:if="{{item.goodsInfo.goodsType !== 1 && item.upgradeGoodsType !== 1 && item.goodsInfo.goodsType !== baseConfigData.selfBuildFilmType && item.upgradeGoodsType !== baseConfigData.selfBuildFilmType}}">
<view class="name_box"> <view class="name_box">
<view class="name text-hide"> <view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}} {{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}
...@@ -546,7 +546,7 @@ ...@@ -546,7 +546,7 @@
selectPayType="{{orderObj.selectPayType}}" selectPayType="{{orderObj.selectPayType}}"
returnFun="{{ returnFun }}" returnFun="{{ returnFun }}"
/> />
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{true}}" /> <goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{true}}" baseConfigData="{{baseConfigData}}" />
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" /> <customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
<!-- <order-popup <!-- <order-popup
orderType="{{remarkBox}}" orderType="{{remarkBox}}"
......
...@@ -336,7 +336,8 @@ page { ...@@ -336,7 +336,8 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: 28rpx; font-size: 32rpx;
font-weight: 500;
z-index: 99; z-index: 99;
flex-direction: column; flex-direction: column;
} }
......
// tabWorkOrder/pages/defeatOrder/defeatOrder.js // tabWorkOrder/pages/defeatOrder/defeatOrder.js
import api from '../../api' import api from '../../api'
import api2 from '~/api/api.js' import api2 from '~/api/api.js'
import { getYQorderInfo, getPositionList } from '~/store/index' import { getYQorderInfo, getPositionList, setConfigInfo } from '~/store/index'
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/
const app = getApp()
let toastList = { let toastList = {
employeeName: '销售顾问不能为空', employeeName: '销售顾问不能为空',
subShopMerchantId: '二级流量方不能为空', subShopMerchantId: '二级流量方不能为空',
...@@ -60,7 +61,8 @@ Page({ ...@@ -60,7 +61,8 @@ Page({
frontGearArr: [], frontGearArr: [],
sideRearGearArr: [], sideRearGearArr: [],
skylightArr: [], skylightArr: [],
customerInfoBox: false customerInfoBox: false,
baseConfigData: {}
}, },
routerBack() { routerBack() {
wx.$router.back() wx.$router.back()
...@@ -303,45 +305,38 @@ Page({ ...@@ -303,45 +305,38 @@ Page({
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI) return (360 * Math.atan(_Y / _X)) / (2 * Math.PI)
}, },
showPopup(e) { showPopup(e) {
let { copyGoodsData } = this.data let { copyGoodsData, baseConfigData } = this.data
let { showName, index, type } = e.currentTarget.dataset let { showName, index, type } = e.currentTarget.dataset
let arr = [] let arr = []
if (showName == 'goodsBox') { if (showName == 'goodsBox') {
// type 产品类型 1前档 2侧后档 3天窗 4其它精品 根据类型过滤显示商品弹窗数据 // type 产品类型 1前档 2侧后档 3天窗 根据类型过滤显示商品弹窗数据
copyGoodsData?.forEach((val, index) => { copyGoodsData?.forEach((val, index) => {
if (type == 4) { if (val.goodsType == 1 || val.goodsType == baseConfigData?.selfBuildFilmType) {
if (val.goodsType == 19) { arr.push({
arr.push(val) goodsType: val.goodsType,
} goodsTypeName: val.goodsTypeName,
} else { upgradeGoodsList: []
if (val.goodsType == 1 && type != 4) { })
arr.push({ for (var i = 0; i < arr?.length; i++) {
goodsType: val.goodsType,
goodsTypeName: val.goodsTypeName,
upgradeGoodsList: []
})
let arr2 = [] let arr2 = []
val?.upgradeGoodsList?.forEach((subVal, subInd) => { val?.upgradeGoodsList?.forEach((subVal, subInd) => {
if (type == 1 && [1].includes(subVal.merchantGoodsPosition)) { if (type == 1 && [1].includes(subVal.merchantGoodsPosition)) {
arr2.push(subVal) arr2.push(subVal)
arr[index].upgradeGoodsList = arr2 if (subVal?.goodsInfo?.goodsType == arr[i]?.goodsType || subVal?.upgradeGoodsType == arr[i]?.goodsType) arr[i].upgradeGoodsList = arr2
} }
if (type == 2 && [2, 3, 4].includes(subVal.merchantGoodsPosition)) { if (type == 2 && [2, 3, 4].includes(subVal.merchantGoodsPosition)) {
arr2.push(subVal) arr2.push(subVal)
arr[index].upgradeGoodsList = arr2 if (subVal?.goodsInfo?.goodsType == arr[i]?.goodsType || subVal?.upgradeGoodsType == arr[i]?.goodsType) arr[i].upgradeGoodsList = arr2
} }
if (type == 3 && [5, 6, 7].includes(subVal.merchantGoodsPosition)) { if (type == 3 && [5, 6, 7].includes(subVal.merchantGoodsPosition)) {
arr2.push(subVal) arr2.push(subVal)
arr[index].upgradeGoodsList = arr2 if (subVal?.goodsInfo?.goodsType == arr[i]?.goodsType || subVal?.upgradeGoodsType == arr[i]?.goodsType) arr[i].upgradeGoodsList = arr2
} }
}) })
if (!arr[i]?.upgradeGoodsList?.length) arr.splice(i, 1)
} }
} }
}) })
if (arr[0]?.upgradeGoodsList?.length < 1) {
let errorText = ['', '前档', '侧后档', '天窗', '其它精品']
return this.showToast(`门店无配置${errorText[type]}商品`)
}
} }
this.setData({ this.setData({
[showName]: true, [showName]: true,
...@@ -369,7 +364,7 @@ Page({ ...@@ -369,7 +364,7 @@ Page({
// 获取商品 // 获取商品
async getOrderBaseGoodsList(merchantId) { async getOrderBaseGoodsList(merchantId) {
const positionTypeList = (await getPositionList()) || [] const positionTypeList = (await getPositionList()) || []
let { frontGearArr, sideRearGearArr, skylightArr } = this.data let { frontGearArr, sideRearGearArr, skylightArr, baseConfigData } = this.data
this.setData({ this.setData({
positionTypeList positionTypeList
}) })
...@@ -382,10 +377,10 @@ Page({ ...@@ -382,10 +377,10 @@ Page({
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
wx.hideLoading() wx.hideLoading()
// 筛选出太阳膜商品 goodsType 1太阳膜 // 筛选出太阳膜商品 goodsType 1太阳膜 自建商品-太阳膜
let arrData = [] let arrData = []
data?.forEach(val => { data?.forEach(val => {
if ([1].includes(val.goodsType)) arrData.push(val) if ([1, baseConfigData?.selfBuildFilmType].includes(val.goodsType)) arrData.push(val)
val?.upgradeGoodsList?.forEach(subVal => { val?.upgradeGoodsList?.forEach(subVal => {
subVal.merchantGoodsId = subVal.id subVal.merchantGoodsId = subVal.id
if ([1].includes(subVal.merchantGoodsPosition)) { if ([1].includes(subVal.merchantGoodsPosition)) {
...@@ -510,7 +505,8 @@ Page({ ...@@ -510,7 +505,8 @@ Page({
wx.hideLoading() wx.hideLoading()
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
wx.$refresh = true // 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData()
wx.$util.showToast({ wx.$util.showToast({
icon: 'success', icon: 'success',
title: '提交成功' title: '提交成功'
...@@ -545,7 +541,7 @@ Page({ ...@@ -545,7 +541,7 @@ Page({
item.shopMerchantId == orderObj.merchantId item.shopMerchantId == orderObj.merchantId
}) || phoneShow.pop() }) || phoneShow.pop()
notUpgradeOrderList.forEach(item => { notUpgradeOrderList.forEach(item => {
item.customerPhone = item.customerPhone || phoneConfig?.phoneNumber item.customer.customerPhone = item.customer.customerPhone || phoneConfig?.phoneNumber
}) })
this.setData({ this.setData({
notUpgradeOrderList notUpgradeOrderList
...@@ -686,7 +682,10 @@ Page({ ...@@ -686,7 +682,10 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function (res) {}, onShow: function (res) {},
onRoute(res) { async onRoute(res) {
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
this.setData({baseConfigData})
res && this.initOPtions(res) res && this.initOPtions(res)
this.getSetting() this.getSetting()
}, },
......
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
></input> ></input>
</gl-cell> </gl-cell>
<gl-cell <gl-cell
required="{{ filter.isIncludesItem(requiredList ,'carBrand') }}" required="{{ isCarBrand }}"
border border
valueAlign="right" valueAlign="right"
label="选择车型" label="选择车型"
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
</gl-cell> </gl-cell>
<gl-cell <gl-cell
wx:if="{{ orderObj.selectPayType !=0 }}" wx:if="{{ orderObj.selectPayType !=0 }}"
required="{{ filter.isIncludesItem(requiredList ,'standNo') }}" required="{{ isStandNo }}"
border border
iconSrc="{{ scanIcon }}" iconSrc="{{ scanIcon }}"
bindtitleClick="navOcr" bindtitleClick="navOcr"
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
</gl-cell> </gl-cell>
<gl-cell <gl-cell
wx:if="{{ orderObj.selectPayType !=0 }}" wx:if="{{ orderObj.selectPayType !=0 }}"
required="{{ filter.isIncludesItem(requiredList ,'plateNumber') }}" required="{{ isPlateNumber }}"
border border
valueAlign="right" valueAlign="right"
iconSrc="{{ scanIcon }}" iconSrc="{{ scanIcon }}"
...@@ -268,11 +268,11 @@ ...@@ -268,11 +268,11 @@
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 --> <!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view <view
class="position" class="position"
wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1) }}" wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) }}"
>{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view> >{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view <view
class="position red_text" class="position red_text"
wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}" wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}"
>无部位属性</view> >无部位属性</view>
<view class="position" wx:else></view> <view class="position" wx:else></view>
<view class="price_count"> <view class="price_count">
...@@ -328,11 +328,11 @@ ...@@ -328,11 +328,11 @@
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 --> <!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view <view
class="position" class="position"
wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1) }}" wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) }}"
>{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view> >{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view <view
class="position red_text" class="position red_text"
wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}" wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}"
>无部位属性</view> >无部位属性</view>
<view class="position" wx:else></view> <view class="position" wx:else></view>
<view class="price_count"> <view class="price_count">
...@@ -388,11 +388,11 @@ ...@@ -388,11 +388,11 @@
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 --> <!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view <view
class="position" class="position"
wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1) }}" wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) }}"
>{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view> >{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view <view
class="position red_text" class="position red_text"
wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}" wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}"
>无部位属性</view> >无部位属性</view>
<view class="position" wx:else></view> <view class="position" wx:else></view>
<view class="price_count"> <view class="price_count">
...@@ -510,7 +510,8 @@ ...@@ -510,7 +510,8 @@
bindconfirm="chooseGoods" bindconfirm="chooseGoods"
goodsData="{{ goodsData }}" goodsData="{{ goodsData }}"
chooseGoodsList="{{ notUpgradeOrderList[selectCustomIndex].subOrderList || [] }}" chooseGoodsList="{{ notUpgradeOrderList[selectCustomIndex].subOrderList || [] }}"
isSolarFilm="{{ true }}" isSolarFilm="{{ true }}"
baseConfigData="{{baseConfigData}}"
/> />
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" /> <customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
<sub-shop-merchant <sub-shop-merchant
......
// tabWorkOrder/pages/orderDetail/orderDetail.js // tabWorkOrder/pages/orderDetail/orderDetail.js
import api from '../../api.js' import api from '../../api.js'
import order_mixins from '../order_mixins.js' import order_mixins from '../order_mixins.js'
import { getPositionList } from '~/store/index' import { getPositionList, getServiceFilmRollSetting, setConfigInfo } from '~/store/index'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const app = getApp() const app = getApp()
Page({ Page({
...@@ -19,7 +19,18 @@ Page({ ...@@ -19,7 +19,18 @@ Page({
defaultCustomerService: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/kf.png', defaultCustomerService: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/kf.png',
failCustomerService: '../images/kfrefresh.png', failCustomerService: '../images/kfrefresh.png',
warrantyCardVisible: true, warrantyCardVisible: true,
signatureSwitch: false //不需要走签名逻辑 没有开启签名功能或则是战败订单 signatureSwitch: false, //不需要走签名逻辑 没有开启签名功能或则是战败订单
selectFilmNumberIndex: 0,
filmRollNoList: [],
isUseFilmRoll: false,
filmRollNoPopup: false,
filmSelectedItem: '',
tipsProps: {
tipsText: '技师施工完毕后,点击完成施工按钮结束工单。',
showTips: true,
type: 1
},
baseConfigData: {}
}, },
jumpUserPortrait (){ jumpUserPortrait (){
wx.$router.go('tabDate.userPortrait', this.data.orderInfo) wx.$router.go('tabDate.userPortrait', this.data.orderInfo)
...@@ -33,38 +44,71 @@ Page({ ...@@ -33,38 +44,71 @@ Page({
wx.$router.go('updateOrderInfo', orderInfo) wx.$router.go('updateOrderInfo', orderInfo)
}, },
confirmConstruction() { confirmConstruction() {
let { orderCode, orderInfo } = this.data let { orderCode, orderInfo, isUseFilmRoll } = this.data
let _this = this
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
// 使用膜卷号
if (isUseFilmRoll) {
let flag = false
for (var i = 0; i < orderInfo?.subOrderList?.length; i++) {
let val = orderInfo?.subOrderList[i]
if (val?.filmNumberData?.length) {
if (!val.filmRollNo) return wx.$util.showToast(`请配置膜卷号`)
flag = true
}
}
if (flag) {
let arr = []
orderInfo?.subOrderList?.forEach(val => {
if (val?.filmNumberData?.length && val.filmRollNo) arr.push({ subOrderCode: val.subOrderCode, filmRollNo: val.filmRollNo })
})
api.setfilmRollNo({subOrderList: arr}).then(res => {
let { code, message } = res
if (code == 0) {
this.confirmEvent(orderInfo, orderCode)
} else {
wx.$util.showToast(message)
}
}).catch(err => {
wx.$util.hideLoading()
})
} else {
this.confirmEvent(orderInfo, orderCode)
}
} else {
this.confirmEvent(orderInfo, orderCode)
}
},
confirmEvent(orderInfo, orderCode) {
let _this = this
api api
.confirmConstruction({ orderCode }) .confirmConstruction({ orderCode })
.then(result => { .then(result => {
wx.$util.hideLoading() wx.$util.hideLoading()
// console.log(result) // console.log(result)
let { code, solution } = result let { code, solution } = result
if (code == 0) { if (code == 0) {
wx.$refresh = true wx.$util.refreshPageData()
wx.$router.redirectTo('constructionOrderDetail', orderInfo) wx.$router.redirectTo('constructionOrderDetail', orderInfo)
} else { } else {
// console.log('false') // console.log('false')
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
content: solution, content: solution,
showCancel: false, showCancel: false,
confirmText: '刷新', confirmText: '刷新',
confirmColor: '#347BFF', confirmColor: '#347BFF',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
_this.getOrderDetail(orderCode) _this.getOrderDetail(orderCode)
}
} }
}) }
} })
}) }
.catch(err => { })
wx.$util.hideLoading() .catch(err => {
console.log(err) wx.$util.hideLoading()
}) console.log(err)
})
}, },
closeTips() { closeTips() {
this.setData({ this.setData({
...@@ -86,8 +130,14 @@ Page({ ...@@ -86,8 +130,14 @@ Page({
phoneNumber: data phoneNumber: data
}) })
}, },
onRoute(options) { async onRoute(options) {
if (options.orderCode) { if (options.orderCode) {
// 服务商是否使用膜卷号配置
let isUseFilmRoll = await getServiceFilmRollSetting()
this.setData({isUseFilmRoll})
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
this.setData({baseConfigData})
this.getOrderDetail(options.orderCode) this.getOrderDetail(options.orderCode)
this.setData({ this.setData({
orderCode: options.orderCode orderCode: options.orderCode
...@@ -97,9 +147,14 @@ Page({ ...@@ -97,9 +147,14 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: async function (options) {
// console.log(options.orderCode)
if (options.orderCode) { if (options.orderCode) {
// 服务商是否使用膜卷号配置
let isUseFilmRoll = await getServiceFilmRollSetting()
this.setData({isUseFilmRoll})
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
this.setData({baseConfigData})
this.getOrderDetail(options.orderCode) this.getOrderDetail(options.orderCode)
this.setData({ this.setData({
orderCode: options.orderCode orderCode: options.orderCode
...@@ -128,8 +183,9 @@ Page({ ...@@ -128,8 +183,9 @@ Page({
} }
}, },
async getOrderDetail(orderCode) { async getOrderDetail(orderCode) {
// console.log(orderCode) console.log(orderCode)
let _this = this let _this = this
let { signatureSwitch, baseConfigData, isUseFilmRoll } = _this.data
const positionTypeList = await getPositionList() || [] const positionTypeList = await getPositionList() || []
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
...@@ -137,14 +193,19 @@ Page({ ...@@ -137,14 +193,19 @@ Page({
.getOrderDetail({ .getOrderDetail({
orderCode orderCode
}) })
.then(res => { .then(async res => {
let { code, message, data } = res let { code, message, data } = res
if (code == 0) { if (code == 0) {
wx.$util.hideLoading() wx.$util.hideLoading()
// 获取对应园区店配置
await this.getServiceBaseInfo(data.merchantId)
await this.getSignatureSwitch(data.merchantId)
let couponName = data.customerCoupon ? data.customerCoupon.couponName : '' let couponName = data.customerCoupon ? data.customerCoupon.couponName : ''
let total_price = 0 let total_price = 0
let warrantyCardList = [] let warrantyCardList = []
data.subOrderList.map(e => { let userInfo = wx.$util.getUserInfo()
for (var i = 0; i < data?.subOrderList?.length; i++) {
let e = data?.subOrderList[i]
total_price += e.totalPrice total_price += e.totalPrice
e.price = Number(wx.$util.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2) e.price = Number(wx.$util.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2)
e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || '' e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || ''
...@@ -155,7 +216,14 @@ Page({ ...@@ -155,7 +216,14 @@ Page({
cardCode: e.cardCode cardCode: e.cardCode
}) })
} }
}) // 膜类商品 并且服务商开通了使用膜卷号配置 不走签名流程
if (baseConfigData?.membraneTypeList?.includes(e?.upgradeGoodsType) && isUseFilmRoll && !signatureSwitch) {
let result = await api.getfilmRollNoByGoods({upgradeGoodsId: e.upgradeGoodsId, yqMerchantId: userInfo?.merchantId, merchantId: userInfo?.shopMerchantId})
e.filmNumberData = result?.data || []
// 仅配置一个膜卷号 自动选中
if (!e.filmRollNo && e.filmNumberData?.length == 1) e.filmRollNo = e.filmNumberData[0]
}
}
data = { data = {
...data.customer, ...data.customer,
...data.payOrder, ...data.payOrder,
...@@ -184,9 +252,6 @@ Page({ ...@@ -184,9 +252,6 @@ Page({
// 条形码 // 条形码
warrantyCardList.length && this.getBarCode() warrantyCardList.length && this.getBarCode()
// 获取对应园区店配置
this.getServiceBaseInfo(data.merchantId)
this.getSignatureSwitch(data.merchantId)
// 校验是否显示二级流量方 // 校验是否显示二级流量方
if (data.subShopMerchantName) { if (data.subShopMerchantName) {
let { customerObj } = this.data let { customerObj } = this.data
...@@ -259,6 +324,27 @@ Page({ ...@@ -259,6 +324,27 @@ Page({
}) })
}, },
// 选择膜卷号
selectfilmRollNo(e) {
let { item, index } = e.currentTarget.dataset
this.setData({
filmRollNoList: item?.filmNumberData,
selectFilmNumberIndex: index,
filmSelectedItem: item.filmRollNo,
filmRollNoPopup: true
})
},
// 选择膜卷号确认
changefilmRollNo(e) {
let { selectFilmNumberIndex } = this.data
let prop = `orderInfo.subOrderList[${selectFilmNumberIndex}].filmRollNo`
this.setData({
[prop]: e?.detail,
filmRollNoPopup: false
})
},
// 选择技师 // 选择技师
selectArtificer(e) { selectArtificer(e) {
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
......
{ {
"navigationBarTitleText": "工单详情", "navigationBarTitleText": "工单详情",
"usingComponents": { "usingComponents": {
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup" "artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup",
"film-roll-no-popup": "/tabWorkOrder/components/FilmRollNoPopup/FilmRollNoPopup"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -41,8 +41,11 @@ ...@@ -41,8 +41,11 @@
<view class="subItem_box"> <view class="subItem_box">
<view style="{{!orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;'}}"> <view style="{{!orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;'}}">
<!-- 太阳膜类展示部位 精品类展示类目名 --> <!-- 太阳膜类展示部位 精品类展示类目名 -->
<view class="position">{{item.positionStr || item.upgradeGoodsTypeName}}</view> <view class="position">{{item.positionStr || item.upgradeGoodsTypeName}}<text class="type">x{{item.number}}</text></view>
<view class="type">x{{item.number}}</view> </view>
<!-- 设置膜卷号(不需走签名 战败订单) -->
<view wx:if="{{(!signatureSwitch || orderInfo.selectPayType == 0) && isUseFilmRoll && item.filmNumberData.length}}" class="film-roll disabled" bindtap="selectfilmRollNo" data-item="{{item}}" data-index="{{index}}">
<text class="{{!item.filmRollNo ? 'grey_text' : ''}} 'text-hide'">{{item.filmRollNo || '选择膜卷号'}}</text><image src="/components/images/arrow-x.png" mode=""/>
</view> </view>
<!-- 太阳膜类且配置技师 --> <!-- 太阳膜类且配置技师 -->
<view wx:if="{{orderInfo.isOpenArtificer && item.upgradeGoodsPosition}}" class="artificer" bindtap="selectArtificer" data-item="{{item}}"> <view wx:if="{{orderInfo.isOpenArtificer && item.upgradeGoodsPosition}}" class="artificer" bindtap="selectArtificer" data-item="{{item}}">
...@@ -94,7 +97,7 @@ ...@@ -94,7 +97,7 @@
</block> </block>
<block wx:if="{{orderInfo.selectPayType == 2}}"> <block wx:if="{{orderInfo.selectPayType == 2}}">
<view class="cell"> <view class="cell">
<view class="label">付款凭证:</view> <view class="label">付款凭证</view>
<view class="image-box"> <view class="image-box">
<view class="value" bindtap="previewImage" wx:for="{{orderInfo.payVoucherList}}" wx:key="index" data-index="{{index}}" data-url="{{orderInfo.payVoucherList}}"> <view class="value" bindtap="previewImage" wx:for="{{orderInfo.payVoucherList}}" wx:key="index" data-index="{{index}}" data-url="{{orderInfo.payVoucherList}}">
<view class="image"> <view class="image">
...@@ -228,11 +231,7 @@ ...@@ -228,11 +231,7 @@
<view class="btn text-center" bindtap="navOrderSignature">客户签名确认</view> <view class="btn text-center" bindtap="navOrderSignature">客户签名确认</view>
</view> </view>
<view wx:else class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view wx:else class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="tips" wx:if="{{showTips}}"> <tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
<image class="tipsIcon" src="../../../images/tips.png" />
<view class="contentText">技师施工完毕后,点击完成施工按钮结束工单。</view>
<image class="closeIcon" bindtap="closeTips" src="../../images/closeIcon.png" />
</view>
<!-- <view class="btn text-center" bindtap="showAgain">继续下单</view> --> <!-- <view class="btn text-center" bindtap="showAgain">继续下单</view> -->
<view class="btn text-center" bindtap="confirmConstruction">确认完成施工</view> <view class="btn text-center" bindtap="confirmConstruction">确认完成施工</view>
</view> </view>
...@@ -247,4 +246,9 @@ ...@@ -247,4 +246,9 @@
artificerSelectObj="{{artificerSelectObj}}" artificerSelectObj="{{artificerSelectObj}}"
bindconfirm="changeArtificer" /> bindconfirm="changeArtificer" />
<!-- <wxs src="/utils/index.wxs" module="common" /> --> <!-- <wxs src="/utils/index.wxs" module="common" /> -->
<film-roll-no-popup
show="{{filmRollNoPopup}}"
title="选择膜卷号"
copyfilmRollNoList="{{filmRollNoList}}"
filmSelectedItem="{{filmSelectedItem}}"
bindconfirm="changefilmRollNo" />
...@@ -93,10 +93,11 @@ page { ...@@ -93,10 +93,11 @@ page {
.box .goods .item .subItem_box{ .box .goods .item .subItem_box{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
width: 100%; width: 100%;
} }
.box .goods .item .subItem_box .artificer{ .box .goods .item .subItem_box .artificer,.film-roll{
height: 48rpx; height: 48rpx;
background: #FFFFFF; background: #FFFFFF;
border: 1rpx solid #DEE0E3; border: 1rpx solid #DEE0E3;
...@@ -110,14 +111,18 @@ page { ...@@ -110,14 +111,18 @@ page {
} }
.artificer text{ .artificer text{
max-width: 170rpx; max-width: 96rpx;
}
.film-roll text{
max-width: 120rpx;
} }
.artificer .grey_text{ .artificer .grey_text,.film-roll .grey_text{
color: #BEC1C7; color: #BEC1C7;
} }
.artificer image{ .artificer image,.film-roll image{
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
margin-left: 8rpx; margin-left: 8rpx;
...@@ -540,6 +545,8 @@ page { ...@@ -540,6 +545,8 @@ page {
font-size: 28rpx; font-size: 28rpx;
margin-left: 16rpx; margin-left: 16rpx;
font-weight: normal; font-weight: normal;
display: flex;
align-items: center;
} }
......
...@@ -4,7 +4,7 @@ import { ...@@ -4,7 +4,7 @@ import {
} from '~/api/api' } from '~/api/api'
import api from '../../api.js' import api from '../../api.js'
import order_mixins from '../order_mixins.js' import order_mixins from '../order_mixins.js'
import { getPositionList } from '~/store/index' import { getPositionList, getServiceFilmRollSetting, setConfigInfo } from '~/store/index'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/'
const app = getApp() const app = getApp()
Page({ Page({
...@@ -55,7 +55,13 @@ Page({ ...@@ -55,7 +55,13 @@ Page({
value: 4, value: 4,
checked: false checked: false
} }
] ],
selectFilmNumberIndex: 0,
filmRollNoList: [],
isUseFilmRoll: false,
filmRollNoPopup: false,
filmSelectedItem: '',
baseConfigData: {}
}, },
setSignture(url) { setSignture(url) {
this.setData({ this.setData({
...@@ -172,13 +178,15 @@ Page({ ...@@ -172,13 +178,15 @@ Page({
async getOrderDetail(orderCode) { async getOrderDetail(orderCode) {
// console.log(orderCode) // console.log(orderCode)
let _this = this let _this = this
let { baseConfigData, isUseFilmRoll } = _this.data
let userInfo = wx.$util.getUserInfo()
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
const positionTypeList = await getPositionList() || [] const positionTypeList = await getPositionList() || []
api api
.getOrderDetail({ .getOrderDetail({
orderCode orderCode
}) })
.then(res => { .then(async res => {
let { let {
code, code,
message, message,
...@@ -189,18 +197,26 @@ Page({ ...@@ -189,18 +197,26 @@ Page({
let couponName = data.customerCoupon ? data.customerCoupon.couponName : '' let couponName = data.customerCoupon ? data.customerCoupon.couponName : ''
let total_price = 0 let total_price = 0
let warrantyCardList = [] let warrantyCardList = []
data.subOrderList.map(e => { for (var i = 0; i < data?.subOrderList?.length; i++) {
let e = data?.subOrderList[i]
total_price += e.totalPrice total_price += e.totalPrice
e.price = Number(wx.$util.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2) e.price = Number(wx.$util.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2)
e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || '' e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || ''
if (e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) { if ((e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) && data.selectPayType != 0) {
warrantyCardList.push({ warrantyCardList.push({
warrantyPeriod: e.upgradeWarrantyPeriod, warrantyPeriod: e.upgradeWarrantyPeriod,
goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName, goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName,
cardCode: e.cardCode cardCode: e.cardCode
}) })
} }
}) // 膜类商品 并且服务商开通了使用膜卷号配置
if (baseConfigData?.membraneTypeList?.includes(e?.upgradeGoodsType) && isUseFilmRoll) {
let result = await api.getfilmRollNoByGoods({upgradeGoodsId: e.upgradeGoodsId, yqMerchantId: userInfo?.merchantId, merchantId: userInfo?.shopMerchantId})
e.filmNumberData = result?.data || []
// 仅配置一个膜卷号 自动选中
if (!e.filmRollNo && e.filmNumberData?.length == 1) e.filmRollNo = e.filmNumberData[0]
}
}
data = { data = {
...data.customer, ...data.customer,
...data.payOrder, ...data.payOrder,
...@@ -224,18 +240,18 @@ Page({ ...@@ -224,18 +240,18 @@ Page({
// warrantyCardList.length && this.getBarCode() // warrantyCardList.length && this.getBarCode()
// this.getServiceBaseInfo(data.merchantId) // this.getServiceBaseInfo(data.merchantId)
// 校验是否显示二级流量方 // 校验是否显示二级流量方
if (data.subShopMerchantName) { // if (data.subShopMerchantName) {
let { customerObj } = this.data // let { customerObj } = this.data
if (customerObj.findIndex(val => val.key == 'subShopMerchantName') < 0) { // if (customerObj.findIndex(val => val.key == 'subShopMerchantName') < 0) {
customerObj[customerObj.length - 2] = { // customerObj[customerObj.length - 2] = {
label: '二级流量方', // label: '二级流量方',
key: 'subShopMerchantName' // key: 'subShopMerchantName'
} // }
} // }
this.setData({ // this.setData({
customerObj // customerObj
}) // })
} // }
// 门店是否配置技师 // 门店是否配置技师
// if (data?.technicianConfigDTOList?.length > 0) { // if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data) // this.isArtificer(data)
...@@ -306,6 +322,27 @@ Page({ ...@@ -306,6 +322,27 @@ Page({
}) })
}, },
// 选择膜卷号
selectfilmRollNo(e) {
let { item, index } = e.currentTarget.dataset
this.setData({
filmRollNoList: item?.filmNumberData,
selectFilmNumberIndex: index,
filmSelectedItem: item?.filmNo,
filmRollNoPopup: true
})
},
// 选择膜卷号确认
changefilmRollNo(e) {
let { selectFilmNumberIndex } = this.data
let prop = `orderInfo.subOrderList[${selectFilmNumberIndex}].filmRollNo`
this.setData({
[prop]: e?.detail,
filmRollNoPopup: false
})
},
// 选择技师 // 选择技师
selectArtificer(e) { selectArtificer(e) {
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
...@@ -417,7 +454,8 @@ Page({ ...@@ -417,7 +454,8 @@ Page({
rating, rating,
orderCode, orderCode,
orderInfo, orderInfo,
signImage signImage,
isUseFilmRoll
} = this.data } = this.data
let that = this let that = this
// 校验表单 // 校验表单
...@@ -452,13 +490,43 @@ Page({ ...@@ -452,13 +490,43 @@ Page({
// tags, // tags,
evaluationList evaluationList
} }
console.log(params);
// return // return
// 使用膜卷号
if (isUseFilmRoll) {
let flag = false
for (var i = 0; i < orderInfo?.subOrderList?.length; i++) {
let val = orderInfo?.subOrderList[i]
if (val?.filmNumberData?.length) {
if (!val.filmRollNo) return wx.$util.showToast(`请配置膜卷号`)
flag = true
}
}
if (flag) {
let arr = []
orderInfo?.subOrderList?.forEach(val => {
if (val?.filmNumberData?.length && val.filmRollNo) arr.push({ subOrderCode: val.subOrderCode, filmRollNo: val.filmRollNo })
})
api.setfilmRollNo({subOrderList: arr}).then(res => {
let { code, message } = res
if (code == 0) {
this.confirmEvent(params, orderInfo)
} else {
wx.$util.showToast(message)
}
}).catch(err => {
wx.$util.hideLoading()
})
} else {
this.confirmEvent(params, orderInfo)
}
} else {
this.confirmEvent(params, orderInfo)
}
},
confirmEvent(params, orderInfo) {
api api
.customerConfirmationSignature(params) .customerConfirmationSignature(params)
.then(result => { .then(result => {
// console.log(this.)
console.log(result)
let { let {
code, code,
message message
...@@ -469,13 +537,13 @@ Page({ ...@@ -469,13 +537,13 @@ Page({
title: '确认评价成功', title: '确认评价成功',
icon: 'success' icon: 'success'
}) })
wx.$util.refreshPageData()
wx.$router.redirectTo('constructionOrderDetail', orderInfo) wx.$router.redirectTo('constructionOrderDetail', orderInfo)
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
}) })
.catch(err => {}) .catch(err => {})
// console.log(electronicSignature, 'electronicSignature')
}, },
getSignatureImg() { getSignatureImg() {
let { let {
...@@ -599,12 +667,17 @@ Page({ ...@@ -599,12 +667,17 @@ Page({
}) })
.exec() .exec()
}, },
onRoute(options) { async onRoute(options) {
// console.log(options) // console.log(options)
// 调试用 // 调试用
// options.orderCode = '231020165619225'
// options.orderCode = '230427135616113' // options.orderCode = '230427135616113'
if (options.orderCode) { if (options.orderCode) {
// 服务商是否使用膜卷号配置
let isUseFilmRoll = await getServiceFilmRollSetting()
this.setData({isUseFilmRoll})
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
this.setData({baseConfigData})
this.setData({ this.setData({
orderCode: options.orderCode orderCode: options.orderCode
}) })
...@@ -615,8 +688,14 @@ Page({ ...@@ -615,8 +688,14 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: async function (options) {
if (options.orderCode) { if (options.orderCode) {
// 服务商是否使用膜卷号配置
let isUseFilmRoll = await getServiceFilmRollSetting()
this.setData({isUseFilmRoll})
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
this.setData({baseConfigData})
this.getOrderDetail(options.orderCode) this.getOrderDetail(options.orderCode)
this.setData({ this.setData({
orderCode: options.orderCode orderCode: options.orderCode
......
{ {
"navigationBarTitleText": "客户签字", "navigationBarTitleText": "客户签字",
"usingComponents": { "usingComponents": {
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup" "artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup",
"film-roll-no-popup": "/tabWorkOrder/components/FilmRollNoPopup/FilmRollNoPopup"
} }
} }
...@@ -26,9 +26,12 @@ ...@@ -26,9 +26,12 @@
</view> </view>
<view class="subItem_box"> <view class="subItem_box">
<view style="{{!orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;'}}"> <view style="{{!orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;'}}">
<view class="position">{{item.positionStr}}</view> <view class="position">{{item.positionStr || item.upgradeGoodsTypeName}}<text class="type">x{{item.number}}</text></view>
<view class="type">x{{item.number}}</view>
</view> </view>
<!-- 设置膜卷号 -->
<view wx:if="{{isUseFilmRoll && item.filmNumberData.length}}" class="film-roll disabled" bindtap="selectfilmRollNo" data-item="{{item}}" data-index="{{index}}">
<text class="{{!item.filmRollNo ? 'grey_text' : ''}} 'text-hide'">{{item.filmRollNo || '选择膜卷号'}}</text><image src="/components/images/arrow-x.png" mode=""/>
</view>
<!-- 太阳膜类且配置技师 --> <!-- 太阳膜类且配置技师 -->
<view wx:if="{{orderInfo.isOpenArtificer && item.upgradeGoodsPosition}}" class="artificer" bindtap="selectArtificer" data-item="{{item}}"> <view wx:if="{{orderInfo.isOpenArtificer && item.upgradeGoodsPosition}}" class="artificer" bindtap="selectArtificer" data-item="{{item}}">
<text class="{{!item.technicianName ? 'grey_text' : ''}} 'text-hide'">{{item.technicianName || '选择技师'}}</text><image src="/components/images/arrow-x.png" mode=""/> <text class="{{!item.technicianName ? 'grey_text' : ''}} 'text-hide'">{{item.technicianName || '选择技师'}}</text><image src="/components/images/arrow-x.png" mode=""/>
...@@ -134,4 +137,10 @@ ...@@ -134,4 +137,10 @@
orderInfo="{{orderInfo}}" orderInfo="{{orderInfo}}"
artificerSelectObj="{{artificerSelectObj}}" artificerSelectObj="{{artificerSelectObj}}"
bindconfirm="changeArtificer" /> bindconfirm="changeArtificer" />
<film-roll-no-popup
show="{{filmRollNoPopup}}"
title="选择膜卷号"
copyfilmRollNoList="{{filmRollNoList}}"
filmSelectedItem="{{filmSelectedItem}}"
bindconfirm="changefilmRollNo" />
...@@ -90,7 +90,7 @@ page { ...@@ -90,7 +90,7 @@ page {
margin-left: 12rpx; margin-left: 12rpx;
} }
.box .goods .item .subItem_box .artificer{ .box .goods .item .subItem_box .artificer,.film-roll{
height: 48rpx; height: 48rpx;
background: #FFFFFF; background: #FFFFFF;
border: 1rpx solid #DEE0E3; border: 1rpx solid #DEE0E3;
...@@ -104,16 +104,37 @@ page { ...@@ -104,16 +104,37 @@ page {
} }
.artificer text{ .artificer text{
max-width: 170rpx; max-width: 96rpx;
}
.film-roll text{
max-width: 120rpx;
}
.artificer .grey_text,.film-roll .grey_text{
color: #BEC1C7;
} }
.artificer image{ .artificer image,.film-roll image{
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
margin-left: 8rpx; margin-left: 8rpx;
flex-shrink: 0; flex-shrink: 0;
} }
.box .goods .item .subItem_box .artificer{
height: 48rpx;
background: #FFFFFF;
border: 1rpx solid #DEE0E3;
border-radius: 26rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 0 24rpx;
color: #292D33;
font-size: 24rpx;
}
.box .goods .item .goods_name{ .box .goods .item .goods_name{
color: #333333; color: #333333;
margin-bottom: 22rpx; margin-bottom: 22rpx;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import api from '../../api' import api from '../../api'
import { import {
getYQorderInfo, getYQorderInfo,
getPositionList setConfigInfo
} from '~/store/index' } from '~/store/index'
const app = getApp() const app = getApp()
let toastList = { let toastList = {
...@@ -75,7 +75,8 @@ Page({ ...@@ -75,7 +75,8 @@ Page({
type: 1 type: 1
}, },
positionTypeList: [], positionTypeList: [],
currentWordNumber: 0 // 订单备注字数 currentWordNumber: 0, // 订单备注字数
baseConfigData: {}
}, },
showCustomPop() { showCustomPop() {
this.setData({ this.setData({
...@@ -405,8 +406,8 @@ Page({ ...@@ -405,8 +406,8 @@ Page({
success(_res_) { success(_res_) {
if (_res_.confirm) { if (_res_.confirm) {
if (apiName == 'createPrerecordedOrder') { if (apiName == 'createPrerecordedOrder') {
// 预录建档跳转到预约列表 // 预录建档跳转到预约列表 状态更新 需刷新工单列表和预约管理列表
wx.$refresh = true wx.$util.refreshPageData()
wx.$router.go('pages.tabDateIndex') wx.$router.go('pages.tabDateIndex')
wx.$util.pointRecord(30) wx.$util.pointRecord(30)
} else { } else {
...@@ -418,7 +419,8 @@ Page({ ...@@ -418,7 +419,8 @@ Page({
} }
}) })
} else { } else {
wx.$refresh = true // 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData()
wx.$router.redirectTo('confirmOrder', data) wx.$router.redirectTo('confirmOrder', data)
} }
} else { } else {
...@@ -688,7 +690,6 @@ Page({ ...@@ -688,7 +690,6 @@ Page({
showCancel: false, showCancel: false,
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
wx.$refresh = true
wx.$router.go('index') wx.$router.go('index')
} }
} }
...@@ -700,7 +701,8 @@ Page({ ...@@ -700,7 +701,8 @@ Page({
async getOrderBaseGoodsList(merchantId) { async getOrderBaseGoodsList(merchantId) {
let { let {
first, first,
orderObj orderObj,
baseConfigData
} = this.data } = this.data
let { let {
subOrderList subOrderList
...@@ -723,11 +725,8 @@ Page({ ...@@ -723,11 +725,8 @@ Page({
} = res } = res
if (code == 0) { if (code == 0) {
wx.hideLoading() wx.hideLoading()
data?.forEach((val, index) => { let filterData = data.filter(val => val.goodsType !== 1 && val.goodsType !== baseConfigData?.selfBuildFilmType)
// 过滤掉太阳膜数据 let goodsData = filterData
if (val.goodsType == 1) data.splice(index, 1)
})
let goodsData = data
const filterList = goodsData.reduce((list, item) => { const filterList = goodsData.reduce((list, item) => {
// item.upgradeGoodsList.forEach(val => { // item.upgradeGoodsList.forEach(val => {
// val.positionStr = positionTypeList.filter(v => v.positionValue == val.merchantGoodsPosition)[0]?.positionName // val.positionStr = positionTypeList.filter(v => v.positionValue == val.merchantGoodsPosition)[0]?.positionName
...@@ -877,6 +876,9 @@ Page({ ...@@ -877,6 +876,9 @@ Page({
wx.disableAlertBeforeUnload && wx.disableAlertBeforeUnload() //关闭小程序页面返回询问对话框 wx.disableAlertBeforeUnload && wx.disableAlertBeforeUnload() //关闭小程序页面返回询问对话框
}, },
async onRoute(res) { async onRoute(res) {
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
this.setData({baseConfigData})
if (res.orderCode && res.page) { if (res.orderCode && res.page) {
let result = await api.getOrderDetail({ let result = await api.getOrderDetail({
orderCode: res.orderCode orderCode: res.orderCode
......
...@@ -336,7 +336,8 @@ page { ...@@ -336,7 +336,8 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: 28rpx; font-size: 32rpx;
font-weight: 500;
z-index: 99; z-index: 99;
flex-direction: column; flex-direction: column;
} }
......
...@@ -196,7 +196,8 @@ Page({ ...@@ -196,7 +196,8 @@ Page({
wx.$util.hideLoading() wx.$util.hideLoading()
console.log(result) console.log(result)
if (result.code == 0 && result.data) { if (result.code == 0 && result.data) {
wx.$refresh = true // 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData()
this.back(orderObj.orderCode) this.back(orderObj.orderCode)
} else { } else {
wx.showToast({ wx.showToast({
......
...@@ -253,7 +253,8 @@ page { ...@@ -253,7 +253,8 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: 28rpx; font-size: 32rpx;
font-weight: 500;
z-index: 99; z-index: 99;
flex-direction: column; flex-direction: column;
} }
......
...@@ -259,6 +259,12 @@ const debounce = (func, delay, immediate)=> { ...@@ -259,6 +259,12 @@ const debounce = (func, delay, immediate)=> {
}; };
} }
/** 刷新工单管理 预约管理数据 */
const refreshPageData = (notRefreshOrder) => {
if (!notRefreshOrder) wx.$orderListRefresh = true
wx.$dateListRefresh = true
}
const util = { const util = {
onReachBottom, onReachBottom,
haveEmoji, haveEmoji,
...@@ -280,7 +286,8 @@ const util = { ...@@ -280,7 +286,8 @@ const util = {
getTimeState, getTimeState,
checkRule, checkRule,
pointRecord, pointRecord,
debounce debounce,
refreshPageData
} }
const Util = Object.assign(util, wxApi, format) const Util = Object.assign(util, wxApi, format)
// console.log('Util', Util) // console.log('Util', Util)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!