Commit 7698b746 by 前端

Merge branch 'SAAS+V5.1.0' into 'develop'

上线合并

See merge request !426
2 parents d5ed9368 10a336a5
Showing 126 changed files with 3487 additions and 268 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
......
...@@ -351,23 +351,35 @@ module.exports = { ...@@ -351,23 +351,35 @@ module.exports = {
}, },
// 查询店铺配置 // 查询店铺配置
getShopMerchantPointConfig(data) { getShopMerchantPointConfig(data) {
return api.post("dj.api.smartcarlife.shopMerchantPointConfig.get", data); return api.post('dj.api.smartcarlife.shopMerchantPointConfig.get', data)
}, },
// 申请开票 // 申请开票
createOrderCode(data) { createOrderCode(data) {
return api.post("dj.api.smartcarlife.vpt.invoiceIssueQrcode.createByOrder", data); return api.post(
'dj.api.smartcarlife.vpt.invoiceIssueQrcode.createByOrder',
data
)
}, },
// 根据订单号查询二维码和发票信息 // 根据订单号查询二维码和发票信息
getOrderCode(data) { getOrderCode(data) {
return api.post("dj.api.smartcarlife.vpt.invoiceIssueQrcode.getByOrderCode", data); return api.post(
'dj.api.smartcarlife.vpt.invoiceIssueQrcode.getByOrderCode',
data
)
}, },
// 作废开票二维码 // 作废开票二维码
cancelInvoiceQrcode(data) { cancelInvoiceQrcode(data) {
return api.post("dj.api.smartcarlife.vpt.invoiceIssueQrcode.cancelInvoiceQrcode", data); return api.post(
'dj.api.smartcarlife.vpt.invoiceIssueQrcode.cancelInvoiceQrcode',
data
)
}, },
// 获取退款申请待审批数目查询 // 获取退款申请待审批数目查询
getWaitAuditCountAPI(data) { getWaitAuditCountAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.waitForAudit.count', data) return api.post(
'dj.api.smartcarlife.refundApplyRecord.waitForAudit.count',
data
)
}, },
// 查询订单可展示按钮类型 // 查询订单可展示按钮类型
getMoreBtnAPI(data) { getMoreBtnAPI(data) {
...@@ -375,11 +387,25 @@ module.exports = { ...@@ -375,11 +387,25 @@ module.exports = {
}, },
// 退款申请时区域运营查询 // 退款申请时区域运营查询
areaSupervisionExistsAPI(data) { areaSupervisionExistsAPI(data) {
return api.post('dj.api.smartcarlife.serviceMerchant.areaSupervision.exists', data) return api.post(
'dj.api.smartcarlife.serviceMerchant.areaSupervision.exists',
data
)
}, },
// 退款详情列表查询 // 退款详情列表查询
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)
}, },
// 查询订单是否支持状态变更 // 查询订单是否支持状态变更
getOrderRefundStep(data) { getOrderRefundStep(data) {
......
...@@ -131,7 +131,7 @@ App({ ...@@ -131,7 +131,7 @@ App({
// } // }
// } // }
if (options) { if (options) {
// console.log('options', options) console.log('options', options)
let res = checkScene(options); let res = checkScene(options);
// console.log(res, 'res') // console.log(res, 'res')
......
...@@ -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",
...@@ -97,6 +98,7 @@ ...@@ -97,6 +98,7 @@
"root": "tabRepairOrder", "root": "tabRepairOrder",
"name": "tabRepairOrder", "name": "tabRepairOrder",
"pages": [ "pages": [
"pages/confirmWorkOrder/confirmWorkOrder",
"pages/repairOrderDetail/repairOrderDetail" "pages/repairOrderDetail/repairOrderDetail"
] ]
}, },
...@@ -127,7 +129,8 @@ ...@@ -127,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"
] ]
}, },
{ {
...@@ -260,15 +263,11 @@ ...@@ -260,15 +263,11 @@
"preloadRule": { "preloadRule": {
"pages/tabWorkOrder/pages/index/index": { "pages/tabWorkOrder/pages/index/index": {
"network": "all", "network": "all",
"packages": [ "packages": ["tabWorkOrder"]
"tabWorkOrder"
]
}, },
"tabIndex/pages/index/index": { "tabIndex/pages/index/index": {
"network": "all", "network": "all",
"packages": [ "packages": ["tabWorkOrder"]
"tabWorkOrder"
]
} }
}, },
"resolveAlias": { "resolveAlias": {
......
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 = 4
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync()
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion
//手动控制体验版环境的请求 true就依据下面index false就默认2 //手动控制体验版环境的请求 true就依据下面index false就默认2
const manual = false const manual = 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
...@@ -77,6 +77,7 @@ Component({ ...@@ -77,6 +77,7 @@ Component({
['form.dateTimeList']: wx.$util.deepClone(dateTimeList) ['form.dateTimeList']: wx.$util.deepClone(dateTimeList)
}) })
this.setInviteStatusList() this.setInviteStatusList()
this.setTrafficEffectiveness()
}, },
getScreenList() { getScreenList() {
let { userInfo } = this.data let { userInfo } = this.data
...@@ -258,6 +259,27 @@ Component({ ...@@ -258,6 +259,27 @@ Component({
}) })
this.setInviteStatusListDisabled(n) this.setInviteStatusListDisabled(n)
}, },
/**流量有效性 */
setTrafficEffectiveness(){
let arr = [
{
name: '全部',
active: true,
value: ''
},
{
name: '有效客户',
value: 1
},
{
name: '无效客户',
value: 2
},
]
this.setData({
['form.trafficEffectiveness']: arr
})
},
setInviteStatusListDisabled(statusType) { setInviteStatusListDisabled(statusType) {
let { inviteStatusList } = this.data.form let { inviteStatusList } = this.data.form
inviteStatusList.map((e, index) => { inviteStatusList.map((e, index) => {
......
...@@ -112,6 +112,16 @@ ...@@ -112,6 +112,16 @@
</block> </block>
</view> </view>
</view> </view>
<view class="box">
<view class="title">
流量有效性
</view>
<view class="list-box">
<block wx:for="{{form.trafficEffectiveness}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="trafficEffectiveness" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
</view> </view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn clear text-center" bindtap="reset">清除</view> <view class="btn clear text-center" bindtap="reset">清除</view>
......
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return false
}
/*
* 导出
*/
module.exports = {
btnPermissions: btnPermissions
}
// tabDate/pages/index/index.js // tabDate/pages/index/index.js
import api from "../api"; import api from "../api";
import commonApi from '~/api/api'
const app = getApp(); const app = getApp();
const TABLIST = ["全部", "已预约", "待预约"]; const TABLIST = ["全部", "已预约", "待预约"];
const IMG_URL = const IMG_URL =
...@@ -13,6 +14,7 @@ Page({ ...@@ -13,6 +14,7 @@ Page({
tabIndex: 0, tabIndex: 0,
activeIndex: 0, activeIndex: 0,
phoneShow: false, phoneShow: false,
userPermissions: [], // 权限数组
inviteObj: { inviteObj: {
dayInvited: 0, dayInvited: 0,
overdue: 0, overdue: 0,
...@@ -52,6 +54,10 @@ Page({ ...@@ -52,6 +54,10 @@ Page({
label: "转化人员", label: "转化人员",
arr: ["yqMerchantName", "userName"], arr: ["yqMerchantName", "userName"],
}, },
{
label: '流量有效性',
single_key: 'trafficEffectivenessName'
}
], ],
// 邀约状态(1待邀约;2已邀约;3取消预约) // 邀约状态(1待邀约;2已邀约;3取消预约)
status: { status: {
...@@ -311,6 +317,21 @@ Page({ ...@@ -311,6 +317,21 @@ Page({
}); });
wx.hideTabBar(); wx.hideTabBar();
}, },
// 获取人员权限
getStaffPermissions() {
let { userInfo } = this.data
commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res
if (code == 0) {
this.setData({
userPermissions: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
jump(e) { jump(e) {
// console.log(e) // console.log(e)
// return // return
...@@ -327,6 +348,7 @@ Page({ ...@@ -327,6 +348,7 @@ Page({
phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig, phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
}); });
// this.getStatByPeriod() // this.getStatByPeriod()
// this.getiIviteRecord() // this.getiIviteRecord()
}, },
...@@ -432,6 +454,10 @@ Page({ ...@@ -432,6 +454,10 @@ Page({
e.merchantName = e.merchantCoupon.merchantName; e.merchantName = e.merchantCoupon.merchantName;
e.yqMerchantName = e.merchantCoupon.yqMerchantName; e.yqMerchantName = e.merchantCoupon.yqMerchantName;
} }
e.trafficEffectivenessName = {
1: '有效客户',
2: '无效客户'
}[e.trafficEffectiveness] || '-'
}); });
const userType = const userType =
!userInfo?.isSuper && !userInfo?.isSuper &&
...@@ -527,6 +553,7 @@ Page({ ...@@ -527,6 +553,7 @@ Page({
} }
); );
} }
this.getStaffPermissions()
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
<navigation-bar bindnavbarReady="navbarReady" showBack="{{show_confirm}}" bindback="back"> <navigation-bar bindnavbarReady="navbarReady" showBack="{{show_confirm}}" bindback="back">
{{!show_confirm?'预约管理':'筛选'}} {{!show_confirm?'预约管理':'筛选'}}
</navigation-bar> </navigation-bar>
<wxs src="../index.wxs" module="filter" />
<!-- wx:if="{{navBarHeight > 0}}" --> <!-- wx:if="{{navBarHeight > 0}}" -->
<block wx:if="{{navBarHeight > 0}}"> <block wx:if="{{navBarHeight > 0}}">
<view class="main" style="margin-top:{{navBarHeight}}px"> <view class="main" style="margin-top:{{navBarHeight}}px">
...@@ -8,14 +9,7 @@ ...@@ -8,14 +9,7 @@
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
<input <input type="text" placeholder="请输入客户名称进行搜索" class="input" value="{{keyword}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
type="text"
placeholder="请输入客户名称进行搜索"
class="input"
value="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}"> <block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" /> <image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block> </block>
...@@ -27,49 +21,21 @@ ...@@ -27,49 +21,21 @@
</view> </view>
</view> </view>
</view> </view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" activeIndex="{{activeIndex}}"/> <tab-bar tabList="{{tabList}}" bindclick="tabClick" activeIndex="{{activeIndex}}" />
</view> </view>
<view class="list-bar"> <view class="list-bar">
<view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view> <view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view>
<view>本周预约 · <span class="txt-blue">{{inviteObj.weekInvited || 0}}</span></view> <view>本周预约 · <span class="txt-blue">{{inviteObj.weekInvited || 0}}</span></view>
<view>超时未到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view> <view>超时未到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view>
<image class="icon-cal" wx:if="{{isMake}}" src="{{IMG_URL}}miniProgram/date_icon.png" bindtap="jump" data-item="{}" data-recorderId='22' data-name="tabDate.apprManage"/> <image class="icon-cal" wx:if="{{isMake&&filter.btnPermissions(userPermissions, 'YUYUEKEHU')}}" src="{{IMG_URL}}miniProgram/date_icon.png" bindtap="jump" data-item="{}" data-recorderId='22' data-name="tabDate.apprManage" />
</view> </view>
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<scroll-view <scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="search" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - {{navBarHeight}}px - var(--fontSize252));" refresher-threshold="104" refresher-triggered="{{triggered}}" class="list">
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="search"
bindscrolltolower="scrollonReachBottom"
class="list"
style="height:calc(100vh - {{navBarHeight}}px - var(--fontSize252));"
refresher-threshold="104"
refresher-triggered="{{triggered}}"
class="list">
<block wx:if="{{list.length > 0}}"> <block wx:if="{{list.length > 0}}">
<block wx:for="{{list}}" wx:key="index"> <block wx:for="{{list}}" wx:key="index">
<block <block wx:for="{{item}}" wx:for-item="li" wx:for-index="ind" wx:key="ind">
wx:for="{{item}}" <view style="{{li.txtStyle}}" class="touch-item {{li.isTouchMove ? 'touch-move-active' : ''}}" data-ind='{{ind}}' data-index='{{index}}'>
wx:for-item="li" <view class="item list-item content" catchtap="jump" data-ind='{{ind}}' data-index='{{index}}' bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchE" data-name="tabDate.detail" data-recorderId='23' data-item="{{li}}">
wx:for-index="ind"
wx:key="ind">
<view
style="{{li.txtStyle}}"
class="touch-item {{li.isTouchMove ? 'touch-move-active' : ''}}"
data-ind='{{ind}}'
data-index='{{index}}'>
<view
class="item list-item content"
catchtap="jump"
data-ind='{{ind}}'
data-index='{{index}}'
bindtouchstart="touchstart"
bindtouchmove="touchmove"
bindtouchend="touchE"
data-name="tabDate.detail"
data-recorderId='23'
data-item="{{li}}">
<view class="status" style="color:{{status[li.inviteStatus].color}};background: {{status[li.inviteStatus].background}};"> <view class="status" style="color:{{status[li.inviteStatus].color}};background: {{status[li.inviteStatus].background}};">
<block>{{status[li.inviteStatus].text}}</block> <block>{{status[li.inviteStatus].text}}</block>
<!-- <block wx:if="{{li.inviteStatus !=4}}"> <!-- <block wx:if="{{li.inviteStatus !=4}}">
...@@ -79,7 +45,7 @@ ...@@ -79,7 +45,7 @@
<view class="name"> <view class="name">
<!-- <image src="/images/avatar.png" /> --> <!-- <image src="/images/avatar.png" /> -->
<view class="name-text text-hide">{{li.customer.customerName || ''}}</view> <view class="name-text text-hide">{{li.customer.customerName || ''}}</view>
<image class="name-sex-icon" src="{{IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png'}}" mode=""/> <image class="name-sex-icon" src="{{IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png'}}" mode="" />
</view> </view>
<view class="order-list"> <view class="order-list">
<block wx:for="{{orderObj}}" wx:key="index" wx:for-item="i"> <block wx:for="{{orderObj}}" wx:key="index" wx:for-item="i">
...@@ -88,11 +54,7 @@ ...@@ -88,11 +54,7 @@
<view class="order-value"> <view class="order-value">
<block wx:if="{{i.arr}}"> <block wx:if="{{i.arr}}">
<block wx:if="{{li[i.arr[1]]}}"> <block wx:if="{{li[i.arr[1]]}}">
<block <block wx:for="{{i.arr}}" wx:key="sindex" wx:for-index="arr_index" wx:for-item="k">
wx:for="{{i.arr}}"
wx:key="sindex"
wx:for-index="arr_index"
wx:for-item="k">
<view class="order-value-item text-hide"> <view class="order-value-item text-hide">
<block wx:if="{{arr_index == 1}}"> <block wx:if="{{arr_index == 1}}">
<text class="split">|</text> <text class="split">|</text>
...@@ -102,6 +64,9 @@ ...@@ -102,6 +64,9 @@
</block> </block>
</block> </block>
</block> </block>
<block wx:elif="{{i.single_key}}">
<text>{{li[i.single_key]}}</text>
</block>
<block wx:else> <block wx:else>
<text>{{li[i.key][i.c_key]|| ''}}</text> <text>{{li[i.key][i.c_key]|| ''}}</text>
<text wx:if="{{li[i.key][i.e_key]}}">({{li[i.key][i.e_key]}})</text> <text wx:if="{{li[i.key][i.e_key]}}">({{li[i.key][i.e_key]}})</text>
...@@ -117,7 +82,7 @@ ...@@ -117,7 +82,7 @@
</view> </view>
<view class="order-control"> <view class="order-control">
<!-- 预约时间按钮 已支付状态置灰不可操作 --> <!-- 预约时间按钮 已支付状态置灰不可操作 -->
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && li.customerCoupon.usedFlag !='Y'&&li.inviteStatus !=4&&li.inviteStatus !=6&&isMake}}"> <block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && li.customerCoupon.usedFlag !='Y'&&li.inviteStatus !=4&&li.inviteStatus !=6&&isMake&&filter.btnPermissions(userPermissions, 'YUYUEKEHU')}}">
<view class="control-item {{li.inviteStatus == 7 ? 'disabled' : ''}}" catchtap="showDateBox" data-item="{{li}}"> <view class="control-item {{li.inviteStatus == 7 ? 'disabled' : ''}}" catchtap="showDateBox" data-item="{{li}}">
<image src="{{IMG_URL}}miniProgram/reservation_icon.png" class="date-icon" /> <image src="{{IMG_URL}}miniProgram/reservation_icon.png" class="date-icon" />
</view> </view>
...@@ -129,22 +94,11 @@ ...@@ -129,22 +94,11 @@
</block> </block>
</view> </view>
</view> </view>
<view <view wx:if="{{!li['confirmIndex']}}" class="del" catchtap="delBtn" data-ind="{{ind}}" data-item="{{li}}" data-index="{{index}}">
wx:if="{{!li['confirmIndex']}}"
class="del"
catchtap="delBtn"
data-ind="{{ind}}"
data-item="{{li}}"
data-index="{{index}}">
<view>撤销</view> <view>撤销</view>
<view>预约</view> <view>预约</view>
</view> </view>
<view <view wx:else class="del confirm" catchtap="repeal" data-item="{{li}}" data-index="{{index}}">
wx:else
class="del confirm"
catchtap="repeal"
data-item="{{li}}"
data-index="{{index}}">
确认删除 确认删除
</view> </view>
</view> </view>
...@@ -163,12 +117,7 @@ ...@@ -163,12 +117,7 @@
</block> </block>
<page-container show="{{show_confirm}}" duration="{{0}}" overlay="{{false}}" bind:afterleave="back"> <page-container show="{{show_confirm}}" duration="{{0}}" overlay="{{false}}" bind:afterleave="back">
<view wx:if="{{showRendering}}"> <view wx:if="{{showRendering}}">
<date-screen <date-screen show="{{show_confirm}}" userInfo="{{userInfo}}" navBarHeight="{{navBarHeight}}" inviteStatus="{{tabIndex}}" />
show="{{show_confirm}}"
userInfo="{{userInfo}}"
navBarHeight="{{navBarHeight}}"
inviteStatus="{{tabIndex}}" />
</view> </view>
</page-container> </page-container>
<date-picker show="{{showDate}}" merchantId="{{dateItem.merchantCoupon.yqMerchantId}}" /> <date-picker show="{{showDate}}" merchantId="{{dateItem.merchantCoupon.yqMerchantId}}" />
\ No newline at end of file \ No newline at end of file
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
})
},
/**获取技师列表数据(过滤已禁用的数据) */
getTechnicianList(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', {...params})
}
}
\ No newline at end of file \ No newline at end of file
// pages/tabRepairOrder/components/Screening/index.js
import api from '../../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.getTechnicianList({
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;
}
}
}
.endbox {
border: none;
}
}
}
.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 endbox">
<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 || val.constructionStatus == 2 ? '#347BFF' : val.constructionStatus == 0 ? '#FF9D0A' : ''
val.statusbackground = val.constructionStatus == 1 || val.constructionStatus == 2 ? '#EAF1FF' : val.constructionStatus == 0 ? '#FFF5E6' : ''
val.statusText = val.constructionStatus == 1 ? '已施工' : val.constructionStatus == 0 ? '待施工' : val.constructionStatus == 2 ? '客户返工' : ''
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()
// 切换tab或状态值在tabList中,无需传参施工状态
if (obj.constructionStatus != 2) {
delete obj.constructionStatus
}
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(--fontSize22);
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;
&:last-child{
margin-bottom: 0;
}
.goods-name {
display: inline-block;
max-width: calc(100% - var(--fontSize184));
}
.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(--fontSize22);
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;width: calc(100% - var(--fontSize76));">
<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>
// pages/tabWorkOrder/components/OrderScreen/OrderScreen.js // pages/tabWorkOrder/components/OrderScreen/OrderScreen.js
import api from '~/api/api' import api from '~/api/api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -16,8 +16,16 @@ Component({ ...@@ -16,8 +16,16 @@ Component({
this.setViewData() this.setViewData()
let { userInfo } = this.data let { userInfo } = this.data
// 非超管 获取转化人员 销售顾问 // 非超管 获取转化人员 销售顾问
if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo.loginRole == 6)) { if (
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空 !(
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5 ||
userInfo.loginRole == 6
)
) {
if (wx.$orderListDateListScreenRefresh) {
// 切换门店将数据清空
this.setData({ this.setData({
'form.userIdList': [], 'form.userIdList': [],
'form.sellerUserIdList': [] 'form.sellerUserIdList': []
...@@ -49,7 +57,8 @@ Component({ ...@@ -49,7 +57,8 @@ Component({
data: { data: {
IMG_URL, IMG_URL,
// 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 // 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销
statusList: [{ statusList: [
{
name: '全部', name: '全部',
active: true, active: true,
value: [] value: []
...@@ -86,55 +95,85 @@ Component({ ...@@ -86,55 +95,85 @@ Component({
name: '已失效', name: '已失效',
value: [11] value: [11]
}, },
// {
// name: '未施工',
// value: ['N']
// },
// {
// name: '已施工',
// value: ['Y']
// },
{
name: '已退款',
value: [5, 12]
}
],
constructionStatusList: [
{ {
name: '未施工', name: '全部',
value: ['N'] active: true,
value: ''
}, },
{ {
name: '已施工', name: '已施工',
value: ['Y'] value: 'Y'
}, },
{ {
name: '已退款', name: '待施工',
value: [5, 12] value: 'N'
},
{
name: '无需施工',
value: 'Z'
} }
], ],
maxDate: new Date().format('yyyy-MM-dd'), maxDate: new Date().format('yyyy-MM-dd'),
orderTimeList: [{ orderTimeList: [
{
name: '全部', name: '全部',
active: true active: true
}, { },
{
name: '今日', name: '今日',
orderStartDate: new Date().format('yyyy-MM-dd'), orderStartDate: new Date().format('yyyy-MM-dd'),
orderEndDate: new Date().format('yyyy-MM-dd') orderEndDate: new Date().format('yyyy-MM-dd')
}, { },
{
name: '本月', name: '本月',
orderStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'), orderStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'),
orderEndDate: new Date().format('yyyy-MM-dd') orderEndDate: new Date().format('yyyy-MM-dd')
}, { },
{
orderStartDate: '', orderStartDate: '',
orderEndDate: '', orderEndDate: '',
type: 'custom' type: 'custom'
}], }
payTimeList: [{ ],
payTimeList: [
{
name: '全部', name: '全部',
active: true active: true
}, { },
{
name: '今日', name: '今日',
payStartDate: new Date().format('yyyy-MM-dd'), payStartDate: new Date().format('yyyy-MM-dd'),
payEndDate: new Date().format('yyyy-MM-dd') payEndDate: new Date().format('yyyy-MM-dd')
}, { },
{
name: '本月', name: '本月',
payStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'), payStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'),
payEndDate: new Date().format('yyyy-MM-dd') payEndDate: new Date().format('yyyy-MM-dd')
}, { },
{
payStartDate: '', payStartDate: '',
payEndDate: '', payEndDate: '',
type: 'custom' type: 'custom'
}], }
],
employShowMore: false, employShowMore: false,
salesmanShowMore: false, salesmanShowMore: false,
payTypeList: [{ payTypeList: [
{
name: '门店收款', name: '门店收款',
value: 2 value: 2
}, },
...@@ -185,8 +224,10 @@ Component({ ...@@ -185,8 +224,10 @@ Component({
}, },
storeConfirm(e) { storeConfirm(e) {
let { storeType } = this.data let { storeType } = this.data
if (storeType == 1) this.setData({ 'form.selectedYqMerchantList': e?.detail }) if (storeType == 1)
if (storeType == 2) this.setData({ 'form.selectedMerchantList': e?.detail }) this.setData({ 'form.selectedYqMerchantList': e?.detail })
if (storeType == 2)
this.setData({ 'form.selectedMerchantList': e?.detail })
this.setData({ showStoreSelectPopup: false, isReset: false }) this.setData({ showStoreSelectPopup: false, isReset: false })
}, },
yqMerchantChoose() { yqMerchantChoose() {
...@@ -206,11 +247,21 @@ Component({ ...@@ -206,11 +247,21 @@ 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
)
) {
// 获取支付方式 // 获取支付方式
api.getYqStoreConfig({ yqMerchantId: userInfo?.merchantId }).then(res => { api
.getYqStoreConfig({ yqMerchantId: userInfo?.merchantId })
.then(res => {
let { code, message } = res let { code, message } = res
if (code == 0) { if (code == 0) {
let obj = res.data || {} let obj = res.data || {}
...@@ -244,25 +295,30 @@ Component({ ...@@ -244,25 +295,30 @@ Component({
} }
}) })
} else { } else {
let payArr = [{ let payArr = [
{
name: '全部', name: '全部',
value: '', value: '',
active: true active: true
}, ...wx.$util.deepClone(this.data.payTypeList), { },
...wx.$util.deepClone(this.data.payTypeList),
{
name: '对公转账', name: '对公转账',
value: '6' value: '6'
}, },
{ {
name: '其它收款', name: '其它收款',
value: '7' value: '7'
}] }
]
this.setData({ this.setData({
['form.payType']: payArr ['form.payType']: payArr
}) })
} }
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.constructionFlag']: wx.$util.deepClone(constructionStatusList)
}) })
}, },
showMore(e) { showMore(e) {
...@@ -280,12 +336,15 @@ Component({ ...@@ -280,12 +336,15 @@ Component({
date: { start, end } date: { start, end }
} = e.detail } = e.detail
data?.map(i => (i.active = false)) data?.map(i => (i.active = false))
let obj = name == 'orderTimeList' ? { let obj =
name == 'orderTimeList'
? {
active: true, active: true,
orderStartDate: start, orderStartDate: start,
orderEndDate: end, orderEndDate: end,
type: 'custom' type: 'custom'
} : { }
: {
active: true, active: true,
payStartDate: start, payStartDate: start,
payEndDate: end, payEndDate: end,
...@@ -300,7 +359,10 @@ Component({ ...@@ -300,7 +359,10 @@ Component({
// 日期组件 // 日期组件
showCalendar(e) { showCalendar(e) {
let { target } = e.currentTarget.dataset let { target } = e.currentTarget.dataset
let calendarModule = target == 'showOrder' ? this.selectComponent('#orderCalendar') : this.selectComponent('#payCalendar') let calendarModule =
target == 'showOrder'
? this.selectComponent('#orderCalendar')
: this.selectComponent('#payCalendar')
calendarModule.showCalendar && calendarModule.showCalendar(e) calendarModule.showCalendar && calendarModule.showCalendar(e)
}, },
choose(e) { choose(e) {
...@@ -309,7 +371,7 @@ Component({ ...@@ -309,7 +371,7 @@ Component({
if (target[index].disabled) return if (target[index].disabled) return
if (listName === 'sellerUserIdList' || listName === 'userIdList') { if (listName === 'sellerUserIdList' || listName === 'userIdList') {
if (index == 0) { if (index == 0) {
target.forEach(i => i.active = false) target.forEach(i => (i.active = false))
target[index].active = true target[index].active = true
} else { } else {
target[index].active = !target[index].active target[index].active = !target[index].active
...@@ -332,9 +394,7 @@ Component({ ...@@ -332,9 +394,7 @@ Component({
if (n != -1) this.setOrderStatusListDisabled(n) if (n != -1) this.setOrderStatusListDisabled(n)
}, },
setOrderStatusListDisabled(statusType) { setOrderStatusListDisabled(statusType) {
let { let { statusList } = this.data
statusList
} = this.data
statusList.map((e, index) => { statusList.map((e, index) => {
if (statusType == 1) { if (statusType == 1) {
if (index != 1 && index != 0) e.disabled = true if (index != 1 && index != 0) e.disabled = true
...@@ -380,7 +440,10 @@ Component({ ...@@ -380,7 +440,10 @@ Component({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
let formArr = wx.$util.arrayUnique(arr?.concat(form?.[targetItem] || []), 'uuid') let formArr = wx.$util.arrayUnique(
arr?.concat(form?.[targetItem] || []),
'uuid'
)
this.setData({ this.setData({
[target]: formArr [target]: formArr
}) })
...@@ -429,7 +492,14 @@ Component({ ...@@ -429,7 +492,14 @@ Component({
let arr = [] let arr = []
form[e]?.map(i => { form[e]?.map(i => {
if (i.active) { if (i.active) {
let { orderStartDate, orderEndDate, payStartDate, payEndDate, value, merchantId } = i let {
orderStartDate,
orderEndDate,
payStartDate,
payEndDate,
value,
merchantId
} = i
obj[e] = value obj[e] = value
// 订单时间 // 订单时间
if (orderStartDate && orderEndDate) { if (orderStartDate && orderEndDate) {
......
var replaceItemText = function (item) { var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g') var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ') // return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null return item ? item.replace(reg, ' ') : null
...@@ -11,11 +10,35 @@ var isIncludesItem = function (list, item) { ...@@ -11,11 +10,35 @@ 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 (constructionStatus) {
console.log(constructionStatus)
switch (constructionStatus) {
case 1:
case 2:
return 'constructionFlaged'
case 0:
return 'constructionFlaging'
case 3:
return ''
default:
return ''
}
// return 'constructionFlaging';
}
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return false
}
/* /*
* 导出 * 导出
*/ */
module.exports = { module.exports = {
replaceItemText: replaceItemText, replaceItemText: replaceItemText,
isIncludesItem: isIncludesItem isIncludesItem: isIncludesItem,
subStatus: subStatus,
btnPermissions: btnPermissions
} }
...@@ -233,14 +233,54 @@ page { ...@@ -233,14 +233,54 @@ page {
border-radius: 100%; border-radius: 100%;
} }
.list .item .goods-list .constructionFlaging::after {
width: var(--fontSize32);
height: var(--fontSize32);
margin-left: -10rpx;
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/constructionFlaging.png);
background-size: 100%;
}
.list .item .goods-list .constructionFlaged::after {
width: var(--fontSize32);
height: var(--fontSize32);
margin-left: -10rpx;
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/constructionFlaged.png);
background-size: 100%;
}
.list .item .goods-list .pullDownArrow::after {
width: var(--fontSize32);
height: var(--fontSize32);
-webkit-transition: all 0.4s;
transition: all 0.4s;
margin-left: -8rpx;
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/pullDownArrow.png);
background-size: 100%;
}
.list .item .goods-list .showAllGoodsListFlag::after {
// width: var(--fontSize32);
transform: rotate(180deg);
// height: var(--fontSize32);
// -webkit-transition: all 0.4s;
transition: all 0.4s;
margin-top: -15rpx;
margin-left: -8rpx;
// background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/pullDownArrow.png);
// background-size: 100%;
}
.list .item .goods-list .goods .goods-name { .list .item .goods-list .goods .goods-name {
font-size: var(--fontSize28); font-size: var(--fontSize28);
// color: #292D33;
color: #292D33; 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 +289,18 @@ page { ...@@ -249,14 +289,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 +620,7 @@ page { ...@@ -576,6 +620,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 +679,12 @@ page { ...@@ -634,3 +679,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
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<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(i.constructionStatus) }} {{i.packageGoodsOrderList?'pullDownArrow':''}} {{i.foldUp?'showAllGoodsListFlag':'' }}" 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 +62,20 @@ ...@@ -62,6 +62,20 @@
<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="packindex" wx:for-item="packchild" wx:for-index="packindex">
<view class="goods {{ filter.subStatus(packchild.constructionStatus) }}">
<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 +86,7 @@ ...@@ -72,7 +86,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">
...@@ -133,14 +147,7 @@ ...@@ -133,14 +147,7 @@
<!-- footer --> <!-- footer -->
</view> </view>
<block wx:if="{{ isMake }}"> <block wx:if="{{ isMake }}">
<view <view wx:if="{{ !li['confirmIndex'] }}" class="del" catchtap="delBtn" data-ind="{{ ind }}" data-item="{{ li }}" data-index="{{ index }}">
wx:if="{{ !li['confirmIndex'] }}"
class="del"
catchtap="delBtn"
data-ind="{{ ind }}"
data-item="{{ li }}"
data-index="{{ index }}"
>
<view>撤销</view> <view>撤销</view>
<view>工单</view> <view>工单</view>
</view> </view>
...@@ -192,11 +199,11 @@ ...@@ -192,11 +199,11 @@
<gl-image class="icon" src="/miniProgram/order3.png"></gl-image> <gl-image class="icon" src="/miniProgram/order3.png"></gl-image>
战败下单 战败下单
</view> </view>
<view 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()
} }
/**监听页面 */ /**监听页面 */
......
...@@ -321,10 +321,11 @@ export const setWebSocket = () => { ...@@ -321,10 +321,11 @@ export const setWebSocket = () => {
export const get4SStoreList = (options, isSupervision, noScene) => { // isSupervision是否是区域运营/超管/飞行督导 noScene登录未选场景时 export const get4SStoreList = (options, isSupervision, noScene) => { // isSupervision是否是区域运营/超管/飞行督导 noScene登录未选场景时
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.$util.showLoading() wx.$util.showLoading()
options.sceneType = options.scene
delete options.scene
let all = { merchantName: '全部' } let all = { merchantName: '全部' }
let event = noScene || !isSupervision ? 'getSceneMerchantRefStoreList' : 'getCurShopList' let event = noScene || !isSupervision ? 'getSceneMerchantRefStoreList' : 'getCurShopList'
if (event == 'getCurShopList') {
options.sceneType = options.scene
}
// console.log(event, isSupervision, 'get4SStoreList'); // console.log(event, isSupervision, 'get4SStoreList');
// let event = 'getSceneMerchantRefStoreList' // let event = 'getSceneMerchantRefStoreList'
api[event](options) api[event](options)
......
...@@ -52,6 +52,13 @@ module.exports = { ...@@ -52,6 +52,13 @@ module.exports = {
/** 查询客户画像 */ /** 查询客户画像 */
portraitQuery(data) { portraitQuery(data) {
return api.post('dj.api.smartcarlife.customer.portrait.query', data) return api.post('dj.api.smartcarlife.customer.portrait.query', data)
},
/**
* 标记流量有效性
*
*/
updateTrafficEffectiveness(data) {
return api.post('dj.api.smartcarlife.inviteRecord.trafficEffectiveness.update', data)
} }
} }
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return false
}
/*
* 导出
*/
module.exports = {
btnPermissions: btnPermissions
}
import api from "../../api"; import api from "../../api";
// tabDate/pages/detail/detail.js // tabDate/pages/detail/detail.js
import CONSTANTDATA from "../userPortrait/constant/data"; import CONSTANTDATA from "../userPortrait/constant/data";
import { checkDailyReport } from "~/store/ModalToQueueControl"; import commonApi from '~/api/api'
import {
checkDailyReport
} from "~/store/ModalToQueueControl";
const app = getApp(); const app = getApp();
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMG_URL,
detail: {}, detail: {},
userPermissions: [], // 权限数组
orderObj: { orderObj: {
customer: { customer: {
customerName: "", customerName: "",
...@@ -21,8 +28,7 @@ Page({ ...@@ -21,8 +28,7 @@ Page({
remark: "", remark: "",
selectPayType: 2, selectPayType: 2,
}, },
customerObj: [ customerObj: [{
{
label: "客户姓名", label: "客户姓名",
key: "customerName", key: "customerName",
}, },
...@@ -56,8 +62,7 @@ Page({ ...@@ -56,8 +62,7 @@ Page({
portrait: true, portrait: true,
}, },
], ],
recordObj: [ recordObj: [{
{
label: "跟进人", label: "跟进人",
key: "userName", key: "userName",
}, },
...@@ -80,28 +85,46 @@ Page({ ...@@ -80,28 +85,46 @@ Page({
remark: "", remark: "",
isOrder: true, isOrder: true,
selectType: 1, selectType: 1,
sceneObj: {} sceneObj: {},
trafficEffectivenessList: [{
name: '有效客户',
value: '1'
},
{
name: '无效客户',
value: '2'
}
]
}, },
// 确定是否要显示 // 确定是否要显示
showSelectType({ scene = "", item = {} }) { showSelectType({
scene = "",
item = {}
}) {
wx.$modal( wx.$modal(
this, this, {
{
show: true, show: true,
title: "请选择录单入口", title: "请选择录单入口",
tabTitleShow: false, tabTitleShow: false,
success: (res) => { success: (res) => {
// 跳转新增订单页面 并带特定参数 // 跳转新增订单页面 并带特定参数
let { selectType } = this.data; let {
selectType
} = this.data;
if (selectType == 1) { if (selectType == 1) {
// wx.$router.go("tabWorkOrder.createOrder", { // wx.$router.go("tabWorkOrder.createOrder", {
// scene, // scene,
// ...item, // ...item,
// }); // });
this.setData({ showPromptDialog: true, sceneObj: item }) this.setData({
showPromptDialog: true,
sceneObj: item
})
} else { } else {
console.log({ ...item }, "item"); console.log({
...item
}, "item");
wx.$router.go("tabWorkOrder.defeatOrder", { wx.$router.go("tabWorkOrder.defeatOrder", {
scene, scene,
...item, ...item,
...@@ -114,8 +137,13 @@ Page({ ...@@ -114,8 +137,13 @@ Page({
); );
}, },
promptHandleConfirm(e) { promptHandleConfirm(e) {
let { payFlag, payType } = e.detail let {
let { sceneObj } = this.data payFlag,
payType
} = e.detail
let {
sceneObj
} = this.data
let paymentMethod = payFlag != 2 ? 1 : payType let paymentMethod = payFlag != 2 ? 1 : payType
if (payFlag == 1 || payType == 3 || payType == 4 || payType == 6) { if (payFlag == 1 || payType == 3 || payType == 4 || payType == 6) {
let params = { let params = {
...@@ -136,7 +164,9 @@ Page({ ...@@ -136,7 +164,9 @@ Page({
}) })
}, },
selectType(e) { selectType(e) {
let { type } = e.currentTarget.dataset; let {
type
} = e.currentTarget.dataset;
console.log(e, e.currentTarget.dataset, type); console.log(e, e.currentTarget.dataset, type);
this.setData({ this.setData({
selectType: type, selectType: type,
...@@ -144,8 +174,12 @@ Page({ ...@@ -144,8 +174,12 @@ Page({
}, },
showPopup(e) { showPopup(e) {
let _this = this; let _this = this;
let { name } = e.currentTarget.dataset; let {
let { detail } = this.data; name
} = e.currentTarget.dataset;
let {
detail
} = this.data;
// if (detail.inviteStatus == 4 && name == 'showDate') return _this.showToast('已施工不可操作!')// 已施工预约单不可修改到店时间 // if (detail.inviteStatus == 4 && name == 'showDate') return _this.showToast('已施工不可操作!')// 已施工预约单不可修改到店时间
this.setData({ this.setData({
[name]: !this.data[name], [name]: !this.data[name],
...@@ -153,7 +187,9 @@ Page({ ...@@ -153,7 +187,9 @@ Page({
}, },
setCopyData(e) { setCopyData(e) {
console.log(e); console.log(e);
let { content } = e.currentTarget.dataset; let {
content
} = e.currentTarget.dataset;
wx.$util.setCopyData(`${content}`); wx.$util.setCopyData(`${content}`);
}, },
editProtrait(e) { editProtrait(e) {
...@@ -162,11 +198,28 @@ Page({ ...@@ -162,11 +198,28 @@ Page({
}, },
makePhoneCall(e) { makePhoneCall(e) {
console.log(e); console.log(e);
let { data } = e.currentTarget.dataset; let {
data
} = e.currentTarget.dataset;
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: data, phoneNumber: data,
}); });
}, },
// 获取人员权限
getStaffPermissions() {
let { userInfo } = this.data
commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res
if (code == 0) {
this.setData({
userPermissions: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
onRoute(options) { onRoute(options) {
console.log(options); console.log(options);
if (options.id) { if (options.id) {
...@@ -190,15 +243,18 @@ Page({ ...@@ -190,15 +243,18 @@ Page({
} }
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6|| userInfo?.loginRole == 7), isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
}); });
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig); this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig);
this.getStaffPermissions()
}, },
checkPhoneShow(config) { checkPhoneShow(config) {
console.log("config", config); console.log("config", config);
// 有就屏蔽手机号的显示 // 有就屏蔽手机号的显示
if (config) { if (config) {
let { customerObj } = this.data; let {
customerObj
} = this.data;
delete customerObj[1]; delete customerObj[1];
this.setData({ this.setData({
customerObj, customerObj,
...@@ -207,7 +263,10 @@ Page({ ...@@ -207,7 +263,10 @@ Page({
}, },
async dealPortrait(id) { async dealPortrait(id) {
let _userPortrait = []; let _userPortrait = [];
let { code, data: info } = await api.portraitQuery({ let {
code,
data: info
} = await api.portraitQuery({
id, id,
}); });
if (code != 0) return; if (code != 0) return;
...@@ -256,7 +315,11 @@ Page({ ...@@ -256,7 +315,11 @@ Page({
}) })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
let { code, message, data } = res; let {
code,
message,
data
} = res;
if (code == 0) { if (code == 0) {
wx.$util.hideLoading(); wx.$util.hideLoading();
let detail = {}; let detail = {};
...@@ -287,9 +350,9 @@ Page({ ...@@ -287,9 +350,9 @@ Page({
// 格式化跟进时间 // 格式化跟进时间
let time = e.inviteDate; let time = e.inviteDate;
e.inviteDate = time e.inviteDate = time ?
? `「${new Date(e.inviteDate).format("MM-dd hh:mm")}」` `「${new Date(e.inviteDate).format("MM-dd hh:mm")}」` :
: ""; "";
}); });
} }
if (detail.carSeriesName) if (detail.carSeriesName)
...@@ -303,7 +366,20 @@ Page({ ...@@ -303,7 +366,20 @@ Page({
detail.inviteDate = new Date(detail.inviteDate).format( detail.inviteDate = new Date(detail.inviteDate).format(
"yyyy-MM-dd hh:mm:ss" "yyyy-MM-dd hh:mm:ss"
); );
if (detail.trafficEffectiveness) {
detail.trafficEffectivenessName = {
1: '有效客户',
2: '无效客户'
}[detail.trafficEffectiveness]
}
let {
userInfo,
isOrder
} = this.data,
//已支付4、已失效11、已撤销9、已评价6、已关闭10、战败2 不支持编辑
trafficEffectivenessDisabled = (userInfo.isSuper && !userInfo.merchantType && userInfo.userType != 2 && !isOrder) || (detail.inviteStatus == 4 || detail.inviteStatus == 6 || detail.inviteStatus == 7) || ([4, 11, 9, 6, 10, 2].includes(detail.orderStatus))
this.setData({ this.setData({
trafficEffectivenessDisabled,
detail, detail,
flag: true, flag: true,
}); });
...@@ -313,12 +389,17 @@ Page({ ...@@ -313,12 +389,17 @@ Page({
wx.showModal({ wx.showModal({
title: "温馨提示", title: "温馨提示",
content: message, content: message,
showCancel: false, // showCancel: false,
cancelText:'返回',
confirmText: "刷新", confirmText: "刷新",
confirmColor: "#347BFF", confirmColor: "#347BFF",
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
_this.getInviteDetail(id); _this.getInviteDetail(id);
} else {
wx.$router.back(page => {
page.search && page.search()
})
} }
}, },
}); });
...@@ -326,7 +407,10 @@ Page({ ...@@ -326,7 +407,10 @@ Page({
}); });
}, },
setInviteDate() { setInviteDate() {
let { detail, inviteDateStr } = this.data; let {
detail,
inviteDateStr
} = this.data;
api api
.setInviteDate({ .setInviteDate({
id: detail.id, id: detail.id,
...@@ -338,7 +422,11 @@ Page({ ...@@ -338,7 +422,11 @@ Page({
wx.$util.refreshPageData(true); wx.$util.refreshPageData(true);
wx.hideLoading(); wx.hideLoading();
console.log(res); console.log(res);
let { code, data, message } = res; let {
code,
data,
message
} = res;
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
showDate: false, showDate: false,
...@@ -351,7 +439,9 @@ Page({ ...@@ -351,7 +439,9 @@ Page({
}, },
cancelInvite() { cancelInvite() {
let _this = this; let _this = this;
let { id } = this.data.detail; let {
id
} = this.data.detail;
wx.showModal({ wx.showModal({
title: "温馨提示", title: "温馨提示",
content: "是否取消预约?", content: "是否取消预约?",
...@@ -367,7 +457,10 @@ Page({ ...@@ -367,7 +457,10 @@ Page({
}) })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
let { code, message } = res; let {
code,
message
} = res;
if (code == 0) { if (code == 0) {
wx.hideLoading(); wx.hideLoading();
_this.showToast("取消成功!"); _this.showToast("取消成功!");
...@@ -384,8 +477,12 @@ Page({ ...@@ -384,8 +477,12 @@ Page({
}, },
remarkConfirm(e) { remarkConfirm(e) {
let value = e.detail; let value = e.detail;
let { detail } = this.data; let {
let { id } = detail.remarks[0]; detail
} = this.data;
let {
id
} = detail.remarks[0];
if (value) { if (value) {
api api
.followRecord({ .followRecord({
...@@ -393,7 +490,10 @@ Page({ ...@@ -393,7 +490,10 @@ Page({
remark: value, remark: value,
}) })
.then((res) => { .then((res) => {
let { code, message } = res; let {
code,
message
} = res;
if (code == 0) { if (code == 0) {
this.showToast("提交成功"); this.showToast("提交成功");
this.getInviteDetail(detail.id); this.getInviteDetail(detail.id);
...@@ -409,12 +509,41 @@ Page({ ...@@ -409,12 +509,41 @@ Page({
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport();
if (staffCheck) return false; if (staffCheck) return false;
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
let { detail } = this.data; let {
detail
} = this.data;
detail.isAppointment = true; detail.isAppointment = true;
wx.$util.pointRecord(25); wx.$util.pointRecord(25);
// wx.$router.redirectTo('tabWorkOrder.createOrder', detail) // wx.$router.redirectTo('tabWorkOrder.createOrder', detail)
console.log(detail, "detail"); console.log(detail, "detail");
this.showSelectType({ item: detail }); this.showSelectType({
item: detail
});
},
async bindPickerChange(e) {
console.log(e)
let {
value
} = e.detail, {
trafficEffectivenessList,
detail: {
id
}
} = this.data,
trafficEffectiveness = trafficEffectivenessList[value].value,
trafficEffectivenessName = trafficEffectivenessList[value].name,
data = await api.updateTrafficEffectiveness({
id,
trafficEffectiveness,
inviteDateStr: 1,
inviteType: 1
})
if (data) this.setData({
['detail.trafficEffectiveness']: trafficEffectiveness,
['detail.trafficEffectivenessName']: trafficEffectivenessName
})
console.log(data)
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -425,7 +554,9 @@ Page({ ...@@ -425,7 +554,9 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
let { options } = this.data; let {
options
} = this.data;
if (options?.id) { if (options?.id) {
this.getInviteDetail(options.id); this.getInviteDetail(options.id);
} }
......
...@@ -7,7 +7,7 @@ page { ...@@ -7,7 +7,7 @@ page {
padding: var(--fontSize20) var(--fontSize20) var(--fontSize120); padding: var(--fontSize20) var(--fontSize20) var(--fontSize120);
} }
.isFullSucreen { .main.isFullSucreen {
padding-bottom: 102px !important; padding-bottom: 102px !important;
} }
...@@ -15,17 +15,26 @@ page { ...@@ -15,17 +15,26 @@ page {
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10); box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10);
border-radius: var(--fontSize16); border-radius: var(--fontSize16);
padding: var(--fontSize32) var(--fontSize40) var(--fontSize20); padding: var(--fontSize32) var(--fontSize32) var(--fontSize20);
position: relative; position: relative;
margin-bottom: var(--fontSize20); margin-bottom: var(--fontSize20);
} }
.box .title { .box .title {
font-size: var(--fontSize36); font-size: var(--fontSize32);
color: #333333; color: #333333;
font-weight: 700; font-weight: 700;
padding-bottom: var(--fontSize30); padding-bottom: var(--fontSize30);
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3); border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
display: flex;
align-items: center;
&-tips {
font-size: 20rpx;
color: #999EA8;
font-weight: 400;
margin-left: auto;
}
} }
.box .customer-list { .box .customer-list {
...@@ -44,15 +53,22 @@ page { ...@@ -44,15 +53,22 @@ page {
margin-left: auto; margin-left: auto;
color: #347BFF; color: #347BFF;
flex-shrink: 0; flex-shrink: 0;
.iconImage {
width: var(--fontSize32);
height: var(--fontSize32);
vertical-align: bottom;
}
} }
.box .customer-list .item .label { .box .customer-list .item .label {
width: var(--fontSize140); width: var(--fontSize140);
flex-shrink: 0; flex-shrink: 0;
color: #999EA8;
} }
.box .customer-list .item .value { .box .customer-list .item .value {
color: #888888; color: #292D33;
} }
.box .icon { .box .icon {
...@@ -190,6 +206,10 @@ page { ...@@ -190,6 +206,10 @@ page {
color: #999999; color: #999999;
} }
.boxend {
margin-bottom: 130rpx;
}
.fixed-box { .fixed-box {
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -322,6 +342,7 @@ page { ...@@ -322,6 +342,7 @@ page {
min-height: var(--fontSize100); min-height: var(--fontSize100);
background: #FFFFFF; background: #FFFFFF;
padding-bottom: var(--fontSize10); padding-bottom: var(--fontSize10);
padding-top: 20rpx;
} }
.btns .btn { .btns .btn {
...@@ -384,6 +405,7 @@ page { ...@@ -384,6 +405,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;
} }
...@@ -400,3 +422,43 @@ page { ...@@ -400,3 +422,43 @@ page {
box-sizing: border-box; box-sizing: border-box;
padding: var(--fontSize48) 0; padding: var(--fontSize48) 0;
} }
.picker-box {
width: 100%;
margin-top: 20rpx;
}
.picker {
display: flex;
align-items: center;
width: 100%;
height: 64rpx;
&-label {
flex-shrink: 0;
}
&-value {
width: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 28rpx;
color: #292D33;
}
}
.placeholder {
font-size: 28rpx;
color: #BEC1C7;
}
.arrow {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/equity/material/arrow.png');
background-size: 100% 100%;
margin-left: 4rpx;
}
\ No newline at end of file \ No newline at end of file
<!-- tabDate/pages/detail/detail.wxml --> <!-- tabDate/pages/detail/detail.wxml -->
<wxs src="../../index.wxs" module="filter" />
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block wx:if="{{ flag }}"> <block wx:if="{{ flag }}">
<view class="main {{ isFullSucreen && detail.inviteStatus != 4?'isFullSucreen':'' }}"> <view class="main {{ isFullSucreen && detail.inviteStatus != 4?'isFullSucreen':'' }}">
...@@ -8,7 +9,7 @@ ...@@ -8,7 +9,7 @@
<block wx:for="{{ customerObj }}" wx:key="index"> <block wx:for="{{ customerObj }}" wx:key="index">
<view class="item"> <view class="item">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view class="value {{ item.key != 'userPortrait' ? 'text-hide' : '' }}" style="color:{{ item.color }};" catchtap="item.callBack" data-data="{{ detail[item.key] }}"> <view class="value {{ item.key != 'userPortrait' ? 'text-hide' : '' }}" style="color:{{ item.color||'#292D33' }};" catchtap="item.callBack" data-data="{{ detail[item.key] }}">
<!-- <view>{{item.key}}</view> --> <!-- <view>{{item.key}}</view> -->
<block wx:if="{{ item.key=='carName' }}"> <block wx:if="{{ item.key=='carName' }}">
<block wx:if="{{ detail.customer.carSeriesName }}"> <block wx:if="{{ detail.customer.carSeriesName }}">
...@@ -27,17 +28,39 @@ ...@@ -27,17 +28,39 @@
<block wx:else>{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}</block> <block wx:else>{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}</block>
</view> </view>
<block wx:if="{{ item.copy }}"> <block wx:if="{{ item.copy }}">
<view class="copy" catchtap="setCopyData" data-content="{{ detail[item.key] }}">复制</view> <view class="copy" catchtap="setCopyData" data-content="{{ detail[item.key] }}">
<image src="{{ IMG_URL }}miniProgram/copyblue.png" class="iconImage"></image>
</view>
</block> </block>
<block wx:if="{{ item.portrait&&isOrder }}"> <block wx:if="{{ item.portrait&&isOrder }}">
<view class="copy" catchtap="editProtrait">编辑</view> <view class="copy" catchtap="editProtrait">
<image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image>
</view>
</block> </block>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
<view class="box"> <view class="box">
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2&&isOrder }}"> <view class="title">流量有效性<view class="title-tips">如客户为二网/无法接通/或无效客户标记为无效流量</view>
</view>
<picker class="picker-box" mode="selector" range="{{trafficEffectivenessList}}" range-key="name" bindchange="bindPickerChange" value="{{detail.trafficEffectiveness - 1}}" disabled="{{trafficEffectivenessDisabled}}">
<view class="picker">
<view class="picker-label">
流量有效性
</view>
<view class="picker-value">
<view class="text-hide" wx:if="{{detail.trafficEffectiveness}}">
{{detail.trafficEffectivenessName}}
</view>
<text class="placeholder" wx:else>点击选择</text>
<view class="arrow"></view>
</view>
</view>
</picker>
</view>
<view class="box">
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2&&isOrder&&filter.btnPermissions(userPermissions, 'YUYUEKEHU') }}">
<!-- 已施工/已撤销/已支付 不显示 --> <!-- 已施工/已撤销/已支付 不显示 -->
<view wx:if="{{ detail.inviteStatus != 4&&detail.inviteStatus!=6&&detail.inviteStatus!=7 }}" class="icon date-icon" bindtap="showPopup" data-name="showDate"> <view wx:if="{{ detail.inviteStatus != 4&&detail.inviteStatus!=6&&detail.inviteStatus!=7 }}" class="icon date-icon" bindtap="showPopup" data-name="showDate">
<image src="../../images/date.png" /> <image src="../../images/date.png" />
...@@ -50,7 +73,7 @@ ...@@ -50,7 +73,7 @@
<view class="date text-center {{ detail.inviteStatus == 6 ? 'gray' : '' }}"> <view class="date text-center {{ detail.inviteStatus == 6 ? 'gray' : '' }}">
{{detail.inviteDate}} {{detail.inviteDate}}
<!-- 已施工/已支付/已撤销 不显示 --> <!-- 已施工/已支付/已撤销 不显示 -->
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6&&isOrder }}"> <block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6&&isOrder &&filter.btnPermissions(userPermissions, 'YUYUEKEHU')}}">
<view class="cancel y-center" bindtap="cancelInvite">取消预约</view> <view class="cancel y-center" bindtap="cancelInvite">取消预约</view>
</block> </block>
</view> </view>
...@@ -61,7 +84,7 @@ ...@@ -61,7 +84,7 @@
<view class="nothing text-center">暂无记录</view> <view class="nothing text-center">暂无记录</view>
</block> </block>
</view> </view>
<view class="box"> <view class="box boxend">
<view class="title">客户跟进记录</view> <view class="title">客户跟进记录</view>
<block wx:if="{{ detail.remarks.length > 0 }}"> <block wx:if="{{ detail.remarks.length > 0 }}">
<view class="record-box"> <view class="record-box">
...@@ -101,7 +124,7 @@ ...@@ -101,7 +124,7 @@
<view class="value">{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}</view> <view class="value">{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}</view>
</view> </view>
</block> </block>
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6&&isOrder }}"> <block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6&&isOrder&&filter.btnPermissions(userPermissions, 'YUYUEKEHU') }}">
<view class="icon" bindtap="showPopup" data-name="showRemark"> <view class="icon" bindtap="showPopup" data-name="showRemark">
<image src="../../images/edit.png" /> <image src="../../images/edit.png" />
</view> </view>
......
...@@ -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
}) })
} }
...@@ -1477,17 +1477,17 @@ Page({ ...@@ -1477,17 +1477,17 @@ Page({
}) })
} }
//区域督导和超管角色 //区域督导和超管角色
if ( // if (
(userInfo?.isSuper || userInfo?.loginRole === 3 || userInfo?.loginRole === 5) && // (userInfo?.isSuper || userInfo?.loginRole === 3 || userInfo?.loginRole === 5) &&
menu.every(item => item.name != '技师工单') // menu.every(item => item.name != '技师工单')
) { // ) {
menu.push({ // menu.push({
name: '技师工单', // name: '技师工单',
url: 'tabWorkOrder.technicianSearchList', // url: 'tabWorkOrder.technicianSearchList',
recordId: 17, // recordId: 17,
icon: 'technician' // icon: 'technician'
}) // })
} // }
// if ((userInfo?.loginRole == 3 || userInfo.loginRole == 5) && menu.every((item) => item.name != '积分审批')) { // if ((userInfo?.loginRole == 3 || userInfo.loginRole == 5) && menu.every((item) => item.name != '积分审批')) {
// menu.push({ // menu.push({
// name: '积分审批', // name: '积分审批',
...@@ -1604,7 +1604,7 @@ Page({ ...@@ -1604,7 +1604,7 @@ Page({
this.getIsBusinessSchoolEnableCurrentUser() this.getIsBusinessSchoolEnableCurrentUser()
}, },
getAwaitAuditCount(userInfo, index) { getAwaitAuditCount(userInfo, index) {
getWaitAuditCountAPI({sceneType: userInfo?.sceneType}).then(res => { getWaitAuditCountAPI({ sceneType: userInfo?.sceneType }).then(res => {
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
......
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)
},
/**获取技师列表数据(过滤已禁用的数据) */
getTechnicianList(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', {...params})
}
}
// 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')
},
async confirm() {
let { selectedNumber } = this.data
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 { detailInfo } = this.data
this.setData({
infoData: wx.$util.deepClone(detailInfo),
'infoData.outBoundTime': new Date().format('yyyy-MM-dd hh:mm:ss')?.replace(/\//g, '-')
}, () => {
this.getDetailInfo(this.data.infoData)
})
}
}
},
title: String,
detailInfo: {
type: Object
},
userPermissions: Array
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
infoData: {},
filmRollNoList: [],
scrollTop: 0
},
/**
* 组件的方法列表
*/
methods: {
async getDetailInfo(data) {
let oParams = {}
oParams.appId = wx.getAccountInfoSync().miniProgram.appId
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
if (e.detail) {
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.subOrderCode == val.subOrderCode) > -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.subOrderCode == item.subOrderCode) 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)
}
}
})
{
"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));
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/reviewPopup/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 审核通过
confirm() {
this.triggerEvent('confirm')
},
// 不通过
cancel() {
this.triggerEvent('cancel')
},
// 关闭
close() {
this.triggerEvent('close')
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabRepairOrder/components/reviewPopup/index.wxss */
.popclass {
font-size: var(--fontSize32);
color: #292D33;
.title {
margin-top: var(--fontSize32);
text-align: center;
font-weight: 500;
}
.content {
margin: var(--fontSize32) var(--fontSize48) var(--fontSize48);
padding: 0 var(--fontSize30);
text-align: center;
font-size: var(--fontSize30);
color: #5A5E66;
}
.popup-footer {
height: var(--fontSize100);
display: flex;
align-items: center;
justify-content: center;
border-top: var(--fontSize1) solid #EBEDF0;
.btn {
flex: 1;
height: 100%;
text-align: center;
line-height: var(--fontSize100);
}
.cancel {
border-right: var(--fontSize1) solid #EBEDF0;
}
.confirm {
font-weight: 500;
color: #347BFF;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/reviewPopup/index.wxml-->
<van-popup lock-scroll catchtouchmove="noScroll" custom-style="width:var(--fontSize622);" round z-index="999999" custom-class="popclass" closeable show="{{ show }}" bind:close="close">
<view class="title">审核施工单</view>
<view class="content">
驻店零售/区域经理可审核每笔技师施工单的施工结果
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bind:tap="cancel">不通过</view>
<view class="confirm btn text-center" bind:tap="confirm">审核通过</view>
</view>
</van-popup>
\ No newline at end of file \ No newline at end of file
// tabRepairOrder/components/outboundPopup/index.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" 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) {
let { selected } = this.data
this.setData({
searchValue: '',
selectedData: wx.$util.deepClone(selected)
}, () => {
this.getList(true)
})
}
}
},
selected: {
type: Array,
observer: function(n) {
}
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
servicesList: [],
copyServicesList: [],
selectedData: []
},
/**
* 组件的方法列表
*/
methods: {
handelSearchInput(e) {
this.setData({
searchValue: e.detail.value
})
},
// 获取服务项目数据
getList(firstFlag) {
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,
serviceItemsId: item.id,
active: selectedIds.has(item.id)
}))
})
this.setData({
servicesList: data
})
if (firstFlag) {
this.setData({
copyServicesList: wx.$util.deepClone(data || [])
})
}
} else {
wx.$util.showToast(message)
}
})
},
search() {
this.getList()
},
// 服务项目选择
handleChecked(e) {
let { target } = e.currentTarget.dataset
let { servicesList, copyServicesList } = this.data
servicesList?.map(val => {
val?.detailList?.map(v => {
if (v.id == target.id) v.active = !v.active
return v
})
return val
})
copyServicesList?.map(val => {
val?.detailList?.map(v => {
if (v.id == target.id) v.active = !v.active
return v
})
return val
})
const filteredServicesList = copyServicesList?.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,
copyServicesList,
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, copyServicesList} = this.data
const result = copyServicesList.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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!