Commit eedcb61a by 张立顺

feat 功能开发

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