Commit eedcb61a by 张立顺

feat 功能开发

1 parent 43c0f1de
...@@ -21,7 +21,7 @@ Component({ ...@@ -21,7 +21,7 @@ Component({
value: 'var(--fontSize980)' value: 'var(--fontSize980)'
}, },
sceneObj: { sceneObj: {
observer: function(v) { observer: function (v) {
// 是否是扫码核销或再次下单,是的话不显示补录入口 // 是否是扫码核销或再次下单,是的话不显示补录入口
if (Object.keys(v)?.length) { if (Object.keys(v)?.length) {
let { payTypeList } = this.data let { payTypeList } = this.data
...@@ -57,9 +57,9 @@ Component({ ...@@ -57,9 +57,9 @@ Component({
value: '5', value: '5',
tips: '适用于已有交易收款流水需补录订单时' tips: '适用于已有交易收款流水需补录订单时'
}, { }, {
label: '收款方为嘀加二维码收款', label: '特殊收款',
value: '6', value: '6',
tips: '适用于多笔订单一笔流水付款' tips: '仅用于无法关联流水或混合支付场景,请谨慎选择。'
}] }]
}, },
......
/* tabRepairOrder/components/timeSelect/index.wxss */ /* tabRepairOrder/components/timeSelect/index.wxss */
.fixed-content { .fixed-content {
height: 100%; height: 100%;
.fixed-body { .fixed-body {
display: flex; display: flex;
height: 100%; height: 100%;
.picker { .picker {
width: 20%; width: 27.5%;
height: 100%; height: 100%;
.view { .view {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -16,8 +19,9 @@ ...@@ -16,8 +19,9 @@
color: #222222; color: #222222;
} }
} }
.picker_max{
width: 40% !important; .picker_max {
width: 45% !important;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/timeSelect/index.wxml--> <!--tabRepairOrder/components/timeSelect/index.wxml-->
<popup show="{{show}}" title="{{title}}" bindconfirm="confirm" height="50%" bindcancel="cancel"> <popup show="{{ show }}" title="{{ title }}" bindconfirm="confirm" height="50%" bindcancel="cancel">
<view class="fixed-content"> <view class="fixed-content">
<view class="fixed-body"> <view class="fixed-body">
<picker-view class="picker picker_max" value="{{dateValues}}" indicator-class="indicator" bindchange="changeDate"> <picker-view class="picker picker_max" value="{{ dateValues }}" indicator-class="indicator" bindchange="changeDate">
<picker-view-column> <picker-view-column>
<block wx:for="{{days}}" wx:key="index"> <block wx:for="{{ days }}" wx:key="index">
<view class="view">{{item}}</view> <view class="view">{{item}}</view>
</block> </block>
</picker-view-column> </picker-view-column>
</picker-view> </picker-view>
<picker-view class="picker" value="{{hourValues}}" indicator-class="indicator" bindchange="changeHour"> <picker-view class="picker" value="{{ hourValues }}" indicator-class="indicator" bindchange="changeHour">
<picker-view-column> <picker-view-column>
<block wx:for="{{hours}}" wx:key="index"> <block wx:for="{{ hours }}" wx:key="index">
<view class="view">{{item}}时</view> <view class="view">{{item}}时</view>
</block> </block>
</picker-view-column> </picker-view-column>
</picker-view> </picker-view>
<picker-view wx:if="{{!loading}}" class="picker" value="{{minuteValues}}" indicator-class="indicator" bindchange="changeMinutes"> <picker-view wx:if="{{ !loading }}" class="picker" value="{{ minuteValues }}" indicator-class="indicator" bindchange="changeMinutes">
<picker-view-column> <picker-view-column>
<block wx:for="{{minutes}}" wx:key="index"> <block wx:for="{{ minutes }}" wx:key="index">
<view class="view">{{item}}分</view> <view class="view">{{item}}分</view>
</block> </block>
</picker-view-column> </picker-view-column>
</picker-view> </picker-view>
<picker-view wx:if="{{!loading}}" class="picker" value="{{secondValues}}" indicator-class="indicator" bindchange="changeSeconds"> </view>
<picker-view-column> </view>
<block wx:for="{{seconds}}" wx:key="index">
<view class="view">{{item}}秒</view>
</block>
</picker-view-column>
</picker-view>
</view>
</view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
...@@ -304,12 +304,7 @@ Page({ ...@@ -304,12 +304,7 @@ Page({
id: it.id, id: it.id,
uuid: it.technicianUuid, uuid: it.technicianUuid,
staffPhone: it.staffPhone, staffPhone: it.staffPhone,
shareRatio: shareRatio: Math.round((it.shareRatio || 0) * 100)
it.shareRatio === null ||
it.shareRatio === undefined ||
isNaN(Number(it.shareRatio))
? ''
: Math.round(Number(it.shareRatio) * 100)
} }
}) })
const deputySelected = data?.mainTechnicianList const deputySelected = data?.mainTechnicianList
...@@ -320,12 +315,7 @@ Page({ ...@@ -320,12 +315,7 @@ Page({
id: it.id, id: it.id,
uuid: it.technicianUuid, uuid: it.technicianUuid,
staffPhone: it.staffPhone, staffPhone: it.staffPhone,
shareRatio: shareRatio: Math.round((it.shareRatio || 0) * 100)
it.shareRatio === null ||
it.shareRatio === undefined ||
isNaN(Number(it.shareRatio))
? ''
: Math.round(Number(it.shareRatio) * 100)
} }
}) })
const mainTechnicianName = data?.mainTechnicianList?.find( const mainTechnicianName = data?.mainTechnicianList?.find(
...@@ -349,19 +339,33 @@ Page({ ...@@ -349,19 +339,33 @@ Page({
if (data.customer?.customerName) { if (data.customer?.customerName) {
this.limitTwoLines(data.customer?.customerName) this.limitTwoLines(data.customer?.customerName)
} }
const existingMainSelected = this.data.mainSelected || []
const existingDeputySelected = this.data.deputySelected || []
const existingDetailInfo = this.data.detailInfo || {}
this.setData( this.setData(
{ {
detailInfo: data || {}, detailInfo: data || {},
mainSelected, mainSelected: existingMainSelected.length
deputySelected, ? existingMainSelected
'detailInfo.mainTechnicianName': mainTechnicianName, : mainSelected,
'detailInfo.subTechnicianName': subTechnicianName, deputySelected: existingDeputySelected.length
'detailInfo.pictureList': data?.pictureList?.map(val => { ? existingDeputySelected
return val.pictureUrl : deputySelected,
}), 'detailInfo.mainTechnicianName':
'detailInfo.startTime': detailInfo.startTime existingDetailInfo?.mainTechnicianName || mainTechnicianName,
? detailInfo.startTime 'detailInfo.subTechnicianName':
: data.startTime // 页面操作选了开始施工时间不做更新,未选择取更新后的时间(出库时间) existingDetailInfo?.subTechnicianName || subTechnicianName,
'detailInfo.pictureList': existingDetailInfo?.pictureList?.length
? existingDetailInfo.pictureList
: data?.pictureList?.map(val => {
return val.pictureUrl
}),
'detailInfo.startTime': existingDetailInfo?.startTime
? existingDetailInfo.startTime
: data.startTime,
'detailInfo.endTime': existingDetailInfo?.endTime
? existingDetailInfo.endTime
: data.endTime
}, },
() => { () => {
if (data?.startTime && data?.endTime) { if (data?.startTime && data?.endTime) {
...@@ -868,13 +872,7 @@ Page({ ...@@ -868,13 +872,7 @@ Page({
technicianType: 0, technicianType: 0,
technicianUuid: it.uuid, technicianUuid: it.uuid,
staffPhone: it.staffPhone, staffPhone: it.staffPhone,
shareRatio: shareRatio: ((it.shareRatio ?? 100) * 1) / 100
it.shareRatio === '' ||
it.shareRatio === undefined ||
it.shareRatio === null ||
isNaN(Number(it.shareRatio))
? 1
: Number(it.shareRatio) / 100
})) }))
: []), : []),
...(Array.isArray(deputySelected) ...(Array.isArray(deputySelected)
...@@ -884,13 +882,7 @@ Page({ ...@@ -884,13 +882,7 @@ Page({
technicianType: 1, technicianType: 1,
technicianUuid: it.uuid, technicianUuid: it.uuid,
staffPhone: it.staffPhone, staffPhone: it.staffPhone,
shareRatio: shareRatio: ((it.shareRatio ?? 0) * 1) / 100
it.shareRatio === '' ||
it.shareRatio === undefined ||
it.shareRatio === null ||
isNaN(Number(it.shareRatio))
? 0
: Number(it.shareRatio) / 100
})) }))
: []) : [])
] ]
......
...@@ -438,23 +438,23 @@ Page({ ...@@ -438,23 +438,23 @@ Page({
}, },
showStorePicker() { showStorePicker() {
let { userInfo } = this.data let { userInfo } = this.data
; (userInfo?.isSuper || ;(userInfo?.isSuper ||
userInfo?.loginRole == 3 || userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) && userInfo?.loginRole == 5) &&
this.setData({ this.setData({
showPicker: true, showPicker: true,
pickerType: 'merchant' pickerType: 'merchant'
}) })
}, },
showStaffPicker() { showStaffPicker() {
let { userInfo } = this.data let { userInfo } = this.data
; (userInfo?.isSuper || ;(userInfo?.isSuper ||
userInfo?.loginRole == 3 || userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) && userInfo?.loginRole == 5) &&
this.setData({ this.setData({
showPicker: true, showPicker: true,
pickerType: 'staff' pickerType: 'staff'
}) })
}, },
navbarReady(e) { navbarReady(e) {
let navBarHeight = e.detail.height let navBarHeight = e.detail.height
...@@ -579,7 +579,7 @@ Page({ ...@@ -579,7 +579,7 @@ Page({
showCancel: false, showCancel: false,
confirmText: '确定', confirmText: '确定',
confirmColor: '#347BFF', confirmColor: '#347BFF',
success(res) { } success(res) {}
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -718,7 +718,7 @@ Page({ ...@@ -718,7 +718,7 @@ Page({
showCancel: false, showCancel: false,
confirmText: '确定', confirmText: '确定',
confirmColor: '#347BFF', confirmColor: '#347BFF',
success(res) { } success(res) {}
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -1121,14 +1121,18 @@ Page({ ...@@ -1121,14 +1121,18 @@ Page({
let { code, data } = result let { code, data } = result
// let reportType = 0 // let reportType = 0
let carBandList = [] let carBandList = []
let isHmStore = false let hmPresent = false
let containsShangJie = false
if (code && data.length) { if (code && data.length) {
// reportType = 1 // reportType = 1
// 判断车型是否包含鸿蒙智享,包含不给切换模板列表 // 判断车型是否包含鸿蒙智享,包含不给切换模板列表
carBandList = data.map(item => { carBandList = data.map(item => {
let el = { ...item } let el = { ...item }
if (item.firstBrandId == carBandId) { if (item.firstBrandId == carBandId) {
isHmStore = true hmPresent = true
}
if (item.brandId == 3574 || item.brandName == '尚界') {
containsShangJie = true
} }
if (item.brandType == 0) { if (item.brandType == 0) {
hwObjArray.forEach(e => { hwObjArray.forEach(e => {
...@@ -1148,7 +1152,7 @@ Page({ ...@@ -1148,7 +1152,7 @@ Page({
this.setData({ this.setData({
// reportType, // reportType,
isHmStore, isHmStore: hmPresent && !containsShangJie,
carBandList carBandList
}) })
this.getStaffReport() this.getStaffReport()
...@@ -1437,7 +1441,7 @@ Page({ ...@@ -1437,7 +1441,7 @@ Page({
wx.$util.message(message) wx.$util.message(message)
} }
}) })
.catch(err => { }) .catch(err => {})
}, },
inputSearch(e) { inputSearch(e) {
let { pickerType } = this.data let { pickerType } = this.data
...@@ -1646,7 +1650,7 @@ Page({ ...@@ -1646,7 +1650,7 @@ Page({
} }
// } // }
}) })
.catch(err => { }) .catch(err => {})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -1768,5 +1772,5 @@ Page({ ...@@ -1768,5 +1772,5 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { } onReady: function () {}
}) })
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!