Commit fb6c6d02 by 张立顺

Merge branch 'develop' into 'dev_v4.33.0_1228'

Develop

See merge request !201
2 parents 15bc5e09 ad0bf5b0
Showing 106 changed files with 3209 additions and 417 deletions
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# 账号登录可以使用以下(验证码 开发和测试环境任意输入即可): # 账号登录可以使用以下(验证码 开发和测试环境任意输入即可):
超级管理员:13022223223(测试环境) 13476670746(开发环境) 超级管理员:13022223223(测试环境) 13476670746(开发环境)
供应商账号:13978573226 (选testfws1) 15023656699 13978573226 供应商账号:13978573226 (选testfws1) 15023656699 13978573226
园区店管理员: 15589265685(测试环境) 园区店管理员: 15589265685(测试环境) 15626599736(开发环境)
员工账号 :15626599735 (选明明塘朗园区店) 15626599738(开发环境) 员工账号 :15626599735 (选明明塘朗园区店) 15626599738(开发环境)
员工账号 :18775035205 (选测试园店) 18775035205(选最下面的) 员工账号 :18775035205 (选测试园店) 18775035205(选最下面的)
员工账号 :13632791593 (选fennun03能下单 园区测试门店有多条数据) 员工账号 :13632791593 (选fennun03能下单 园区测试门店有多条数据)
......
...@@ -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')
},
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"pages/nothing/nothing", "pages/nothing/nothing",
"pages/webView/webView", "pages/webView/webView",
"pages/tabWorkOrder/pages/index/index", "pages/tabWorkOrder/pages/index/index",
"tabMine/pages/index/index", "pages/tabMine/pages/index/index",
"pages/tabDateIndex/pages/tabDateIndex", "pages/tabDateIndex/pages/tabDateIndex",
"pages/log/log", "pages/log/log",
"pages/changeScene/changeScene" "pages/changeScene/changeScene"
...@@ -30,29 +30,25 @@ ...@@ -30,29 +30,25 @@
"pagePath": "tabIndex/pages/index/index", "pagePath": "tabIndex/pages/index/index",
"text": "首页", "text": "首页",
"iconPath": "images/tab-home.png", "iconPath": "images/tab-home.png",
"selectedIconPath": "images/tab-home-active.png", "selectedIconPath": "images/tab-home-active.png"
"iconSize": "24"
}, },
{ {
"pagePath": "pages/tabWorkOrder/pages/index/index", "pagePath": "pages/tabWorkOrder/pages/index/index",
"text": "工单管理", "text": "工单管理",
"iconPath": "images/tab-order.png", "iconPath": "images/tab-order.png",
"selectedIconPath": "images/tab-order-active.png", "selectedIconPath": "images/tab-order-active.png"
"iconSize": "24"
}, },
{ {
"pagePath": "pages/tabDateIndex/pages/tabDateIndex", "pagePath": "pages/tabDateIndex/pages/tabDateIndex",
"text": "预约管理", "text": "预约管理",
"iconPath": "images/tab-date.png", "iconPath": "images/tab-date.png",
"selectedIconPath": "images/tab-date-active.png", "selectedIconPath": "images/tab-date-active.png"
"iconSize": "24"
}, },
{ {
"pagePath": "tabMine/pages/index/index", "pagePath": "pages/tabMine/pages/index/index",
"text": "个人中心", "text": "个人中心",
"iconPath": "images/tab-mine.png", "iconPath": "images/tab-mine.png",
"selectedIconPath": "images/tab-mine-active.png", "selectedIconPath": "images/tab-mine-active.png"
"iconSize": "24"
} }
] ]
}, },
...@@ -67,6 +63,15 @@ ...@@ -67,6 +63,15 @@
] ]
}, },
{ {
"root": "tabMine",
"name": "tabMine",
"pages": [
"pages/technicianSetup/technicianSetup",
"pages/completeBuild/completeBuild",
"pages/collectCoupons/collectCoupons"
]
},
{
"root": "tabWorkOrder", "root": "tabWorkOrder",
"name": "tabWorkOrder", "name": "tabWorkOrder",
"pages": [ "pages": [
...@@ -96,6 +101,7 @@ ...@@ -96,6 +101,7 @@
"pages/carQuotation/CarQuotationPay/CarQuotationPay", "pages/carQuotation/CarQuotationPay/CarQuotationPay",
"pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation", "pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation",
"pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple", "pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple",
"pages/carQuotation/updateOrderInfo/updateOrderInfo",
"pages/ocrEquityModules/ocrEquityModules", "pages/ocrEquityModules/ocrEquityModules",
"pages/carEquity/previewList/previewList", "pages/carEquity/previewList/previewList",
"pages/carEquity/serviceInfo/serviceInfo", "pages/carEquity/serviceInfo/serviceInfo",
......
...@@ -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,8 +107,18 @@ Component({ ...@@ -94,8 +107,18 @@ 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)
})
let selectActiveArr = []
for (var i = 0; i < upgradeGoodsList?.length; i++) {
let val = upgradeGoodsList[i]
if (val.active) selectActiveArr.push(val)
}
if (!selectActiveArr?.length) return wx.$util.showToast('请勾选商品')
// 将已选商品与当前弹窗数据对比处理数据
let arr = this.removeDuplicates(upgradeGoodsList.concat(chooseGoodsList), 'id')
arr?.map(c => { arr?.map(c => {
if (c.active) { if (c.active) {
if (!c.count) c.count = 1 if (!c.count) c.count = 1
...@@ -112,7 +135,6 @@ Component({ ...@@ -112,7 +135,6 @@ Component({
chooseList.push(c) chooseList.push(c)
} }
}) })
})
} else { } else {
goodsList.map(e => { goodsList.map(e => {
e.upgradeGoodsList.map(c => { e.upgradeGoodsList.map(c => {
......
...@@ -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;
} }
......
// components/tabMine/TabMine.js // components/tabMine/TabMine.js
import api from '../../tabMine/api' import api from '~/pages/tabMine/api'
const app = getApp() const app = getApp()
import constantData from '../../pages/constant/data' import constantData from '../../pages/constant/data'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/'
...@@ -83,7 +83,10 @@ Component({ ...@@ -83,7 +83,10 @@ Component({
}) })
wx.showLoading() wx.showLoading()
api.logout().then(_res_ => { api.logout().then(_res_ => {
let { code, message } = _res_ let {
code,
message
} = _res_
if (code == 0) { if (code == 0) {
app.login(false) app.login(false)
} else { } else {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<!-- src引入filter.wxs, module给模块起名 --> <!-- src引入filter.wxs, module给模块起名 -->
<!-- <wxs src="./index.wxs" module="filter" /> --> <!-- <wxs src="./index.wxs" module="filter" /> -->
<view class="bg"></view> <view class="bg"></view>
<block> <block>
<block>
<view class="main" style="margin-top:104rpx"> <view class="main" style="margin-top:104rpx">
<view class="user-box"> <view class="user-box">
<view class="user-avatar"> <view class="user-avatar">
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</view> </view>
</view> </view>
</view> </view>
<block > <block>
<!-- <view class="scene_box"> <!-- <view class="scene_box">
<view class="title">场景</view> <view class="title">场景</view>
<view class="select_item"> <view class="select_item">
...@@ -57,103 +57,21 @@ ...@@ -57,103 +57,21 @@
<view class="set_tips">设置录单必填项</view> <view class="set_tips">设置录单必填项</view>
</view> --> </view> -->
<view class="set_item item_3" bindtap="changeScene"> <view class="set_item item_3" bindtap="changeScene">
<view class="title">场景切换<image class="arrow_icon" src="/tabMine/images/arrow_icon.png" mode=""/></view> <view class="title">场景切换
<image class="arrow_icon" src="/pages/tabMine/images/arrow_icon.png" mode="" />
</view>
<view class="set_tips">{{selectedSceneName}}</view> <view class="set_tips">{{selectedSceneName}}</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_3.png" mode=""/> <image class="icon_image" src="{{IMG_URL}}mine_icon_3.png" mode="" />
</view> </view>
<view class="set_item item_4" bindtap="goVersionPage"> <view class="set_item item_4" bindtap="goVersionPage">
<view class="title">更新日志<image class="arrow_icon" src="/tabMine/images/arrow_icon.png" mode=""/></view> <view class="title">更新日志
<view class="set_tips">最新{{versionData.version}}版</view> <image class="arrow_icon" src="/pages/tabMine/images/arrow_icon.png" mode="" />
<image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode=""/>
</view>
</view> </view>
<!-- <view class="version_box" bindtap="goVersionPage"> <view class="set_tips">最新{{versionData.version}}版</view>
<view class="item"> <image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode="" />
<view class="icon_box">
<view class="is_new" hidden="{{!versionData.isNew}}">NEW</view>
</view> </view>
<view>更新日志</view>
</view> </view>
</view> -->
</block> </block>
<view class="logout text-center" bindtap="logout">退出账号</view> <view class="logout text-center" bindtap="logout">退出账号</view>
</view> </view>
</block>
<!-- <block wx:if="{{showWorkBox}}">
<view class="work-box" catchtouchmove="noScroll">
<view class="work-bg" bindtap="showWork" />
<view class="work-content">
<view class="work-title text-center hasborder">工位设置</view>
<view class="work-body">
<block wx:for="{{workItem}}" wx:key="index">
<view class="item hasborder">
<view class="label">{{item.label}}</view>
<view class="value">
<view
class="minus {{userInfo.userType == 2 ?'disabled':''}}"
bindtap="addWorkCount"
data-count="{{-1}}"
data-index="{{index}}"
bindlongtap="addWorkCount"
bindtouchend="touchend"
bindtouchstart="touchstart">
-
</view>
<view class="input text-center {{userInfo.userType == 2 ?'disabled':''}}">
{{item.maxCount}}
</view>
<view
class="add {{userInfo.userType == 2 ?'disabled':''}}"
bindtap="addWorkCount"
data-count="{{1}}"
data-index="{{index}}"
bindlongtap="addWorkCount"
bindtouchend="touchend"
bindtouchstart="touchstart">
+
</view>
个
</view>
</view>
</block>
<view class="item hasborder">
<view class="label">周六施工</view>
<switch
class="{{userInfo.userType == 2 ?'disabled':''}}"
disabled="{{userInfo.userType == 2}}"
color="#347BFF"
isYqdSuper="{{isYqdSuper}}"
checked="{{saturdayFlag}}"
bindchange="changeSwitch"
data-target="saturdayFlag" />
</view>
<view class="item hasborder">
<view class="label">周日施工</view>
<switch
class="{{userInfo.userType == 2 ?'disabled':''}}"
disabled="{{userInfo.userType == 2}}"
color="#347BFF"
checked="{{sundayFlag}}"
bindchange="changeSwitch"
data-target="sundayFlag" />
</view>
<view class="tips">设置门店每日每个时段可接待的客户人数, 施工时段以1个半小时为准,请合理安排施工进度</view>
</view>
<view class="work-footer">
<view class="cancel text-center" bindtap="showWork">取消</view>
<view class="confirm text-center" bindtap="confirm">确定</view>
</view>
</view>
</view>
</block>
<switch-popup
show="{{showMerchantPop}}"
height="{{merchantPopConfig.height}}"
title="{{merchantPopConfig.title}}"
isYqdSuper="{{isYqdSuper}}"
tips="{{merchantPopConfig.tips}}" /> -->
</block> </block>
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
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/'
Component({ Component({
externalClasses: ["custom-class"], externalClasses: ["custom-class"],
options: {
styleIsolation: 'apply-shared',
},
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -25,7 +28,9 @@ Component({ ...@@ -25,7 +28,9 @@ Component({
methods: { methods: {
tapCallback(e) { tapCallback(e) {
let tipsProps = this.properties let tipsProps = this.properties
let { type } = e.target.dataset let {
type
} = e.target.dataset
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
if (type == 1) { if (type == 1) {
tipsProps.showTips = false tipsProps.showTips = false
......
...@@ -2,26 +2,35 @@ ...@@ -2,26 +2,35 @@
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; /* align-items: flex-start; */
padding: 20rpx; /* align-items: center; */
padding: 16rpx;
/* padding-top: 20rpx; */
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;
} }
.tipsIcon { .tipsIcon {
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
margin-right: 8rpx; margin-right: 8rpx;
flex-shrink: 0;
/* margin-top: 8rpx; */
} }
.closeIcon { .closeIcon {
width: 26rpx; width: 28rpx;
height: 26rpx; height: 28rpx;
flex-shrink: 0;
/* margin-top: 8rpx; */
} }
.tips .contentText { .tips .contentText {
margin-right: auto; margin-right: auto;
line-height: 28rpx;
display: flex; display: flex;
font-weight: 500; font-weight: 500;
flex-direction: column; flex-direction: column;
......
...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 3 let index = 1
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
......
...@@ -97,6 +97,11 @@ module.exports = { ...@@ -97,6 +97,11 @@ module.exports = {
/** 会员权益产值统计 */ /** 会员权益产值统计 */
outputValueStatistics(data) { outputValueStatistics(data) {
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.outputValueStatistics', data) return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.outputValueStatistics', data)
},
/** 修改车损报价单客户基本信息信息 */
updateCustomerInfo(data) {
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update', data)
} }
} }
...@@ -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 => {
......
...@@ -165,7 +165,9 @@ Page({ ...@@ -165,7 +165,9 @@ Page({
icon: 'success' icon: 'success'
}) })
setTimeout(() => { setTimeout(() => {
wx.$router.redirectTo('packageEquity.equityPage', { tabIndex: 1 }) wx.$router.redirectTo('packageEquity.equityPage', {
tabIndex: 1
})
}, 1000) }, 1000)
} }
}) })
...@@ -190,11 +192,11 @@ Page({ ...@@ -190,11 +192,11 @@ Page({
}) })
// 是订单补录直接走另外的补录逻辑 // 是订单补录直接走另外的补录逻辑
console.log(outTradeNo,'是订单补录直接走另外的补录逻辑'); console.log(outTradeNo, '是订单补录直接走另外的补录逻辑');
if (outTradeNo) return this.setQuotationRecording() if (outTradeNo) return this.setQuotationRecording()
// debugger // debugger
// 如果是门店收款 并且付款凭证没有填 // 如果是门店收款 并且付款凭证没有填
if (orderInfo.payType == 2 && !( orderInfo.transactionNo && orderInfo.paymentDocList.length ) ) return this.setData({ if (orderInfo.payType == 2 && !(orderInfo.transactionNo && orderInfo.paymentDocList.length)) return this.setData({
showPopup: true, showPopup: true,
confirmStatus: false confirmStatus: false
}) })
...@@ -211,7 +213,9 @@ Page({ ...@@ -211,7 +213,9 @@ Page({
// 校验生成告知书是否成功 // 校验生成告知书是否成功
if (id) { if (id) {
// 门店付款就直接返回列表 // 门店付款就直接返回列表
if (orderInfo.payType == 2) return wx.$router.redirectTo('packageEquity.equityPage', { tabIndex: 1 }) if (orderInfo.payType == 2) return wx.$router.redirectTo('packageEquity.equityPage', {
tabIndex: 1
})
let status = await this.createWithPay(id) let status = await this.createWithPay(id)
wx.hideLoading() wx.hideLoading()
let that = this let that = this
...@@ -271,7 +275,7 @@ Page({ ...@@ -271,7 +275,7 @@ Page({
} = this.data } = this.data
owner = wx.$util.deepClone(owner) owner = wx.$util.deepClone(owner)
owner.price = this.multipliedByHundred(owner?.price) || '' owner.price = parseFloat(owner?.price).toString() != "NaN" ? this.multipliedByHundred(owner?.price) : ''
// orderInfo.owner = owner // orderInfo.owner = owner
if (owner) { if (owner) {
delete owner?.buyCarTime delete owner?.buyCarTime
...@@ -402,7 +406,9 @@ Page({ ...@@ -402,7 +406,9 @@ Page({
} = this.data } = this.data
// 补单点放弃 // 补单点放弃
if (orderInfo.outTradeNo) { if (orderInfo.outTradeNo) {
return wx.$router.redirectTo('packageEquity.equityPage', { tabIndex: 1 }) return wx.$router.redirectTo('packageEquity.equityPage', {
tabIndex: 1
})
} }
if (saveStatus) return false if (saveStatus) return false
wx.showLoading('保存中...') wx.showLoading('保存中...')
...@@ -425,7 +431,9 @@ Page({ ...@@ -425,7 +431,9 @@ Page({
message message
} = res } = res
if (code == 0) { if (code == 0) {
wx.$router.redirectTo('packageEquity.equityPage', { tabIndex: 1 }) wx.$router.redirectTo('packageEquity.equityPage', {
tabIndex: 1
})
} else { } else {
return wx.$util.showToast(res.message || '保存错误') return wx.$util.showToast(res.message || '保存错误')
} }
......
...@@ -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;
} }
......
...@@ -7,7 +7,7 @@ import { ...@@ -7,7 +7,7 @@ import {
} from '../../../api' } from '../../../api'
import data from '../constant/data' import data from '../constant/data'
import constantData from '../constant/data' import constantData from '../constant/data'
import { ImgUrl } from '~/config' import { ImgUrl as IMG_URL } from '~/config'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -26,7 +26,7 @@ Component({ ...@@ -26,7 +26,7 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
ImgUrl, IMG_URL,
orderObj: [{ orderObj: [{
label: '车架号', label: '车架号',
key: 'carVin' key: 'carVin'
...@@ -106,6 +106,12 @@ Component({ ...@@ -106,6 +106,12 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
jumpUpdate(e) {
const {item:orderInfo} = e.currentTarget.dataset
// let { orderInfo } = this.data
console.log(orderInfo,'orderInfo');
wx.$router.go('updateOrderInfo', orderInfo.id)
},
// 获取数据 // 获取数据
onLoad(noGetList) { onLoad(noGetList) {
this.setData({ this.setData({
......
...@@ -67,10 +67,11 @@ ...@@ -67,10 +67,11 @@
<view wx:for="{{list}}" wx:key="index" class="item"> <view wx:for="{{list}}" wx:key="index" class="item">
<view class="item-content"> <view class="item-content">
<view class="item-header"> <view class="item-header">
<view class="header-cust"> <view class="header-cust" >
{{item.customerName}} {{item.customerName}}
<image wx:if="{{item.ownerGender}}" class="icon-sex" src="{{item.ownerGender == '男' ? '../../../images/icon-man.png' : '../../../images/icon-woman.png'}}" /> <image wx:if="{{item.ownerGender}}" class="icon-sex" src="{{item.ownerGender == '男' ? '../../../images/icon-man.png' : '../../../images/icon-woman.png'}}" />
</view> </view>
<view wx:if="{{item.orderStatus == '3'||item.orderStatus =='5' || item.orderStatus == '-1' }}" data-item="{{item}}" bindtap="jumpUpdate" class="updateInfo "><image src="{{IMG_URL}}/miniProgram/edit_icon.png" class="iconImage" ></image>客户信息</view>
<view class="header-status"> <view class="header-status">
<!-- 0待报价、1待确认、2待支付、3已支付、-1战败 5已完成(已签名)--> <!-- 0待报价、1待确认、2待支付、3已支付、-1战败 5已完成(已签名)-->
<!-- == '3' --> <!-- == '3' -->
...@@ -199,7 +200,7 @@ ...@@ -199,7 +200,7 @@
</view> </view>
<!-- 超管isSuper/商户类型 userType 1账号不可操作 --> <!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<view class="addOrderBtn" wx:if="{{!userInfo.isSuper && userInfo.userType == 2&&mode!=-1}}"> <view class="addOrderBtn" wx:if="{{!userInfo.isSuper && userInfo.userType == 2&&mode!=-1}}">
<image data-target="addOrder" bind:tap="handleClickOrderBtn" class="addOrder" src="{{ImgUrl}}/miniProgram/crateOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" /> <image data-target="addOrder" bind:tap="handleClickOrderBtn" class="addOrder" src="{{IMG_URL}}/miniProgram/crateOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" />
<view class="label">新增提单</view> <view class="label">新增提单</view>
</view> </view>
</view> </view>
......
...@@ -217,11 +217,12 @@ ...@@ -217,11 +217,12 @@
} }
.item .item-content { .item .item-content {
padding: 20rpx 32rpx 0; padding: 32rpx 32rpx 0;
} }
.list .item-header { .list .item-header {
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
} }
...@@ -229,6 +230,7 @@ ...@@ -229,6 +230,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 32rpx; font-size: 32rpx;
font-weight: 600;
color: #333333; color: #333333;
} }
...@@ -239,7 +241,7 @@ ...@@ -239,7 +241,7 @@
} }
.list .header-status { .list .header-status {
font-weight: 500; font-weight: 600;
font-size: 28rpx; font-size: 28rpx;
} }
...@@ -249,9 +251,12 @@ ...@@ -249,9 +251,12 @@
} }
.green-txt { .green-txt {
color: #4AC18E; color: #35C376;
background: #EAF9F1; background: #EAF9F1;
padding: 4rpx 8rpx; padding: 4rpx 8rpx;
/* text-align: center; */
font-size: 24rpx;
border-radius: 4rpx; border-radius: 4rpx;
} }
...@@ -382,7 +387,7 @@ ...@@ -382,7 +387,7 @@
} }
.list .item .order-list { .list .item .order-list {
padding: 20rpx 0 0; padding: 28rpx 0 20rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
...@@ -428,17 +433,19 @@ ...@@ -428,17 +433,19 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
.pricePay .unit { .pricePay .unit {
font-size: 28rpx; font-size: 28rpx;
} }
.pricePay .order-label { .pricePay .order-label {
width: 136rpx; width: 136rpx;
color: #9B9B9E; color: #999EA8;
} }
.pricePay .header-price { .pricePay .header-price {
font-family: 'numberBold'; font-family: 'numberBold';
font-weight: 700; /* font-weight: 700; */
font-size: 36rpx; font-size: 36rpx;
color: #347BFF; color: #347BFF;
} }
...@@ -570,6 +577,8 @@ ...@@ -570,6 +577,8 @@
padding: 0rpx 12rpx; padding: 0rpx 12rpx;
background: #FFF5E6; background: #FFF5E6;
border-radius: 8rpx; border-radius: 8rpx;
display: flex;
align-items: center;
} }
.no-data { .no-data {
...@@ -618,3 +627,17 @@ ...@@ -618,3 +627,17 @@
.addOrderBtn .label { .addOrderBtn .label {
margin-top: -10rpx; margin-top: -10rpx;
} }
.updateInfo {
color: #347BFF;
font-size: 28rpx;
margin-left: 16rpx;
font-weight: normal;
margin-right: auto;
}
.iconImage {
width: 32rpx;
height: 32rpx;
vertical-align: bottom;
}
\ No newline at end of file \ No newline at end of file
// tabWorkOrder/pages/createOrder/createOrder.js
// import deepClone from '~/utils/deepClone'
import {
getQuotationInfoById,
updateCustomerInfo
} from '../../../api'
// import { getYQorderInfo } from '~/store/index'
let toastList = {
userId: '销售顾问不能为空',
owner: '车主姓名不能为空',
customerPhone: '手机号不能为空',
sellerUserId: '转化人员不能为空',
customerCouponCode: '精品礼券不能为空'
}
const phoneRex = /^[1]([3-9])[0-9]{9}$/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
phoneShow: false,
payTypeList: [{
name: '门店收款',
value: 2
},
{
name: 'POS机',
value: 3
},
{
name: '战败',
value: 0
},
{
name: '微信支付',
value: 1
}
],
showPayList: [],
orderObj: {
customer: {
customerName: '',
customerPhone: '',
standNo: '',
plateNumber: '',
customerSex: 1,
experienceFlag: 'Y',
technicianId: ''
},
selectPayType: 2,
remark: ''
},
goodsList: [],
goodsData: [],
tipsProps: {
tipsText: '客户信息仅支持修改以上部分。',
showTips: true,
type: 1
},
currentWordNumber: 0 // 订单备注字数
},
showPopup(e) {
let {
goodsData,
orderObj: {
selectPayType
}
} = this.data
let {
showName
} = e.currentTarget.dataset
if (showName == 'goodsBox') {
if (selectPayType == 0) return
if (goodsData.length < 1) {
this.showToast('门店无配置商品')
return
}
}
this.setData({
[showName]: true
})
},
changeExperience(e) {
let {
experience
} = e.currentTarget.dataset
console.log(experience)
wx.vibrateShort()
this.setData({
['orderObj.customer.experienceFlag']: experience
})
},
input(e) {
// userInfo
let {
orderObj
} = this.data
let {
value
} = e.detail
let {
name
} = e.currentTarget.dataset
// let flag = (name == 'customer.customerPhone' && phoneRex.test(value)) || name != 'customer.customerPhone'
// if (!flag) return
this.setData({
[`orderObj.${name}`]: value
})
},
remarkInput(e) {
this.setData({
currentWordNumber: e.detail.cursor,
'orderObj.notes': e.detail.value
})
},
// changeGender(e) {
// let { gender } = e.currentTarget.dataset
// wx.vibrateShort()
// this.setData({
// ['orderObj.customer.customerSex']: gender
// })
// },
// chooseCar(e) {
// console.log(e)
// let { carBrand, carType } = e.detail
// this.setData({
// car: `${carBrand}|${carType}`
// })
// },
back(data) {
if (data) {
// this.
// wx.$router.back(page => {
// page.getOrderDetail && page.getOrderDetail(data)
// })
} else {
wx.$router.back()
}
},
// 选择技师
changeArtificer(e) {
let value = e?.detail || {}
this.setData({
artificerSelectPopup: false,
orderObj: value
})
},
submit(i) {
let {
giveup
} = i.currentTarget.dataset
// console.log(giveUp)
// console.log(i.currentTarget)
if (giveup) {
return this.back()
}
let {
orderObj,
orderObj: {
owner
}
} = this.data
let key = this.checkRequired(orderObj)
console.log(key)
// debugger
if (key) {
this.showToast(toastList[key])
wx.pageScrollTo({
selector: `.${key}`
})
return
}
if (!phoneRex.test(orderObj.owner.phone)) {
this.showToast('请输入正确的手机号')
return
}
if (orderObj.owner.carVin) {
const vinRex = /[^\w]/g
if (vinRex.test(orderObj.owner.carVin)) {
this.showToast('请输入正确的VIN码')
return
}
}
let params = {
id: orderObj.id,
notes: orderObj.notes || '',
owner: {
id: orderObj.owner.id,
owner: owner.owner,
phone: owner.phone,
carVin: owner.carVin || '',
certificateNo: owner.certificateNo || ''
}
}
console.log(params, 'params');
// if (!scene) {
// if (!orderObj.orderCode) delete orderObj.orderCode
// }
// if (orderObj.customer.buyTime) delete orderObj.customer.buyTime
// delete orderObj.customerCouponCode
// delete orderObj.customer.createdDate
wx.$util.showLoading('提交中...')
// let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianUuid', 'technicianId', 'technicianName']
// let userInfo = {}
// orderObj = Object.assign(orderObj, orderObj.customer)
// paramsList.map(item => {
// userInfo[item] = orderObj[item] || ''
// })
// console.log(userInfo)
// return
// 修改提交用户信息
updateCustomerInfo(params)
.then(result => {
wx.$util.hideLoading()
console.log(result)
if (result.code == 0 && result.data) {
// wx.$refresh = true
this.back(orderObj.orderCode)
} else {
wx.showToast({
title: result.message,
icon: 'error'
})
}
})
.catch(err => {
// wx.$util.hideLoading()
console.log(err)
})
},
checkRequired(obj) {
// 'merchantId', 'employeeName', 'customerName','sellerUserId', 'sellerName', 'sellerMerchantId', 'customerCouponCode'
let target = ['owner', 'phone']
obj = {
...obj,
...obj.owner
}
// console.log(obj)
try {
target.map(key => {
if (!obj[key]) {
throw key
}
})
} catch (error) {
return error
}
return false
},
setOrderObj(options) {
// console.log(options)
let {
scene,
userInfo
} = this.data
console.log('setOrderObj', options)
// wx.$util.showLoading('加载中...')
let orderObj = {}
Object.keys(options).map(e => {
if (options[e] != null && options[e] != undefined) {
if (typeof options[e] == 'object') {
Object.keys(options[e]).map(key => {
if (options[e][key] == null || options[e][key] == undefined) delete options[e][key]
})
}
orderObj[e] = options[e]
}
})
// if (!orderObj.customer) orderObj.customer = orderObj.customerInfo
// if (!orderObj.customer.customerSex) orderObj.customer.customerSex = 1
// if (!orderObj.customer.experienceFlag) orderObj.customer.experienceFlag = 'N'
this.setData({
currentWordNumber: orderObj?.remark?.length || 0,
orderObj,
first: true,
flag: true,
// artificerList: orderObj?.technicianConfigDTOList
artificerList: orderObj?.technicianList
})
},
getQuotationInfoById(id) {
getQuotationInfoById({
id
}).then(res => {
console.log(res);
let {
data,
} = res
this.setData({
orderObj: data
})
})
},
// getSetting() {
// // 动态获取 车型 车架 车牌 是否必填
// // let { } = this.data
// // app.
// getYQorderInfo()
// .then(merchantSettingInfo => {
// this.setData({
// phoneShow: wx.$util.deepClone(merchantSettingInfo.yqPhoneConfig)
// })
// // this.setData({ merchantSettingInfo })
// })
// .catch(err => {
// console.log(err)
// })
// },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
if (options.scene) {
this.setData(options)
}
},
init(userInfo) {},
remarkConfirm(e) {
let value = e.detail
this.setData({
['orderObj.remark']: value
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
// this.getConfig()
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {},
onRoute(id) {
// id = 1912
id && this.getQuotationInfoById(id)
// wx.$util.pointRecord(28)
// 避免数据污染到上一页
// let obj = JSON.parse(JSON.stringify(res))
// this.setOrderObj(obj)
// this.getSetting()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
onUnload: () => {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {}
})
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "修改客户信息",
"usingComponents": {
"car-brands": "/components/CarBrands/CarBrands",
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"artificer-select-popup": "/components/ArtificerSelectPopup/artificerSelectPopup"
}
}
/* packageEquity/pages/carQuotation/updateOrderInfo/updateOrderInfo.wxss */
\ No newline at end of file \ No newline at end of file
<!-- 订单修改 -->
<!-- <block wx:if="{{flag}}"> -->
<view class="main {{isFullSucreen?'isFullSucreen':''}}">
<view class="box">
<view class="customerName owner">
<gl-cell border valueAlign="right" label="车主姓名" requiredAfter labelWidth="140rpx" required>
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" maxlength="16" value="{{orderObj.owner.owner}}" bindinput="input" data-name="owner.owner" always-embed></input>
</gl-cell>
</view>
<!-- <gl-cell border label="性别" valueAlign="right" labelWidth="140rpx">
<view class="gender-box">
<view class="block text-center {{orderObj.customer.customerSex==1?'':'right'}}" />
<view class="male text-center {{orderObj.customer.customerSex == 1?'active':''}}" bindtap="changeGender" data-gender="1">
男
</view>
<view class="woman text-center {{orderObj.customer.customerSex == 2?'active':''}}" bindtap="changeGender" data-gender="2">
女
</view>
</view>
</gl-cell> -->
<view class="customerPhone phone">
<gl-cell border valueAlign="right" label="手机号" requiredAfter labelWidth="140rpx" required>
<input placeholder="点击输入" class="input" type="number" maxlength="11" placeholder-class="placeholder-class" value="{{orderObj.owner.phone}}" bindinput="input" data-name="owner.phone" disabled="{{orderObj.orderSource == 5||orderObj.orderSource == 6}}" always-embed></input>
</gl-cell>
</view>
<gl-cell border valueAlign="right" label="车架号( VIN码 )" labelWidth="240rpx">
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" value="{{orderObj.owner.carVin}}" bindinput="input" data-name="owner.carVin" maxlength="17" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="身份证号" labelWidth="240rpx">
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" value="{{orderObj.owner.certificateNo}}" bindinput="input" data-name="owner.certificateNo" maxlength="18" always-embed></input>
</gl-cell>
<!-- <gl-cell border label="是否体验" valueAlign="right" labelWidth="140rpx">
<view class="gender-box">
<view class="block text-center {{orderObj.customer.experienceFlag=='Y'?'':'right'}}" />
<view class="male text-center {{orderObj.customer.experienceFlag == 'Y'?'active':''}}" bindtap="changeExperience" data-experience="Y">
是
</view>
<view class="woman text-center {{orderObj.customer.experienceFlag == 'N'?'active':''}}" bindtap="changeExperience" data-experience="N">
否
</view>
</view>
</gl-cell> -->
<view class="remark_box">
<view class="label">订单备注</view>
<view class="textArea_box">
<textarea value="{{orderObj.notes}}" placeholder="请输入" class="textarea" bindinput="remarkInput" />
<view class="currentWordNumber">{{currentWordNumber || 0}} / 100</view>
</view>
</view>
</view>
</view>
<view class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
<!-- <text class="tips x-center">客户信息仅支持修改以上部分。</text> -->
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
<view class="btns-con">
<view class="save text-center" data-giveUp="{{true}}" bindtap="submit" data-save data-save>放弃</view>
<view class="confirm text-center" bindtap="submit">提交修改</view>
</view>
</view>
<remark-popup wx:if="{{showRemark}}" show="{{showRemark}}" bindconfirm="remarkConfirm" placeholder="请填写内容,最多30个字" maxlength="30" value="{{orderObj.remark}}" />
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/createOrder/createOrder.wxss */
page {
background-color: rgb(246, 247, 247);
}
.main {
padding: 0 20rpx 136rpx;
}
.isFullSucreen {
padding-bottom: 102px !important;
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.box {
background: #FFFFFF;
box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.10);
border-radius: 16rpx;
overflow: hidden;
margin-top: 20rpx;
height: calc(100% - 100rpx);
}
.box .remark_box{
padding: 20rpx;
}
.box .remark_box .label{
font-size: 28rpx;
color: #292D33;
margin: 20rpx 0 24rpx 20rpx;
}
.box .remark_box .textArea_box{
font-size: 28rpx;
background: #F7F8FA;
border: 2rpx solid #EFF0F2;
border-radius: 16rpx;
padding: 24rpx;
}
.box .remark_box .textArea_box .textarea{
height: 130rpx;
}
.box .remark_box .textArea_box .currentWordNumber{
color: #BEC1C7;
text-align: right;
}
.input {
text-align: right;
font-size: 28rpx;
}
.placeholder-class {
color: #BEC1C7;
}
.between {
display: flex;
align-items: center;
justify-content: flex-end;
}
.between .start {
max-width: 70%;
}
.between .end text {
margin: 0 6rpx;
}
.gender-box {
width: 236rpx;
height: 60rpx;
display: flex;
border: 2rpx solid #347BFF;
border-radius: 12rpx;
font-size: 28rpx;
color: #347BFF;
margin-left: auto;
position: relative;
}
.gender-box .block {
position: absolute;
/* top: 0; */
top: 50%;
transform: translateY(-50%);
border: 2rpx solid #347BFF;
left: 0;
width: 50%;
border-radius: 12rpx;
height: 100%;
background: #347BFF;
color: #fff;
transition: all .25s;
}
.gender-box .block.right {
left: 50%;
}
.gender-box .male,
.gender-box .woman {
width: 50%;
height: 100%;
position: absolute;
top: 0;
transition: all .25s;
}
.gender-box .male {
left: 0;
}
.gender-box .woman {
right: 0;
}
.gender-box .male.active,
.gender-box .woman.active {
color: #fff;
}
.payType-box {
display: flex;
align-items: center;
/* justify-content: space-between; */
}
.payType-box .item {
margin-right: 4px;
}
.payType-box .item:last-child {
margin-right: 0;
}
.box .item-disabled {
opacity: .4;
}
.payType-box .item {
box-sizing: border-box;
border: 2rpx solid #999999;
border-radius: 8rpx;
font-size: 28rpx;
color: #999999;
height: 56rpx;
padding: 0 22rpx;
position: relative;
}
.payType-box .item.disabled {
opacity: .4;
}
.payType-box .item.active {
color: #347BFF;
border-color: #347BFF;
}
.payType-box .item .active-icon {
display: none;
width: 20rpx;
height: 20rpx;
position: absolute;
right: 0;
bottom: 0;
}
.payType-box .item.active .active-icon {
display: block;
}
.goods-box .goods {
height: 118rpx;
border-bottom: 2rpx solid rgba(195, 195, 195, .3);
display: flex;
align-items: center;
padding: 0 28rpx 0 90rpx;
justify-content: space-between;
font-size: 28rpx;
position: relative;
}
.goods .icon {
position: absolute;
top: 50%;
left: 40rpx;
width: 40rpx;
height: 40rpx;
transform: translateY(-50%);
}
.goods-box .goods .name {
color: #FF6601;
width: 306rpx;
}
.goods-box .goods .price-box {
display: flex;
align-items: center;
justify-content: space-between;
max-width: calc(100% - 436rpx);
min-width: 104rpx;
}
.goods-box .goods .price {
max-width: 80%;
min-width: 104rpx;
height: 44rpx;
border: 2rpx solid #C3C3C3;
border-radius: 8rpx;
}
.goods-box .goods .price input {
width: 100%;
height: 100%;
text-align: center;
min-height: 100%;
font-size: 28rpx;
}
.goods-box .goods .price input.error {
color: red;
}
.goods-box .goods.total-box {
padding: 0 40rpx;
}
.goods-box .goods .total {
color: #F24724;
}
.btns {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
/* padding: 10rpx 32rpx; */
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
z-index: 99;
flex-direction: column;
}
.btns-con {
box-sizing: border-box;
display: flex;
padding: 10rpx 0;
}
.tipsIcon,
.closeIcon {
width: 32rpx;
height: 32rpx;
}
.btns .btns-con view {
border: 2rpx solid #0075F9;
border-radius: 12rpx;
height: 80rpx;
box-sizing: border-box;
}
.btns .save,
.confirm {
border: 2rpx solid #0075F9;
border-radius: 12rpx;
height: 80rpx;
box-sizing: border-box;
}
.btns .save {
width: 186rpx;
margin-right: 20rpx;
color: #347BFF;
margin-right: 20rpx;
}
.btns .confirm {
width: 480rpx;
color: #fff;
background-color: #347BFF;
}
.btns .save.disabled {
border: 1px solid #DCDEE0;
color: #c0c0cc;
}
.btns .tips {
box-sizing: border-box;
display: flex;
justify-content: space-between;
/* align-items: center; */
padding: 20rpx;
font-weight: 500;
background: #EFF5FE;
height: 72rpx;
width: 100%;
color: #347BFF;
font-size: 24rpx;
}
.tips .contentText {
margin-left: 20rpx;
margin-right: auto;
display: flex;
font-weight: 500;
flex-direction: column;
justify-content: space-between;
}
...@@ -65,13 +65,20 @@ Component({ ...@@ -65,13 +65,20 @@ Component({
value: 'avgQuotationPrice', value: 'avgQuotationPrice',
icon: 'icon_11', icon: 'icon_11',
unit: true unit: true
}, {
label: '报价单量',
value: 'totalOrderCount',
icon: 'icon_4'
}, {
label: '成交单量',
value: 'totalSuccessOrderCount',
icon: 'icon_7'
}], }],
menuList: [{ menuList: [{
menuText: '新建工单', menuText: '新建工单',
icon: 'create_order', icon: 'create_order',
path: '' path: ''
} }],
],
loginRoleLabel: { loginRoleLabel: {
1: '超管', 1: '超管',
2: '商户管理员', 2: '商户管理员',
...@@ -95,7 +102,7 @@ Component({ ...@@ -95,7 +102,7 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
onLoad (){ onLoad() {
this.setData({ this.setData({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {}, storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
userInfo: wx.$util.getUserInfo() || {} userInfo: wx.$util.getUserInfo() || {}
...@@ -115,19 +122,17 @@ Component({ ...@@ -115,19 +122,17 @@ Component({
code, code,
message message
} = res } = res
let data = res.data ? let data = res.data ? {
{
...res.data, ...res.data,
todayTurnover: res.data.todayTurnover ? ((res.data.todayTurnover / 100).toFixed(2) + '').split('.')[0] : '0', todayTurnover: res.data.todayTurnover ? ((res.data.todayTurnover / 100).toFixed(2) + '').split('.')[0] : '0',
todayTurDecimal: res.data.todayTurnover ? ((res.data.todayTurnover / 100).toFixed(2) + '').split('.')[1] : '00', todayTurDecimal: res.data.todayTurnover ? ((res.data.todayTurnover / 100).toFixed(2) + '').split('.')[1] : '00',
// totalTurnover: res.data.totalTurnover ? (Math.round()(res.data.totalTurnover / 100).toFixed(2) + '').split('.')[0] : '0', // totalTurnover: res.data.totalTurnover ? (Math.round()(res.data.totalTurnover / 100).toFixed(2) + '').split('.')[0] : '0',
totalTurnover: res.data.totalTurnover ? Math.round(res.data.totalTurnover / 100):'0', totalTurnover: res.data.totalTurnover ? Math.round(res.data.totalTurnover / 100) : '0',
totalTurDecimal: res.data.totalTurnover ? ((res.data.totalTurnover / 100).toFixed(2) + '').split('.')[1] : '00', totalTurDecimal: res.data.totalTurnover ? ((res.data.totalTurnover / 100).toFixed(2) + '').split('.')[1] : '00',
monthTurnover: res.data.monthTurnover ? ((res.data.monthTurnover / 100).toFixed(2) + '').split('.')[0] : '0', monthTurnover: res.data.monthTurnover ? ((res.data.monthTurnover / 100).toFixed(2) + '').split('.')[0] : '0',
// monthTurnover: 12233, // monthTurnover: 12233,
// monthTurDecimal: res.data.monthTurnover ? ((res.data.monthTurnover / 100).toFixed(2) + '').split('.')[1] : '00' // monthTurDecimal: res.data.monthTurnover ? ((res.data.monthTurnover / 100).toFixed(2) + '').split('.')[1] : '00'
} : } : {}
{}
if (code == '0') { if (code == '0') {
this.setData({ this.setData({
statisticsObj: data statisticsObj: data
...@@ -141,32 +146,39 @@ Component({ ...@@ -141,32 +146,39 @@ Component({
getData() { getData() {
// const userInfo = wx.$util.getUserInfo() // const userInfo = wx.$util.getUserInfo()
const { dataActive,merchantId } = this.data const {
dataActive,
merchantId
} = this.data
let today = new Date() let today = new Date()
let thisMonth = new Date(new Date().setDate(1)).format('yyyy-MM-dd') let thisMonth = new Date(new Date().setDate(1)).format('yyyy-MM-dd')
const dataobj = { const dataobj = {
today:{ today: {
startTime:today.format('yyyy-MM-dd') + ' 00:00:00', startTime: today.format('yyyy-MM-dd') + ' 00:00:00',
endTime: today.format('yyyy-MM-dd') + ' 23:59:59', endTime: today.format('yyyy-MM-dd') + ' 23:59:59',
}, },
month:{ month: {
startTime:thisMonth + ' 00:00:00', startTime: thisMonth + ' 00:00:00',
endTime: today.format('yyyy-MM-dd') + ' 23:59:59', endTime: today.format('yyyy-MM-dd') + ' 23:59:59',
}, },
total:{ total: {
startTime:'', startTime: '',
endTime: '', endTime: '',
} }
} }
outputValueStatistics({ outputValueStatistics({
...dataobj[dataActive], ...dataobj[dataActive],
}).then(res => { }).then(res => {
let { code, data, message } = res let {
code,
data,
message
} = res
if (code == 0) { if (code == 0) {
data.conversionRate = NP.times(data.conversionRate,100) data.conversionRate = NP.times(data.conversionRate, 100)
data.avgPrice = NP.divide(data.avgPrice,100) data.avgPrice = NP.divide(data.avgPrice, 100)
data.avgPrice = NP.round(data.avgPrice, 0 ) data.avgPrice = NP.round(data.avgPrice, 0)
data.totalOutputValue = NP.round(data.totalOutputValue, 0 ) data.totalOutputValue = NP.round(data.totalOutputValue, 0)
this.setData({ this.setData({
staticData: data || {} staticData: data || {}
}) })
...@@ -175,8 +187,10 @@ Component({ ...@@ -175,8 +187,10 @@ Component({
} }
}) })
}, },
changeDataSelect (e) { changeDataSelect(e) {
let { name } = e.currentTarget.dataset let {
name
} = e.currentTarget.dataset
this.setData({ this.setData({
dataActive: name dataActive: name
}) })
...@@ -200,7 +214,9 @@ Component({ ...@@ -200,7 +214,9 @@ Component({
// } // }
// }, // },
navGo() { navGo() {
let { mode } = this.data let {
mode
} = this.data
wx.$router.go(mode ? 'createOrderCarQuotationSimple' : 'createOrderCarQuotation') wx.$router.go(mode ? 'createOrderCarQuotationSimple' : 'createOrderCarQuotation')
// console.log(e) // console.log(e)
// const thisPage = wx.$router.getPageInstance() // const thisPage = wx.$router.getPageInstance()
......
// 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.setData({
searchObj: {},
keyword: ''
}, () => {
this.search() 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 {
......
// const api = wx.$request
import api from '~/utils/request/request.js'
// const api = wx.$request
module.exports = {
/**退出*/
logout() {
return api.post('dj.api.smartcarlife.logout')
},
/** 获取工位设置信息 */
getWorkSetting() {
return api.post('dj.api.smartcarlife.inviteStationSet.get')
},
/**更新工位设置 */
setWorkSetting(data) {
return api.post('dj.api.smartcarlife.inviteStationSet.update', data)
},
/** 获取我的种草总数 */
GETGRASSTOTAL(data) {
return api.post('dj.api.smartcarlife.orderShareRecord.own.count', data)
},
/** 分页查询我的种草 */
GETGRASSLIST(data) {
return api.post('dj.api.smartcarlife.orderShareRecord.own.page', data)
}
}
// components/switchPopup/switchPopup.js
const app = getApp()
import api from '~/api/api'
import { getYQorderInfo } from '~/store/index'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
value: true
// observer: function (n) {
// if (n) {
// this.checkCoupon()
// }
// }
},
title: String,
tips: String,
height: {
type: String,
value: '85%'
},
isYqdSuper: Boolean
// merchantSettingInfo: {
// type: Object,
// observer: function (n) {
// if (n) {
// this.setOrderSettingList(n)
// }
// }
// }
},
/**
* 组件的初始数据
*/
data: {
merchantSettingInfo: '',
// switchStatus: 1,
orderSettingList: [
{
label: '选择车型',
valueName: 'carTypeRequiredFlag',
value: false
},
{
label: '车架号(VIN码)',
valueName: 'standNoRequiredFlag',
value: false
},
{
label: '车牌号',
valueName: 'plateNumRequiredFlag',
value: false
},
{
label: '战败下单是否体验',
valueName: 'foEfRequiredFlag',
value: true
},
{
label: '战败下单拒升理由提交',
valueName: 'foRrRequiredFlag',
value: true
}
]
},
/** 组件生命周期 */
lifetimes: {
attached: function () {
// console.log(app.globalData.isYqdSuper)
console.log(this.data.isYqdSuper)
// app .
getYQorderInfo()
.then(merchantSettingInfo => {
console.log(merchantSettingInfo)
this.setData({ merchantSettingInfo })
this.setOrderSettingList(merchantSettingInfo)
})
.catch(err => {
console.log(err)
})
}
},
/**
* 组件的方法列表
*/
methods: {
async confirm() {
// 判断是不是园区店管理员 不是都不处理
let { isYqdSuper, merchantSettingInfo, orderSettingList } = this.data
// 是管理员请求数据 并存全局读取
if (isYqdSuper) {
let { merchantId, merchantName } = merchantSettingInfo
wx.$util.showLoading('设置中...')
let params = orderSettingList.reduce((obj, item) => {
obj[item.valueName] = item.value == true ? 'Y' : 'N'
// item
return obj
}, {})
let result = await api.setMerchantRecordingSettings({
merchantId,
merchantName,
...params
})
let { code, data } = result
if (code == 0) {
app.globalData.YQorderSetting = Object.assign(app.globalData.YQorderSetting, params)
}
wx.$util.hideLoading()
}
this.setData({
show: false
})
},
onSwitchChange(e) {
// console.log(e)
let { index } = e.currentTarget.dataset
let { orderSettingList } = this.data
// console.log(index)
orderSettingList[index]['value'] = !orderSettingList[index]['value']
// console.log(orderSettingList[index]['value'])
this.setData({
orderSettingList
})
},
setOrderSettingList(n) {
// 做转换
let { orderSettingList } = this.data
orderSettingList.forEach(element => {
// if (element.valueName == n) {
let value = n[element.valueName]
element.value = value == 'Y' ? true : false
// }
})
console.log(orderSettingList)
this.setData({
orderSettingList
})
}
}
})
{
"component": true,
"usingComponents": { "switch-block": "/components/switchBlock/switchBlock", "tab-popup": "/components/tabPopup/tabPopup" }
}
<tab-popup
show="{{show}}"
title="{{title}}"
height="{{height}}"
tips="{{tips}}"
bindconfirm="confirm">
<block
wx:for="{{orderSettingList}}"
wx:key="index"
wx:for-item="item"
wx:for-index="index">
<gl-cell
border
label="{{item.label}}"
valueAlign="right"
labelWidth="240rpx">
<!-- <switchBlock/> -->
<switch-block
switchStatus="{{item.value}}"
disable="{{isYqdSuper}}"
bindswitchEvent="onSwitchChange"
data-index="{{index}}" />
<!-- <view class="gender-box">
<view class="block text-center {{orderObj.customer.customerSex==1?'':'right'}}" />
<view class="male text-center {{orderObj.customer.customerSex == 1?'active':''}}" bindtap="changeGender" data-gender="1">
男
</view>
<view class="woman text-center {{orderObj.customer.customerSex == 2?'active':''}}" bindtap="changeGender" data-gender="2">
女
</view>
</view> -->
</gl-cell>
</block>
</tab-popup>
/* components/switchPopup/switchPopup.wxss */
\ No newline at end of file \ No newline at end of file
// tabComponents/pages/index/index.js // tabComponents/pages/index/index.js
import api from '../../api.js' import api from '../../api.js'
const app = getApp() const app = getApp()
import constantData from '../../../pages/constant/data' import constantData from '~/pages/constant/data'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/'
Page({ Page({
/** /**
...@@ -11,8 +11,7 @@ Page({ ...@@ -11,8 +11,7 @@ Page({
IMG_URL, IMG_URL,
navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;', navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;',
workCount: 0, workCount: 0,
workItem: [ workItem: [{
{
label: '上午 09:00-10:30', label: '上午 09:00-10:30',
startTime: '09:00', startTime: '09:00',
endTime: '10:30', endTime: '10:30',
...@@ -51,19 +50,32 @@ Page({ ...@@ -51,19 +50,32 @@ Page({
tips: '设置录单时客户信息的必填项。' tips: '设置录单时客户信息的必填项。'
}, },
isYqdSuper: '', isYqdSuper: '',
loginRoleLabel:{ loginRoleLabel: {
1:'超管', 1: '超管',
2:'商户管理员', 2: '商户管理员',
3:'区域督导', 3: '区域督导',
4:'驻店负责人' 4: '驻店负责人'
}, },
selectedSceneName: '', selectedSceneName: '',
selectedSceneDesc: '', selectedSceneDesc: '',
versionData: {} versionData: {}
}, },
goReservationCouponPage() {
wx.$router.go('tabMine.collectCoupons')
},
goTechnicianSetupPage() {
wx.$router.go('tabMine.technicianSetup')
},
goConstructSetupPage() {
wx.$router.go('tabMine.completeBuild')
},
changeSwitch(e) { changeSwitch(e) {
let { value } = e.detail let {
let { target } = e.currentTarget.dataset value
} = e.detail
let {
target
} = e.currentTarget.dataset
this.setData({ this.setData({
[target]: value [target]: value
}) })
...@@ -77,18 +89,25 @@ Page({ ...@@ -77,18 +89,25 @@ Page({
}, },
noScroll() {}, noScroll() {},
showWork() { showWork() {
let { showWorkBox } = this.data let {
showWorkBox
} = this.data
this.setData({ this.setData({
showWorkBox: !showWorkBox showWorkBox: !showWorkBox
}) })
}, },
addWorkCount(e) { addWorkCount(e) {
let { count, index } = e.currentTarget.dataset let {
count,
index
} = e.currentTarget.dataset
let type = e.type let type = e.type
let { let {
workItem, workItem,
touchEnd, touchEnd,
userInfo: { userType } userInfo: {
userType
}
} = this.data } = this.data
if (userType == 2) return if (userType == 2) return
let value = workItem[index].maxCount let value = workItem[index].maxCount
...@@ -134,7 +153,9 @@ Page({ ...@@ -134,7 +153,9 @@ Page({
workItem, workItem,
saturdayFlag, saturdayFlag,
sundayFlag, sundayFlag,
userInfo: { userType } userInfo: {
userType
}
} = this.data } = this.data
if (userType == 2) { if (userType == 2) {
this.showWork() this.showWork()
...@@ -151,7 +172,10 @@ Page({ ...@@ -151,7 +172,10 @@ Page({
}) })
.then(res => { .then(res => {
wx.hideLoading() wx.hideLoading()
let { code, message } = res let {
code,
message
} = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
showWorkBox: false showWorkBox: false
...@@ -176,7 +200,10 @@ Page({ ...@@ -176,7 +200,10 @@ Page({
}) })
_this.showLoading() _this.showLoading()
api.logout().then(_res_ => { api.logout().then(_res_ => {
let { code, message } = _res_ let {
code,
message
} = _res_
if (code == 0) { if (code == 0) {
app.login(false) app.login(false)
} else { } else {
...@@ -191,11 +218,19 @@ Page({ ...@@ -191,11 +218,19 @@ Page({
}) })
}, },
getWorkSetting() { getWorkSetting() {
let { workItem, saturdayFlag, sundayFlag } = this.data let {
workItem,
saturdayFlag,
sundayFlag
} = this.data
let workCount = 0 let workCount = 0
api.getWorkSetting().then(res => { api.getWorkSetting().then(res => {
wx.hideLoading() wx.hideLoading()
let { code, data, message } = res let {
code,
data,
message
} = res
if (code == 0) { if (code == 0) {
if (data?.length > 0) { if (data?.length > 0) {
data.map((e, index) => { data.map((e, index) => {
...@@ -217,7 +252,9 @@ Page({ ...@@ -217,7 +252,9 @@ Page({
}) })
}, },
init() { init() {
let { userInfo } = this.data let {
userInfo
} = this.data
// console.log(userInfo) // console.log(userInfo)
// 兼容ios IOS只识别2017/01/01这种格式 // 兼容ios IOS只识别2017/01/01这种格式
// console.log(userInfo.createdDate) // console.log(userInfo.createdDate)
...@@ -282,7 +319,7 @@ Page({ ...@@ -282,7 +319,7 @@ Page({
this.setData({ this.setData({
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName, selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName,
selectedSceneDesc:constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc
}) })
this.getVersionInfo() this.getVersionInfo()
// console.log(app.globalData.isYqdSuper) // console.log(app.globalData.isYqdSuper)
......
...@@ -69,7 +69,23 @@ ...@@ -69,7 +69,23 @@
<view class="set_tips">最新{{versionData.version}}版</view> <view class="set_tips">最新{{versionData.version}}版</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode=""/> <image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode=""/>
</view> </view>
<view class="set_item item_5" bindtap="goReservationCouponPage">
<view class="title">领券预约<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<view class="set_tips">设置接待电话</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_5.png" mode=""/>
</view> </view>
<view class="set_item item_6" bindtap="goTechnicianSetupPage">
<view class="title">技师设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<view class="set_tips">设置园区店技师</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_6.png" mode=""/>
</view>
<view class="set_item item_7" bindtap="goConstructSetupPage">
<view class="title">完成施工<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<view class="set_tips">设置施工完成上传图片</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_7.png" mode=""/>
</view>
</view>
<!-- <view class="version_box" bindtap="goVersionPage"> <!-- <view class="version_box" bindtap="goVersionPage">
<view class="item"> <view class="item">
<view class="icon_box"> <view class="icon_box">
...@@ -79,8 +95,11 @@ ...@@ -79,8 +95,11 @@
</view> </view>
</view> --> </view> -->
</block> </block>
<view class="logout-box">
<view class="logout text-center" bindtap="logout">退出账号</view> <view class="logout text-center" bindtap="logout">退出账号</view>
</view> </view>
</view>
</block> </block>
<block wx:if="{{showWorkBox}}"> <block wx:if="{{showWorkBox}}">
<view class="work-box" catchtouchmove="noScroll"> <view class="work-box" catchtouchmove="noScroll">
......
/* tabComponents/pages/index/index.wxss */ /* tabComponents/pages/index/index.wxss */
.main { .main {
padding-bottom: 80rpx;
background: #FFFFFF;
} }
.bg { .bg {
...@@ -185,6 +186,15 @@ ...@@ -185,6 +186,15 @@
.set_box .item_4{ .set_box .item_4{
background: #FFF8F8; background: #FFF8F8;
} }
.set_box .item_5{
background: #FFFCF7;
}
.set_box .item_6{
background: #F8FFFD;
}
.set_box .item_7{
background: #F6FCFE;
}
.set_box .set_item .title{ .set_box .set_item .title{
font-weight: 500; font-weight: 500;
...@@ -389,11 +399,16 @@ ...@@ -389,11 +399,16 @@
opacity: .5; opacity: .5;
} }
.logout-box{
display: flex;
justify-content: center;
}
.logout { .logout {
position: fixed; /* position: fixed;
bottom: 106rpx; bottom: 106rpx;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%); */
width: 326rpx; width: 326rpx;
height: 80rpx; height: 80rpx;
background: #FFFFFF; background: #FFFFFF;
......
...@@ -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 {
......
...@@ -4,101 +4,48 @@ ...@@ -4,101 +4,48 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "", "name": "权益列表",
"pathName": "pages/wxLogin/wxLogin", "pathName": "packageEquity/pages/TabBar/equityPage",
"query": "scene=sceneId%3D133329",
"launchMode": "default",
"scene": 1047
},
{
"name": "",
"pathName": "pages/wxLogin/wxLogin",
"query": "scene=sceneId%3D133329",
"launchMode": "default",
"scene": 1047
},
{
"name": "",
"pathName": "pages/accountItems/accountItems",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/wxLogin/wxLogin",
"query": "noLogin=18902454301&sence=2",
"launchMode": "default",
"scene": 1047
},
{
"name": "战败下单",
"pathName": "tabWorkOrder/pages/defeatOrder/defeatOrder",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "1.1 订单列表",
"pathName": "pages/tabWorkOrder/pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "2.1订单下单",
"pathName": "packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "2.1 订单支付", "name": "领券预约",
"pathName": "packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay", "pathName": "tabMine/pages/collectCoupons/collectCoupons",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "2.1 列表", "name": "个人中心",
"pathName": "packageEquity/pages/TabBar/equityPage", "pathName": "pages/tabMine/pages/index/index",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "2.1 支付", "name": "个人中心",
"pathName": "packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay", "pathName": "pages/tabMine/pages/index/index",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "选择账号", "name": "技师设置",
"pathName": "pages/accountItems/accountItems", "pathName": "tabMine/pages/technicianSetup/technicianSetup",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "login", "name": "1.1 列表",
"pathName": "pages/wxLogin/wxLogin", "pathName": "pages/tabWorkOrder/pages/index/index",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "订单详情",
"pathName": "tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail",
"query": "orderCode=2206221654033208",
"launchMode": "default",
"scene": null
} }
] ]
} }
},
"libVersion": "3.0.0",
"setting": {
"urlCheck": false
} }
} }
\ No newline at end of file \ No newline at end of file
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')
...@@ -345,3 +348,33 @@ export const getYQList = () => { ...@@ -345,3 +348,33 @@ export const getYQList = () => {
} }
}) })
} }
/** 获取服务商是否使用膜卷号 */
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)
......
...@@ -15,13 +15,58 @@ module.exports = { ...@@ -15,13 +15,58 @@ module.exports = {
return api.post('dj.api.smartcarlife.inviteStationSet.update', data) return api.post('dj.api.smartcarlife.inviteStationSet.update', data)
}, },
/** 获取我的种草总数 */ // /** 获取我的种草总数 */
GETGRASSTOTAL(data) { // GETGRASSTOTAL(data) {
return api.post('dj.api.smartcarlife.orderShareRecord.own.count', data) // return api.post('dj.api.smartcarlife.orderShareRecord.own.count', data)
// },
// /** 分页查询我的种草 */
// GETGRASSLIST(data) {
// return api.post('dj.api.smartcarlife.orderShareRecord.own.page', data)
// },
// 分页查询技师列表
getTechnicianList(data) {
return api.post('dj.api.smartcarlife.staff.findStaffByPage', data)
},
// 新增技师信息
addTechnician(data) {
return api.post('dj.api.smartcarlife.technicianConfig.add', data)
},
// 修改技师信息
updateTechnician(data) {
return api.post('dj.api.smartcarlife.technicianConfig.update', data)
},
// 删除技师
deleteTechnician(data) {
return api.post('dj.api.smartcarlife.technicianConfig.delete', data)
}, },
/** 分页查询我的种草 */ /** 分页查询我的种草 */
GETGRASSLIST(data) { GETGRASSLIST(data) {
return api.post('dj.api.smartcarlife.orderShareRecord.own.page', data) return api.post('dj.api.smartcarlife.orderShareRecord.own.page', data)
},
/** 获取商户配置 */
getMerchantConfiguration(data) {
return api.post('dj.api.scenemerchantref.getMerchantConfiguration', data)
},
/** 配置修改 */
updateSignatureConfiguration(data) {
return api.post('dj.api.scenemerchantref.updateSignatureConfiguration', data)
},
/** 获取领劵预约设置 */
getReservationConfig(data) {
return api.post('dj.api.smartcarlife.reservation.phone.number.config.get', data)
},
/** 更新领劵预约设置 */
updateReservationConfig(data) {
return api.post('dj.api.smartcarlife.reservation.phone.number.config.update', data)
} }
} }
\ No newline at end of file \ No newline at end of file
// tabMine/pages/collectCoupons/collectCoupons.js
import api from '../../api.js'
import {
ImgUrl
} from '~/config';
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
info: {},
IMG_URL: ImgUrl,
isYqdSuper: '',
tipsProps: {
tipsText: '设置的电话将作为客户领券时在界面中显示为可拨打电话',
showTips: true,
type: 1
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getReservationConfig()
this.setData({
isYqdSuper: app.globalData.isYqdSuper,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
// 获取领劵预约设置
getReservationConfig() {
let {
info
} = this.data
let {
merchantId
} = wx.$util.getUserInfo()
api.getReservationConfig({
merchantId
}).then(res => {
let {
code,
data
} = res
if (code == '0') {
info = data
info.yqMerchantEnableFlag = data.yqMerchantEnableFlag == 'Y' ? true : false
info.shopMerchantEnableFlag = data.shopMerchantEnableFlag == 'Y' ? true : false
console.log('data', data);
} else {
this.showToast(message)
}
this.setData({
info
})
})
},
//设置园区店集中接待电话
changeYQSwitch(e) {
console.log('e', e);
let {
userInfo
} = this.data
if (userInfo.userType == 2) return
let {
value
} = e.detail
let {
target
} = e.currentTarget.dataset
this.setData({
[target]: value
})
//园区店和单店接待电话只能开启其一
if (value) {
this.setData({
'info.shopMerchantEnableFlag': false
})
}
},
//设置单店驻店接待电话
change4sSwitch(e) {
console.log('e', e);
let {
userInfo
} = this.data
if (userInfo.userType == 2) return
let {
value
} = e.detail
let {
target
} = e.currentTarget.dataset
this.setData({
[target]: value
})
//园区店和单店接待电话只能开启其一
if (value) {
this.setData({
'info.yqMerchantEnableFlag': false
})
}
},
input(e) {
let {
value
} = e.detail
let {
name
} = e.currentTarget.dataset
console.log('e', e);
this.setData({
[name]: value
})
},
submitContactInfo() {
let {
info,
userInfo
} = this.data
console.log('info', info);
if (userInfo.userType == 2) return
if (!info.contactName) {
return wx.$util.showToast('请输入姓名')
}
const phoneRex = /^[1]([3-9])[0-9]{9}$/
if (!info.contactPhoneNumber || !phoneRex.test(info.contactPhoneNumber)) {
return wx.$util.showToast('请输入正确手机号')
}
info.isEdit = false
this.setData({
info
})
},
editYQInfo() {
let {
info,
userInfo
} = this.data
if (userInfo.userType == 2) return
info.isEdit = true
this.setData({
info
})
},
shopInput(e) {
let {
value
} = e.detail
let {
name,
index
} = e.currentTarget.dataset
let {
info
} = this.data
let itemChar = `info.shopMerchantConfigList[${index}].${name}`
this.setData({
[itemChar]: value.trim()
})
},
editShopInfo(e) {
let {
userInfo
} = this.data
if (userInfo.userType == 2) return
let {
index
} = e.currentTarget.dataset
this.setData({
[`info.shopMerchantConfigList[${index}].isEdit`]: true
})
},
submitShopInfo(e) {
let {
index
} = e.currentTarget.dataset
let {
info,
userInfo
} = this.data
if (userInfo.userType == 2) return
if (!info.shopMerchantConfigList[index].contactName) {
return wx.$util.showToast('请输入姓名')
}
const phoneRex = /^[1]([3-9])[0-9]{9}$/
if (!info.shopMerchantConfigList[index].contactPhoneNumber || !phoneRex.test(info.shopMerchantConfigList[index].contactPhoneNumber)) {
return wx.$util.showToast('请输入正确手机号')
}
info.shopMerchantConfigList[index].isEdit = false
this.setData({
info
})
},
submit() {
let {
info,
userInfo
} = this.data
if (userInfo.userType == 2) return
let params = {}
let config = wx.$util.deepClone(info)
if (config.isEdit) {
return wx.$util.showToast('请点击确认园区店信息后提交')
}
if (config.shopMerchantConfigList.length > 0) {
if (config.shopMerchantConfigList.some(item => item.isEdit)) {
return wx.$util.showToast('请点击确认单店信息后提交')
}
}
config.yqMerchantEnableFlag = config.yqMerchantEnableFlag ? 'Y' : 'N'
config.shopMerchantEnableFlag = config.shopMerchantEnableFlag ? 'Y' : 'N'
let {
id,
createdBy,
createdDate,
updatedBy,
updatedDate,
deletedFlag,
...newConfig
} = config;
console.log('newConfig', newConfig);
newConfig.shopMerchantConfigList = newConfig.shopMerchantConfigList.map(item => {
return {
shopMerchantId: item.shopMerchantId,
contactName: item.contactName,
contactPhoneNumber: item.contactPhoneNumber
}
})
params.config = newConfig
console.log('params', params);
wx.$util.showLoading('加载中')
api.updateReservationConfig(params).then((res) => {
wx.hideLoading()
console.log(res, 'res');
let {
code,
data,
message
} = res
if (code == 0) {
wx.$util.showToast('修改成功')
} else {
wx.$util.showToast(message)
}
}).catch((err) => {
});
}
})
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "领劵预约",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabMine/pages/collectCoupons/collectCoupons.wxss */
page {
background-color: #F7F8FA;
transition: none !important;
/* position: relative; */
}
.main {
padding: 0 20rpx 136rpx;
}
.isFullSucreen {
padding-bottom: 185rpx !important;
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.switch-v {
margin: 20rpx;
background: #FFFFFF;
// box-shadow: 0 4rpx 20rpx 0 #0000001a;
border-radius: 16rpx;
box-sizing: border-box;
width: 710rpx;
height: 88rpx;
background-color: #F7F8FA;
display: flex;
align-items: center;
justify-content: space-between;
// padding: 0 40rpx;
}
.switch-v .label {
width: 308rpx;
height: 40rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #292D33;
letter-spacing: 0;
}
.switch-v switch {
padding-right: 52rpx;
zoom: .8;
}
.setItem {
width: 710rpx;
height: 264rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 20rpx 0 0 20rpx;
position: relative;
&::before {
position: absolute;
left: 0rpx;
top: 42rpx;
content: '';
width: 4rpx;
height: 24rpx;
background: #347BFF;
border-radius: 0 4rpx 4rpx 0;
}
.item-label {
// width: 224rpx;
height: 44rpx;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 32rpx;
color: #292D33;
line-height: 44rpx;
padding: 32rpx 0 0 32rpx;
}
.input-item {
// width: 670rpx;
// height: 124rpx;
// background: #F7F8FA;
// border-radius: 16rpx;
// padding: 32rpx 0 0 12rpx;
box-sizing: border-box;
width: 670rpx;
height: 124rpx;
background: #F7F8FA;
border-radius: 16rpx;
margin: 32rpx auto 20rpx;
}
.techicianInfoEdit {
box-sizing: border-box;
padding: 0 24rpx 0 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
// .icon-delete {
// width: 28rpx;
// height: 28rpx;
// }
.name {
box-sizing: border-box;
width: 200rpx;
height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #DEE0E3;
border-radius: 12rpx;
}
.phone {
box-sizing: border-box;
width: 280rpx;
height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #DEE0E3;
border-radius: 12rpx;
margin-left: 15rpx;
margin-right: auto;
}
.btn {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #347BFF;
}
}
.techicianInfo {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18rpx 32rpx;
.left {
.label {
display: flex;
.name {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 28rpx;
color: #292D33;
margin-right: 10rpx;
}
// .position {
// font-family: PingFangSC-SNaNrpxibold;
// font-weight: 600;
// font-size: 20rpx;
// background: #EAF1FF;
// border: 1rpx solid #347bff80;
// padding: 4rpx 16rpx;
// font-family: PingFangSC-SNaNrpxibold;
// font-weight: 600;
// font-size: 20rpx;
// color: #347BFF;
// }
}
.phone {
margin-top: 10rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #292D33;
}
}
.icon-edit {
width: 32rpx;
height: 32rpx;
}
}
}
.itemOP {
opacity: 0.5;
pointer-events: none;
}
.disabled {
opacity: .5;
}
.btns {
position: fixed;
/* position: absolute; */
width: 100%;
left: 0;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
z-index: 99;
transition: none !important;
/* padding-bottom: 34px !important; */
padding-bottom: 10rpx;
}
.btns-con {
box-sizing: border-box;
display: flex;
padding: 20rpx 0 0 32rpx;
}
.btns .confirm {
border: 2rpx solid #0075F9;
border-radius: 12rpx;
height: 80rpx;
box-sizing: border-box;
font-weight: 600;
}
.btns .confirm {
width: 686rpx;
height: 80rpx;
color: #fff;
background-color: #347BFF;
border-radius: 12rpx;
}
.input {
// text-align: right;
font-size: 28rpx;
padding: 0 24rpx;
}
.placeholder-class {
color: #BEC1C7;
}
.contentText {
font-size: 28rpx;
}
\ No newline at end of file \ No newline at end of file
<!--tabMine/pages/collectCoupons/collectCoupons.wxml-->
<view class="main {{isFullSucreen?'isFullSucreen':''}}">
<view class="switch-v">
<view class="label">设置园区店集中接待电话</view>
<switch color="#347BFF" class=" {{userInfo.userType == 2 ?'disabled':''}}" disabled="{{!isYqdSuper}}" checked="{{info.yqMerchantEnableFlag}}" bindchange="changeYQSwitch" data-target="info.yqMerchantEnableFlag" />
</view>
<view class="setItem {{info.yqMerchantEnableFlag?'':'itemOP'}}">
<view class="item-label">{{info.yqMerchantName}}</view>
<view class="input-item techicianInfoEdit" wx:if="{{info.isEdit}}">
<input placeholder="接待联系人" class="input name" placeholder-class="placeholder-class" maxlength="16" value="{{ info.contactName }}" bindinput="input" data-name="info.contactName" always-embed></input>
<input placeholder="联系人手机号" class="input phone" type="number" maxlength="11" placeholder-class="placeholder-class" value="{{ info.contactPhoneNumber }}" bindinput="input" data-name="info.contactPhoneNumber" always-embed></input>
<view class="btn" bind:tap="submitContactInfo">确认</view>
</view>
<view class="input-item techicianInfo" wx:else>
<view class="left">
<view class="label">
<view class="name">{{info.contactName}}</view>
</view>
<view class="phone">手机号 {{info.contactPhoneNumber}}</view>
</view>
<image class="icon-edit" bind:tap="editYQInfo" src="{{IMG_URL}}/miniProgram/grayEditIcon.png" />
</view>
</view>
<view class="switch-v">
<view class="label">设置单店驻店接待电话</view>
<switch color="#347BFF" class=" {{userInfo.userType == 2 ?'disabled':''}}" disabled="{{!isYqdSuper}}" checked="{{info.shopMerchantEnableFlag}}" bindchange="change4sSwitch" data-target="info.shopMerchantEnableFlag" />
</view>
<block wx:for="{{info.shopMerchantConfigList}}" wx:key="index">
<view class="setItem {{info.shopMerchantEnableFlag?'':'itemOP'}}">
<view class="item-label">{{item.shopMerchantName}}</view>
<view class="input-item techicianInfoEdit" wx:if="{{item.isEdit}}">
<input placeholder="接待联系人" class="input name" placeholder-class="placeholder-class" maxlength="16" data-index="{{index}}" value="{{ item.contactName }}" bindinput="shopInput" data-name="contactName" always-embed></input>
<input placeholder="联系人手机号" class="input phone" type="number" maxlength="11" placeholder-class="placeholder-class" data-index="{{index}}" value="{{ item.contactPhoneNumber }}" bindinput="shopInput" data-name="contactPhoneNumber" always-embed></input>
<view class="btn" bind:tap="submitShopInfo" data-index="{{index}}">确认</view>
</view>
<view class="input-item techicianInfo" wx:else>
<view class="left">
<view class="label">
<view class="name">{{item.contactName}}</view>
</view>
<view class="phone">手机号 {{item.contactPhoneNumber}}</view>
</view>
<image class="icon-edit" bind:tap="editShopInfo" data-index="{{index}}" src="{{IMG_URL}}/miniProgram/grayEditIcon.png" />
</view>
</view>
</block>
</view>
<view class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
<tips-bottom custom-class="tips" style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
<view class="btns-con">
<view class="confirm text-center {{userInfo.userType == 2 ?'disabled':''}}" bindtap="submit">批量提交</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// tabMine/pages/completeBuild/completeBuild.js
import api from '../../api.js'
import {
ImgUrl
} from '~/config';
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL: ImgUrl,
isYqdSuper: '',
tipsProps: {
tipsText: '小程序下单后,驻店员工需让客户在订单中签名确认订单,才可完结为最终施工单',
showTips: true,
type: 1
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getMerchantConfiguration()
this.setData({
isYqdSuper: app.globalData.isYqdSuper,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
// 获取商户配置
getMerchantConfiguration() {
let {
saturdayFlag
} = this.data
let {
shopMerchantId: merchantId
} = wx.$util.getUserInfo()
api.getMerchantConfiguration({
merchantId,
sceneType: '1'
}).then(res => {
let {
code,
data
} = res
if (code == '0') {
if (data) {
saturdayFlag = data.signatureSwitch ? true : false
}
} else {
this.showToast(message)
}
this.setData({
saturdayFlag
})
})
},
//是否开启电子签名
changeSwitch(e) {
let {
userInfo
} = this.data
if (userInfo.userType == 2) return
console.log('e', e);
let {
value
} = e.detail
let {
target
} = e.currentTarget.dataset
this.setData({
[target]: value
})
this.updateSignatureConfiguration()
},
// 修改配置
updateSignatureConfiguration() {
let {
saturdayFlag
} = this.data
let {
shopMerchantId: merchantId
} = wx.$util.getUserInfo()
let signatureSwitch = saturdayFlag ? 1 : 0
api.updateSignatureConfiguration({
merchantId,
sceneType: '1',
signatureSwitch
}).then(res => {
let {
code,
data
} = res
if (code == '0') {
console.log('data', data);
} else {
this.showToast(message)
}
})
},
})
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "完成施工",
"component": true,
"usingComponents": { "switch-block": "/components/switchBlock/switchBlock", "tab-popup": "/components/tabPopup/tabPopup" }
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/createArchives/createArchives.wxss */
page {
background-color: rgb(246, 247, 247);
transition: none !important;
/* position: relative; */
}
.main {
padding: 0 0rpx 136rpx;
/* padding: 0 0 136rpx; */
}
.isFullSucreen {
padding-bottom: 185rpx !important;
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.box {
// height: calc(100% - 180rpx);
// /* background: #FFFFFF; */
// background-color: #F8F9F9;
// /* background-color: rgb(246, 247, 247); */
// /* box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.10); */
// /* border-radius: 16rpx; */
// overflow: hidden;
margin: 20rpx 0 0 20rpx;
width: 710rpx;
height: 782rpx;
background: #FFFFFF;
border-radius: 16rpx;
}
.box .box-label {
width: 336rpx;
height: 40rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #292D33;
letter-spacing: 0;
padding: 32rpx 0 30rpx 32rpx;
}
.box .box-img {
width: 670rpx;
height: 648rpx;
background: #F7F8FA;
border-radius: 16rpx;
// padding: 30rpx 0 0 20rpx;
padding-left: 20rpx;
}
.select_img {
width: 592rpx;
height: 608rpx;
padding: 20rpx 0 0 40rpx;
}
.createData {
margin: 20rpx;
background: #FFFFFF;
// box-shadow: 0 4rpx 20rpx 0 #0000001a;
border-radius: 16rpx;
box-sizing: border-box;
/* width: calc(100% + 40rpx); */
width: calc(100% - 40rpx);
/* transform: translateX(-20rpx); */
height: 120rpx;
background-color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 32rpx;
}
.createData .label {
width: 480rpx;
height: 44rpx;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 32rpx;
color: #292D33;
line-height: 44rpx;
}
.createData switch {
zoom: .8;
}
.btns {
position: fixed;
/* position: absolute; */
width: 100%;
left: 0;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
z-index: 99;
transition: none !important;
/* padding-bottom: 34px !important; */
padding-bottom: 10rpx;
}
.btn-box .tips {
display: flex;
justify-content: center;
align-items: center;
/* height: 75rpx; */
font-weight: 600;
background-color: #EFF5FE;
}
.tips {
box-sizing: border-box;
padding: 16rpx;
background-color: #F8F9F9;
color: #999999;
text-align: center;
width: 100%;
font-size: 24rpx;
}
.tips .contentText {
margin-left: 20rpx;
margin-right: auto;
display: flex;
font-weight: 500;
flex-direction: column;
justify-content: space-between;
}
.disabled {
opacity: .5;
}
\ No newline at end of file \ No newline at end of file
<!--tabMine/pages/completeBuild/completeBuild.wxml-->
<block>
<view class="main {{isFullSucreen?'isFullSucreen':'' }} {{showTips?'fullSucreen-tips':'' }}" style="height:calc(100vh - {{isFullSucreen?(34+71.5) : 71.5}}px);">
<view class="createData">
<view class="label">是否开启客户电子签名及评分选项</view>
<switch class=" {{userInfo.userType == 2 ?'disabled':''}}" color="#347BFF" disabled="{{!isYqdSuper}}" checked="{{saturdayFlag}}" bindchange="changeSwitch" data-target="saturdayFlag" />
</view>
<view class="box">
<view class="box-label">客户电子签名及施工页面:</view>
<view class="box-img">
<image class='select_img' src='{{IMG_URL}}/example01.png'></image>
</view>
</view>
</view>
</block>
<view class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
</view>
\ No newline at end of file \ No newline at end of file
// tabMine/pages/technicianSetup/technicianSetup.js
import api from '../../api.js'
import {
ImgUrl
} from '~/config';
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL: ImgUrl,
total: -1,
pageCof: {
pageNum: 1,
pageSize: 1000
},
isAsk: false,
technicianList: [
// {
// staffName: '',
// staffPhone: '',
// isEdit: true
// }
]
},
init() {
this.getList(true)
},
addTechnicalItem() {
let {
technicianList,
userInfo
} = this.data
if (userInfo.userType == 2) return
// 默认添加离开弹框 提交成功后取消
wx.enableAlertBeforeUnload &&
wx.enableAlertBeforeUnload({
title: '温馨提示',
message: '技师信息未提交,请提交后返回',
success: function (res) {
console.log('成功:', res)
},
fail: function (err) {
console.log('失败:', err)
}
})
technicianList.unshift({
staffName: '',
staffPhone: '',
merchantId: userInfo.merchantId,
merchantName: userInfo.merchantName,
isPhone: true,
isEdit: true
})
this.setData({
technicianList
})
},
editTechicianInfo(e) {
let {
userInfo
} = this.data
if (userInfo.userType == 2) return
let {
index
} = e.currentTarget.dataset
this.setData({
[`technicianList[${index}].isEdit`]: true
})
},
submit(e) {
let {
index
} = e.currentTarget.dataset
let {
technicianList
} = this.data
let params = wx.$util.deepClone(technicianList[index])
if (!params.staffName) {
return wx.$util.showToast('请输入姓名')
}
const phoneRex = /^[1]([3-9])[0-9]{9}$/
if (!params.staffPhone || !phoneRex.test(params.staffPhone)) {
return wx.$util.showToast('请输入正确手机号')
}
params.technicianName = params.staffName
params.technicianPhone = params.staffPhone
console.log('18775035205');
wx.$util.showLoading('加载中')
// this.setData({
// [`technicianList[${index}].isEdit`]: false
// })
// return
let apiName = params.id ? 'updateTechnician' : 'addTechnician'
// debugger
api[apiName](params).then((res) => {
wx.hideLoading()
// debugger
console.log(res, 'res');
let {
code,
data,
message
} = res
if (code == 0) {
wx.$util.showToast(params.id ? '修改成功' : '新增成功')
technicianList[index].isEdit = false
this.setData({
[`technicianList[${index}].isEdit`]: false
})
// let {}
debugger
let isAllEdit = technicianList.every(item => !item.isEdit)
isAllEdit && wx.disableAlertBeforeUnload()
} else {
wx.$util.showToast(message)
}
}).catch((err) => {
});
// this.setData({
// // [`technicianList[${index}].isEdit`]:true
// })
},
deleteTechicianInfo(e) {
let {
index
} = e.currentTarget.dataset
let {
technicianList
} = this.data
const id = technicianList[index]?.id
// if (id) {
let _this = this
wx.showModal({
title: '温馨提示',
content: '是否删除该技师',
// showCancel: false,
confirmText: '确定',
confirmColor: '#347BFF',
success(res) {
if (res.confirm) {
if (!id) {
technicianList.splice(index, 1)
_this.setData({
technicianList
})
return
}
wx.$util.showLoading('加载中')
api.deleteTechnician({
id
}).then((result) => {
wx.hideLoading()
let {
code,
data,
message
} = result
if (code == 0) {
technicianList.splice(index, 1)
_this.setData({
technicianList
})
} else {
wx.$util.showToast(message)
}
}).catch((err) => {
console.log(err);
});
// _this.getDetail(orderCode)
}
}
})
// }
},
input(e) {
let {
value
} = e.detail
let {
name,
index
} = e.currentTarget.dataset
let {
technicianList
} = this.data
let itemChar = `technicianList[${index}].${name}`
this.setData({
[itemChar]: value.trim()
})
},
getList(isReset = false) {
// let user
let {
technicianList,
pageCof,
total,
userInfo,
isAsk
} = this.data
console.log(userInfo, 'userInfo');
let _this = this
if (total == technicianList.length || isAsk) {
return true
}
let params = {
...pageCof,
status: 0,
merchantNoList: [userInfo.merchantId],
// roleName: '技师'
staffBusinessType: 1
}
this.setData({
isAsk: true
})
api.getTechnicianList(params).then(res => {
let {
data,
count
} = res.data
this.setData({
technicianList: pageCof.pageNum == 1 ? (data || []) : technicianList.concat(data),
['pageCof.pageNum']: pageCof.pageNum + 1,
triggered: false,
total: count
})
if (isReset) {
this.setData({
scrollTop: 0
})
}
}).finally(function () {
_this.setData({
isAsk: false
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
// wx.disableAlertBeforeUnload()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
// console.log(onUnload);
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "技师设置",
"usingComponents": {
}
}
\ No newline at end of file \ No newline at end of file
/* tabMine/pages/technicianSetup/technicianSetup.wxss */
page {
background: rgb(246, 248, 250);
}
.scrollCon {
width: 710rpx;
// height: 108rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 20rpx auto;
overflow-y: scroll;
.merchantNameCon {
box-sizing: border-box;
padding: 32rpx;
width: 100%;
height: 108rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32rpx;
color: #292D33;
.addIcon {
display: flex;
align-items: center;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #347BFF;
.icon-plus {
width: 28rpx;
height: 28rpx;
margin-right: 5rpx;
}
}
}
}
.item-box {
.item {
box-sizing: border-box;
width: 670rpx;
height: 124rpx;
background: #F7F8FA;
border-radius: 16rpx;
margin: 0 auto 20rpx;
}
.techicianInfoEdit {
box-sizing: border-box;
padding: 0 24rpx 0 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
.icon-delete {
width: 28rpx;
height: 28rpx;
margin-right: 15rpx;
}
.name {
box-sizing: border-box;
width: 200rpx;
height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #DEE0E3;
border-radius: 12rpx;
}
.phone {
box-sizing: border-box;
width: 280rpx;
height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #DEE0E3;
border-radius: 12rpx;
margin-left: 12rpx;
margin-right: auto;
}
.disabled {
opacity: 0.4;
}
.btn {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #347BFF;
}
}
.techicianInfo {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18rpx 32rpx;
.left {
.label {
display: flex;
.name {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 28rpx;
color: #292D33;
margin-right: 10rpx;
}
.position {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 20rpx;
background: #EAF1FF;
border: 1rpx solid #347bff80;
padding: 4rpx 14rpx;
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 20rpx;
color: #347BFF;
border-radius: 4rpx;
}
}
.phone {
margin-top: 10rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #292D33;
}
}
.icon-edit {
width: 32rpx;
height: 32rpx;
}
}
}
.input {
// text-align: right;
font-size: 28rpx;
padding: 0 24rpx;
}
.placeholder-class {
color: #BEC1C7;
}
.disabled {
opacity: .5;
}
\ No newline at end of file \ No newline at end of file
<!--tabMine/pages/technicianSetup/technicianSetup.wxml-->
<!-- <view>1111</view> -->
<!-- <scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}"> -->
<view class="scrollCon">
<view class="merchantNameCon">
<view class="name">{{userInfo.merchantName}}</view>
<view class="addIcon {{userInfo.userType == 2 ?'disabled':''}}" bind:tap="addTechnicalItem">
<image class="icon-plus" src="{{IMG_URL}}/miniProgram/iconBoldPlus.png" />
技师
</view>
</view>
<view class="item-box" wx:for="{{technicianList}}" wx:key="index">
<view class=" item techicianInfoEdit" wx:if="{{item.isEdit}}">
<image class="icon-delete" bind:tap="deleteTechicianInfo" data-index="{{index}}" src="{{IMG_URL}}/miniProgram/deleteIcon.png" />
<input placeholder="技师姓名" class="input name" placeholder-class="placeholder-class" maxlength="16" data-index="{{index}}" value="{{ item.staffName }}" bindinput="input" data-name="staffName" always-embed></input>
<input placeholder="技师手机号" class="input phone {{item.isPhone?'':'disabled'}}" type="number" maxlength="11" placeholder-class="placeholder-class" disabled="{{!item.isPhone}}" value="{{ item.staffPhone }}" bindinput="input" bindblur="phoneBlur" data-index="{{index}}" data-name="staffPhone" always-embed></input>
<view class="btn" bind:tap="submit" data-index="{{index}}">提交</view>
</view>
<view class=" item techicianInfo" wx:else>
<view class="left">
<view class="label">
<view class="name">{{item.staffName}}</view>
<view class="position">技师</view>
</view>
<view class="phone">手机号 {{item.staffPhone}}</view>
</view>
<image class="icon-edit {{userInfo.userType == 2 ?'disabled':''}}" bind:tap="editTechicianInfo" data-index="{{index}}" src="{{IMG_URL}}/miniProgram/grayEditIcon.png" />
</view>
<!-- <view class="top">
<view class="message">
<glsx-image src="personal/tech_defalut_avatar.png" class="avatar" />
<view class="message-text">
<input wx:if="{{item.isEdit}}" type="text" placeholder="{{formItems[0].placeholder}}" maxlength="{{formItems[0].maxlength}}" class="input" value="{{formData.staffName}}" focus="{{item.isEdit}}" placeholder-class="input-placeholder" data-attr="{{formItems[0].props}}" confirm-type="done" bindinput="handleInput" bindblur="handleConfirm" />
<view wx:else class="merchant">{{item.staffName}}</view>
</view>
<glsx-image wx:if="{{!item.isEdit}}" src="personal/icon-edit.png" class="icon-edit" bindtap="handleEdit" data-type="edit" data-target="{{item}}" data-idx="{{index}}" />
</view>
<view class="delete" bindtap="handleDelete" data-target="{{item}}">删除</view>
</view>
<view class="bottom">
<view class="technician_name">
所属:{{item.merchantName}}
</view>
<view class="time">{{item.createdTime}}</view>
</view> -->
</view>
<!-- <view class="bottomTips" wx:if="{{technicianList.length == total}}">到底啦!</view> -->
</view>
<!-- </scroll-view> -->
\ No newline at end of file \ No newline at end of file
...@@ -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;
}
.film-roll-number-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,41 @@ Page({ ...@@ -137,38 +139,41 @@ 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: []
}) })
for (var i = 0; i < arr?.length; i++) {
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[0].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[0].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[0].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 || arr?.length < 1) {
let errorText = ['', '前档', '侧后档', '天窗', '其它精品']
return this.showToast(selectPayType == 0 ? '门店无战败商品': `门店无配置${errorText[type]}商品`)
} }
})
// if (arr[0]?.upgradeGoodsList?.length < 1 || arr?.length < 1) {
// let errorText = ['', '前档', '侧后档', '天窗', '其它精品']
// return this.showToast(selectPayType == 0 ? '门店无战败商品': `门店无配置${errorText[type]}商品`)
// }
this.setData({ this.setData({
goodsData: arr goodsData: arr
}) })
...@@ -500,7 +505,7 @@ Page({ ...@@ -500,7 +505,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') // 去除流水号
...@@ -702,17 +707,17 @@ Page({ ...@@ -702,17 +707,17 @@ Page({
.then(res => { .then(res => {
console.log(res) console.log(res)
let { code, data, message } = res let { code, data, message } = res
let { filmOrder, frontGearArr, sideRearGearArr, skylightArr } = this.data let { filmOrder, frontGearArr, sideRearGearArr, skylightArr, baseConfigData } = this.data
if (code == 0) { if (code == 0) {
wx.hideLoading() wx.hideLoading()
let goodsData = data || []
// filmOrder补录类型 0太阳膜 1精品升级 // filmOrder补录类型 0太阳膜 1精品升级
if (filmOrder == 1) { if (filmOrder == 1) {
data?.forEach((val, index) => {
// 过滤掉太阳膜数据 // 过滤掉太阳膜数据
if (val.goodsType == 1) data.splice(index, 1) let filterData = data.filter(val => val.goodsType !== 1 && val.goodsType !== baseConfigData?.selfBuildFilmType)
}) goodsData = filterData
} }
data?.forEach(item => { goodsData?.forEach(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
val.merchantGoodsId = val.id val.merchantGoodsId = val.id
...@@ -728,8 +733,8 @@ Page({ ...@@ -728,8 +733,8 @@ Page({
}) })
}) })
this.setData({ this.setData({
goodsData: data, goodsData,
copyGoodsData: data, copyGoodsData: goodsData,
frontGearArr, frontGearArr,
sideRearGearArr, sideRearGearArr,
skylightArr skylightArr
...@@ -888,8 +893,11 @@ Page({ ...@@ -888,8 +893,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)
// 有技师选项 并选择了技师 更新客户信息
if (orderInfo.isOpenArtificer && orderInfo.technicianId) {
_this.updateCustomerInfo()
} else {
_this.checkPayType() _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: []
}) })
for (var i = 0; i < arr?.length; i++) {
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[0].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[0].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[0].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 || 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
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!