Commit 125efdf7 by zhangxw

施工单开发

1 parent 69dab665
Showing 39 changed files with 1872 additions and 31 deletions
...@@ -380,5 +380,9 @@ module.exports = { ...@@ -380,5 +380,9 @@ module.exports = {
// 退款详情列表查询 // 退款详情列表查询
getRefundDetailListAPI(data) { getRefundDetailListAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.singleOrder.list', data) return api.post('dj.api.smartcarlife.refundApplyRecord.singleOrder.list', data)
} },
/** 获取园区店配置技师数据 */
getQYTechnicianList(data) {
return api.post('dj.api.smartcarlife.roleTechnician.list', data)
},
} }
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
"pages/changeScene/changeScene", "pages/changeScene/changeScene",
"pages/materails/index", "pages/materails/index",
"pages/pointsReview/pointsReview", "pages/pointsReview/pointsReview",
"pages/h5AuthPhone/h5AuthPhone" "pages/h5AuthPhone/h5AuthPhone",
"pages/tabRepairOrder/pages/index/index"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
...@@ -37,22 +38,22 @@ ...@@ -37,22 +38,22 @@
"selectedIconPath": "images/tab-home-active.png" "selectedIconPath": "images/tab-home-active.png"
}, },
{ {
"pagePath": "pages/tabWorkOrder/pages/index/index",
"text": "工单管理",
"iconPath": "images/tab-order.png",
"selectedIconPath": "images/tab-order-active.png"
},
{
"pagePath": "pages/tabDateIndex/pages/tabDateIndex", "pagePath": "pages/tabDateIndex/pages/tabDateIndex",
"text": "预约管理", "text": "预约管理",
"iconPath": "images/tab-date.png", "iconPath": "images/tab-date.png",
"selectedIconPath": "images/tab-date-active.png" "selectedIconPath": "images/tab-date-active.png"
}, },
{ {
"pagePath": "pages/materails/index", "pagePath": "pages/tabWorkOrder/pages/index/index",
"text": "营销素材", "text": "客户工单",
"iconPath": "images/tab-material.png", "iconPath": "images/tab-order.png",
"selectedIconPath": "images/tab-material-active.png" "selectedIconPath": "images/tab-order-active.png"
},
{
"pagePath": "pages/tabRepairOrder/pages/index/index",
"text": "施工单",
"iconPath": "images/tab-repair.png",
"selectedIconPath": "images/tab-repair-active.png"
}, },
{ {
"pagePath": "pages/tabMine/pages/index/index", "pagePath": "pages/tabMine/pages/index/index",
...@@ -94,6 +95,14 @@ ...@@ -94,6 +95,14 @@
] ]
}, },
{ {
"root": "tabRepairOrder",
"name": "tabRepairOrder",
"pages": [
"pages/confirmWorkOrder/confirmWorkOrder",
"pages/repairOrderDetail/repairOrderDetail"
]
},
{
"root": "tabWorkOrder", "root": "tabWorkOrder",
"name": "tabWorkOrder", "name": "tabWorkOrder",
"pages": [ "pages": [
......
...@@ -9,17 +9,22 @@ Component({ ...@@ -9,17 +9,22 @@ Component({
type: Boolean, type: Boolean,
observer: function(n) { observer: function(n) {
if (n) { if (n) {
let { copyArtificerList, artificerSelectObj } = this.data let { copyArtificerList, artificerSelectObj, disabledSelectObj } = this.data
const selectArr = Array.isArray(artificerSelectObj) ? artificerSelectObj?.map(val => {return val.id}) : [artificerSelectObj?.technicianId]
copyArtificerList.map(i => { copyArtificerList.map(i => {
i.active = false i.active = false
if (i.id == artificerSelectObj?.technicianId) { if (selectArr?.includes(i.id)) {
i.active = true i.active = true
} }
i.disabled = false
if (disabledSelectObj?.findIndex(val => val.uuid == i.uuid) > -1) {
i.disabled = true
}
return i return i
}) })
this.setData({ this.setData({
artificerList: wx.$util.deepClone(copyArtificerList), artificerList: wx.$util.deepClone(copyArtificerList),
selectedTechnicianId: artificerSelectObj?.technicianId, selectedTechnicianId: selectArr,
searchValue: '' searchValue: ''
}) })
} }
...@@ -28,7 +33,11 @@ Component({ ...@@ -28,7 +33,11 @@ Component({
title: String, title: String,
orderInfo: Object, orderInfo: Object,
artificerSelectObj: Object, artificerSelectObj: Object,
copyArtificerList: Array copyArtificerList: Array,
multiple: Boolean,
disabledSelectObj: {
type: Array
}
}, },
/** /**
...@@ -48,11 +57,12 @@ Component({ ...@@ -48,11 +57,12 @@ Component({
search(e) { search(e) {
let { copyArtificerList } = wx.$util.deepClone(this.data) let { copyArtificerList } = wx.$util.deepClone(this.data)
let { selectedTechnicianId } = this.data let { selectedTechnicianId } = this.data
console.log(selectedTechnicianId)
let { value } = e.detail let { value } = e.detail
if (!value) { if (!value) {
copyArtificerList.map(i => { copyArtificerList.map(i => {
i.active = false i.active = false
if (i.id == selectedTechnicianId) i.active = true if (selectedTechnicianId.includes(i.id)) i.active = true
return i return i
}) })
this.setData({ this.setData({
...@@ -62,7 +72,7 @@ Component({ ...@@ -62,7 +72,7 @@ Component({
let arr = [] let arr = []
copyArtificerList.map(i => { copyArtificerList.map(i => {
i.active = false i.active = false
if (i.id == selectedTechnicianId) i.active = true if (selectedTechnicianId.includes(i.id)) i.active = true
if (i.staffName.indexOf(value) != -1) { if (i.staffName.indexOf(value) != -1) {
arr.push(i) arr.push(i)
} }
...@@ -74,20 +84,22 @@ Component({ ...@@ -74,20 +84,22 @@ Component({
}, },
changeItem(e) { changeItem(e) {
let { target } = e.currentTarget.dataset let { target } = e.currentTarget.dataset
let { artificerList } = this.data let { artificerList, multiple } = this.data
let { copyArtificerList } = wx.$util.deepClone(this.data) let { copyArtificerList } = wx.$util.deepClone(this.data)
if (target.disabled) return
artificerList.forEach(i => { artificerList.forEach(i => {
if (i.id != target?.id) i.active = false if (i.id != target?.id && !multiple) i.active = false
if (i.id == target?.id) i.active = !i.active if (i.id == target?.id) i.active = !i.active
}) })
copyArtificerList.forEach(i => { copyArtificerList.forEach(i => {
if (i.id != target?.id) i.active = false if (i.id != target?.id && !multiple) i.active = false
if (i.id == target?.id) i.active = !i.active if (i.id == target?.id) i.active = !i.active
}) })
const arr = copyArtificerList?.map(val => { if (val.active) return val.id })
this.setData({ this.setData({
artificerList, artificerList,
copyArtificerList, copyArtificerList,
selectedTechnicianId: target.id selectedTechnicianId: multiple ? arr : [target.id]
}) })
}, },
cancel() { cancel() {
...@@ -95,6 +107,7 @@ Component({ ...@@ -95,6 +107,7 @@ Component({
thisPage.setData({ thisPage.setData({
artificerSelectPopup: false artificerSelectPopup: false
}) })
this.triggerEvent('cancel')
}, },
// 打开生意助手小程序 // 打开生意助手小程序
goMiniprogram() { goMiniprogram() {
...@@ -109,14 +122,15 @@ Component({ ...@@ -109,14 +122,15 @@ Component({
// return wx.$util.showToast('请选择技师') // return wx.$util.showToast('请选择技师')
// 未选技师 将selectedTechnicianId清除 // 未选技师 将selectedTechnicianId清除
this.setData({ this.setData({
selectedTechnicianId: '' selectedTechnicianId: []
}) })
} }
let obj = { let obj = {
...artificerSelectObj, ...artificerSelectObj,
technicianUuid: arr[0]?.uuid || '', technicianUuid: arr[0]?.uuid || '',
technicianId: arr[0]?.id || '', technicianId: arr[0]?.id || '',
technicianName: arr[0]?.staffName || '' technicianName: arr[0]?.staffName || '',
selectedTechnicians: arr
} }
// orderInfo.technicianUuid = arr[0]?.uuid || '' // orderInfo.technicianUuid = arr[0]?.uuid || ''
// orderInfo.technicianId = arr[0]?.id || '' // orderInfo.technicianId = arr[0]?.id || ''
......
...@@ -12,9 +12,14 @@ ...@@ -12,9 +12,14 @@
<block wx:for="{{artificerList}}" wx:key="index"> <block wx:for="{{artificerList}}" wx:key="index">
<view class="artificerList {{item.active?'active':''}}" bindtap="changeItem" data-target="{{item}}" data-index="{{index}}"> <view class="artificerList {{item.active?'active':''}}" bindtap="changeItem" data-target="{{item}}" data-index="{{index}}">
<view class="checked_img"> <view class="checked_img">
<block wx:if="{{multiple}}">
<image src="{{item.active ? '../images/radio.png' : '../images/radio_icon.png'}}" />
</block>
<block wx:else>
<image wx:if="{{item.active}}" src="{{IMG_URL}}checked.png"></image> <image wx:if="{{item.active}}" src="{{IMG_URL}}checked.png"></image>
</block>
</view> </view>
<view class="text_box"><view class="text-hide">{{item.staffName}}</view></view> <view class="text_box"><view class="text-hide {{item.disabled ? 'disabled' : ''}}">{{item.staffName}}</view></view>
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
......
...@@ -9,9 +9,6 @@ ...@@ -9,9 +9,6 @@
height: var(--fontSize100); height: var(--fontSize100);
font-size: var(--fontSize32); font-size: var(--fontSize32);
color: #333333; color: #333333;
position: sticky;
left: 0;
top: 0;
background-color: #fff; background-color: #fff;
z-index: 2; z-index: 2;
border-bottom: var(--fontSize2) solid #F9F9F9; border-bottom: var(--fontSize2) solid #F9F9F9;
...@@ -85,6 +82,10 @@ ...@@ -85,6 +82,10 @@
line-height: var(--fontSize98); line-height: var(--fontSize98);
} }
.artificerList .text_box .disabled {
opacity: .5;
}
.artificerList.active { .artificerList.active {
color: #347BFF; color: #347BFF;
font-weight: 700; font-weight: 700;
......
...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2; let index = 1;
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;
......
...@@ -10,6 +10,9 @@ Page({ ...@@ -10,6 +10,9 @@ Page({
navBarHeight navBarHeight
}) })
}, },
back() {
wx.$router.back()
},
onShow() { onShow() {
this.selectComponent(`#materails`)?.onLoad && this.selectComponent(`#materails`).onLoad() this.selectComponent(`#materails`)?.onLoad && this.selectComponent(`#materails`).onLoad()
this.closeRemind() this.closeRemind()
......
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" navStyle="{{navStyle}}"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" navStyle="{{navStyle}}" showBack bindback="back">
<view>营销素材</view> <view>营销素材</view>
</navigation-bar> </navigation-bar>
<makert-material id="materails" scrollTop="{{scrollTop}}" navStyle="{{navStyle}}" navBarHeight="{{ navBarHeight }}" ></makert-material> <makert-material id="materails" scrollTop="{{scrollTop}}" navStyle="{{navStyle}}" navBarHeight="{{ navBarHeight }}" ></makert-material>
\ No newline at end of file \ No newline at end of file
import api from '~/utils/request/request.js'
// const api = wx.$request
module.exports = {
/** 施工单列表 */
getRepairOrderList(data){
let params = data || {}
return api.post('dj.api.smartcarlife.construction.page.construction', {
pageSize: 10,
...params
})
},
/**施工单状态统计 */
statByStatus(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.construction.summary.status', {
...params
})
}
}
\ No newline at end of file \ No newline at end of file
// pages/tabRepairOrder/components/Screening/index.js
import api from '~/api/api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
userInfo: Object,
navBarHeight: String,
show: {
type: Boolean,
observer: function (n, o) {
if (n) {
this.setViewData()
} else {
this.setData({
x: this.data.windowWidth
})
}
}
},
status: {
type: String,
observer: function (newVal) {
if (this._isInitialized) {
// 初始化完成后,正常执行状态更新逻辑
this.setOrderStatusList(newVal)
} else {
// 初始化前,暂存status值
this._pendingStatus = newVal
}
}
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
maxDate: new Date().format('yyyy-MM-dd'),
orderTimeList: [{
name: '全部',
active: true
}, {
name: '今日',
orderStartDate: new Date().format('yyyy-MM-dd'),
orderEndDate: new Date().format('yyyy-MM-dd')
}, {
name: '本月',
orderStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'),
orderEndDate: new Date().format('yyyy-MM-dd')
}, {
orderStartDate: '',
orderEndDate: '',
type: 'custom'
}],
statusList: [{
name: '全部',
active: true,
value: ''
},
{
name: '已施工',
value: '1'
},
{
name: '待施工',
value: '2'
},
{
name: '客户返工',
value: '3'
}],
selectTechnicianList: []
},
attached() {
wx.$util.getSystemInfo(info => {
let { windowWidth } = info
this.setData({
x: windowWidth,
windowWidth,
isFullSucreen: wx.$util.isFullSucreen(true),
userInfo: wx.$util.getUserInfo()
})
})
wx.showLoading()
// 获取技师数据
api.getQYTechnicianList({
yqMerchantId: wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
}).then(respone => {
wx.hideLoading()
let arr = [{
staffName: '全部',
active: true,
value: []
}]
if (respone?.code == 0) {
this.setData({
artificerList: respone.data || [],
'form.technicianUuidList': arr.concat(respone.data || [])
})
}
})
this.init()
},
/**
* 组件的方法列表
*/
methods: {
setViewData() {
let { navBarHeight } = this.data
wx.$util.getViewInfo(
'.btn-box',
res => {
this.setData({
height: navBarHeight,
btnHeight: res.height
})
},
this
)
},
init() {
let { orderTimeList, statusList } = this.data
this.setData({
['form.orderTimeList']: wx.$util.deepClone(orderTimeList),
['form.statusList']: wx.$util.deepClone(statusList)
})
this._isInitialized = true
if (this._pendingStatus !== undefined) {
this.setOrderStatusList(this._pendingStatus)
this._pendingStatus = undefined
}
},
setOrderStatusList(status) {
let { statusList } = this.data
const copyStatus = wx.$util.deepClone(statusList)
copyStatus.map((e, index) => {
e.active = e.value == status
})
this.setData({
['form.statusList']: copyStatus
})
},
rangeSelect(e) {
let { index, name } = e.currentTarget.dataset
let data = this.data.form[name]
let {
date: { start, end }
} = e.detail
data?.map(i => (i.active = false))
let obj = {
active: true,
orderStartDate: start,
orderEndDate: end,
type: 'custom'
}
data[index] = obj
this.setData({
[`form.${name}`]: data,
isReset: false
})
},
// 日期组件
showCalendar(e) {
let calendarModule = this.selectComponent('#orderCalendar')
calendarModule.showCalendar && calendarModule.showCalendar(e)
},
technicianChoose() {
this.setData({
'form.selectTechnicianList': []
})
},
showTechnicianSelectPopup() {
this.setData({artificerSelectPopup: true})
},
cancelTechnician() {
this.setData({artificerSelectPopup: false})
},
changeArtificer(e) {
this.setData({
['form.selectTechnicianList']: e?.detail?.selectedTechnicians || [],
artificerSelectPopup: false
})
},
showMore(e) {
let { technicianShowMore } = this.data
this.setData({
technicianShowMore: !technicianShowMore
})
},
choose(e) {
let { index, listName } = e.currentTarget.dataset
let target = this.data.form[listName]
if (listName == 'technicianUuidList') {
if (index == 0) {
target.forEach(i => i.active = false)
target[index].active = true
} else {
target[index].active = !target[index].active
target[0].active = false
if (!target.filter(val => val.active).length) target[0].active = true
}
} else {
target.forEach(i => {
i.active = false
})
target[index].active = true
}
this.setData({
[`form.${listName}`]: target,
isReset: false
})
},
reset() {
let { technicianUuidList, selectTechnicianList } = this.data.form
technicianUuidList?.map((val, index) => {
val.active = false
if (index == 0) val.active = true
})
selectTechnicianList?.map((val, index) => {
val.active = false
if (index == 0) val.active = true
})
this.setData({
'form.technicianUuidList': [],
'form.selectTechnicianList': [],
isReset: true
})
this._pendingStatus = undefined
this.init()
},
confirm() {
let { form, userInfo, isReset } = this.data
let obj = {}
Object.keys(form).forEach(e => {
let arr = []
form[e]?.map(i => {
if (i.active) {
let { orderStartDate, orderEndDate, value, uuid } = i
obj[e] = value
// 施工开始时间
if (orderStartDate && orderEndDate) {
orderStartDate = `${orderStartDate} 00:00:00`
orderEndDate = `${orderEndDate} 23:59:59`
obj.startTime = orderStartDate
obj.endTime = orderEndDate
}
// 技师
if (e == 'selectTechnicianList' || e == 'technicianUuidList') {
arr.push(uuid)
obj['technicianUuidList'] = arr
}
}
})
})
let page = wx.$router.getPageInstance()
if (isReset) {
obj = {}
}
page.back()
page.searchScreening(obj)
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup"
}
}
\ No newline at end of file \ No newline at end of file
/* pages/tabRepairOrder/components/Screening/index.wxss */
@keyframes show-confirm-box {
0%{
right: -100%;
}
100%{
right: 0;
}
}
.confirm-box {
position: fixed;
top: 0;
z-index: 10;
height: 100vh;
width: 100%;
box-sizing: border-box;
background-color: #fff;
animation: show-confirm-box .5s forwards;
.main{
box-sizing: border-box;
}
.box {
margin: 0 var(--fontSize32);
.title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
color: #292D33;
padding: var(--fontSize34) 0 var(--fontSize30);
position: sticky;
left: 0;
top: 0;
background: #fff;
z-index: 2;
.title-left{
display: flex;
align-items: flex-end;
}
.collapse-btn{
width: var(--fontSize48);
height: var(--fontSize48);
&.rotate-180{
transform: rotate(180deg);
}
}
}
.list-box {
display: flex;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
flex-wrap: wrap;
padding-bottom: var(--fontSize20);
.item {
width: calc(234 / 750 * 100%);
min-height: var(--fontSize68);
border-radius: var(--fontSize4);
box-sizing: border-box;
border: var(--fontSize2) solid transparent;
padding: var(--fontSize16) var(--fontSize33);
flex-wrap: wrap;
font-size: var(--fontSize24);
text-align: center;
background-color: #F7F8FA;
color: #292D33;
transition: all .2s;
margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0;
.text-item{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.inline-block{
display: inline-block;
}
&:nth-of-type(3n+3) {
margin-right: 0;
}
}
.active {
background: rgba(53, 130, 238, 0.08);
border: var(--fontSize2) solid #347BFF;
color: #347BFF;
}
.grey{
color: #999EA8;
}
.custom-time{
width: calc(316 / 750 * 100%);
margin-bottom: 0;
&:last-child{
margin-right: 0;
margin-left: var(--fontSize20);
}
}
.calendar {
.item {
margin-right: 0;
}
}
}
}
}
.btn-box {
position: sticky;
padding: var(--fontSize10) var(--fontSize32);
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize28);
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 9;
background-color: #fff;
.btn {
border-radius: var(--fontSize12);
border: var(--fontSize2) solid #0075F9;
box-sizing: border-box;
height: var(--fontSize80);
}
.clear {
border: var(--fontSize2) solid #DEE0E3;
width: var(--fontSize186);
color: #292D33;
}
.done {
background: #347BFF;
color: #fff;
width: var(--fontSize480);
}
}
.isFullSucreen-btn {
padding-bottom: var(--fontSize68);
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file \ No newline at end of file
<!--pages/tabRepairOrder/components/Screening/index.wxml-->
<scroll-view 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; min-height: calc(100% - {{isFullSucreen ? 'var(--fontSize68)' : '0px'}} - var(--fontSize90));">
<view class="box">
<view class="title">
开始施工时间
</view>
<view class="list-box">
<block wx:for="{{form.orderTimeList}}" wx:key="index">
<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>
<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 bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.orderEndDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.orderEndDate || '结束时间'}}</view>
</view>
</block>
<block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderTimeList" data-index="{{index}}">{{item.name}}</view>
</block>
</block>
</view>
</view>
<view class="box">
<view class="title">
<view class="title-left">
技师
</view>
<block wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}">
<view wx:if="{{form.technicianUuidList.length > 12}}" bindtap="showMore" class="collapse-btn {{!technicianShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" />
</view>
</block>
<block wx:else>
<view wx:if="{{form.selectTechnicianList.length > 10}}" bindtap="showMore" class="collapse-btn {{!technicianShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" />
</view>
</block>
</view>
<view class="list-box">
<!-- 员工/技师/库管 -->
<block wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}">
<block wx:for="{{form.technicianUuidList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="technicianUuidList" data-index="{{index}}" hidden="{{index >= 12 && !technicianShowMore}}">
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</block>
<!-- 超管/区域运营等 -->
<block wx:else>
<view class="item text-center {{!form.selectTechnicianList.length?'active':''}}" bindtap="technicianChoose">全部</view>
<view class="item text-center" bindtap="showTechnicianSelectPopup" data-type="2">自定义</view>
<block wx:for="{{form.selectTechnicianList}}" wx:key="index">
<view class="item active" bindtap="choose" data-list-name="selectTechnicianList" data-index="{{index}}" hidden="{{index >= 10 && !technicianShowMore}}">
<view class="inline-block ">{{item.staffName}}</view>
</view>
</block>
</block>
</view>
</view>
<view class="box">
<view class="title">
施工状态
</view>
<view class="list-box">
<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>
</block>
</view>
</view>
</view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn clear text-center" bindtap="reset">清除</view>
<view class="btn done text-center" bindtap="confirm">确定</view>
</view>
</scroll-view>
<artificer-select-popup show="{{artificerSelectPopup}}" title="选择技师" copyArtificerList="{{artificerList}}" multiple artificerSelectObj="{{form.selectTechnicianList || []}}" bindconfirm="changeArtificer" bindcancel="cancelTechnician" />
\ No newline at end of file \ No newline at end of file
var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null
}
/*
* 导出
*/
module.exports = {
replaceItemText: replaceItemText
}
{
"usingComponents": {
"screening-page": "../../components/Screening/index"
},
"navigationStyle":"custom"
}
\ No newline at end of file \ No newline at end of file
/* pages/tabRepairOrder/pages/index/index.wxss */
page {
background-color: #FFFFFF;
}
.to-box {
position: sticky;
left: 0;
z-index: 2;
.search-box {
width: 100%;
padding-left: var(--fontSize32);
padding-top: var(--fontSize16);
display: flex;
align-items: center;
background-color: #fff;
position: sticky;
top: 0;
left: 0;
z-index: 9;
box-sizing: border-box;
.search-input {
background: #F7F8FA;
border-radius: var(--fontSize38);
width: calc(100% - var(--fontSize144));
height: var(--fontSize72);
display: flex;
align-items: center;
.search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
margin: 0 var(--fontSize10) 0 var(--fontSize26);
}
.search-clear {
width: var(--fontSize36);
height: var(--fontSize36);
margin: 0 var(--fontSize26) 0 var(--fontSize10);
}
.input {
font-size: var(--fontSize28);
height: var(--fontSize38);
line-height: var(--fontSize38);
width: calc(100% - var(--fontSize136));
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
}
.search {
width: var(--fontSize144);
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 var(--fontSize24);
.text-center {
font-size: var(--fontSize28);
border-radius: var(--fontSize12);
width: 100%;
height: var(--fontSize50);
color: #888;
.search-filter {
margin-left: var(--fontSize6);
width: var(--fontSize24);
height: var(--fontSize24);
}
}
}
}
}
.list {
box-sizing: border-box;
width: 100%;
.empty-box {
width: 100%;
height: var(--fontSize1);
}
.item {
overflow: hidden;
margin: var(--fontSize20);
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 #0000001a;
border-radius: var(--fontSize16);
box-sizing: border-box;
background: #FFFFFF;
padding: var(--fontSize32);
position: relative;
.car-name{
color: #292D33;
font-weight: 500;
font-size: var(--fontSize32);
display: flex;
align-items: center;
max-width: var(--fontSize512);
.pay-status{
margin-left: var(--fontSize16);
height: var(--fontSize26);
font-size: var(--fontSize18);
border: var(--fontSize2) solid #F24724;
border-radius: var(--fontSize4);
padding: 0 var(--fontSize4);
color: #F24724;
}
}
.status {
position: absolute;
font-size: var(--fontSize24);
font-weight: 500;
top: var(--fontSize32);
right: var(--fontSize32);
height: var(--fontSize44);
background: #F0F0F0;
border-radius: var(--fontSize4);
padding: 0 var(--fontSize8);
}
.order-list {
padding: var(--fontSize16) 0;
border-bottom: var(--fontSize1) solid #E4E8EE;
.order {
font-size: var(--fontSize28);
color: #333333;
margin-bottom: var(--fontSize16);
display: flex;
align-items: center;
.order-label {
width: var(--fontSize136);
color: #999EA8;
}
.order-value {
width: calc(100% - var(--fontSize136));
color: #292D33;
display: flex;
align-items: center;
.order-value-item:first-of-type {
max-width: 70%;
.split {
margin: 0 var(--fontSize6);
}
}
}
}
}
.goods-list {
display: flex;
margin-top: var(--fontSize23);
.goods-tag{
flex-shrink: 0;
text-align: center;
flex: 0 0 var(--fontSize60);
height: var(--fontSize36);
line-height: var(--fontSize36);
background: #35C376;
color: #FFFFFF;
font-weight: 500;
font-size: var(--fontSize24);
border-radius: var(--fontSize4);
margin-right: var(--fontSize16);
}
.goods {
font-size: var(--fontSize24);
color: #5A5E66;
position: relative;
margin-bottom: var(--fontSize16);
position: relative;
min-width: 0;
.goods-name {
display: inline-block;
max-width: calc(100% - var(--fontSize190));
}
.materials {
display: inline-block;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}
}
}
.service-list {
margin: var(--fontSize16) calc(-1 * var(--fontSize16)) 0;
background: #F7F8FA;
border-radius: var(--fontSize8);
padding: var(--fontSize16);
box-sizing: border-box;
display: flex;
.service-tag{
flex-shrink: 0;
text-align: center;
flex: 0 0 var(--fontSize60);
height: var(--fontSize36);
line-height: var(--fontSize36);
background: #347BFF;
color: #FFFFFF;
font-weight: 500;
font-size: var(--fontSize24);
border-radius: var(--fontSize4);
margin-right: var(--fontSize16);
}
.services {
font-size: var(--fontSize24);
color: #5A5E66;
position: relative;
margin-bottom: var(--fontSize16);
min-width: 0;
}
}
.service-list.empty-list {
padding: 0;
color: #BEC1C7;
font-size: var(--fontSize24);
display: flex;
align-items: center;
justify-content: center;
image {
width: var(--fontSize68);
height: var(--fontSize68);
margin-right: var(--fontSize16);
}
}
.more-btn {
font-size: var(--fontSize24);
color: #999EA8;
display: flex;
align-items: center;
margin-top: var(--fontSize20);
text {
color: #347BFF;
}
}
.duration {
margin-top: var(--fontSize16);
color: #347BFF;
font-size: var(--fontSize36);
font-weight: 800;
font-family: "numberBold";
display: flex;
align-items: center;
.label{
font-size: var(--fontSize24);
color: #999EA8;
font-weight: 400;
margin-right: var(--fontSize16);
}
.unit {
font-weight: 600;
font-size: var(--fontSize28);
margin-left: var(--fontSize4);
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tabRepairOrder/pages/index/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<navigation-bar bindnavbarReady="navbarReady" showBack="{{ show_confirm }}" bindback="back">{{!show_confirm?'施工单':'筛选'}}</navigation-bar>
<block wx:if="{{ navBarHeight > 0 }}">
<view class="main" style="margin-top:{{ navBarHeight }}px">
<view class="to-box" style="top:{{ navBarHeight }}px">
<view class="search-box">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="客户姓名/转化人员/技师姓名/服务项目名称/车型/商品名称" class="input" value="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ keyword }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">
筛选
<image class="search-filter" src="/images/filter.png" />
</view>
</view>
</view>
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ tabIndex }}" />
</view>
<block wx:if="{{ flag }}">
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="search" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - {{ navBarHeight }}px - var(--fontSize160));" refresher-threshold="104" refresher-triggered="{{ triggered }}">
<block wx:if="{{ list.length > 0 }}">
<view class="empty-box"></view>
<block wx:for="{{ list }}" wx:key="index">
<block wx:for="{{ item }}" wx:for-item="li" wx:for-index="ind" wx:key="ind">
<view class="item content" catchtap="jump" data-target="{{ li }}">
<view class="status text-center" style="color:{{ li.statuscolor }};background-color:{{li.statusbackground }};">
{{li.statusText }}
</view>
<view class="car-name text-hide">
<view class="name-text text-hide">{{li.customer.carTypeName || '无车型客户'}}</view>
<view class="pay-status {{li.payStatus == 1 ? 'payed' : ''}}">{{li.payStatus == 1 ? '已支付' : '战败'}}</view>
</view>
<view class="order-list">
<block wx:for="{{ orderObj }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
<view class="order">
<view class="order-label">{{i.label}}</view>
<view class="order-value">
<block wx:if="{{ i.arr }}">
<block wx:if="{{ li[i.arr[1]] }}">
<block wx:for="{{ i.arr }}" wx:key="sindex" wx:for-index="arr_index" wx:for-item="k">
<view class="order-value-item text-hide">
<block wx:if="{{ arr_index == 1 }}">
<text class="split">|</text>
</block>
{{li[k]}}
</view>
</block>
</block>
</block>
<block wx:else>{{li[i.key] || ''}}</block>
</view>
</view>
</block>
</view>
<view class="goods-list">
<block wx:if="{{ li.subOrderList.length }}">
<view class="goods-tag">商品</view>
<view style="flex: 1;">
<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-name text-hide">
{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || i.packageName||''}}
</view>
<view wx:if="{{i.materialsUsed}}" class="materials">{{i.materialsUsed}}米/件</view>
</view>
</block>
<block wx:if="{{ li.subOrderList.length > 2 }}">
<view class="more-btn">
<text catch:tap="showAllList" data-item="{{ li }}" data-type="goods">{{li.showAllGoodsListFlag ? '收起' : '查看全部'}}</text>
(共{{li.subOrderList.length}}件)
</view>
</block>
</view>
</block>
</view>
<view class="service-list {{!li.serviceItemsList.length ? 'empty-list' : ''}}">
<block wx:if="{{li.serviceItemsList.length}}">
<view class="service-tag">服务</view>
<view style="width: calc(100% - var(--fontSize90));">
<block wx:for="{{ li.serviceItemsList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view class="services" hidden="{{ li.showAllServiceListFlag ? false : sindex > 2 }}">
<view class="services-name text-hide">
{{i.itemsConfigName}}-{{i.serviceItemsName}}
</view>
</view>
</block>
<block wx:if="{{ li.serviceItemsList.length > 2 }}">
<view class="more-btn">
<text catch:tap="showAllList" data-item="{{ li }}" data-type="service">{{li.showAllServiceListFlag ? '收起' : '查看全部'}}</text>
(共{{li.serviceItemsList.length}}个服务)
</view>
</block>
</view>
</block>
<block wx:else>
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode=""/>
暂无数据
</block>
</view>
<view class="duration">
<text class="label">施工时长</text>
<block>
{{li.constructionDuration !== null && li.constructionDuration !== undefined ? li.constructionDuration : '-'}}<text class="unit">分钟</text>
</block>
</view>
</view>
</block>
</block>
<block wx:if="{{ nothing }}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<block wx:else>
<empty-data />
</block>
</scroll-view>
</block>
</view>
</block>
<page-container show="{{ show_confirm }}" duration="{{ 0 }}" overlay="{{ false }}" bind:afterleave="back">
<view wx:if="{{ showRendering }}">
<screening-page show="{{ show_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" status="{{ searchObj.statusList }}" />
</view>
</page-container>
...@@ -496,7 +496,7 @@ Page({ ...@@ -496,7 +496,7 @@ Page({
taskId: 6 taskId: 6
} }
commonApi.shutDownTaskApi(params) commonApi.shutDownTaskApi(params)
return wx.switchTab({ return wx.navigateTo({
url: item.url url: item.url
}) })
} }
......
import api from '~/utils/request/request.js'
// const api = wx.$request
module.exports = {
/**获取施工单详情数据 */
getConstructionDetail(data) {
return api.post('dj.api.smartcarlife.construction.get.construction.detail', data)
},
/**获取可关联商品数据 */
getCanRelateGoodsList(data) {
return api.post('dj.api.smartcarlife.construction.list.subOrder', data)
},
/**提交电子施工单 */
confirmConstruction(data) {
return api.post('dj.api.smartcarlife.construction.addOrUpdate', data)
}
}
\ No newline at end of file \ No newline at end of file
// tabRepairOrder/components/relateGoodsPop/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
goodsList: Array,
selected: Array,
baseConfigData: Object,
show: {
type: Boolean,
observer: function(n) {
if (n) {
let {goodsList, selected} = this.data
goodsList?.map(val => {
val.active = false
if (selected?.findIndex(v => v.upgradeGoodsId == val.upgradeGoodsId) > -1) val.active = true
return val
})
this.setData({goodsList})
}
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
choose(e) {
let { item } = e.currentTarget.dataset
let { goodsList } = this.data
goodsList?.forEach(val => {
if (val.upgradeGoodsId == item.upgradeGoodsId) val.active = !val.active
})
this.setData({
goodsList
})
},
cancel() {
this.triggerEvent('cancel')
},
confirm() {
let { goodsList } = this.data
const arr = goodsList?.filter(val => val.active)
if (!arr.length) return wx.$util.showToast('请选择关联商品')
this.triggerEvent('confirm', arr)
}
}
})
\ 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/relateGoodsPop/index.wxss */
.goods-content {
width: calc(100% + var(--fontSize64));
height: 100%;
margin-left: calc(-1 * var(--fontSize32));
.content {
height: calc(100% - var(--fontSize104));
.box {
border-bottom: var(--fontSize2) solid #EBEDF0;
.itemBox {
display: flex;
align-items: center;
.choose {
width: var(--fontSize32);
height: var(--fontSize32);
margin: 0 var(--fontSize32);
}
.item {
flex: 1;
justify-content: space-between;
padding-right: var(--fontSize32);
width: calc(100% - var(--fontSize130));
border-top: var(--fontSize2) solid #EBEDF0;
height: var(--fontSize84);
display: flex;
align-items: center;
font-size: var(--fontSize28);
color: #888888;
position: relative;
.labelWidth {
width: calc(100% - var(--fontSize180));
}
.value {
width: 100%;
display: flex;
justify-content: space-between;
.name {
max-width: 85%;
width:calc(100vw - var(--fontSize100))
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
}
}
.selected-box {
text-align: center;
font-size: var(--fontSize28);
color: #888888;
margin-top: var(--fontSize30);
text {
color: #347BFF;
}
}
}
<!--tabRepairOrder/components/relateGoodsPop/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="50%" bindcancel="cancel">
<view class="goods-content">
<scroll-view class="content" scroll-y show-scrollbar="{{false}}">
<block wx:if="{{goodsList.length > 0}}">
<view class="box">
<block wx:for="{{goodsList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="item-wrap">
<view class="itemBox">
<view class="choose" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}">
<image src="{{i.active ? '../../../components/images/radio.png' : '../../../components/images/radio_icon.png'}}" />
</view>
<view class="item">
<view class="value {{i.active?'labelWidth':''}}" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}">
<view class="name text-hide {{i.active?'textWidth':''}}">
<text>{{filter.replaceItemText(i.goodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsName)}}</text>
<text wx:if="{{i.position && (i.goodsType == 1 || i.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.positionStr+'」'}}</text>
<!-- <text class="warning_text" wx:if="{{!i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text> -->
</view>
</view>
</view>
</view>
</view>
</block>
</view>
</block>
<block wx:else>
<view class="nothing">暂无数据</view>
</block>
</scroll-view>
<view class="selected-box">已选商品 <text>{{filter.activeNum(goodsList)}}</text> 件</view>
</view>
</popup>
\ No newline at end of file \ No newline at end of file
// tabRepairOrder/components/servicePopup/index.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(n) {
if (n) {
let {servicesList, selected} = this.data
const selectedIds = selected?.reduce((set, item) => {
item?.detailList?.forEach(({ id }) => set.add(id))
return set
}, new Set()) ?? new Set()
servicesList?.forEach(service => {
service.detailList = service.detailList?.map(item => ({
...item,
active: selectedIds.has(item.id)
}))
})
this.setData({servicesList})
}
}
},
servicesList: Array,
selected: Array
},
/**
* 组件的初始数据
*/
data: {
IMG_URL
},
/**
* 组件的方法列表
*/
methods: {
// 服务项目选择
handleChecked(e) {
let { target } = e.currentTarget.dataset
let { servicesList } = this.data
servicesList?.map(val => {
val?.detailList?.map(v => {
if (v.id == target.id) v.active = !v.active
return v
})
return val
})
this.setData({servicesList})
},
// 展开收起服务项目
handleShowItem(e) {
let {index} = e.currentTarget.dataset
let {servicesList} = this.data
this.setData({
[`servicesList[${index}].showItemFlag`]: !servicesList[index].showItemFlag
})
},
cancel() {
this.triggerEvent('cancel')
},
confirm() {
let {servicesList} = this.data
const result = servicesList.map(item => ({
...item,
detailList: item?.detailList.filter(child => child.active)
})).filter(item => item.detailList.length > 0)
const activeNum = result.reduce((total, item) => {
return total + (item?.detailList?.length || 0);
}, 0);
if (activeNum <= 0) return wx.$util.showToast('请选择服务项目')
this.triggerEvent('confirm', result)
}
}
})
\ 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/servicePopup/index.wxss */
.servies-content {
margin: 0 calc(-1 * var(--fontSize32));
height: 100%;
.content {
margin: 0 var(--fontSize32);
border-top: var(--fontSize2) solid #EFF0F2;
height: calc(100% - var(--fontSize200));
.item-top {
height: var(--fontSize96);
margin-top: var(--fontSize16);
display: flex;
align-items: center;
justify-content: space-between;
color: #292D33;
font-size: var(--fontSize28);
.left {
display: flex;
align-items: center;
}
.rotate-180 {
transform: rotate(180deg);
}
image {
width: var(--fontSize48);
height: var(--fontSize48);
margin-right: var(--fontSize8);
}
.check-tip {
color: #757980;
font-size: var(--fontSize24);
text {
color: #347BFF;
}
}
}
.item-box {
background: #F7F8FA;
border-radius: var(--fontSize12);
padding: var(--fontSize24) var(--fontSize32) var(--fontSize24) var(--fontSize24);
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: var(--fontSize16);
&:last-child {
margin-bottom: 0;
}
.box {
width: calc(100% - var(--fontSize56));
.ser-name {
color: #EA6612;
margin-bottom: var(--fontSize12);
font-size: var(--fontSize26);
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.other {
color: #5A5E66;
font-size: var(--fontSize24);
}
}
.check {
flex: 0 0 var(--fontSize32);
flex-shrink: 0;
image {
width: var(--fontSize32);
height: var(--fontSize32);
}
.arc{
width: var(--fontSize32);
height: var(--fontSize32);
border-radius: var(--fontSize6);
border: var(--fontSize2) solid #D0D2D6;
}
}
}
}
.bottom {
height: var(--fontSize96);
display: flex;
align-items: center;
justify-content: center;
color: #888888;
font-size: var(--fontSize28);
text {
color: #347BFF;
margin: 0 var(--fontSize8);
}
}
}
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/servicePopup/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<popup show="{{show}}" title="选择服务项目" bindconfirm="confirm" bindcancel="cancel">
<view class="servies-content">
<view class="top">
<search-input bindsearch="search" placeholder="服务项目名称" value="{{searchValue}}" />
</view>
<view class="content">
<scroll-view scroll-y style="height: 100%;" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{servicesList}}" wx:key="index">
<view class="content-box">
<view class="item-top" bindtap="handleShowItem" data-index="{{index}}">
<view class="left">
<image src="{{IMG_URL}}collapse_icon.png" class="{{!item.showItemFlag ? 'rotate-180' : ''}}" mode=""/>
<text calss="name">{{item.title}}</text>
</view>
<view class="check-tip">已选择:<text>{{filter.activeNum(item.detailList)}}</text>个</view>
</view>
<block wx:for="{{item.detailList}}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view hidden="{{!item.showItemFlag}}">
<view class="item-box" >
<view class="box">
<view class="ser-name text-hide">{{i.serviceItemsName}}</view>
<view class="other"><text>用料标准{{i.materialStandard}}米/件</text>|<text>施工标准{{i.timeStandard}}min</text></view>
</view>
<view class="check" bindtap="handleChecked" data-target="{{i}}">
<block wx:if="{{i.active}}">
<image src="{{IMG_URL}}check.png" mode=""/>
</block>
<block wx:else>
<view class="arc"></view>
</block>
</view>
</view>
</view>
</block>
</view>
</block>
</scroll-view>
</view>
<view class="bottom">共选项目<text>{{filter.activeNum(servicesList, 'detailList')}}</text>个</view>
</view>
</popup>
\ No newline at end of file \ No newline at end of file
var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null
}
var techicianName = function(array) {
var result = ''
for (var i = 0; i < array.length; i++) {
if (array[i] && array[i].staffName) {
if (result !== '') {
result += '/'
}
result += array[i].staffName
}
}
return result
}
var activeNum = function (array, subKey) {
var count = 0
for (var i = 0; i < array.length; i++) {
if (array[i][subKey]) {
for (var j = 0; j < array[i][subKey].length; j++) {
if (array[i][subKey][j] && array[i][subKey][j].active) {
count++
}
}
} else {
if (array[i] && array[i].active) {
count++
}
}
}
return count
}
/*
* 导出
*/
module.exports = {
replaceItemText: replaceItemText,
techicianName: techicianName,
activeNum: activeNum
}
{
"usingComponents": {
"relate-goods-popup": "../../components/relateGoodsPop/index",
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup",
"select-service-popup": "../../components/servicePopup/index"
},
"navigationBarTitleText": "施工单确认"
}
\ No newline at end of file \ No newline at end of file
/* tabRepairOrder/pages/confirmWorkOrder/index.wxss */
page {
background: #F7F8FA;
}
.confirm-order {
padding-bottom: var(--fontSize220);
.item {
margin: var(--fontSize20);
background: #FFFFFF;
box-shadow: 0 var(--fontSize6) var(--fontSize16) 0 #cdcdd159;
border-radius: var(--fontSize16);
padding: var(--fontSize32) 0;
overflow: hidden;
.title {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 var(--fontSize32);
font-size: var(--fontSize32);
font-weight: 500;
color: #222222;
.edit-btn {
font-size: var(--fontSize26);
color: #347BFF;
display: flex;
align-items: center;
image {
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize8);
}
.cancel {
margin-right: var(--fontSize24);
}
}
}
.box {
.box-item {
height: var(--fontSize116);
border-bottom: var(--fontSize1) solid #EFF0F2;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 var(--fontSize40);
font-size: var(--fontSize28);
.label {
flex-shrink: 0;
width: var(--fontSize140);
color: #292D33;
}
.value {
text-align: right;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
}
.order-goods {
font-size: var(--fontSize28);
.label {
color: #292D33;
margin: var(--fontSize24) var(--fontSize40);
}
.goods-box {
margin: 0 var(--fontSize32);
background: #F7F8FA;
border-radius: var(--fontSize12);
padding: var(--fontSize24);
font-size: var(--fontSize28);
color: #292D33;
.goods-item {
margin-bottom: var(--fontSize16);
position: relative;
padding-left: var(--fontSize32);
&::after {
position: absolute;
width: var(--fontSize12);
height: var(--fontSize12);
top: 50%;
left: 0;
transform: translateY(-50%);
content: '';
background: #347BFF;
border-radius: 100%;
}
&:last-child {
margin-bottom: 0;
}
}
}
.edit-goods-box {
display: flex;
align-items: center;
margin: 0 var(--fontSize32);
background: #F7F8FA;
border-radius: var(--fontSize12);
padding: var(--fontSize24);
font-size: var(--fontSize28);
color: #292D33;
margin-bottom: var(--fontSize16);
image {
width: var(--fontSize32);
height: var(--fontSize32);
margin-right: var(--fontSize20);
flex-shrink: 0;
}
.goods-name {
width: calc(100% - var(--fontSize52));
}
}
}
}
.service-box {
.title {
padding: var(--fontSize24) var(--fontSize40) var(--fontSize8);
font-size: var(--fontSize28);
color: #292D33;
}
.service-item {
background: #F7F8FA;
border-radius: var(--fontSize12);
padding: var(--fontSize24);
font-size: var(--fontSize26);
margin: var(--fontSize16) var(--fontSize32) 0 var(--fontSize32);
.name {
color: #EA6612;
margin-bottom: var(--fontSize12);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.bott {
display: flex;
font-size: var(--fontSize24);
color: #5A5E66;
.split {
margin: 0 var(--fontSize6);
}
}
}
.edit-item {
display: flex;
align-items: center;
image {
width: var(--fontSize32);
height: var(--fontSize32);
margin-right: var(--fontSize20);
flex-shrink: 0;
}
}
}
.btn-box {
margin: var(--fontSize32) var(--fontSize44) 0;
display: flex;
align-items: center;
justify-content: center;
color: #347BFF;
font-weight: 500;
border: var(--fontSize2) solid #347BFF;
border-radius: var(--fontSize12);
padding: var(--fontSize22);
font-size: var(--fontSize32);
image{
width: var(--fontSize32);
height: var(--fontSize32);
margin-right: var(--fontSize8);
flex-shrink: 0;
}
}
.techic-value {
display: flex;
align-items: center;
justify-content: flex-end;
}
}
.order {
padding-bottom: 0;
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.btns {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: var(--fontSize100);
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
z-index: 99;
flex-direction: column;
.btns-con {
box-sizing: border-box;
display: flex;
padding: var(--fontSize10) 0;
width: calc(100% - var(--fontSize80));
.confirm {
width: 100%;
border: var(--fontSize2) solid #0075F9;
border-radius: var(--fontSize12);
height: var(--fontSize80);
box-sizing: border-box;
color: #fff;
background-color: #347BFF;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/pages/confirmWorkOrder/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<view class="confirm-order">
<view class="item goods">
<view class="title">
<view class="box">商品信息</view>
<block wx:if="{{!editGoodsFlag}}">
<view class="edit-btn" bindtap="handleEditGoods">
<image src="{{IMG_URL}}repair-order/relate-goods.png" mode=""/>关联商品
</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelGoodsCancel">取消</view>
<view bindtap="handelGoodsConfirm">完成</view>
</view>
</block>
</view>
<view class="box">
<block wx:for="{{goodsObj}}" wx:key="index">
<view class="box-item">
<view class="label">{{item.label}}</view>
<view class="value">{{confirmInfo.customer[item.key]}}</view>
</view>
</block>
<view class="order-goods">
<view class="label">订单商品</view>
<block wx:if="{{!editGoodsFlag}}">
<view class="goods-box">
<view class="goods-item" wx:for="{{confirmInfo.subOrderList}}" wx:key="index">
<view class="goods-name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}
</view>
</view>
</view>
</block>
<block wx:else>
<block wx:for="{{editGoodsList}}" wx:key="index">
<view class="edit-goods-box">
<image bindtap="handleDelgoods" data-index="{{index}}" src="{{IMG_URL}}repair-order/del-goods.png" mode=""/>
<view class="goods-name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}
</view>
</view>
</block>
<view class="btn-box" bindtap="relateGoods">
<image src="{{IMG_URL}}repair-order/relate-goods.png" mode=""/>可关联客户其他商品
</view>
</block>
</view>
</view>
</view>
<view class="item order">
<view class="title">
<view class="box">施工单信息</view>
</view>
<gl-cell border valueAlign="right" label="主技师" requiredAfter labelWidth="var(--fontSize140)" required haveArrow bindclick="showPopup" placeholder="请选择">
<block wx:if="{{ mainSelected.length }}">
<view class="techic-value text-hide">{{mainSelected[0] && mainSelected[0].staffName}}</view>
</block>
</gl-cell>
<gl-cell border valueAlign="right" label="副手技师" labelWidth="var(--fontSize140)" haveArrow bindclick="showPopup" data-type="deputy" placeholder="请选择">
<block wx:if="{{ deputySelected.length }}">
<view class="techic-value text-hide">{{filter.techicianName(deputySelected)}}</view>
</block>
</gl-cell>
</view>
<view class="item service">
<view class="title">
<view class="box">施工单信息</view>
<block wx:if="{{!editServiceFlag}}">
<view class="edit-btn" bindtap="handleEditService">编辑</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelServicesCancel">取消</view>
<view bindtap="handelServicesConfirm">完成</view>
</view>
</block>
</view>
<view class="service-box">
<block wx:if="{{!editServiceFlag}}">
<block wx:for="{{confirmInfo['serviceItemsList']}}" wx:key="index">
<view class="title text-hide">{{item.title}}</view>
<block wx:for="{{item.detailList}}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view class="service-item">
<view class="name">{{i.serviceItemsName}}</view>
<view class="bott">
<view class="material">用料标准{{i.materialStandard}}米/件</view>
<text class="split">|</text>
<view class="cost">施工标准{{i.serviceCost}}min</view>
</view>
</view>
</block>
</block>
</block>
<block wx:else>
<block wx:for="{{editServicesList}}" wx:key="index">
<view class="title text-hide">{{item.title}}</view>
<block wx:for="{{item.detailList}}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view class="service-item edit-item">
<image bindtap="handleDelServices" data-index="{{index}}" data-sindex="{{sindex}}" src="{{IMG_URL}}repair-order/del-goods.png" mode=""/>
<view>
<view class="name">{{i.serviceItemsName}}</view>
<view class="bott">
<view class="material">用料标准{{i.materialStandard}}米/件</view>
<text class="split">|</text>
<view class="cost">施工标准{{i.serviceCost}}min</view>
</view>
</view>
</view>
</block>
</block>
<view class="btn-box" bindtap="selectServices">
<image src="{{IMG_URL}}repair-order/add-service.png" mode=""/>可选新增服务项目关联施工单
</view>
</block>
</view>
</view>
</view>
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btns-con">
<view class="confirm text-center" bindtap="submit">提交电子施工单</view>
</view>
</view>
<relate-goods-popup show="{{relateGoodsVisable}}" goodsList="{{goodsList}}" bindconfirm="handelRelateGoodsConfirm" selected="{{editGoodsList}}" bindcancel="handelRelateGoodsCancel" baseConfigData="{{baseConfigData}}"></relate-goods-popup>
<artificer-select-popup show="{{artificerSelectPopup}}" title="选择技师" copyArtificerList="{{artificerList}}" multiple="{{technicianMultiple}}" artificerSelectObj="{{technicianMultiple ? deputySelected : mainSelected}}" disabledSelectObj="{{technicianMultiple ? mainSelected : deputySelected}}" bindconfirm="changeArtificer" bindcancel="cancelTechnician" />
<select-service-popup show="{{selectServiceVisable}}" servicesList="{{servicesList}}" bindconfirm="handleSelectServiceConfirm" selected="{{editServicesList}}" bindcancel="handleSelectServiceCancel"></select-service-popup>
// tabRepairOrder/pages/repairOrderDetail/index.js
Page({
/**
* 页面的初始数据
*/
data: {
detailInfo: {
customer: {
carTypeName: '问界M5',
customerName: '陈小星',
}
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "施工单详情"
}
\ No newline at end of file \ No newline at end of file
/* tabRepairOrder/pages/repairOrderDetail/index.wxss */
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/pages/repairOrderDetail/index.wxml-->
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block>
<view class="main {{isFullSucreen?'isFullSucreen':''}}">
<view class="status-box">
<view class="user-info">
<text class="car">{{detailInfo.customer.carTypeName}}</text>
<text class="name">({{detailInfo.customer.customerName}})</text>
</view>
<view class="content">
<view class="tips">仓库管理员核销物料出库单后可确认完成施工。</view>
<view class="btn text-center" bindtap="outbound">物料出库</view>
</view>
</view>
</view>
</block>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!