Commit 5acea9e6 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 0d185f54 3a2ab9ff
Showing 101 changed files with 4256 additions and 89 deletions
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
供应商账号:13978573226 (选testfws1) 15023656699 13978573226 供应商账号:13978573226 (选testfws1) 15023656699 13978573226
园区店管理员: 15589265685(测试环境) 15626599736(开发环境) 园区店管理员: 15589265685(测试环境) 15626599736(开发环境)
员工账号 :15626599735 (选明明塘朗园区店) 15626599738(开发环境) 员工账号 :15626599735 (选明明塘朗园区店) 15626599738(开发环境)
员工账号 :18775035205 (选测试园店) 18775035205(选最下面的) 15814019200 员工账号 :18775035205 (选测试园店) 18775035205(选最下面的) 15814019200 15626599737(预发布)
员工账号 :13632791593 (选fennun03能下单 园区测试门店有多条数据) 13132112126(导师) 13132112120(学员) 员工账号 :13632791593 (选fennun03能下单 园区测试门店有多条数据) 13132112126(导师) 13132112120(学员)
员工账号 :15626599738 (开发环境) 员工账号 :15626599738 (开发环境)
超管:18129809927 18372203315 超管:18129809927 18372203315
......
...@@ -380,5 +380,13 @@ module.exports = { ...@@ -380,5 +380,13 @@ 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)
},
/**人员权限 */
staffPermissions(data) {
return api.post('dj.api.smartcarlife.qdhc.staff.permissions', 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": [
...@@ -120,7 +129,8 @@ ...@@ -120,7 +129,8 @@
"pages/technicianSearchList/pages/index/technicianSearchList", "pages/technicianSearchList/pages/index/technicianSearchList",
"pages/refundOperationList/refundOperationList", "pages/refundOperationList/refundOperationList",
"pages/refundDetailList/refundDetailList", "pages/refundDetailList/refundDetailList",
"pages/refundApply/refundApply" "pages/refundApply/refundApply",
"pages/createAConstructionOrder/createAConstructionOrder"
] ]
}, },
{ {
......
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/'
// components/subShopMerchant/subShopMerchant.js // components/subShopMerchant/subShopMerchant.js
Component({ Component({
/** /**
...@@ -7,19 +8,35 @@ Component({ ...@@ -7,19 +8,35 @@ Component({
properties: { properties: {
show: { show: {
type: Boolean, type: Boolean,
observer: function(n) { observer: function (n) {
if (n) { if (n) {
let { copyArtificerList, artificerSelectObj } = this.data let { copyArtificerList, artificerSelectObj, disabledSelectObj, deputyFlag } =
this.data
const selectArr = Array.isArray(artificerSelectObj)
? artificerSelectObj?.map(val => {
return val.technicianId || 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
}) })
// 是副手技师选中两个后其余置灰
if (selectArr.length == 2 && deputyFlag) {
copyArtificerList.forEach(i => {
if (!selectArr.includes(i.id)) i.disabled = true
})
}
this.setData({ this.setData({
artificerList: wx.$util.deepClone(copyArtificerList), artificerList: wx.$util.deepClone(copyArtificerList),
selectedTechnicianId: artificerSelectObj?.technicianId, selectedTechnicianId: selectArr,
searchValue: '' searchValue: ''
}) })
} }
...@@ -28,7 +45,12 @@ Component({ ...@@ -28,7 +45,12 @@ Component({
title: String, title: String,
orderInfo: Object, orderInfo: Object,
artificerSelectObj: Object, artificerSelectObj: Object,
copyArtificerList: Array copyArtificerList: Array,
multiple: Boolean,
disabledSelectObj: {
type: Array
},
deputyFlag: Boolean // 是否选择副手技师
}, },
/** /**
...@@ -48,11 +70,12 @@ Component({ ...@@ -48,11 +70,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 +85,7 @@ Component({ ...@@ -62,7 +85,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 +97,46 @@ Component({ ...@@ -74,20 +97,46 @@ Component({
}, },
changeItem(e) { changeItem(e) {
let { target } = e.currentTarget.dataset let { target } = e.currentTarget.dataset
let { artificerList } = this.data let { artificerList, multiple, deputyFlag, disabledSelectObj } = 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
}) })
let arr = []
copyArtificerList?.map(val => {
if (val.active) arr.push(val.id)
})
if (arr.length == 2 && deputyFlag) {
artificerList.forEach(i => {
if (!arr.includes(i.id)) i.disabled = true
})
copyArtificerList.forEach(i => {
if (!arr.includes(i.id)) i.disabled = true
})
} else if (arr.length < 2 && deputyFlag) {
artificerList.forEach(i => {
i.disabled = false
if (disabledSelectObj?.findIndex(val => val.uuid == i.uuid) > -1) {
i.disabled = true
}
})
copyArtificerList.forEach(i => {
i.disabled = false
if (disabledSelectObj?.findIndex(val => val.uuid == i.uuid) > -1) {
i.disabled = true
}
})
}
this.setData({ this.setData({
artificerList, artificerList,
copyArtificerList, copyArtificerList,
selectedTechnicianId: target.id selectedTechnicianId: multiple ? arr : [target.id]
}) })
}, },
cancel() { cancel() {
...@@ -95,6 +144,7 @@ Component({ ...@@ -95,6 +144,7 @@ Component({
thisPage.setData({ thisPage.setData({
artificerSelectPopup: false artificerSelectPopup: false
}) })
this.triggerEvent('cancel')
}, },
// 打开生意助手小程序 // 打开生意助手小程序
goMiniprogram() { goMiniprogram() {
...@@ -103,20 +153,26 @@ Component({ ...@@ -103,20 +153,26 @@ Component({
}) })
}, },
async confirm() { async confirm() {
let { copyArtificerList, orderInfo, artificerSelectObj, selectedTechnicianId } = this.data let {
copyArtificerList,
orderInfo,
artificerSelectObj,
selectedTechnicianId
} = this.data
let arr = copyArtificerList?.filter(v => v.active) || [] let arr = copyArtificerList?.filter(v => v.active) || []
if (!arr.length) { if (!arr.length) {
// 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 || ''
......
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="85%" slotStyle="height: calc(100% - var(--fontSize130));"> <popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="85%" slotStyle="height: calc(100% - var(--fontSize150));">
<view class="artificer-select-popup-box" > <view class="artificer-select-popup-box" >
<view class="box"> <view class="box">
<view class="sub-title text-center">{{title}}</view> <view class="sub-title text-center">{{title}}</view>
...@@ -6,18 +6,28 @@ ...@@ -6,18 +6,28 @@
<search-input bindsearch="search" value="{{searchValue}}" /> <search-input bindsearch="search" value="{{searchValue}}" />
<view class="box-title"> <view class="box-title">
<view>技师</view> <view>技师</view>
<view class="tips">使用<text bind:tap="goMiniprogram">生意助手小程序</text>登录创建技师</view> <!-- <view class="tips">使用<text bind:tap="goMiniprogram">生意助手小程序</text>登录创建技师</view> -->
</view> </view>
<block wx:if="{{artificerList.length}}">
<scroll-view scroll-y style="height: calc(100% - var(--fontSize194));" enhanced="{{true}}" show-scrollbar="{{false}}"> <scroll-view scroll-y style="height: calc(100% - var(--fontSize194));" enhanced="{{true}}" show-scrollbar="{{false}}">
<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>
</block>
<block wx:else>
<empty-data style="width: 100%;" />
</block>
</view> </view>
</view> </view>
</view> </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;
......
<scroll-view scroll-y class="confirm-box" style="height:calc(100% - {{height}}px);margin-top:{{navBarHeight}}px;" <scroll-view scroll-y class="confirm-box" style="height:calc(100% - {{height}}px);margin-top:{{navBarHeight}}px;" hidden="{{!show}}">
hidden="{{!show}}">
<view class="main" style="padding-bottom:{{btnHeight}}px"> <view class="main" style="padding-bottom:{{btnHeight}}px">
<view class="box"> <view class="box">
<view class="title"> <view class="title">
转化人员 转化人员
<block wx:if="{{form.merchantRange.data.length > 1}}"> <block wx:if="{{form.merchantRange.data.length > 1}}">
<picker range="{{form.merchantRange.data}}" range-key="merchantName" bindchange="changeMerchantPicker" <picker range="{{form.merchantRange.data}}" range-key="merchantName" bindchange="changeMerchantPicker" bindtap="tapPicker" bindcancel="tapPicker" data-type="m_moveArrow">
bindtap="tapPicker" bindcancel="tapPicker" data-type="m_moveArrow">
<view class="picker-box"> <view class="picker-box">
<view class="picker-text text-hide">{{form.merchantRange.data[merchantIndex].merchantName}}</view> <view class="picker-text text-hide">{{form.merchantRange.data[merchantIndex].merchantName}}</view>
<view class="arrow {{m_moveArrow?'move':''}}"> <view class="arrow {{m_moveArrow?'move':''}}">
...@@ -18,8 +16,7 @@ ...@@ -18,8 +16,7 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.conversionEmployeeList.data}}" wx:key="index"> <block wx:for="{{form.conversionEmployeeList.data}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" <view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="conversionEmployeeList" data-index="{{index}}">
data-list-name="conversionEmployeeList" data-index="{{index}}">
{{item.staffName}} {{item.staffName}}
</view> </view>
</block> </block>
...@@ -29,8 +26,7 @@ ...@@ -29,8 +26,7 @@
<view class="title"> <view class="title">
销售顾问 销售顾问
<block wx:if="{{form.range_4s.data.length > 1}}"> <block wx:if="{{form.range_4s.data.length > 1}}">
<picker range="{{form.range_4s.data}}" range-key="merchantName" bindchange="changePicker" bindtap="tapPicker" <picker range="{{form.range_4s.data}}" range-key="merchantName" bindchange="changePicker" bindtap="tapPicker" bindcancel="tapPicker" data-type="moveArrow">
bindcancel="tapPicker" data-type="moveArrow">
<view class="picker-box"> <view class="picker-box">
<view class="picker-text text-hide">{{form.range_4s.data[index_4s].merchantName}}</view> <view class="picker-text text-hide">{{form.range_4s.data[index_4s].merchantName}}</view>
<view class="arrow {{moveArrow?'move':''}}"> <view class="arrow {{moveArrow?'move':''}}">
...@@ -42,8 +38,7 @@ ...@@ -42,8 +38,7 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.salesmanList.data}}" wx:key="index"> <block wx:for="{{form.salesmanList.data}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="salesmanList" <view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="salesmanList" data-index="{{index}}">{{item.staffName}}</view>
data-index="{{index}}">{{item.staffName}}</view>
</block> </block>
</view> </view>
</view> </view>
...@@ -55,14 +50,12 @@ ...@@ -55,14 +50,12 @@
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.timeList.data}}" wx:key="index"> <block wx:for="{{form.timeList.data}}" wx:key="index">
<block wx:if="{{item.type}}"> <block wx:if="{{item.type}}">
<calendar allowSameDay shortcut bindselect='rangeSelect' data-index="{{index}}" rangeAll dateType='range' calenderColor='#347BFF' <calendar allowSameDay shortcut bindselect='rangeSelect' data-index="{{index}}" rangeAll dateType='range' calenderColor='#347BFF' vertical minDate="2020-10-01" maxDate="{{maxDate}}" isComponents>
vertical minDate="2020-10-01" maxDate="{{maxDate}}" isComponents>
<view class="item text-center {{item.active?'active':''}}">{{item.name}}</view> <view class="item text-center {{item.active?'active':''}}">{{item.name}}</view>
</calendar> </calendar>
</block> </block>
<block wx:else> <block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="timeList" <view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="timeList" data-index="{{index}}">{{item.name}}</view>
data-index="{{index}}">{{item.name}}</view>
</block> </block>
</block> </block>
</view> </view>
...@@ -73,8 +66,7 @@ ...@@ -73,8 +66,7 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.statusList.data}}" wx:key="index"> <block wx:for="{{form.statusList.data}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" <view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="statusList" data-index="{{index}}">{{item.name}}</view>
data-list-name="statusList" data-index="{{index}}">{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
...@@ -84,8 +76,7 @@ ...@@ -84,8 +76,7 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.orderType.data}}" wx:key="index"> <block wx:for="{{form.orderType.data}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderType" <view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderType" data-index="{{index}}">{{item.name}}</view>
data-index="{{index}}">{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
...@@ -97,8 +88,7 @@ ...@@ -97,8 +88,7 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.inviteType.data}}" wx:key="index"> <block wx:for="{{form.inviteType.data}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="inviteType" <view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="inviteType" data-index="{{index}}">{{item.name}}</view>
data-index="{{index}}">{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
...@@ -110,15 +100,13 @@ ...@@ -110,15 +100,13 @@
<block wx:for="{{form.timeList.data}}" wx:key="index"> <block wx:for="{{form.timeList.data}}" wx:key="index">
<block wx:if="{{item.type}}"> <block wx:if="{{item.type}}">
<view class="calendar"> <view class="calendar">
<calendar allowSameDay shortcut bindselect='rangeSelect' data-index="{{index}}" rangeAll dateType='range' <calendar allowSameDay shortcut bindselect='rangeSelect' data-index="{{index}}" rangeAll dateType='range' calenderColor='#347BFF' vertical minDate="{{minDate}}" maxDate="{{maxDate}}" isComponents>
calenderColor='#347BFF' vertical minDate="{{minDate}}" maxDate="{{maxDate}}" isComponents>
<view class="item text-center {{item.active?'active':''}}">{{item.name}}</view> <view class="item text-center {{item.active?'active':''}}">{{item.name}}</view>
</calendar> </calendar>
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="timeList" <view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="timeList" data-index="{{index}}">{{item.name}}</view>
data-index="{{index}}">{{item.name}}</view>
</block> </block>
</block> </block>
</view> </view>
...@@ -129,8 +117,7 @@ ...@@ -129,8 +117,7 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.inviteStatusList.data}}" wx:key="index"> <block wx:for="{{form.inviteStatusList.data}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" <view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="inviteStatusList" data-index="{{index}}">{{item.name}}</view>
data-list-name="inviteStatusList" data-index="{{index}}">{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
......
...@@ -82,6 +82,10 @@ Component({ ...@@ -82,6 +82,10 @@ Component({
type: Boolean, type: Boolean,
value: true value: true
}, },
maskEnable: {
type: Boolean,
value: true
},
// 标题 // 标题
tapTitle: { tapTitle: {
type: String, type: String,
...@@ -109,6 +113,7 @@ Component({ ...@@ -109,6 +113,7 @@ Component({
}, },
methods: { methods: {
selectMask: function (e) { selectMask: function (e) {
this.data.maskEnable &&
this.setData({ this.setData({
show: !this.data.show show: !this.data.show
}) })
......
...@@ -18,10 +18,10 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,10 +18,10 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2; let index = 0
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 = false
const release = false const release = false
......
...@@ -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.getUserInfo()?.isSuper ? '' : 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': 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
}
// pages/tabRepairOrder/pages/index/index.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import api from '../../api'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
tabList: ["全部", "已施工", "待施工"],
tabListTemplate: ["全部", "已施工", "待施工"],
show_confirm: false, // 筛选弹窗页面
showRendering: false, /// 筛选页面日期选择组件加载缓慢 进入页面先不做筛选页加载
searchObj: {},
tabIndex: '',
pageNum: 1,
searchKey: "",
list: [],
orderObj: [{
label: "技师姓名",
key: 'technicianName',
arr: ['mainTechnicianName', 'subTechnicianName_1', 'subTechnicianName_2'],
arrSplit: '/'
},
{
label: "施工时间",
key: 'startTime',
},
{
label: "转化人员",
arr: ["sellerMerchantName", "sellerName"],
arrSplit: '|'
},
{
label: "客户姓名",
key: "customerName",
}, {
label: '支付时间',
key: "successTime"
}]
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
// tab切换
tabClick(e) {
let {
searchObj
} = this.data
if (this.filterTag) {
this.filterTag = false;
return;
}
if (this.screenForm && e.statusList) {
this.filterTag = true;
setTimeout(() => {
this.filterTag = false;
}, 500);
}
const tabIndex = e.detail || 0
searchObj.statusList = e.detail || ''
this.setData({
tabIndex: tabIndex > 2 ? 0 : tabIndex,
searchObj
}, () => {
this.search()
})
},
// 搜索框输入
input(e) {
let {
value
} = e.detail
this.setData({
searchKey: value
})
},
// 搜索框清空内容
clear() {
this.setData({
searchKey: ""
})
this.search()
},
search() {
this.setData({
list: [],
pageNum: 1,
flag: false,
nothing: false,
});
this.getWorkList()
this.getStatByStatus()
},
searchScreening(e) {
this.screenForm = e
let { searchObj } = this.data
const obj = e || searchObj
this.setData({searchObj: obj})
this.tabClick({
detail: obj.statusList,
statusList: obj.statusList
})
},
showAllList(e) {
let {
item,
type
} = e.currentTarget.dataset
let {
list
} = this.data
let str = type == 'goods' ? 'showAllGoodsListFlag' : 'showAllServiceListFlag'
list.forEach((val) => {
val?.forEach((subVal) => {
if (subVal.id == item.id)
subVal[str] = !subVal[str]
})
})
this.setData({
list
})
},
getParams() {
const statusObj = { // 施工状态映射关系 0-待施工,1-已施工,2-客户返工
'': '',
1: 1,
2: 0,
3: 2
}
let {
searchObj,
searchKey,
userInfo,
} = this.data
let obj = {
searchKey,
constructionStatus: statusObj[searchObj?.statusList],
startTime: searchObj?.startTime,
endTime: searchObj?.endTime,
merchantId: userInfo?.shopMerchantId,
sellerMerchantId: !userInfo?.isSuper ? userInfo?.merchantId : '',
technicianUuidList: searchObj?.technicianUuidList?.length ? searchObj?.technicianUuidList : undefined
}
return obj
},
getWorkList() {
// this.showLoading && this.showLoading("加载中...");
let { pageNum } = this.data
const obj = this.getParams()
api.getRepairOrderList({...obj, pageNum}).then((res) => {
wx.$util.hideLoading();
let {
code,
data,
errId,
message
} = res;
let total = 0;
let list = [];
if (code == 0) {
data?.list?.forEach((val, index) => {
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");
val.statuscolor = val.constructionStatus == 1 ? '#347BFF' : val.constructionStatus == 0 ? '#FF9D0A' : ''
val.statusbackground = val.constructionStatus == 1 ? '#EAF1FF' : val.constructionStatus == 0 ? '#FFF5E6' : ''
val.statusText = val.constructionStatus == 1 ? '已施工' : val.constructionStatus == 0 ? '待施工' : ''
val.customerName = val.customer?.customerName
val.mainTechnicianName = val.mainTechnicianList?.find(v => v.technicianType == 0)?.technicianName // 主技师
const [subTechnicianName_1 = '', subTechnicianName_2 = ''] =
val.subTechnicianList?.filter(v => v.technicianType === 1)
?.map(it => it.technicianName) || []
val.subTechnicianName_1 = subTechnicianName_1
val.subTechnicianName_2 = subTechnicianName_2
})
list = data.list
total = data.total
} else {
if (errId != "-5003") wx.$util.showToast(message)
}
if (total != 0) {
this.setData({
[`list[${pageNum - 1}]`]: list
});
}
this.setData({
total,
flag: true,
triggered: false,
})
})
},
getStatByStatus() {
let { tabList, tabListTemplate } = this.data
const obj = this.getParams()
api
.statByStatus(obj)
.then((result) => {
let {
data,
code
} = result;
if (code == 0) {
const labelList = [
"allTotal",
"completeTotal",
"incompleteTotal"
]
labelList.map((item, index) => {
tabList[index] = {
text: tabListTemplate[index],
count: data[item] ? data[item] : 0
}
})
this.setData({
tabList
})
}
})
.catch((err) => {
console.log(err)
})
},
jump(e) {
let { target } = e.currentTarget.dataset
let jumpUrl = target?.electronicFlag == 1 ? 'repairOrderDetail' : 'confirmWorkOrder'
wx.$router.go(`tabRepairOrder.${jumpUrl}`, {id: target.id, constructionCode: target.constructionCode, orderCode: target.orderCode})
},
// 筛选页面隐藏
back() {
this.setData({
show_confirm: false,
})
wx.showTabBar()
},
// 显示筛选页面
showConfirm() {
this.setData({
showRendering: true,
show_confirm: true
})
wx.hideTabBar()
},
scrollonReachBottom() {
let { total, pageNum } = this.data
wx.$util.onReachBottom(
{
total,
pageNum
},
res => {
this.getWorkList()
this.getStatByStatus()
}
)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.search()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"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;
}
.payed {
color: #35C376;
border: var(--fontSize2) solid #35C376;
}
}
.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);
}
}
.technician {
max-width: 33% !important;
}
}
}
}
.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);
height: var(--fontSize36);
line-height: var(--fontSize36);
color: #5A5E66;
position: relative;
margin-bottom: var(--fontSize16);
min-width: 0;
&:last-child {
margin-bottom: 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="{{ searchKey }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ searchKey }}">
<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.carSeriesName || '无车型客户'}}</view>
<view class="pay-status {{li.orderStatus != 2 ? 'payed' : ''}}">{{li.orderStatus == 2 ? '战败' : '已支付'}}</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:for="{{ i.arr }}" wx:key="sindex" wx:for-index="arr_index" wx:for-item="k">
<view class="order-value-item text-hide" style="max-width: {{li['subTechnicianName_2'] ? '33%' : li['subTechnicianName_1'] ? '50%' : '100%'}};" wx:if="{{li[k]}}">
<block wx:if="{{ arr_index < i.arr.length && arr_index > 0 }}">
<text class="split">{{i.arrSplit}}</text>
</block>
{{li[k]}}
</view>
</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 > 3 }}">
<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.serviceItemsDetailList.length ? 'empty-list' : ''}}">
<block wx:if="{{li.serviceItemsDetailList.length}}">
<view class="service-tag">服务</view>
<view style="width: calc(100% - var(--fontSize90));">
<block wx:for="{{ li.serviceItemsDetailList }}" 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.serviceItemsDetailList.length > 3 }}">
<view class="more-btn">
<text catch:tap="showAllList" data-item="{{ li }}" data-type="service">{{li.showAllServiceListFlag ? '收起' : '查看全部'}}</text>
(共{{li.serviceItemsDetailList.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>
...@@ -86,17 +86,36 @@ Component({ ...@@ -86,17 +86,36 @@ Component({
name: '已失效', name: '已失效',
value: [11] value: [11]
}, },
// {
// name: '未施工',
// value: ['N']
// },
// {
// name: '已施工',
// value: ['Y']
// },
{ {
name: '未施工', name: '已退款',
value: ['N'] value: [5, 12]
}
],
constructionStatusList: [
{
name: '全部',
active: true,
value: []
}, },
{ {
name: '已施工', name: '已施工',
value: ['Y'] value: 1
}, },
{ {
name: '已退款', name: '待施工',
value: [5, 12] value: 0
},
{
name: '无需施工',
value: 3
} }
], ],
maxDate: new Date().format('yyyy-MM-dd'), maxDate: new Date().format('yyyy-MM-dd'),
...@@ -206,7 +225,7 @@ Component({ ...@@ -206,7 +225,7 @@ Component({
this.getsellerUserIdList(userInfo?.shopMerchantId, 1) this.getsellerUserIdList(userInfo?.shopMerchantId, 1)
}, },
init() { init() {
let { orderTimeList, payTimeList, userInfo } = 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)) {
// 获取支付方式 // 获取支付方式
...@@ -262,7 +281,8 @@ Component({ ...@@ -262,7 +281,8 @@ 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)
}) })
}, },
showMore(e) { showMore(e) {
......
...@@ -134,6 +134,16 @@ ...@@ -134,6 +134,16 @@
</view> </view>
<view class="box"> <view class="box">
<view class="title"> <view class="title">
施工状态
</view>
<view class="list-box">
<block wx:for="{{form.constructionStatus}}" 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>
</block>
</view>
</view>
<view class="box">
<view class="title">
支付方式 支付方式
</view> </view>
<view class="list-box"> <view class="list-box">
......
...@@ -11,11 +11,19 @@ var isIncludesItem = function (list, item) { ...@@ -11,11 +11,19 @@ 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 staus = {
"Y": 'constructionFlaged',
"N": 'constructionFlaging',
"Z": ''
}
return staus[item.constructionFlaged] || ''
}
/* /*
* 导出 * 导出
*/ */
module.exports = { module.exports = {
replaceItemText: replaceItemText, replaceItemText: replaceItemText,
isIncludesItem: isIncludesItem isIncludesItem: isIncludesItem,
subStatus: subStatus
} }
...@@ -233,14 +233,30 @@ page { ...@@ -233,14 +233,30 @@ page {
border-radius: 100%; border-radius: 100%;
} }
.list .item .goods-list .constructionFlaging::after {
width: var(--fontSize32);
height: var(--fontSize32);
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/constructionFlaging.png);
background-size: 100%;
}
.list .item .goods-list .constructionFlaged::after {
width: var(--fontSize32);
height: var(--fontSize32);
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/constructionFlaged.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; color: #292D33;
max-width: var(--fontSize430); max-width: var(--fontSize430);
} }
.list .item.gray .goods-list .goods .goods-name { .list .item.gray .goods-list .goods .goods-name {
color: #666666; // color: #666666;
color: #292D33;
} }
.list .item.gray .goods-list .goods::after { .list .item.gray .goods-list .goods::after {
...@@ -249,14 +265,18 @@ page { ...@@ -249,14 +265,18 @@ page {
.list .item .goods-list .goods .goods-price { .list .item .goods-list .goods .goods-price {
font-size: var(--fontSize20); font-size: var(--fontSize20);
color: #666666; // color: #666666;
display: flex; display: flex;
align-items: baseline; align-items: baseline;
font-size: 24rpx;
color: #5A5E66;
} }
.list .item .goods-list .goods .goods-price text { .list .item .goods-list .goods .goods-price text {
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #2A2A2A; // color: #2A2A2A;
font-size: 24rpx;
color: #5A5E66;
} }
.list .item .goods-more { .list .item .goods-more {
...@@ -576,6 +596,7 @@ page { ...@@ -576,6 +596,7 @@ page {
color: #292D33; color: #292D33;
padding-left: 24rpx; padding-left: 24rpx;
margin: 0 auto; margin: 0 auto;
&+.modalbox { &+.modalbox {
margin-top: 16rpx; margin-top: 16rpx;
} }
...@@ -634,3 +655,12 @@ page { ...@@ -634,3 +655,12 @@ page {
.padding_20 { .padding_20 {
padding: 0 var(--fontSize14); padding: 0 var(--fontSize14);
} }
.packgoodsListCon {
margin-top: 20rpx;
box-sizing: border-box;
background: #F7F8FA;
border-radius: 8rpx;
padding: 16rpx;
color: #5A5E66;
}
\ No newline at end of file \ No newline at end of file
...@@ -8,7 +8,15 @@ ...@@ -8,7 +8,15 @@
<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 type="text" placeholder="客户姓名/商品名称/订单编号/手机号" class="input" value="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" /> <input
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>
...@@ -24,14 +32,40 @@ ...@@ -24,14 +32,40 @@
</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-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-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 }}"
>
<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 style="{{ li.txtStyle }}" class="touch-item {{ li.isTouchMove ? 'touch-move-active' : '' }}" data-ind="{{ ind }}" data-index="{{ index }}"> <view
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 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="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 }}">
...@@ -48,12 +82,23 @@ ...@@ -48,12 +82,23 @@
<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="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 class="goods" wx:if="{{ li.showAllGoodsListFlag ? true : sindex < 2 }}"> <view
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>
...@@ -62,6 +107,23 @@ ...@@ -62,6 +107,23 @@
<text>{{i.totalPrice || 0}}</text> <text>{{i.totalPrice || 0}}</text>
</view> </view>
</view> </view>
<!-- 显示套餐子商品 -->
<view
class="packgoodsListCon"
wx:if="{{ i.packageGoodsOrderList&&!i.foldUp&&( li.showAllGoodsListFlag ? true : sindex < 2) }}"
>
<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">
{{filter.replaceItemText(packchild.upgradeGoodsAlias) ||filter.replaceItemText(packchild.upgradeGoodsName) || packchild.packageName||''}}
</view>
<view class="goods-price">
¥
<text>{{packchild.totalPrice || 0}}</text>
</view>
</view>
</block>
</view>
</block> </block>
<block wx:if="{{ li.subOrderList.length > 2 }}"> <block wx:if="{{ li.subOrderList.length > 2 }}">
<view class="goods-more"> <view class="goods-more">
...@@ -72,7 +134,7 @@ ...@@ -72,7 +134,7 @@
</block> </block>
</view> </view>
<view class="order-list"> <view class="order-list">
<block wx:for="{{li.deliveryUserId? pointsMultiObj:orderObj }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i"> <block wx:for="{{ li.deliveryUserId? pointsMultiObj:orderObj }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
<view class="order"> <view class="order">
<view class="order-label">{{i.label}}</view> <view class="order-label">{{i.label}}</view>
<view class="order-value"> <view class="order-value">
...@@ -192,11 +254,22 @@ ...@@ -192,11 +254,22 @@
<gl-image class="icon" src="/miniProgram/order3.png"></gl-image> <gl-image class="icon" src="/miniProgram/order3.png"></gl-image>
战败下单 战败下单
</view> </view>
<view wx:if="{{isSettingExpiredTraffic && !isScan}}" class="modalbox cancle {{ selectType == 3?'act': '' }}" bindtap="selectType" data-type="3"> <view
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> <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
class RouterBefore { class RouterBefore {
constructor(options) { constructor(options) {
console.log('---------------- 路由初始化 ----------------') // console.log('---------------- 路由初始化 ----------------')
this.initPageProxy() this.initPageProxy()
} }
/**监听页面 */ /**监听页面 */
......
...@@ -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)
},
/**获取服务项目列表数据 */
getServiceItemList(data) {
return api.post('dj.api.carboutique.construction.item.group.list', data)
},
/**提交电子施工单 */
confirmConstruction(data) {
return api.post('dj.api.smartcarlife.construction.addOrUpdate', data)
},
/**根据商品获取膜卷号数据 */
getfilmRollNoByGoods(data) {
return api.post('dj.api.smarcarlife.stock.filmroll.list', data)
},
/**物料出库 */
outboundAPI(data) {
return api.post('dj.api.smartcarlife.construction.outbound', data)
},
/**确认完成施工 */
completeConstructionOrder(data) {
return api.post('dj.api.smartcarlife.construction.complete', data)
},
/**审核施工单 */
approvalRepairOrder(data) {
return api.post('dj.api.smartcarlife.construction.approval', data)
},
// 施工单返工
reworkAPI(data) {
return api.post('dj.api.smartcarlife.construction.rework', data)
}
}
// tabWorkOrder/components/filmRollNoPopup/filmRollNoPopup.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(n) {
if (n) {
let { copyfilmRollNoList, filmSelectedItem } = this.data
console.log(filmSelectedItem, '===')
this.setData({
filmRollNoList: wx.$util.deepClone(copyfilmRollNoList),
selectedNumber: filmSelectedItem,
searchValue: ''
})
}
}
},
title: String,
filmSelectedItem: String,
copyfilmRollNoList: Array
},
/**
* 组件的初始数据
*/
data: {
orderObj: {},
IMG_URL,
filmRollNoList: [],
searchValue: ''
},
/**
* 组件的方法列表
*/
methods: {
search(e) {
let { copyfilmRollNoList } = wx.$util.deepClone(this.data)
let { value } = e.detail
if (!value) {
this.setData({
filmRollNoList: copyfilmRollNoList
})
} else {
let arr = []
copyfilmRollNoList.map(i => {
if (i.indexOf(value) != -1) {
arr.push(i)
}
})
this.setData({
filmRollNoList: arr
})
}
},
changeItem(e) {
let { target } = e.currentTarget.dataset
let { filmRollNoList } = this.data
let { copyfilmRollNoList } = wx.$util.deepClone(this.data)
this.setData({
filmRollNoList,
copyfilmRollNoList,
selectedNumber: target
})
},
cancel() {
this.triggerEvent('cancel')
},
// 打开生意助手小程序
goMiniprogram() {
wx.navigateToMiniProgram({
appId: 'wx2c28337db96364d2'
})
},
async confirm() {
let { selectedNumber } = this.data
if (!selectedNumber) {
wx.$util.showToast('请选择膜卷号')
}
this.triggerEvent('confirm', selectedNumber)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/components/filmRollNoPopup/filmRollNoPopup.wxml-->
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" title="{{title}}" height="45%">
<view class="film-roll-number-select-popup-box" >
<view class="box">
<scroll-view wx:if="{{filmRollNoList.length}}" scroll-y style="height: 100%;" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{filmRollNoList}}" wx:key="index">
<view class="film-roll-numberList {{item == selectedNumber?'active':''}}" bindtap="changeItem" data-target="{{item}}" data-index="{{index}}">
<view class="checked_img">
<image wx:if="{{item == selectedNumber}}" src="{{IMG_URL}}checked.png"></image>
</view>
<view class="text_box"><view class="text-hide">{{item}}</view></view>
</view>
</block>
</scroll-view>
<block wx:else>
<empty-data style="width: 100%;" />
</block>
</view>
</view>
</popup>
/* tabWorkOrder/components/filmRollNoPopup/filmRollNoPopup.wxss */
.film-roll-number-select-popup-box{
height: 100%;
width: calc(100% + var(--fontSize64));
transform: translateX(calc(-1 * var(--fontSize32)));
}
.sub-title {
height: var(--fontSize100);
font-size: var(--fontSize32);
color: #333333;
position: sticky;
left: 0;
top: 0;
background-color: #fff;
z-index: 2;
border-bottom: var(--fontSize2) solid #F9F9F9;
}
.text-hide {
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.text-center{
display: flex;
align-items: center;
justify-content: center;
}
.box{
height: 100%;
padding: 0 var(--fontSize32);
}
.box-title{
color: #333333;
font-size: var(--fontSize32);
height: var(--fontSize88);
line-height: var(--fontSize88);
display: flex;
align-items: center;
justify-content: space-between;
}
.box-title .tips{
color: #333333;
font-size: var(--fontSize24);
}
.box-title .tips text{
color: #347BFF;
}
.film-roll-numberList {
width: calc(100% - var(--fontSize50));
height: var(--fontSize98);
display: flex;
align-items: center;
font-size: var(--fontSize28);
color: #292D33;
padding: 0 var(--fontSize25);
transition: all .5s;
}
.checked_img{
width: var(--fontSize32);
height: var(--fontSize32);
flex-shrink: 0;
margin-right: var(--fontSize20);
}
.film-roll-numberList .text_box{
flex: 1;
border-bottom: var(--fontSize2) solid #F9F9F9;
height: 100%;
line-height: var(--fontSize98);
}
.film-roll-numberList.active {
/* color: #347BFF; */
/* font-weight: 700; */
position: relative;
}
// tabRepairOrder/components/outboundPopup/index.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import { createQrcodeImage } from '~/api/api'
import api from '../../api'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(n) {
if (n) {
this.setData({
scrollTop: 0
})
let { infoData } = this.data
if (infoData) {
this.getDetailInfo(infoData)
}
}
}
},
title: String,
detailInfo: {
type: Object,
observer: function(n) {
if (n) {
this.setData({
infoData: wx.$util.deepClone(n)
})
}
}
},
userPermissions: Array
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
infoData: {},
filmRollNoList: [],
scrollTop: 0
},
/**
* 组件的方法列表
*/
methods: {
async getDetailInfo(data) {
let oParams = {}
oParams.appId = 'wx570d9331f9ace0bd'
oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'tabRepairOrder/pages/repairOrderDetail/repairOrderDetail'
oParams.scene = `merchantId=${data.merchantId}&yqMerchantId=${data.sellerMerchantId}&id=${data.id}&constructionCode=${data.constructionCode}&orderCode=${data.orderCode}`
oParams.channelType = 1
const res = await createQrcodeImage(oParams)
this.setData({
weappQrcode: res.data
})
},
// 选择膜卷号
handleRollNumber(e) {
let { target, index } = e.currentTarget.dataset
let { detailInfo } = this.data
// 获取膜卷号数据
api.getfilmRollNoByGoods({
upgradeGoodsId: target.upgradeGoodsId,
yqMerchantId: detailInfo?.sellerMerchantId,
merchantId: detailInfo?.merchantId
}).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
filmRollNoList: data || [],
filmRollNoVisible: true,
filmSelectedItem: target.rollNumber,
selectRollIndex: index
})
} else {
wx.$util.showToast(message)
}
})
},
// 膜卷号确认
changefilmRollNo(e) {
let { selectRollIndex } = this.data
this.setData({
[`infoData.subOrderList[${selectRollIndex}].rollNumber`]: e.detail
})
this.handelCancelRollPopup()
},
// 膜卷号取消
handelCancelRollPopup() {
this.setData({filmRollNoVisible: false})
},
// 实际用料输入框
handleInput(e) {
const { index } = e.currentTarget.dataset
let value = e.detail.value
value = value.replace(/[^\d.]/g, '')
// 处理多个小数点的情况,只保留第一个
const dotIndex = value.indexOf('.')
if (dotIndex !== -1) {
value = value.substring(0, dotIndex + 1) + value.substring(dotIndex + 1).replace(/\./g, '')
}
// 限制小数点后最多两位
if (dotIndex !== -1) {
const decimalPart = value.substring(dotIndex + 1)
if (decimalPart.length > 2) {
value = value.substring(0, dotIndex + 3)
}
}
// 转换为数字进行最大值验证
const numValue = parseFloat(value || 0)
if (!isNaN(numValue) && numValue > 99999.99) {
value = '99999.99'
}
this.setData({
[`infoData.subOrderList[${index}].materialsUsed`]: value
});
},
// 产品出库时间
handleOutboundTime() {
this.setData({
timeVisible: true
})
},
// 产品出库时间确认
onTimeConfirm(e) {
this.setData({
'infoData.outBoundTime': e.detail
})
this.onClosePicker()
},
// 产品出库时间弹窗取消
onClosePicker() {
this.setData({timeVisible: false})
},
// 关闭物料出库弹窗
cancel() {
this.triggerEvent('cancel')
},
confirm() {
let { infoData } = this.data
this.triggerEvent('confirm', infoData)
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"film-roll-no-popup": "../FilmRollNoPopup/FilmRollNoPopup",
"time-select": "../timeSelect/index"
}
}
\ No newline at end of file \ No newline at end of file
/* tabRepairOrder/components/outboundPopup/index.wxss */
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.outbound-popup-box {
height: calc(100% - var(--fontSize120));
.sub-title {
height: var(--fontSize112);
line-height: var(--fontSize112);
border-bottom: var(--fontSize1) solid #EBEDF0;
margin-bottom: var(--fontSize20);
.text-center {
text-align: center;
font-weight: 500;
color: #222222;
}
}
.outbound-box {
height: calc(100% - var(--fontSize114));
.scroll-box {
height: 100%;
}
.qrcode-box {
margin: 0 var(--fontSize32);
background: #F4F5F7;
border-radius: var(--fontSize11);
padding: var(--fontSize24);
display: flex;
flex-flow: column;
align-items: center;
image {
width: var(--fontSize256);
height: var(--fontSize256);
}
.tips {
margin-top: var(--fontSize16);
font-size: var(--fontSize24);
color: #757980;
}
}
.box {
padding: var(--fontSize40) var(--fontSize32) var(--fontSize2) var(--fontSize40);
position: relative;
margin: var(--fontSize20) 0 0;
.title {
font-size: var(--fontSize28);
color: #292D33;
margin-bottom: var(--fontSize20);
position: relative;
font-weight: 500;
&::after {
position: absolute;
content: '';
width: var(--fontSize8);
height: var(--fontSize44);
background: #347BFF;
left: calc(-1 * var(--fontSize40));
top: 50%;
transform: translateY(-50%);
}
.text-name {
max-width: calc(100% - var(--fontSize100));
}
}
.box-item {
display: flex;
align-items: center;
justify-content: space-between;
height: var(--fontSize104);
font-size: var(--fontSize28);
.label {
color: #292D33;
flex-shrink: 0;
width: var(--fontSize180);
.required {
color: #f00;
margin-left: var(--fontSize8);
}
}
.value-box {
width: calc(100% - var(--fontSize190));
display: flex;
align-items: center;
justify-content: flex-end;
}
.value {
text-align: right;
width: calc(100% - var(--fontSize32));
.placeholder {
color: #BEC1C7;
}
}
.pickerArrow {
width: var(--fontSize32);
height: var(--fontSize32);
}
}
.input-box {
.label {
width: var(--fontSize330);
}
.value {
width: var(--fontSize240);
.input {
width: 100%;
height: var(--fontSize68);
min-height: var(--fontSize68);
border: var(--fontSize2) solid #DEE0E3;
overflow: hidden;
border-radius: var(--fontSize8);
text-align: right;
box-sizing: border-box;
padding: 0 var(--fontSize20);
display: flex;
align-items: center;
justify-content: flex-end;
-webkit-appearance: none;
appearance: none;
&::placeholder {
position: relative;
top: 0;
transform: none;
}
}
.disabled {
background: #DEE0E3;
}
}
}
.time-box {
padding-bottom: var(--fontSize48);
}
}
}
}
.popup-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--fontSize20) var(--fontSize32) ;
.btn {
height: var(--fontSize80);
box-sizing: border-box;
border-radius: var(--fontSize12);
font-size: var(--fontSize32);
text-align: center;
line-height: var(--fontSize80);
}
.cancel {
width: var(--fontSize186);
height: var(--fontSize76);
color: #292D33;
border: var(--fontSize2) solid #DEE0E3;
}
.confirm {
width: calc(100% - var(--fontSize206));
background: #347BFF;
color: #fff;
}
}
.popup-footer.isFullSucreen {
padding-bottom: var(--fontSize68) !important;
}
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/outboundPopup/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<van-popup 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="sub-title">
<view class="text-center">{{title}}</view>
</view>
<view class="outbound-box">
<scroll-view scroll-y class="scroll-box" enhanced="{{true}}" scroll-top="{{scrollTop}}" show-scrollbar="{{false}}">
<view class="qrcode-box">
<image src="{{weappQrcode}}" mode=""/>
<view class="tips">请仓库管理员扫描此二维码确认产品实际用料</view>
</view>
<block wx:for="{{infoData.subOrderList}}" wx:key="index">
<view class="box">
<view class="title infoTitle">
<view class="text-name text-hide">{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}</view>
</view>
<view class="box-item">
<view class="label">产品膜卷号</view>
<view class="value-box" bindtap="handleRollNumber" data-target="{{item}}" data-index="{{index}}">
<view class="value text-hide">
<block wx:if="{{item.rollNumber}}">{{item.rollNumber}}</block>
<block wx:else><view class='placeholder'>请选择</view></block>
</view>
<image class="pickerArrow" src="/components/images/arrow-x.png" />
</view>
</view>
<view class="box-item input-box">
<view class="label">产品实际用料(米/件)<text class='required'>*</text></view>
<view class="value">
<input class="input {{false ? 'disabled' : ''}}" bindinput="handleInput" value="{{item.materialsUsed}}" data-index="{{index}}" type="digit" placeholder-style="color: #BEC1C7;" placeholder="输入数字"/>
</view>
</view>
</view>
</block>
<view class="box">
<view class="title infoTitle">
出库时间
</view>
<view class="box-item time-box">
<view class="label" >产品出库时间</view>
<view class="value-box" bindtap="handleOutboundTime">
<view class="value text-hide">
<block wx:if="{{infoData.outBoundTime}}">{{infoData.outBoundTime}}</block>
<block wx:else><view class='placeholder'>请选择</view></block>
</view>
<image class="pickerArrow" src="/components/images/arrow-x.png" />
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}" wx:if="{{filter.btnPermissions(userPermissions, 'WULIAOCHUKU')}}">
<view class="cancel btn text-center" bind:tap="cancel">取消</view>
<view class="confirm btn text-center" bind:tap="confirm">确认核销出库</view>
</view>
</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
// 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>
<empty-data style="width: 100%;" />
</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/outboundPopup/index.js
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import { createQrcodeImage } from '~/api/api'
import api from '../../api'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function (n) {
if (n) {
this.setData({
scrollTop: 0
})
let { infoData } = this.data
if (infoData) {
this.getDetailInfo(infoData)
}
}
}
},
title: String,
detailInfo: {
type: Object,
observer: function (n) {
if (n) {
this.setData({
infoData: wx.$util.deepClone(n)
})
}
}
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
infoData: {},
filmRollNoList: [],
scrollTop: 0
},
/**
* 组件的方法列表
*/
methods: {
async getDetailInfo(data) {
let oParams = {}
oParams.appId = 'wx570d9331f9ace0bd'
oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'tabRepairOrder/pages/repairOrderDetail/repairOrderDetail'
oParams.scene = `merchantId=${data.merchantId}&yqMerchantId=${data.sellerMerchantId}&id=${data.id}&constructionCode=${data.constructionCode}&orderCode=${data.orderCode}`
oParams.channelType = 1
// const res = await createQrcodeImage(oParams)
// this.setData({
// weappQrcode: res.data
// })
},
// 选择膜卷号
handleRollNumber(e) {
let { target, index } = e.currentTarget.dataset
let { detailInfo } = this.data
// 获取膜卷号数据
api
.getfilmRollNoByGoods({
upgradeGoodsId: target.upgradeGoodsId,
yqMerchantId: detailInfo?.sellerMerchantId,
merchantId: detailInfo?.merchantId
})
.then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
filmRollNoList: data || [],
filmRollNoVisible: true,
filmSelectedItem: target.rollNumber,
selectRollIndex: index
})
} else {
wx.$util.showToast(message)
}
})
},
// 膜卷号确认
changefilmRollNo(e) {
let { selectRollIndex } = this.data
this.setData({
[`infoData.subOrderList[${selectRollIndex}].rollNumber`]: e.detail
})
this.handelCancelRollPopup()
},
// 膜卷号取消
handelCancelRollPopup() {
this.setData({ filmRollNoVisible: false })
},
// 实际用料输入框
handleInput(e) {
const { index } = e.currentTarget.dataset
let value = e.detail.value
value = value.replace(/[^\d.]/g, '')
// 处理多个小数点的情况,只保留第一个
const dotIndex = value.indexOf('.')
if (dotIndex !== -1) {
value =
value.substring(0, dotIndex + 1) +
value.substring(dotIndex + 1).replace(/\./g, '')
}
// 限制小数点后最多两位
if (dotIndex !== -1) {
const decimalPart = value.substring(dotIndex + 1)
if (decimalPart.length > 2) {
value = value.substring(0, dotIndex + 3)
}
}
// 转换为数字进行最大值验证
const numValue = parseFloat(value || 0)
if (!isNaN(numValue) && numValue > 99999.99) {
value = '99999.99'
}
this.setData({
[`infoData.subOrderList[${index}].materialsUsed`]: value
})
},
// 产品出库时间
handleOutboundTime() {
this.setData({
timeVisible: true
})
},
// 产品出库时间确认
onTimeConfirm(e) {
this.setData({
'infoData.outBoundTime': e.detail
})
this.onClosePicker()
},
// 产品出库时间弹窗取消
onClosePicker() {
this.setData({ timeVisible: false })
},
// 关闭物料出库弹窗
cancel() {
this.triggerEvent('cancel')
},
confirm() {
let { infoData } = this.data
this.triggerEvent('confirm', infoData)
}
}
})
{
"component": true,
"usingComponents": {
"film-roll-no-popup": "../FilmRollNoPopup/FilmRollNoPopup",
"time-select": "../timeSelect/index"
}
}
\ No newline at end of file \ No newline at end of file
/* tabRepairOrder/components/outboundPopup/index.wxss */
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.outbound-popup-box {
height: calc(100% - var(--fontSize120));
.sub-title {
height: var(--fontSize112);
line-height: var(--fontSize112);
border-bottom: var(--fontSize1) solid #EBEDF0;
margin-bottom: var(--fontSize20);
.text-center {
text-align: center;
font-weight: 500;
color: #222222;
}
}
.tips {
text-align: center;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
}
.outbound-box {
height: calc(100% - var(--fontSize150));
.scroll-box {
height: 100%;
}
.qrcode-box {
margin: 0 var(--fontSize32);
background: #F4F5F7;
border-radius: var(--fontSize11);
padding: var(--fontSize24);
display: flex;
flex-flow: column;
align-items: center;
image {
width: var(--fontSize256);
height: var(--fontSize256);
}
.tips {
margin-top: var(--fontSize16);
font-size: var(--fontSize24);
color: #757980;
}
}
.box {
padding: var(--fontSize40) var(--fontSize32) var(--fontSize2) var(--fontSize40);
position: relative;
margin: var(--fontSize20) 0 0;
.title {
font-size: var(--fontSize28);
color: #292D33;
margin-bottom: var(--fontSize20);
position: relative;
font-weight: 500;
&::after {
position: absolute;
content: '';
width: var(--fontSize8);
height: var(--fontSize44);
background: #347BFF;
left: calc(-1 * var(--fontSize40));
top: 50%;
transform: translateY(-50%);
}
.text-name {
max-width: calc(100% - var(--fontSize100));
}
}
.box-item {
display: flex;
align-items: center;
justify-content: space-between;
height: var(--fontSize104);
font-size: var(--fontSize28);
.label {
color: #292D33;
flex-shrink: 0;
width: var(--fontSize180);
.required {
color: #f00;
margin-left: var(--fontSize8);
}
}
.value-box {
width: calc(100% - var(--fontSize190));
display: flex;
align-items: center;
justify-content: flex-end;
}
.value {
text-align: right;
width: calc(100% - var(--fontSize32));
.placeholder {
color: #BEC1C7;
}
}
.pickerArrow {
width: var(--fontSize32);
height: var(--fontSize32);
}
}
.input-box {
.label {
width: var(--fontSize330);
}
.value {
width: var(--fontSize240);
.input {
width: 100%;
height: var(--fontSize68);
min-height: var(--fontSize68);
border: var(--fontSize2) solid #DEE0E3;
overflow: hidden;
border-radius: var(--fontSize8);
text-align: right;
box-sizing: border-box;
padding: 0 var(--fontSize20);
display: flex;
align-items: center;
justify-content: flex-end;
-webkit-appearance: none;
appearance: none;
&::placeholder {
position: relative;
top: 0;
transform: none;
}
}
.disabled {
background: #DEE0E3;
}
}
}
.time-box {
padding-bottom: var(--fontSize48);
}
}
}
}
.popup-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--fontSize20) var(--fontSize32);
.btn {
height: var(--fontSize80);
box-sizing: border-box;
border-radius: var(--fontSize12);
font-size: var(--fontSize32);
text-align: center;
line-height: var(--fontSize80);
}
.cancel {
width: var(--fontSize186);
height: var(--fontSize76);
color: #292D33;
border: var(--fontSize2) solid #DEE0E3;
}
.confirm {
width: calc(100% - var(--fontSize206));
background: #347BFF;
color: #fff;
}
}
.popup-footer.isFullSucreen {
padding-bottom: var(--fontSize68) !important;
}
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/outboundPopup/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<van-popup
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="sub-title">
<view class="text-center">{{title}}</view>
</view>
<view class="tips">返工是否产生退料返库,请与库管确认后提交返工</view>
<view class="outbound-box">
<scroll-view scroll-y class="scroll-box" enhanced="{{ true }}" scroll-top="{{ scrollTop }}" show-scrollbar="{{ false }}">
<!-- <view class="qrcode-box">
<image src="{{ weappQrcode }}" mode="" />
<view class="tips">请仓库管理员扫描此二维码确认产品实际用料</view>
</view> -->
<block wx:for="{{ infoData.subOrderList }}" wx:key="index">
<view class="box">
<view class="title infoTitle">
<view class="text-name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}
</view>
</view>
<view class="box-item">
<view class="label">产品膜卷号</view>
<view class="value-box" bindtap="handleRollNumber" data-target="{{ item }}" data-index="{{ index }}">
<view class="value text-hide">
<block wx:if="{{ item.rollNumber }}">{{item.rollNumber}}</block>
<block wx:else>
<view class="placeholder">请选择</view>
</block>
</view>
<image class="pickerArrow" src="/components/images/arrow-x.png" />
</view>
</view>
<view class="box-item input-box">
<view class="label">
产品实际用料(米/件)
<text class="required">*</text>
</view>
<view class="value">
<input
class="input {{ false ? 'disabled' : '' }}"
bindinput="handleInput"
value="{{ item.materialsUsed }}"
data-index="{{ index }}"
type="digit"
placeholder-style="color: #BEC1C7;"
placeholder="输入数字"
/>
</view>
</view>
</view>
</block>
<!-- <view class="box">
<view class="title infoTitle">出库时间</view>
<view class="box-item time-box">
<view class="label">产品出库时间</view>
<view class="value-box" bindtap="handleOutboundTime">
<view class="value text-hide">
<block wx:if="{{ infoData.outBoundTime }}">{{infoData.outBoundTime}}</block>
<block wx:else>
<view class="placeholder">请选择</view>
</block>
</view>
<image class="pickerArrow" src="/components/images/arrow-x.png" />
</view>
</view>
</view> -->
</scroll-view>
</view>
</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>
<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
// tabRepairOrder/components/servicePopup/index.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import api from '../../api'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(n) {
if (n) {
this.getList()
}
}
},
selected: {
type: Array,
observer: function(n) {
if (n) {
this.setData({
selectedData: wx.$util.deepClone(n)
})
}
}
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
servicesList: [],
selectedData: []
},
/**
* 组件的方法列表
*/
methods: {
handelSearchInput(e) {
this.setData({
searchValue: e.detail.value
})
},
// 获取服务项目数据
getList() {
let { searchValue } = this.data
api.getServiceItemList({serviceItemsName: searchValue}).then(res => {
let { code, data, message } = res
if (code == 0) {
let {selectedData} = this.data
const selectedIds = selectedData?.reduce((set, item) => {
item?.detailList?.forEach(({ serviceItemsId }) => set.add(serviceItemsId))
return set
}, new Set()) ?? new Set()
data?.forEach(val => {
val.title = `${val.categoryName}-${val.itemName}`
val.detailList = val.serviceItemList?.map(item => ({
...item,
active: selectedIds.has(item.id)
}))
})
this.setData({
servicesList: res.data
})
} else {
wx.$util.showToast(message)
}
})
},
search() {
this.getList()
},
// 服务项目选择
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
})
const filteredServicesList = servicesList?.map(val => {
if (!val?.detailList) return null
return {
...val,
detailList: val.detailList.filter(v => v.active === true)
}
}).filter(val => val && val.detailList.length > 0) || []
this.setData({
servicesList,
selectedData: filteredServicesList
})
},
// 展开收起服务项目
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);
.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="服务项目名称" bindinput="handelSearchInput" 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
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabRepairOrder/components/timeSelect/index.wxss */
.fixed-content {
height: 100%;
.fixed-body {
display: flex;
height: 100%;
.picker {
width: 20%;
height: 100%;
.view {
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize30);
color: #292D33;
}
}
.picker_max{
width: 40% !important;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/timeSelect/index.wxml-->
<popup show="{{show}}" title="{{title}}" bindconfirm="confirm" height="50%" bindcancel="cancel">
<view class="fixed-content">
<view class="fixed-body">
<picker-view class="picker picker_max" value="{{dateValues}}" indicator-class="indicator" bindchange="changeDate">
<picker-view-column>
<block wx:for="{{days}}" wx:key="index">
<view class="view">{{item}}</view>
</block>
</picker-view-column>
</picker-view>
<picker-view class="picker" value="{{hourValues}}" indicator-class="indicator" bindchange="changeHour">
<picker-view-column>
<block wx:for="{{hours}}" wx:key="index">
<view class="view">{{item}}</view>
</block>
</picker-view-column>
</picker-view>
<picker-view wx:if="{{!loading}}" class="picker" value="{{minuteValues}}" indicator-class="indicator" bindchange="changeMinutes">
<picker-view-column>
<block wx:for="{{minutes}}" wx:key="index">
<view class="view">{{item}}</view>
</block>
</picker-view-column>
</picker-view>
<picker-view wx:if="{{!loading}}" class="picker" value="{{secondValues}}" indicator-class="indicator" bindchange="changeMinutes">
<picker-view-column>
<block wx:for="{{seconds}}" wx:key="index">
<view class="view">{{item}}</view>
</block>
</picker-view-column>
</picker-view>
</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
}
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 = {
replaceItemText: replaceItemText,
techicianName: techicianName,
activeNum: activeNum,
btnPermissions: btnPermissions
}
{
"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" wx:if="{{confirmInfo.subOrderList.length}}">
<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.timeStandard}}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.timeStandard}}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':'' }}" wx:if="{{filter.btnPermissions(userPermissions, 'SHIGONGQUEREN')}}">
<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" deputyFlag="{{technicianMultiple}}"/>
<select-service-popup show="{{selectServiceVisable}}" bindconfirm="handleSelectServiceConfirm" selected="{{editServicesList}}" bindcancel="handleSelectServiceCancel"></select-service-popup>
{
"usingComponents": {
"time-select": "../../components/timeSelect/index",
"outbound-popup": "../../components/outboundPopup/index",
"rework-popup": "../../components/reworkPopup/index"
},
"navigationBarTitleText": "施工单详情"
}
/* tabRepairOrder/pages/repairOrderDetail/index.wxss */
page {
background: #F7F8FA;
}
.isFullSucreen {
padding-bottom: var(--fontSize228) !important;
}
.main {
.status-box {
background: #347BFF;
font-size: var(--fontSize28);
color: #FFFFFF;
padding: var(--fontSize48) var(--fontSize40) var(--fontSize48) var(--fontSize60);
box-sizing: border-box;
.user-info {
display: flex;
align-items: flex-end;
.hide-text {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.car {
font-size: var(--fontSize40);
font-weight: 600;
margin-right: var(--fontSize8);
max-width: var(--fontSize400);
image {
width: var(--fontSize40);
height: var(--fontSize40);
margin-right: var(--fontSize20);
margin-top: var(--fontSize8);
}
}
.staff-name {
position: relative;
background: none;
max-width: var(--fontSize242);
&::before {
content: "(";
position: absolute;
left: 0;
top: 0;
}
&::after {
content: ")";
position: absolute;
right: 0;
bottom: 0;
}
.name {
padding-right: 1.2em;
text-indent: 1.2em;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 限制显示两行 */
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
}
margin-bottom: var(--fontSize32);
}
.content {
display: flex;
align-items: center;
justify-content: space-between;
.tips {
font-size: var(--fontSize24);
margin-right: var(--fontSize50);
}
.btn {
flex-shrink: 0;
padding: var(--fontSize8) var(--fontSize28);
border: var(--fontSize2) solid #FFFFFF;
border-radius: var(--fontSize30);
}
}
}
.box {
background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10);
border-radius: var(--fontSize16);
padding: var(--fontSize40) var(--fontSize40) var(--fontSize2);
position: relative;
margin: var(--fontSize20) var(--fontSize20) 0;
.title {
font-size: var(--fontSize32);
color: #292D33;
margin-bottom: var(--fontSize20);
position: relative;
font-weight: 600;
&::after {
position: absolute;
content: '';
width: var(--fontSize8);
height: var(--fontSize44);
background: #347BFF;
left: calc(-1 * var(--fontSize40));
top: 50%;
transform: translateY(-50%);
}
}
.flex {
display: flex;
align-items: center;
justify-content: space-between;
.example {
font-weight: 400;
color: #347BFF;
font-size: var(--fontSize26);
}
}
.cell {
font-size: var(--fontSize28);
color: #999EA8;
display: flex;
align-items: flex-start;
margin-bottom: var(--fontSize32);
.label {
flex-shrink: 0;
width: var(--fontSize208);
}
.value {
color: #292D33;
display: flex;
flex-flow: wrap;
align-items: center;
}
.placeholder {
color: #BEC1C7;
}
.copy,.edit {
color: #347BFF;
margin-left: auto;
.image {
width: var(--fontSize32);
height: var(--fontSize32);
vertical-align: middle;
}
}
}
.image-box {
display: flex;
flex-wrap: wrap;
margin-bottom: var(--fontSize32);
.tire-block {
width: var(--fontSize196);
height: var(--fontSize196);
box-sizing: border-box;
background-color: #F4F5F7;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
border-radius: var(--fontSize8);
overflow: hidden;
&:not(:nth-child(3n)) {
margin-right: var(--fontSize20);
}
&:nth-child(n+4) {
margin-top: var(--fontSize20);
}
.tire-img-box {
position: relative;
width: 100%;
height: 100%;
.tire-img {
width: 100%;
height: 100%;
}
.icon-delete {
position: absolute;
top: var(--fontSize12);
right: var(--fontSize12);
width: var(--fontSize40);
height: var(--fontSize40);
}
}
.icon-plus {
width: var(--fontSize80);
height: var(--fontSize80);
}
.plus-text {
color: #999EA8;
font-size: var(--fontSize28);
}
}
}
.service {
padding-bottom: var(--fontSize16);
.category {
padding-bottom: 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) calc(-1 * var(--fontSize8));
.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;
}
}
}
.empty-box {
width: 100%;
font-size: var(--fontSize24);
color: #BEC1C7;
display: flex;
align-items: center;
justify-content: center;
image {
width: var(--fontSize86);
height: var(--fontSize86);
margin-right: var(--fontSize16);
}
}
.goods {
margin: 0 calc(-1 * var(--fontSize8));
font-size: var(--fontSize28);
color: #292D33;
padding-bottom: var(--fontSize32);
.goods-item {
padding: var(--fontSize24);
background: #F7F8FA;
border-radius: var(--fontSize12);
margin-bottom: var(--fontSize16);
position: relative;
.goods-name {
width: calc(100% - var(--fontSize52));
padding-left: var(--fontSize28);
}
&::after {
position: absolute;
width: var(--fontSize12);
height: var(--fontSize12);
top: var(--fontSize44);
left: var(--fontSize24);
transform: translateY(-50%);
content: '';
background: #347BFF;
border-radius: 100%;
}
&:last-child {
margin-bottom: 0;
}
}
.bott {
margin-top: var(--fontSize12);
padding-left: var(--fontSize28);
font-size: var(--fontSize24);
color: #999EA8;
.split {
margin: 0 var(--fontSize6);
}
}
}
}
.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;
.tips_box {
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
height: var(--fontSize52);
padding: 0 var(--fontSize20) 0 var(--fontSize32);
font-size: var(--fontSize24);
color: #FF9D0A;
background: #FEF5E7;
.tipsIcon {
flex-shrink: 0;
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize8);
}
.contentText {
margin-right: auto;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.close-image {
width: var(--fontSize32);
height: var(--fontSize32);
}
}
.btns-con {
box-sizing: border-box;
display: flex;
padding: var(--fontSize10) 0;
width: calc(100% - var(--fontSize80));
.confirm {
border-radius: var(--fontSize12);
height: var(--fontSize80);
box-sizing: border-box;
width: 100%;
color: #fff;
background-color: #347BFF;
}
}
}
}
\ No newline at end of file \ No newline at end of file
...@@ -326,10 +326,40 @@ module.exports = { ...@@ -326,10 +326,40 @@ module.exports = {
}, },
// 退款审批列表查询 // 退款审批列表查询
getRefundReviewListAPI(data) { getRefundReviewListAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.waitForAudit.list', data) return api.post(
'dj.api.smartcarlife.refundApplyRecord.waitForAudit.list',
data
)
}, },
// 日报填报前参数校验 // 日报填报前参数校验
dailyReportCheck(data) { dailyReportCheck(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.data.check', data) return api.post('dj.api.smartcarlife.staff.daily.report.data.check', data)
},
// 获取施工单按钮展示标识
showFlag(data) {
return api.post('dj.api.smartcarlife.construction.get.showFlag', data)
},
// 获取主订单商品列表
listSubOrder(data) {
return api.post('dj.api.smartcarlife.construction.list.subOrder', data)
},
/**获取服务项目列表数据 */
getServiceItemList(data) {
return api.post('dj.api.carboutique.construction.item.group.list', data)
},
// 批量添加施工单
batchAdd(data) {
return api.post('dj.api.smartcarlife.construction.batch.add', data)
},
// 查询施工单详情
getConstructionDetail(data) {
return api.post(
'dj.api.smartcarlife.construction.get.construction.detail',
data
)
},
// 根据主订单查询施工单列表
listConstruction(data) {
return api.post('dj.api.smartcarlife.construction.list.construction', data)
} }
} }
// components/SelectInvoiceModal/SelectInvoiceModal.js
import api from '~/tabWorkOrder/api'
Component({
/**
* 组件的属性列表
*/
properties: {
visible: {
type: Boolean,
value: false,
observer: function (n, o) {
this.handleOpen()
}
},
orderInfo: {
type: Object,
value: {}
},
orderCode: {
type: String,
value: ''
}
},
/**
* 组件的生命周期
*/
lifetimes: {
// attached() {
// this.handleOpen()
// }
},
/**
* 组件的初始数据
*/
data: {
// selectType: 82,
loading: false
},
/**
* 组件的方法列表
*/
methods: {
selectType(e) {
let { type } = e.currentTarget.dataset
this.setData({
selectType: type
})
},
handleOpen() {
let { orderCode } = this.data
api
.listConstruction({ orderCode })
.then(res => {
console.log(res, 'listConstruction')
let listConstruction = res.data.map(item => {
item.subGoodsName = item.subOrderList
.map(sub => sub.upgradeGoodsName)
.join('/')
item.mainTechnician = item.mainTechnicianList
.map(sub => sub.technicianName)
.join('/')
return item
})
// console.log(listConstruction, 'listConstruction')
this.setData({
constructionList: listConstruction
})
})
.catch(err => {
console.log(err)
})
wx.$modal(
this,
{
show: true,
tabTitleShow: true,
tapTitle: '查看客户施工单',
success: res => {},
error: () => {}
},
'#modal'
)
},
handleCancel() {
this.triggerEvent('cancel')
},
handleConfirm() {
this.triggerEvent('confirm')
this.handleCancel()
}
}
})
{
"component": true,
"usingComponents": {
"modal": "/components/modal/modal"
}
}
\ No newline at end of file \ No newline at end of file
/* components/SelectInvoiceModal/SelectInvoiceModal.wxss */
.modatcontent {
box-sizing: border-box;
margin: var(--fontSize48) 0 0;
max-height: 600rpx;
overflow-y: scroll;
display: flex;
flex-direction: column;
.itemContent {
box-sizing: border-box;
display: flex;
align-items: center;
border-bottom: 1rpx solid #f2f2f3;
// margin-top: 24rpx;
margin: 24rpx 2rpx 0;
}
.item {
display: flex;
align-items: center;
}
.itembox {
box-sizing: border-box;
padding: 0 48rpx;
height: 120rpx;
display: flex;
// align-items: center;
flex-direction: column;
.subName {
overflow: hidden; //一定要写
text-overflow: ellipsis; //超出省略号
display: -webkit-box; //一定要写
-webkit-line-clamp: 1; //控制行数
-webkit-box-orient: vertical; //一定要写
width: 480rpx;
height: 40rpx;
margin-bottom: 18rpx;
}
.part {
display: flex;
align-items: center;
.position {
font-size: 24rpx;
color: #999EA8;
margin-right: 16rpx;
}
.statusBox {
font-weight: 500;
font-size: 18rpx;
width: 67rpx;
height: 26rpx;
color: #35C376;
border: 1.6rpx solid #35C376;
border-radius: 4rpx;
line-height: 26rpx;
text-align: center;
}
.wait {
color: #FF9D0A;
border: 1.6rpx solid #FF9D0A;
}
}
}
.itembox+.itembox {
border-top: 1rpx solid #EFF0F2;
}
.right {
.arrow {
display: inline-block;
width: 32rpx;
height: 32rpx;
}
}
}
.modal {
.icon {
width: 96rpx;
height: 96rpx;
margin-right: 30rpx;
}
.modalbox {
display: flex;
align-items: center;
box-sizing: border-box;
width: 522rpx;
height: 136rpx;
background: #F7F8FA;
border-radius: 8rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
padding-left: 24rpx;
margin: 0 auto;
&+.modalbox {
margin-top: 16rpx;
}
.txt {
font-size: 24rpx;
}
}
.act {
background: #347bff1a;
border: 2rpx solid #347BFF;
color: #3582EE;
}
}
.btnbox {
// margin-top: 32rpx;
display: flex;
justify-content: center;
.btn {
width: 250rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
border-radius: 12rpx;
font-size: 32rpx;
// margin-bottom: 48rpx;
}
.cancel {
background: #FFFFFF;
// border: 2rpx solid #DEE0E3;
color: #222222;
}
.confirm {
color: #FFFFFF;
background: #347BFF;
margin-left: 24rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--components/SelectInvoiceModal/SelectInvoiceModal.wxml-->
<!-- btns="{{ ['取消','确定'] }}" -->
<modal id="modal" class="modal" custom="true" btns="{{ [] }}" maskEnable="{{ false }}" tapTitle="查看客户施工单">
<view class="modatcontent">
<view wx:for="{{ constructionList }}" wx:for-item="item" wx:for-index="index" class="item" wx:key="index">
<!-- bind:tap="handleDetail" -->
<view class="itembox">
<view class="subName">{{item.subGoodsName}}</view>
<view class="part">
<view class="position">{{item.mainTechnician}}</view>
<view class="statusBox" wx:if="{{ item.constructionStatus == 0 }}">已施工</view>
<view class="statusBox wait" wx:if="{{ item.constructionStatus == 1 }}">待施工</view>
</view>
</view>
<view class="right">
<image class="arrow" src="/components/images/arrow-x.png"></image>
</view>
</view>
</view>
<view class="btnbox">
<view class="btn cancel" bind:tap="handleCancel">关闭</view>
<!-- <view class="btn confirm" bind:tap="handleConfirm">下一步</view> -->
</view>
</modal>
\ No newline at end of file \ No newline at end of file
// packageStoreAssistant/components/Dialog/Dialog.js
Component({
options: {
multipleSlots: true
},
/**
* 组件的属性列表
*/
properties: {
show: Boolean,
confirmText: String,
cancelText: String,
showCancelButton: Boolean,
success: Boolean,
text: String
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
confirm() {
this.triggerEvent('confirm')
},
cancel() {
this.triggerEvent('cancel')
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index"
}
}
\ No newline at end of file \ No newline at end of file
.dialog {
display: flex;
flex-direction: column;
align-items: center;
.icon {
color: #292d33;
font-size: 32rpx;
text-align:center;
font-weight: 500;
}
.text {
font-size: 30rpx;
color: #5a5e66;
text-align: center;
max-width: 494rpx;
line-height: 40rpx;
padding: 10rpx 0 54rpx;
}
}
\ 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!