Commit a17477ff by 张立顺

feat 技师功能开发

1 parent fb1f7b16
...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2; let index = 0;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
......
...@@ -19,7 +19,8 @@ Page({ ...@@ -19,7 +19,8 @@ Page({
3: '区域运营', 3: '区域运营',
4: '驻店负责人', 4: '驻店负责人',
5: '销售', 5: '销售',
6: '飞行督导' 6: '飞行督导',
7: '技师'
}, },
selectedUuid: '', selectedUuid: '',
requestFlag: false requestFlag: false
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<block wx:for="{{loginUserInfoList}}" wx:key="index"> <block wx:for="{{loginUserInfoList}}" wx:key="index">
<view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}"> <view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<view class="right"> <view class="right">
<view class="midle {{item.isSuper==true?'midle_1':item.userType==1?'midle_2':(item.loginRole == 3 || item.loginRole == 5 || item.loginRole == 6) ?'midle_3' : item.loginRole == 4 ? 'midle_4' : 'midle_5'}}"> <view class="midle {{item.isSuper==true?'midle_1':item.userType==1?'midle_2':(item.loginRole == 3 || item.loginRole == 5 || item.loginRole == 6) ?'midle_3' : item.loginRole == 4 ? 'midle_4' :item.loginRole == 7 ? 'midle_6':'midle_5'}}">
{{item.isSuper==true?'超管':item.userType==1?'商户':item.loginRole == 3 || item.loginRole == 6 ? '督导' : item.loginRole == 5? '销售':item.loginRole == 4 ? '驻店' : '员工'}} {{item.isSuper==true?'超管':item.userType==1?'商户':item.loginRole == 3 || item.loginRole == 6 ? '督导' : item.loginRole == 5? '销售':item.loginRole == 4 ? '驻店' : item.loginRole == 7 ? '技师':'员工'}}
</view> </view>
</view> </view>
<view class="left"> <view class="left">
......
...@@ -132,6 +132,11 @@ ...@@ -132,6 +132,11 @@
/* border: var(--fontSize2) solid #35C376; */ /* border: var(--fontSize2) solid #35C376; */
background-color: #35c3761a; background-color: #35c3761a;
} }
.items .right .midle_6{
color: #7F80FE;
/* border: var(--fontSize2) solid #35C376; */
background: #7f80fe1a;
}
.items .right .icon{ .items .right .icon{
width: var(--fontSize40); width: var(--fontSize40);
height: var(--fontSize40); height: var(--fontSize40);
......
...@@ -32,6 +32,7 @@ Page({ ...@@ -32,6 +32,7 @@ Page({
initData(auto = true, navigateParams) { initData(auto = true, navigateParams) {
console.log('initData');
try { try {
if (this.scene && auto) return //有scene return if (this.scene && auto) return //有scene return
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
......
...@@ -24,10 +24,11 @@ Page({ ...@@ -24,10 +24,11 @@ Page({
if (jumpPageFlag) return; if (jumpPageFlag) return;
this.setData({ jumpPageFlag: true }); this.setData({ jumpPageFlag: true });
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
if ( if (
!openSceneArr.includes(scene) && !openSceneArr.includes(scene) &&
!userInfo?.isSuper && !userInfo?.isSuper &&
!(userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6) !(userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6)
) { ) {
this.setData({ jumpPageFlag: false }); this.setData({ jumpPageFlag: false });
return wx.$util.showToast("暂未开通此场景"); return wx.$util.showToast("暂未开通此场景");
......
...@@ -325,7 +325,7 @@ Page({ ...@@ -325,7 +325,7 @@ Page({
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig, phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
}); });
// this.getStatByPeriod() // this.getStatByPeriod()
// this.getiIviteRecord() // this.getiIviteRecord()
......
...@@ -116,7 +116,7 @@ Page({ ...@@ -116,7 +116,7 @@ Page({
show: true, show: true,
title: "请选择录单入口", title: "请选择录单入口",
tabTitleShow: false, tabTitleShow: false,
success:async (res) => { success: async (res) => {
// 跳转新增订单页面 并带特定参数 // 跳转新增订单页面 并带特定参数
let { let {
orderInfo, orderInfo,
...@@ -124,7 +124,7 @@ Page({ ...@@ -124,7 +124,7 @@ Page({
} = this.data; } = this.data;
console.log(item, "showSelectType"); console.log(item, "showSelectType");
if (selectType == 1) { if (selectType == 1) {
if(await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
wx.$router.go("tabWorkOrder.createOrder", { wx.$router.go("tabWorkOrder.createOrder", {
scene, scene,
...item, ...item,
...@@ -240,7 +240,7 @@ Page({ ...@@ -240,7 +240,7 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport();
if (staffCheck) return false; if (staffCheck) return false;
if(name == 'createOrder' && await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */ if (name == 'createOrder' && await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */
// 是微信支付直接跳转确认页面 // 是微信支付直接跳转确认页面
if (userType == 2 && item?.selectPayType == 1) { if (userType == 2 && item?.selectPayType == 1) {
wx.$router.go("tabWorkOrder.confirmOrder", item); wx.$router.go("tabWorkOrder.confirmOrder", item);
...@@ -796,7 +796,7 @@ Page({ ...@@ -796,7 +796,7 @@ Page({
// this.test() // this.test()
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
}); });
this.getCreateOrderSetting() this.getCreateOrderSetting()
}, },
......
...@@ -166,7 +166,7 @@ Page({ ...@@ -166,7 +166,7 @@ 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), 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);
}, },
......
// import api from '../../api/api.js' // import api from '../../api/api.js'
// import Util from '../../utils/util' // import Util from '../../utils/util'
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/'
Component({ Component({
options: { options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持 multipleSlots: true // 在组件定义时的选项中启用多slot支持
...@@ -56,6 +58,7 @@ Component({ ...@@ -56,6 +58,7 @@ Component({
}, },
/* 组件的初始数据 */ /* 组件的初始数据 */
data: { data: {
IMG_URL,
wrapAnimate: 'wrapAnimate', wrapAnimate: 'wrapAnimate',
popupAnimate: 'popupAnimate', popupAnimate: 'popupAnimate',
tags: [ tags: [
...@@ -94,7 +97,20 @@ Component({ ...@@ -94,7 +97,20 @@ Component({
methods: { methods: {
setOrderInfo(orderInfo) { setOrderInfo(orderInfo) {
console.log(orderInfo, 'orderInfo') console.log(orderInfo, 'orderInfo')
// constructionImgList
orderInfo.customerPhotos.forEach(item => {
orderInfo.subOrderList.forEach(el => {
if (item.subOrderCode == el.subOrderCode) {
if (el.constructionImgList) {
el.constructionImgList.push(item.customerPhoto)
} else {
el.constructionImgList = [item.customerPhoto]
}
}
})
})
orderInfo.evaluation = orderInfo.evaluation.split(',') orderInfo.evaluation = orderInfo.evaluation.split(',')
console.log(orderInfo.subOrderList, 'orderInfo.evaluation')
console.log(orderInfo.evaluation, 'orderInfo.evaluation') console.log(orderInfo.evaluation, 'orderInfo.evaluation')
let { tags } = this.data let { tags } = this.data
tags.forEach((item, index) => { tags.forEach((item, index) => {
......
...@@ -240,4 +240,81 @@ ...@@ -240,4 +240,81 @@
.act { .act {
background: #347BFF; background: #347BFF;
color: #FFFFFF; color: #FFFFFF;
}
\ No newline at end of file \ No newline at end of file
}
.placeholder {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-size: var(--fontSize32);
font-weight: 500;
color: #BEC1C7;
}
.tire-block {
width: var(--fontSize180);
height: var(--fontSize180);
box-sizing: border-box;
background-color: #F4F5F7;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
border-radius: var(--fontSize8);
overflow: hidden;
}
.tire-block:not(:nth-child(3n)) {
margin-right: var(--fontSize20);
}
.tire-block:nth-child(n+4) {
margin-top: var(--fontSize20);
}
.tire-img-box {
position: relative;
width: 100%;
height: 100%;
}
.tire-img-box .tire-img {
width: 100%;
height: 100%;
}
.icon-delete {
position: absolute;
top: var(--fontSize16);
right: var(--fontSize16);
width: var(--fontSize48);
height: var(--fontSize48);
}
.tire-tip {
height: var(--fontSize40);
line-height: var(--fontSize40);
background-color: #ebf2fd;
border-radius: var(--fontSize8);
font-size: var(--fontSize24);
color: #347BFF;
margin-top: var(--fontSize28);
padding: var(--fontSize4) var(--fontSize24);
border-radius: var(--fontSize8);
}
.icon-plus {
width: var(--fontSize80);
height: var(--fontSize80);
margin-bottom: var(--fontSize20);
}
.flex {
display: flex;
flex-wrap: wrap;
}
.box {}
\ No newline at end of file \ No newline at end of file
<!-- components/orderSwitchPopup/orderSwitchPopup.wxml --> <!-- components/orderSwitchPopup/orderSwitchPopup.wxml -->
<view wx:if="{{flag}}" class='container' style=''> <wxs src="../../index.wxs" module="filter" />
<view wx:if="{{ flag }}" class="container" style="">
<!-- bindtap='_close' 取消遮光层关闭事件 --> <!-- bindtap='_close' 取消遮光层关闭事件 -->
<view class='wrap {{wrapAnimate}}' style='background:rgba(0,0,0,{{bgOpacity}});' /> <view class="wrap {{ wrapAnimate }}" style="background:rgba(0,0,0,{{ bgOpacity }});" />
<view class='popup-container {{popupAnimate}}'> <view class="popup-container {{ popupAnimate }}">
<view class="v_title"> <view class="v_title">
<view class="wx-popup-title">{{title}}</view> <view class="wx-popup-title">{{title}}</view>
<image <image bindtap="_close" src="../../images/order-close.png" mode="widthFix" class="btn-colse" wx:if="{{ isShowClose }}" />
bindtap='_close'
src='../../images/order-close.png'
mode='widthFix'
class='btn-colse'
wx:if="{{isShowClose}}" />
</view> </view>
<view class="wx-popup-con"> <view class="wx-popup-con">
<scroll-view <scroll-view scroll-y enable-back-to-top refresher-enabled="{{ false }}" refresher-threshold="104" style="height:100%;">
scroll-y
enable-back-to-top
refresher-enabled="{{false}}"
refresher-threshold="104"
style="height:100%;">
<view class="signature"> <view class="signature">
<image src="{{orderInfo.electronicSignature}}" binderror="" bindload="" /> <image src="{{ orderInfo.electronicSignature }}" binderror="" bindload="" />
</view> </view>
<view class="customerPhotos"> <!-- <view class="customerPhotos">
<image <image
class="customerPhotosItem" class="customerPhotosItem"
wx:for="{{orderInfo.customerPhotos}}" wx:for="{{orderInfo.customerPhotos}}"
...@@ -30,28 +21,58 @@ ...@@ -30,28 +21,58 @@
wx:key="index" wx:key="index"
binderror="" binderror=""
bindload="" /> bindload="" />
</view> </view> -->
<view class='star-box'> <block wx:for="{{ orderInfo.subOrderList }}" wx:key="index" wx:for-item="imgItem" wx:for-index="imgIndex">
<view class="box">
<view class="technicianName">
<view class="name">{{imgItem.technicianName}}</view>
<view class="icon">技师</view>
<view class="status">{{imgItem.approveStatus == null? '未通过':imgItem.approveStatus == 'Y'?'通过':'不通过'}}</view>
</view>
<view class="title">
<!-- 上传客户合照或车辆照片 -->
<text class="goodsName"> {{filter.replaceItemText(imgItem.upgradeGoodsAlias) ||filter.replaceItemText(imgItem.upgradeGoodsName) || ''}}</text>
</view>
<view class="flex">
<view class="tire-block" wx:for="{{ imgItem.constructionImgList || [] }}" wx:key="index">
<view class="tire-img-box" catchtap="handlePreviewImg" data-item="{{ item }}" data-imgindex="{{ imgIndex }}">
<image
class="icon-delete"
catchtap="handleDelete"
data-index="{{ index }}"
data-imgindex="{{ imgIndex }}"
src="/tabWorkOrder/images/icon-delete.png"
/>
<image class="tire-img" src="{{ item }}" />
</view>
</view>
<view
class="tire-block"
bindtap="handleUpload"
data-index="{{ imgIndex }}"
wx:if="{{ !imgItem.constructionImgList || imgItem.constructionImgList.length<9 }}"
>
<view>
<image class="icon-plus" src="{{ IMG_URL }}camera_icon.png" />
</view>
</view>
</view>
</view>
</block>
<view class="star-box">
<view class="label">评分:</view> <view class="label">评分:</view>
<block wx:for="{{5}}" wx:key="index"> <block wx:for="{{ 5 }}" wx:key="index">
<view class="star" bindtap="setStar" data-index="{{index}}"> <view class="star" bindtap="setStar" data-index="{{ index }}">
<image src="{{index < orderInfo.rating?'/tabWorkOrder/images/star-active.png':'/tabWorkOrder/images/star.png'}}" /> <image src="{{ index < orderInfo.rating?'/tabWorkOrder/images/star-active.png':'/tabWorkOrder/images/star.png' }}" />
</view> </view>
</block> </block>
</view> </view>
<view class="tags"> <view class="tags">
<block wx:for="{{tags}}" wx:key="index"> <block wx:for="{{ tags }}" wx:key="index">
<view <view wx:if="{{ item.checked }}" class="tag {{ item.checked?'act':'' }}" bindtap="chooseTag" data-index="{{ index }}">{{item.name}}</view>
wx:if="{{item.checked}}"
class="tag {{item.checked?'act':''}}"
bindtap="chooseTag"
data-index="{{index}}">
{{item.name}}
</view>
</block> </block>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
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
...@@ -16,7 +15,9 @@ var formatPosition = function (item, positionTypeList) { ...@@ -16,7 +15,9 @@ var formatPosition = function (item, positionTypeList) {
var filterData = positionTypeList.filter(function (v) { var filterData = positionTypeList.filter(function (v) {
return v.positionValue == item return v.positionValue == item
}) })
return (filterData.length && filterData[0] && filterData[0].positionName) || '' return (
(filterData.length && filterData[0] && filterData[0].positionName) || ''
)
} }
var isDateWithin7Days = function (date) { var isDateWithin7Days = function (date) {
...@@ -53,8 +54,8 @@ var filterIncludes = function (item, arr) { ...@@ -53,8 +54,8 @@ var filterIncludes = function (item, arr) {
var filterTemplateList = function (arr, value) { var filterTemplateList = function (arr, value) {
if (value == 3) { if (value == 3) {
return arr.filter(function (item) { return arr.filter(function (item) {
return item.templateValue != 3; return item.templateValue != 3
}); })
} else { } else {
return arr return arr
} }
...@@ -62,16 +63,23 @@ var filterTemplateList = function (arr, value) { ...@@ -62,16 +63,23 @@ var filterTemplateList = function (arr, value) {
var filterDisabled = function (role, weeklyList, date, disabledStatus) { var filterDisabled = function (role, weeklyList, date, disabledStatus) {
console.log(role, weeklyList) console.log(role, weeklyList)
if (role == 'staff') { // 员工七天内可操作 if (role == 'staff') {
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin7Days(date) // 员工七天内可操作
} else if (role == 'super') { // 超管60天内可操作 return (
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin60Days(date) (weeklyList.indexOf(date) > -1 && !disabledStatus) ||
!isDateWithin7Days(date)
)
} else if (role == 'super') {
// 超管60天内可操作
return (
(weeklyList.indexOf(date) > -1 && !disabledStatus) ||
!isDateWithin60Days(date)
)
} else { } else {
return !disabledStatus return !disabledStatus
} }
} }
/* /*
* 导出 * 导出
*/ */
......
...@@ -377,7 +377,7 @@ Page({ ...@@ -377,7 +377,7 @@ Page({
userInfo: o, userInfo: o,
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo.loginRole == 6), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
}); });
}, },
...@@ -828,14 +828,14 @@ Page({ ...@@ -828,14 +828,14 @@ Page({
/** /**
* 未开发票 * 未开发票
* invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。 * invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。
* */ * */
!invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", { !invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", {
obj: invoiceIssueQrcode obj: invoiceIssueQrcode
}) })
} }
}).finally(() => { }).finally(() => {
wx.$util.hideLoading() wx.$util.hideLoading()
}) })
}, },
previewImage(e) { previewImage(e) {
...@@ -874,9 +874,9 @@ Page({ ...@@ -874,9 +874,9 @@ Page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
let { orderCode } = this.data let { orderCode } = this.data
if(orderCode) { if (orderCode) {
this.getOrderDetail(orderCode) this.getOrderDetail(orderCode)
} }
}, },
......
...@@ -20,7 +20,6 @@ Page({ ...@@ -20,7 +20,6 @@ Page({
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isShowPhone: app.globalData.YQorderSetting?.yqPhoneConfig, isShowPhone: app.globalData.YQorderSetting?.yqPhoneConfig,
ctx: '', ctx: '',
hasDraw: false,
canvasWidth: 0, canvasWidth: 0,
canvasHeight: 0, canvasHeight: 0,
startPoint: { startPoint: {
...@@ -32,8 +31,9 @@ Page({ ...@@ -32,8 +31,9 @@ Page({
lineSize: 3, // 笔记倍数 lineSize: 3, // 笔记倍数
radius: 1.5, //画圆的半径 radius: 1.5, //画圆的半径
showPlaceHoder: true, showPlaceHoder: true,
signImage: '', hasDraw: true,
constructionImgList: [], signImage: 'http://qcimg01.glsx.com.cn:7060/group1/M00/0E/6E/wKgD3mhwuRWAHRWPAABVORH__8o582.png',
constructionImgList: ['http://qcimg01.glsx.com.cn:7060/group1/M00/0E/6E/wKgD3mhwuRWAHRWPAABVORH__8o582.png'],
rating: 5, rating: 5,
formData: {}, formData: {},
tags: [{ tags: [{
...@@ -89,10 +89,6 @@ Page({ ...@@ -89,10 +89,6 @@ Page({
this.setData({ this.setData({
[name]: !tags[index].checked [name]: !tags[index].checked
}) })
// customerComment = `${customerComment || ''}${tags[index]}`
// this.setData({
// customerComment
// })
}, },
setStar(e) { setStar(e) {
let { let {
...@@ -105,21 +101,26 @@ Page({ ...@@ -105,21 +101,26 @@ Page({
// 删除图片 // 删除图片
handleDelete(e) { handleDelete(e) {
let { let {
index index,
imgIndex,
} = e.currentTarget.dataset } = e.currentTarget.dataset
let { let {
orderInfo,
constructionImgList constructionImgList
} = this.data } = this.data
constructionImgList.splice(index, 1) orderInfo.subOrderList[index].constructionImgList.splice(index, 1)
this.setData({ this.setData({
constructionImgList // constructionImgList
orderInfo
}) })
}, },
// 放大图片 // 放大图片
handlePreviewImg(e) { handlePreviewImg(e) {
let { let {
item item,
imgIndex
} = e.currentTarget.dataset } = e.currentTarget.dataset
console.log(item) console.log(item)
wx.$util.previewImage({ wx.$util.previewImage({
...@@ -129,8 +130,12 @@ Page({ ...@@ -129,8 +130,12 @@ Page({
handleUpload(e) { handleUpload(e) {
let that = this let that = this
// console.log(e);
let { index } = e.currentTarget.dataset
// console.log(index);
let { let {
constructionImgList constructionImgList,
orderInfo
} = this.data } = this.data
wx.chooseImage({ wx.chooseImage({
count: 1, count: 1,
...@@ -154,9 +159,11 @@ Page({ ...@@ -154,9 +159,11 @@ Page({
message message
} = img } = img
if (code == 0) { if (code == 0) {
constructionImgList.push(data) orderInfo.subOrderList[index].constructionImgList = orderInfo.subOrderList[index].constructionImgList || []
orderInfo.subOrderList[index].constructionImgList.push(data)
that.setData({ that.setData({
constructionImgList // constructionImgList
orderInfo
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -467,14 +474,14 @@ Page({ ...@@ -467,14 +474,14 @@ Page({
/** /**
* 未开发票 * 未开发票
* invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。 * invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。
* */ * */
!invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", { !invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", {
obj: invoiceIssueQrcode obj: invoiceIssueQrcode
}) })
} }
}).finally(() => { }).finally(() => {
wx.$util.hideLoading() wx.$util.hideLoading()
}) })
}, },
...@@ -535,7 +542,8 @@ Page({ ...@@ -535,7 +542,8 @@ Page({
let { let {
hasDraw, hasDraw,
constructionImgList, constructionImgList,
tags tags,
orderInfo
} = this.data } = this.data
let that = this let that = this
if (!hasDraw) { if (!hasDraw) {
...@@ -546,7 +554,7 @@ Page({ ...@@ -546,7 +554,7 @@ Page({
}) })
return return
} }
if (constructionImgList.length == 0) { if (!orderInfo.subOrderList.some(item => item?.constructionImgList?.length > 0)) {
wx.showToast({ wx.showToast({
title: '请上传客户合照或车辆照片', title: '请上传客户合照或车辆照片',
icon: 'none', icon: 'none',
...@@ -592,11 +600,17 @@ Page({ ...@@ -592,11 +600,17 @@ Page({
} }
return list return list
}, []) }, [])
customerPhotos = customerPhotos.map(item => { customerPhotos = orderInfo.subOrderList.reduce((pre, item) => {
return { if (item.constructionImgList) {
customerPhoto: item item.constructionImgList.map(el => {
pre.push({
customerPhoto: el,
subOrderCode: item.subOrderCode
})
})
} }
}) return pre;
}, [])
let params = { let params = {
orderCode, orderCode,
customerPhotos, customerPhotos,
...@@ -604,9 +618,9 @@ Page({ ...@@ -604,9 +618,9 @@ Page({
rating, rating,
merchantId: orderInfo.merchantId, merchantId: orderInfo.merchantId,
sceneType: 1, sceneType: 1,
// tags,
evaluationList evaluationList
} }
console.log(params, 'params');
// return // return
// 使用膜卷号 // 使用膜卷号
if (isUseFilmRoll) { if (isUseFilmRoll) {
...@@ -850,9 +864,9 @@ Page({ ...@@ -850,9 +864,9 @@ Page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
let { orderCode } = this.data let { orderCode } = this.data
if(orderCode) { if (orderCode) {
this.getOrderDetail(orderCode) this.getOrderDetail(orderCode)
} }
}, },
......
...@@ -52,23 +52,23 @@ page { ...@@ -52,23 +52,23 @@ page {
} }
.box .title.invoice { .box .title.invoice {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.invoice-btn { .invoice-btn {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #347BFF; color: #347BFF;
} }
.invoice-btn .icon { .invoice-btn .icon {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-right: 6rpx; margin-right: 6rpx;
} }
.box .flex { .box .flex {
display: flex; display: flex;
...@@ -91,25 +91,26 @@ page { ...@@ -91,25 +91,26 @@ page {
color: #888888; color: #888888;
} }
.box .goods .item:first-child{ .box .goods .item:first-child {
margin-top: 0; margin-top: 0;
} }
.box .goods .item:last-child{ .box .goods .item:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.box .goods .item .subItem_box{ .box .goods .item .subItem_box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
} }
.box .goods .item .subItem_box .type{ .box .goods .item .subItem_box .type {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
} }
.box .goods .item .subItem_box .artificer,.film-roll{ .box .goods .item .subItem_box .artificer,
.film-roll {
height: var(--fontSize48); height: var(--fontSize48);
background: #FFFFFF; background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3; border: var(--fontSize1) solid #DEE0E3;
...@@ -122,26 +123,28 @@ page { ...@@ -122,26 +123,28 @@ page {
font-size: var(--fontSize24); font-size: var(--fontSize24);
} }
.artificer text{ .artificer text {
max-width: var(--fontSize96); max-width: var(--fontSize96);
} }
.film-roll text{ .film-roll text {
max-width: var(--fontSize120); max-width: var(--fontSize120);
} }
.artificer .grey_text,.film-roll .grey_text{ .artificer .grey_text,
.film-roll .grey_text {
color: #BEC1C7; color: #BEC1C7;
} }
.artificer image,.film-roll image{ .artificer image,
.film-roll image {
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize28); height: var(--fontSize28);
margin-left: var(--fontSize8); margin-left: var(--fontSize8);
flex-shrink: 0; flex-shrink: 0;
} }
.box .goods .item .subItem_box .artificer{ .box .goods .item .subItem_box .artificer {
height: var(--fontSize48); height: var(--fontSize48);
background: #FFFFFF; background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3; border: var(--fontSize1) solid #DEE0E3;
...@@ -154,7 +157,7 @@ page { ...@@ -154,7 +157,7 @@ page {
font-size: var(--fontSize24); font-size: var(--fontSize24);
} }
.box .goods .item .goods_name{ .box .goods .item .goods_name {
color: #333333; color: #333333;
margin-bottom: var(--fontSize22); margin-bottom: var(--fontSize22);
} }
...@@ -163,7 +166,7 @@ page { ...@@ -163,7 +166,7 @@ page {
width: var(--fontSize492); width: var(--fontSize492);
} }
.box .goods .item .goods_name .price{ .box .goods .item .goods_name .price {
font-weight: 600; font-weight: 600;
} }
...@@ -188,7 +191,7 @@ page { ...@@ -188,7 +191,7 @@ page {
justify-content: flex-end; justify-content: flex-end;
} }
.box .cell.total .label{ .box .cell.total .label {
width: auto; width: auto;
color: #757980; color: #757980;
} }
...@@ -207,13 +210,13 @@ page { ...@@ -207,13 +210,13 @@ page {
width: var(--fontSize152); width: var(--fontSize152);
} }
.box .cell .label.icon{ .box .cell .label.icon {
width: var(--fontSize96); width: var(--fontSize96);
height: var(--fontSize36); height: var(--fontSize36);
margin-right: var(--fontSize8); margin-right: var(--fontSize8);
} }
.box .cell .image-box{ .box .cell .image-box {
display: flex; display: flex;
flex-flow: wrap; flex-flow: wrap;
gap: var(--fontSize10); gap: var(--fontSize10);
...@@ -313,7 +316,7 @@ page { ...@@ -313,7 +316,7 @@ page {
/* width: var(--fontSize686); /* width: var(--fontSize686);
height: var(--fontSize560); */ height: var(--fontSize560); */
width: var(--fontSize646); width: var(--fontSize646);
height: var(--fontSize400); height: var(--fontSize400);
} }
.full_icon { .full_icon {
...@@ -329,6 +332,7 @@ page { ...@@ -329,6 +332,7 @@ page {
bottom: var(--fontSize24); bottom: var(--fontSize24);
z-index: 100; z-index: 100;
} }
.icon { .icon {
width: var(--fontSize40); width: var(--fontSize40);
height: var(--fontSize40); height: var(--fontSize40);
...@@ -465,7 +469,8 @@ page { ...@@ -465,7 +469,8 @@ page {
background: #347BFF; background: #347BFF;
color: #FFFFFF; color: #FFFFFF;
} }
.comfirmBtn{
.comfirmBtn {
z-index: 2000; z-index: 2000;
} }
...@@ -473,7 +478,7 @@ page { ...@@ -473,7 +478,7 @@ page {
background: #F7F8FA; background: #F7F8FA;
border: var(--fontSize1) solid #EFF0F2; border: var(--fontSize1) solid #EFF0F2;
border-radius: var(--fontSize12); border-radius: var(--fontSize12);
margin: 0 calc(-1 * var(--fontSize20)) var(--fontSize16); margin: 0 calc(-1 * var(--fontSize20)) var(--fontSize16);
} }
.meal-hd { .meal-hd {
...@@ -532,7 +537,7 @@ page { ...@@ -532,7 +537,7 @@ page {
.meal-bd-head .price { .meal-bd-head .price {
font-family: "numberNor"; font-family: "numberNor";
margin-left:auto; margin-left: auto;
} }
.meal-bd-bottom { .meal-bd-bottom {
...@@ -541,9 +546,18 @@ page { ...@@ -541,9 +546,18 @@ page {
font-weight: 400; font-weight: 400;
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #757980; color: #757980;
margin-left:var(--fontSize24); margin-left: var(--fontSize24);
} }
.meal-bd-bottom .count { .meal-bd-bottom .count {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
}
.bottom {
margin-bottom: 100rpx;
}
.goodsName {
font-size: 24rpx;
color: #292D33;
} }
\ No newline at end of file \ No newline at end of file
...@@ -63,9 +63,9 @@ const domain_items = { ...@@ -63,9 +63,9 @@ const domain_items = {
// dj: "http://192.168.1.169:8292", //蔡远明 // dj: "http://192.168.1.169:8292", //蔡远明
// dj: 'http://192.168.1.174:8292',//范富荣 // dj: 'http://192.168.1.174:8292',//范富荣
// dj: 'http://192.168.1.89:8292', //周杭 // dj: 'http://192.168.1.89:8292', //周杭
dj: 'http://192.168.1.76:8292', //璐琦 // dj: 'http://192.168.1.76:8292', //璐琦
// dj: 'http://192.168.1.227:8292',//陈希 // dj: 'http://192.168.1.227:8292',//陈希
// dj: 'http://192.168.1.67:8292',//周立明 dj: 'http://192.168.1.67:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺 // dj: 'http://192.168.148.235:8292',// 熊正顺
// dj: 'http://192.168.148.221:8292', // dj: 'http://192.168.148.221:8292',
// scrm: 'http://192.168.1.165:8292' // scrm: 'http://192.168.1.165:8292'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!