Commit 19bca09a by 李伟康

Merge branch 'SAAS+V5.1.0' of http://192.168.3.233:8090/saas_plus/dj-car-boutiqu…

…e-work-wechat into SAAS+V5.1.0
2 parents 2ba36f52 9707ec7d
Showing 70 changed files with 2124 additions and 1244 deletions
...@@ -263,15 +263,11 @@ ...@@ -263,15 +263,11 @@
"preloadRule": { "preloadRule": {
"pages/tabWorkOrder/pages/index/index": { "pages/tabWorkOrder/pages/index/index": {
"network": "all", "network": "all",
"packages": [ "packages": ["tabWorkOrder"]
"tabWorkOrder"
]
}, },
"tabIndex/pages/index/index": { "tabIndex/pages/index/index": {
"network": "all", "network": "all",
"packages": [ "packages": ["tabWorkOrder"]
"tabWorkOrder"
]
} }
}, },
"resolveAlias": { "resolveAlias": {
......
...@@ -18,12 +18,12 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,12 +18,12 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 0 let index = 4;
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
const envName = accountInfo.miniProgram.envVersion const envName = accountInfo.miniProgram.envVersion
//手动控制体验版环境的请求 true就依据下面index false就默认2 //手动控制体验版环境的请求 true就依据下面index false就默认2
const manual = false const manual = true
const release = false const release = false
// 判断小程序环境 // 判断小程序环境
......
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return false
}
/*
* 导出
*/
module.exports = {
btnPermissions: btnPermissions
}
// tabDate/pages/index/index.js // tabDate/pages/index/index.js
import api from "../api"; import api from "../api";
import commonApi from '~/api/api'
const app = getApp(); const app = getApp();
const TABLIST = ["全部", "已预约", "待预约"]; const TABLIST = ["全部", "已预约", "待预约"];
const IMG_URL = const IMG_URL =
...@@ -13,6 +14,7 @@ Page({ ...@@ -13,6 +14,7 @@ Page({
tabIndex: 0, tabIndex: 0,
activeIndex: 0, activeIndex: 0,
phoneShow: false, phoneShow: false,
userPermissions: [], // 权限数组
inviteObj: { inviteObj: {
dayInvited: 0, dayInvited: 0,
overdue: 0, overdue: 0,
...@@ -54,7 +56,7 @@ Page({ ...@@ -54,7 +56,7 @@ Page({
}, },
{ {
label: '流量有效性', label: '流量有效性',
single_key:'trafficEffectivenessName' single_key: 'trafficEffectivenessName'
} }
], ],
// 邀约状态(1待邀约;2已邀约;3取消预约) // 邀约状态(1待邀约;2已邀约;3取消预约)
...@@ -315,6 +317,21 @@ Page({ ...@@ -315,6 +317,21 @@ Page({
}); });
wx.hideTabBar(); wx.hideTabBar();
}, },
// 获取人员权限
getStaffPermissions() {
let { userInfo } = this.data
commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res
if (code == 0) {
this.setData({
userPermissions: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
jump(e) { jump(e) {
// console.log(e) // console.log(e)
// return // return
...@@ -331,6 +348,7 @@ Page({ ...@@ -331,6 +348,7 @@ Page({
phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig, phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
}); });
// this.getStatByPeriod() // this.getStatByPeriod()
// this.getiIviteRecord() // this.getiIviteRecord()
}, },
...@@ -437,8 +455,8 @@ Page({ ...@@ -437,8 +455,8 @@ Page({
e.yqMerchantName = e.merchantCoupon.yqMerchantName; e.yqMerchantName = e.merchantCoupon.yqMerchantName;
} }
e.trafficEffectivenessName = { e.trafficEffectivenessName = {
1:'有效客户', 1: '有效客户',
2:'无效客户' 2: '无效客户'
}[e.trafficEffectiveness] || '-' }[e.trafficEffectiveness] || '-'
}); });
const userType = const userType =
...@@ -535,6 +553,7 @@ Page({ ...@@ -535,6 +553,7 @@ Page({
} }
); );
} }
this.getStaffPermissions()
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
<navigation-bar bindnavbarReady="navbarReady" showBack="{{show_confirm}}" bindback="back"> <navigation-bar bindnavbarReady="navbarReady" showBack="{{show_confirm}}" bindback="back">
{{!show_confirm?'预约管理':'筛选'}} {{!show_confirm?'预约管理':'筛选'}}
</navigation-bar> </navigation-bar>
<wxs src="../index.wxs" module="filter" />
<!-- wx:if="{{navBarHeight > 0}}" --> <!-- wx:if="{{navBarHeight > 0}}" -->
<block wx:if="{{navBarHeight > 0}}"> <block wx:if="{{navBarHeight > 0}}">
<view class="main" style="margin-top:{{navBarHeight}}px"> <view class="main" style="margin-top:{{navBarHeight}}px">
...@@ -8,14 +9,7 @@ ...@@ -8,14 +9,7 @@
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
<input <input type="text" placeholder="请输入客户名称进行搜索" class="input" value="{{keyword}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
type="text"
placeholder="请输入客户名称进行搜索"
class="input"
value="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}"> <block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" /> <image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block> </block>
...@@ -27,49 +21,21 @@ ...@@ -27,49 +21,21 @@
</view> </view>
</view> </view>
</view> </view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" activeIndex="{{activeIndex}}"/> <tab-bar tabList="{{tabList}}" bindclick="tabClick" activeIndex="{{activeIndex}}" />
</view> </view>
<view class="list-bar"> <view class="list-bar">
<view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view> <view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view>
<view>本周预约 · <span class="txt-blue">{{inviteObj.weekInvited || 0}}</span></view> <view>本周预约 · <span class="txt-blue">{{inviteObj.weekInvited || 0}}</span></view>
<view>超时未到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view> <view>超时未到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view>
<image class="icon-cal" wx:if="{{isMake}}" src="{{IMG_URL}}miniProgram/date_icon.png" bindtap="jump" data-item="{}" data-recorderId='22' data-name="tabDate.apprManage"/> <image class="icon-cal" wx:if="{{isMake&&filter.btnPermissions(userPermissions, 'YUYUEKEHU')}}" src="{{IMG_URL}}miniProgram/date_icon.png" bindtap="jump" data-item="{}" data-recorderId='22' data-name="tabDate.apprManage" />
</view> </view>
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<scroll-view <scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="search" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - {{navBarHeight}}px - var(--fontSize252));" refresher-threshold="104" refresher-triggered="{{triggered}}" class="list">
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="search"
bindscrolltolower="scrollonReachBottom"
class="list"
style="height:calc(100vh - {{navBarHeight}}px - var(--fontSize252));"
refresher-threshold="104"
refresher-triggered="{{triggered}}"
class="list">
<block wx:if="{{list.length > 0}}"> <block wx:if="{{list.length > 0}}">
<block wx:for="{{list}}" wx:key="index"> <block wx:for="{{list}}" wx:key="index">
<block <block wx:for="{{item}}" wx:for-item="li" wx:for-index="ind" wx:key="ind">
wx:for="{{item}}" <view style="{{li.txtStyle}}" class="touch-item {{li.isTouchMove ? 'touch-move-active' : ''}}" data-ind='{{ind}}' data-index='{{index}}'>
wx:for-item="li" <view class="item list-item content" catchtap="jump" data-ind='{{ind}}' data-index='{{index}}' bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchE" data-name="tabDate.detail" data-recorderId='23' data-item="{{li}}">
wx:for-index="ind"
wx:key="ind">
<view
style="{{li.txtStyle}}"
class="touch-item {{li.isTouchMove ? 'touch-move-active' : ''}}"
data-ind='{{ind}}'
data-index='{{index}}'>
<view
class="item list-item content"
catchtap="jump"
data-ind='{{ind}}'
data-index='{{index}}'
bindtouchstart="touchstart"
bindtouchmove="touchmove"
bindtouchend="touchE"
data-name="tabDate.detail"
data-recorderId='23'
data-item="{{li}}">
<view class="status" style="color:{{status[li.inviteStatus].color}};background: {{status[li.inviteStatus].background}};"> <view class="status" style="color:{{status[li.inviteStatus].color}};background: {{status[li.inviteStatus].background}};">
<block>{{status[li.inviteStatus].text}}</block> <block>{{status[li.inviteStatus].text}}</block>
<!-- <block wx:if="{{li.inviteStatus !=4}}"> <!-- <block wx:if="{{li.inviteStatus !=4}}">
...@@ -79,7 +45,7 @@ ...@@ -79,7 +45,7 @@
<view class="name"> <view class="name">
<!-- <image src="/images/avatar.png" /> --> <!-- <image src="/images/avatar.png" /> -->
<view class="name-text text-hide">{{li.customer.customerName || ''}}</view> <view class="name-text text-hide">{{li.customer.customerName || ''}}</view>
<image class="name-sex-icon" src="{{IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png'}}" mode=""/> <image class="name-sex-icon" src="{{IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png'}}" mode="" />
</view> </view>
<view class="order-list"> <view class="order-list">
<block wx:for="{{orderObj}}" wx:key="index" wx:for-item="i"> <block wx:for="{{orderObj}}" wx:key="index" wx:for-item="i">
...@@ -88,11 +54,7 @@ ...@@ -88,11 +54,7 @@
<view class="order-value"> <view class="order-value">
<block wx:if="{{i.arr}}"> <block wx:if="{{i.arr}}">
<block wx:if="{{li[i.arr[1]]}}"> <block wx:if="{{li[i.arr[1]]}}">
<block <block wx:for="{{i.arr}}" wx:key="sindex" wx:for-index="arr_index" wx:for-item="k">
wx:for="{{i.arr}}"
wx:key="sindex"
wx:for-index="arr_index"
wx:for-item="k">
<view class="order-value-item text-hide"> <view class="order-value-item text-hide">
<block wx:if="{{arr_index == 1}}"> <block wx:if="{{arr_index == 1}}">
<text class="split">|</text> <text class="split">|</text>
...@@ -120,7 +82,7 @@ ...@@ -120,7 +82,7 @@
</view> </view>
<view class="order-control"> <view class="order-control">
<!-- 预约时间按钮 已支付状态置灰不可操作 --> <!-- 预约时间按钮 已支付状态置灰不可操作 -->
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && li.customerCoupon.usedFlag !='Y'&&li.inviteStatus !=4&&li.inviteStatus !=6&&isMake}}"> <block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && li.customerCoupon.usedFlag !='Y'&&li.inviteStatus !=4&&li.inviteStatus !=6&&isMake&&filter.btnPermissions(userPermissions, 'YUYUEKEHU')}}">
<view class="control-item {{li.inviteStatus == 7 ? 'disabled' : ''}}" catchtap="showDateBox" data-item="{{li}}"> <view class="control-item {{li.inviteStatus == 7 ? 'disabled' : ''}}" catchtap="showDateBox" data-item="{{li}}">
<image src="{{IMG_URL}}miniProgram/reservation_icon.png" class="date-icon" /> <image src="{{IMG_URL}}miniProgram/reservation_icon.png" class="date-icon" />
</view> </view>
...@@ -132,22 +94,11 @@ ...@@ -132,22 +94,11 @@
</block> </block>
</view> </view>
</view> </view>
<view <view wx:if="{{!li['confirmIndex']}}" class="del" catchtap="delBtn" data-ind="{{ind}}" data-item="{{li}}" data-index="{{index}}">
wx:if="{{!li['confirmIndex']}}"
class="del"
catchtap="delBtn"
data-ind="{{ind}}"
data-item="{{li}}"
data-index="{{index}}">
<view>撤销</view> <view>撤销</view>
<view>预约</view> <view>预约</view>
</view> </view>
<view <view wx:else class="del confirm" catchtap="repeal" data-item="{{li}}" data-index="{{index}}">
wx:else
class="del confirm"
catchtap="repeal"
data-item="{{li}}"
data-index="{{index}}">
确认删除 确认删除
</view> </view>
</view> </view>
...@@ -166,12 +117,7 @@ ...@@ -166,12 +117,7 @@
</block> </block>
<page-container show="{{show_confirm}}" duration="{{0}}" overlay="{{false}}" bind:afterleave="back"> <page-container show="{{show_confirm}}" duration="{{0}}" overlay="{{false}}" bind:afterleave="back">
<view wx:if="{{showRendering}}"> <view wx:if="{{showRendering}}">
<date-screen <date-screen show="{{show_confirm}}" userInfo="{{userInfo}}" navBarHeight="{{navBarHeight}}" inviteStatus="{{tabIndex}}" />
show="{{show_confirm}}"
userInfo="{{userInfo}}"
navBarHeight="{{navBarHeight}}"
inviteStatus="{{tabIndex}}" />
</view> </view>
</page-container> </page-container>
<date-picker show="{{showDate}}" merchantId="{{dateItem.merchantCoupon.yqMerchantId}}" /> <date-picker show="{{showDate}}" merchantId="{{dateItem.merchantCoupon.yqMerchantId}}" />
\ No newline at end of file \ No newline at end of file
...@@ -15,5 +15,10 @@ module.exports = { ...@@ -15,5 +15,10 @@ module.exports = {
return api.post('dj.api.smartcarlife.construction.summary.status', { return api.post('dj.api.smartcarlife.construction.summary.status', {
...params ...params
}) })
},
/**获取技师列表数据(过滤已禁用的数据) */
getTechnicianList(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', {...params})
} }
} }
\ No newline at end of file \ No newline at end of file
// pages/tabRepairOrder/components/Screening/index.js // pages/tabRepairOrder/components/Screening/index.js
import api from '~/api/api' import api from '../../api'
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({
...@@ -89,7 +89,7 @@ Component({ ...@@ -89,7 +89,7 @@ Component({
}) })
wx.showLoading() wx.showLoading()
// 获取技师数据 // 获取技师数据
api.getQYTechnicianList({ api.getTechnicianList({
yqMerchantId: wx.$util.getUserInfo()?.isSuper ? '' : wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId yqMerchantId: wx.$util.getUserInfo()?.isSuper ? '' : wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
}).then(respone => { }).then(respone => {
wx.hideLoading() wx.hideLoading()
......
/* pages/tabRepairOrder/components/Screening/index.wxss */ /* pages/tabRepairOrder/components/Screening/index.wxss */
@keyframes show-confirm-box { @keyframes show-confirm-box {
0%{ 0% {
right: -100%; right: -100%;
} }
100%{
100% {
right: 0; right: 0;
} }
} }
.confirm-box { .confirm-box {
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -16,11 +18,14 @@ ...@@ -16,11 +18,14 @@
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
animation: show-confirm-box .5s forwards; animation: show-confirm-box .5s forwards;
.main{
.main {
box-sizing: border-box; box-sizing: border-box;
} }
.box { .box {
margin: 0 var(--fontSize32); margin: 0 var(--fontSize32);
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -34,23 +39,28 @@ ...@@ -34,23 +39,28 @@
top: 0; top: 0;
background: #fff; background: #fff;
z-index: 2; z-index: 2;
.title-left{
.title-left {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
} }
.collapse-btn{
.collapse-btn {
width: var(--fontSize48); width: var(--fontSize48);
height: var(--fontSize48); height: var(--fontSize48);
&.rotate-180{
&.rotate-180 {
transform: rotate(180deg); transform: rotate(180deg);
} }
} }
} }
.list-box { .list-box {
display: flex; display: flex;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3); border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
flex-wrap: wrap; flex-wrap: wrap;
padding-bottom: var(--fontSize20); padding-bottom: var(--fontSize20);
.item { .item {
width: calc(234 / 750 * 100%); width: calc(234 / 750 * 100%);
min-height: var(--fontSize68); min-height: var(--fontSize68);
...@@ -65,44 +75,57 @@ ...@@ -65,44 +75,57 @@
color: #292D33; color: #292D33;
transition: all .2s; transition: all .2s;
margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0; margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0;
.text-item{
.text-item {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.inline-block{
.inline-block {
display: inline-block; display: inline-block;
} }
&:nth-of-type(3n+3) { &:nth-of-type(3n+3) {
margin-right: 0; margin-right: 0;
} }
} }
.active { .active {
background: rgba(53, 130, 238, 0.08); background: rgba(53, 130, 238, 0.08);
border: var(--fontSize2) solid #347BFF; border: var(--fontSize2) solid #347BFF;
color: #347BFF; color: #347BFF;
} }
.grey{
.grey {
color: #999EA8; color: #999EA8;
} }
.custom-time{
.custom-time {
width: calc(316 / 750 * 100%); width: calc(316 / 750 * 100%);
margin-bottom: 0; margin-bottom: 0;
&:last-child{
&:last-child {
margin-right: 0; margin-right: 0;
margin-left: var(--fontSize20); margin-left: var(--fontSize20);
} }
} }
.calendar { .calendar {
.item { .item {
margin-right: 0; margin-right: 0;
} }
} }
} }
.endbox {
border: none;
}
} }
} }
.btn-box { .btn-box {
position: sticky; position: sticky;
padding: var(--fontSize10) var(--fontSize32); padding: var(--fontSize10) var(--fontSize32);
...@@ -116,31 +139,37 @@ ...@@ -116,31 +139,37 @@
box-sizing: border-box; box-sizing: border-box;
z-index: 9; z-index: 9;
background-color: #fff; background-color: #fff;
.btn { .btn {
border-radius: var(--fontSize12); border-radius: var(--fontSize12);
border: var(--fontSize2) solid #0075F9; border: var(--fontSize2) solid #0075F9;
box-sizing: border-box; box-sizing: border-box;
height: var(--fontSize80); height: var(--fontSize80);
} }
.clear { .clear {
border: var(--fontSize2) solid #DEE0E3; border: var(--fontSize2) solid #DEE0E3;
width: var(--fontSize186); width: var(--fontSize186);
color: #292D33; color: #292D33;
} }
.done { .done {
background: #347BFF; background: #347BFF;
color: #fff; color: #fff;
width: var(--fontSize480); width: var(--fontSize480);
} }
} }
.isFullSucreen-btn { .isFullSucreen-btn {
padding-bottom: var(--fontSize68); padding-bottom: var(--fontSize68);
} }
.text-center { .text-center {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.text-hide { .text-hide {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
......
...@@ -58,11 +58,11 @@ ...@@ -58,11 +58,11 @@
</block> </block>
</view> </view>
</view> </view>
<view class="box"> <view class="box ">
<view class="title"> <view class="title">
施工状态 施工状态
</view> </view>
<view class="list-box"> <view class="list-box endbox">
<block wx:for="{{form.statusList}}" wx:key="index"> <block wx:for="{{form.statusList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="statusList" data-index="{{index}}">{{item.name}}</view> <view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="statusList" data-index="{{index}}">{{item.name}}</view>
</block> </block>
......
...@@ -174,9 +174,9 @@ Page({ ...@@ -174,9 +174,9 @@ Page({
data?.list?.forEach((val, index) => { data?.list?.forEach((val, index) => {
if (val.startTime) val.startTime = new Date(val.startTime).format("yyyy-MM-dd hh:mm:ss"); if (val.startTime) val.startTime = new Date(val.startTime).format("yyyy-MM-dd hh:mm:ss");
if (val.successTime) val.successTime = new Date(val.successTime).format("yyyy-MM-dd hh:mm:ss"); if (val.successTime) val.successTime = new Date(val.successTime).format("yyyy-MM-dd hh:mm:ss");
val.statuscolor = val.constructionStatus == 1 ? '#347BFF' : val.constructionStatus == 0 ? '#FF9D0A' : '' val.statuscolor = val.constructionStatus == 1 || val.constructionStatus == 2 ? '#347BFF' : val.constructionStatus == 0 ? '#FF9D0A' : ''
val.statusbackground = val.constructionStatus == 1 ? '#EAF1FF' : val.constructionStatus == 0 ? '#FFF5E6' : '' val.statusbackground = val.constructionStatus == 1 || val.constructionStatus == 2 ? '#EAF1FF' : val.constructionStatus == 0 ? '#FFF5E6' : ''
val.statusText = val.constructionStatus == 1 ? '已施工' : val.constructionStatus == 0 ? '待施工' : '' val.statusText = val.constructionStatus == 1 ? '已施工' : val.constructionStatus == 0 ? '待施工' : val.constructionStatus == 2 ? '客户返工' : ''
val.customerName = val.customer?.customerName val.customerName = val.customer?.customerName
val.mainTechnicianName = val.mainTechnicianList?.find(v => v.technicianType == 0)?.technicianName // 主技师 val.mainTechnicianName = val.mainTechnicianList?.find(v => v.technicianType == 0)?.technicianName // 主技师
const [subTechnicianName_1 = '', subTechnicianName_2 = ''] = const [subTechnicianName_1 = '', subTechnicianName_2 = ''] =
......
...@@ -158,7 +158,7 @@ page { ...@@ -158,7 +158,7 @@ page {
background: #35C376; background: #35C376;
color: #FFFFFF; color: #FFFFFF;
font-weight: 500; font-weight: 500;
font-size: var(--fontSize24); font-size: var(--fontSize22);
border-radius: var(--fontSize4); border-radius: var(--fontSize4);
margin-right: var(--fontSize16); margin-right: var(--fontSize16);
} }
...@@ -169,9 +169,12 @@ page { ...@@ -169,9 +169,12 @@ page {
margin-bottom: var(--fontSize16); margin-bottom: var(--fontSize16);
position: relative; position: relative;
min-width: 0; min-width: 0;
&:last-child{
margin-bottom: 0;
}
.goods-name { .goods-name {
display: inline-block; display: inline-block;
max-width: calc(100% - var(--fontSize190)); max-width: calc(100% - var(--fontSize184));
} }
.materials { .materials {
display: inline-block; display: inline-block;
...@@ -198,7 +201,7 @@ page { ...@@ -198,7 +201,7 @@ page {
background: #347BFF; background: #347BFF;
color: #FFFFFF; color: #FFFFFF;
font-weight: 500; font-weight: 500;
font-size: var(--fontSize24); font-size: var(--fontSize22);
border-radius: var(--fontSize4); border-radius: var(--fontSize4);
margin-right: var(--fontSize16); margin-right: var(--fontSize16);
} }
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<view class="goods-list"> <view class="goods-list">
<block wx:if="{{ li.subOrderList.length }}"> <block wx:if="{{ li.subOrderList.length }}">
<view class="goods-tag">商品</view> <view class="goods-tag">商品</view>
<view style="flex: 1;"> <view style="flex: 1;width: calc(100% - var(--fontSize76));">
<block wx:for="{{ li.subOrderList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex"> <block wx:for="{{ li.subOrderList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view class="goods" hidden="{{ li.showAllGoodsListFlag ? false : sindex > 2 }}"> <view class="goods" hidden="{{ li.showAllGoodsListFlag ? false : sindex > 2 }}">
<view class="goods-name text-hide"> <view class="goods-name text-hide">
......
// pages/tabWorkOrder/components/OrderScreen/OrderScreen.js // pages/tabWorkOrder/components/OrderScreen/OrderScreen.js
import api from '~/api/api' import api from '~/api/api'
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({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -16,8 +16,16 @@ Component({ ...@@ -16,8 +16,16 @@ Component({
this.setViewData() this.setViewData()
let { userInfo } = this.data let { userInfo } = this.data
// 非超管 获取转化人员 销售顾问 // 非超管 获取转化人员 销售顾问
if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo.loginRole == 6)) { if (
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空 !(
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5 ||
userInfo.loginRole == 6
)
) {
if (wx.$orderListDateListScreenRefresh) {
// 切换门店将数据清空
this.setData({ this.setData({
'form.userIdList': [], 'form.userIdList': [],
'form.sellerUserIdList': [] 'form.sellerUserIdList': []
...@@ -49,7 +57,8 @@ Component({ ...@@ -49,7 +57,8 @@ Component({
data: { data: {
IMG_URL, IMG_URL,
// 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 // 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销
statusList: [{ statusList: [
{
name: '全部', name: '全部',
active: true, active: true,
value: [] value: []
...@@ -103,57 +112,68 @@ Component({ ...@@ -103,57 +112,68 @@ Component({
{ {
name: '全部', name: '全部',
active: true, active: true,
value: [] value: ''
}, },
{ {
name: '已施工', name: '已施工',
value: 1 value: 'Y'
}, },
{ {
name: '待施工', name: '待施工',
value: 0 value: 'N'
}, },
{ {
name: '无需施工', name: '无需施工',
value: 3 value: 'Z'
} }
], ],
maxDate: new Date().format('yyyy-MM-dd'), maxDate: new Date().format('yyyy-MM-dd'),
orderTimeList: [{ orderTimeList: [
{
name: '全部', name: '全部',
active: true active: true
}, { },
{
name: '今日', name: '今日',
orderStartDate: new Date().format('yyyy-MM-dd'), orderStartDate: new Date().format('yyyy-MM-dd'),
orderEndDate: new Date().format('yyyy-MM-dd') orderEndDate: new Date().format('yyyy-MM-dd')
}, { },
{
name: '本月', name: '本月',
orderStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'), orderStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'),
orderEndDate: new Date().format('yyyy-MM-dd') orderEndDate: new Date().format('yyyy-MM-dd')
}, { },
{
orderStartDate: '', orderStartDate: '',
orderEndDate: '', orderEndDate: '',
type: 'custom' type: 'custom'
}], }
payTimeList: [{ ],
payTimeList: [
{
name: '全部', name: '全部',
active: true active: true
}, { },
{
name: '今日', name: '今日',
payStartDate: new Date().format('yyyy-MM-dd'), payStartDate: new Date().format('yyyy-MM-dd'),
payEndDate: new Date().format('yyyy-MM-dd') payEndDate: new Date().format('yyyy-MM-dd')
}, { },
{
name: '本月', name: '本月',
payStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'), payStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'),
payEndDate: new Date().format('yyyy-MM-dd') payEndDate: new Date().format('yyyy-MM-dd')
}, { },
{
payStartDate: '', payStartDate: '',
payEndDate: '', payEndDate: '',
type: 'custom' type: 'custom'
}], }
],
employShowMore: false, employShowMore: false,
salesmanShowMore: false, salesmanShowMore: false,
payTypeList: [{ payTypeList: [
{
name: '门店收款', name: '门店收款',
value: 2 value: 2
}, },
...@@ -204,8 +224,10 @@ Component({ ...@@ -204,8 +224,10 @@ Component({
}, },
storeConfirm(e) { storeConfirm(e) {
let { storeType } = this.data let { storeType } = this.data
if (storeType == 1) this.setData({ 'form.selectedYqMerchantList': e?.detail }) if (storeType == 1)
if (storeType == 2) this.setData({ 'form.selectedMerchantList': e?.detail }) this.setData({ 'form.selectedYqMerchantList': e?.detail })
if (storeType == 2)
this.setData({ 'form.selectedMerchantList': e?.detail })
this.setData({ showStoreSelectPopup: false, isReset: false }) this.setData({ showStoreSelectPopup: false, isReset: false })
}, },
yqMerchantChoose() { yqMerchantChoose() {
...@@ -225,11 +247,21 @@ Component({ ...@@ -225,11 +247,21 @@ Component({
this.getsellerUserIdList(userInfo?.shopMerchantId, 1) this.getsellerUserIdList(userInfo?.shopMerchantId, 1)
}, },
init() { init() {
let { orderTimeList, payTimeList, userInfo, constructionStatusList } = this.data let { orderTimeList, payTimeList, userInfo, constructionStatusList } =
this.data
// 非超管 // 非超管
if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6)) { if (
!(
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5 ||
userInfo?.loginRole == 6
)
) {
// 获取支付方式 // 获取支付方式
api.getYqStoreConfig({ yqMerchantId: userInfo?.merchantId }).then(res => { api
.getYqStoreConfig({ yqMerchantId: userInfo?.merchantId })
.then(res => {
let { code, message } = res let { code, message } = res
if (code == 0) { if (code == 0) {
let obj = res.data || {} let obj = res.data || {}
...@@ -263,18 +295,22 @@ Component({ ...@@ -263,18 +295,22 @@ Component({
} }
}) })
} else { } else {
let payArr = [{ let payArr = [
{
name: '全部', name: '全部',
value: '', value: '',
active: true active: true
}, ...wx.$util.deepClone(this.data.payTypeList), { },
...wx.$util.deepClone(this.data.payTypeList),
{
name: '对公转账', name: '对公转账',
value: '6' value: '6'
}, },
{ {
name: '其它收款', name: '其它收款',
value: '7' value: '7'
}] }
]
this.setData({ this.setData({
['form.payType']: payArr ['form.payType']: payArr
}) })
...@@ -282,7 +318,7 @@ Component({ ...@@ -282,7 +318,7 @@ Component({
this.setData({ this.setData({
['form.orderTimeList']: wx.$util.deepClone(orderTimeList), ['form.orderTimeList']: wx.$util.deepClone(orderTimeList),
['form.payTimeList']: wx.$util.deepClone(payTimeList), ['form.payTimeList']: wx.$util.deepClone(payTimeList),
['form.constructionStatus']: wx.$util.deepClone(constructionStatusList) ['form.constructionFlag']: wx.$util.deepClone(constructionStatusList)
}) })
}, },
showMore(e) { showMore(e) {
...@@ -300,12 +336,15 @@ Component({ ...@@ -300,12 +336,15 @@ Component({
date: { start, end } date: { start, end }
} = e.detail } = e.detail
data?.map(i => (i.active = false)) data?.map(i => (i.active = false))
let obj = name == 'orderTimeList' ? { let obj =
name == 'orderTimeList'
? {
active: true, active: true,
orderStartDate: start, orderStartDate: start,
orderEndDate: end, orderEndDate: end,
type: 'custom' type: 'custom'
} : { }
: {
active: true, active: true,
payStartDate: start, payStartDate: start,
payEndDate: end, payEndDate: end,
...@@ -320,7 +359,10 @@ Component({ ...@@ -320,7 +359,10 @@ Component({
// 日期组件 // 日期组件
showCalendar(e) { showCalendar(e) {
let { target } = e.currentTarget.dataset let { target } = e.currentTarget.dataset
let calendarModule = target == 'showOrder' ? this.selectComponent('#orderCalendar') : this.selectComponent('#payCalendar') let calendarModule =
target == 'showOrder'
? this.selectComponent('#orderCalendar')
: this.selectComponent('#payCalendar')
calendarModule.showCalendar && calendarModule.showCalendar(e) calendarModule.showCalendar && calendarModule.showCalendar(e)
}, },
choose(e) { choose(e) {
...@@ -329,7 +371,7 @@ Component({ ...@@ -329,7 +371,7 @@ Component({
if (target[index].disabled) return if (target[index].disabled) return
if (listName === 'sellerUserIdList' || listName === 'userIdList') { if (listName === 'sellerUserIdList' || listName === 'userIdList') {
if (index == 0) { if (index == 0) {
target.forEach(i => i.active = false) target.forEach(i => (i.active = false))
target[index].active = true target[index].active = true
} else { } else {
target[index].active = !target[index].active target[index].active = !target[index].active
...@@ -352,9 +394,7 @@ Component({ ...@@ -352,9 +394,7 @@ Component({
if (n != -1) this.setOrderStatusListDisabled(n) if (n != -1) this.setOrderStatusListDisabled(n)
}, },
setOrderStatusListDisabled(statusType) { setOrderStatusListDisabled(statusType) {
let { let { statusList } = this.data
statusList
} = this.data
statusList.map((e, index) => { statusList.map((e, index) => {
if (statusType == 1) { if (statusType == 1) {
if (index != 1 && index != 0) e.disabled = true if (index != 1 && index != 0) e.disabled = true
...@@ -400,7 +440,10 @@ Component({ ...@@ -400,7 +440,10 @@ Component({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
let formArr = wx.$util.arrayUnique(arr?.concat(form?.[targetItem] || []), 'uuid') let formArr = wx.$util.arrayUnique(
arr?.concat(form?.[targetItem] || []),
'uuid'
)
this.setData({ this.setData({
[target]: formArr [target]: formArr
}) })
...@@ -449,7 +492,14 @@ Component({ ...@@ -449,7 +492,14 @@ Component({
let arr = [] let arr = []
form[e]?.map(i => { form[e]?.map(i => {
if (i.active) { if (i.active) {
let { orderStartDate, orderEndDate, payStartDate, payEndDate, value, merchantId } = i let {
orderStartDate,
orderEndDate,
payStartDate,
payEndDate,
value,
merchantId
} = i
obj[e] = value obj[e] = value
// 订单时间 // 订单时间
if (orderStartDate && orderEndDate) { if (orderStartDate && orderEndDate) {
......
<!--pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxml--> <!--pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxml-->
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight}}px);margin-top:{{navBarHeight}}px;" hidden="{{!show}}"> <scroll-view
<view class="main" style="padding-bottom:{{btnHeight}}px"> scroll-y
class="confirm-box"
style="height:calc(100vh - {{ navBarHeight}}px);margin-top:{{navBarHeight }}px;"
hidden="{{ !show }}"
>
<view class="main" style="padding-bottom:{{ btnHeight }}px">
<!-- 非超管转化人员 --> <!-- 非超管转化人员 -->
<view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}"> <view
class="box"
wx:if="{{ !(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6) }}"
>
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
转化人员 转化人员
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}">{{userInfo.merchantName}}</view> <view
class="title-tips"
wx:if="{{ !(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6) }}"
>{{userInfo.merchantName}}</view>
</view> </view>
<view wx:if="{{form.sellerUserIdList.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"> <view
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> wx:if="{{ form.sellerUserIdList.length > 12 }}"
bindtap="showMore"
data-type="1"
class="collapse-btn {{ !employShowMore ? 'rotate-180' : '' }}"
>
<image src="{{ IMG_URL }}collapse_icon.png" mode="" />
</view> </view>
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.sellerUserIdList}}" wx:key="index"> <block wx:for="{{ form.sellerUserIdList }}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="sellerUserIdList" data-index="{{index}}" hidden="{{index >= 12 && !employShowMore}}"> <view
class="item text-center {{ item.active?'active':'' }}"
bindtap="choose"
data-list-name="sellerUserIdList"
data-index="{{ index }}"
hidden="{{ index >= 12 && !employShowMore }}"
>
<view class="text-item">{{item.staffName}}</view> <view class="text-item">{{item.staffName}}</view>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
<!-- 超管转化人员 选择园区店 --> <!-- 超管转化人员 选择园区店 -->
<view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6}}"> <view
class="box"
wx:if="{{ userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6 }}"
>
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">转化人员</view>
转化人员 <view
</view> wx:if="{{ form.selectedYqMerchantList.length > 3 }}"
<view wx:if="{{form.selectedYqMerchantList.length > 3}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"> bindtap="showMore"
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> data-type="1"
class="collapse-btn {{ !employShowMore ? 'rotate-180' : '' }}"
>
<image src="{{ IMG_URL }}collapse_icon.png" mode="" />
</view> </view>
</view> </view>
<view class="list-box"> <view class="list-box">
<view class="item text-center {{!form.selectedYqMerchantList.length?'active':''}}" bindtap="yqMerchantChoose">全部</view> <view class="item text-center {{ !form.selectedYqMerchantList.length?'active':'' }}" bindtap="yqMerchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="1">自定义</view> <view class="item text-center" bindtap="showStoreSelectPopup" data-type="1">自定义</view>
<block wx:for="{{form.selectedYqMerchantList}}" wx:key="index"> <block wx:for="{{ form.selectedYqMerchantList }}" wx:key="index">
<view class="item active flex-1" bindtap="choose" data-list-name="selectedYqMerchantList" data-index="{{index}}" hidden="{{index >= 3 && !employShowMore}}"> <view
class="item active flex-1"
bindtap="choose"
data-list-name="selectedYqMerchantList"
data-index="{{ index }}"
hidden="{{ index >= 3 && !employShowMore }}"
>
<view class="inline-block merchant-name">{{item.merchantName}}</view> <view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view> <view class="inline-block">{{item.merchantId}}</view>
</view> </view>
...@@ -42,40 +76,74 @@ ...@@ -42,40 +76,74 @@
</view> </view>
</view> </view>
<!-- 非超管销售顾问 --> <!-- 非超管销售顾问 -->
<view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}"> <view
class="box"
wx:if="{{ !(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6) }}"
>
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
销售顾问 销售顾问
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}">{{userInfo.shopMerchantName}}</view> <view
class="title-tips"
wx:if="{{ !(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6) }}"
>{{userInfo.shopMerchantName}}</view>
</view> </view>
<view wx:if="{{form.userIdList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"> <view
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> wx:if="{{ form.userIdList.length > 12 }}"
bindtap="showMore"
data-type="2"
class="collapse-btn {{ !salesmanShowMore ? 'rotate-180' : '' }}"
>
<image src="{{ IMG_URL }}collapse_icon.png" mode="" />
</view> </view>
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.userIdList}}" wx:key="index"> <block wx:for="{{ form.userIdList }}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="userIdList" data-index="{{index}}" hidden="{{index >= 12 && !salesmanShowMore}}"> <view
class="item text-center {{ item.active?'active':'' }}"
bindtap="choose"
data-list-name="userIdList"
data-index="{{ index }}"
hidden="{{ index >= 12 && !salesmanShowMore }}"
>
<view class="text-item">{{item.staffName}}</view> <view class="text-item">{{item.staffName}}</view>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
<!-- 超管销售顾问 选择4s店 --> <!-- 超管销售顾问 选择4s店 -->
<view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6}}"> <view
class="box"
wx:if="{{ userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6 }}"
>
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
销售顾问 销售顾问
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}">{{userInfo.shopMerchantName}}</view> <view
class="title-tips"
wx:if="{{ !(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6) }}"
>{{userInfo.shopMerchantName}}</view>
</view> </view>
<view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"> <view
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> wx:if="{{ form.selectedMerchantList.length > 3 }}"
bindtap="showMore"
data-type="2"
class="collapse-btn {{ !salesmanShowMore ? 'rotate-180' : '' }}"
>
<image src="{{ IMG_URL }}collapse_icon.png" mode="" />
</view> </view>
</view> </view>
<view class="list-box"> <view class="list-box">
<view class="item text-center {{!form.selectedMerchantList.length?'active':''}}" bindtap="merchantChoose">全部</view> <view class="item text-center {{ !form.selectedMerchantList.length?'active':'' }}" bindtap="merchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="2">自定义</view> <view class="item text-center" bindtap="showStoreSelectPopup" data-type="2">自定义</view>
<block wx:for="{{form.selectedMerchantList}}" wx:key="index"> <block wx:for="{{ form.selectedMerchantList }}" wx:key="index">
<view class="item active flex-1" bindtap="choose" data-list-name="selectedMerchantList" data-index="{{index}}" hidden="{{index >= 3 && !salesmanShowMore}}"> <view
class="item active flex-1"
bindtap="choose"
data-list-name="selectedMerchantList"
data-index="{{ index }}"
hidden="{{ index >= 3 && !salesmanShowMore }}"
>
<view class="inline-block merchant-name">{{item.merchantName}}</view> <view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view> <view class="inline-block">{{item.merchantId}}</view>
</view> </view>
...@@ -83,79 +151,146 @@ ...@@ -83,79 +151,146 @@
</view> </view>
</view> </view>
<view class="box"> <view class="box">
<view class="title"> <view class="title">订单时间</view>
订单时间
</view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.orderTimeList}}" wx:key="index"> <block wx:for="{{ form.orderTimeList }}" wx:key="index">
<block wx:if="{{item.type}}"> <block wx:if="{{ item.type }}">
<calendar allowSameDay shortcut bindselect='rangeSelect' id="orderCalendar" data-index="{{index}}" data-name="orderTimeList" dateType='range' calenderColor='#347BFF' vertical minDate="2020-10-01" maxDate="{{maxDate}}" isComponents> <calendar
</calendar> allowSameDay
shortcut
bindselect="rangeSelect"
id="orderCalendar"
data-index="{{ index }}"
data-name="orderTimeList"
dateType="range"
calenderColor="#347BFF"
vertical
minDate="2020-10-01"
maxDate="{{ maxDate }}"
isComponents
></calendar>
<view style="display: flex;align-items: center;width: 100%;"> <view style="display: flex;align-items: center;width: 100%;">
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.orderStartDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.orderStartDate || '开始时间'}}</view>- <view
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.orderEndDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.orderEndDate || '结束时间'}}</view> bindtap="showCalendar"
data-type="show"
data-target="showOrder"
class="item custom-time text-center {{ !item.orderStartDate ? 'grey' : ''}} {{item.active?'active':'' }}"
>{{item.orderStartDate || '开始时间'}}</view>
-
<view
bindtap="showCalendar"
data-type="show"
data-target="showOrder"
class="item custom-time text-center {{ !item.orderEndDate ? 'grey' : ''}} {{item.active?'active':'' }}"
>{{item.orderEndDate || '结束时间'}}</view>
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderTimeList" data-index="{{index}}">{{item.name}}</view> <view
class="item text-center {{ item.active?'active':'' }}"
bindtap="choose"
data-list-name="orderTimeList"
data-index="{{ index }}"
>{{item.name}}</view>
</block> </block>
</block> </block>
</view> </view>
</view> </view>
<view class="box"> <view class="box">
<view class="title"> <view class="title">支付时间</view>
支付时间
</view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.payTimeList}}" wx:key="index"> <block wx:for="{{ form.payTimeList }}" wx:key="index">
<block wx:if="{{item.type}}"> <block wx:if="{{ item.type }}">
<calendar allowSameDay shortcut bindselect='rangeSelect' data-index="{{index}}" id="payCalendar" data-name="payTimeList" dateType='range' calenderColor='#347BFF' vertical minDate="2020-10-01" maxDate="{{maxDate}}" isComponents> <calendar
</calendar> allowSameDay
shortcut
bindselect="rangeSelect"
data-index="{{ index }}"
id="payCalendar"
data-name="payTimeList"
dateType="range"
calenderColor="#347BFF"
vertical
minDate="2020-10-01"
maxDate="{{ maxDate }}"
isComponents
></calendar>
<view style="display: flex;align-items: center;width: 100%;"> <view style="display: flex;align-items: center;width: 100%;">
<view bindtap="showCalendar" data-type="show" data-target="showPay" class="item custom-time text-center {{!item.payStartDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.payStartDate || '开始时间'}}</view>- <view
<view bindtap="showCalendar" data-type="show" data-target="showPay" class="item custom-time text-center {{!item.payEndDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.payEndDate || '结束时间'}}</view> bindtap="showCalendar"
data-type="show"
data-target="showPay"
class="item custom-time text-center {{ !item.payStartDate ? 'grey' : ''}} {{item.active?'active':'' }}"
>{{item.payStartDate || '开始时间'}}</view>
-
<view
bindtap="showCalendar"
data-type="show"
data-target="showPay"
class="item custom-time text-center {{ !item.payEndDate ? 'grey' : ''}} {{item.active?'active':'' }}"
>{{item.payEndDate || '结束时间'}}</view>
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="payTimeList" data-index="{{index}}">{{item.name}}</view> <view
class="item text-center {{ item.active?'active':'' }}"
bindtap="choose"
data-list-name="payTimeList"
data-index="{{ index }}"
>{{item.name}}</view>
</block> </block>
</block> </block>
</view> </view>
</view> </view>
<view class="box"> <view class="box">
<view class="title"> <view class="title">订单状态</view>
订单状态
</view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.statusList}}" wx:key="index"> <block wx:for="{{ form.statusList }}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="statusList" data-index="{{index}}">{{item.name}}</view> <view
class="item text-center {{ item.active?'active':''}} {{item.disabled ?'disabled':'' }}"
bindtap="choose"
data-list-name="statusList"
data-index="{{ index }}"
>{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
<view class="box"> <view class="box">
<view class="title"> <view class="title">施工状态</view>
施工状态
</view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.constructionStatus}}" wx:key="index"> <block wx:for="{{ form.constructionFlag }}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="constructionStatus" data-index="{{index}}">{{item.name}}</view> <view
class="item text-center {{ item.active?'active':''}} {{item.disabled ?'disabled':'' }}"
bindtap="choose"
data-list-name="constructionFlag"
data-index="{{ index }}"
>{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
<view class="box"> <view class="box">
<view class="title"> <view class="title">支付方式</view>
支付方式
</view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.payType}}" wx:key="index"> <block wx:for="{{ form.payType }}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="payType" data-index="{{index}}">{{item.name}}</view> <view
class="item text-center {{ item.active?'active':'' }}"
bindtap="choose"
data-list-name="payType"
data-index="{{ index }}"
>{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn clear text-center" bindtap="reset">清除</view> <view class="btn clear text-center" bindtap="reset">清除</view>
<view class="btn done text-center" bindtap="confirm">确定</view> <view class="btn done text-center" bindtap="confirm">确定</view>
</view> </view>
</scroll-view> </scroll-view>
<store-select-popup show="{{showStoreSelectPopup}}" type="{{storeType}}" bindconfirm="storeConfirm" bindcancel="hideStorePopup" selectedData="{{storeType == 1 ? form.selectedYqMerchantList || [] : form.selectedMerchantList || []}}"></store-select-popup>
\ No newline at end of file \ No newline at end of file
<store-select-popup
show="{{ showStoreSelectPopup }}"
type="{{ storeType }}"
bindconfirm="storeConfirm"
bindcancel="hideStorePopup"
selectedData="{{ storeType == 1 ? form.selectedYqMerchantList || [] : form.selectedMerchantList || [] }}"
></store-select-popup>
\ No newline at end of file \ No newline at end of file
var replaceItemText = function (item) { var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g') var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ') // return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null return item ? item.replace(reg, ' ') : null
...@@ -11,13 +10,28 @@ var isIncludesItem = function (list, item) { ...@@ -11,13 +10,28 @@ var isIncludesItem = function (list, item) {
// var flag = list.indexOf(item) // var flag = list.indexOf(item)
return list.indexOf(item) != -1 return list.indexOf(item) != -1
} }
var subStatus = function (item) { var subStatus = function (constructionStatus) {
var staus = { console.log(constructionStatus)
"Y": 'constructionFlaged', switch (constructionStatus) {
"N": 'constructionFlaging', case 1:
"Z": '' case 2:
return 'constructionFlaged'
case 0:
return 'constructionFlaging'
case 3:
return ''
default:
return ''
}
// return 'constructionFlaging';
}
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
} }
return staus[item.constructionFlaged] || '' return false
} }
/* /*
* 导出 * 导出
...@@ -25,5 +39,6 @@ var subStatus = function (item) { ...@@ -25,5 +39,6 @@ var subStatus = function (item) {
module.exports = { module.exports = {
replaceItemText: replaceItemText, replaceItemText: replaceItemText,
isIncludesItem: isIncludesItem, isIncludesItem: isIncludesItem,
subStatus: subStatus subStatus: subStatus,
btnPermissions: btnPermissions
} }
...@@ -272,8 +272,8 @@ Page({ ...@@ -272,8 +272,8 @@ Page({
} else { } else {
wx.$util.showNoAccess() wx.$util.showNoAccess()
} }
// 已支付加已施工 // 已支付加已施工 全部子订单都已施工才能确认施工详情跳转
} else if (item.constructionFlag == 'Y' && item.status != 10) { } else if (item.allConstructionFlag && item.status != 10) {
wx.$router.go('tabWorkOrder.constructionOrderDetail', item) wx.$router.go('tabWorkOrder.constructionOrderDetail', item)
} else { } else {
wx.$router.go('tabWorkOrder.' + name, item) wx.$router.go('tabWorkOrder.' + name, item)
...@@ -620,7 +620,13 @@ Page({ ...@@ -620,7 +620,13 @@ Page({
data.list.map(e => { data.list.map(e => {
if (e.orderTime) if (e.orderTime)
e.orderTime = new Date(e.orderTime).format('yyyy-MM-dd hh:mm:ss') e.orderTime = new Date(e.orderTime).format('yyyy-MM-dd hh:mm:ss')
// 判断一下是否所有子订单都已经施工,是就跳转 施工完成
e.allConstructionFlag = true
e.subOrderList.map(i => { e.subOrderList.map(i => {
// 判断一下是否所有子订单都已经施工
if (![1, 2, 3].includes(i.constructionStatus)) {
e.allConstructionFlag = false
}
i.totalPrice = Number(wx.$util.decimal(i.totalPrice, 2)).toFixed(2) i.totalPrice = Number(wx.$util.decimal(i.totalPrice, 2)).toFixed(2)
}) })
e.total_price = e.totalPrice e.total_price = e.totalPrice
...@@ -644,6 +650,10 @@ Page({ ...@@ -644,6 +650,10 @@ Page({
g.price = g.totalPrice g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number) ? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice : g.upgradePrice
// 判断一下是否所有子订单都已经施工
if (![1, 2, 3].includes(g.constructionStatus)) {
e.allConstructionFlag = false
}
}) })
item.goodsList = item.packageGoodsOrderList item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => { item.price = item.goodsList.reduce((prev, cur) => {
...@@ -665,12 +675,12 @@ Page({ ...@@ -665,12 +675,12 @@ Page({
let text = status[e.status].text let text = status[e.status].text
let color = status[e.status].color let color = status[e.status].color
let background = status[e.status].background let background = status[e.status].background
// 不是订单失效状态优先显示已施工 // 不是订单失效状态优先显示已施工 现在不施工
if (![9, 11, 12].includes(e.status) && e.constructionFlag == 'Y') { // if (![9, 11, 12].includes(e.status) && e.constructionFlag == 'Y') {
text = '已施工' // text = '已施工'
color = '#347BFF' // color = '#347BFF'
background = '#F3F7FC' // background = '#F3F7FC'
} // }
e.statusText = text e.statusText = text
e.statuscolor = color e.statuscolor = color
e.statusbackground = background e.statusbackground = background
......
...@@ -236,6 +236,7 @@ page { ...@@ -236,6 +236,7 @@ page {
.list .item .goods-list .constructionFlaging::after { .list .item .goods-list .constructionFlaging::after {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
margin-left: -10rpx;
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/constructionFlaging.png); background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/constructionFlaging.png);
background-size: 100%; background-size: 100%;
} }
...@@ -243,10 +244,33 @@ page { ...@@ -243,10 +244,33 @@ page {
.list .item .goods-list .constructionFlaged::after { .list .item .goods-list .constructionFlaged::after {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
margin-left: -10rpx;
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/constructionFlaged.png); background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/constructionFlaged.png);
background-size: 100%; background-size: 100%;
} }
.list .item .goods-list .pullDownArrow::after {
width: var(--fontSize32);
height: var(--fontSize32);
-webkit-transition: all 0.4s;
transition: all 0.4s;
margin-left: -8rpx;
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/pullDownArrow.png);
background-size: 100%;
}
.list .item .goods-list .showAllGoodsListFlag::after {
// width: var(--fontSize32);
transform: rotate(180deg);
// height: var(--fontSize32);
// -webkit-transition: all 0.4s;
transition: all 0.4s;
margin-top: -15rpx;
margin-left: -8rpx;
// background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/pullDownArrow.png);
// background-size: 100%;
}
.list .item .goods-list .goods .goods-name { .list .item .goods-list .goods .goods-name {
font-size: var(--fontSize28); font-size: var(--fontSize28);
// color: #292D33; // color: #292D33;
......
...@@ -8,15 +8,7 @@ ...@@ -8,15 +8,7 @@
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
<input <input type="text" placeholder="客户姓名/商品名称/订单编号/手机号" class="input" value="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
type="text"
placeholder="客户姓名/商品名称/订单编号/手机号"
class="input"
value="{{ keyword }}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search"
/>
<block wx:if="{{ keyword }}"> <block wx:if="{{ keyword }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" /> <image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block> </block>
...@@ -32,40 +24,14 @@ ...@@ -32,40 +24,14 @@
</view> </view>
<!-- 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 --> <!-- 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 -->
<block wx:if="{{ flag }}"> <block wx:if="{{ flag }}">
<scroll-view <scroll-view scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="search" bindscrolltolower="scrollonReachBottom" bindscroll="onPageScroll" class="list" style="height:calc(100vh - {{ navBarHeight }}px - var(--fontSize160));" refresher-threshold="104" refresher-triggered="{{ triggered }}">
scroll-y
enable-back-to-top
refresher-enabled="{{ true }}"
bindrefresherrefresh="search"
bindscrolltolower="scrollonReachBottom"
bindscroll="onPageScroll"
class="list"
style="height:calc(100vh - {{ navBarHeight }}px - var(--fontSize160));"
refresher-threshold="104"
refresher-triggered="{{ triggered }}"
>
<block wx:if="{{ list.length > 0 }}"> <block wx:if="{{ list.length > 0 }}">
<block wx:for="{{ list }}" wx:key="index"> <block wx:for="{{ list }}" wx:key="index">
<block wx:for="{{ item }}" wx:for-item="li" wx:for-index="ind" wx:key="ind"> <block wx:for="{{ item }}" wx:for-item="li" wx:for-index="ind" wx:key="ind">
<view <view style="{{ li.txtStyle }}" class="touch-item {{ li.isTouchMove ? 'touch-move-active' : '' }}" data-ind="{{ ind }}" data-index="{{ index }}">
style="{{ li.txtStyle }}"
class="touch-item {{ li.isTouchMove ? 'touch-move-active' : '' }}"
data-ind="{{ ind }}"
data-index="{{ index }}"
>
<!-- 广汇订单出库成功 --> <!-- 广汇订单出库成功 -->
<image wx:if="{{ li.outboundStatus == 4 }}" class="stockIcon" src="../../images/stockIcon.png" /> <image wx:if="{{ li.outboundStatus == 4 }}" class="stockIcon" src="../../images/stockIcon.png" />
<view <view class="item content" catchtap="jump" data-ind="{{ ind }}" data-index="{{ index }}" bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchE" data-name="{{ li.status == 3 ? 'confirmOrder' : li.status == 1 ? 'createOrder' : 'orderDetail' }}" data-item="{{ li }}">
class="item content"
catchtap="jump"
data-ind="{{ ind }}"
data-index="{{ index }}"
bindtouchstart="touchstart"
bindtouchmove="touchmove"
bindtouchend="touchE"
data-name="{{ li.status == 3 ? 'confirmOrder' : li.status == 1 ? 'createOrder' : 'orderDetail' }}"
data-item="{{ li }}"
>
<view class="status text-center" style="color:{{ li.statuscolor }};background-color:{{li.statusbackground }};"> <view class="status text-center" style="color:{{ li.statuscolor }};background-color:{{li.statusbackground }};">
<block wx:if="{{ li.status == 1||li.status == 3 }}"> <block wx:if="{{ li.status == 1||li.status == 3 }}">
<block wx:if="{{ status[li.status].background }}"> <block wx:if="{{ status[li.status].background }}">
...@@ -82,23 +48,12 @@ ...@@ -82,23 +48,12 @@
<view class="name"> <view class="name">
<!-- <image src="/images/avatar.png" /> --> <!-- <image src="/images/avatar.png" /> -->
<view class="name-text text-hide">{{li.customer.customerName}}</view> <view class="name-text text-hide">{{li.customer.customerName}}</view>
<image <image class="name-sex-icon" src="{{ IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png' }}" mode="" />
class="name-sex-icon"
src="{{ IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png' }}"
mode=""
/>
</view> </view>
<view class="goods-list" style="padding-bottom:{{ li.subOrderList.length<1?0:'' }}"> <view class="goods-list" style="padding-bottom:{{ li.subOrderList.length<1?0:'' }}">
<block wx:if="{{ li.subOrderList.length }}"> <block wx:if="{{ li.subOrderList.length }}">
<block wx:for="{{ li.subOrderList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex"> <block wx:for="{{ li.subOrderList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view <view catch:tap="foldUp" data-item="{{ i }}" data-index="{{ sindex }}" data-listindex="{{ ind }}" class="goods {{ filter.subStatus(i.constructionStatus) }} {{i.packageGoodsOrderList?'pullDownArrow':''}} {{i.foldUp?'showAllGoodsListFlag':'' }}" wx:if="{{ li.showAllGoodsListFlag ? true : sindex < 2 }}">
catch:tap="foldUp"
data-item="{{ i }}"
data-index="{{ sindex }}"
data-listindex="{{ ind }}"
class="goods {{ filter.subStatus(li.constructionFlag) }}"
wx:if="{{ li.showAllGoodsListFlag ? true : sindex < 2 }}"
>
<view class="goods-name text-hide"> <view class="goods-name text-hide">
{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || i.packageName||''}} {{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || i.packageName||''}}
</view> </view>
...@@ -108,12 +63,9 @@ ...@@ -108,12 +63,9 @@
</view> </view>
</view> </view>
<!-- 显示套餐子商品 --> <!-- 显示套餐子商品 -->
<view <view class="packgoodsListCon" wx:if="{{ i.packageGoodsOrderList&&!i.foldUp&&( li.showAllGoodsListFlag ? true : sindex < 2) }}">
class="packgoodsListCon" <block wx:for="{{ i.packageGoodsOrderList }}" wx:key="packindex" wx:for-item="packchild" wx:for-index="packindex">
wx:if="{{ i.packageGoodsOrderList&&!i.foldUp&&( li.showAllGoodsListFlag ? true : sindex < 2) }}" <view class="goods {{ filter.subStatus(packchild.constructionStatus) }}">
>
<block wx:for="{{ i.packageGoodsOrderList }}" wx:key="sindex" wx:for-item="packchild" wx:for-index="sindex">
<view class="goods {{ filter.subStatus(li.constructionFlag) }}">
<view class="goods-name text-hide"> <view class="goods-name text-hide">
{{filter.replaceItemText(packchild.upgradeGoodsAlias) ||filter.replaceItemText(packchild.upgradeGoodsName) || packchild.packageName||''}} {{filter.replaceItemText(packchild.upgradeGoodsAlias) ||filter.replaceItemText(packchild.upgradeGoodsName) || packchild.packageName||''}}
</view> </view>
...@@ -195,14 +147,7 @@ ...@@ -195,14 +147,7 @@
<!-- footer --> <!-- footer -->
</view> </view>
<block wx:if="{{ isMake }}"> <block wx:if="{{ isMake }}">
<view <view wx:if="{{ !li['confirmIndex'] }}" class="del" catchtap="delBtn" data-ind="{{ ind }}" data-item="{{ li }}" data-index="{{ index }}">
wx:if="{{ !li['confirmIndex'] }}"
class="del"
catchtap="delBtn"
data-ind="{{ ind }}"
data-item="{{ li }}"
data-index="{{ index }}"
>
<view>撤销</view> <view>撤销</view>
<view>工单</view> <view>工单</view>
</view> </view>
...@@ -254,22 +199,11 @@ ...@@ -254,22 +199,11 @@
<gl-image class="icon" src="/miniProgram/order3.png"></gl-image> <gl-image class="icon" src="/miniProgram/order3.png"></gl-image>
战败下单 战败下单
</view> </view>
<view <view wx:if="{{ isSettingExpiredTraffic && !isScan }}" class="modalbox cancle {{ selectType == 3?'act': '' }}" bindtap="selectType" data-type="3">
wx:if="{{ isSettingExpiredTraffic && !isScan }}"
class="modalbox cancle {{ selectType == 3?'act': '' }}"
bindtap="selectType"
data-type="3"
>
<gl-image class="icon" src="/miniProgram/order4.png"></gl-image> <gl-image class="icon" src="/miniProgram/order4.png"></gl-image>
失效客户 失效客户
</view> </view>
</view> </view>
</modal> </modal>
<recording-order-popup wx:if="{{ showOrderpop }}" show="{{ showOrderpop }}" bind:success="navigator" title="请选择交易参考号" /> <recording-order-popup wx:if="{{ showOrderpop }}" show="{{ showOrderpop }}" bind:success="navigator" title="请选择交易参考号" />
<order-prompt-popup
wx:if="{{ showPromptDialog }}"
show="{{ showPromptDialog }}"
bindcancel="promptCancel"
bindconfirm="promptHandleConfirm"
sceneObj="{{ sceneObj }}"
></order-prompt-popup>
\ No newline at end of file \ No newline at end of file
<order-prompt-popup wx:if="{{ showPromptDialog }}" show="{{ showPromptDialog }}" bindcancel="promptCancel" bindconfirm="promptHandleConfirm" sceneObj="{{ sceneObj }}"></order-prompt-popup>
\ No newline at end of file \ No newline at end of file
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return false
}
/*
* 导出
*/
module.exports = {
btnPermissions: btnPermissions
}
import api from "../../api"; import api from "../../api";
// tabDate/pages/detail/detail.js // tabDate/pages/detail/detail.js
import CONSTANTDATA from "../userPortrait/constant/data"; import CONSTANTDATA from "../userPortrait/constant/data";
import commonApi from '~/api/api'
import { import {
checkDailyReport checkDailyReport
} from "~/store/ModalToQueueControl"; } from "~/store/ModalToQueueControl";
const app = getApp(); const app = getApp();
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMG_URL,
detail: {}, detail: {},
userPermissions: [], // 权限数组
orderObj: { orderObj: {
customer: { customer: {
customerName: "", customerName: "",
...@@ -126,7 +131,7 @@ Page({ ...@@ -126,7 +131,7 @@ Page({
}); });
} }
}, },
error: () => {}, error: () => { },
}, },
"#modal2" "#modal2"
); );
...@@ -200,6 +205,21 @@ Page({ ...@@ -200,6 +205,21 @@ Page({
phoneNumber: data, phoneNumber: data,
}); });
}, },
// 获取人员权限
getStaffPermissions() {
let { userInfo } = this.data
commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res
if (code == 0) {
this.setData({
userPermissions: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
onRoute(options) { onRoute(options) {
console.log(options); console.log(options);
if (options.id) { if (options.id) {
...@@ -226,6 +246,7 @@ Page({ ...@@ -226,6 +246,7 @@ Page({
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7), isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
}); });
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig); this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig);
this.getStaffPermissions()
}, },
checkPhoneShow(config) { checkPhoneShow(config) {
console.log("config", config); console.log("config", config);
...@@ -349,7 +370,7 @@ Page({ ...@@ -349,7 +370,7 @@ Page({
detail.trafficEffectivenessName = { detail.trafficEffectivenessName = {
1: '有效客户', 1: '有效客户',
2: '无效客户' 2: '无效客户'
} [detail.trafficEffectiveness] }[detail.trafficEffectiveness]
} }
let { let {
userInfo, userInfo,
...@@ -522,7 +543,7 @@ Page({ ...@@ -522,7 +543,7 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -539,25 +560,25 @@ Page({ ...@@ -539,25 +560,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {}, onShareAppMessage: function () { },
}); });
\ No newline at end of file \ No newline at end of file
...@@ -53,15 +53,22 @@ page { ...@@ -53,15 +53,22 @@ page {
margin-left: auto; margin-left: auto;
color: #347BFF; color: #347BFF;
flex-shrink: 0; flex-shrink: 0;
.iconImage {
width: var(--fontSize32);
height: var(--fontSize32);
vertical-align: bottom;
}
} }
.box .customer-list .item .label { .box .customer-list .item .label {
width: var(--fontSize140); width: var(--fontSize140);
flex-shrink: 0; flex-shrink: 0;
color: #999EA8;
} }
.box .customer-list .item .value { .box .customer-list .item .value {
color: #888888; color: #292D33;
} }
.box .icon { .box .icon {
...@@ -199,6 +206,10 @@ page { ...@@ -199,6 +206,10 @@ page {
color: #999999; color: #999999;
} }
.boxend {
margin-bottom: 130rpx;
}
.fixed-box { .fixed-box {
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -331,6 +342,7 @@ page { ...@@ -331,6 +342,7 @@ page {
min-height: var(--fontSize100); min-height: var(--fontSize100);
background: #FFFFFF; background: #FFFFFF;
padding-bottom: var(--fontSize10); padding-bottom: var(--fontSize10);
padding-top: 20rpx;
} }
.btns .btn { .btns .btn {
......
<!-- tabDate/pages/detail/detail.wxml --> <!-- tabDate/pages/detail/detail.wxml -->
<wxs src="../../index.wxs" module="filter" />
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block wx:if="{{ flag }}"> <block wx:if="{{ flag }}">
<view class="main {{ isFullSucreen && detail.inviteStatus != 4?'isFullSucreen':'' }}"> <view class="main {{ isFullSucreen && detail.inviteStatus != 4?'isFullSucreen':'' }}">
...@@ -8,7 +9,7 @@ ...@@ -8,7 +9,7 @@
<block wx:for="{{ customerObj }}" wx:key="index"> <block wx:for="{{ customerObj }}" wx:key="index">
<view class="item"> <view class="item">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view class="value {{ item.key != 'userPortrait' ? 'text-hide' : '' }}" style="color:{{ item.color }};" catchtap="item.callBack" data-data="{{ detail[item.key] }}"> <view class="value {{ item.key != 'userPortrait' ? 'text-hide' : '' }}" style="color:{{ item.color||'#292D33' }};" catchtap="item.callBack" data-data="{{ detail[item.key] }}">
<!-- <view>{{item.key}}</view> --> <!-- <view>{{item.key}}</view> -->
<block wx:if="{{ item.key=='carName' }}"> <block wx:if="{{ item.key=='carName' }}">
<block wx:if="{{ detail.customer.carSeriesName }}"> <block wx:if="{{ detail.customer.carSeriesName }}">
...@@ -27,10 +28,14 @@ ...@@ -27,10 +28,14 @@
<block wx:else>{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}</block> <block wx:else>{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}</block>
</view> </view>
<block wx:if="{{ item.copy }}"> <block wx:if="{{ item.copy }}">
<view class="copy" catchtap="setCopyData" data-content="{{ detail[item.key] }}">复制</view> <view class="copy" catchtap="setCopyData" data-content="{{ detail[item.key] }}">
<image src="{{ IMG_URL }}miniProgram/copyblue.png" class="iconImage"></image>
</view>
</block> </block>
<block wx:if="{{ item.portrait&&isOrder }}"> <block wx:if="{{ item.portrait&&isOrder }}">
<view class="copy" catchtap="editProtrait">编辑</view> <view class="copy" catchtap="editProtrait">
<image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image>
</view>
</block> </block>
</view> </view>
</block> </block>
...@@ -55,7 +60,7 @@ ...@@ -55,7 +60,7 @@
</picker> </picker>
</view> </view>
<view class="box"> <view class="box">
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2&&isOrder }}"> <block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2&&isOrder&&filter.btnPermissions(userPermissions, 'YUYUEKEHU') }}">
<!-- 已施工/已撤销/已支付 不显示 --> <!-- 已施工/已撤销/已支付 不显示 -->
<view wx:if="{{ detail.inviteStatus != 4&&detail.inviteStatus!=6&&detail.inviteStatus!=7 }}" class="icon date-icon" bindtap="showPopup" data-name="showDate"> <view wx:if="{{ detail.inviteStatus != 4&&detail.inviteStatus!=6&&detail.inviteStatus!=7 }}" class="icon date-icon" bindtap="showPopup" data-name="showDate">
<image src="../../images/date.png" /> <image src="../../images/date.png" />
...@@ -68,7 +73,7 @@ ...@@ -68,7 +73,7 @@
<view class="date text-center {{ detail.inviteStatus == 6 ? 'gray' : '' }}"> <view class="date text-center {{ detail.inviteStatus == 6 ? 'gray' : '' }}">
{{detail.inviteDate}} {{detail.inviteDate}}
<!-- 已施工/已支付/已撤销 不显示 --> <!-- 已施工/已支付/已撤销 不显示 -->
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6&&isOrder }}"> <block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6&&isOrder &&filter.btnPermissions(userPermissions, 'YUYUEKEHU')}}">
<view class="cancel y-center" bindtap="cancelInvite">取消预约</view> <view class="cancel y-center" bindtap="cancelInvite">取消预约</view>
</block> </block>
</view> </view>
...@@ -79,7 +84,7 @@ ...@@ -79,7 +84,7 @@
<view class="nothing text-center">暂无记录</view> <view class="nothing text-center">暂无记录</view>
</block> </block>
</view> </view>
<view class="box"> <view class="box boxend">
<view class="title">客户跟进记录</view> <view class="title">客户跟进记录</view>
<block wx:if="{{ detail.remarks.length > 0 }}"> <block wx:if="{{ detail.remarks.length > 0 }}">
<view class="record-box"> <view class="record-box">
...@@ -119,7 +124,7 @@ ...@@ -119,7 +124,7 @@
<view class="value">{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}</view> <view class="value">{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}</view>
</view> </view>
</block> </block>
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6&&isOrder }}"> <block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6&&isOrder&&filter.btnPermissions(userPermissions, 'YUYUEKEHU') }}">
<view class="icon" bindtap="showPopup" data-name="showRemark"> <view class="icon" bindtap="showPopup" data-name="showRemark">
<image src="../../images/edit.png" /> <image src="../../images/edit.png" />
</view> </view>
......
...@@ -39,5 +39,10 @@ module.exports = { ...@@ -39,5 +39,10 @@ module.exports = {
// 施工单返工 // 施工单返工
reworkAPI(data) { reworkAPI(data) {
return api.post('dj.api.smartcarlife.construction.rework', data) return api.post('dj.api.smartcarlife.construction.rework', data)
},
/**获取技师列表数据(过滤已禁用的数据) */
getTechnicianList(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', {...params})
} }
} }
...@@ -15,23 +15,18 @@ Component({ ...@@ -15,23 +15,18 @@ Component({
this.setData({ this.setData({
scrollTop: 0 scrollTop: 0
}) })
let { infoData } = this.data let { detailInfo } = this.data
if (infoData) { this.setData({
this.getDetailInfo(infoData) infoData: wx.$util.deepClone(detailInfo)
} }, () => {
this.getDetailInfo(this.data.infoData)
})
} }
} }
}, },
title: String, title: String,
detailInfo: { detailInfo: {
type: Object, type: Object
observer: function(n) {
if (n) {
this.setData({
infoData: wx.$util.deepClone(n)
})
}
}
}, },
userPermissions: Array userPermissions: Array
}, },
...@@ -52,7 +47,7 @@ Component({ ...@@ -52,7 +47,7 @@ Component({
methods: { methods: {
async getDetailInfo(data) { async getDetailInfo(data) {
let oParams = {} let oParams = {}
oParams.appId = 'wx570d9331f9ace0bd' oParams.appId = wx.getAccountInfoSync().miniProgram.appId
oParams.qrcodeType = 'QR_WXA_UNLIMIT' oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'tabRepairOrder/pages/repairOrderDetail/repairOrderDetail' oParams.path = 'tabRepairOrder/pages/repairOrderDetail/repairOrderDetail'
oParams.scene = `merchantId=${data.merchantId}&yqMerchantId=${data.sellerMerchantId}&id=${data.id}&constructionCode=${data.constructionCode}&orderCode=${data.orderCode}` oParams.scene = `merchantId=${data.merchantId}&yqMerchantId=${data.sellerMerchantId}&id=${data.id}&constructionCode=${data.constructionCode}&orderCode=${data.orderCode}`
......
// tabRepairOrder/components/relateGoodsPop/index.js // tabRepairOrder/components/relateGoodsPop/index.js
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -10,15 +9,18 @@ Component({ ...@@ -10,15 +9,18 @@ Component({
baseConfigData: Object, baseConfigData: Object,
show: { show: {
type: Boolean, type: Boolean,
observer: function(n) { observer: function (n) {
if (n) { if (n) {
let {goodsList, selected} = this.data let { goodsList, selected } = this.data
goodsList?.map(val => { goodsList?.map(val => {
val.active = false val.active = false
if (selected?.findIndex(v => v.upgradeGoodsId == val.upgradeGoodsId) > -1) val.active = true if (
selected?.findIndex(v => v.subOrderCode == val.subOrderCode) > -1
)
val.active = true
return val return val
}) })
this.setData({goodsList}) this.setData({ goodsList })
} }
} }
} }
...@@ -27,9 +29,7 @@ Component({ ...@@ -27,9 +29,7 @@ Component({
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {},
},
/** /**
* 组件的方法列表 * 组件的方法列表
...@@ -39,7 +39,7 @@ Component({ ...@@ -39,7 +39,7 @@ Component({
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
let { goodsList } = this.data let { goodsList } = this.data
goodsList?.forEach(val => { goodsList?.forEach(val => {
if (val.upgradeGoodsId == item.upgradeGoodsId) val.active = !val.active if (val.subOrderCode == item.subOrderCode) val.active = !val.active
}) })
this.setData({ this.setData({
goodsList goodsList
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
justify-content: space-between; justify-content: space-between;
padding-right: var(--fontSize32); padding-right: var(--fontSize32);
width: calc(100% - var(--fontSize130)); width: calc(100% - var(--fontSize130));
border-top: var(--fontSize2) solid #EBEDF0;
height: var(--fontSize84); height: var(--fontSize84);
display: flex; display: flex;
align-items: center; align-items: center;
......
// tabRepairOrder/components/reviewPopup/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 审核通过
confirm() {
this.triggerEvent('confirm')
},
// 不通过
cancel() {
this.triggerEvent('cancel')
},
// 关闭
close() {
this.triggerEvent('close')
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabRepairOrder/components/reviewPopup/index.wxss */
.popclass {
font-size: var(--fontSize32);
color: #292D33;
.title {
margin-top: var(--fontSize32);
text-align: center;
font-weight: 500;
}
.content {
margin: var(--fontSize32) var(--fontSize48) var(--fontSize48);
padding: 0 var(--fontSize30);
text-align: center;
font-size: var(--fontSize30);
color: #5A5E66;
}
.popup-footer {
height: var(--fontSize100);
display: flex;
align-items: center;
justify-content: center;
border-top: var(--fontSize1) solid #EBEDF0;
.btn {
flex: 1;
height: 100%;
text-align: center;
line-height: var(--fontSize100);
}
.cancel {
border-right: var(--fontSize1) solid #EBEDF0;
}
.confirm {
font-weight: 500;
color: #347BFF;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/reviewPopup/index.wxml-->
<van-popup lock-scroll catchtouchmove="noScroll" custom-style="width:var(--fontSize622);" round z-index="999999" custom-class="popclass" closeable show="{{ show }}" bind:close="close">
<view class="title">审核施工单</view>
<view class="content">
驻店零售/区域经理可审核每笔技师施工单的施工结果
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bind:tap="cancel">不通过</view>
<view class="confirm btn text-center" bind:tap="confirm">审核通过</view>
</view>
</van-popup>
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/outboundPopup/index.wxml--> <!--tabRepairOrder/components/outboundPopup/index.wxml-->
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<van-popup <van-popup show="{{ show }}" position="bottom" custom-style="height: 90%;" round closeable close-on-click-overlay="{{ false }}" bind:close="cancel">
show="{{ show }}"
position="bottom"
custom-style="height: 90%;"
round
closeable
close-on-click-overlay="{{ false }}"
bind:close="cancel"
>
<view class="outbound-popup-box"> <view class="outbound-popup-box">
<view class="sub-title"> <view class="sub-title">
<view class="text-center">{{title}}</view> <view class="text-center">{{title}}</view>
...@@ -33,10 +25,11 @@ ...@@ -33,10 +25,11 @@
<view class="value text-hide"> <view class="value text-hide">
<block wx:if="{{ item.rollNumber }}">{{item.rollNumber}}</block> <block wx:if="{{ item.rollNumber }}">{{item.rollNumber}}</block>
<block wx:else> <block wx:else>
<view class="placeholder">请选择</view> -
<!-- <view class="placeholder">请选择</view> -->
</block> </block>
</view> </view>
<image class="pickerArrow" src="/components/images/arrow-x.png" /> <!-- <image class="pickerArrow" src="/components/images/arrow-x.png" /> -->
</view> </view>
</view> </view>
<view class="box-item input-box"> <view class="box-item input-box">
...@@ -45,15 +38,7 @@ ...@@ -45,15 +38,7 @@
<text class="required">*</text> <text class="required">*</text>
</view> </view>
<view class="value"> <view class="value">
<input <input class="input {{ false ? 'disabled' : '' }}" bindinput="handleInput" value="{{ item.materialsUsed }}" data-index="{{ index }}" type="digit" placeholder-style="color: #BEC1C7;" placeholder="输入数字" />
class="input {{ false ? 'disabled' : '' }}"
bindinput="handleInput"
value="{{ item.materialsUsed }}"
data-index="{{ index }}"
type="digit"
placeholder-style="color: #BEC1C7;"
placeholder="输入数字"
/>
</view> </view>
</view> </view>
</view> </view>
...@@ -81,18 +66,5 @@ ...@@ -81,18 +66,5 @@
<view class="confirm btn text-center" bind:tap="confirm">确认返工</view> <view class="confirm btn text-center" bind:tap="confirm">确认返工</view>
</view> </view>
</van-popup> </van-popup>
<film-roll-no-popup
show="{{ filmRollNoVisible }}"
title="产品膜卷号"
copyfilmRollNoList="{{ filmRollNoList }}"
filmSelectedItem="{{ filmSelectedItem }}"
bindconfirm="changefilmRollNo"
bindcancel="handelCancelRollPopup"
/>
<time-select
show="{{ timeVisible }}"
title="产品出库时间"
defaultTime="{{ infoData.outBoundTime }}"
bind:confirm="onTimeConfirm"
bindcancel="onClosePicker"
/>
\ No newline at end of file \ No newline at end of file
<film-roll-no-popup show="{{ filmRollNoVisible }}" title="产品膜卷号" copyfilmRollNoList="{{ filmRollNoList }}" filmSelectedItem="{{ filmSelectedItem }}" bindconfirm="changefilmRollNo" bindcancel="handelCancelRollPopup" />
<time-select show="{{ timeVisible }}" title="产品出库时间" defaultTime="{{ infoData.outBoundTime }}" bind:confirm="onTimeConfirm" bindcancel="onClosePicker" />
\ No newline at end of file \ No newline at end of file
...@@ -11,7 +11,11 @@ Component({ ...@@ -11,7 +11,11 @@ Component({
type: Boolean, type: Boolean,
observer: function(n) { observer: function(n) {
if (n) { if (n) {
this.getList() this.setData({
searchValue: ''
}, () => {
this.getList(true)
})
} }
} }
}, },
...@@ -33,6 +37,7 @@ Component({ ...@@ -33,6 +37,7 @@ Component({
data: { data: {
IMG_URL, IMG_URL,
servicesList: [], servicesList: [],
copyServicesList: [],
selectedData: [] selectedData: []
}, },
...@@ -46,7 +51,7 @@ Component({ ...@@ -46,7 +51,7 @@ Component({
}) })
}, },
// 获取服务项目数据 // 获取服务项目数据
getList() { getList(firstFlag) {
let { searchValue } = this.data let { searchValue } = this.data
api.getServiceItemList({serviceItemsName: searchValue}).then(res => { api.getServiceItemList({serviceItemsName: searchValue}).then(res => {
let { code, data, message } = res let { code, data, message } = res
...@@ -60,12 +65,18 @@ Component({ ...@@ -60,12 +65,18 @@ Component({
val.title = `${val.categoryName}-${val.itemName}` val.title = `${val.categoryName}-${val.itemName}`
val.detailList = val.serviceItemList?.map(item => ({ val.detailList = val.serviceItemList?.map(item => ({
...item, ...item,
serviceItemsId: item.id,
active: selectedIds.has(item.id) active: selectedIds.has(item.id)
})) }))
}) })
this.setData({ this.setData({
servicesList: res.data servicesList: res.data
}) })
if (firstFlag) {
this.setData({
copyServicesList: res.data || []
})
}
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
...@@ -77,7 +88,7 @@ Component({ ...@@ -77,7 +88,7 @@ Component({
// 服务项目选择 // 服务项目选择
handleChecked(e) { handleChecked(e) {
let { target } = e.currentTarget.dataset let { target } = e.currentTarget.dataset
let { servicesList } = this.data let { servicesList, copyServicesList } = this.data
servicesList?.map(val => { servicesList?.map(val => {
val?.detailList?.map(v => { val?.detailList?.map(v => {
if (v.id == target.id) v.active = !v.active if (v.id == target.id) v.active = !v.active
...@@ -85,6 +96,13 @@ Component({ ...@@ -85,6 +96,13 @@ Component({
}) })
return val return val
}) })
copyServicesList?.map(val => {
val?.detailList?.map(v => {
if (v.id == target.id) v.active = !v.active
return v
})
return val
})
const filteredServicesList = servicesList?.map(val => { const filteredServicesList = servicesList?.map(val => {
if (!val?.detailList) return null if (!val?.detailList) return null
return { return {
...@@ -94,6 +112,7 @@ Component({ ...@@ -94,6 +112,7 @@ Component({
}).filter(val => val && val.detailList.length > 0) || [] }).filter(val => val && val.detailList.length > 0) || []
this.setData({ this.setData({
servicesList, servicesList,
copyServicesList,
selectedData: filteredServicesList selectedData: filteredServicesList
}) })
}, },
...@@ -109,8 +128,8 @@ Component({ ...@@ -109,8 +128,8 @@ Component({
this.triggerEvent('cancel') this.triggerEvent('cancel')
}, },
confirm() { confirm() {
let {servicesList} = this.data let {servicesList, copyServicesList} = this.data
const result = servicesList.map(item => ({ const result = copyServicesList.map(item => ({
...item, ...item,
detailList: item?.detailList.filter(child => child.active) detailList: item?.detailList.filter(child => child.active)
})).filter(item => item.detailList?.length > 0) })).filter(item => item.detailList?.length > 0)
......
...@@ -38,6 +38,6 @@ ...@@ -38,6 +38,6 @@
</block> </block>
</scroll-view> </scroll-view>
</view> </view>
<view class="bottom">共选项目<text>{{filter.activeNum(servicesList, 'detailList')}}</text>个</view> <view class="bottom">共选项目<text>{{filter.activeNum(copyServicesList, 'detailList')}}</text>个</view>
</view> </view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
...@@ -74,7 +74,7 @@ Component({ ...@@ -74,7 +74,7 @@ Component({
hour: date.getHours(), hour: date.getHours(),
minute: date.getMinutes(), minute: date.getMinutes(),
second: date.getSeconds(), second: date.getSeconds(),
dateStr: date.format('yyyy/MM/dd')?.replace(/\//g, '-') dateStr: date.format('yyyy-MM-dd')?.replace(/\//g, '-')
} }
} catch (error) { } catch (error) {
return this.getCurrentTimeData() return this.getCurrentTimeData()
...@@ -91,7 +91,7 @@ Component({ ...@@ -91,7 +91,7 @@ Component({
hour: today.getHours(), hour: today.getHours(),
minute: today.getMinutes(), minute: today.getMinutes(),
second: today.getSeconds(), second: today.getSeconds(),
dateStr: today.format('yyyy/MM/dd')?.replace(/\//g, '-') dateStr: today.format('yyyy-MM-dd')?.replace(/\//g, '-')
} }
}, },
...@@ -126,9 +126,8 @@ Component({ ...@@ -126,9 +126,8 @@ Component({
const hours = [] const hours = []
// 根据是否是当前日期决定小时范围 // 根据是否是当前日期决定小时范围
const isToday = defaultTime.dateStr === today.format('yyyy/MM/dd')?.replace(/\//g, '-') const isToday = defaultTime.dateStr === today.format('yyyy-MM-dd')?.replace(/\//g, '-')
const hourLimit = isToday ? defaultTime.hour + 1 : 24 const hourLimit = isToday ? today.getHours() + 1 : 24
for (let hour = 0; hour < hourLimit; hour++) { for (let hour = 0; hour < hourLimit; hour++) {
hours.push(hour.toString().padStart(2, '0')); hours.push(hour.toString().padStart(2, '0'));
} }
...@@ -140,18 +139,17 @@ Component({ ...@@ -140,18 +139,17 @@ Component({
const minutes = [] const minutes = []
const seconds = [] const seconds = []
const isToday = defaultTime.dateStr === today.format('yyyy/MM/dd')?.replace(/\//g, '-') const isToday = defaultTime.dateStr === today.format('yyyy-MM-dd')?.replace(/\//g, '-')
const isCurrentHour = defaultTime.hour === today.getHours() const isCurrentHour = defaultTime.hour === today.getHours()
// 分钟范围 // 分钟范围
const minuteLimit = (isToday && isCurrentHour) ? defaultTime.minute + 1 : 60 const minuteLimit = (isToday && isCurrentHour) ? today.getMinutes() + 1 : 60
for (let minute = 0; minute < minuteLimit; minute++) { for (let minute = 0; minute < minuteLimit; minute++) {
minutes.push(minute.toString().padStart(2, '0')); minutes.push(minute.toString().padStart(2, '0'));
} }
// 秒范围 // 秒范围
const isCurrentMinute = (isToday && isCurrentHour && defaultTime.minute === today.getMinutes()) const isCurrentMinute = (isToday && isCurrentHour && defaultTime.minute === today.getMinutes())
const secondLimit = isCurrentMinute ? defaultTime.second + 1 : 60 const secondLimit = isCurrentMinute ? today.getSeconds() + 1 : 60
for (let second = 0; second < secondLimit; second++) { for (let second = 0; second < secondLimit; second++) {
seconds.push(second.toString().padStart(2, '0')); seconds.push(second.toString().padStart(2, '0'));
} }
...@@ -201,10 +199,7 @@ Component({ ...@@ -201,10 +199,7 @@ Component({
const index = value[0] const index = value[0]
this.currentDate = days[index] this.currentDate = days[index]
// 验证时间有效性 const today = new Date().format('yyyy-MM-dd')?.replace(/\//g, '-')
if (!this.validateTime()) return
const today = new Date().format('yyyy/MM/dd')?.replace(/\//g, '-')
const timeType = this.currentDate != today ? 1 : 0 const timeType = this.currentDate != today ? 1 : 0
this.getAllTimeOrPartTime(timeType) this.getAllTimeOrPartTime(timeType)
}, },
...@@ -214,11 +209,7 @@ Component({ ...@@ -214,11 +209,7 @@ Component({
const { value } = e.detail const { value } = e.detail
const index = value[0] const index = value[0]
this.currentHour = hours[index] this.currentHour = hours[index]
const today = new Date().format('yyyy-MM-dd')?.replace(/\//g, '-')
// 验证时间有效性
if (!this.validateTime()) return
const today = new Date().format('yyyy/MM/dd')?.replace(/\//g, '-')
const timeType = this.currentDate != today ? 1 : 0 const timeType = this.currentDate != today ? 1 : 0
this.getAllTimeOrPartTimeMinute(timeType) this.getAllTimeOrPartTimeMinute(timeType)
}, },
...@@ -228,10 +219,6 @@ Component({ ...@@ -228,10 +219,6 @@ Component({
const { value } = e.detail const { value } = e.detail
const index = value[0] const index = value[0]
this.currentMinute = minutes[index] this.currentMinute = minutes[index]
// 验证时间有效性
if (!this.validateTime()) return
this.updateSecondsByMinute() this.updateSecondsByMinute()
}, },
...@@ -240,9 +227,6 @@ Component({ ...@@ -240,9 +227,6 @@ Component({
const { value } = e.detail const { value } = e.detail
const index = value[0] const index = value[0]
this.currentSecond = seconds[index] this.currentSecond = seconds[index]
// 验证时间有效性
this.validateTime()
}, },
// 新增方法:验证时间有效性 // 新增方法:验证时间有效性
...@@ -282,7 +266,7 @@ Component({ ...@@ -282,7 +266,7 @@ Component({
} }
const str = `${this.currentDate} ${this.currentHour}:${this.currentMinute}:${this.currentSecond}` const str = `${this.currentDate} ${this.currentHour}:${this.currentMinute}:${this.currentSecond}`
const result = new Date(str.replace(/-/g, '/')).format('yyyy/MM/dd hh:mm:ss')?.replace(/\//g, '-') const result = new Date(str.replace(/-/g, '/')).format('yyyy-MM-dd hh:mm:ss')?.replace(/\//g, '-')
this.triggerEvent('confirm', result) this.triggerEvent('confirm', result)
this.setData({ errorMsg: '' }) this.setData({ errorMsg: '' })
}, },
...@@ -344,7 +328,7 @@ Component({ ...@@ -344,7 +328,7 @@ Component({
const seconds = [] const seconds = []
let second_len = 60 let second_len = 60
const currentDateStr = today.format('yyyy/MM/dd')?.replace(/\//g, '-') const currentDateStr = today.format('yyyy-MM-dd')?.replace(/\//g, '-')
if (this.currentDate === currentDateStr && if (this.currentDate === currentDateStr &&
this.currentHour === today.getHours().toString().padStart(2, '0') && this.currentHour === today.getHours().toString().padStart(2, '0') &&
this.currentMinute === today.getMinutes().toString().padStart(2, '0')) { this.currentMinute === today.getMinutes().toString().padStart(2, '0')) {
......
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: var(--fontSize30); font-size: var(--fontSize32);
color: #292D33; font-weight: 500;
color: #222222;
} }
} }
.picker_max{ .picker_max{
......
...@@ -12,21 +12,21 @@ ...@@ -12,21 +12,21 @@
<picker-view class="picker" value="{{hourValues}}" indicator-class="indicator" bindchange="changeHour"> <picker-view class="picker" value="{{hourValues}}" indicator-class="indicator" bindchange="changeHour">
<picker-view-column> <picker-view-column>
<block wx:for="{{hours}}" wx:key="index"> <block wx:for="{{hours}}" wx:key="index">
<view class="view">{{item}}</view> <view class="view">{{item}}时</view>
</block> </block>
</picker-view-column> </picker-view-column>
</picker-view> </picker-view>
<picker-view wx:if="{{!loading}}" class="picker" value="{{minuteValues}}" indicator-class="indicator" bindchange="changeMinutes"> <picker-view wx:if="{{!loading}}" class="picker" value="{{minuteValues}}" indicator-class="indicator" bindchange="changeMinutes">
<picker-view-column> <picker-view-column>
<block wx:for="{{minutes}}" wx:key="index"> <block wx:for="{{minutes}}" wx:key="index">
<view class="view">{{item}}</view> <view class="view">{{item}}分</view>
</block> </block>
</picker-view-column> </picker-view-column>
</picker-view> </picker-view>
<picker-view wx:if="{{!loading}}" class="picker" value="{{secondValues}}" indicator-class="indicator" bindchange="changeMinutes"> <picker-view wx:if="{{!loading}}" class="picker" value="{{secondValues}}" indicator-class="indicator" bindchange="changeSeconds">
<picker-view-column> <picker-view-column>
<block wx:for="{{seconds}}" wx:key="index"> <block wx:for="{{seconds}}" wx:key="index">
<view class="view">{{item}}</view> <view class="view">{{item}}秒</view>
</block> </block>
</picker-view-column> </picker-view-column>
</picker-view> </picker-view>
......
// tabRepairOrder/pages/confirmWorkOrder/index.js // tabRepairOrder/pages/confirmWorkOrder/index.js
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/'
import api from '../../api' import api from '../../api'
import commonApi from '~/api/api' import commonApi from '~/api/api'
import {getPositionList, setConfigInfo} from "~/store/index"; import { getPositionList, setConfigInfo } from '~/store/index'
const app = getApp(); const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMG_URL, IMG_URL,
confirmInfo: {}, confirmInfo: {},
goodsObj: [{ goodsObj: [
{
label: '客户姓名', label: '客户姓名',
key: 'customerName' key: 'customerName'
}, { },
{
label: '客户车型', label: '客户车型',
key: 'customerCarName' key: 'customerCarName'
}], }
],
positionTypeList: [], positionTypeList: [],
goodsList: [], // 所有可关联商品 包含当前施工单商品 goodsList: [], // 所有可关联商品 包含当前施工单商品
mainSelected: [], // 主技师已选 mainSelected: [], // 主技师已选
...@@ -30,9 +33,11 @@ Page({ ...@@ -30,9 +33,11 @@ Page({
onRoute(options) { onRoute(options) {
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
this.setData({ this.setData(
{
userInfo userInfo
}, async () => { },
async () => {
// 获取配置服务数据 // 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData) let baseConfigData = await setConfigInfo(app.globalData)
this.getDetail(options) this.getDetail(options)
...@@ -42,48 +47,29 @@ Page({ ...@@ -42,48 +47,29 @@ Page({
baseConfigData baseConfigData
}) })
this.getStaffPermissions() this.getStaffPermissions()
}) }
)
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {},
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
// 获取人员权限 // 获取人员权限
getStaffPermissions() { getStaffPermissions() {
// 假数据开始
const res = {
code: 0,
data: [{
name: '施工确认',
code: 'SHIGONGQUEREN'
}, {
name: '完成施工',
code: 'WANCHENGSHIGONG'
}]
}
this.setData({
userPermissions: res.data
})
return
let { userInfo } = this.data let { userInfo } = this.data
commonApi.staffPermissions({phone: userInfo?.phone}).then(res => { commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res) console.log(res)
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
...@@ -97,16 +83,46 @@ Page({ ...@@ -97,16 +83,46 @@ Page({
}, },
// 获取详情数据 // 获取详情数据
getDetail(data) { getDetail(data) {
api.getConstructionDetail({ wx.showLoading({
title: '加载中'
})
api
.getConstructionDetail({
id: data?.id, id: data?.id,
constructionCode: data?.constructionCode constructionCode: data?.constructionCode
}).then(res => { })
.then(res => {
wx.hideLoading()
let { code, data, message } = res let { code, data, message } = res
const mainSelected = data?.mainTechnicianList?.filter(val => val.technicianType == 0)?.map(it => { return { technicianId: it.technicianId, staffName: it.technicianName, id: it.id, uuid: it.technicianUuid } }) const mainSelected = data?.mainTechnicianList
const deputySelected = data?.mainTechnicianList?.filter(val => val.technicianType == 1)?.map(it => { return { technicianId: it.technicianId, staffName: it.technicianName, id: it.id, uuid: it.technicianUuid } }) ?.filter(val => val.technicianType == 0)
data.customer.customerCarName = data.customer.carSeriesName ? `${data.customer.carBrand}-${data.customer.carChildsBrandName}-${data.customer.carSeriesName}` : '' ?.map(it => {
if (data.startTime) data.startTime = new Date(data.startTime).format("yyyy-MM-dd hh:mm:ss") return {
if (data.endTime) data.endTime = new Date(data.endTime).format("yyyy-MM-dd hh:mm:ss") technicianId: it.technicianId,
staffName: it.technicianName,
id: it.id,
uuid: it.technicianUuid
}
})
const deputySelected = data?.mainTechnicianList
?.filter(val => val.technicianType == 1)
?.map(it => {
return {
technicianId: it.technicianId,
staffName: it.technicianName,
id: it.id,
uuid: it.technicianUuid
}
})
data.customer.customerCarName = data.customer.carSeriesName
? `${data.customer.carBrand}-${data.customer.carChildsBrandName}-${data.customer.carSeriesName}`
: ''
if (data.startTime)
data.startTime = new Date(data.startTime).format(
'yyyy-MM-dd hh:mm:ss'
)
if (data.endTime)
data.endTime = new Date(data.endTime).format('yyyy-MM-dd hh:mm:ss')
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
mainSelected, mainSelected,
...@@ -122,9 +138,13 @@ Page({ ...@@ -122,9 +138,13 @@ Page({
getTechnicianList() { getTechnicianList() {
let { userInfo } = this.data let { userInfo } = this.data
// 获取技师数据 // 获取技师数据
commonApi.getQYTechnicianList({ api
yqMerchantId: !userInfo?.isSuper ? wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId : '' .getTechnicianList({
}).then(respone => { yqMerchantId: !userInfo?.isSuper
? wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
: ''
})
.then(respone => {
wx.hideLoading() wx.hideLoading()
if (respone?.code == 0) { if (respone?.code == 0) {
this.setData({ this.setData({
...@@ -135,17 +155,19 @@ Page({ ...@@ -135,17 +155,19 @@ Page({
}, },
// 获取可关联的商品数据 // 获取可关联的商品数据
getGoodsList(data) { getGoodsList(data) {
api.getCanRelateGoodsList({ api
.getCanRelateGoodsList({
orderCode: data?.orderCode, orderCode: data?.orderCode,
constructionCode: data?.constructionCode constructionCode: data?.constructionCode
}).then(async res => { })
.then(async res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
const positionTypeList = (await getPositionList()) || []; const positionTypeList = (await getPositionList()) || []
if (positionTypeList) { if (positionTypeList) {
data?.forEach(val => { data?.forEach(val => {
val.positionStr = positionTypeList.filter( val.positionStr = positionTypeList.filter(
(v) => v.positionValue == val.position v => v.positionValue == val.position
)[0]?.positionName )[0]?.positionName
}) })
} }
...@@ -162,7 +184,7 @@ Page({ ...@@ -162,7 +184,7 @@ Page({
let { confirmInfo } = this.data let { confirmInfo } = this.data
// 编辑时的商品数据 // 编辑时的商品数据
const editGoodsList = wx.$util.deepClone(confirmInfo.subOrderList) const editGoodsList = wx.$util.deepClone(confirmInfo.subOrderList)
this.setData({editGoodsFlag: true, editGoodsList}) this.setData({ editGoodsFlag: true, editGoodsList })
}, },
// 删除商品 // 删除商品
...@@ -190,13 +212,13 @@ Page({ ...@@ -190,13 +212,13 @@ Page({
}) })
}, },
relateGoods () { relateGoods() {
this.setData({relateGoodsVisable: true}) this.setData({ relateGoodsVisable: true })
}, },
// 关联商品弹窗取消 // 关联商品弹窗取消
handelRelateGoodsCancel() { handelRelateGoodsCancel() {
this.setData({relateGoodsVisable: false}) this.setData({ relateGoodsVisable: false })
}, },
// 关联商品弹窗确认 // 关联商品弹窗确认
...@@ -275,7 +297,7 @@ Page({ ...@@ -275,7 +297,7 @@ Page({
}, },
// 选择服务项目弹窗 // 选择服务项目弹窗
selectServices() { selectServices() {
this.setData({selectServiceVisable: true}) this.setData({ selectServiceVisable: true })
}, },
// 选择服务项目弹窗确定 // 选择服务项目弹窗确定
handleSelectServiceConfirm(e) { handleSelectServiceConfirm(e) {
...@@ -286,11 +308,19 @@ Page({ ...@@ -286,11 +308,19 @@ Page({
}, },
// 选择服务项目弹窗取消 // 选择服务项目弹窗取消
handleSelectServiceCancel() { handleSelectServiceCancel() {
this.setData({selectServiceVisable: false}) this.setData({ selectServiceVisable: false })
}, },
// 提交电子施工单 // 提交电子施工单
submit() { submit() {
const { editGoodsFlag, editServiceFlag, confirmInfo, mainSelected, goodsList, deputySelected } = this.data const {
editGoodsFlag,
editServiceFlag,
confirmInfo,
mainSelected,
goodsList,
deputySelected,
requesting
} = this.data
const validateWithImmediateFeedback = (condition, message) => { const validateWithImmediateFeedback = (condition, message) => {
if (condition) { if (condition) {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -298,28 +328,47 @@ Page({ ...@@ -298,28 +328,47 @@ Page({
} }
return false return false
} }
if (validateWithImmediateFeedback(editGoodsFlag, '请确认完成商品关联')) return if (validateWithImmediateFeedback(editGoodsFlag, '请确认完成商品关联'))
if (validateWithImmediateFeedback(editServiceFlag, '请确认完成服务项目修改')) return return
if (validateWithImmediateFeedback(!confirmInfo?.subOrderList?.length, '请关联商品')) return if (
if (validateWithImmediateFeedback(!mainSelected?.length, '请选择主技师')) return validateWithImmediateFeedback(editServiceFlag, '请确认完成服务项目修改')
if (validateWithImmediateFeedback(!confirmInfo?.serviceItemsList?.length, '请选择服务项目')) return )
return
if (
validateWithImmediateFeedback(
!confirmInfo?.subOrderList?.length,
'请关联商品'
)
)
return
if (validateWithImmediateFeedback(!mainSelected?.length, '请选择主技师'))
return
if (
validateWithImmediateFeedback(
!confirmInfo?.serviceItemsList?.length,
'请选择服务项目'
)
)
return
wx.showModal({ wx.showModal({
title: '是否确认生成电子施工单', title: '是否确认生成电子施工单',
content: '请确认客户商品有无增减,服务项目是否完整。提交后不可修改客户商品、技师、服务项目', content:
'请确认客户商品有无增减,服务项目是否完整。提交后不可修改客户商品、技师、服务项目',
confirmText: '确认提交', confirmText: '确认提交',
confirmColor: '#347BFF', confirmColor: '#347BFF',
cancelText: '返回', cancelText: '返回',
complete: (res) => { complete: res => {
if (res.confirm) { if (res.confirm) {
const subOrderList = confirmInfo?.subOrderList?.map(val => { const subOrderList = confirmInfo?.subOrderList?.map(val => {
return { return {
subOrderCode: val.subOrderCode, subOrderCode: val.subOrderCode
} }
}) })
const allRelationList = goodsList?.map(val => { const allRelationList = goodsList?.map(val => {
val.constructionFlag = 2 val.constructionFlag = 2
confirmInfo?.subOrderList?.map(item => { confirmInfo?.subOrderList?.map(item => {
if (val.upgradeGoodsId == item.upgradeGoodsId) val.constructionFlag = 1 if (val.upgradeGoodsId == item.upgradeGoodsId)
val.constructionFlag = 1
}) })
return { return {
subOrderCode: val.subOrderCode, subOrderCode: val.subOrderCode,
...@@ -329,18 +378,21 @@ Page({ ...@@ -329,18 +378,21 @@ Page({
const mainTechnicianList = [ const mainTechnicianList = [
...(mainSelected?.map(val => ({ ...(mainSelected?.map(val => ({
id: val.id, id: val.id,
technicianId: val.id,
technicianName: val.staffName, technicianName: val.staffName,
technicianUuid: val.uuid, technicianUuid: val.uuid,
technicianType: 0 technicianType: 0
})) || []), })) || []),
...(deputySelected?.map(val => ({ ...(deputySelected?.map(val => ({
id: val.id, id: val.id,
technicianId: val.id,
technicianName: val.staffName, technicianName: val.staffName,
technicianUuid: val.uuid, technicianUuid: val.uuid,
technicianType: 1 technicianType: 1
})) || []) })) || [])
]; ]
const serviceItemsList = (confirmInfo?.serviceItemsList || []).reduce((acc, val) => { const serviceItemsList = (confirmInfo?.serviceItemsList || []).reduce(
(acc, val) => {
const details = (val?.detailList || []).map(it => ({ const details = (val?.detailList || []).map(it => ({
serviceItemsId: it.serviceItemsId, serviceItemsId: it.serviceItemsId,
serviceItemsName: it.serviceItemsName, serviceItemsName: it.serviceItemsName,
...@@ -351,24 +403,39 @@ Page({ ...@@ -351,24 +403,39 @@ Page({
serviceCost: it.serviceCost serviceCost: it.serviceCost
})) }))
return acc.concat(details) return acc.concat(details)
}, []) },
[]
)
let params = { let params = {
id: confirmInfo.id, id: confirmInfo.id,
constructionCode: confirmInfo.constructionCode, constructionCode: confirmInfo.constructionCode,
orderCode: confirmInfo.orderCode, orderCode: confirmInfo.orderCode,
reworkFlag: confirmInfo?.reworkFlag,// 是否返工 reworkFlag: confirmInfo?.reworkFlag, // 是否返工
subOrderList, subOrderList,
mainTechnicianList, mainTechnicianList,
serviceItemsList, serviceItemsList,
allRelationList // 传全部可选商品,区分是否需要施工 allRelationList // 传全部可选商品,区分是否需要施工
} }
if (requesting) return false
this.setData({
requesting: true
})
api.confirmConstruction(params).then(res => { api.confirmConstruction(params).then(res => {
let { code, message } = res let { code, message } = res
if (code == 0) { if (code == 0) {
wx.$router.redirectTo('repairOrderDetail', {id: confirmInfo.id, constructionCode: confirmInfo.constructionCode, orderCode: confirmInfo.orderCode}) wx.$router.redirectTo('repairOrderDetail', {
id: confirmInfo.id,
constructionCode: confirmInfo.constructionCode,
orderCode: confirmInfo.orderCode
})
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
}) })
} }
} }
...@@ -377,35 +444,25 @@ Page({ ...@@ -377,35 +444,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {}
}
}) })
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<view class="item goods"> <view class="item goods">
<view class="title"> <view class="title">
<view class="box">商品信息</view> <view class="box">商品信息</view>
<block wx:if="{{confirmInfo.reworkFlag != 1 && filter.btnPermissions(userPermissions, 'SHIGONGQUEREN')}}">
<block wx:if="{{!editGoodsFlag}}"> <block wx:if="{{!editGoodsFlag}}">
<view class="edit-btn" bindtap="handleEditGoods"> <view class="edit-btn" bindtap="handleEditGoods">
<image src="{{IMG_URL}}repair-order/relate-goods.png" mode=""/>关联商品 <image src="{{IMG_URL}}repair-order/relate-goods.png" mode=""/>关联商品
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
<view bindtap="handelGoodsConfirm">完成</view> <view bindtap="handelGoodsConfirm">完成</view>
</view> </view>
</block> </block>
</block>
</view> </view>
<view class="box"> <view class="box">
<block wx:for="{{goodsObj}}" wx:key="index"> <block wx:for="{{goodsObj}}" wx:key="index">
...@@ -68,6 +70,7 @@ ...@@ -68,6 +70,7 @@
<view class="item service"> <view class="item service">
<view class="title"> <view class="title">
<view class="box">施工单信息</view> <view class="box">施工单信息</view>
<block wx:if="{{filter.btnPermissions(userPermissions, 'SHIGONGQUEREN')}}">
<block wx:if="{{!editServiceFlag}}"> <block wx:if="{{!editServiceFlag}}">
<view class="edit-btn" bindtap="handleEditService">编辑</view> <view class="edit-btn" bindtap="handleEditService">编辑</view>
</block> </block>
...@@ -77,6 +80,7 @@ ...@@ -77,6 +80,7 @@
<view bindtap="handelServicesConfirm">完成</view> <view bindtap="handelServicesConfirm">完成</view>
</view> </view>
</block> </block>
</block>
</view> </view>
<view class="service-box"> <view class="service-box">
<block wx:if="{{!editServiceFlag}}"> <block wx:if="{{!editServiceFlag}}">
......
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
const IMG_URL = const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import api from '../../api' import api from '../../api'
import { uploadImg, getSceneById } from '~/api/api' import { uploadImg, getSceneById, staffPermissions } from '~/api/api'
import { setConfigInfo } from '~/store/index' import { setConfigInfo } from '~/store/index'
const app = getApp() const app = getApp()
let time = null
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -12,7 +13,7 @@ Page({ ...@@ -12,7 +13,7 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
detailInfo: {}, detailInfo: {},
reworkVisible: true, reworkVisible: false,
orderObj: [ orderObj: [
{ {
label: '施工单编号', label: '施工单编号',
...@@ -110,6 +111,10 @@ Page({ ...@@ -110,6 +111,10 @@ Page({
1: { 1: {
text: '已施工', text: '已施工',
color: '#35C376' color: '#35C376'
},
2: {
text: '客户返工',
color: '#35C376'
} }
}, },
outboundStatus: { outboundStatus: {
...@@ -122,16 +127,19 @@ Page({ ...@@ -122,16 +127,19 @@ Page({
color: '#35C376' color: '#35C376'
} }
}, },
userPermissions: [], // 人员权限 userPermissions: [] // 人员权限
}, },
onRoute(options) { onRoute(options) {
this.setData({ this.setData(
{
queryOptions: options queryOptions: options
}, () => { },
() => {
this.getDetail() this.getDetail()
this.getStaffPermissions() this.getStaffPermissions()
}) }
)
}, },
/** /**
...@@ -139,12 +147,15 @@ Page({ ...@@ -139,12 +147,15 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
if (options.id) { if (options.id) {
this.setData({ this.setData(
{
queryOptions: options queryOptions: options
}, () => { },
() => {
this.getDetail() this.getDetail()
this.getStaffPermissions() this.getStaffPermissions()
}) }
)
} }
if (options?.scene) { if (options?.scene) {
this.setSceneData(options.scene) this.setSceneData(options.scene)
...@@ -159,35 +170,11 @@ Page({ ...@@ -159,35 +170,11 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
// 人员权限 // 人员权限
getStaffPermissions() { getStaffPermissions() {
// 假数据开始
const res = {
code: 0,
data: [{
name: '施工确认',
code: 'SHIGONGQUEREN'
}, {
name: '完成施工',
code: 'WANCHENGSHIGONG'
}, {
name: '物料出库',
code: 'WULIAOCHUKU'
}, {
name: '审核施工单',
code: 'SHENHESHIGONGDAN'
}]
}
this.setData({
userPermissions: res.data
})
return
let { userInfo } = this.data let { userInfo } = this.data
staffPermissions({phone: userInfo?.phone}).then(res => { staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
...@@ -234,18 +221,62 @@ Page({ ...@@ -234,18 +221,62 @@ Page({
}) })
}, },
setTime() {
let _this = this
let { queryOptions } = _this.data
time = setTimeout(() => {
api
.getConstructionDetail({
id: queryOptions?.id,
constructionCode: queryOptions?.constructionCode
})
.then(res => {
let { code, data, message } = res
let { detailInfo } = this.data
this.setTime()
if (code == 0) {
if (data.startTime) {
data.startTime = new Date(data.startTime).format(
'yyyy-MM-dd hh:mm:ss'
)
}
_this.setData({
'detailInfo.outboundStatus': data?.outboundStatus,
'detailInfo.startTime': detailInfo.startTime
? detailInfo.startTime
: data.startTime // 页面操作选了开始施工时间不做更新,未选择取更新后的时间(出库时间)
})
if (data.outboundStatus == 1) time && clearTimeout(time)
} else {
wx.$util.showToast(message)
}
})
}, 10 * 1000)
},
// 获取施工单详情 // 获取施工单详情
getDetail(toTopFlag) { getDetail() {
let { queryOptions } = this.data let { queryOptions } = this.data
if (!queryOptions.id || !queryOptions.constructionCode) return if (!queryOptions.id || !queryOptions.constructionCode) return
wx.showLoading({
title: '加载中'
})
api api
.getConstructionDetail({ .getConstructionDetail({
id: queryOptions?.id, id: queryOptions?.id,
constructionCode: queryOptions?.constructionCode constructionCode: queryOptions?.constructionCode
}) })
.then(res => { .then(res => {
wx.hideLoading()
let { code, data, message } = res let { code, data, message } = res
let { detailInfo } = this.data
if (code == 0) { if (code == 0) {
// 未出库 轮询查订单状态,更新出库状态
if (data.outboundStatus == 0) {
this.setTime()
} else {
time && clearTimeout(time)
}
const mainTechnicianName = data?.mainTechnicianList?.find( const mainTechnicianName = data?.mainTechnicianList?.find(
val => val.technicianType == 0 val => val.technicianType == 0
)?.technicianName )?.technicianName
...@@ -271,17 +302,15 @@ Page({ ...@@ -271,17 +302,15 @@ Page({
'detailInfo.subTechnicianName': subTechnicianName, 'detailInfo.subTechnicianName': subTechnicianName,
'detailInfo.pictureList': data?.pictureList?.map(val => { 'detailInfo.pictureList': data?.pictureList?.map(val => {
return val.pictureUrl return val.pictureUrl
}) }),
'detailInfo.startTime': detailInfo.startTime
? detailInfo.startTime
: data.startTime // 页面操作选了开始施工时间不做更新,未选择取更新后的时间(出库时间)
}, },
() => { () => {
if (data?.startTime && data?.endTime) { if (data?.startTime && data?.endTime) {
this.calculateTimeDifference() this.calculateTimeDifference()
} }
if (toTopFlag) {
wx.pageScrollTo({
scrollTop: 0
})
}
} }
) )
} else { } else {
...@@ -351,6 +380,7 @@ Page({ ...@@ -351,6 +380,7 @@ Page({
// 物料出库确认 // 物料出库确认
handleOutboundConfirm(e) { handleOutboundConfirm(e) {
let { requesting } = this.data
let { subOrderList } = e.detail let { subOrderList } = e.detail
for (var i = 0; i < subOrderList.length; i++) { for (var i = 0; i < subOrderList.length; i++) {
if ((subOrderList[i]?.materialsUsed ?? '') === '') { if ((subOrderList[i]?.materialsUsed ?? '') === '') {
...@@ -377,6 +407,10 @@ Page({ ...@@ -377,6 +407,10 @@ Page({
outBoundTime: e.detail?.outBoundTime, outBoundTime: e.detail?.outBoundTime,
subOrderList: arr subOrderList: arr
} }
if (requesting) return false
this.setData({
requesting: true
})
api.outboundAPI(params).then(res => { api.outboundAPI(params).then(res => {
let { code, message } = res let { code, message } = res
if (code == 0) { if (code == 0) {
...@@ -389,10 +423,16 @@ Page({ ...@@ -389,10 +423,16 @@ Page({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
}) })
}, },
// 客户返工 // 客户返工
handleReworkConfirm(e) { handleReworkConfirm(e) {
let { requesting } = this.data
let { subOrderList } = e.detail let { subOrderList } = e.detail
for (var i = 0; i < subOrderList.length; i++) { for (var i = 0; i < subOrderList.length; i++) {
if ((subOrderList[i]?.materialsUsed ?? '') === '') { if ((subOrderList[i]?.materialsUsed ?? '') === '') {
...@@ -420,6 +460,10 @@ Page({ ...@@ -420,6 +460,10 @@ Page({
subOrderList: arr subOrderList: arr
} }
let { orderCode, constructionCode } = this.data.detailInfo let { orderCode, constructionCode } = this.data.detailInfo
if (requesting) return false
this.setData({
requesting: true
})
api.reworkAPI(params).then(res => { api.reworkAPI(params).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
...@@ -435,6 +479,11 @@ Page({ ...@@ -435,6 +479,11 @@ Page({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
}) })
}, },
...@@ -499,7 +548,7 @@ Page({ ...@@ -499,7 +548,7 @@ Page({
const minutesDiff = Math.floor(timeDiff / (1000 * 60)) const minutesDiff = Math.floor(timeDiff / (1000 * 60))
// 更新数据 // 更新数据
this.setData({ this.setData({
'detailInfo.constructionDuration': minutesDiff 'detailInfo.constructionDuration': `${minutesDiff}`
}) })
} catch (error) { } catch (error) {
console.error('时间计算错误:', error) console.error('时间计算错误:', error)
...@@ -615,10 +664,30 @@ Page({ ...@@ -615,10 +664,30 @@ Page({
} }
}) })
} }
if (!detailInfo?.startTime || !detailInfo?.endTime) if (!detailInfo?.startTime)
return wx.$util.showToast('请在页面中提交施工时间') return wx.$util.showToast('请在页面中提交施工时间')
if (!detailInfo?.pictureList?.length) if (!detailInfo?.pictureList?.length)
return wx.$util.showToast('请在页面中提交上传施工图片') return wx.$util.showToast('请在页面中提交上传施工图片')
if (!detailInfo.endTime) {
// 未选择施工结束时间取当前时间
this.setData(
{
'detailInfo.endTime': new Date().format('yyyy-MM-dd hh:mm:ss')
},
() => {
this.calculateTimeDifference() // 自动计算施工时长
this.submitData()
}
)
} else {
this.submitData()
}
},
submitData() {
let { detailInfo } = this.data
const pictureList = detailInfo?.pictureList?.map(val => { const pictureList = detailInfo?.pictureList?.map(val => {
return { return {
pictureUrl: val pictureUrl: val
...@@ -636,45 +705,70 @@ Page({ ...@@ -636,45 +705,70 @@ Page({
constructionDuration: detailInfo.constructionDuration, constructionDuration: detailInfo.constructionDuration,
pictureList: pictureList pictureList: pictureList
} }
wx.showLoading({
title: '加载中'
})
api api
.completeConstructionOrder(params) .completeConstructionOrder(params)
.then(res => { .then(res => {
wx.hideLoading()
let { code, message } = res let { code, message } = res
setTimeout(() => {
this.setData({ this.setData({
submitFlag: false submitFlag: false
}) })
}, 1000)
if (code == 0) { if (code == 0) {
wx.showToast({ wx.$router.redirectTo('repairOrderDetail', {
title: '完成施工', id: detailInfo.id,
icon: 'success' constructionCode: detailInfo.constructionCode,
orderCode: detailInfo.orderCode
}) })
this.getDetail(true)
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
}).catch(() => { })
.catch(() => {
wx.hideLoading()
setTimeout(() => {
this.setData({ this.setData({
submitFlag: false submitFlag: false
}) })
}, 1000)
}) })
}, },
// 审核施工单 // 审核施工单
checkOrder() { checkOrder() {
this.setData({
reviewVisible: true
})
},
reviewEvent(type) {
let { detailInfo } = this.data let { detailInfo } = this.data
wx.showModal({ if (this.data.reviewFlag) return
title: '审核施工单', this.setData({
content: '驻店零售/区域经理可审核每笔技师施工单的施工结果', reviewFlag: true
confirmColor: '#347BFF', })
confirmText: '审核通过', wx.showLoading({
cancelText: '不通过', title: '加载中'
success(res) { })
api.approvalRepairOrder({ api
.approvalRepairOrder({
id: detailInfo.id, id: detailInfo.id,
constructionCode: detailInfo.constructionCode, constructionCode: detailInfo.constructionCode,
approvalStatus: res.confirm ? 1 : res.cancel ? 2 : '' approvalStatus: type
}).then(result => { })
.then(result => {
wx.hideLoading()
this.reviewClose()
let { code, message } = result let { code, message } = result
setTimeout(() => {
this.setData({
reviewFlag: false
})
}, 1000)
if (code == 0) { if (code == 0) {
wx.$util.showToast('') wx.$util.showToast('')
wx.showToast({ wx.showToast({
...@@ -688,19 +782,46 @@ Page({ ...@@ -688,19 +782,46 @@ Page({
wx.$util.showToast(message) wx.$util.showToast(message)
} }
}) })
} .catch(() => {
wx.hideLoading()
setTimeout(() => {
this.setData({
reviewFlag: false
})
}, 1000)
})
},
// 审核通过
reviewConfirm() {
this.reviewEvent(1)
},
// 审核不通过
reviewCancel() {
this.reviewEvent(2)
},
// 关闭审核弹窗
reviewClose() {
this.setData({
reviewVisible: false
}) })
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() {
time && clearTimeout(time)
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() {
time && clearTimeout(time)
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
"usingComponents": { "usingComponents": {
"time-select": "../../components/timeSelect/index", "time-select": "../../components/timeSelect/index",
"outbound-popup": "../../components/outboundPopup/index", "outbound-popup": "../../components/outboundPopup/index",
"rework-popup": "../../components/reworkPopup/index" "rework-popup": "../../components/reworkPopup/index",
"review-popup": "../../components/reviewPopup/index"
}, },
"navigationBarTitleText": "施工单详情" "navigationBarTitleText": "施工单详情"
} }
...@@ -14,9 +14,11 @@ page { ...@@ -14,9 +14,11 @@ page {
color: #FFFFFF; color: #FFFFFF;
padding: var(--fontSize48) var(--fontSize40) var(--fontSize48) var(--fontSize60); padding: var(--fontSize48) var(--fontSize40) var(--fontSize48) var(--fontSize60);
box-sizing: border-box; box-sizing: border-box;
.user-info { .user-info {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
.hide-text { .hide-text {
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
...@@ -25,11 +27,13 @@ page { ...@@ -25,11 +27,13 @@ page {
text-overflow: ellipsis; text-overflow: ellipsis;
word-break: break-all; word-break: break-all;
} }
.car { .car {
font-size: var(--fontSize40); font-size: var(--fontSize40);
font-weight: 600; font-weight: 600;
margin-right: var(--fontSize8); margin-right: var(--fontSize8);
max-width: var(--fontSize400); max-width: var(--fontSize400);
image { image {
width: var(--fontSize40); width: var(--fontSize40);
height: var(--fontSize40); height: var(--fontSize40);
...@@ -37,28 +41,33 @@ page { ...@@ -37,28 +41,33 @@ page {
margin-top: var(--fontSize8); margin-top: var(--fontSize8);
} }
} }
.staff-name { .staff-name {
position: relative; position: relative;
background: none; background: none;
max-width: var(--fontSize242); max-width: var(--fontSize242);
&::before { &::before {
content: "("; content: "(";
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
} }
&::after { &::after {
content: ")"; content: ")";
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
.name { .name {
padding-right: 1.2em; padding-right: 1.2em;
text-indent: 1.2em; text-indent: 1.2em;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 限制显示两行 */ -webkit-line-clamp: 2;
/* 限制显示两行 */
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
word-break: break-all; word-break: break-all;
...@@ -67,14 +76,17 @@ page { ...@@ -67,14 +76,17 @@ page {
margin-bottom: var(--fontSize32); margin-bottom: var(--fontSize32);
} }
.content { .content {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.tips { .tips {
font-size: var(--fontSize24); font-size: var(--fontSize24);
margin-right: var(--fontSize50); margin-right: var(--fontSize50);
} }
.btn { .btn {
flex-shrink: 0; flex-shrink: 0;
padding: var(--fontSize8) var(--fontSize28); padding: var(--fontSize8) var(--fontSize28);
...@@ -83,6 +95,7 @@ page { ...@@ -83,6 +95,7 @@ page {
} }
} }
} }
.box { .box {
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10); box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10);
...@@ -90,12 +103,14 @@ page { ...@@ -90,12 +103,14 @@ page {
padding: var(--fontSize40) var(--fontSize40) var(--fontSize2); padding: var(--fontSize40) var(--fontSize40) var(--fontSize2);
position: relative; position: relative;
margin: var(--fontSize20) var(--fontSize20) 0; margin: var(--fontSize20) var(--fontSize20) 0;
.title { .title {
font-size: var(--fontSize32); font-size: var(--fontSize32);
color: #292D33; color: #292D33;
margin-bottom: var(--fontSize20); margin-bottom: var(--fontSize20);
position: relative; position: relative;
font-weight: 600; font-weight: 600;
&::after { &::after {
position: absolute; position: absolute;
content: ''; content: '';
...@@ -107,38 +122,47 @@ page { ...@@ -107,38 +122,47 @@ page {
transform: translateY(-50%); transform: translateY(-50%);
} }
} }
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.example { .example {
font-weight: 400; font-weight: 400;
color: #347BFF; color: #347BFF;
font-size: var(--fontSize26); font-size: var(--fontSize26);
} }
} }
.cell { .cell {
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #999EA8; color: #999EA8;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
margin-bottom: var(--fontSize32); margin-bottom: var(--fontSize32);
.label { .label {
flex-shrink: 0; flex-shrink: 0;
width: var(--fontSize208); width: var(--fontSize208);
} }
.value { .value {
color: #292D33; color: #292D33;
display: flex; display: flex;
flex-flow: wrap; flex-flow: wrap;
align-items: center; align-items: center;
} }
.placeholder { .placeholder {
color: #BEC1C7; color: #BEC1C7;
} }
.copy,.edit {
.copy,
.edit {
color: #347BFF; color: #347BFF;
margin-left: auto; margin-left: auto;
.image { .image {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
...@@ -146,10 +170,12 @@ page { ...@@ -146,10 +170,12 @@ page {
} }
} }
} }
.image-box { .image-box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: var(--fontSize32); margin-bottom: var(--fontSize32);
.tire-block { .tire-block {
width: var(--fontSize196); width: var(--fontSize196);
height: var(--fontSize196); height: var(--fontSize196);
...@@ -161,20 +187,25 @@ page { ...@@ -161,20 +187,25 @@ page {
text-align: center; text-align: center;
border-radius: var(--fontSize8); border-radius: var(--fontSize8);
overflow: hidden; overflow: hidden;
&:not(:nth-child(3n)) { &:not(:nth-child(3n)) {
margin-right: var(--fontSize20); margin-right: var(--fontSize20);
} }
&:nth-child(n+4) { &:nth-child(n+4) {
margin-top: var(--fontSize20); margin-top: var(--fontSize20);
} }
.tire-img-box { .tire-img-box {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
.tire-img { .tire-img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.icon-delete { .icon-delete {
position: absolute; position: absolute;
top: var(--fontSize12); top: var(--fontSize12);
...@@ -183,29 +214,35 @@ page { ...@@ -183,29 +214,35 @@ page {
height: var(--fontSize40); height: var(--fontSize40);
} }
} }
.icon-plus { .icon-plus {
width: var(--fontSize80); width: var(--fontSize80);
height: var(--fontSize80); height: var(--fontSize80);
} }
.plus-text { .plus-text {
color: #999EA8; color: #999EA8;
font-size: var(--fontSize28); font-size: var(--fontSize28);
} }
} }
} }
.service { .service {
padding-bottom: var(--fontSize16); padding-bottom: var(--fontSize16);
.category { .category {
padding-bottom: var(--fontSize8); padding-bottom: var(--fontSize8);
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #292D33; color: #292D33;
} }
.service-item { .service-item {
background: #F7F8FA; background: #F7F8FA;
border-radius: var(--fontSize12); border-radius: var(--fontSize12);
padding: var(--fontSize24); padding: var(--fontSize24);
font-size: var(--fontSize26); font-size: var(--fontSize26);
margin: var(--fontSize16) calc(-1 * var(--fontSize8)); margin: var(--fontSize16) calc(-1 * var(--fontSize8));
.name { .name {
color: #EA6612; color: #EA6612;
margin-bottom: var(--fontSize12); margin-bottom: var(--fontSize12);
...@@ -216,19 +253,23 @@ page { ...@@ -216,19 +253,23 @@ page {
text-overflow: ellipsis; text-overflow: ellipsis;
word-break: break-all; word-break: break-all;
} }
.bott { .bott {
display: flex; display: flex;
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #5A5E66; color: #5A5E66;
.split { .split {
margin: 0 var(--fontSize6); margin: 0 var(--fontSize6);
} }
} }
} }
.edit-item { .edit-item {
display: flex; display: flex;
align-items: center; align-items: center;
image { image {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
...@@ -237,6 +278,7 @@ page { ...@@ -237,6 +278,7 @@ page {
} }
} }
} }
.empty-box { .empty-box {
width: 100%; width: 100%;
font-size: var(--fontSize24); font-size: var(--fontSize24);
...@@ -244,27 +286,32 @@ page { ...@@ -244,27 +286,32 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
image { image {
width: var(--fontSize86); width: var(--fontSize86);
height: var(--fontSize86); height: var(--fontSize86);
margin-right: var(--fontSize16); margin-right: var(--fontSize16);
} }
} }
.goods { .goods {
margin: 0 calc(-1 * var(--fontSize8)); margin: 0 calc(-1 * var(--fontSize8));
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #292D33; color: #292D33;
padding-bottom: var(--fontSize32); padding-bottom: var(--fontSize32);
.goods-item { .goods-item {
padding: var(--fontSize24); padding: var(--fontSize24);
background: #F7F8FA; background: #F7F8FA;
border-radius: var(--fontSize12); border-radius: var(--fontSize12);
margin-bottom: var(--fontSize16); margin-bottom: var(--fontSize16);
position: relative; position: relative;
.goods-name { .goods-name {
width: calc(100% - var(--fontSize52)); width: calc(100% - var(--fontSize52));
padding-left: var(--fontSize28); padding-left: var(--fontSize28);
} }
&::after { &::after {
position: absolute; position: absolute;
width: var(--fontSize12); width: var(--fontSize12);
...@@ -276,24 +323,29 @@ page { ...@@ -276,24 +323,29 @@ page {
background: #347BFF; background: #347BFF;
border-radius: 100%; border-radius: 100%;
} }
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.bott { .bott {
margin-top: var(--fontSize12); margin-top: var(--fontSize12);
padding-left: var(--fontSize28); padding-left: var(--fontSize28);
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #999EA8; color: #999EA8;
.split { .split {
margin: 0 var(--fontSize6); margin: 0 var(--fontSize6);
} }
} }
} }
} }
.isFullSucreen-btn { .isFullSucreen-btn {
padding-bottom: 34px !important; padding-bottom: 34px !important;
} }
.btns { .btns {
position: fixed; position: fixed;
left: 0; left: 0;
...@@ -309,6 +361,7 @@ page { ...@@ -309,6 +361,7 @@ page {
font-weight: 500; font-weight: 500;
z-index: 99; z-index: 99;
flex-direction: column; flex-direction: column;
.tips_box { .tips_box {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -320,28 +373,33 @@ page { ...@@ -320,28 +373,33 @@ page {
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #FF9D0A; color: #FF9D0A;
background: #FEF5E7; background: #FEF5E7;
.tipsIcon { .tipsIcon {
flex-shrink: 0; flex-shrink: 0;
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize28); height: var(--fontSize28);
margin-right: var(--fontSize8); margin-right: var(--fontSize8);
} }
.contentText { .contentText {
margin-right: auto; margin-right: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }
.close-image { .close-image {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
} }
} }
.btns-con { .btns-con {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
padding: var(--fontSize10) 0; padding: var(--fontSize10) 0;
width: calc(100% - var(--fontSize80)); width: calc(100% - var(--fontSize80));
.confirm { .confirm {
border-radius: var(--fontSize12); border-radius: var(--fontSize12);
height: var(--fontSize80); height: var(--fontSize80);
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
<view class="main" style="padding-bottom: {{'var(--fontSize290)'}};"> <view class="main" style="padding-bottom: {{'var(--fontSize290)'}};">
<view class="status-box"> <view class="status-box">
<view class="user-info"> <view class="user-info">
<view class="car hide-text"><image wx:if="{{detailInfo.constructionStatus == 1}}" src="{{IMG_URL}}repair-order/complete.png" mode=""/>{{detailInfo.customer.carSeriesName || '无车型客户'}}</view> <view class="car hide-text">
<image wx:if="{{detailInfo.constructionStatus != 0}}" src="{{IMG_URL}}repair-order/complete.png" mode="" />{{detailInfo.customer.carSeriesName || '无车型客户'}}
</view>
<view class="staff-name"> <view class="staff-name">
<text class="name">{{detailInfo.customer.customerName || '-'}}</text> <text class="name">{{detailInfo.customer.customerName || '-'}}</text>
</view> </view>
...@@ -16,13 +18,13 @@ ...@@ -16,13 +18,13 @@
<view class="btn text-center" wx:if="{{detailInfo.outboundStatus != 1}}" bindtap="handleOutbound">物料出库</view> <view class="btn text-center" wx:if="{{detailInfo.outboundStatus != 1}}" bindtap="handleOutbound">物料出库</view>
</view> </view>
</block> </block>
<block wx:elif="{{detailInfo.constructionStatus == 1}}"> <block wx:else>
<view class="content"> <view class="content">
<view class="tips"> <view class="tips">
<view>完成施工,如客户返工请点击</view> <view>完成施工,如客户返工请点击</view>
<view wx:if="{{detailInfo.approvalStatus}}">{{detailInfo.approvalName}}已审核{{detailInfo.approvalStatus == 1 ? '通过' : '不通过'}}</view> <view wx:if="{{detailInfo.approvalStatus}}">{{detailInfo.approvalName}}已审核{{detailInfo.approvalStatus == 1 ? '通过' : '不通过'}}</view>
</view> </view>
<view class="btn text-center" bindtap="handleRedo" wx:if="{{filter.btnPermissions(userPermissions, 'WULIAOCHUKU')}}">客户返工</view> <view class="btn text-center" bindtap="handleRedo" wx:if="{{filter.btnPermissions(userPermissions, 'WULIAOCHUKU')&&detailInfo.effectiveFlag == 0}}">客户返工</view>
</view> </view>
</block> </block>
</view> </view>
...@@ -30,7 +32,7 @@ ...@@ -30,7 +32,7 @@
<view class="title infoTitle"> <view class="title infoTitle">
<view class="flex">施工单信息</view> <view class="flex">施工单信息</view>
</view> </view>
<block wx:for="{{ detailInfo.constructionStatus == 1 ? constructionOrderObj : orderObj }}" wx:key="index"> <block wx:for="{{ detailInfo.constructionStatus != 0 ? constructionOrderObj : orderObj }}" wx:key="index">
<view class="cell"> <view class="cell">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<block wx:if="{{ item.key == 'status' }}"> <block wx:if="{{ item.key == 'status' }}">
...@@ -85,9 +87,9 @@ ...@@ -85,9 +87,9 @@
</view> </view>
</view> </view>
</block> </block>
<block wx:elif="{{detailInfo.constructionStatus == 1}}"> <block wx:elif="{{detailInfo.constructionStatus != 0}}">
<view class="empty-box"> <view class="empty-box">
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode=""/> <image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode="" />
暂无数据 暂无数据
</view> </view>
</block> </block>
...@@ -121,7 +123,7 @@ ...@@ -121,7 +123,7 @@
</block> </block>
<block wx:else> <block wx:else>
<view class="empty-box"> <view class="empty-box">
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode=""/> <image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode="" />
暂无数据 暂无数据
</view> </view>
</block> </block>
...@@ -164,7 +166,7 @@ ...@@ -164,7 +166,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{(detailInfo.constructionStatus == 0 && filter.btnPermissions(userPermissions, 'WANCHENGSHIGONG')) || (detailInfo.constructionStatus == 1 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN'))}}"> <view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{(detailInfo.constructionStatus == 0 && filter.btnPermissions(userPermissions, 'WANCHENGSHIGONG')) || (detailInfo.constructionStatus != 0 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN'))}}">
<!-- 未施工 技师可操作 --> <!-- 未施工 技师可操作 -->
<block wx:if="{{detailInfo.constructionStatus == 0 && filter.btnPermissions(userPermissions, 'WANCHENGSHIGONG')}}"> <block wx:if="{{detailInfo.constructionStatus == 0 && filter.btnPermissions(userPermissions, 'WANCHENGSHIGONG')}}">
<view class="tips_box" wx:if="{{!hideOutTips && detailInfo.outboundStatus == 0}}"> <view class="tips_box" wx:if="{{!hideOutTips && detailInfo.outboundStatus == 0}}">
...@@ -186,7 +188,7 @@ ...@@ -186,7 +188,7 @@
</view> </view>
</block> </block>
<!-- 已施工/未审核 区域运营/驻店销售可操作 --> <!-- 已施工/未审核 区域运营/驻店销售可操作 -->
<block wx:if="{{detailInfo.constructionStatus == 1 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN')}}"> <block wx:if="{{detailInfo.constructionStatus != 0 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN')}}">
<view class="btns-con"> <view class="btns-con">
<view class="confirm text-center" bindtap="checkOrder">审核施工单</view> <view class="confirm text-center" bindtap="checkOrder">审核施工单</view>
</view> </view>
...@@ -194,13 +196,8 @@ ...@@ -194,13 +196,8 @@
</view> </view>
</view> </view>
</block> </block>
<time-select show="{{startTimeVisible}}" title="开始施工时间" defaultTime="{{detailInfo.startTime}}" isStartTime="{{true}}" endTime="{{detailInfo.endTime}}" bind:confirm="onStartTimeConfirm" bindcancel="onClosePicker"/> <time-select show="{{ startTimeVisible }}" title="开始施工时间" defaultTime="{{ detailInfo.startTime }}" isStartTime="{{ true }}" endTime="{{ detailInfo.endTime }}" bind:confirm="onStartTimeConfirm" bindcancel="onClosePicker" />
<time-select show="{{endTimeVisible}}" title="结束施工时间" defaultTime="{{detailInfo.endTime}}" isStartTime="{{false}}" startTime="{{detailInfo.startTime}}" bind:confirm="onEndTimeConfirm" bindcancel="onClosePicker" /> <time-select show="{{ endTimeVisible }}" title="结束施工时间" defaultTime="{{ detailInfo.endTime }}" isStartTime="{{ false }}" startTime="{{ detailInfo.startTime }}" bind:confirm="onEndTimeConfirm" bindcancel="onClosePicker" />
<outbound-popup show="{{outboundVisible}}" title="物料出库" detailInfo="{{detailInfo}}" bindcancel="handleOutboundCancel" bindconfirm="handleOutboundConfirm" userPermissions="{{userPermissions}}"></outbound-popup> <outbound-popup show="{{ outboundVisible }}" title="物料出库" detailInfo="{{ detailInfo }}" bindcancel="handleOutboundCancel" bindconfirm="handleOutboundConfirm" userPermissions="{{ userPermissions }}"></outbound-popup>
<rework-popup <rework-popup show="{{ reworkVisible }}" title="返工确认" detailInfo="{{ detailInfo }}" bindcancel="handleReworkCancel" bindconfirm="handleReworkConfirm"></rework-popup>
show="{{ reworkVisible }}" <review-popup show="{{reviewVisible}}" bindcancel="reviewCancel" bindconfirm="reviewConfirm" bindclose="reviewClose"></review-popup>
title="返工确认"
detailInfo="{{ detailInfo }}"
bindcancel="handleReworkCancel"
bindconfirm="handleReworkConfirm"
></rework-popup>
\ No newline at end of file \ No newline at end of file
...@@ -361,5 +361,9 @@ module.exports = { ...@@ -361,5 +361,9 @@ module.exports = {
// 根据主订单查询施工单列表 // 根据主订单查询施工单列表
listConstruction(data) { listConstruction(data) {
return api.post('dj.api.smartcarlife.construction.list.construction', data) return api.post('dj.api.smartcarlife.construction.list.construction', data)
},
// 获取园区店下角色名包含技师员工有效列表
getQYTechnicianList(data) {
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', data)
} }
} }
...@@ -43,6 +43,15 @@ Component({ ...@@ -43,6 +43,15 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
navto(e) {
let { item } = e.currentTarget.dataset
console.log(item, 'item')
let path = item.electronicFlag == 1 ? 'tabRepairOrder.repairOrderDetail' : 'tabRepairOrder.confirmWorkOrder'
wx.$router.go(path, {
...item
})
this.handleCancel()
},
selectType(e) { selectType(e) {
let { type } = e.currentTarget.dataset let { type } = e.currentTarget.dataset
this.setData({ this.setData({
...@@ -78,8 +87,8 @@ Component({ ...@@ -78,8 +87,8 @@ Component({
show: true, show: true,
tabTitleShow: true, tabTitleShow: true,
tapTitle: '查看客户施工单', tapTitle: '查看客户施工单',
success: res => {}, success: res => { },
error: () => {} error: () => { }
}, },
'#modal' '#modal'
) )
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<view class="modatcontent"> <view class="modatcontent">
<view wx:for="{{ constructionList }}" wx:for-item="item" wx:for-index="index" class="item" wx:key="index"> <view wx:for="{{ constructionList }}" wx:for-item="item" wx:for-index="index" class="item" wx:key="index">
<!-- bind:tap="handleDetail" --> <!-- bind:tap="handleDetail" -->
<view class="itembox"> <view class="itembox" bind:tap="navto" data-item="{{item}}">
<view class="subName">{{item.subGoodsName}}</view> <view class="subName">{{item.subGoodsName}}</view>
<view class="part"> <view class="part">
<view class="position">{{item.mainTechnician}}</view> <view class="position">{{item.mainTechnician}}</view>
<view class="statusBox" wx:if="{{ item.constructionStatus == 0 }}">已施工</view> <view class="statusBox" wx:if="{{ item.constructionStatus == 1||item.constructionStatus ==2 }}">已施工</view>
<view class="statusBox wait" wx:if="{{ item.constructionStatus == 1 }}">待施工</view> <view class="statusBox wait" wx:if="{{ item.constructionStatus == 0 }}">待施工</view>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
......
...@@ -29,7 +29,8 @@ Component({ ...@@ -29,7 +29,8 @@ Component({
data: { data: {
// selectType: 82, // selectType: 82,
constructionList: [], constructionList: [],
loading: false loading: false,
first: true
}, },
/** /**
...@@ -46,15 +47,18 @@ Component({ ...@@ -46,15 +47,18 @@ Component({
// let {constructionList} = this.data // let {constructionList} = this.data
let { index, value } = e.currentTarget.dataset let { index, value } = e.currentTarget.dataset
this.setData({ this.setData({
first: false,
['constructionList[' + index + '].constructionFlag']: value ['constructionList[' + index + '].constructionFlag']: value
}) })
}, },
handleOpen() { handleOpen() {
let { orderCode } = this.data let { orderCode, first } = this.data
api.listSubOrder({ orderCode }).then(res => { api.listSubOrder({ orderCode }).then(res => {
console.log(res.data, 'constructionList') console.log(res.data, 'constructionList')
first = res.data.every(item => ['1', '2', 1, 2].includes(item.constructionFlag))
this.setData({ this.setData({
constructionList: res.data constructionList: res.data,
first: !first
}) })
}) })
wx.$modal( wx.$modal(
...@@ -99,7 +103,7 @@ Component({ ...@@ -99,7 +103,7 @@ Component({
}) })
}) })
}, },
error: () => {} error: () => { }
}, },
'#modal' '#modal'
) )
...@@ -108,13 +112,60 @@ Component({ ...@@ -108,13 +112,60 @@ Component({
this.triggerEvent('cancel') this.triggerEvent('cancel')
}, },
handleConfirm() { handleConfirm() {
let { constructionList, orderCode } = this.data let { constructionList, orderCode, first, requesting } = this.data
if (constructionList.length == 0 || first) return false
if (constructionList.length > 0) { if (constructionList.length > 0) {
let flag = constructionList.some(item => item.constructionFlag == 1) let flag = constructionList.every(item => {
// console.log(item);
return ['1', '2', 1, 2].includes(item.constructionFlag)
})
// console.log(flag, 'constructionFlag');
if (!flag) { if (!flag) {
wx.$util.showToast('请最少选择一个施工商品') wx.$util.showToast('需要勾选全部施工商品')
return return
} }
// 如果全部不施工,直接调用接口
let no = constructionList.every(item => {
return item.constructionFlag == 2
})
if (no) {
const constructionInfoList = constructionList.map(val => {
return {
subOrderCode: val.subOrderCode,
upgradeGoodsId: val.upgradeGoodsId,
upgradeGoodsName: val.upgradeGoodsName,
constructionFlag: val.constructionFlag
}
})
let params = {
subOrderRelationList: constructionInfoList,
orderCode
// subOrderRelationList: []
}
if (requesting) return false
this.setData({
requesting: true
})
api.batchAdd(params).then(res => {
let { code, message } = res
if (code == 0) {
wx.$util.showToast('提交成功')
this.handleCancel()
let thisPage = wx.$router.getPageInstance()
thisPage.onRoute({ orderCode })
} else {
wx.$util.showToast(message)
}
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
})
return false
}
} }
this.handleCancel() this.handleCancel()
// this.triggerEvent('confirm', constructionList) // this.triggerEvent('confirm', constructionList)
......
...@@ -123,4 +123,8 @@ ...@@ -123,4 +123,8 @@
background: #347BFF; background: #347BFF;
margin-left: 24rpx; margin-left: 24rpx;
} }
.disabled {
background: #D0D2D6;
color: #FFFFFF;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -22,6 +22,6 @@ ...@@ -22,6 +22,6 @@
</view> </view>
<view class="btnbox"> <view class="btnbox">
<view class="btn cancel" bind:tap="handleCancel">取消</view> <view class="btn cancel" bind:tap="handleCancel">取消</view>
<view class="btn confirm" bind:tap="handleConfirm">下一步</view> <view class="btn confirm {{constructionList.length == '0' || first? 'disabled' : '' }}" bind:tap="handleConfirm">下一步</view>
</view> </view>
</modal> </modal>
\ No newline at end of file \ No newline at end of file
// tabWorkOrder/components/applyRefundBtn/applyRefundBtn.js // tabWorkOrder/components/applyRefundBtn/applyRefundBtn.js
import api from "~/api/api" import api from '~/api/api'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
orderInfo: Object orderInfo: Object,
showRefundBtn: Boolean,
updateFlag: Boolean
}, },
/** /**
...@@ -27,12 +28,15 @@ Component({ ...@@ -27,12 +28,15 @@ Component({
selectTap() { selectTap() {
let { orderInfo } = this.data let { orderInfo } = this.data
// 查询订单可展示按钮 // 查询订单可展示按钮
api.getMoreBtnAPI({orderCode: orderInfo.orderCode}).then(res => { api.getMoreBtnAPI({ orderCode: orderInfo.orderCode }).then(res => {
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
moreSelectData: this.filterMoreSelectData(data.refundApplyButton, data.refundApplyDetailButton), moreSelectData: this.filterMoreSelectData(
showSelect: !this.data.showSelect, data.refundApplyButton,
data.refundApplyDetailButton
),
showSelect: !this.data.showSelect
}) })
} }
}) })
...@@ -41,8 +45,8 @@ Component({ ...@@ -41,8 +45,8 @@ Component({
filterMoreSelectData(refundApplyButton, refundApplyDetailButton) { filterMoreSelectData(refundApplyButton, refundApplyDetailButton) {
const allOptions = ['申请退款', '退款详情'] const allOptions = ['申请退款', '退款详情']
const conditions = { const conditions = {
'申请退款': refundApplyButton === 'Y', 申请退款: refundApplyButton === 'Y',
'退款详情': refundApplyDetailButton === 'Y' 退款详情: refundApplyDetailButton === 'Y'
} }
return allOptions.filter(option => conditions[option]) return allOptions.filter(option => conditions[option])
}, },
...@@ -53,7 +57,13 @@ Component({ ...@@ -53,7 +57,13 @@ Component({
moreSelectIndex: null moreSelectIndex: null
}) })
}, },
tapConstruction() {
this.closeSelect()
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
sublistVisible: true
})
},
optionTap(e) { optionTap(e) {
let { index, item } = e.currentTarget.dataset let { index, item } = e.currentTarget.dataset
let { orderInfo } = this.data let { orderInfo } = this.data
...@@ -62,8 +72,13 @@ Component({ ...@@ -62,8 +72,13 @@ Component({
// 申请退款点击埋点 // 申请退款点击埋点
wx.$track.setTrackData(0, 'apply_refund_page', {}, '', 1) wx.$track.setTrackData(0, 'apply_refund_page', {}, '', 1)
// 退款申请时区域运营查询 // 退款申请时区域运营查询
api.areaSupervisionExistsAPI({merchantId: userInfo.shopMerchantId, sceneType: userInfo.sceneType}).then(res => { api
let { code, data, message} = res .areaSupervisionExistsAPI({
merchantId: userInfo.shopMerchantId,
sceneType: userInfo.sceneType
})
.then(res => {
let { code, data, message } = res
if (code == 0) { if (code == 0) {
if (!data) { if (!data) {
return this.setData({ return this.setData({
...@@ -72,7 +87,7 @@ Component({ ...@@ -72,7 +87,7 @@ Component({
}) })
} else { } else {
wx.navigateTo({ wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?orderCode=${orderInfo.orderCode}&shopMerchantName=${orderInfo.merchantName}&shopMerchantId=${orderInfo.merchantId}`, url: `/tabWorkOrder/pages/refundApply/refundApply?orderCode=${orderInfo.orderCode}&shopMerchantName=${orderInfo.merchantName}&shopMerchantId=${orderInfo.merchantId}`
}) })
this.closeSelect() this.closeSelect()
} }
...@@ -84,16 +99,18 @@ Component({ ...@@ -84,16 +99,18 @@ Component({
// 退款详情点击埋点 // 退款详情点击埋点
wx.$track.setTrackData(0, 'refund_detail_page', {}, '', 1) wx.$track.setTrackData(0, 'refund_detail_page', {}, '', 1)
// 点击退款详情,判断是否存在多条退款申请记录,存在跳转列表页,不存在直接跳转详情页 // 点击退款详情,判断是否存在多条退款申请记录,存在跳转列表页,不存在直接跳转详情页
api.getRefundDetailListAPI({orderCode: orderInfo.orderCode}).then(res => { api
.getRefundDetailListAPI({ orderCode: orderInfo.orderCode })
.then(res => {
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
if (data?.length > 1) { if (data?.length > 1) {
wx.navigateTo({ wx.navigateTo({
url: `/tabWorkOrder/pages/refundDetailList/refundDetailList?orderCode=${orderInfo.orderCode}`, url: `/tabWorkOrder/pages/refundDetailList/refundDetailList?orderCode=${orderInfo.orderCode}`
}) })
} else if (data.length == 1) { } else if (data.length == 1) {
wx.navigateTo({ wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${data[0].applyCode}`, url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${data[0].applyCode}`
}) })
} }
} }
...@@ -102,7 +119,7 @@ Component({ ...@@ -102,7 +119,7 @@ Component({
} }
this.setData({ this.setData({
moreSelectIndex: index, moreSelectIndex: index
// showSelect: !this.data.showSelect // showSelect: !this.data.showSelect
}) })
}, },
......
/* tabWorkOrder/components/applyRefundBtn/applyRefundBtn.wxss */ /* tabWorkOrder/components/applyRefundBtn/applyRefundBtn.wxss */
.select_box { .select_box {
position: relative; position: relative;
.select {
display: flex;
align-items: center;
}
.icon {
width: 32rpx;
height: 32rpx;
// margin-right: 7rpx;
}
.more-btn { .more-btn {
position: relative; position: relative;
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #347BFF; color: #347BFF;
font-weight: 400; font-weight: 400;
} }
.option_box{
.option_box {
position: absolute; position: absolute;
z-index: 1005; z-index: 1005;
top: var(--fontSize60); top: var(--fontSize60);
...@@ -18,7 +31,8 @@ ...@@ -18,7 +31,8 @@
box-shadow: 0 var(--fontSize4) var(--fontSize12) #0000000d; box-shadow: 0 var(--fontSize4) var(--fontSize12) #0000000d;
border-radius: var(--fontSize16); border-radius: var(--fontSize16);
overflow: hidden; overflow: hidden;
.option{
.option {
display: block; display: block;
height: var(--fontSize88); height: var(--fontSize88);
line-height: var(--fontSize88); line-height: var(--fontSize88);
...@@ -28,18 +42,22 @@ ...@@ -28,18 +42,22 @@
font-weight: 400; font-weight: 400;
font-size: var(--fontSize28); font-size: var(--fontSize28);
} }
.option:first-child{
.option:first-child {
border-radius: var(--fontSize16) var(--fontSize16) 0 0; border-radius: var(--fontSize16) var(--fontSize16) 0 0;
} }
.option:last-child{
.option:last-child {
border-radius: 0 0 var(--fontSize16) var(--fontSize16); border-radius: 0 0 var(--fontSize16) var(--fontSize16);
} }
.option.active{
.option.active {
background: #347bff1a; background: #347bff1a;
color: #347BFF; color: #347BFF;
} }
} }
.option_box::after{
.option_box::after {
height: 0; height: 0;
width: 0; width: 0;
content: ''; content: '';
...@@ -52,7 +70,8 @@ ...@@ -52,7 +70,8 @@
transform: rotate(90deg); transform: rotate(90deg);
filter: drop-shadow(0 var(--fontSize4) var(--fontSize8) #0000000d) filter: drop-shadow(0 var(--fontSize4) var(--fontSize8) #0000000d)
} }
.option_box::before{
.option_box::before {
height: 0; height: 0;
width: 0; width: 0;
content: ''; content: '';
...@@ -65,7 +84,8 @@ ...@@ -65,7 +84,8 @@
transform: rotate(90deg); transform: rotate(90deg);
filter: drop-shadow(0 var(--fontSize4) var(--fontSize8) #0000000d) filter: drop-shadow(0 var(--fontSize4) var(--fontSize8) #0000000d)
} }
.mask_class{
.mask_class {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background: transparent; background: transparent;
......
<!--tabWorkOrder/components/applyRefundBtn/applyRefundBtn.wxml--> <!--tabWorkOrder/components/applyRefundBtn/applyRefundBtn.wxml-->
<view class='select_box' > <view class="select_box">
<view class='select' catchtap='selectTap'> <view class="select" catchtap="selectTap">
<view class='more-btn'>更多</view> <gl-image class="icon" src="/miniProgram/more.png"></gl-image>
<view class="more-btn">更多</view>
</view> </view>
<view class='option_box' wx:if="{{showSelect}}"> <view class="option_box" wx:if="{{ showSelect }}">
<view class='option {{moreSelectIndex == index ? "active" : ""}}' wx:for='{{moreSelectData}}' wx:key='this' data-index='{{index}}' data-item="{{item}}" catchtap='optionTap'>{{item}}</view> <view class="option" wx:if="{{ updateFlag }}" catchtap="tapConstruction">修改施工</view>
<block wx:if="{{ showRefundBtn }}">
<view
class="option {{ moreSelectIndex == index ?'active' : '' }}"
wx:for="{{ moreSelectData }}"
wx:key="this"
data-index="{{ index }}"
data-item="{{ item }}"
catchtap="optionTap"
>{{item}}</view>
</block>
</view> </view>
<view class="mask_class" wx:if="{{showSelect}}" bindtap="closeSelect"></view> <view class="mask_class" wx:if="{{ showSelect }}" bindtap="closeSelect"></view>
</view> </view>
<area-operations-modal wx:if="{{areaOperationsFlag}}" isShow="{{areaOperationsFlag}}" bindclose="closeModal"></area-operations-modal>
\ No newline at end of file \ No newline at end of file
<area-operations-modal wx:if="{{ areaOperationsFlag }}" isShow="{{ areaOperationsFlag }}" bindclose="closeModal"></area-operations-modal>
\ No newline at end of file \ No newline at end of file
// tabRepairOrder/components/relateGoodsPop/index.js // tabRepairOrder/components/relateGoodsPop/index.js
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -10,15 +9,18 @@ Component({ ...@@ -10,15 +9,18 @@ Component({
baseConfigData: Object, baseConfigData: Object,
show: { show: {
type: Boolean, type: Boolean,
observer: function(n) { observer: function (n) {
if (n) { if (n) {
let {goodsList, selected} = this.data let { goodsList, selected } = this.data
goodsList?.map(val => { goodsList?.map(val => {
val.active = false val.active = false
if (selected?.findIndex(v => v.upgradeGoodsId == val.upgradeGoodsId) > -1) val.active = true if (
selected?.findIndex(v => v.subOrderCode == val.subOrderCode) > -1
)
val.active = true
return val return val
}) })
this.setData({goodsList}) this.setData({ goodsList })
} }
} }
} }
...@@ -27,9 +29,7 @@ Component({ ...@@ -27,9 +29,7 @@ Component({
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {},
},
/** /**
* 组件的方法列表 * 组件的方法列表
...@@ -39,7 +39,7 @@ Component({ ...@@ -39,7 +39,7 @@ Component({
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
let { goodsList } = this.data let { goodsList } = this.data
goodsList?.forEach(val => { goodsList?.forEach(val => {
if (val.upgradeGoodsId == item.upgradeGoodsId) val.active = !val.active if (val.subOrderCode == item.subOrderCode) val.active = !val.active
}) })
this.setData({ this.setData({
goodsList goodsList
......
/* tabRepairOrder/components/relateGoodsPop/index.wxss */ /* tabRepairOrder/components/relateGoodsPop/index.wxss */
.tips {
background: #FDECE9;
font-size: 28rpx;
color: #F24724;
line-height: 40rpx;
padding: 16rpx 40rpx;
margin-left: calc(-1 * var(--fontSize32));
width: 100%;
}
.goods-content { .goods-content {
width: calc(100% + var(--fontSize64)); width: calc(100% + var(--fontSize64));
height: 100%; height: calc(100% - var(--fontSize90));
margin-left: calc(-1 * var(--fontSize32)); margin-left: calc(-1 * var(--fontSize32));
.content { .content {
height: calc(100% - var(--fontSize104)); height: calc(100% - var(--fontSize104));
.box { .box {
border-bottom: var(--fontSize2) solid #EBEDF0; border-bottom: var(--fontSize2) solid #EBEDF0;
.itemBox { .itemBox {
display: flex; display: flex;
align-items: center; align-items: center;
.choose { .choose {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
margin: 0 var(--fontSize32); margin: 0 var(--fontSize32);
} }
.item { .item {
flex: 1; flex: 1;
justify-content: space-between; justify-content: space-between;
...@@ -27,17 +42,22 @@ ...@@ -27,17 +42,22 @@
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #888888; color: #888888;
position: relative; position: relative;
.labelWidth { .labelWidth {
width: calc(100% - var(--fontSize180)); width: calc(100% - var(--fontSize180));
} }
.value { .value {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.name { .name {
max-width: 85%; max-width: 85%;
width:calc(100vw - var(--fontSize100)) width: calc(100vw - var(--fontSize100));
color: #292D33;
} }
.text-hide { .text-hide {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
...@@ -48,13 +68,21 @@ ...@@ -48,13 +68,21 @@
} }
} }
} }
.selected-box { .selected-box {
text-align: center; text-align: center;
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #888888; color: #888888;
margin-top: var(--fontSize30); margin-top: var(--fontSize30);
text { text {
color: #347BFF; color: #347BFF;
} }
} }
} }
.nothing {
text-align: center;
margin-top: 30rpx;
}
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/relateGoodsPop/index.wxml--> <!--tabRepairOrder/components/relateGoodsPop/index.wxml-->
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="50%" bindcancel="cancel"> <popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="60%" bindcancel="cancel">
<view class="tips">
选定当前施工单的商品,未选的商品将自动创建第二笔施工单,可由不同技师负责施工
</view>
<view class="goods-content"> <view class="goods-content">
<scroll-view class="content" scroll-y show-scrollbar="{{false}}"> <scroll-view class="content" scroll-y show-scrollbar="{{false}}">
<block wx:if="{{goodsList.length > 0}}"> <block wx:if="{{goodsList.length > 0}}">
......
...@@ -150,7 +150,43 @@ var techicianName = function (array) { ...@@ -150,7 +150,43 @@ var techicianName = function (array) {
} }
return result return result
} }
var subStatus = function (constructionStatus) {
console.log(constructionStatus)
switch (constructionStatus) {
case 1:
case 2:
return 'constructionFlaged'
case 0:
return 'constructionFlaging'
case 3:
return ''
default:
return ''
}
// return 'constructionFlaging';
}
var subStatusName = function (constructionStatus) {
console.log(constructionStatus)
switch (constructionStatus) {
case 1:
case 2:
return '已施工'
case 0:
return '待施工'
case 3:
return ''
default:
return ''
}
}
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return false
}
/* /*
* 导出 * 导出
*/ */
...@@ -165,5 +201,8 @@ module.exports = { ...@@ -165,5 +201,8 @@ module.exports = {
filterOrderStatus: filterOrderStatus, filterOrderStatus: filterOrderStatus,
filterRefundDisabled: filterRefundDisabled, filterRefundDisabled: filterRefundDisabled,
activeNum: activeNum, activeNum: activeNum,
techicianName: techicianName techicianName: techicianName,
subStatus: subStatus,
subStatusName: subStatusName,
btnPermissions: btnPermissions
} }
...@@ -50,10 +50,10 @@ ...@@ -50,10 +50,10 @@
</view> </view>
<view class="meal-bd-bottom">{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}} <view class="meal-bd-bottom">{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}
<view class="count">x{{g.number}}</view> <view class="count">x{{g.number}}</view>
<view class="artificer" bindtap="selectArtificer" data-item="{{g}}"> <!-- <view class="artificer" bindtap="selectArtificer" data-item="{{g}}">
<text class="{{!g.technicianName ? 'grey_text' : ''}} 'text-hide'">{{g.technicianName || '选择技师'}}</text> <text class="{{!g.technicianName ? 'grey_text' : ''}} 'text-hide'">{{g.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -73,10 +73,10 @@ ...@@ -73,10 +73,10 @@
<view class="type">x{{item.number}}</view> <view class="type">x{{item.number}}</view>
</view> </view>
<!-- 太阳膜类且配置技师 不需要限制是太阳膜 && item.upgradeGoodsPosition--> <!-- 太阳膜类且配置技师 不需要限制是太阳膜 && item.upgradeGoodsPosition-->
<view wx:if="{{orderInfo.isOpenArtificer }}" class="artificer" bindtap="selectArtificer" data-item="{{item}}"> <!-- <view wx:if="{{orderInfo.isOpenArtificer }}" class="artificer" bindtap="selectArtificer" data-item="{{item}}">
<text class="{{!item.technicianName ? 'grey_text' : ''}} 'text-hide'">{{item.technicianName || '选择技师'}}</text> <text class="{{!item.technicianName ? 'grey_text' : ''}} 'text-hide'">{{item.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view> -->
</view> </view>
</view> </view>
</block> </block>
......
// tabWorkOrder/pages/orderDetail/orderDetail.js // tabWorkOrder/pages/orderDetail/orderDetail.js
import api from "../../api.js"; import api from '../../api.js'
import order_mixins, { data } from "../order_mixins.js"; import order_mixins, { data } from '../order_mixins.js'
import { getPositionList } from "~/store/index"; import { getPositionList } from '~/store/index'
import { checkDailyReport } from "~/store/ModalToQueueControl"; import { checkDailyReport } from '~/store/ModalToQueueControl'
import commonApi from '~/api/api' import commonApi from '~/api/api'
const IMG_URL = const IMG_URL =
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"; 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const app = getApp(); const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -20,11 +20,11 @@ Page({ ...@@ -20,11 +20,11 @@ Page({
qrHeight: 107, qrHeight: 107,
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
customerService: "", customerService: '',
defaultCustomerService: defaultCustomerService:
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/kf.png", 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/kf.png',
// defaultCustomerService: 'https://img01.glsx.com.cn/group1/M00/21/01/wKgFHWKEkeSAZRltAAED5CfS91o118.png', // defaultCustomerService: 'https://img01.glsx.com.cn/group1/M00/21/01/wKgFHWKEkeSAZRltAAED5CfS91o118.png',
failCustomerService: "../images/kfrefresh.png", failCustomerService: '../images/kfrefresh.png',
showTip: false, showTip: false,
warrantyCardVisible: true, warrantyCardVisible: true,
showRatingPopup: false, showRatingPopup: false,
...@@ -34,24 +34,30 @@ Page({ ...@@ -34,24 +34,30 @@ Page({
// 发票按钮 // 发票按钮
invoiceName: '申请开票', invoiceName: '申请开票',
invoiveVisible: false, invoiveVisible: false,
showMoreBtn: false showMoreBtn: false,
constructionVisible: false
},
constructionCancel() {
this.setData({
constructionVisible: false
})
}, },
RatingPopupSetting() { RatingPopupSetting() {
this.setData({ this.setData({
showRatingPopup: !this.data.showRatingPopup, showRatingPopup: !this.data.showRatingPopup
}); })
// 更新数据 // 更新数据
this.getOrderDetail(this.data.orderInfo.orderCode) this.getOrderDetail(this.data.orderInfo.orderCode)
}, },
jumpUserPortrait() { jumpUserPortrait() {
wx.$router.go("tabDate.userPortrait", this.data.orderInfo); wx.$router.go('tabDate.userPortrait', this.data.orderInfo)
}, },
selectTypeOrder(e) { selectTypeOrder(e) {
let { type } = e.currentTarget.dataset; let { type } = e.currentTarget.dataset
console.log(e, e.currentTarget.dataset, type); console.log(e, e.currentTarget.dataset, type)
this.setData({ this.setData({
selectTypeOrder: type, selectTypeOrder: type
}); })
}, },
blur(e) { blur(e) {
console.log(e) console.log(e)
...@@ -69,7 +75,7 @@ Page({ ...@@ -69,7 +75,7 @@ Page({
}, },
// 确定是否要显示 // 确定是否要显示
showWarranty(e) { showWarranty(e) {
let { item } = e.currentTarget.dataset; let { item } = e.currentTarget.dataset
this.setData({ this.setData({
warrantyEditObj: item, warrantyEditObj: item,
focus: true focus: true
...@@ -80,14 +86,15 @@ Page({ ...@@ -80,14 +86,15 @@ Page({
show: true, show: true,
title: '', title: '',
tabTitleShow: false, tabTitleShow: false,
success: (res) => { success: res => {
let { orderCode } = this.data let { orderCode } = this.data
api.modifyWarrantyPrice({ ...this.data.warrantyEditObj }).then((result) => { api
.modifyWarrantyPrice({ ...this.data.warrantyEditObj })
.then(result => {
wx.$util.showToast('更新成功') wx.$util.showToast('更新成功')
this.getOrderDetail(orderCode); this.getOrderDetail(orderCode)
}).catch((err) => { })
.catch(err => {})
});
// 跳转新增订单页面 并带特定参数 // 跳转新增订单页面 并带特定参数
// let { selectType } = this.data; // let { selectType } = this.data;
// if (selectType == 1) { // if (selectType == 1) {
...@@ -102,23 +109,23 @@ Page({ ...@@ -102,23 +109,23 @@ Page({
// }); // });
// } // }
}, },
error: () => { }, error: () => {}
}, },
"#modal4" '#modal4'
); )
}, },
// 确定是否要显示 // 确定是否要显示
showSelectTypeOrder({ scene = "", item = {} }) { showSelectTypeOrder({ scene = '', item = {} }) {
wx.$modal( wx.$modal(
this, this,
{ {
show: true, show: true,
title: "请选择录单入口", title: '请选择录单入口',
tabTitleShow: false, tabTitleShow: false,
success: (res) => { success: res => {
// 跳转新增订单页面 并带特定参数 // 跳转新增订单页面 并带特定参数
let { selectTypeOrder } = this.data; let { selectTypeOrder } = this.data
console.log(item, "showSelectType"); console.log(item, 'showSelectType')
// if (orderInfo?.selectPayType == 0) { // 解决战败进新建工单导致查询战败商品的问题 // if (orderInfo?.selectPayType == 0) { // 解决战败进新建工单导致查询战败商品的问题
// orderInfo.selectPayType = 2 // orderInfo.selectPayType = 2
// } // }
...@@ -126,41 +133,41 @@ Page({ ...@@ -126,41 +133,41 @@ Page({
this.setData({ showPromptDialog: true }) this.setData({ showPromptDialog: true })
} else { } else {
let orderInfo = this.deleteOrderInfo() let orderInfo = this.deleteOrderInfo()
wx.$router.go("tabWorkOrder.defeatOrder", { wx.$router.go('tabWorkOrder.defeatOrder', {
scene, scene,
...orderInfo, ...orderInfo
}); })
} }
}, },
error: () => { }, error: () => {}
}, },
"#modal3" '#modal3'
); )
}, },
deleteOrderInfo() { deleteOrderInfo() {
let { orderInfo } = this.data; let { orderInfo } = this.data
let copyOrderInfo = wx.$util.deepClone(orderInfo) let copyOrderInfo = wx.$util.deepClone(orderInfo)
copyOrderInfo.orderSource = 4 copyOrderInfo.orderSource = 4
let deleteList = [ let deleteList = [
"orderCode", 'orderCode',
"associateOrderCode", 'associateOrderCode',
"packageGoodsList", 'packageGoodsList',
"merchantDistributionList", 'merchantDistributionList',
"expenseCategoryList", 'expenseCategoryList',
"profitAllocatinList", 'profitAllocatinList',
"clientSignatureDTOList", 'clientSignatureDTOList',
"customerPhotos", 'customerPhotos',
"rating", 'rating',
"sellerName", 'sellerName',
"sellerUserId", 'sellerUserId',
"sellerMerchantName", 'sellerMerchantName',
"sellerMerchantId", 'sellerMerchantId',
"subOrderList", 'subOrderList',
"technicianList", 'technicianList',
"merchantExpenseDistributionList", 'merchantExpenseDistributionList'
]; ]
for (var i = 0; i < deleteList.length; i++) { for (var i = 0; i < deleteList.length; i++) {
copyOrderInfo[deleteList[i]] && delete copyOrderInfo[deleteList[i]]; copyOrderInfo[deleteList[i]] && delete copyOrderInfo[deleteList[i]]
} }
copyOrderInfo.againOrder = true copyOrderInfo.againOrder = true
return copyOrderInfo return copyOrderInfo
...@@ -186,66 +193,66 @@ Page({ ...@@ -186,66 +193,66 @@ Page({
}, },
// 跳转正确订单 // 跳转正确订单
redirectOrder() { redirectOrder() {
let { orderInfo } = this.data; let { orderInfo } = this.data
let _this = this; let _this = this
wx.$util.showLoading("加载中..."); wx.$util.showLoading('加载中...')
api api
.getOrderDetail({ .getOrderDetail({
orderCode: orderInfo.associatedOrderCode, orderCode: orderInfo.associatedOrderCode
}) })
.then((result) => { .then(result => {
// 根据不同状态和施工标志做对应跳转 // 根据不同状态和施工标志做对应跳转
let { code, data: item } = result; let { code, data: item } = result
if (code == 0) { if (code == 0) {
item.oldOrderCode = orderInfo.associatedOrderCode; item.oldOrderCode = orderInfo.associatedOrderCode
let name = let name =
item.status == 3 item.status == 3
? "confirmOrder" ? 'confirmOrder'
: item.status == 1 : item.status == 1
? "createOrder" ? 'createOrder'
: "orderDetail"; : 'orderDetail'
if (item.constructionFlag == "Y" && item.status != 10) { if (item.constructionFlag == 'Y' && item.status != 10) {
wx.$router.go("constructionOrderDetail", item); wx.$router.go('constructionOrderDetail', item)
} else { } else {
// console.log(item) // console.log(item)
// 解决错单能切换支付方式的问题 // 解决错单能切换支付方式的问题
// wx.$router.go(name, { ...item, associateOrderType: true }) // wx.$router.go(name, { ...item, associateOrderType: true })
wx.$router.go(name, { ...item }); wx.$router.go(name, { ...item })
} }
} }
}) })
.catch((err) => { .catch(err => {
console.log(err); console.log(err)
}); })
// wx.$router.redirectTo('constructionOrderDetail', { orderCode: orderInfo.associatedOrderCode }) // wx.$router.redirectTo('constructionOrderDetail', { orderCode: orderInfo.associatedOrderCode })
}, },
targetOperate() { targetOperate() {
let { showTip } = this.data; let { showTip } = this.data
this.setData({ this.setData({
showTip: !showTip, showTip: !showTip
}); })
}, },
selectType(e) { selectType(e) {
let { type } = e.currentTarget.dataset; let { type } = e.currentTarget.dataset
console.log(e, e.currentTarget.dataset, type); console.log(e, e.currentTarget.dataset, type)
this.setData({ this.setData({
selectType: type, selectType: type
}); })
}, },
// 确定是否要显示 // 确定是否要显示
async targetError() { async targetError() {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport()
if (staffCheck) return false; if (staffCheck) return false
wx.$modal(this, { wx.$modal(this, {
show: true, show: true,
title: "工单标记", title: '工单标记',
tabTitleShow: false, tabTitleShow: false,
success: (res) => { success: res => {
this.showErrorType(); this.showErrorType()
}, },
error: () => { }, error: () => {}
}); })
}, },
// 确定是否要显示 // 确定是否要显示
showErrorType() { showErrorType() {
...@@ -253,131 +260,196 @@ Page({ ...@@ -253,131 +260,196 @@ Page({
this, this,
{ {
show: true, show: true,
title: "请选择录单入口", title: '请选择录单入口',
tabTitleShow: false, tabTitleShow: false,
success: (res) => { success: res => {
// 跳转新增订单页面 并带特定参数 // 跳转新增订单页面 并带特定参数
let { orderInfo, selectType } = this.data; let { orderInfo, selectType } = this.data
console.log(orderInfo) console.log(orderInfo)
if (selectType == 1) { if (selectType == 1) {
orderInfo.associateOrderCode = orderInfo.orderCode; orderInfo.associateOrderCode = orderInfo.orderCode
delete orderInfo.orderCode; delete orderInfo.orderCode
if (orderInfo.technicianList) { if (orderInfo.technicianList) {
delete orderInfo.technicianList; delete orderInfo.technicianList
} }
orderInfo.selectPayType = 2; orderInfo.selectPayType = 2
let urlName = "createOrder"; let urlName = 'createOrder'
wx.$router.redirectTo(urlName, orderInfo); wx.$router.redirectTo(urlName, orderInfo)
} else { } else {
// 无需补录 // 无需补录
api api
.noNeedSupplementOrder({ oldOrderCode: orderInfo.orderCode }) .noNeedSupplementOrder({ oldOrderCode: orderInfo.orderCode })
.then((res) => { .then(res => {
console.log(res); console.log(res)
if (res.code == 0) { if (res.code == 0) {
wx.$util.refreshPageData(); wx.$util.refreshPageData()
wx.$router.go("pages.index"); wx.$router.go('pages.index')
this.setData({ this.setData({
modalShow: false, modalShow: false
}); })
wx.$modal(this, { show: false }, "#modal2"); wx.$modal(this, { show: false }, '#modal2')
} else { } else {
wx.$util.showToast(res.message); wx.$util.showToast(res.message)
} }
}) })
.catch((err) => { .catch(err => {
console.log(err); console.log(err)
}); })
} }
}, },
error: () => { }, error: () => {}
}, },
"#modal2" '#modal2'
); )
}, },
// 选择技师确认 // 选择技师确认
changeArtificer(e) { changeArtificer(e) {
let value = e?.detail || {}; let value = e?.detail || {}
let { orderInfo } = this.data; let { orderInfo } = this.data
orderInfo?.subOrderList?.forEach((val) => { orderInfo?.subOrderList?.forEach(val => {
if (val.subOrderCode == value?.subOrderCode) { if (val.subOrderCode == value?.subOrderCode) {
val.technicianName = value.technicianName; val.technicianName = value.technicianName
val.technicianUuid = value.technicianUuid; val.technicianUuid = value.technicianUuid
val.technicianId = value.technicianId; val.technicianId = value.technicianId
} }
}); })
let params = { let params = {
orderCode: orderInfo?.orderCode, orderCode: orderInfo?.orderCode,
subOrderCode: value?.subOrderCode, subOrderCode: value?.subOrderCode,
technicianName: value?.technicianName, technicianName: value?.technicianName,
technicianUuid: value?.technicianUuid, technicianUuid: value?.technicianUuid,
technicianId: value?.technicianId, technicianId: value?.technicianId
}; }
api.updateTechnicianInfo(params).then((res) => { api.updateTechnicianInfo(params).then(res => {
let { code, message } = res; let { code, message } = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
artificerSelectPopup: false, artificerSelectPopup: false,
artificerSelectObj: value, artificerSelectObj: value,
orderInfo, orderInfo
}); })
} else { } else {
wx.$util.showToast(message); wx.$util.showToast(message)
} }
}); })
}, },
// 选择技师 // 选择技师
selectArtificer(e) { selectArtificer(e) {
// 已施工完成不可操作 // 已施工完成不可操作
return; return
let { item } = e.currentTarget.dataset; let { item } = e.currentTarget.dataset
this.setData({ this.setData({
artificerSelectPopup: true, artificerSelectPopup: true,
artificerSelectObj: item, artificerSelectObj: item
}); })
}, },
jumpUpdate() { jumpUpdate() {
let { orderInfo } = this.data; let { orderInfo } = this.data
wx.$router.go("updateOrderInfo", orderInfo); wx.$router.go('updateOrderInfo', orderInfo)
}, },
async againOrder() { async againOrder() {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport()
if (staffCheck) return false; if (staffCheck) return false
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
// 新增订单 // 新增订单
this.showSelectTypeOrder(4); this.showSelectTypeOrder(4)
}, },
showAgain() { showAgain() {
this.setData({ this.setData({
showPopup: true, showPopup: true
}); })
},
showModal(e) {
let { btnname } = e.currentTarget.dataset
console.log(e, btnname)
this.setData({
[btnname]: true
})
}, },
setCopyData(e) { setCopyData(e) {
let { content } = e.currentTarget.dataset; let { content } = e.currentTarget.dataset
console.log(e, "e"); console.log(e, 'e')
wx.$util.setCopyData(`${content}`); wx.$util.setCopyData(`${content}`)
}, },
makePhoneCall(e) { makePhoneCall(e) {
let { data } = e.currentTarget.dataset; let { data } = e.currentTarget.dataset
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: data, phoneNumber: data
}); })
},
sublistCancel() {
this.setData({
sublistVisible: false
})
},
// 获取人员权限
getStaffPermissions() {
let { userInfo } = this.data
commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res
if (code == 0) {
this.setData({
userPermissions: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
showFlag(orderCode) {
const confirmFlagObj = {
0: {
showBtn: false
},
1: {
showBtn: '确认订单是否施工',
btnName: 'sublistVisible'
},
2: {
showBtn: '查看施工单',
btnName: 'constructionVisible'
}
}
//confirmFlag 确认施工单按钮:0-隐藏,1-展示确认按钮,2-展示查询按钮
// 用策略模式处理不同值会有不同展示和操作
api
.showFlag({
orderCode
})
.then(res => {
console.log(res)
let { code, message, data } = res
console.log('showFlag', res)
if (code == 0) {
this.setData({
confirmFlagObj: confirmFlagObj[data.confirmFlag],
updateFlag: data.updateFlag
})
}
})
.catch(err => {
console.log(err)
})
}, },
onRoute(options) { onRoute(options) {
// wx.$router.go("pages.index"); // wx.$router.go("pages.index");
console.log(options); console.log(options)
let {orderCode} = this.data
options.orderCode = options.orderCode || orderCode
// options.orderCode = '250908213534979' // options.orderCode = '250908213534979'
if (options.orderCode) { if (options.orderCode) {
this.setData({ this.setData({
orderCode: options.orderCode, orderCode: options.orderCode
}); })
this.getOrderDetail(options.orderCode); this.getOrderDetail(options.orderCode)
this.showFlag(options.orderCode)
// this.getGrass(options.orderCode) // this.getGrass(options.orderCode)
} }
}, },
...@@ -385,75 +457,88 @@ Page({ ...@@ -385,75 +457,88 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options); console.log(options)
// debugger // debugger
// options.orderCode = '250908213534979' // options.orderCode = '250908213534979'
if (options.orderCode) { if (options.orderCode) {
this.getOrderDetail(options.orderCode); this.getOrderDetail(options.orderCode)
this.showFlag(options.orderCode)
} }
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo()
let o = wx.$util.getStorageSync("dj_boutique_user_info"); let o = wx.$util.getStorageSync('dj_boutique_user_info')
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig); this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
this.getStaffPermissions()
this.setData({ this.setData({
userInfo: o, userInfo: o,
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7), isMake: !(
}); userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5 ||
userInfo?.loginRole == 6 ||
userInfo?.loginRole == 7
)
})
}, },
checkPhoneShow(config) { checkPhoneShow(config) {
console.log("config", config); console.log('config', config)
// 有就屏蔽手机号的显示 // 有就屏蔽手机号的显示
if (config) { if (config) {
let { customerObj } = this.data; let { customerObj } = this.data
delete customerObj[2]; delete customerObj[2]
this.setData({ this.setData({
customerObj, customerObj
}); })
} }
}, },
async getOrderDetail(orderCode) { async getOrderDetail(orderCode) {
let _this = this; let _this = this
const positionTypeList = (await getPositionList()) || []; const positionTypeList = (await getPositionList()) || []
wx.$util.showLoading("加载中..."); wx.$util.showLoading('加载中...')
api api
.getPackageGoodsDetail({ .getPackageGoodsDetail({
orderCode, orderCode
}) })
.then((res) => { .then(res => {
let { code, message, data } = res; let { code, message, data } = res
if (code == 0) { if (code == 0) {
wx.$util.hideLoading(); wx.$util.hideLoading()
if (data.selectPayType != 2 && (data.status == 4 || data.status == 6 || data.status == 12)) { if (
data.selectPayType != 2 &&
(data.status == 4 || data.status == 6 || data.status == 12)
) {
// 查询订单可展示按钮 // 查询订单可展示按钮
commonApi.getMoreBtnAPI({ orderCode: data.orderCode }).then(res => { commonApi.getMoreBtnAPI({ orderCode: data.orderCode }).then(res => {
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
showMoreBtn: data.refundApplyButton == "Y" || data.refundApplyDetailButton == 'Y' showMoreBtn:
data.refundApplyButton == 'Y' ||
data.refundApplyDetailButton == 'Y'
}) })
} }
}) })
} }
let couponName = data.customerCoupon let couponName = data.customerCoupon
? data.customerCoupon.couponName ? data.customerCoupon.couponName
: ""; : ''
let total_price = 0; let total_price = 0
let warrantyCardList = []; let warrantyCardList = []
data.subOrderList = data.subOrderList.filter( data.subOrderList = data.subOrderList.filter(
(item) => item.merchantGoodsId item => item.merchantGoodsId
); )
for (var i = 0; i < data?.subOrderList?.length; i++) { for (var i = 0; i < data?.subOrderList?.length; i++) {
let e = data?.subOrderList[i]; let e = data?.subOrderList[i]
total_price += e.totalPrice; total_price += e.totalPrice
e.price = Number( e.price = Number(
wx.$util.decimal(Number(e.totalPrice / e.number), 2) wx.$util.decimal(Number(e.totalPrice / e.number), 2)
).toFixed(2); ).toFixed(2)
e.positionStr = e.positionStr =
positionTypeList.filter( positionTypeList.filter(
(v) => v.positionValue == e.upgradeGoodsPosition v => v.positionValue == e.upgradeGoodsPosition
)[0]?.positionName || ""; )[0]?.positionName || ''
if ( if (
(e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) && (e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) &&
data.selectPayType != 0 data.selectPayType != 0
...@@ -463,31 +548,31 @@ Page({ ...@@ -463,31 +548,31 @@ Page({
goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName, goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName,
cardCode: e.cardCode, cardCode: e.cardCode,
warrantyPrice: e.warrantyPrice warrantyPrice: e.warrantyPrice
}); })
} }
} }
data?.packageGoodsList && data?.packageGoodsList &&
data.packageGoodsList.forEach((item) => { data.packageGoodsList.forEach(item => {
item.packageGoodsOrderList.forEach((g) => { item.packageGoodsOrderList.forEach(g => {
g.price = g.totalPrice g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number) ? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice; : g.upgradePrice
}); })
item.goodsList = item.packageGoodsOrderList; item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => { item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number); return prev + Number(cur.totalPrice) / Number(cur.number)
}, 0); }, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1; item.count = item.goodsList.length ? item.goodsList[0].number : 1
let total = item.price * item.count; let total = item.price * item.count
item.totalPrice = wx.$util.decimal(total, 2); item.totalPrice = wx.$util.decimal(total, 2)
item.packageGoodsOrderList.forEach((g) => { item.packageGoodsOrderList.forEach(g => {
g.positionStr = g.positionStr =
positionTypeList.filter( positionTypeList.filter(
(v) => v.positionValue == g.upgradeGoodsPosition v => v.positionValue == g.upgradeGoodsPosition
)[0]?.positionName || ""; )[0]?.positionName || ''
}); })
total_price += item.totalPrice; total_price += item.totalPrice
}); })
data = { data = {
...data.customer, ...data.customer,
...data.payOrder, ...data.payOrder,
...@@ -497,64 +582,65 @@ Page({ ...@@ -497,64 +582,65 @@ Page({
total_price: total_price:
data.selectPayType == 0 data.selectPayType == 0
? 0 ? 0
: Number(wx.$util.decimal(total_price, 2)).toFixed(2), : Number(wx.$util.decimal(total_price, 2)).toFixed(2)
}; }
if (data.customerCoupon) { if (data.customerCoupon) {
data.customerCoupon.customerCouponCode = data.customerCoupon.customerCouponCode =
data.customerCoupon.customerCouponCode.split("-")[0]; data.customerCoupon.customerCouponCode.split('-')[0]
} }
if (data.orderTime) if (data.orderTime)
data.time = new Date(data.orderTime).format("yyyy-MM-dd hh:mm:ss"); data.time = new Date(data.orderTime).format('yyyy-MM-dd hh:mm:ss')
if (data.customer && data.customer.carSeriesName) { if (data.customer && data.customer.carSeriesName) {
data.carType = `${data.customer.carBrand || ""}-${data.customer.carChildsBrandName || "" data.carType = `${data.customer.carBrand || ''}-${
}-${data.customer.carSeriesName || ""}`; data.customer.carChildsBrandName || ''
}-${data.customer.carSeriesName || ''}`
} }
// 处理订单是否显示 操作按钮 支付方式为pos和微信 并且订单状态是 4和6 // 处理订单是否显示 操作按钮 支付方式为pos和微信 并且订单状态是 4和6
// data.failureFlag != 'Y' // data.failureFlag != 'Y'
data.canOperate = data.canOperate =
[1, 3, 4].includes(data.selectPayType) && [1, 3, 4].includes(data.selectPayType) &&
[4, 6].includes(data.status); [4, 6].includes(data.status)
const orderInfo = data; const orderInfo = data
console.log(orderInfo); console.log(orderInfo)
const clientSignatureDTOList = const clientSignatureDTOList =
orderInfo.clientSignatureDTOList?.[0] || []; orderInfo.clientSignatureDTOList?.[0] || []
console.log(clientSignatureDTOList); console.log(clientSignatureDTOList)
const showRatingCard = const showRatingCard =
[6, 4, 2].includes(orderInfo.status) && [6, 4, 2].includes(orderInfo.status) &&
orderInfo.selectPayType != 0 && orderInfo.selectPayType != 0 &&
!clientSignatureDTOList.electronicSignature; !clientSignatureDTOList.electronicSignature
this.setData({ this.setData({
orderInfo: { ...clientSignatureDTOList, ...data }, orderInfo: { ...clientSignatureDTOList, ...data },
flag: true, flag: true,
warrantyCardList, warrantyCardList,
showRatingCard, showRatingCard,
invoiceName: data.invoiceStatus == 2 ? '查看发票' : '申请开票' invoiceName: data.invoiceStatus == 2 ? '查看发票' : '申请开票'
}); })
this.setQrBoxHeight(); this.setQrBoxHeight()
// 超时关闭的不显示客服码和 // 超时关闭的不显示客服码和
data.status != 10 && this.getWorkWechatLiveQRCode(); data.status != 10 && this.getWorkWechatLiveQRCode()
// 已评价的就不再显示评价码 战败也不显示 // 已评价的就不再显示评价码 战败也不显示
data.status != 6 && data.selectPayType != 0 && this.getQrCode(data); data.status != 6 && data.selectPayType != 0 && this.getQrCode(data)
// 条形码 // 条形码
warrantyCardList.length && this.getBarCode(); warrantyCardList.length && this.getBarCode()
this.getServiceBaseInfo(data.merchantId); this.getServiceBaseInfo(data.merchantId)
// if (data.status == 6) return // if (data.status == 6) return
// 校验是否显示二级流量方 // 校验是否显示二级流量方
if (data.subShopMerchantName) { if (data.subShopMerchantName) {
let { customerObj } = this.data; let { customerObj } = this.data
if ( if (
customerObj.findIndex( customerObj.findIndex(
(val) => val?.key && val.key == "subShopMerchantName" val => val?.key && val.key == 'subShopMerchantName'
) < 0 ) < 0
) { ) {
customerObj[customerObj.length - 2] = { customerObj[customerObj.length - 2] = {
label: "二级流量方", label: '二级流量方',
key: "subShopMerchantName", key: 'subShopMerchantName'
}; }
} }
this.setData({ this.setData({
customerObj, customerObj
}); })
} }
// 门店是否配置技师 // 门店是否配置技师
// if (data?.technicianConfigDTOList?.length > 0) { // if (data?.technicianConfigDTOList?.length > 0) {
...@@ -573,65 +659,65 @@ Page({ ...@@ -573,65 +659,65 @@ Page({
// }); // });
} else { } else {
wx.showModal({ wx.showModal({
title: "温馨提示", title: '温馨提示',
content: message, content: message,
showCancel: false, showCancel: false,
confirmText: "刷新", confirmText: '刷新',
confirmColor: "#347BFF", confirmColor: '#347BFF',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
_this.getOrderDetail(orderCode); _this.getOrderDetail(orderCode)
} }
},
});
} }
}); })
}
})
}, },
async getPackageGoodsDetail(orderCode) { async getPackageGoodsDetail(orderCode) {
try { try {
let params = { let params = {
orderCode, orderCode
}; }
let { total_price } = this.data.orderInfo; let { total_price } = this.data.orderInfo
const positionTypeList = (await getPositionList()) || []; const positionTypeList = (await getPositionList()) || []
api.getPackageGoodsDetail(params).then((res) => { api.getPackageGoodsDetail(params).then(res => {
res.data.packageGoodsList.forEach((item) => { res.data.packageGoodsList.forEach(item => {
item.packageGoodsOrderList.forEach((g) => { item.packageGoodsOrderList.forEach(g => {
g.price = g.totalPrice g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number) ? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice; : g.upgradePrice
}); })
item.goodsList = item.packageGoodsOrderList; item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => { item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number); return prev + Number(cur.totalPrice) / Number(cur.number)
}, 0); }, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1; item.count = item.goodsList.length ? item.goodsList[0].number : 1
let total = item.price * item.count; let total = item.price * item.count
item.totalPrice = wx.$util.decimal(total, 2); item.totalPrice = wx.$util.decimal(total, 2)
item.packageGoodsOrderList.forEach((g) => { item.packageGoodsOrderList.forEach(g => {
g.positionStr = g.positionStr =
positionTypeList.filter( positionTypeList.filter(
(v) => v.positionValue == g.upgradeGoodsPosition v => v.positionValue == g.upgradeGoodsPosition
)[0]?.positionName || ""; )[0]?.positionName || ''
}); })
total_price = Number(total_price) + Number(item.totalPrice); total_price = Number(total_price) + Number(item.totalPrice)
}); })
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
packageGoodsList: res.data.packageGoodsList, packageGoodsList: res.data.packageGoodsList,
"orderInfo.total_price": Number( 'orderInfo.total_price': Number(
wx.$util.decimal(total_price, 2) wx.$util.decimal(total_price, 2)
).toFixed(2), ).toFixed(2)
}); })
} }
}); })
} catch (err) { } } catch (err) {}
}, },
isArtificer(data) { isArtificer(data) {
let { customerObj, orderInfo } = this.data; let { customerObj, orderInfo } = this.data
orderInfo.isOpenArtificer = true; orderInfo.isOpenArtificer = true
orderInfo.technicianList = data || []; // 技师数据 orderInfo.technicianList = data || [] // 技师数据
// if (customerObj.findIndex(val => val?.key && val.key == 'technicianName') < 0) { // if (customerObj.findIndex(val => val?.key && val.key == 'technicianName') < 0) {
// customerObj[customerObj.length] = { // customerObj[customerObj.length] = {
// label: '选择技师:', // label: '选择技师:',
...@@ -641,126 +727,126 @@ Page({ ...@@ -641,126 +727,126 @@ Page({
this.setData({ this.setData({
artificerList: data, artificerList: data,
customerObj, customerObj,
orderInfo, orderInfo
}); })
}, },
getBarCode() { getBarCode() {
// warrantyCardList // warrantyCardList
let that = this; let that = this
let { warrantyCardList } = this.data; let { warrantyCardList } = this.data
warrantyCardList.forEach((element, index) => { warrantyCardList.forEach((element, index) => {
setTimeout(() => { setTimeout(() => {
// console.log(data.now()) // console.log(data.now())
api api
.createBarCode({ content: element.cardCode }) .createBarCode({ content: element.cardCode })
.then((result) => { .then(result => {
// console.log(index) // console.log(index)
// console.log(element.cardCode) // console.log(element.cardCode)
// console.log(result) // console.log(result)
let { code, data } = result; let { code, data } = result
// 待优化 应该都有之后再一次性更新 // 待优化 应该都有之后再一次性更新
// warrantyCardList[index].barCodeUrl = 'http://qcimg01.glsx.com.cn:7060/group1/M00/02/96/wKgD3mNXkD-ALMu3AAABmn9Id4c794.png' // warrantyCardList[index].barCodeUrl = 'http://qcimg01.glsx.com.cn:7060/group1/M00/02/96/wKgD3mNXkD-ALMu3AAABmn9Id4c794.png'
if (code == 0) { if (code == 0) {
warrantyCardList[index].barCodeUrl = data; warrantyCardList[index].barCodeUrl = data
} }
that.setData({ that.setData({
warrantyCardList, warrantyCardList
}); })
})
.catch(err => {})
}, 500 * index)
}) })
.catch((err) => { });
}, 500 * index);
});
}, },
getServiceBaseInfo(merchantId) { getServiceBaseInfo(merchantId) {
api.getServiceBaseInfo({ merchantId }).then((result) => { api.getServiceBaseInfo({ merchantId }).then(result => {
console.log(result, "result"); console.log(result, 'result')
let { data, code } = result; let { data, code } = result
console.log(data); console.log(data)
if (data.cardCodeFlag && data.cardCodeFlag == 1) { if (data.cardCodeFlag && data.cardCodeFlag == 1) {
this.setData({ this.setData({
warrantyCardVisible: false, warrantyCardVisible: false
}); })
} }
}); })
}, },
setQrBoxHeight() { setQrBoxHeight() {
const { orderInfo } = this.data; const { orderInfo } = this.data
let statusList = [2, 4, 6]; let statusList = [2, 4, 6]
if (statusList.includes(orderInfo.status) && orderInfo.selectPayType != 0) { if (statusList.includes(orderInfo.status) && orderInfo.selectPayType != 0) {
wx.$util.getViewInfo("#qr-view", () => { wx.$util.getViewInfo('#qr-view', () => {
this.setData({ this.setData({
// qrHeight: height, // qrHeight: height,
qrFlag: true, qrFlag: true
}); })
}); })
} }
}, },
showQrBox() { showQrBox() {
this.setData({ this.setData({
qrFlag: !this.data.qrFlag, qrFlag: !this.data.qrFlag
}); })
}, },
getQrCode() { getQrCode() {
// console.log('getQrcode') // console.log('getQrcode')
let data = this.data.orderInfo; let data = this.data.orderInfo
let appId = "wx06d1198e751435d1"; let appId = 'wx06d1198e751435d1'
let path = let path =
"packagePersonal/pages/boutiquePages/boutiqueInstall/boutiqueInstall"; 'packagePersonal/pages/boutiquePages/boutiqueInstall/boutiqueInstall'
let scene = `orderCode=${data.orderCode}&merchantId=${data.merchantId}`; let scene = `orderCode=${data.orderCode}&merchantId=${data.merchantId}`
// B端小程序调用接口生成领券码时,传参userId用uuid,类型由int变string // B端小程序调用接口生成领券码时,传参userId用uuid,类型由int变string
api api
.createWeappQrcode({ .createWeappQrcode({
qrcodeType: "QR_WXA_UNLIMIT", qrcodeType: 'QR_WXA_UNLIMIT',
appId, appId,
channelType: 1, channelType: 1,
path, path,
scene, scene
}) })
.then((qr) => { .then(qr => {
if (qr.data) { if (qr.data) {
this.setData({ this.setData({
qr: qr.data, qr: qr.data
}); })
} }
this.setData({ this.setData({
qrFlag: true, qrFlag: true
}); })
}); })
}, },
keepGoing(type) { keepGoing(type) {
let { orderInfo } = this.data; let { orderInfo } = this.data
orderInfo.orderSource = type; orderInfo.orderSource = type
// delete orderInfo.orderCode // delete orderInfo.orderCode
// 去除掉错误订单对应的关联码 // 去除掉错误订单对应的关联码
// delete orderInfo.associateOrderCode // delete orderInfo.associateOrderCode
// 1031车膜下单版本 再次下单去掉商品信息 需重新选择 // 1031车膜下单版本 再次下单去掉商品信息 需重新选择
let deleteList = [ let deleteList = [
"orderCode", 'orderCode',
"associateOrderCode", 'associateOrderCode',
"packageGoodsList", 'packageGoodsList',
"merchantDistributionList", 'merchantDistributionList',
"expenseCategoryList", 'expenseCategoryList',
"profitAllocatinList", 'profitAllocatinList',
"clientSignatureDTOList", 'clientSignatureDTOList',
"customerPhotos", 'customerPhotos',
"rating", 'rating',
"sellerName", 'sellerName',
"sellerUserId", 'sellerUserId',
"sellerMerchantName", 'sellerMerchantName',
"sellerMerchantId", 'sellerMerchantId',
"subOrderList", 'subOrderList',
"technicianList", 'technicianList',
"merchantExpenseDistributionList", 'merchantExpenseDistributionList'
]; ]
for (var i = 0; i < deleteList.length; i++) { for (var i = 0; i < deleteList.length; i++) {
// console.log(arr[i]) // console.log(arr[i])
orderInfo[deleteList[i]] && delete orderInfo[deleteList[i]]; orderInfo[deleteList[i]] && delete orderInfo[deleteList[i]]
} }
orderInfo.againOrder = true; orderInfo.againOrder = true
// console.log(orderInfo); // console.log(orderInfo);
// return // return
wx.$router.redirectTo("createOrder", orderInfo); wx.$router.redirectTo('createOrder', orderInfo)
// merchantDistributionList,expenseCategoryList,profitAllocatinList // merchantDistributionList,expenseCategoryList,profitAllocatinList
}, },
// previewImage(e) { // previewImage(e) {
...@@ -784,43 +870,43 @@ Page({ ...@@ -784,43 +870,43 @@ Page({
// }, // },
getWorkWechatLiveQRCode() { getWorkWechatLiveQRCode() {
this.setData({ this.setData({
customerService: "", customerService: ''
}); })
// setTimeout(() => { // setTimeout(() => {
let { failCustomerService, defaultCustomerService } = this.data; let { failCustomerService, defaultCustomerService } = this.data
let { let {
orderCode, orderCode,
customerPhone: phoneNumber, customerPhone: phoneNumber,
selectPayType, selectPayType
} = this.data.orderInfo; } = this.data.orderInfo
// console.log(orderCode, phoneNumber, selectPayType) // console.log(orderCode, phoneNumber, selectPayType)
// 订单状态 1-升级订单 2-战败订单 // 订单状态 1-升级订单 2-战败订单
let orderType = selectPayType == 0 ? 2 : 1; let orderType = selectPayType == 0 ? 2 : 1
api api
.getWorkWechatLiveQRCode({ orderCode, phoneNumber, orderType }) .getWorkWechatLiveQRCode({ orderCode, phoneNumber, orderType })
.then((result) => { .then(result => {
let { code, data: url, message } = result; let { code, data: url, message } = result
console.log(url); console.log(url)
if (code == 0 && url) { if (code == 0 && url) {
this.setData({ this.setData({
customerService: url, customerService: url
}); })
} else { } else {
// console.log(defaultCustomerService) // console.log(defaultCustomerService)
this.setData({ this.setData({
customerService: defaultCustomerService, customerService: defaultCustomerService
}); })
} }
// else { // else {
// wx.$util.showToast(message) // wx.$util.showToast(message)
// } // }
}) })
.catch((err) => { .catch(err => {
// console.log(err) // console.log(err)
this.setData({ this.setData({
customerService: failCustomerService, customerService: failCustomerService
}); })
}); })
// }, 3000) // }, 3000)
}, },
...@@ -841,11 +927,13 @@ Page({ ...@@ -841,11 +927,13 @@ Page({
orderCode: orderInfo.orderCode orderCode: orderInfo.orderCode
} }
wx.$util.showLoading() wx.$util.showLoading()
commonApi.getOrderCode(params).then(res => { commonApi
.getOrderCode(params)
.then(res => {
let { invoiceInfo, invoiceIssueQrcode } = res.data let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) { if (invoiceInfo) {
// 开票成功、开票失败 // 开票成功、开票失败
wx.$router.go("tabWorkOrder.invoiceResult", { wx.$router.go('tabWorkOrder.invoiceResult', {
obj: { obj: {
// code - 0000:成功;其他:失败 // code - 0000:成功;其他:失败
code: invoiceInfo.code, code: invoiceInfo.code,
...@@ -861,52 +949,55 @@ Page({ ...@@ -861,52 +949,55 @@ Page({
* 未开发票 * 未开发票
* invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。 * invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。
* */ * */
!invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", { !invoiceIssueQrcode
? this.handleSelectInvoice()
: wx.$router.go('tabWorkOrder.invoiceCode', {
obj: invoiceIssueQrcode obj: invoiceIssueQrcode
}) })
} }
}).finally(() => { })
.finally(() => {
wx.$util.hideLoading() wx.$util.hideLoading()
}) })
}, },
previewImage(e) { previewImage(e) {
let { url, index } = e.currentTarget.dataset; let { url, index } = e.currentTarget.dataset
let urlList = url.map((v) => { let urlList = url.map(v => {
return v.payVoucher; return v.payVoucher
}); })
wx.previewImage({ wx.previewImage({
urls: urlList, urls: urlList,
current: urlList[index], current: urlList[index]
}); })
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { }, onReady: function () {},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function (options) { onShow: function (options) {
console.log(this.data); console.log(this.data)
let code = this.data.orderCode || ""; let code = this.data.orderCode || ''
const selectInvoiceObj = getApp().globalData.selectInvoiceObj; const selectInvoiceObj = getApp().globalData.selectInvoiceObj
if (selectInvoiceObj?.isOpen) { if (selectInvoiceObj?.isOpen) {
this.handleSelectInvoice() this.handleSelectInvoice()
} }
delete getApp().globalData?.selectInvoiceObj; // 使用后清除 delete getApp().globalData?.selectInvoiceObj // 使用后清除
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { }, onHide: function () {},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () { }, onUnload: function () {},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
...@@ -921,5 +1012,5 @@ Page({ ...@@ -921,5 +1012,5 @@ Page({
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { }, onReachBottom: function () {}
}); })
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal", "select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal",
"apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn", "apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn",
"order-prompt-popup": "/components/orderPromptPop/orderPromptPop", "order-prompt-popup": "/components/orderPromptPop/orderPromptPop",
"ConstructionDetailModal": "/tabWorkOrder/components/ConstructionDetailModal/ConstructionDetailModal" "ConstructionDetailModal": "/tabWorkOrder/components/ConstructionDetailModal/ConstructionDetailModal",
"sublist-modal": "/tabWorkOrder/components/SublistModal/SublistModal"
} }
} }
...@@ -4,7 +4,8 @@ page { ...@@ -4,7 +4,8 @@ page {
} }
.main { .main {
padding-bottom: var(--fontSize160); padding-bottom: var(--fontSize210);
overflow: scroll;
} }
.status-box { .status-box {
...@@ -236,17 +237,43 @@ page { ...@@ -236,17 +237,43 @@ page {
font-size: var(--fontSize24); font-size: var(--fontSize24);
} }
.constructionFlaged {
width: var(--fontSize62);
height: var(--fontSize26);
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize18);
color: #35C376;
border: 1px solid #35C376;
line-height: var(--fontSize26);
text-align: center;
border-radius: var(--fontSize4);
}
.constructionFlaging {
width: var(--fontSize62);
height: var(--fontSize26);
line-height: var(--fontSize26);
text-align: center;
border: 1px solid #FF9D0A;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 18rpx;
color: #FF9D0A;
border-radius: var(--fontSize4);
}
.artificer { .artificer {
height: var(--fontSize48); // height: var(--fontSize48);
background: #FFFFFF; // background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3; // border: var(--fontSize1) solid #DEE0E3;
border-radius: var(--fontSize26); // border-radius: var(--fontSize26);
display: flex; // display: flex;
align-items: center; // align-items: center;
justify-content: center; // justify-content: center;
padding: 0 var(--fontSize24); // padding: 0 var(--fontSize24);
color: #292D33; // color: #292D33;
font-size: var(--fontSize24); // font-size: var(--fontSize24);
margin-left: auto; margin-left: auto;
} }
...@@ -436,8 +463,9 @@ page { ...@@ -436,8 +463,9 @@ page {
.isFullSucreen { page .isFullSucreen {
padding-bottom: var(--fontSize228) !important; box-sizing: border-box;
padding-bottom: var(--fontSize310) !important;
} }
.isFullSucreen-btn { .isFullSucreen-btn {
...@@ -731,8 +759,17 @@ page { ...@@ -731,8 +759,17 @@ page {
box-sizing: border-box; box-sizing: border-box;
/* min-height: var(--fontSize100); */ /* min-height: var(--fontSize100); */
background-color: #fff; background-color: #fff;
padding-bottom: var(--fontSize10);
padding-top: 24rpx;
padding: 0 var(--fontSize32); .btn {
height: var(--fontSize80);
background: #347BFF;
border-radius: var(--fontSize12);
font-size: var(--fontSize28);
color: #FFFFFF;
margin: 0 var(--fontSize32);
}
} }
...@@ -745,6 +782,7 @@ page { ...@@ -745,6 +782,7 @@ page {
color: #347BFF; color: #347BFF;
font-size: var(--fontSize24); font-size: var(--fontSize24);
font-weight: 600; font-weight: 600;
justify-content: center;
} }
.btn-box .checkBtn { .btn-box .checkBtn {
......
...@@ -5,16 +5,16 @@ ...@@ -5,16 +5,16 @@
<block wx:if="{{ flag }}"> <block wx:if="{{ flag }}">
<view <view
class="main {{ isFullSucreen?'isFullSucreen':'' }}" class="main {{ isFullSucreen?'isFullSucreen':'' }}"
style="{{ showRatingPopup ? 'overflow: hidden;height:100vh;' : '' }}" style="{{ sublistVisible||constructionVisible ? 'overflow: hidden;height:100vh;' : '' }}"
> >
<view class="status-box"> <view class="status-box">
<view class="userInfo" hover-class="none" hover-stop-propagation="false"> <view class="userInfo" hover-class="none" hover-stop-propagation="false">
<image class="" src="../../images/activeIcon.png" /> <image class="" src="../../images/activeIcon.png" />
<view class="customerName">客户{{orderInfo.customerName}}</view> <view class="customerName">客户{{orderInfo.customerName}}</view>
<!-- wx:if="{{ orderInfo.constructionFlag !='Y' }}" --> <!-- wx:if="{{ orderInfo.constructionFlag !='Y' }}" -->
<block> <!-- <block>
<view class="signBtn text-center" bindtap="RatingPopupSetting">查看签名/施工图</view> <view class="signBtn text-center" bindtap="RatingPopupSetting">查看签名/施工图</view>
</block> </block> -->
</view> </view>
<view class="orderContainer"> <view class="orderContainer">
<!-- 已微信通知客户前往取车, --> <!-- 已微信通知客户前往取车, -->
...@@ -57,10 +57,11 @@ ...@@ -57,10 +57,11 @@
<view class="meal-bd-bottom"> <view class="meal-bd-bottom">
{{g.positionStr || g.upgradeGoodsTypeName}} {{g.positionStr || g.upgradeGoodsTypeName}}
<view class="count">x{{g.number}}</view> <view class="count">x{{g.number}}</view>
<view wx:if="{{ g.technicianName }}" class="artificer disabled"> <view class="artificer {{ filter.subStatus(g.constructionStatus) }}">{{filter.subStatusName(g.constructionStatus)}}</view>
<!-- <view wx:if="{{ g.technicianName }}" class="artificer disabled">
<text class="{{ !g.technicianName ? 'grey_text' : '' }} 'text-hide'">{{g.technicianName }}</text> <text class="{{ !g.technicianName ? 'grey_text' : '' }} 'text-hide'">{{g.technicianName }}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -88,11 +89,12 @@ ...@@ -88,11 +89,12 @@
<text class="'text-hide'">{{item.filmRollNo}}</text> <text class="'text-hide'">{{item.filmRollNo}}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view>
<view class="artificer {{ filter.subStatus(item.constructionStatus) }}">{{filter.subStatusName(item.constructionStatus)}}</view>
<!-- 技师 --> <!-- 技师 -->
<view wx:if="{{ item.technicianName }}" class="artificer disabled" data-item="{{ item }}"> <!-- <view wx:if="{{ item.technicianName }}" class="artificer disabled" data-item="{{ item }}">
<text class="{{ !item.technicianName ? 'grey_text' : '' }} 'text-hide'">{{item.technicianName }}</text> <text class="{{ !item.technicianName ? 'grey_text' : '' }} 'text-hide'">{{item.technicianName }}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view> -->
</view> </view>
</view> </view>
</block> </block>
...@@ -125,8 +127,12 @@ ...@@ -125,8 +127,12 @@
<gl-image class="icon" src="/icon-invoice.png"></gl-image> <gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}} {{invoiceName}}
</view> </view>
<view wx:if="{{ isStaff && showMoreBtn }}"> <view>
<apply-refund-btn orderInfo="{{ orderInfo }}"></apply-refund-btn> <apply-refund-btn
updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}"
orderInfo="{{ orderInfo }}"
showRefundBtn="{{ isStaff && showMoreBtn }}"
></apply-refund-btn>
</view> </view>
</view> </view>
</view> </view>
...@@ -311,16 +317,33 @@ ...@@ -311,16 +317,33 @@
</view> </view>
</block> </block>
</view> </view>
<!-- <block wx:if="{{ orderInfo.failureFlag == 'Y'&&isMake && orderInfo.associatedOrderCode }}"> -->
<!-- <view class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
</view> -->
<!-- </block> -->
<view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<block wx:if="{{ orderInfo.failureFlag == 'Y'&&isMake && orderInfo.associatedOrderCode }}"> <block wx:if="{{ orderInfo.failureFlag == 'Y'&&isMake && orderInfo.associatedOrderCode }}">
<!-- <view class="btn text-center" bindtap="showAgain">继续下单</view> -->
<view class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="tips"> <view class="tips">
<image class="tipsIcon" src="../../../images/tips.png" /> <image class="tipsIcon" src="../../../images/tips.png" />
<view class="contentText">该订单录入信息有误,点击跳转正确工单页面。</view> <view class="contentText">该订单录入信息有误,点击跳转正确工单页面。</view>
<view class="checkBtn" bindtap="redirectOrder">去查看</view> <view class="checkBtn" bindtap="redirectOrder">去查看</view>
</view> </view>
</view>
</block> </block>
<!-- <view class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view> -->
<view
wx:if="{{ confirmFlagObj.btnName == 'constructionVisible' }}"
class="btn text-center"
data-btnName="{{ confirmFlagObj.btnName }}"
bindtap="showModal"
>{{confirmFlagObj.showBtn}}</view>
<view
wx:if="{{ confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}"
class="btn text-center"
data-btnName="{{ confirmFlagObj.btnName }}"
bindtap="showModal"
>{{confirmFlagObj.showBtn}}</view>
</view>
</block> </block>
<modal id="modal3" class="modal" custom="true" btns="{{ ['取消','确定'] }}"> <modal id="modal3" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
<view class="modatcontent"> <view class="modatcontent">
...@@ -397,3 +420,15 @@ ...@@ -397,3 +420,15 @@
includesChildHeight="var(--fontSize1020);" includesChildHeight="var(--fontSize1020);"
sceneObj="{{ orderInfo }}" sceneObj="{{ orderInfo }}"
></order-prompt-popup> ></order-prompt-popup>
<ConstructionDetailModal
visible="{{ constructionVisible }}"
orderInfo="{{ orderInfo }}"
orderCode="{{ orderInfo.orderCode }}"
bindcancel="constructionCancel"
></ConstructionDetailModal>
<sublist-modal
visible="{{ sublistVisible }}"
orderInfo="{{ orderInfo }}"
orderCode="{{ orderInfo.orderCode }}"
bindcancel="sublistCancel"
></sublist-modal>
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,6 @@ const IMG_URL = ...@@ -4,7 +4,6 @@ const IMG_URL =
import commonApi from '~/api/api' import commonApi from '~/api/api'
import { setConfigInfo, getPositionList } from '~/store/index' import { setConfigInfo, getPositionList } from '~/store/index'
import api from '~/tabWorkOrder/api' import api from '~/tabWorkOrder/api'
import { deepClone } from '../../../miniprogram_npm/glsk-applet-component/utils'
const app = getApp() const app = getApp()
Page({ Page({
/** /**
...@@ -231,7 +230,8 @@ Page({ ...@@ -231,7 +230,8 @@ Page({
copySubOrderRelationList, copySubOrderRelationList,
orderCode, orderCode,
confirmInfo, confirmInfo,
subOrderRelationList subOrderRelationList,
requesting
} = this.data } = this.data
console.log(subOrderRelationList, 'copySubOrderRelationList') console.log(subOrderRelationList, 'copySubOrderRelationList')
subOrderRelationList = wx.$util.deepClone(subOrderRelationList) subOrderRelationList = wx.$util.deepClone(subOrderRelationList)
...@@ -282,11 +282,45 @@ Page({ ...@@ -282,11 +282,45 @@ Page({
delete item.confirmInfo delete item.confirmInfo
return item return item
}) })
let params = { let params = {
constructionInfoList: subOrderRelationList, constructionInfoList: subOrderRelationList,
orderCode, orderCode,
subOrderRelationList: copySubOrderRelationList subOrderRelationList: copySubOrderRelationList
} }
let checkFlag = false
for (let index = 0; index < subOrderRelationList.length; index++) {
const item = subOrderRelationList[index]
// Check if the sub-order has associated products
if (!item.subOrderList.length) {
wx.$util.showToast(`施工单${index + 1}关联商品不能为空`)
checkFlag = true
break // Move to the next index
}
// Check if the sub-order has a main technician
if (!item.mainTechnicianList.length) {
wx.$util.showToast(`施工单${index + 1}主技师不能为空`)
checkFlag = true
break // Move to the next index
}
// Check if the sub-order has service items
if (!item.serviceItemsList.length) {
wx.$util.showToast(`施工单${index + 1}服务项目不能为空`)
checkFlag = true
break // Move to the next index
}
}
console.log(params, 'params')
if (requesting || checkFlag) return false
this.setData({
requesting: true
})
console.log(params, 'confirmInfo') console.log(params, 'confirmInfo')
api.batchAdd(params).then(res => { api.batchAdd(params).then(res => {
let { code, data, message } = res let { code, data, message } = res
...@@ -298,6 +332,11 @@ Page({ ...@@ -298,6 +332,11 @@ Page({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
}) })
}, },
backup() { backup() {
...@@ -344,7 +383,7 @@ Page({ ...@@ -344,7 +383,7 @@ Page({
if (goodsList.length > 0) { if (goodsList.length > 0) {
tabList.push('施工单' + (tabList.length + 1)) tabList.push('施工单' + (tabList.length + 1))
let obj = { let obj = {
servicesList: copyServicesList, servicesList: wx.$util.deepClone(copyServicesList),
mainSelected: [], mainSelected: [],
deputySelected: [] deputySelected: []
} }
...@@ -594,7 +633,8 @@ Page({ ...@@ -594,7 +633,8 @@ Page({
return return
} }
// 切换tab 重新赋值刷新数据 // 切换tab 重新赋值刷新数据
const currentTabIndex = e?.detail || 0 const currentTabIndex =
e?.detail !== undefined && e?.detail !== null ? e.detail : tabIndex
console.log(tabIndex, currentTabIndex, 'tabIndex') console.log(tabIndex, currentTabIndex, 'tabIndex')
subOrderRelationList[tabIndex] = wx.$util.deepClone({ subOrderRelationList[tabIndex] = wx.$util.deepClone({
...subOrderRelationList[tabIndex], ...subOrderRelationList[tabIndex],
...@@ -624,7 +664,7 @@ Page({ ...@@ -624,7 +664,7 @@ Page({
getTechnicianList() { getTechnicianList() {
let { userInfo } = this.data let { userInfo } = this.data
// 获取技师数据 // 获取技师数据
commonApi api
.getQYTechnicianList({ .getQYTechnicianList({
yqMerchantId: !userInfo?.isSuper yqMerchantId: !userInfo?.isSuper
? wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId ? wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
......
...@@ -21,6 +21,12 @@ page { ...@@ -21,6 +21,12 @@ page {
overflow: hidden; overflow: hidden;
margin-top: var(--fontSize20); margin-top: var(--fontSize20);
} }
.techic-value {
display: flex;
align-items: center;
justify-content: flex-end;
}
} }
...@@ -292,6 +298,7 @@ page { ...@@ -292,6 +298,7 @@ page {
} }
.item-box { .item-box {
box-sizing: border-box;
background: #F7F8FA; background: #F7F8FA;
border-radius: var(--fontSize12); border-radius: var(--fontSize12);
padding: var(--fontSize24) var(--fontSize32) var(--fontSize24) var(--fontSize24); padding: var(--fontSize24) var(--fontSize32) var(--fontSize24) var(--fontSize24);
...@@ -300,9 +307,10 @@ page { ...@@ -300,9 +307,10 @@ page {
justify-content: space-between; justify-content: space-between;
margin-bottom: var(--fontSize16); margin-bottom: var(--fontSize16);
&:last-child { // &:last-child {
margin-bottom: 0; // margin-bottom: 0;
} // }
.cellBox { .cellBox {
width: calc(100% - var(--fontSize56)); width: calc(100% - var(--fontSize56));
...@@ -322,6 +330,9 @@ page { ...@@ -322,6 +330,9 @@ page {
.other { .other {
color: #5A5E66; color: #5A5E66;
font-size: var(--fontSize24); font-size: var(--fontSize24);
.split {
margin: 0 var(--fontSize6);
}
} }
} }
...@@ -344,6 +355,11 @@ page { ...@@ -344,6 +355,11 @@ page {
} }
} }
} }
.active {
border: 2rpx solid #347BFF;
background: #347bff14;
}
} }
.bottom { .bottom {
......
...@@ -87,12 +87,12 @@ ...@@ -87,12 +87,12 @@
</view> </view>
<block wx:for="{{ item.detailList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex"> <block wx:for="{{ item.detailList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view hidden="{{ !item.showItemFlag }}" class="mt"> <view hidden="{{ !item.showItemFlag }}" class="mt">
<view class="item-box"> <view class="item-box {{i.active?'active':''}}">
<view class="cellBox"> <view class="cellBox">
<view class="ser-name text-hide">{{i.serviceItemsName}}</view> <view class="ser-name text-hide">{{i.serviceItemsName}}</view>
<view class="other"> <view class="other">
<text>用料标准{{i.materialStandard}}米/件</text> <text>用料标准{{i.materialStandard}}米/件</text>
| <text class="split">|</text>
<text>施工标准{{i.timeStandard}}min</text> <text>施工标准{{i.timeStandard}}min</text>
</view> </view>
</view> </view>
......
...@@ -17,6 +17,8 @@ Page({ ...@@ -17,6 +17,8 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
...order_mixins.data, ...order_mixins.data,
allNoConstruction: true,
userPermissions: [], // 权限数组
showTips: true, showTips: true,
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
...@@ -176,7 +178,24 @@ Page({ ...@@ -176,7 +178,24 @@ Page({
phoneNumber: data phoneNumber: data
}) })
}, },
// 获取人员权限
getStaffPermissions() {
let { userInfo } = this.data
commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res
if (code == 0) {
this.setData({
userPermissions: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
async onRoute(options) { async onRoute(options) {
let { orderCode } = this.data
options.orderCode = options.orderCode || orderCode
if (options.orderCode) { if (options.orderCode) {
// 获取配置服务数据 // 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData) let baseConfigData = await setConfigInfo(app.globalData)
...@@ -223,6 +242,7 @@ Page({ ...@@ -223,6 +242,7 @@ Page({
userInfo.loginRole == 7 userInfo.loginRole == 7
) )
}) })
this.getStaffPermissions()
}, },
showFlag(orderCode) { showFlag(orderCode) {
const confirmFlagObj = { const confirmFlagObj = {
...@@ -247,10 +267,11 @@ Page({ ...@@ -247,10 +267,11 @@ Page({
.then(res => { .then(res => {
console.log(res) console.log(res)
let { code, message, data } = res let { code, message, data } = res
console.log('showFlag', res); console.log('showFlag', res)
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
confirmFlagObj: confirmFlagObj[data.confirmFlag] confirmFlagObj: confirmFlagObj[data.confirmFlag],
updateFlag: data.updateFlag
}) })
} }
}) })
...@@ -270,7 +291,8 @@ Page({ ...@@ -270,7 +291,8 @@ Page({
}, },
async getOrderDetail(orderCode) { async getOrderDetail(orderCode) {
let _this = this let _this = this
let { signatureSwitch, baseConfigData } = _this.data
let { signatureSwitch, baseConfigData, allNoConstruction } = _this.data
const positionTypeList = (await getPositionList()) || [] const positionTypeList = (await getPositionList()) || []
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
...@@ -322,7 +344,14 @@ Page({ ...@@ -322,7 +344,14 @@ Page({
let total_price = 0 let total_price = 0
let warrantyCardList = [] let warrantyCardList = []
for (var i = 0; i < data?.subOrderList?.length; i++) { for (var i = 0; i < data?.subOrderList?.length; i++) {
if (true) {
}
let e = data?.subOrderList[i] let e = data?.subOrderList[i]
// 判断是否全为无需施工
if (e.constructionStatus != 3) {
allNoConstruction = false
}
total_price += e.totalPrice total_price += e.totalPrice
e.price = Number( e.price = Number(
wx.$util.decimal(Number(e.totalPrice / e.number), 2) wx.$util.decimal(Number(e.totalPrice / e.number), 2)
...@@ -364,6 +393,10 @@ Page({ ...@@ -364,6 +393,10 @@ Page({
g.price = g.totalPrice g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number) ? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice : g.upgradePrice
// 判断是否全为无需施工
if (g.constructionStatus != 3) {
allNoConstruction = false
}
}) })
item.goodsList = item.packageGoodsOrderList item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => { item.price = item.goodsList.reduce((prev, cur) => {
...@@ -405,6 +438,7 @@ Page({ ...@@ -405,6 +438,7 @@ Page({
} }
this.setData({ this.setData({
allNoConstruction,
orderInfo: data, orderInfo: data,
flag: true, flag: true,
warrantyCardList, warrantyCardList,
......
...@@ -5,6 +5,7 @@ page { ...@@ -5,6 +5,7 @@ page {
.hildden { .hildden {
height: 100vh; height: 100vh;
overflow: hidden;
} }
.copyImage, .copyImage,
...@@ -140,17 +141,44 @@ page { ...@@ -140,17 +141,44 @@ page {
} }
.artificer { .artificer {
height: var(--fontSize48); // height: var(--fontSize48);
background: #FFFFFF; // background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3; // border: var(--fontSize1) solid #DEE0E3;
border-radius: var(--fontSize26); // border-radius: var(--fontSize26);
display: flex; // display: flex;
align-items: center; // align-items: center;
justify-content: center; // justify-content: center;
padding: 0 var(--fontSize24); // padding: 0 var(--fontSize24);
color: #292D33; // color: #292D33;
font-size: var(--fontSize24); // font-size: var(--fontSize24);
margin-left: auto; margin-left: auto;
}
.constructionFlaged {
width: var(--fontSize62);
height: var(--fontSize26);
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize18);
color: #35C376;
border: 1px solid #35C376;
line-height: var(--fontSize26);
text-align: center;
border-radius: var(--fontSize4);
}
.constructionFlaging {
width: var(--fontSize62);
height: var(--fontSize26);
line-height: var(--fontSize26);
text-align: center;
border: 1px solid #FF9D0A;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 18rpx;
color: #FF9D0A;
border-radius: var(--fontSize4);
} }
.artificer text { .artificer text {
...@@ -335,6 +363,7 @@ page { ...@@ -335,6 +363,7 @@ page {
min-height: var(--fontSize100); min-height: var(--fontSize100);
background: #FFFFFF; background: #FFFFFF;
padding-bottom: var(--fontSize10); padding-bottom: var(--fontSize10);
padding-top: 24rpx;
} }
.btn-box .tips { .btn-box .tips {
...@@ -731,3 +760,7 @@ page { ...@@ -731,3 +760,7 @@ page {
.meal-bd-bottom .count { .meal-bd-bottom .count {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
} }
.warrantyCardList {
margin-bottom: 120rpx;
}
\ No newline at end of file \ No newline at end of file
...@@ -3,10 +3,18 @@ ...@@ -3,10 +3,18 @@
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<!-- wx:if="{{flag}}" --> <!-- wx:if="{{flag}}" -->
<block> <block>
<view class="main {{ sublistVisible?'hildden':''}} {{ isFullSucreen?'isFullSucreen':'' }}"> <view class="main {{ sublistVisible||constructionVisible?'hildden':''}} {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="status-box" wx:if="{{ orderInfo.status!=10&&orderInfo.status!=9 }}"> <view class="status-box" wx:if="{{ orderInfo.status!=10&&orderInfo.status!=9 }}">
<block wx:if="{{allNoConstruction}}" >
<view class="content">客户已付款</view> <view class="content">客户已付款</view>
<view class="tips">技师施工完毕后,点击完成施工按钮可通知车主前来取车</view> <view class="tips">订单无需施工,如需要请在本页面工单-更多修改为需要施工</view>
</block>
<block wx:else>
<view class="content">客户已付款</view>
<view class="tips">请确认订单是否施工,并选择施工服务项目,将产生施工单</view>
</block>
</view> </view>
<view class="status-box" wx:if="{{ orderInfo.status == 10 }}"> <view class="status-box" wx:if="{{ orderInfo.status == 10 }}">
<view class="content">订单关闭</view> <view class="content">订单关闭</view>
...@@ -14,7 +22,6 @@ ...@@ -14,7 +22,6 @@
</view> </view>
<view class="status-box" wx:if="{{ orderInfo.status == 9 }}"> <view class="status-box" wx:if="{{ orderInfo.status == 9 }}">
<view class="content">订单已撤销</view> <view class="content">订单已撤销</view>
<!-- <view class="tips">客户支付超过24小时,系统自动关闭订单</view> -->
</view> </view>
<view class="box"> <view class="box">
<!-- <view class="title">礼券信息</view> --> <!-- <view class="title">礼券信息</view> -->
...@@ -45,10 +52,11 @@ ...@@ -45,10 +52,11 @@
<view class="meal-bd-bottom"> <view class="meal-bd-bottom">
{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}} {{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}
<view class="count">x{{g.number}}</view> <view class="count">x{{g.number}}</view>
<view class="artificer" bindtap="selectArtificer" data-item="{{ g }}"> <view class="artificer {{ filter.subStatus(g.constructionStatus) }}">{{filter.subStatusName(g.constructionStatus)}}</view>
<!-- <view class="artificer" bindtap="selectArtificer" data-item="{{ g }}">
<text class="{{ !g.technicianName ? 'grey_text' : '' }} 'text-hide'">{{g.technicianName || '选择技师'}}</text> <text class="{{ !g.technicianName ? 'grey_text' : '' }} 'text-hide'">{{g.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -63,9 +71,7 @@ ...@@ -63,9 +71,7 @@
<view class="price">¥{{item.price}}</view> <view class="price">¥{{item.price}}</view>
</view> </view>
<view class="subItem_box"> <view class="subItem_box">
<view <view style="{{ !orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;' }}">
style="{{ !orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;' }}"
>
<!-- 太阳膜类展示部位 精品类展示类目名 --> <!-- 太阳膜类展示部位 精品类展示类目名 -->
<view class="position"> <view class="position">
{{item.positionStr || item.upgradeGoodsTypeName}} {{item.positionStr || item.upgradeGoodsTypeName}}
...@@ -73,22 +79,17 @@ ...@@ -73,22 +79,17 @@
</view> </view>
</view> </view>
<!-- 设置膜卷号(不需走签名 战败订单) --> <!-- 设置膜卷号(不需走签名 战败订单) -->
<view <!-- <view wx:if="{{ (!signatureSwitch || orderInfo.selectPayType == 0) && isUseFilmRoll && item.filmNumberData.length }}" class="film-roll disabled" bindtap="selectfilmRollNo" data-item="{{ item }}" data-index="{{ index }}">
wx:if="{{ (!signatureSwitch || orderInfo.selectPayType == 0) && isUseFilmRoll && item.filmNumberData.length }}"
class="film-roll disabled"
bindtap="selectfilmRollNo"
data-item="{{ item }}"
data-index="{{ index }}"
>
<text class="{{ !item.filmRollNo ? 'grey_text' : '' }} 'text-hide'">{{item.filmRollNo || '选择膜卷号'}}</text> <text class="{{ !item.filmRollNo ? 'grey_text' : '' }} 'text-hide'">{{item.filmRollNo || '选择膜卷号'}}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view> -->
<!-- 太阳膜类且配置技师 25-8月版本全部放开 --> <!-- 太阳膜类且配置技师 25-8月版本全部放开 -->
<!-- wx:if="{{ item.upgradeGoodsPosition}}" --> <!-- wx:if="{{ item.upgradeGoodbpsPosition}}" -->
<view class="artificer" bindtap="selectArtificer" data-item="{{ item }}"> <!-- <view class="artificer" bindtap="selectArtificer" data-item="{{ item }}">
<text class="{{ !item.technicianName ? 'grey_text' : '' }} 'text-hide'">{{item.technicianName || '选择技师'}}</text> <text class="{{ !item.technicianName ? 'grey_text' : '' }} 'text-hide'">{{item.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view> -->
<view class="artificer {{ filter.subStatus(item.constructionStatus) }}">{{filter.subStatusName(item.constructionStatus)}}</view>
</view> </view>
</view> </view>
</block> </block>
...@@ -97,10 +98,7 @@ ...@@ -97,10 +98,7 @@
<view class="label icon"> <view class="label icon">
<image src="../../images/voucher_icon.png" mode="" /> <image src="../../images/voucher_icon.png" mode="" />
</view> </view>
<view <view class="value" wx:if="{{ orderInfo.couponName || orderInfo.customerCoupon.customerCouponCode || orderInfo.customerCoupon.employeeName }}">
class="value"
wx:if="{{ orderInfo.couponName || orderInfo.customerCoupon.customerCouponCode || orderInfo.customerCoupon.employeeName }}"
>
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}}) {{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
</view> </view>
<view class="value" wx:else>无</view> <view class="value" wx:else>无</view>
...@@ -117,16 +115,11 @@ ...@@ -117,16 +115,11 @@
工单信息 工单信息
<view style="display: flex;gap: var(--fontSize32);"> <view style="display: flex;gap: var(--fontSize32);">
<!-- 非门店收款 已支付/已退款展示 --> <!-- 非门店收款 已支付/已退款展示 -->
<view <!-- wx:if="{{ isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}" -->
wx:if="{{ isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}" <view>
> <apply-refund-btn orderInfo="{{ orderInfo }}" updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}" showRefundBtn="{{ isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12)}}"></apply-refund-btn>
<apply-refund-btn orderInfo="{{ orderInfo }}"></apply-refund-btn> </view>
</view> <view wx:if="{{ orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2 }}" class="invoice-btn" bindtap="handleBtnInvoice">
<view
wx:if="{{ orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2 }}"
class="invoice-btn"
bindtap="handleBtnInvoice"
>
<gl-image class="icon" src="/icon-invoice.png"></gl-image> <gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}} {{invoiceName}}
</view> </view>
...@@ -136,7 +129,7 @@ ...@@ -136,7 +129,7 @@
<view class="cell"> <view class="cell">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<block wx:if="{{ item.key == 'status' }}"> <block wx:if="{{ item.key == 'status' }}">
<view class="value" style="color:{{ item.constructionFlag == 'Y'? status[orderInfo.status].color:'' }};"> <view class="value" style="color:{{ status[orderInfo.status].color||'' }};">
<!-- {{ item.constructionFlag == 'Y'? status[orderInfo.status].text: '待施工'}} --> <!-- {{ item.constructionFlag == 'Y'? status[orderInfo.status].text: '待施工'}} -->
{{ status[orderInfo.status].text}} {{ status[orderInfo.status].text}}
</view> </view>
...@@ -155,20 +148,11 @@ ...@@ -155,20 +148,11 @@
</block> </block>
</view> </view>
</block> </block>
<block <block wx:if="{{ (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length }}">
wx:if="{{ (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length }}"
>
<view class="cell"> <view class="cell">
<view class="label">付款凭证</view> <view class="label">付款凭证</view>
<view class="image-box"> <view class="image-box">
<view <view class="value" bindtap="previewImage" wx:for="{{ orderInfo.payVoucherList }}" wx:key="index" data-index="{{ index }}" data-url="{{ orderInfo.payVoucherList }}">
class="value"
bindtap="previewImage"
wx:for="{{ orderInfo.payVoucherList }}"
wx:key="index"
data-index="{{ index }}"
data-url="{{ orderInfo.payVoucherList }}"
>
<view class="image"> <view class="image">
<image src="{{ item.payVoucher }}" /> <image src="{{ item.payVoucher }}" />
</view> </view>
...@@ -190,18 +174,11 @@ ...@@ -190,18 +174,11 @@
<view class="title userTitle"> <view class="title userTitle">
<text>客户信息</text> <text>客户信息</text>
<!-- 已退款或已开票不可修改客户任何信息 --> <!-- 已退款或已开票不可修改客户任何信息 -->
<view <view bindtap="jumpUserPortrait" class="updateInfo icon {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2||!isMake ? 'isHide' : '' }}">
bindtap="jumpUserPortrait"
class="updateInfo icon {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2||!isMake ? 'isHide' : '' }}"
>
<image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image> <image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image>
画像 画像
</view> </view>
<view <view wx:if="{{ isYqdSuper||isStaff }}" bindtap="jumpUpdate" class="updateInfo {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : '' }}">
wx:if="{{ isYqdSuper||isStaff }}"
bindtap="jumpUpdate"
class="updateInfo {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : '' }}"
>
<image src="{{ IMG_URL }}miniProgram/edit_icon.png" class="iconImage"></image> <image src="{{ IMG_URL }}miniProgram/edit_icon.png" class="iconImage"></image>
客户信息 客户信息
</view> </view>
...@@ -241,7 +218,7 @@ ...@@ -241,7 +218,7 @@
<!-- 没有屏蔽质保卡 就显示 --> <!-- 没有屏蔽质保卡 就显示 -->
<!-- wx:if="{{!warrantyCardVisible&&orderInfo.selectPayType==0}}" --> <!-- wx:if="{{!warrantyCardVisible&&orderInfo.selectPayType==0}}" -->
<block wx:if="{{ warrantyCardList.length || warrantyCardVisible }}"> <block wx:if="{{ warrantyCardList.length || warrantyCardVisible }}">
<view class="box"> <view class="box warrantyCardList">
<view class="title">{{orderInfo.selectPayType==0? '客服' :'质保'}}</view> <view class="title">{{orderInfo.selectPayType==0? '客服' :'质保'}}</view>
<view class="warranty-box"> <view class="warranty-box">
<block wx:for="{{ warrantyCardList }}" wx:key="index"> <block wx:for="{{ warrantyCardList }}" wx:key="index">
...@@ -303,11 +280,12 @@ ...@@ -303,11 +280,12 @@
</block> --> </block> -->
</view> </view>
<!-- 已支付4 战败2 已评价6 三种状态才展示 并且不是通过失效客户录入的战败单 --> <!-- 已支付4 战败2 已评价6 三种状态才展示 并且不是通过失效客户录入的战败单 -->
<block <!-- <block
wx:if="{{ (!userInfo.isSuper && userInfo.loginRole != 3 && userInfo.loginRole != 6 && userInfo.userType == 2 && (orderInfo.status == 4 || orderInfo.status == 2 || orderInfo.status == 6)) && ((orderInfo.subOrderList && orderInfo.subOrderList.length) ||(orderInfo.packageGoodsList&&orderInfo.packageGoodsList.length)) }}" wx:if="{{ (!userInfo.isSuper && userInfo.loginRole != 3 && userInfo.loginRole != 6 && userInfo.userType == 2 && (orderInfo.status == 4 || orderInfo.status == 2 || orderInfo.status == 6)) && ((orderInfo.subOrderList && orderInfo.subOrderList.length) ||(orderInfo.packageGoodsList&&orderInfo.packageGoodsList.length)) }}"
> > -->
<view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}"> <view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view> <view wx:if="{{confirmFlagObj.btnName == 'constructionVisible'}}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
<view wx:if="{{confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
</view> </view>
<!-- 不需要走签名逻辑 --> <!-- 不需要走签名逻辑 -->
<!-- <view wx:if="{{ signatureSwitch&&orderInfo.selectPayType!=0 }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}"> <!-- <view wx:if="{{ signatureSwitch&&orderInfo.selectPayType!=0 }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
...@@ -317,32 +295,14 @@ ...@@ -317,32 +295,14 @@
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" /> <tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
<view class="btn text-center" bindtap="confirmConstruction">确认完成施工</view> <view class="btn text-center" bindtap="confirmConstruction">确认完成施工</view>
</view> --> </view> -->
</block> <!-- </block> -->
</block> </block>
<order-popup orderType="4" show="{{ showPopup }}" /> <order-popup orderType="4" show="{{ showPopup }}" />
<artificer-select-popup <artificer-select-popup show="{{ artificerSelectPopup }}" title="选择技师" copyArtificerList="{{ artificerList }}" orderInfo="{{ orderInfo }}" artificerSelectObj="{{ artificerSelectObj }}" bindconfirm="changeArtificer" />
show="{{ artificerSelectPopup }}"
title="选择技师"
copyArtificerList="{{ artificerList }}"
orderInfo="{{ orderInfo }}"
artificerSelectObj="{{ artificerSelectObj }}"
bindconfirm="changeArtificer"
/>
<!-- <wxs src="/utils/index.wxs" module="common" /> --> <!-- <wxs src="/utils/index.wxs" module="common" /> -->
<film-roll-no-popup <film-roll-no-popup show="{{ filmRollNoPopup }}" title="选择膜卷号" copyfilmRollNoList="{{ filmRollNoList }}" filmSelectedItem="{{ filmSelectedItem }}" bindconfirm="changefilmRollNo" />
show="{{ filmRollNoPopup }}"
title="选择膜卷号"
copyfilmRollNoList="{{ filmRollNoList }}"
filmSelectedItem="{{ filmSelectedItem }}"
bindconfirm="changefilmRollNo"
/>
<select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{ orderInfo }}"></select-invoice-modal> <select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{ orderInfo }}"></select-invoice-modal>
<sublist-modal visible="{{ sublistVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="sublistCancel"></sublist-modal> <sublist-modal visible="{{ sublistVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="sublistCancel"></sublist-modal>
<ConstructionDetailModal <ConstructionDetailModal visible="{{ constructionVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="constructionCancel"></ConstructionDetailModal>
visible="{{ constructionVisible }}"
orderInfo="{{ orderInfo }}"
orderCode="{{ orderCode }}"
bindcancel="constructionCancel"
></ConstructionDetailModal>
<!-- <dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}"> <!-- <dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}">
</dialog> --> </dialog> -->
\ No newline at end of file \ No newline at end of file
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
</view> </view>
<view class="main {{ isFullSucreen?'isFullSucreen':'' }}"> <view class="main {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="mainheader"> <view class="mainheader">
<!-- catchtap="showStaffPicker" -->
<view class="title">日报切换</view> <view class="title">日报切换</view>
<view class="navigation-title templateNameTitle" bindtap="showStaffPicker"> <view class="navigation-title templateNameTitle">
<picker bindchange="handleTemplagePickerChange" value="{{ orderObj.templateType-1 }}" range-key="name" range="{{ pickerTemplateList }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || isHmStore}}"> <picker bindchange="handleTemplagePickerChange" value="{{ orderObj.templateType-1 }}" range-key="name" range="{{ pickerTemplateList }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || isHmStore}}">
<view class="picker"> <view class="picker">
<view class="text-hide templateName">{{pickerTemplateList[orderObj.templateType-1]['name']}}</view> <view class="text-hide templateName">{{pickerTemplateList[orderObj.templateType-1]['name']}}</view>
...@@ -93,7 +94,7 @@ ...@@ -93,7 +94,7 @@
<block wx:if="{{ item.brandType == 0 }}"> <block wx:if="{{ item.brandType == 0 }}">
<view class="mainheader"> <view class="mainheader">
<view class="title">问界</view> <view class="title">问界</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker"> <view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view> <view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}"> <view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" /> <image src="/images/arrow_bottom.png" />
...@@ -119,7 +120,7 @@ ...@@ -119,7 +120,7 @@
<block wx:if="{{ item.brandType == 1 }}"> <block wx:if="{{ item.brandType == 1 }}">
<view class="mainheader"> <view class="mainheader">
<view class="title">鸿蒙</view> <view class="title">鸿蒙</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker"> <view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view> <view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}"> <view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" /> <image src="/images/arrow_bottom.png" />
...@@ -145,7 +146,7 @@ ...@@ -145,7 +146,7 @@
<block wx:if="{{ item.brandType == 2 }}"> <block wx:if="{{ item.brandType == 2 }}">
<view class="mainheader"> <view class="mainheader">
<view class="title">{{ item.brandType == 1? '非问界': item.firstBrandName}}</view> <view class="title">{{ item.brandType == 1? '非问界': item.firstBrandName}}</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker"> <view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view> <view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}"> <view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" /> <image src="/images/arrow_bottom.png" />
......
...@@ -340,7 +340,7 @@ Page({ ...@@ -340,7 +340,7 @@ Page({
type: 'number', type: 'number',
required: true, required: true,
min: 0, min: 0,
max: 1000, max: 3000,
inputPlaceholder: '' inputPlaceholder: ''
}, },
{ {
...@@ -349,7 +349,7 @@ Page({ ...@@ -349,7 +349,7 @@ Page({
type: 'number', type: 'number',
required: true, required: true,
min: 0, min: 0,
max: 1000, max: 3000,
inputPlaceholder: '' inputPlaceholder: ''
}, },
{ {
...@@ -393,7 +393,7 @@ Page({ ...@@ -393,7 +393,7 @@ Page({
}, },
showStorePicker() { showStorePicker() {
let { userInfo } = this.data let { userInfo } = this.data
;(userInfo?.isSuper || ; (userInfo?.isSuper ||
userInfo?.loginRole == 3 || userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) && userInfo?.loginRole == 5) &&
this.setData({ this.setData({
...@@ -403,7 +403,7 @@ Page({ ...@@ -403,7 +403,7 @@ Page({
}, },
showStaffPicker() { showStaffPicker() {
let { userInfo } = this.data let { userInfo } = this.data
;(userInfo?.isSuper || ; (userInfo?.isSuper ||
userInfo?.loginRole == 3 || userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) && userInfo?.loginRole == 5) &&
this.setData({ this.setData({
...@@ -533,7 +533,7 @@ Page({ ...@@ -533,7 +533,7 @@ Page({
showCancel: false, showCancel: false,
confirmText: '确定', confirmText: '确定',
confirmColor: '#347BFF', confirmColor: '#347BFF',
success(res) {} success(res) { }
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -651,7 +651,7 @@ Page({ ...@@ -651,7 +651,7 @@ Page({
showCancel: false, showCancel: false,
confirmText: '确定', confirmText: '确定',
confirmColor: '#347BFF', confirmColor: '#347BFF',
success(res) {} success(res) { }
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -759,10 +759,8 @@ Page({ ...@@ -759,10 +759,8 @@ Page({
0: '问界', 0: '问界',
1: '鸿蒙' 1: '鸿蒙'
} }
context += `【${ context += `【${bandType[el.brandType] || item.firstBrandName
bandType[el.brandType] || item.firstBrandName }】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${item.differenceValue
}】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${
item.differenceValue
},请相关驻店销售对齐核销再次提交\t\n` },请相关驻店销售对齐核销再次提交\t\n`
el.deliveryCountinputError = true el.deliveryCountinputError = true
el.equityToShopCountinputError = true el.equityToShopCountinputError = true
...@@ -927,7 +925,7 @@ Page({ ...@@ -927,7 +925,7 @@ Page({
hwOhterObjArray[hwohterIndex] hwOhterObjArray[hwohterIndex]
const min = currentConfig.min || 0 // 默认最小值 0 const min = currentConfig.min || 0 // 默认最小值 0
const max = currentConfig.max || 9999999 // 默认最大值 const max = currentConfig.max || 9999999 // 默认最大值
// console.log(currentConfig, 'currentConfig') console.log(currentConfig, 'currentConfig')
if (currentConfig.type == 'digit') { if (currentConfig.type == 'digit') {
let [number, decimal] = value.toString().split('.') let [number, decimal] = value.toString().split('.')
// console.log(value, '222') // console.log(value, '222')
...@@ -1353,7 +1351,7 @@ Page({ ...@@ -1353,7 +1351,7 @@ Page({
wx.$util.message(message) wx.$util.message(message)
} }
}) })
.catch(err => {}) .catch(err => { })
}, },
inputSearch(e) { inputSearch(e) {
let { pickerType } = this.data let { pickerType } = this.data
...@@ -1560,7 +1558,7 @@ Page({ ...@@ -1560,7 +1558,7 @@ Page({
} }
// } // }
}) })
.catch(err => {}) .catch(err => { })
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -1682,5 +1680,5 @@ Page({ ...@@ -1682,5 +1680,5 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {} onReady: function () { }
}) })
...@@ -36,18 +36,7 @@ ...@@ -36,18 +36,7 @@
<text class="required_text" wx:if="{{ orderObj.onBreak == 'N' }}"> *</text> <text class="required_text" wx:if="{{ orderObj.onBreak == 'N' }}"> *</text>
</view> </view>
</view> </view>
<input <input value="{{ orderObj.staffCount }}" data-name="staffCount" placeholder-class="placeholder-class" placeholder-style="{{ orderObj.staffCountEmptyError&& orderObj.onBreak == 'N' ? 'color: #F24724 ': 'color: #D0D2D6' }};" class="content-input {{ orderObj.staffCountError ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}" placeholder="{{ orderObj.staffCountEmptyError && orderObj.onBreak == 'N' ? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': '请输入' }}" bindinput="inputCount" bindblur="checkValueStaffCount" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) }}" type="{{ 'number' }}" />
value="{{ orderObj.staffCount }}"
data-name="staffCount"
placeholder-class="placeholder-class"
placeholder-style="{{ orderObj.staffCountEmptyError&& orderObj.onBreak == 'N' ? 'color: #F24724 ': 'color: #D0D2D6' }};"
class="content-input {{ orderObj.staffCountError ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}"
placeholder="{{ orderObj.staffCountEmptyError && orderObj.onBreak == 'N' ? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': '请输入' }}"
bindinput="inputCount"
bindblur="checkValueStaffCount"
disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) }}"
type="{{ 'number' }}"
/>
</view> </view>
<view class="input-item"> <view class="input-item">
<view class="left"> <view class="left">
...@@ -56,14 +45,7 @@ ...@@ -56,14 +45,7 @@
<text class="required_text"> *</text> <text class="required_text"> *</text>
</view> </view>
</view> </view>
<picker <picker disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) }}" bindchange="handlePickerChange" bindcancel="showShortcutPicker" value="{{ orderObj.pickerValue }}" range-key="name" range="{{ pickerdateList }}">
disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) }}"
bindchange="handlePickerChange"
bindcancel="showShortcutPicker"
value="{{ orderObj.pickerValue }}"
range-key="name"
range="{{ pickerdateList }}"
>
<view class="picker"> <view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide">{{pickerdateList[orderObj.pickerValue]['name']}}</view> <view class="text-hide">{{pickerdateList[orderObj.pickerValue]['name']}}</view>
...@@ -77,29 +59,13 @@ ...@@ -77,29 +59,13 @@
<text class="required_text"> *</text> <text class="required_text"> *</text>
</view> </view>
</view> </view>
<input <input value="{{ orderObj.totalOrderMoney }}" placeholder-class="placeholder-class" placeholder-style="{{ 'color: #D0D2D6' }};" class="content-input disabled" disabled="{{ true }}" type="{{ 'number' }}" />
value="{{ orderObj.totalOrderMoney }}"
placeholder-class="placeholder-class"
placeholder-style="{{ 'color: #D0D2D6' }};"
class="content-input disabled"
disabled="{{ true }}"
type="{{ 'number' }}"
/>
</view> </view>
<!-- 备注 --> <!-- 备注 -->
<view class="remark_box"> <view class="remark_box">
<view class="label">备注</view> <view class="label">备注</view>
<view <view class="textArea_box {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || role != 'staff' ?'disabled':'' }}">
class="textArea_box {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || role != 'staff' ?'disabled':'' }}" <textarea value="{{ orderObj.remark }}" maxlength="500" placeholder="请输入" class="textarea" bindinput="remarkInput" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || role != 'staff' }}" />
>
<textarea
value="{{ orderObj.remark }}"
maxlength="500"
placeholder="请输入"
class="textarea"
bindinput="remarkInput"
disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || role != 'staff' }}"
/>
<view class="currentWordNumber">{{currentWordNumber || 0}} / 500</view> <view class="currentWordNumber">{{currentWordNumber || 0}} / 500</view>
</view> </view>
</view> </view>
...@@ -118,12 +84,7 @@ ...@@ -118,12 +84,7 @@
</view> </view>
</view> </view>
<view class="box" wx:if="{{ item.firstBrandId != -1 }}"> <view class="box" wx:if="{{ item.firstBrandId != -1 }}">
<block <block wx:for="{{ filter.filterTemplateList(hwOhterObjArray,orderObj.templateType) }}" wx:key="hw_index" wx:for-index="hw_index" wx:for-item="hw_item">
wx:for="{{ filter.filterTemplateList(hwOhterObjArray,orderObj.templateType) }}"
wx:key="hw_index"
wx:for-index="hw_index"
wx:for-item="hw_item"
>
<view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view> <view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view>
<view wx:else class="input-item"> <view wx:else class="input-item">
<view class="left"> <view class="left">
...@@ -133,29 +94,12 @@ ...@@ -133,29 +94,12 @@
</view> </view>
<view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view> <view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view>
</view> </view>
<input <input type="{{ hw_item.type||'number' }}" value="{{ item[hw_item.key] }}" data-index="{{ arr_index }}" data-hwohter-index="{{ hw_index }}" placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};" class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}" placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}" bindinput="input" bindblur="checkValue" data-name="{{ hw_item.key }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}" />
type="{{ hw_item.type||'number' }}"
value="{{ item[hw_item.key] }}"
data-index="{{ arr_index }}"
data-hwohter-index="{{ hw_index }}"
placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};"
class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}"
placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}"
bindinput="input"
bindblur="checkValue"
data-name="{{ hw_item.key }}"
disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}"
/>
</view> </view>
</block> </block>
</view> </view>
<view class="box" wx:if="{{ item.firstBrandId == -1 }}"> <view class="box" wx:if="{{ item.firstBrandId == -1 }}">
<block <block wx:for="{{ filter.filterTemplateList(otherObjArray,orderObj.templateType) }}" wx:key="otherIndex" wx:for-index="otherIndex" wx:for-item="hw_item">
wx:for="{{ filter.filterTemplateList(otherObjArray,orderObj.templateType) }}"
wx:key="hw_index"
wx:for-index="hw_index"
wx:for-item="hw_item"
>
<view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view> <view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view>
<view wx:else class="input-item"> <view wx:else class="input-item">
<view class="left"> <view class="left">
...@@ -165,28 +109,13 @@ ...@@ -165,28 +109,13 @@
</view> </view>
<view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view> <view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view>
</view> </view>
<input <input type="{{ hw_item.type||'number' }}" value="{{ item[hw_item.key] }}" data-index="{{ arr_index }}" data-other-index="{{ otherIndex }}" placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};" class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}" placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}" bindinput="input" bindblur="checkValue" data-name="{{ hw_item.key }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}" />
type="{{ hw_item.type||'number' }}"
value="{{ item[hw_item.key] }}"
data-index="{{ arr_index }}"
data-hwohter-index="{{ hw_index }}"
placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};"
class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}"
placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}"
bindinput="input"
bindblur="checkValue"
data-name="{{ hw_item.key }}"
disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}"
/>
</view> </view>
</block> </block>
</view> </view>
</block> </block>
</view> </view>
<view <view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{ (role == 'staff' && orderObj.isDateWithin7Days) || (role == 'super' && orderObj.isDateWithin60Days) || role == 'other' }}">
class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}"
wx:if="{{ (role == 'staff' && orderObj.isDateWithin7Days) || (role == 'super' && orderObj.isDateWithin60Days) || role == 'other' }}"
>
<!-- 员工 可编辑7天 超管可编辑 60天 督导/老板 可添加评论提交 --> <!-- 员工 可编辑7天 超管可编辑 60天 督导/老板 可添加评论提交 -->
<view class="btns-con"> <view class="btns-con">
<block wx:if="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate) && role != 'other' }}"> <block wx:if="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate) && role != 'other' }}">
...@@ -200,22 +129,6 @@ ...@@ -200,22 +129,6 @@
</view> </view>
</view> </view>
</view> </view>
<store-picker <store-picker subIndex="{{ pickerType == 'merchant' ? subIndex : staffCurrent }}" pickList="{{ pickerType == 'merchant' ? merchantRangeList : staffRangeList }}" show="{{ showPicker }}" bindsearch="inputSearch" bindconfirm="changePicker" bindcancel="cancelPicker" pickerType="{{ pickerType }}" />
subIndex="{{ pickerType == 'merchant' ? subIndex : staffCurrent }}"
pickList="{{ pickerType == 'merchant' ? merchantRangeList : staffRangeList }}"
show="{{ showPicker }}"
bindsearch="inputSearch"
bindconfirm="changePicker"
bindcancel="cancelPicker"
pickerType="{{ pickerType }}"
/>
<!-- 选择流量问题/技能问题/套餐问题 --> <!-- 选择流量问题/技能问题/套餐问题 -->
<select-item-popup
show="{{ showSelectItemPopup }}"
title="{{ selectItemTitle }}"
optionList="{{ formData[selectItemIndex].optionList }}"
index="{{ selectItemIndex }}"
bindconfirm="changePromble"
bindcancel="closeSlectItemPopup"
bindclick="click"
/>
\ No newline at end of file \ No newline at end of file
<select-item-popup show="{{ showSelectItemPopup }}" title="{{ selectItemTitle }}" optionList="{{ formData[selectItemIndex].optionList }}" index="{{ selectItemIndex }}" bindconfirm="changePromble" bindcancel="closeSlectItemPopup" bindclick="click" />
\ No newline at end of file \ No newline at end of file
...@@ -61,9 +61,9 @@ const domain_items = { ...@@ -61,9 +61,9 @@ const domain_items = {
// dj: 'http://192.168.1.165:8292', // dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.104:8292', //叶立庆 // dj: 'http://192.168.1.104:8292', //叶立庆
// dj: "http://192.168.1.169:8292", //蔡远明 // dj: "http://192.168.1.169:8292", //蔡远明
// dj: 'http://192.168.1.104:8292',//范富荣 dj: 'http://192.168.1.104:8292',//范富荣
// dj: 'http://192.168.1.89:8292', //周杭 // dj: 'http://192.168.1.89:8292', //周杭
dj: 'http://192.168.1.76:8292', //璐琦 // dj: 'http://192.168.1.76:8292', //璐琦
// dj: 'http://192.168.1.227:8292',//陈希 // dj: 'http://192.168.1.227:8292',//陈希
// dj: 'http://192.168.1.67:8292',//周立明 // dj: 'http://192.168.1.67:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺 // dj: 'http://192.168.148.235:8292',// 熊正顺
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!