Commit 43c0f1de by 张立顺

Merge branch 'SAAS+V5.5.0' into 'SAAS+V5.5.1'

Saas+v5.5.0

See merge request !457
2 parents bbc10509 edc1fb39
......@@ -32,7 +32,8 @@ Component({
return m
}, {})
copyArtificerList = copyArtificerList.map(i => {
const id = artificerSelectObj.find(v => v.uuid == i.uuid)?.id || undefined // 技师列表id没实际用途,将id替换成已选技师的主键id
const id =
artificerSelectObj.find(v => v.uuid == i.uuid)?.id || undefined // 技师列表id没实际用途,将id替换成已选技师的主键id
const active = selectArr?.includes(i.uuid)
const disabled =
disabledSelectObj?.findIndex(val => val.uuid == i.uuid) > -1
......@@ -229,6 +230,16 @@ Component({
this.setData({
selectedTechnicianId: []
})
if (deputyFlag) {
const obj = {
...artificerSelectObj,
technicianUuid: '',
technicianName: '',
selectedTechnicians: []
}
this.triggerEvent('confirm', obj)
return
}
return wx.$util.showToast('请选择技师')
}
if (deputyFlag) {
......
/* packageStudyCenter/pages/myTask/components/RecommendCourse/RecommendCourse.wxss */
.recommend-course {
height: calc(100% - 100rpx);
background: #FFFFFF;
}
.recommend-course-list {
......
......@@ -4,6 +4,7 @@ page {
}
.rank-container {
margin: var(--fontSize24) var(--fontSize28);
background: #FFFFFF;
.bg {
width: 100%;
height: var(--fontSize128);
......@@ -80,7 +81,8 @@ page {
width: var(--fontSize80);
height: var(--fontSize80);
border-radius: var(--fontSize40);
color: #2D66F7;
background: #F7F7F7;
color: #999EA8;
font-size: var(--fontSize34);
font-weight: 500;
text-align: center;
......
......@@ -187,7 +187,8 @@ page {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
padding-left: var(--fontSize24);
box-sizing: border-box;
width: calc(100% - var(--fontSize72));
height: 100%;
pointer-events: none;
......@@ -204,8 +205,9 @@ page {
}
}
.input {
text-align: center;
padding-left: var(--fontSize24);
width: calc(100% - var(--fontSize72));
box-sizing: border-box;
font-size: var(--fontSize28);
}
.input-placeholder {
......@@ -280,6 +282,7 @@ page {
display: flex;
flex-flow: column;
align-items: center;
margin-top: var(--fontSize40);
font-size: var(--fontSize24);
color: #999999;
.icon {
......
......@@ -82,11 +82,11 @@
<view class="search-box">
<view class="search-input">
<view class="placeholder-area" wx:if="{{!searchTitle}}">
<text class="placeholder-text">搜索课程</text>
<image
src="{{IMG_URL}}studyCenter/search-icon.png"
class="search-icon"
/>
<text class="placeholder-text">搜索课程</text>
</view>
<input
type="text"
......
......@@ -135,7 +135,7 @@
font-size: var(--fontSize34);
color: #292D33;
font-weight: 500;
padding: var(--fontSize24) var(--fontSize28);
padding: var(--fontSize24) var(--fontSize28) var(--fontSize24) 0;
}
.course-list-box {
padding-bottom: var(--fontSize32);
......
......@@ -108,7 +108,12 @@ Page({
id: it.id,
uuid: it.technicianUuid,
staffPhone: it.staffPhone,
shareRatio: Math.round((it.shareRatio || 0) * 100)
shareRatio:
it.shareRatio === null ||
it.shareRatio === undefined ||
isNaN(Number(it.shareRatio))
? ''
: Math.round(Number(it.shareRatio) * 100)
}
})
const deputySelected = data?.mainTechnicianList
......@@ -119,7 +124,12 @@ Page({
id: it.id,
uuid: it.technicianUuid,
staffPhone: it.staffPhone,
shareRatio: Math.round((it.shareRatio || 0) * 100)
shareRatio:
it.shareRatio === null ||
it.shareRatio === undefined ||
isNaN(Number(it.shareRatio))
? ''
: Math.round(Number(it.shareRatio) * 100)
}
})
data.customer.customerCarName = data.customer.carSeriesName
......@@ -400,57 +410,82 @@ Page({
return
if (
validateWithImmediateFeedback(
(deputySelected?.length || 0) > 0 &&
deputySelected.some(
it => it.shareRatio === '' || it.shareRatio == null
),
'副手技师分成比例不能为空'
)
) {
return
}
// return
if (
validateWithImmediateFeedback(
!confirmInfo?.serviceItemsList?.length,
'请选择服务项目'
)
)
// return
wx.showModal({
title: '是否确认生成电子施工单',
content:
'请确认客户商品有无增减,服务项目是否完整。提交后不可修改客户商品、技师、服务项目',
confirmText: '确认提交',
confirmColor: '#347BFF',
cancelText: '返回',
complete: res => {
if (res.confirm) {
const subOrderList = confirmInfo?.subOrderList?.map(val => {
return {
subOrderCode: val.subOrderCode
}
})
const allRelationList = goodsList?.map(val => {
val.constructionFlag = 2
confirmInfo?.subOrderList?.map(item => {
if (val.subOrderCode == item.subOrderCode)
val.constructionFlag = 1
})
return {
subOrderCode: val.subOrderCode,
constructionFlag: val.constructionFlag
}
return
// return
wx.showModal({
title: '是否确认生成电子施工单',
content:
'请确认客户商品有无增减,服务项目是否完整。提交后不可修改客户商品、技师、服务项目',
confirmText: '确认提交',
confirmColor: '#347BFF',
cancelText: '返回',
complete: res => {
if (res.confirm) {
const subOrderList = confirmInfo?.subOrderList?.map(val => {
return {
subOrderCode: val.subOrderCode
}
})
const allRelationList = goodsList?.map(val => {
val.constructionFlag = 2
confirmInfo?.subOrderList?.map(item => {
if (val.subOrderCode == item.subOrderCode)
val.constructionFlag = 1
})
const mainTechnicianList = [
...(mainSelected?.map(val => ({
id: val.id,
technicianName: val.staffName,
technicianUuid: val.uuid,
technicianType: 0,
staffPhone: val.staffPhone,
shareRatio: ((val.shareRatio ?? 0) * 1) / 100
})) || []),
...(deputySelected?.map(val => ({
id: val.id,
technicianName: val.staffName,
technicianUuid: val.uuid,
technicianType: 1,
staffPhone: val.staffPhone,
shareRatio: ((val.shareRatio ?? 0) * 1) / 100
})) || [])
]
const serviceItemsList = (
confirmInfo?.serviceItemsList || []
).reduce((acc, val) => {
return {
subOrderCode: val.subOrderCode,
constructionFlag: val.constructionFlag
}
})
const mainTechnicianList = [
...(mainSelected?.map(val => ({
id: val.id,
technicianName: val.staffName,
technicianUuid: val.uuid,
technicianType: 0,
staffPhone: val.staffPhone,
shareRatio:
val.shareRatio === '' ||
val.shareRatio === undefined ||
val.shareRatio === null ||
isNaN(Number(val.shareRatio))
? 1
: Number(val.shareRatio) / 100
})) || []),
...(deputySelected?.map(val => ({
id: val.id,
technicianName: val.staffName,
technicianUuid: val.uuid,
technicianType: 1,
staffPhone: val.staffPhone,
shareRatio:
val.shareRatio === '' ||
val.shareRatio === undefined ||
val.shareRatio === null ||
isNaN(Number(val.shareRatio))
? 0
: Number(val.shareRatio) / 100
})) || [])
]
const serviceItemsList = (confirmInfo?.serviceItemsList || []).reduce(
(acc, val) => {
const details = (val?.detailList || []).map(it => ({
serviceItemsId: it.serviceItemsId,
serviceItemsName: it.serviceItemsName,
......@@ -462,42 +497,44 @@ Page({
useNum: it.useNum
}))
return acc.concat(details)
}, [])
let params = {
id: confirmInfo.id,
constructionCode: confirmInfo.constructionCode,
orderCode: confirmInfo.orderCode,
reworkFlag: confirmInfo?.reworkFlag, // 是否返工
subOrderList,
mainTechnicianList,
serviceItemsList,
allRelationList // 传全部可选商品,区分是否需要施工
}
if (requesting) return false
this.setData({
requesting: true
})
console.log(params)
api.confirmConstruction(params).then(res => {
let { code, message } = res
if (code == 0) {
wx.$router.redirectTo('repairOrderDetail', {
id: confirmInfo.id,
constructionCode: confirmInfo.constructionCode,
orderCode: confirmInfo.orderCode
})
} else {
wx.$util.showToast(message)
}
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
})
},
[]
)
let params = {
id: confirmInfo.id,
constructionCode: confirmInfo.constructionCode,
orderCode: confirmInfo.orderCode,
reworkFlag: confirmInfo?.reworkFlag, // 是否返工
subOrderList,
mainTechnicianList,
serviceItemsList,
allRelationList // 传全部可选商品,区分是否需要施工
}
if (requesting) return false
this.setData({
requesting: true
})
console.log(params)
api.confirmConstruction(params).then(res => {
let { code, message } = res
if (code == 0) {
wx.$router.redirectTo('repairOrderDetail', {
id: confirmInfo.id,
constructionCode: confirmInfo.constructionCode,
orderCode: confirmInfo.orderCode
})
} else {
wx.$util.showToast(message)
}
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
})
}
})
}
})
},
/**
* 生命周期函数--监听页面隐藏
......
......@@ -74,7 +74,7 @@
<block wx:if="{{ mainSelected.length }}">
<view class="techic-value text-hide">
{{mainSelected[0] && mainSelected[0].staffName}}
<text class="text" wx:if="{{ mainSelected[0] && mainSelected[0].shareRatio != '' }}">{{mainSelected[0].shareRatio}}%</text>
<text class="text" wx:if="{{ deputySelected.length && mainSelected[0] && mainSelected[0].shareRatio !== '' && mainSelected[0].shareRatio !== undefined && mainSelected[0].shareRatio !== null }}">{{mainSelected[0].shareRatio}}%</text>
</view>
</block>
</gl-cell>
......@@ -92,11 +92,11 @@
<view class="techic-value text-hide">
<view class="text-hide" wx:if="{{ deputySelected[0] }}">
{{deputySelected[0].staffName}}
<text class="text" wx:if="{{ deputySelected[0].shareRatio }}">{{deputySelected[0].shareRatio}}%</text>
<text class="text" wx:if="{{ deputySelected[0].shareRatio !== '' && deputySelected[0].shareRatio !== undefined && deputySelected[0].shareRatio !== null }}">{{deputySelected[0].shareRatio}}%</text>
</view>
<view class="deputy-value text-hide" wx:if="{{ deputySelected[1] }}">
· {{deputySelected[1].staffName}}
<text class="text" wx:if="{{ deputySelected[1].shareRatio }}">{{deputySelected[1].shareRatio}}%</text>
<text class="text" wx:if="{{ deputySelected[1].shareRatio !== '' && deputySelected[1].shareRatio !== undefined && deputySelected[1].shareRatio !== null }}">{{deputySelected[1].shareRatio}}%</text>
</view>
</view>
<!-- {{filter.techicianRatio(deputySelected)}}</view> -->
......
......@@ -304,7 +304,12 @@ Page({
id: it.id,
uuid: it.technicianUuid,
staffPhone: it.staffPhone,
shareRatio: Math.round((it.shareRatio || 0) * 100)
shareRatio:
it.shareRatio === null ||
it.shareRatio === undefined ||
isNaN(Number(it.shareRatio))
? ''
: Math.round(Number(it.shareRatio) * 100)
}
})
const deputySelected = data?.mainTechnicianList
......@@ -315,7 +320,12 @@ Page({
id: it.id,
uuid: it.technicianUuid,
staffPhone: it.staffPhone,
shareRatio: Math.round((it.shareRatio || 0) * 100)
shareRatio:
it.shareRatio === null ||
it.shareRatio === undefined ||
isNaN(Number(it.shareRatio))
? ''
: Math.round(Number(it.shareRatio) * 100)
}
})
const mainTechnicianName = data?.mainTechnicianList?.find(
......@@ -858,7 +868,13 @@ Page({
technicianType: 0,
technicianUuid: it.uuid,
staffPhone: it.staffPhone,
shareRatio: ((it.shareRatio ?? 100) * 1) / 100
shareRatio:
it.shareRatio === '' ||
it.shareRatio === undefined ||
it.shareRatio === null ||
isNaN(Number(it.shareRatio))
? 1
: Number(it.shareRatio) / 100
}))
: []),
...(Array.isArray(deputySelected)
......@@ -868,7 +884,13 @@ Page({
technicianType: 1,
technicianUuid: it.uuid,
staffPhone: it.staffPhone,
shareRatio: ((it.shareRatio ?? 0) * 1) / 100
shareRatio:
it.shareRatio === '' ||
it.shareRatio === undefined ||
it.shareRatio === null ||
isNaN(Number(it.shareRatio))
? 0
: Number(it.shareRatio) / 100
}))
: [])
]
......
......@@ -56,7 +56,7 @@
<block wx:if="{{ mainSelected.length }}">
<view class="techic-value text-hide">
{{mainSelected[0] && mainSelected[0].staffName}}
<text class="text" wx:if="{{ mainSelected[0] && mainSelected[0].shareRatio != '' }}">{{mainSelected[0].shareRatio}}%</text>
<text class="text" wx:if="{{ deputySelected.length && mainSelected[0] && mainSelected[0].shareRatio !== '' && mainSelected[0].shareRatio !== undefined && mainSelected[0].shareRatio !== null }}">{{mainSelected[0].shareRatio}}%</text>
</view>
</block>
<view wx:else class="value">-</view>
......@@ -77,11 +77,11 @@
<view class="techic-value text-hide">
<view class="text-hide" wx:if="{{ deputySelected[0] }}">
{{deputySelected[0].staffName}}
<text class="text" wx:if="{{ deputySelected[0].shareRatio }}">{{deputySelected[0].shareRatio}}%</text>
<text class="text" wx:if="{{ deputySelected[0].shareRatio !== '' && deputySelected[0].shareRatio !== undefined && deputySelected[0].shareRatio !== null }}">{{deputySelected[0].shareRatio}}%</text>
</view>
<view class="deputy-value text-hide" wx:if="{{ deputySelected[1] }}">
· {{deputySelected[1].staffName}}
<text class="text" wx:if="{{ deputySelected[1].shareRatio }}">{{deputySelected[1].shareRatio}}%</text>
<text class="text" wx:if="{{ deputySelected[1].shareRatio !== '' && deputySelected[1].shareRatio !== undefined && deputySelected[1].shareRatio !== null }}">{{deputySelected[1].shareRatio}}%</text>
</view>
</view>
<!-- {{filter.techicianRatio(deputySelected)}}</view> -->
......
......@@ -64,7 +64,13 @@ Page({
technicianType: 0,
technicianUuid: it.uuid,
staffPhone: it.staffPhone,
shareRatio: ((it.shareRatio ?? 100) * 1) / 100
shareRatio:
it.shareRatio === '' ||
it.shareRatio === undefined ||
it.shareRatio === null ||
isNaN(Number(it.shareRatio))
? 1
: Number(it.shareRatio) / 100
})
})
item.deputySelected.map(it => {
......@@ -73,7 +79,13 @@ Page({
technicianType: 1,
technicianUuid: it.uuid,
staffPhone: it.staffPhone,
shareRatio: ((it.shareRatio ?? 0) * 1) / 100
shareRatio:
it.shareRatio === '' ||
it.shareRatio === undefined ||
it.shareRatio === null ||
isNaN(Number(it.shareRatio))
? 0
: Number(it.shareRatio) / 100
})
})
delete item.mainSelected
......
......@@ -49,7 +49,7 @@
<block wx:if="{{ mainSelected.length }}">
<view class="techic-value text-hide">
{{mainSelected[0] && mainSelected[0].staffName}}
<text class="text" wx:if="{{ mainSelected[0] && mainSelected[0].shareRatio != '' }}">{{mainSelected[0].shareRatio}}%</text>
<text class="text" wx:if="{{ deputySelected.length && mainSelected[0] && mainSelected[0].shareRatio !== '' && mainSelected[0].shareRatio !== undefined && mainSelected[0].shareRatio !== null }}">{{mainSelected[0].shareRatio}}%</text>
</view>
</block>
</gl-cell>
......@@ -67,11 +67,11 @@
<view class="techic-value text-hide">
<view class="text-hide" wx:if="{{ deputySelected[0] }}">
{{deputySelected[0].staffName}}
<text class="text" wx:if="{{ deputySelected[0].shareRatio }}">{{deputySelected[0].shareRatio}}%</text>
<text class="text" wx:if="{{ deputySelected[0].shareRatio !== '' && deputySelected[0].shareRatio !== undefined && deputySelected[0].shareRatio !== null }}">{{deputySelected[0].shareRatio}}%</text>
</view>
<view class="deputy-value text-hide" wx:if="{{ deputySelected[1] }}">
· {{deputySelected[1].staffName}}
<text class="text" wx:if="{{ deputySelected[1].shareRatio }}">{{deputySelected[1].shareRatio}}%</text>
<text class="text" wx:if="{{ deputySelected[1].shareRatio !== '' && deputySelected[1].shareRatio !== undefined && deputySelected[1].shareRatio !== null }}">{{deputySelected[1].shareRatio}}%</text>
</view>
</view>
<!-- {{filter.techicianRatio(deputySelected)}}</view> -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!