Commit 19bca09a by 李伟康

Merge branch 'SAAS+V5.1.0' of http://192.168.3.233:8090/saas_plus/dj-car-boutiqu…

…e-work-wechat into SAAS+V5.1.0
2 parents 2ba36f52 9707ec7d
Showing 70 changed files with 3541 additions and 2661 deletions
{
"pages": [
"pages/loading/loading",
"pages/sceneIndex/sceneIndex",
"pages/wxLogin/wxLogin",
"tabIndex/pages/index/index",
"pages/accountItems/accountItems",
"pages/merchantList/merchantList",
"pages/nothing/nothing",
"pages/webView/webView",
"pages/tabWorkOrder/pages/index/index",
"pages/tabMine/pages/index/index",
"pages/tabDateIndex/pages/tabDateIndex",
"pages/log/log",
"pages/changeScene/changeScene",
"pages/materails/index",
"pages/pointsReview/pointsReview",
"pages/h5AuthPhone/h5AuthPhone",
"pages/tabRepairOrder/pages/index/index"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "生意助手员工版",
"navigationBarTextStyle": "black",
"pageOrientation": "auto"
},
"tabBar": {
"color": "#757980",
"selectedColor": "#347BFF",
"backgroundColor": "#FFFFFF",
"position": "bottom",
"list": [
{
"pagePath": "tabIndex/pages/index/index",
"text": "首页",
"iconPath": "images/tab-home.png",
"selectedIconPath": "images/tab-home-active.png"
},
{
"pagePath": "pages/tabDateIndex/pages/tabDateIndex",
"text": "预约管理",
"iconPath": "images/tab-date.png",
"selectedIconPath": "images/tab-date-active.png"
},
{
"pagePath": "pages/tabWorkOrder/pages/index/index",
"text": "客户工单",
"iconPath": "images/tab-order.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",
"text": "个人中心",
"iconPath": "images/tab-mine.png",
"selectedIconPath": "images/tab-mine-active.png"
}
]
},
"subpackages": [
{
"root": "tabDate",
"name": "tabDate",
"pages": [
"pages/detail/detail",
"pages/apprManage/apprManage",
"pages/userPortrait/userPortrait"
]
},
{
"root": "integration",
"name": "integration",
"pages": [
"pages/bankAccount/list/list",
"pages/bankAccount/detail/detail",
"pages/point/index/index",
"pages/point/record/record",
"pages/point/toCash/toCash",
"pages/point/success/success"
]
},
{
"root": "tabMine",
"name": "tabMine",
"pages": [
"pages/technicianSetup/technicianSetup",
"pages/completeBuild/completeBuild",
"pages/collectCoupons/collectCoupons"
]
},
{
"root": "tabRepairOrder",
"name": "tabRepairOrder",
"pages": [
"pages/confirmWorkOrder/confirmWorkOrder",
"pages/repairOrderDetail/repairOrderDetail"
]
},
{
"root": "tabWorkOrder",
"name": "tabWorkOrder",
"pages": [
"pages/createOrder/createOrder",
"pages/additionRecordOrder/additionRecordOrder",
"pages/orderDetail/orderDetail",
"pages/constructionOrderDetail/constructionOrderDetail",
"pages/confirmOrder/confirmOrder",
"pages/updateOrderInfo/updateOrderInfo",
"pages/createArchives/createArchives",
"pages/orderSignature/orderSignature",
"pages/fullSignture/fullSignture",
"pages/ocr/ocr",
"pages/premiumUpgrade/premiumUpgrade",
"pages/defeatOrder/defeatOrder",
"pages/staffDaily/staffDaily",
"pages/upgradeStaffDaily/upgradeStaffDaily",
"pages/supervisorDaily/supervisorDaily",
"pages/residentManage/residentManage",
"pages/mentorshipManage/mentorshipManage",
"pages/tabWorkOrderRelevance/index",
"pages/invoiceCode/invoiceCode",
"pages/invoiceResult/invoiceResult",
"pages/technicianSearchList/pages/index/technicianSearchList",
"pages/refundOperationList/refundOperationList",
"pages/refundDetailList/refundDetailList",
"pages/refundApply/refundApply",
"pages/createAConstructionOrder/createAConstructionOrder"
]
},
{
"root": "packageEquity",
"name": "packageEquity",
"pages": [
"pages/carQuotation/signature/signature",
"pages/carQuotation/index/index",
"pages/carQuotation/relevanceOrderSelect/index",
"pages/carQuotation/fullSignture/fullSignture",
"pages/carQuotation/schemeConfirmation/schemeConfirmation",
"pages/carQuotation/CarQuotationDetail/CarQuotationDetail",
"pages/carQuotation/CarQuotationPay/CarQuotationPay",
"pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation",
"pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple",
"pages/carQuotation/updateOrderInfo/updateOrderInfo",
"pages/ocrEquityModules/ocrEquityModules",
"pages/carEquity/previewList/previewList",
"pages/carEquity/serviceInfo/serviceInfo",
"pages/carEquity/carBrands/carBrands",
"pages/carEquity/carSeries/carSeries",
"pages/TabBar/equityPage",
"pages/carEquity/previewContract/previewContract",
"pages/collegeScene/collegeScene",
"pages/clueList/clueList",
"pages/clueDetail/clueDetail",
"pages/residentTarget/residentTarget",
"pages/aiInspection/aiInspection",
"pages/aiInspectionDetail/aiInspectionDetail",
"pages/aiInspectionReception/aiInspectionReception",
"pages/employeeInspection/employeeInspection",
"pages/trainingMaterials/trainingMaterials",
"pages/trainingMaterials/pages/playVideo/index",
"pages/createDeafeatOrder/createDeafeatOrder",
"pages/createDeafeatOrderAi/createDeafeatOrderAi",
"pages/aiExcercise/ai/ai",
"pages/aiExcercise/detail/detail",
"pages/aiExcercise/list/list",
"pages/aiExcercise/result/result",
"pages/beforeCreate/beforeCreate",
"pages/deliveryTarget/deliveryTarget",
"pages/carQuotation/reception/reception",
"pages/aiCheck/chat/chat",
"pages/aiCheck/result/result",
"pages/aiCheck/scene/scene",
"pages/aiCheck/start/start",
"pages/orderList/orderList",
"pages/equityQualityOrderList/equityQualityOrderList",
"pages/createDeafeatOrderBefore/createDeafeatOrderBefore",
"pages/receptionRecords/receptionRecords",
"pages/aiCheck/redundance/redundance",
"pages/aiCheck/detail/detail",
"pages/receptionDetail/receptionDetail",
"pages/aiCheck/defense/defense",
"pages/extract/extract/extract",
"pages/extract/confirm/confirm",
"pages/extract/success/success",
"pages/sceneMarket/index/index",
"pages/sceneMarket/clue/clue",
"pages/sceneMarket/clueForm/clueForm",
"pages/sceneMarket/materialPage/materialPage",
"pages/newReceptionRecords/newReceptionRecords"
]
},
{
"root": "tabOperating",
"name": "tabOperating",
"pages": [
"pages/4sOverview/4sOverview",
"pages/index/index",
"pages/operatingShow/operatingShow"
]
},
{
"root": "packageCrowdFunding",
"name": "packageCrowdFunding",
"pages": [
"pages/TabBar/crowdFundingPage",
"pages/activityPage/paidOrder/orderList",
"pages/activityPage/activityList/activityList",
"pages/activityPage/activityPay/activityPay",
"pages/activityPage/paymentSuccess/paymentSuccess",
"pages/activityPage/balanceNote/balanceNote",
"pages/activityPage/newOrder/newOrder",
"pages/activityPage/additionRecordOrder/additionRecordOrder"
]
},
{
"root": "subvehicleConversion",
"name": "subvehicleConversion",
"pages": [
"pages/TabBar/conversionPage",
"pages/activityPage/activityManagement/activityManagement",
"pages/activityPage/visitor/visitor",
"pages/activityPage/order/order",
"pages/orderPage/supplementaryOrderList/supplementaryOrderList",
"pages/orderPage/supplementaryOrderPay/supplementaryOrderPay",
"pages/orderPage/relatedFinalPayment/relatedFinalPayment",
"pages/orderPage/paySuccess/paySuccess"
]
}
],
"usingComponents": {
"gl-textarea": "/components/GlTextarea/GlTextarea",
"gl-cell": "/components/GlCell/GlCell",
"gl-cust-form": "/components/GLCustForm/GLCustForm",
"calendar": "/components/Calendar/Calendar",
"navigation-bar": "/components/navigationBar/navigationBar",
"popup": "/components/Popup/Popup",
"search-input": "/components/SearchInput/SearchInput",
"order-popup": "/components/OrderPopup/OrderPopup",
"date-picker": "/components/DatePicker/DatePicker",
"remark-popup": "/components/RemarkPopup/RemarkPopup",
"tab-bar": "/components/TabBar/TabBar",
"order-confirm": "/components/Confirm/Confirm",
"qr-box": "components/Qrbox/Qrbox",
"modal": "components/modal/modal",
"tips-bottom": "components/tipsBottom/index",
"gl-image": "components/GlImage/index",
"van-field": "@vant/weapp/field/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-radio": "@vant/weapp/radio/index",
"van-popup": "@vant/weapp/popup/index",
"van-dialog": "@vant/weapp/dialog/index",
"van-uploader": "@vant/weapp/uploader/index",
"glsx-privacy": "glsk-applet-component/GlsxPrivacy/index",
"empty-data": "/components/EmptyData/EmptyData",
"van-switch": "@vant/weapp/switch/index"
},
"preloadRule": {
"pages/tabWorkOrder/pages/index/index": {
"network": "all",
"packages": [
"tabWorkOrder"
]
},
"tabIndex/pages/index/index": {
"network": "all",
"packages": [
"tabWorkOrder"
]
}
},
"resolveAlias": {
"~/*": "/*"
},
"sitemapLocation": "sitemap.json",
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"lazyCodeLoading": "requiredComponents",
"resizable": true
}
\ No newline at end of file
{
"pages": [
"pages/loading/loading",
"pages/sceneIndex/sceneIndex",
"pages/wxLogin/wxLogin",
"tabIndex/pages/index/index",
"pages/accountItems/accountItems",
"pages/merchantList/merchantList",
"pages/nothing/nothing",
"pages/webView/webView",
"pages/tabWorkOrder/pages/index/index",
"pages/tabMine/pages/index/index",
"pages/tabDateIndex/pages/tabDateIndex",
"pages/log/log",
"pages/changeScene/changeScene",
"pages/materails/index",
"pages/pointsReview/pointsReview",
"pages/h5AuthPhone/h5AuthPhone",
"pages/tabRepairOrder/pages/index/index"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "生意助手员工版",
"navigationBarTextStyle": "black",
"pageOrientation": "auto"
},
"tabBar": {
"color": "#757980",
"selectedColor": "#347BFF",
"backgroundColor": "#FFFFFF",
"position": "bottom",
"list": [
{
"pagePath": "tabIndex/pages/index/index",
"text": "首页",
"iconPath": "images/tab-home.png",
"selectedIconPath": "images/tab-home-active.png"
},
{
"pagePath": "pages/tabDateIndex/pages/tabDateIndex",
"text": "预约管理",
"iconPath": "images/tab-date.png",
"selectedIconPath": "images/tab-date-active.png"
},
{
"pagePath": "pages/tabWorkOrder/pages/index/index",
"text": "客户工单",
"iconPath": "images/tab-order.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",
"text": "个人中心",
"iconPath": "images/tab-mine.png",
"selectedIconPath": "images/tab-mine-active.png"
}
]
},
"subpackages": [
{
"root": "tabDate",
"name": "tabDate",
"pages": [
"pages/detail/detail",
"pages/apprManage/apprManage",
"pages/userPortrait/userPortrait"
]
},
{
"root": "integration",
"name": "integration",
"pages": [
"pages/bankAccount/list/list",
"pages/bankAccount/detail/detail",
"pages/point/index/index",
"pages/point/record/record",
"pages/point/toCash/toCash",
"pages/point/success/success"
]
},
{
"root": "tabMine",
"name": "tabMine",
"pages": [
"pages/technicianSetup/technicianSetup",
"pages/completeBuild/completeBuild",
"pages/collectCoupons/collectCoupons"
]
},
{
"root": "tabRepairOrder",
"name": "tabRepairOrder",
"pages": [
"pages/confirmWorkOrder/confirmWorkOrder",
"pages/repairOrderDetail/repairOrderDetail"
]
},
{
"root": "tabWorkOrder",
"name": "tabWorkOrder",
"pages": [
"pages/createOrder/createOrder",
"pages/additionRecordOrder/additionRecordOrder",
"pages/orderDetail/orderDetail",
"pages/constructionOrderDetail/constructionOrderDetail",
"pages/confirmOrder/confirmOrder",
"pages/updateOrderInfo/updateOrderInfo",
"pages/createArchives/createArchives",
"pages/orderSignature/orderSignature",
"pages/fullSignture/fullSignture",
"pages/ocr/ocr",
"pages/premiumUpgrade/premiumUpgrade",
"pages/defeatOrder/defeatOrder",
"pages/staffDaily/staffDaily",
"pages/upgradeStaffDaily/upgradeStaffDaily",
"pages/supervisorDaily/supervisorDaily",
"pages/residentManage/residentManage",
"pages/mentorshipManage/mentorshipManage",
"pages/tabWorkOrderRelevance/index",
"pages/invoiceCode/invoiceCode",
"pages/invoiceResult/invoiceResult",
"pages/technicianSearchList/pages/index/technicianSearchList",
"pages/refundOperationList/refundOperationList",
"pages/refundDetailList/refundDetailList",
"pages/refundApply/refundApply",
"pages/createAConstructionOrder/createAConstructionOrder"
]
},
{
"root": "packageEquity",
"name": "packageEquity",
"pages": [
"pages/carQuotation/signature/signature",
"pages/carQuotation/index/index",
"pages/carQuotation/relevanceOrderSelect/index",
"pages/carQuotation/fullSignture/fullSignture",
"pages/carQuotation/schemeConfirmation/schemeConfirmation",
"pages/carQuotation/CarQuotationDetail/CarQuotationDetail",
"pages/carQuotation/CarQuotationPay/CarQuotationPay",
"pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation",
"pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple",
"pages/carQuotation/updateOrderInfo/updateOrderInfo",
"pages/ocrEquityModules/ocrEquityModules",
"pages/carEquity/previewList/previewList",
"pages/carEquity/serviceInfo/serviceInfo",
"pages/carEquity/carBrands/carBrands",
"pages/carEquity/carSeries/carSeries",
"pages/TabBar/equityPage",
"pages/carEquity/previewContract/previewContract",
"pages/collegeScene/collegeScene",
"pages/clueList/clueList",
"pages/clueDetail/clueDetail",
"pages/residentTarget/residentTarget",
"pages/aiInspection/aiInspection",
"pages/aiInspectionDetail/aiInspectionDetail",
"pages/aiInspectionReception/aiInspectionReception",
"pages/employeeInspection/employeeInspection",
"pages/trainingMaterials/trainingMaterials",
"pages/trainingMaterials/pages/playVideo/index",
"pages/createDeafeatOrder/createDeafeatOrder",
"pages/createDeafeatOrderAi/createDeafeatOrderAi",
"pages/aiExcercise/ai/ai",
"pages/aiExcercise/detail/detail",
"pages/aiExcercise/list/list",
"pages/aiExcercise/result/result",
"pages/beforeCreate/beforeCreate",
"pages/deliveryTarget/deliveryTarget",
"pages/carQuotation/reception/reception",
"pages/aiCheck/chat/chat",
"pages/aiCheck/result/result",
"pages/aiCheck/scene/scene",
"pages/aiCheck/start/start",
"pages/orderList/orderList",
"pages/equityQualityOrderList/equityQualityOrderList",
"pages/createDeafeatOrderBefore/createDeafeatOrderBefore",
"pages/receptionRecords/receptionRecords",
"pages/aiCheck/redundance/redundance",
"pages/aiCheck/detail/detail",
"pages/receptionDetail/receptionDetail",
"pages/aiCheck/defense/defense",
"pages/extract/extract/extract",
"pages/extract/confirm/confirm",
"pages/extract/success/success",
"pages/sceneMarket/index/index",
"pages/sceneMarket/clue/clue",
"pages/sceneMarket/clueForm/clueForm",
"pages/sceneMarket/materialPage/materialPage",
"pages/newReceptionRecords/newReceptionRecords"
]
},
{
"root": "tabOperating",
"name": "tabOperating",
"pages": [
"pages/4sOverview/4sOverview",
"pages/index/index",
"pages/operatingShow/operatingShow"
]
},
{
"root": "packageCrowdFunding",
"name": "packageCrowdFunding",
"pages": [
"pages/TabBar/crowdFundingPage",
"pages/activityPage/paidOrder/orderList",
"pages/activityPage/activityList/activityList",
"pages/activityPage/activityPay/activityPay",
"pages/activityPage/paymentSuccess/paymentSuccess",
"pages/activityPage/balanceNote/balanceNote",
"pages/activityPage/newOrder/newOrder",
"pages/activityPage/additionRecordOrder/additionRecordOrder"
]
},
{
"root": "subvehicleConversion",
"name": "subvehicleConversion",
"pages": [
"pages/TabBar/conversionPage",
"pages/activityPage/activityManagement/activityManagement",
"pages/activityPage/visitor/visitor",
"pages/activityPage/order/order",
"pages/orderPage/supplementaryOrderList/supplementaryOrderList",
"pages/orderPage/supplementaryOrderPay/supplementaryOrderPay",
"pages/orderPage/relatedFinalPayment/relatedFinalPayment",
"pages/orderPage/paySuccess/paySuccess"
]
}
],
"usingComponents": {
"gl-textarea": "/components/GlTextarea/GlTextarea",
"gl-cell": "/components/GlCell/GlCell",
"gl-cust-form": "/components/GLCustForm/GLCustForm",
"calendar": "/components/Calendar/Calendar",
"navigation-bar": "/components/navigationBar/navigationBar",
"popup": "/components/Popup/Popup",
"search-input": "/components/SearchInput/SearchInput",
"order-popup": "/components/OrderPopup/OrderPopup",
"date-picker": "/components/DatePicker/DatePicker",
"remark-popup": "/components/RemarkPopup/RemarkPopup",
"tab-bar": "/components/TabBar/TabBar",
"order-confirm": "/components/Confirm/Confirm",
"qr-box": "components/Qrbox/Qrbox",
"modal": "components/modal/modal",
"tips-bottom": "components/tipsBottom/index",
"gl-image": "components/GlImage/index",
"van-field": "@vant/weapp/field/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-radio": "@vant/weapp/radio/index",
"van-popup": "@vant/weapp/popup/index",
"van-dialog": "@vant/weapp/dialog/index",
"van-uploader": "@vant/weapp/uploader/index",
"glsx-privacy": "glsk-applet-component/GlsxPrivacy/index",
"empty-data": "/components/EmptyData/EmptyData",
"van-switch": "@vant/weapp/switch/index"
},
"preloadRule": {
"pages/tabWorkOrder/pages/index/index": {
"network": "all",
"packages": ["tabWorkOrder"]
},
"tabIndex/pages/index/index": {
"network": "all",
"packages": ["tabWorkOrder"]
}
},
"resolveAlias": {
"~/*": "/*"
},
"sitemapLocation": "sitemap.json",
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"lazyCodeLoading": "requiredComponents",
"resizable": true
}
......@@ -18,12 +18,12 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let index = 0
let index = 4;
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
const envName = accountInfo.miniProgram.envVersion
//手动控制体验版环境的请求 true就依据下面index false就默认2
const manual = false
const manual = true
const release = false
// 判断小程序环境
......
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
import api from "../api";
import commonApi from '~/api/api'
const app = getApp();
const TABLIST = ["全部", "已预约", "待预约"];
const IMG_URL =
......@@ -13,6 +14,7 @@ Page({
tabIndex: 0,
activeIndex: 0,
phoneShow: false,
userPermissions: [], // 权限数组
inviteObj: {
dayInvited: 0,
overdue: 0,
......@@ -54,7 +56,7 @@ Page({
},
{
label: '流量有效性',
single_key:'trafficEffectivenessName'
single_key: 'trafficEffectivenessName'
}
],
// 邀约状态(1待邀约;2已邀约;3取消预约)
......@@ -315,6 +317,21 @@ Page({
});
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) {
// console.log(e)
// return
......@@ -331,6 +348,7 @@ Page({
phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
});
// this.getStatByPeriod()
// this.getiIviteRecord()
},
......@@ -437,8 +455,8 @@ Page({
e.yqMerchantName = e.merchantCoupon.yqMerchantName;
}
e.trafficEffectivenessName = {
1:'有效客户',
2:'无效客户'
1: '有效客户',
2: '无效客户'
}[e.trafficEffectiveness] || '-'
});
const userType =
......@@ -535,6 +553,7 @@ Page({
}
);
}
this.getStaffPermissions()
},
/**
* 生命周期函数--监听页面初次渲染完成
......
<navigation-bar bindnavbarReady="navbarReady" showBack="{{show_confirm}}" bindback="back">
{{!show_confirm?'预约管理':'筛选'}}
{{!show_confirm?'预约管理':'筛选'}}
</navigation-bar>
<wxs src="../index.wxs" module="filter" />
<!-- wx:if="{{navBarHeight > 0}}" -->
<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="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<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="{{activeIndex}}"/>
</view>
<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="{{keyword}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{keyword}}">
<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="{{activeIndex}}" />
</view>
<view class="list-bar">
<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.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>
<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(--fontSize252));"
refresher-threshold="104"
refresher-triggered="{{triggered}}"
class="list">
<block wx:if="{{list.length > 0}}">
<block wx:for="{{list}}" wx:key="index">
<block
wx:for="{{item}}"
wx:for-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}};">
<block>{{status[li.inviteStatus].text}}</block>
<!-- <block wx:if="{{li.inviteStatus !=4}}">
<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(--fontSize252));" refresher-threshold="104" refresher-triggered="{{triggered}}" class="list">
<block wx:if="{{list.length > 0}}">
<block wx:for="{{list}}" wx:key="index">
<block wx:for="{{item}}" wx:for-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}};">
<block>{{status[li.inviteStatus].text}}</block>
<!-- <block wx:if="{{li.inviteStatus !=4}}">
<view class="line" style="background-color:{{status[li.inviteStatus].color}};" />
</block> -->
</view>
<view class="name">
<!-- <image src="/images/avatar.png" /> -->
<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=""/>
</view>
<view class="order-list">
<block wx:for="{{orderObj}}" wx:key="index" 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:if="{{li[i.arr[1]]}}">
<block
wx:for="{{i.arr}}"
wx:key="sindex"
wx:for-index="arr_index"
wx:for-item="k">
<view class="order-value-item text-hide">
<block wx:if="{{arr_index == 1}}">
<text class="split">|</text>
</block>
{{li[k] || ''}}
</view>
</block>
</block>
</block>
</view>
<view class="name">
<!-- <image src="/images/avatar.png" /> -->
<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="" />
</view>
<view class="order-list">
<block wx:for="{{orderObj}}" wx:key="index" 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:if="{{li[i.arr[1]]}}">
<block wx:for="{{i.arr}}" wx:key="sindex" wx:for-index="arr_index" wx:for-item="k">
<view class="order-value-item text-hide">
<block wx:if="{{arr_index == 1}}">
<text class="split">|</text>
</block>
{{li[k] || ''}}
</view>
</block>
</block>
</block>
<block wx:elif="{{i.single_key}}">
<text>{{li[i.single_key]}}</text>
</block>
<block wx:else>
<text>{{li[i.key][i.c_key]|| ''}}</text>
<text wx:if="{{li[i.key][i.e_key]}}">({{li[i.key][i.e_key]}})</text>
</block>
</view>
</view>
</block>
</view>
<view class="order-type">
<view class="label">到店时间</view>
<block wx:else>
<text>{{li[i.key][i.c_key]|| ''}}</text>
<text wx:if="{{li[i.key][i.e_key]}}">({{li[i.key][i.e_key]}})</text>
</block>
</view>
</view>
</block>
</view>
<view class="order-type">
<view class="label">到店时间</view>
<!-- 已撤销/过期到店 时间显示灰色 -->
<view class="time {{now>=li.inviteDate || li.inviteStatus == 6?'gray':''}}">{{li.time}}</view>
</view>
<view class="order-control">
<view class="time {{now>=li.inviteDate || li.inviteStatus == 6?'gray':''}}">{{li.time}}</view>
</view>
<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}}">
<view class="control-item {{li.inviteStatus == 7 ? 'disabled' : ''}}" catchtap="showDateBox" data-item="{{li}}">
<image src="{{IMG_URL}}miniProgram/reservation_icon.png" class="date-icon" />
</view>
</block>
<block wx:if="{{(li.customer.customerPhone&&!phoneShow)&&isMake}}">
<view class="control-item" data-phone="{{li.customer.customerPhone}}" catchtap="phoneCall">
<image src="{{IMG_URL}}miniProgram/phone_icon.png" class="phone-icon" />
</view>
</block>
</view>
</view>
<view
wx:if="{{!li['confirmIndex']}}"
class="del"
catchtap="delBtn"
data-ind="{{ind}}"
data-item="{{li}}"
data-index="{{index}}">
<view>撤销</view>
<view>预约</view>
</view>
<view
wx:else
class="del confirm"
catchtap="repeal"
data-item="{{li}}"
data-index="{{index}}">
确认删除
</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 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}}">
<image src="{{IMG_URL}}miniProgram/reservation_icon.png" class="date-icon" />
</view>
</block>
<block wx:if="{{(li.customer.customerPhone&&!phoneShow)&&isMake}}">
<view class="control-item" data-phone="{{li.customer.customerPhone}}" catchtap="phoneCall">
<image src="{{IMG_URL}}miniProgram/phone_icon.png" class="phone-icon" />
</view>
</block>
</view>
</view>
<view wx:if="{{!li['confirmIndex']}}" class="del" catchtap="delBtn" data-ind="{{ind}}" data-item="{{li}}" data-index="{{index}}">
<view>撤销</view>
<view>预约</view>
</view>
<view wx:else class="del confirm" catchtap="repeal" data-item="{{li}}" data-index="{{index}}">
确认删除
</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}}">
<date-screen
show="{{show_confirm}}"
userInfo="{{userInfo}}"
navBarHeight="{{navBarHeight}}"
inviteStatus="{{tabIndex}}" />
<date-screen show="{{show_confirm}}" userInfo="{{userInfo}}" navBarHeight="{{navBarHeight}}" inviteStatus="{{tabIndex}}" />
</view>
</page-container>
<date-picker show="{{showDate}}" merchantId="{{dateItem.merchantCoupon.yqMerchantId}}" />
<date-picker show="{{showDate}}" merchantId="{{dateItem.merchantCoupon.yqMerchantId}}" />
\ No newline at end of file
......@@ -15,5 +15,10 @@ module.exports = {
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
// pages/tabRepairOrder/components/Screening/index.js
import api from '~/api/api'
import api from '../../api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
......@@ -89,7 +89,7 @@ Component({
})
wx.showLoading()
// 获取技师数据
api.getQYTechnicianList({
api.getTechnicianList({
yqMerchantId: wx.$util.getUserInfo()?.isSuper ? '' : wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
}).then(respone => {
wx.hideLoading()
......
/* pages/tabRepairOrder/components/Screening/index.wxss */
@keyframes show-confirm-box {
0%{
0% {
right: -100%;
}
100%{
100% {
right: 0;
}
}
.confirm-box {
position: fixed;
top: 0;
......@@ -16,11 +18,14 @@
box-sizing: border-box;
background-color: #fff;
animation: show-confirm-box .5s forwards;
.main{
.main {
box-sizing: border-box;
}
.box {
margin: 0 var(--fontSize32);
.title {
display: flex;
align-items: center;
......@@ -34,23 +39,28 @@
top: 0;
background: #fff;
z-index: 2;
.title-left{
.title-left {
display: flex;
align-items: flex-end;
}
.collapse-btn{
.collapse-btn {
width: var(--fontSize48);
height: var(--fontSize48);
&.rotate-180{
&.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);
......@@ -65,44 +75,57 @@
color: #292D33;
transition: all .2s;
margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0;
.text-item{
.text-item {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.inline-block{
.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{
.grey {
color: #999EA8;
}
.custom-time{
.custom-time {
width: calc(316 / 750 * 100%);
margin-bottom: 0;
&:last-child{
&: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);
......@@ -116,31 +139,37 @@
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;
......
......@@ -58,11 +58,11 @@
</block>
</view>
</view>
<view class="box">
<view class="box ">
<view class="title">
施工状态
</view>
<view class="list-box">
<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>
......
......@@ -174,9 +174,9 @@ Page({
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 ? '#347BFF' : val.constructionStatus == 0 ? '#FF9D0A' : ''
val.statusbackground = val.constructionStatus == 1 ? '#EAF1FF' : val.constructionStatus == 0 ? '#FFF5E6' : ''
val.statusText = val.constructionStatus == 1 ? '已施工' : val.constructionStatus == 0 ? '待施工' : ''
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 = ''] =
......
......@@ -158,7 +158,7 @@ page {
background: #35C376;
color: #FFFFFF;
font-weight: 500;
font-size: var(--fontSize24);
font-size: var(--fontSize22);
border-radius: var(--fontSize4);
margin-right: var(--fontSize16);
}
......@@ -169,9 +169,12 @@ page {
margin-bottom: var(--fontSize16);
position: relative;
min-width: 0;
&:last-child{
margin-bottom: 0;
}
.goods-name {
display: inline-block;
max-width: calc(100% - var(--fontSize190));
max-width: calc(100% - var(--fontSize184));
}
.materials {
display: inline-block;
......@@ -198,7 +201,7 @@ page {
background: #347BFF;
color: #FFFFFF;
font-weight: 500;
font-size: var(--fontSize24);
font-size: var(--fontSize22);
border-radius: var(--fontSize4);
margin-right: var(--fontSize16);
}
......
......@@ -58,7 +58,7 @@
<view class="goods-list">
<block wx:if="{{ li.subOrderList.length }}">
<view class="goods-tag">商品</view>
<view style="flex: 1;">
<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">
......
// pages/tabWorkOrder/components/OrderScreen/OrderScreen.js
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({
/**
* 组件的属性列表
*/
......@@ -16,8 +16,16 @@ Component({
this.setViewData()
let { userInfo } = this.data
// 非超管 获取转化人员 销售顾问
if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo.loginRole == 6)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
if (
!(
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5 ||
userInfo.loginRole == 6
)
) {
if (wx.$orderListDateListScreenRefresh) {
// 切换门店将数据清空
this.setData({
'form.userIdList': [],
'form.sellerUserIdList': []
......@@ -49,130 +57,142 @@ Component({
data: {
IMG_URL,
// 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销
statusList: [{
name: '全部',
active: true,
value: []
},
{
name: '待跟进',
value: [1]
},
{
name: '已支付',
value: [4]
},
{
name: '待支付',
value: [3]
},
{
name: '已撤销',
value: [9]
},
{
name: '战败',
value: [2]
},
{
name: '已评价',
value: [6]
},
{
name: '已关闭',
value: [10]
},
{
name: '已失效',
value: [11]
},
// {
// name: '未施工',
// value: ['N']
// },
// {
// name: '已施工',
// value: ['Y']
// },
{
name: '已退款',
value: [5, 12]
}
statusList: [
{
name: '全部',
active: true,
value: []
},
{
name: '待跟进',
value: [1]
},
{
name: '已支付',
value: [4]
},
{
name: '待支付',
value: [3]
},
{
name: '已撤销',
value: [9]
},
{
name: '战败',
value: [2]
},
{
name: '已评价',
value: [6]
},
{
name: '已关闭',
value: [10]
},
{
name: '已失效',
value: [11]
},
// {
// name: '未施工',
// value: ['N']
// },
// {
// name: '已施工',
// value: ['Y']
// },
{
name: '已退款',
value: [5, 12]
}
],
constructionStatusList: [
{
name: '全部',
active: true,
value: []
value: ''
},
{
name: '已施工',
value: 1
value: 'Y'
},
{
name: '待施工',
value: 0
value: 'N'
},
{
name: '无需施工',
value: 3
value: 'Z'
}
],
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'
}],
payTimeList: [{
name: '全部',
active: true
}, {
name: '今日',
payStartDate: new Date().format('yyyy-MM-dd'),
payEndDate: new Date().format('yyyy-MM-dd')
}, {
name: '本月',
payStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'),
payEndDate: new Date().format('yyyy-MM-dd')
}, {
payStartDate: '',
payEndDate: '',
type: 'custom'
}],
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'
}
],
payTimeList: [
{
name: '全部',
active: true
},
{
name: '今日',
payStartDate: new Date().format('yyyy-MM-dd'),
payEndDate: new Date().format('yyyy-MM-dd')
},
{
name: '本月',
payStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'),
payEndDate: new Date().format('yyyy-MM-dd')
},
{
payStartDate: '',
payEndDate: '',
type: 'custom'
}
],
employShowMore: false,
salesmanShowMore: false,
payTypeList: [{
name: '门店收款',
value: 2
},
{
name: '微信支付',
value: 1
},
{
name: 'POS机支付',
value: 3
},
{
name: '支付宝支付',
value: 4
},
{
name: '嘀加收款',
value: 5
}
payTypeList: [
{
name: '门店收款',
value: 2
},
{
name: '微信支付',
value: 1
},
{
name: 'POS机支付',
value: 3
},
{
name: '支付宝支付',
value: 4
},
{
name: '嘀加收款',
value: 5
}
],
storeType: 1, // 门店数据类型 默认园区店
showStoreSelectPopup: false
......@@ -204,8 +224,10 @@ Component({
},
storeConfirm(e) {
let { storeType } = this.data
if (storeType == 1) this.setData({ 'form.selectedYqMerchantList': e?.detail })
if (storeType == 2) this.setData({ 'form.selectedMerchantList': e?.detail })
if (storeType == 1)
this.setData({ 'form.selectedYqMerchantList': e?.detail })
if (storeType == 2)
this.setData({ 'form.selectedMerchantList': e?.detail })
this.setData({ showStoreSelectPopup: false, isReset: false })
},
yqMerchantChoose() {
......@@ -225,56 +247,70 @@ Component({
this.getsellerUserIdList(userInfo?.shopMerchantId, 1)
},
init() {
let { orderTimeList, payTimeList, userInfo, constructionStatusList } = 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 => {
let { code, message } = res
if (code == 0) {
let obj = res.data || {}
let m = obj.supportPayTypes || []
let n = wx.$util.deepClone(this.data.payTypeList)
let list = n.filter(k => {
let idx = m.find(j => j == k.value)
return idx >= 0
})
let payList = [
{
name: '全部',
value: '',
active: true
},
...list,
{
name: '对公转账',
value: '6'
},
{
name: '其它收款',
value: '7'
}
]
this.setData({
['form.payType']: payList
})
} else {
wx.$util.showToast(message)
}
})
api
.getYqStoreConfig({ yqMerchantId: userInfo?.merchantId })
.then(res => {
let { code, message } = res
if (code == 0) {
let obj = res.data || {}
let m = obj.supportPayTypes || []
let n = wx.$util.deepClone(this.data.payTypeList)
let list = n.filter(k => {
let idx = m.find(j => j == k.value)
return idx >= 0
})
let payList = [
{
name: '全部',
value: '',
active: true
},
...list,
{
name: '对公转账',
value: '6'
},
{
name: '其它收款',
value: '7'
}
]
this.setData({
['form.payType']: payList
})
} else {
wx.$util.showToast(message)
}
})
} else {
let payArr = [{
name: '全部',
value: '',
active: true
}, ...wx.$util.deepClone(this.data.payTypeList), {
name: '对公转账',
value: '6'
},
{
name: '其它收款',
value: '7'
}]
let payArr = [
{
name: '全部',
value: '',
active: true
},
...wx.$util.deepClone(this.data.payTypeList),
{
name: '对公转账',
value: '6'
},
{
name: '其它收款',
value: '7'
}
]
this.setData({
['form.payType']: payArr
})
......@@ -282,7 +318,7 @@ Component({
this.setData({
['form.orderTimeList']: wx.$util.deepClone(orderTimeList),
['form.payTimeList']: wx.$util.deepClone(payTimeList),
['form.constructionStatus']: wx.$util.deepClone(constructionStatusList)
['form.constructionFlag']: wx.$util.deepClone(constructionStatusList)
})
},
showMore(e) {
......@@ -300,17 +336,20 @@ Component({
date: { start, end }
} = e.detail
data?.map(i => (i.active = false))
let obj = name == 'orderTimeList' ? {
active: true,
orderStartDate: start,
orderEndDate: end,
type: 'custom'
} : {
active: true,
payStartDate: start,
payEndDate: end,
type: 'custom'
}
let obj =
name == 'orderTimeList'
? {
active: true,
orderStartDate: start,
orderEndDate: end,
type: 'custom'
}
: {
active: true,
payStartDate: start,
payEndDate: end,
type: 'custom'
}
data[index] = obj
this.setData({
[`form.${name}`]: data,
......@@ -320,7 +359,10 @@ Component({
// 日期组件
showCalendar(e) {
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)
},
choose(e) {
......@@ -329,7 +371,7 @@ Component({
if (target[index].disabled) return
if (listName === 'sellerUserIdList' || listName === 'userIdList') {
if (index == 0) {
target.forEach(i => i.active = false)
target.forEach(i => (i.active = false))
target[index].active = true
} else {
target[index].active = !target[index].active
......@@ -352,9 +394,7 @@ Component({
if (n != -1) this.setOrderStatusListDisabled(n)
},
setOrderStatusListDisabled(statusType) {
let {
statusList
} = this.data
let { statusList } = this.data
statusList.map((e, index) => {
if (statusType == 1) {
if (index != 1 && index != 0) e.disabled = true
......@@ -400,7 +440,10 @@ Component({
} else {
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({
[target]: formArr
})
......@@ -449,7 +492,14 @@ Component({
let arr = []
form[e]?.map(i => {
if (i.active) {
let { orderStartDate, orderEndDate, payStartDate, payEndDate, value, merchantId } = i
let {
orderStartDate,
orderEndDate,
payStartDate,
payEndDate,
value,
merchantId
} = i
obj[e] = value
// 订单时间
if (orderStartDate && orderEndDate) {
......@@ -506,4 +556,4 @@ Component({
this.init()
// this.getScreenList()
}
})
\ No newline at end of file
})
<!--pages/tabWorkOrder/components/OrderScreen/OrderScreen.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">
<!-- 非超管转化人员 -->
<view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}">
<view class="title">
<view class="title-left">
转化人员
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}">{{userInfo.merchantName}}</view>
</view>
<view wx:if="{{form.sellerUserIdList.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" />
</view>
</view>
<view class="list-box">
<block wx:for="{{form.sellerUserIdList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="sellerUserIdList" data-index="{{index}}" hidden="{{index >= 12 && !employShowMore}}">
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</view>
</view>
<!-- 超管转化人员 选择园区店 -->
<view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6}}">
<view class="title">
<view class="title-left">
转化人员
</view>
<view wx:if="{{form.selectedYqMerchantList.length > 3}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" />
</view>
</view>
<view class="list-box">
<view class="item text-center {{!form.selectedYqMerchantList.length?'active':''}}" bindtap="yqMerchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="1">自定义</view>
<block wx:for="{{form.selectedYqMerchantList}}" wx:key="index">
<view class="item active flex-1" bindtap="choose" data-list-name="selectedYqMerchantList" data-index="{{index}}" hidden="{{index >= 3 && !employShowMore}}">
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view>
</view>
</block>
</view>
</view>
<!-- 非超管销售顾问 -->
<view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}">
<view class="title">
<view class="title-left">
销售顾问
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}">{{userInfo.shopMerchantName}}</view>
</view>
<view wx:if="{{form.userIdList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" />
</view>
</view>
<view class="list-box">
<block wx:for="{{form.userIdList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="userIdList" data-index="{{index}}" hidden="{{index >= 12 && !salesmanShowMore}}">
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</view>
</view>
<!-- 超管销售顾问 选择4s店 -->
<view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6}}">
<view class="title">
<view class="title-left">
销售顾问
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6)}}">{{userInfo.shopMerchantName}}</view>
</view>
<view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" />
</view>
</view>
<view class="list-box">
<view class="item text-center {{!form.selectedMerchantList.length?'active':''}}" bindtap="merchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="2">自定义</view>
<block wx:for="{{form.selectedMerchantList}}" wx:key="index">
<view class="item active flex-1" bindtap="choose" data-list-name="selectedMerchantList" data-index="{{index}}" hidden="{{index >= 3 && !salesmanShowMore}}">
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view>
</view>
</block>
</view>
</view>
<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>
<view class="list-box">
<block wx:for="{{form.payTimeList}}" wx:key="index">
<block wx:if="{{item.type}}">
<calendar allowSameDay shortcut bindselect='rangeSelect' data-index="{{index}}" id="payCalendar" data-name="payTimeList" 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="showPay" class="item custom-time text-center {{!item.payStartDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.payStartDate || '开始时间'}}</view>-
<view bindtap="showCalendar" data-type="show" data-target="showPay" class="item custom-time text-center {{!item.payEndDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.payEndDate || '结束时间'}}</view>
</view>
</block>
<block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="payTimeList" data-index="{{index}}">{{item.name}}</view>
</block>
</block>
</view>
</view>
<view class="box">
<view class="title">
订单状态
</view>
<view class="list-box">
<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 class="box">
<view class="title">
施工状态
</view>
<view class="list-box">
<block wx:for="{{form.constructionStatus}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="constructionStatus" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
<view class="box">
<view class="title">
支付方式
</view>
<view class="list-box">
<block wx:for="{{form.payType}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="payType" 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
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">
<!-- 非超管转化人员 -->
<view
class="box"
wx:if="{{ !(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6) }}"
>
<view class="title">
<view class="title-left">
转化人员
<view
class="title-tips"
wx:if="{{ !(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6) }}"
>{{userInfo.merchantName}}</view>
</view>
<view
wx:if="{{ form.sellerUserIdList.length > 12 }}"
bindtap="showMore"
data-type="1"
class="collapse-btn {{ !employShowMore ? 'rotate-180' : '' }}"
>
<image src="{{ IMG_URL }}collapse_icon.png" mode="" />
</view>
</view>
<view class="list-box">
<block wx:for="{{ form.sellerUserIdList }}" wx:key="index">
<view
class="item text-center {{ item.active?'active':'' }}"
bindtap="choose"
data-list-name="sellerUserIdList"
data-index="{{ index }}"
hidden="{{ index >= 12 && !employShowMore }}"
>
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</view>
</view>
<!-- 超管转化人员 选择园区店 -->
<view
class="box"
wx:if="{{ userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6 }}"
>
<view class="title">
<view class="title-left">转化人员</view>
<view
wx:if="{{ form.selectedYqMerchantList.length > 3 }}"
bindtap="showMore"
data-type="1"
class="collapse-btn {{ !employShowMore ? 'rotate-180' : '' }}"
>
<image src="{{ IMG_URL }}collapse_icon.png" mode="" />
</view>
</view>
<view class="list-box">
<view class="item text-center {{ !form.selectedYqMerchantList.length?'active':'' }}" bindtap="yqMerchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="1">自定义</view>
<block wx:for="{{ form.selectedYqMerchantList }}" wx:key="index">
<view
class="item active flex-1"
bindtap="choose"
data-list-name="selectedYqMerchantList"
data-index="{{ index }}"
hidden="{{ index >= 3 && !employShowMore }}"
>
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view>
</view>
</block>
</view>
</view>
<!-- 非超管销售顾问 -->
<view
class="box"
wx:if="{{ !(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6) }}"
>
<view class="title">
<view class="title-left">
销售顾问
<view
class="title-tips"
wx:if="{{ !(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6) }}"
>{{userInfo.shopMerchantName}}</view>
</view>
<view
wx:if="{{ form.userIdList.length > 12 }}"
bindtap="showMore"
data-type="2"
class="collapse-btn {{ !salesmanShowMore ? 'rotate-180' : '' }}"
>
<image src="{{ IMG_URL }}collapse_icon.png" mode="" />
</view>
</view>
<view class="list-box">
<block wx:for="{{ form.userIdList }}" wx:key="index">
<view
class="item text-center {{ item.active?'active':'' }}"
bindtap="choose"
data-list-name="userIdList"
data-index="{{ index }}"
hidden="{{ index >= 12 && !salesmanShowMore }}"
>
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</view>
</view>
<!-- 超管销售顾问 选择4s店 -->
<view
class="box"
wx:if="{{ userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6 }}"
>
<view class="title">
<view class="title-left">
销售顾问
<view
class="title-tips"
wx:if="{{ !(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 || userInfo.loginRole == 6) }}"
>{{userInfo.shopMerchantName}}</view>
</view>
<view
wx:if="{{ form.selectedMerchantList.length > 3 }}"
bindtap="showMore"
data-type="2"
class="collapse-btn {{ !salesmanShowMore ? 'rotate-180' : '' }}"
>
<image src="{{ IMG_URL }}collapse_icon.png" mode="" />
</view>
</view>
<view class="list-box">
<view class="item text-center {{ !form.selectedMerchantList.length?'active':'' }}" bindtap="merchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="2">自定义</view>
<block wx:for="{{ form.selectedMerchantList }}" wx:key="index">
<view
class="item active flex-1"
bindtap="choose"
data-list-name="selectedMerchantList"
data-index="{{ index }}"
hidden="{{ index >= 3 && !salesmanShowMore }}"
>
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view>
</view>
</block>
</view>
</view>
<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>
<view class="list-box">
<block wx:for="{{ form.payTimeList }}" wx:key="index">
<block wx:if="{{ item.type }}">
<calendar
allowSameDay
shortcut
bindselect="rangeSelect"
data-index="{{ index }}"
id="payCalendar"
data-name="payTimeList"
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="showPay"
class="item custom-time text-center {{ !item.payStartDate ? 'grey' : ''}} {{item.active?'active':'' }}"
>{{item.payStartDate || '开始时间'}}</view>
-
<view
bindtap="showCalendar"
data-type="show"
data-target="showPay"
class="item custom-time text-center {{ !item.payEndDate ? 'grey' : ''}} {{item.active?'active':'' }}"
>{{item.payEndDate || '结束时间'}}</view>
</view>
</block>
<block wx:else>
<view
class="item text-center {{ item.active?'active':'' }}"
bindtap="choose"
data-list-name="payTimeList"
data-index="{{ index }}"
>{{item.name}}</view>
</block>
</block>
</view>
</view>
<view class="box">
<view class="title">订单状态</view>
<view class="list-box">
<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 class="box">
<view class="title">施工状态</view>
<view class="list-box">
<block wx:for="{{ form.constructionFlag }}" wx:key="index">
<view
class="item text-center {{ item.active?'active':''}} {{item.disabled ?'disabled':'' }}"
bindtap="choose"
data-list-name="constructionFlag"
data-index="{{ index }}"
>{{item.name}}</view>
</block>
</view>
</view>
<view class="box">
<view class="title">支付方式</view>
<view class="list-box">
<block wx:for="{{ form.payType }}" wx:key="index">
<view
class="item text-center {{ item.active?'active':'' }}"
bindtap="choose"
data-list-name="payType"
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>
<store-select-popup show="{{showStoreSelectPopup}}" type="{{storeType}}" bindconfirm="storeConfirm" bindcancel="hideStorePopup" selectedData="{{storeType == 1 ? form.selectedYqMerchantList || [] : form.selectedMerchantList || []}}"></store-select-popup>
\ No newline at end of file
<store-select-popup
show="{{ showStoreSelectPopup }}"
type="{{ storeType }}"
bindconfirm="storeConfirm"
bindcancel="hideStorePopup"
selectedData="{{ storeType == 1 ? form.selectedYqMerchantList || [] : form.selectedMerchantList || [] }}"
></store-select-popup>
\ No newline at end of file
var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null
......@@ -11,13 +10,28 @@ var isIncludesItem = function (list, item) {
// var flag = list.indexOf(item)
return list.indexOf(item) != -1
}
var subStatus = function (item) {
var staus = {
"Y": 'constructionFlaged',
"N": 'constructionFlaging',
"Z": ''
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 staus[item.constructionFlaged] || ''
return false
}
/*
* 导出
......@@ -25,5 +39,6 @@ var subStatus = function (item) {
module.exports = {
replaceItemText: replaceItemText,
isIncludesItem: isIncludesItem,
subStatus: subStatus
subStatus: subStatus,
btnPermissions: btnPermissions
}
......@@ -272,8 +272,8 @@ Page({
} else {
wx.$util.showNoAccess()
}
// 已支付加已施工
} else if (item.constructionFlag == 'Y' && item.status != 10) {
// 已支付加已施工 全部子订单都已施工才能确认施工详情跳转
} else if (item.allConstructionFlag && item.status != 10) {
wx.$router.go('tabWorkOrder.constructionOrderDetail', item)
} else {
wx.$router.go('tabWorkOrder.' + name, item)
......@@ -620,7 +620,13 @@ Page({
data.list.map(e => {
if (e.orderTime)
e.orderTime = new Date(e.orderTime).format('yyyy-MM-dd hh:mm:ss')
// 判断一下是否所有子订单都已经施工,是就跳转 施工完成
e.allConstructionFlag = true
e.subOrderList.map(i => {
// 判断一下是否所有子订单都已经施工
if (![1, 2, 3].includes(i.constructionStatus)) {
e.allConstructionFlag = false
}
i.totalPrice = Number(wx.$util.decimal(i.totalPrice, 2)).toFixed(2)
})
e.total_price = e.totalPrice
......@@ -644,6 +650,10 @@ Page({
g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice
// 判断一下是否所有子订单都已经施工
if (![1, 2, 3].includes(g.constructionStatus)) {
e.allConstructionFlag = false
}
})
item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => {
......@@ -665,12 +675,12 @@ Page({
let text = status[e.status].text
let color = status[e.status].color
let background = status[e.status].background
// 不是订单失效状态优先显示已施工
if (![9, 11, 12].includes(e.status) && e.constructionFlag == 'Y') {
text = '已施工'
color = '#347BFF'
background = '#F3F7FC'
}
// 不是订单失效状态优先显示已施工 现在不施工
// if (![9, 11, 12].includes(e.status) && e.constructionFlag == 'Y') {
// text = '已施工'
// color = '#347BFF'
// background = '#F3F7FC'
// }
e.statusText = text
e.statuscolor = color
e.statusbackground = background
......
......@@ -236,6 +236,7 @@ page {
.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%;
}
......@@ -243,10 +244,33 @@ page {
.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 {
font-size: var(--fontSize28);
// color: #292D33;
......
......@@ -3,273 +3,207 @@
<!-- wx:if="{{navBarHeight > 0}}" -->
<!-- -->
<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="{{ keyword }}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search"
/>
<block wx:if="{{ keyword }}">
<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="{{ activeIndex }}" />
</view>
<!-- 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 -->
<block wx:if="{{ flag }}">
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{ true }}"
bindrefresherrefresh="search"
bindscrolltolower="scrollonReachBottom"
bindscroll="onPageScroll"
class="list"
style="height:calc(100vh - {{ navBarHeight }}px - var(--fontSize160));"
refresher-threshold="104"
refresher-triggered="{{ triggered }}"
>
<block wx:if="{{ list.length > 0 }}">
<block wx:for="{{ list }}" wx:key="index">
<block wx:for="{{ item }}" wx:for-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 }}"
>
<!-- 广汇订单出库成功 -->
<image wx:if="{{ li.outboundStatus == 4 }}" class="stockIcon" src="../../images/stockIcon.png" />
<view
class="item content"
catchtap="jump"
data-ind="{{ ind }}"
data-index="{{ index }}"
bindtouchstart="touchstart"
bindtouchmove="touchmove"
bindtouchend="touchE"
data-name="{{ li.status == 3 ? 'confirmOrder' : li.status == 1 ? 'createOrder' : 'orderDetail' }}"
data-item="{{ li }}"
>
<view class="status text-center" style="color:{{ li.statuscolor }};background-color:{{li.statusbackground }};">
<block wx:if="{{ li.status == 1||li.status == 3 }}">
<block wx:if="{{ status[li.status].background }}">
<view class="arc y-center">
<view class="outside box-center" style="background-color:{{ status[li.status].background }};" />
<view class="inside box-center" style="background-color:{{ status[li.status].color }};" />
</view>
</block>
</block>
<!-- 优先显示已撤销的 然后是已施工的 最后是其他的 -->
<!-- {{li.status==9?status[li.status].text: (li.constructionFlag == 'Y'?'已施工':status[li.status].text) }} -->
{{li.statusText }}
</view>
<view class="name">
<!-- <image src="/images/avatar.png" /> -->
<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=""
/>
</view>
<view class="goods-list" style="padding-bottom:{{ li.subOrderList.length<1?0:'' }}">
<block wx:if="{{ li.subOrderList.length }}">
<block wx:for="{{ li.subOrderList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view
catch:tap="foldUp"
data-item="{{ i }}"
data-index="{{ sindex }}"
data-listindex="{{ ind }}"
class="goods {{ filter.subStatus(li.constructionFlag) }}"
wx:if="{{ li.showAllGoodsListFlag ? true : sindex < 2 }}"
>
<view class="goods-name text-hide">
{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || i.packageName||''}}
</view>
<view class="goods-price">
¥
<text>{{i.totalPrice || 0}}</text>
</view>
</view>
<!-- 显示套餐子商品 -->
<view
class="packgoodsListCon"
wx:if="{{ i.packageGoodsOrderList&&!i.foldUp&&( li.showAllGoodsListFlag ? true : sindex < 2) }}"
>
<block wx:for="{{ i.packageGoodsOrderList }}" wx:key="sindex" wx:for-item="packchild" wx:for-index="sindex">
<view class="goods {{ filter.subStatus(li.constructionFlag) }}">
<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 wx:if="{{ li.subOrderList.length > 2 }}">
<view class="goods-more">
<text catch:tap="showAllGoodsList" data-item="{{ li }}">{{li.showAllGoodsListFlag ? '收起' : '查看全部'}}</text>
(共{{li.subOrderList.length}}件)
</view>
</block>
</block>
</view>
<view class="order-list">
<block wx:for="{{ li.deliveryUserId? pointsMultiObj: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:if="{{ li[i.arr[1]] }}">
<block wx:for="{{ i.arr }}" wx:key="sindex" wx:for-index="arr_index" wx:for-item="k">
<view class="order-value-item text-hide">
<block wx:if="{{ arr_index == 1 }}">
<text class="split">|</text>
</block>
{{li[k]}}
</view>
</block>
</block>
</block>
<block wx:else>{{li[i.key] || ''}}</block>
</view>
</view>
</block>
</view>
<!-- <view class="order-type">类型:{{li.source != 5 ? '升级下单' :'核销抵扣'}}</view> -->
<view class="order-payType" wx:if="{{ li.selectPayType || li.selectPayType == 0 }}">
<view class="payType">
<!-- li['status']==1?'': -->
<view class="payType-label">支付方式</view>
<view class="payType-value">
{{payType[li['selectPayType']]}}
<image wx:if="{{ li.selectPayType == 1 }}" class="payType-image" src="{{ IMG_URL }}miniProgram/wxPay.png" mode="" />
<image wx:if="{{ li.selectPayType == 2 }}" class="payType-image" src="{{ IMG_URL }}miniProgram/store_pay.png" mode="" />
<image wx:if="{{ li.selectPayType == 3 }}" class="payType-image" src="{{ IMG_URL }}miniProgram/posPay.png" mode="" />
</view>
<!-- &&userInfo.userType!=2 -->
<!-- <block wx:if="{{li.repeal}}">(可撤销)</block> -->
<!-- <block wx:if="{{li.repeal}}">(可撤销)</block> -->
</view>
<block wx:if="{{ li.status != 1 && li.selectPayType != 0 && li.total_price != 0 }}">
<view class="order-price">
<view class="order-price-label">实付金额</view>
<view class="price">
<text class="unit">¥</text>
{{li.totalPrice}}
</view>
</view>
</block>
</view>
<!-- <block wx:if="{{!userInfo.isSuper && userInfo.merchantType}}"> -->
<!-- userInfo.userType == 1&& -->
<!-- <block wx:if="{{userInfo.userType == 1&& (li.status != 9 && li.status != 1) && li.selectPayType != 3 && li.selectPayType != 1}}"> -->
<!-- <view
<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="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ keyword }}">
<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="{{ activeIndex }}" />
</view>
<!-- 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 -->
<block wx:if="{{ flag }}">
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="search" bindscrolltolower="scrollonReachBottom" bindscroll="onPageScroll" class="list" style="height:calc(100vh - {{ navBarHeight }}px - var(--fontSize160));" refresher-threshold="104" refresher-triggered="{{ triggered }}">
<block wx:if="{{ list.length > 0 }}">
<block wx:for="{{ list }}" wx:key="index">
<block wx:for="{{ item }}" wx:for-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 }}">
<!-- 广汇订单出库成功 -->
<image wx:if="{{ li.outboundStatus == 4 }}" class="stockIcon" src="../../images/stockIcon.png" />
<view class="item content" catchtap="jump" data-ind="{{ ind }}" data-index="{{ index }}" bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchE" data-name="{{ li.status == 3 ? 'confirmOrder' : li.status == 1 ? 'createOrder' : 'orderDetail' }}" data-item="{{ li }}">
<view class="status text-center" style="color:{{ li.statuscolor }};background-color:{{li.statusbackground }};">
<block wx:if="{{ li.status == 1||li.status == 3 }}">
<block wx:if="{{ status[li.status].background }}">
<view class="arc y-center">
<view class="outside box-center" style="background-color:{{ status[li.status].background }};" />
<view class="inside box-center" style="background-color:{{ status[li.status].color }};" />
</view>
</block>
</block>
<!-- 优先显示已撤销的 然后是已施工的 最后是其他的 -->
<!-- {{li.status==9?status[li.status].text: (li.constructionFlag == 'Y'?'已施工':status[li.status].text) }} -->
{{li.statusText }}
</view>
<view class="name">
<!-- <image src="/images/avatar.png" /> -->
<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="" />
</view>
<view class="goods-list" style="padding-bottom:{{ li.subOrderList.length<1?0:'' }}">
<block wx:if="{{ li.subOrderList.length }}">
<block wx:for="{{ li.subOrderList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<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">
{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || i.packageName||''}}
</view>
<view class="goods-price">
¥
<text>{{i.totalPrice || 0}}</text>
</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 wx:if="{{ li.subOrderList.length > 2 }}">
<view class="goods-more">
<text catch:tap="showAllGoodsList" data-item="{{ li }}">{{li.showAllGoodsListFlag ? '收起' : '查看全部'}}</text>
(共{{li.subOrderList.length}}件)
</view>
</block>
</block>
</view>
<view class="order-list">
<block wx:for="{{ li.deliveryUserId? pointsMultiObj: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:if="{{ li[i.arr[1]] }}">
<block wx:for="{{ i.arr }}" wx:key="sindex" wx:for-index="arr_index" wx:for-item="k">
<view class="order-value-item text-hide">
<block wx:if="{{ arr_index == 1 }}">
<text class="split">|</text>
</block>
{{li[k]}}
</view>
</block>
</block>
</block>
<block wx:else>{{li[i.key] || ''}}</block>
</view>
</view>
</block>
</view>
<!-- <view class="order-type">类型:{{li.source != 5 ? '升级下单' :'核销抵扣'}}</view> -->
<view class="order-payType" wx:if="{{ li.selectPayType || li.selectPayType == 0 }}">
<view class="payType">
<!-- li['status']==1?'': -->
<view class="payType-label">支付方式</view>
<view class="payType-value">
{{payType[li['selectPayType']]}}
<image wx:if="{{ li.selectPayType == 1 }}" class="payType-image" src="{{ IMG_URL }}miniProgram/wxPay.png" mode="" />
<image wx:if="{{ li.selectPayType == 2 }}" class="payType-image" src="{{ IMG_URL }}miniProgram/store_pay.png" mode="" />
<image wx:if="{{ li.selectPayType == 3 }}" class="payType-image" src="{{ IMG_URL }}miniProgram/posPay.png" mode="" />
</view>
<!-- &&userInfo.userType!=2 -->
<!-- <block wx:if="{{li.repeal}}">(可撤销)</block> -->
<!-- <block wx:if="{{li.repeal}}">(可撤销)</block> -->
</view>
<block wx:if="{{ li.status != 1 && li.selectPayType != 0 && li.total_price != 0 }}">
<view class="order-price">
<view class="order-price-label">实付金额</view>
<view class="price">
<text class="unit">¥</text>
{{li.totalPrice}}
</view>
</view>
</block>
</view>
<!-- <block wx:if="{{!userInfo.isSuper && userInfo.merchantType}}"> -->
<!-- userInfo.userType == 1&& -->
<!-- <block wx:if="{{userInfo.userType == 1&& (li.status != 9 && li.status != 1) && li.selectPayType != 3 && li.selectPayType != 1}}"> -->
<!-- <view
wx:if="{{li.repeal}}"
class="btn text-center"
catchtap="repeal"
data-item="{{li}}">
撤销工单
</view> -->
<!-- </block> -->
<!-- </block> -->
<!-- footer -->
</view>
<block wx:if="{{ isMake }}">
<view
wx:if="{{ !li['confirmIndex'] }}"
class="del"
catchtap="delBtn"
data-ind="{{ ind }}"
data-item="{{ li }}"
data-index="{{ index }}"
>
<view>撤销</view>
<view>工单</view>
</view>
<view wx:else class="del confirm" catchtap="repeal" data-item="{{ li }}" data-index="{{ index }}">确认删除</view>
</block>
</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 wx:if="{{ (!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 )&& showIcon1 && isMake }}">
<view class="fixed-btns">
<view class="btn text-center" bindtap="jump" data-name="createOrder" data-flag="new">
<image src="{{ IMG_URL }}upgrade/scancode_verification02.png" />
新增工单
</view>
<view class="btn text-center" bindtap="scan">
<image src="{{ IMG_URL }}upgrade/create_newworkorder01.png" />
扫码核销
</view>
</view>
</block>
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && !showIcon1 }}">
<view class="arrowIcon">
<image class="image" src="{{ IMG_URL }}upgrade/arrow-left.png" />
</view>
</block>
<!-- </block> -->
<!-- </block> -->
<!-- footer -->
</view>
<block wx:if="{{ isMake }}">
<view wx:if="{{ !li['confirmIndex'] }}" class="del" catchtap="delBtn" data-ind="{{ ind }}" data-item="{{ li }}" data-index="{{ index }}">
<view>撤销</view>
<view>工单</view>
</view>
<view wx:else class="del confirm" catchtap="repeal" data-item="{{ li }}" data-index="{{ index }}">确认删除</view>
</block>
</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 wx:if="{{ (!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 )&& showIcon1 && isMake }}">
<view class="fixed-btns">
<view class="btn text-center" bindtap="jump" data-name="createOrder" data-flag="new">
<image src="{{ IMG_URL }}upgrade/scancode_verification02.png" />
新增工单
</view>
<view class="btn text-center" bindtap="scan">
<image src="{{ IMG_URL }}upgrade/create_newworkorder01.png" />
扫码核销
</view>
</view>
</block>
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && !showIcon1 }}">
<view class="arrowIcon">
<image class="image" src="{{ IMG_URL }}upgrade/arrow-left.png" />
</view>
</block>
</block>
<page-container show="{{ show_confirm }}" duration="{{ 0 }}" overlay="{{ false }}" bind:afterleave="back">
<view wx:if="{{ showRendering }}">
<order-screen show="{{ show_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" orderStatus="{{ tabIndex }}" />
</view>
<view wx:if="{{ showRendering }}">
<order-screen show="{{ show_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" orderStatus="{{ tabIndex }}" />
</view>
</page-container>
<modal id="modal2" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
<view class="modatcontent">
<view class="modalbox {{ selectType == 1?'act': '' }} com" bindtap="selectType" data-type="1">
<gl-image class="icon" src="/miniProgram/order1.png"></gl-image>
新增工单
</view>
<view class="modalbox cancle {{ selectType == 2?'act': '' }}" bindtap="selectType" data-type="2">
<gl-image class="icon" src="/miniProgram/order3.png"></gl-image>
战败下单
</view>
<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>
失效客户
</view>
</view>
<view class="modatcontent">
<view class="modalbox {{ selectType == 1?'act': '' }} com" bindtap="selectType" data-type="1">
<gl-image class="icon" src="/miniProgram/order1.png"></gl-image>
新增工单
</view>
<view class="modalbox cancle {{ selectType == 2?'act': '' }}" bindtap="selectType" data-type="2">
<gl-image class="icon" src="/miniProgram/order3.png"></gl-image>
战败下单
</view>
<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>
失效客户
</view>
</view>
</modal>
<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>
\ No newline at end of file
<order-prompt-popup wx:if="{{ showPromptDialog }}" show="{{ showPromptDialog }}" bindcancel="promptCancel" bindconfirm="promptHandleConfirm" sceneObj="{{ sceneObj }}"></order-prompt-popup>
\ No newline at end of file
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";
// tabDate/pages/detail/detail.js
import CONSTANTDATA from "../userPortrait/constant/data";
import commonApi from '~/api/api'
import {
checkDailyReport
} from "~/store/ModalToQueueControl";
const app = getApp();
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
detail: {},
userPermissions: [], // 权限数组
orderObj: {
customer: {
customerName: "",
......@@ -24,71 +29,71 @@ Page({
selectPayType: 2,
},
customerObj: [{
label: "客户姓名",
key: "customerName",
},
{
label: "手机号",
key: "customerPhone",
color: "#347BFF",
callBack: "makePhoneCall",
copy: true,
},
{
label: "客户车型",
key: "carName",
},
{
label: "礼券名称",
key: "couponName",
e_key: "employeeName",
},
{
label: "领券时间",
key: "time",
},
{
label: "销售顾问",
key: "employeeName",
},
{
label: "客户画像",
key: "userPortrait",
portrait: true,
},
label: "客户姓名",
key: "customerName",
},
{
label: "手机号",
key: "customerPhone",
color: "#347BFF",
callBack: "makePhoneCall",
copy: true,
},
{
label: "客户车型",
key: "carName",
},
{
label: "礼券名称",
key: "couponName",
e_key: "employeeName",
},
{
label: "领券时间",
key: "time",
},
{
label: "销售顾问",
key: "employeeName",
},
{
label: "客户画像",
key: "userPortrait",
portrait: true,
},
],
recordObj: [{
label: "跟进人",
key: "userName",
},
{
label: ["事", "件"],
key: "eventType",
enum: {
1: "车主领券",
2: "车主预约",
3: "预约时间",
4: "修改时间",
5: "取消预约",
},
},
{
label: ["备", "注"],
key: "remark",
label: "跟进人",
key: "userName",
},
{
label: ["事", "件"],
key: "eventType",
enum: {
1: "车主领券",
2: "车主预约",
3: "预约时间",
4: "修改时间",
5: "取消预约",
},
},
{
label: ["备", "注"],
key: "remark",
},
],
remark: "",
isOrder: true,
selectType: 1,
sceneObj: {},
trafficEffectivenessList: [{
name: '有效客户',
value: '1'
},
{
name: '无效客户',
value: '2'
}
name: '有效客户',
value: '1'
},
{
name: '无效客户',
value: '2'
}
]
},
......@@ -99,35 +104,35 @@ Page({
}) {
wx.$modal(
this, {
show: true,
title: "请选择录单入口",
tabTitleShow: false,
success: (res) => {
// 跳转新增订单页面 并带特定参数
let {
selectType
} = this.data;
if (selectType == 1) {
// wx.$router.go("tabWorkOrder.createOrder", {
// scene,
// ...item,
// });
this.setData({
showPromptDialog: true,
sceneObj: item
})
} else {
console.log({
...item
}, "item");
wx.$router.go("tabWorkOrder.defeatOrder", {
scene,
...item,
});
}
},
error: () => {},
show: true,
title: "请选择录单入口",
tabTitleShow: false,
success: (res) => {
// 跳转新增订单页面 并带特定参数
let {
selectType
} = this.data;
if (selectType == 1) {
// wx.$router.go("tabWorkOrder.createOrder", {
// scene,
// ...item,
// });
this.setData({
showPromptDialog: true,
sceneObj: item
})
} else {
console.log({
...item
}, "item");
wx.$router.go("tabWorkOrder.defeatOrder", {
scene,
...item,
});
}
},
error: () => { },
},
"#modal2"
);
},
......@@ -200,6 +205,21 @@ Page({
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) {
console.log(options);
if (options.id) {
......@@ -226,6 +246,7 @@ Page({
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
});
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig);
this.getStaffPermissions()
},
checkPhoneShow(config) {
console.log("config", config);
......@@ -349,14 +370,14 @@ Page({
detail.trafficEffectivenessName = {
1: '有效客户',
2: '无效客户'
} [detail.trafficEffectiveness]
}[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.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({
trafficEffectivenessDisabled,
detail,
......@@ -500,11 +521,11 @@ Page({
let {
value
} = e.detail, {
trafficEffectivenessList,
detail: {
id
}
} = this.data,
trafficEffectivenessList,
detail: {
id
}
} = this.data,
trafficEffectiveness = trafficEffectivenessList[value].value,
trafficEffectivenessName = trafficEffectivenessList[value].name,
data = await api.updateTrafficEffectiveness({
......@@ -522,7 +543,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
onReady: function () { },
/**
* 生命周期函数--监听页面显示
......@@ -539,25 +560,25 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
onHide: function () { },
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
onUnload: function () { },
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
onPullDownRefresh: function () { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
onReachBottom: function () { },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
onShareAppMessage: function () { },
});
\ No newline at end of file
......@@ -53,15 +53,22 @@ page {
margin-left: auto;
color: #347BFF;
flex-shrink: 0;
.iconImage {
width: var(--fontSize32);
height: var(--fontSize32);
vertical-align: bottom;
}
}
.box .customer-list .item .label {
width: var(--fontSize140);
flex-shrink: 0;
color: #999EA8;
}
.box .customer-list .item .value {
color: #888888;
color: #292D33;
}
.box .icon {
......@@ -199,6 +206,10 @@ page {
color: #999999;
}
.boxend {
margin-bottom: 130rpx;
}
.fixed-box {
position: fixed;
top: 0;
......@@ -331,6 +342,7 @@ page {
min-height: var(--fontSize100);
background: #FFFFFF;
padding-bottom: var(--fontSize10);
padding-top: 20rpx;
}
.btns .btn {
......
<!-- tabDate/pages/detail/detail.wxml -->
<wxs src="../../index.wxs" module="filter" />
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block wx:if="{{ flag }}">
<view class="main {{ isFullSucreen && detail.inviteStatus != 4?'isFullSucreen':'' }}">
......@@ -8,7 +9,7 @@
<block wx:for="{{ customerObj }}" wx:key="index">
<view class="item">
<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> -->
<block wx:if="{{ item.key=='carName' }}">
<block wx:if="{{ detail.customer.carSeriesName }}">
......@@ -27,10 +28,14 @@
<block wx:else>{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}</block>
</view>
<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 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>
</view>
</block>
......@@ -55,7 +60,7 @@
</picker>
</view>
<view class="box">
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2&&isOrder }}">
<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">
<image src="../../images/date.png" />
......@@ -68,7 +73,7 @@
<view class="date text-center {{ detail.inviteStatus == 6 ? 'gray' : '' }}">
{{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>
</block>
</view>
......@@ -79,7 +84,7 @@
<view class="nothing text-center">暂无记录</view>
</block>
</view>
<view class="box">
<view class="box boxend">
<view class="title">客户跟进记录</view>
<block wx:if="{{ detail.remarks.length > 0 }}">
<view class="record-box">
......@@ -119,7 +124,7 @@
<view class="value">{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}</view>
</view>
</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">
<image src="../../images/edit.png" />
</view>
......
......@@ -39,5 +39,10 @@ module.exports = {
// 施工单返工
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})
}
}
......@@ -15,23 +15,18 @@ Component({
this.setData({
scrollTop: 0
})
let { infoData } = this.data
if (infoData) {
this.getDetailInfo(infoData)
}
let { detailInfo } = this.data
this.setData({
infoData: wx.$util.deepClone(detailInfo)
}, () => {
this.getDetailInfo(this.data.infoData)
})
}
}
},
title: String,
detailInfo: {
type: Object,
observer: function(n) {
if (n) {
this.setData({
infoData: wx.$util.deepClone(n)
})
}
}
type: Object
},
userPermissions: Array
},
......@@ -52,7 +47,7 @@ Component({
methods: {
async getDetailInfo(data) {
let oParams = {}
oParams.appId = 'wx570d9331f9ace0bd'
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}`
......
// tabRepairOrder/components/relateGoodsPop/index.js
Component({
/**
* 组件的属性列表
*/
......@@ -10,15 +9,18 @@ Component({
baseConfigData: Object,
show: {
type: Boolean,
observer: function(n) {
observer: function (n) {
if (n) {
let {goodsList, selected} = this.data
let { goodsList, selected } = this.data
goodsList?.map(val => {
val.active = false
if (selected?.findIndex(v => v.upgradeGoodsId == val.upgradeGoodsId) > -1) val.active = true
if (
selected?.findIndex(v => v.subOrderCode == val.subOrderCode) > -1
)
val.active = true
return val
})
this.setData({goodsList})
this.setData({ goodsList })
}
}
}
......@@ -27,9 +29,7 @@ Component({
/**
* 组件的初始数据
*/
data: {
},
data: {},
/**
* 组件的方法列表
......@@ -39,7 +39,7 @@ Component({
let { item } = e.currentTarget.dataset
let { goodsList } = this.data
goodsList?.forEach(val => {
if (val.upgradeGoodsId == item.upgradeGoodsId) val.active = !val.active
if (val.subOrderCode == item.subOrderCode) val.active = !val.active
})
this.setData({
goodsList
......@@ -55,4 +55,4 @@ Component({
this.triggerEvent('confirm', arr)
}
}
})
\ No newline at end of file
})
......@@ -20,7 +20,6 @@
justify-content: space-between;
padding-right: var(--fontSize32);
width: calc(100% - var(--fontSize130));
border-top: var(--fontSize2) solid #EBEDF0;
height: var(--fontSize84);
display: flex;
align-items: center;
......
// 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
{
"component": true,
"usingComponents": {}
}
\ 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
<!--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
<!--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">
<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" 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">
<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>
......@@ -73,26 +58,13 @@
</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>
</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
<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
......@@ -11,7 +11,11 @@ Component({
type: Boolean,
observer: function(n) {
if (n) {
this.getList()
this.setData({
searchValue: ''
}, () => {
this.getList(true)
})
}
}
},
......@@ -33,6 +37,7 @@ Component({
data: {
IMG_URL,
servicesList: [],
copyServicesList: [],
selectedData: []
},
......@@ -46,7 +51,7 @@ Component({
})
},
// 获取服务项目数据
getList() {
getList(firstFlag) {
let { searchValue } = this.data
api.getServiceItemList({serviceItemsName: searchValue}).then(res => {
let { code, data, message } = res
......@@ -60,12 +65,18 @@ Component({
val.title = `${val.categoryName}-${val.itemName}`
val.detailList = val.serviceItemList?.map(item => ({
...item,
serviceItemsId: item.id,
active: selectedIds.has(item.id)
}))
})
this.setData({
servicesList: res.data
})
if (firstFlag) {
this.setData({
copyServicesList: res.data || []
})
}
} else {
wx.$util.showToast(message)
}
......@@ -77,7 +88,7 @@ Component({
// 服务项目选择
handleChecked(e) {
let { target } = e.currentTarget.dataset
let { servicesList } = this.data
let { servicesList, copyServicesList } = this.data
servicesList?.map(val => {
val?.detailList?.map(v => {
if (v.id == target.id) v.active = !v.active
......@@ -85,6 +96,13 @@ Component({
})
return val
})
copyServicesList?.map(val => {
val?.detailList?.map(v => {
if (v.id == target.id) v.active = !v.active
return v
})
return val
})
const filteredServicesList = servicesList?.map(val => {
if (!val?.detailList) return null
return {
......@@ -94,6 +112,7 @@ Component({
}).filter(val => val && val.detailList.length > 0) || []
this.setData({
servicesList,
copyServicesList,
selectedData: filteredServicesList
})
},
......@@ -109,8 +128,8 @@ Component({
this.triggerEvent('cancel')
},
confirm() {
let {servicesList} = this.data
const result = servicesList.map(item => ({
let {servicesList, copyServicesList} = this.data
const result = copyServicesList.map(item => ({
...item,
detailList: item?.detailList.filter(child => child.active)
})).filter(item => item.detailList?.length > 0)
......
......@@ -38,6 +38,6 @@
</block>
</scroll-view>
</view>
<view class="bottom">共选项目<text>{{filter.activeNum(servicesList, 'detailList')}}</text>个</view>
<view class="bottom">共选项目<text>{{filter.activeNum(copyServicesList, 'detailList')}}</text>个</view>
</view>
</popup>
\ No newline at end of file
......@@ -74,7 +74,7 @@ Component({
hour: date.getHours(),
minute: date.getMinutes(),
second: date.getSeconds(),
dateStr: date.format('yyyy/MM/dd')?.replace(/\//g, '-')
dateStr: date.format('yyyy-MM-dd')?.replace(/\//g, '-')
}
} catch (error) {
return this.getCurrentTimeData()
......@@ -91,7 +91,7 @@ Component({
hour: today.getHours(),
minute: today.getMinutes(),
second: today.getSeconds(),
dateStr: today.format('yyyy/MM/dd')?.replace(/\//g, '-')
dateStr: today.format('yyyy-MM-dd')?.replace(/\//g, '-')
}
},
......@@ -126,9 +126,8 @@ Component({
const hours = []
// 根据是否是当前日期决定小时范围
const isToday = defaultTime.dateStr === today.format('yyyy/MM/dd')?.replace(/\//g, '-')
const hourLimit = isToday ? defaultTime.hour + 1 : 24
const isToday = defaultTime.dateStr === today.format('yyyy-MM-dd')?.replace(/\//g, '-')
const hourLimit = isToday ? today.getHours() + 1 : 24
for (let hour = 0; hour < hourLimit; hour++) {
hours.push(hour.toString().padStart(2, '0'));
}
......@@ -140,18 +139,17 @@ Component({
const minutes = []
const seconds = []
const isToday = defaultTime.dateStr === today.format('yyyy/MM/dd')?.replace(/\//g, '-')
const isToday = defaultTime.dateStr === today.format('yyyy-MM-dd')?.replace(/\//g, '-')
const isCurrentHour = defaultTime.hour === today.getHours()
// 分钟范围
const minuteLimit = (isToday && isCurrentHour) ? defaultTime.minute + 1 : 60
const minuteLimit = (isToday && isCurrentHour) ? today.getMinutes() + 1 : 60
for (let minute = 0; minute < minuteLimit; minute++) {
minutes.push(minute.toString().padStart(2, '0'));
}
// 秒范围
const isCurrentMinute = (isToday && isCurrentHour && defaultTime.minute === today.getMinutes())
const secondLimit = isCurrentMinute ? defaultTime.second + 1 : 60
const secondLimit = isCurrentMinute ? today.getSeconds() + 1 : 60
for (let second = 0; second < secondLimit; second++) {
seconds.push(second.toString().padStart(2, '0'));
}
......@@ -201,10 +199,7 @@ Component({
const index = value[0]
this.currentDate = days[index]
// 验证时间有效性
if (!this.validateTime()) return
const today = new Date().format('yyyy/MM/dd')?.replace(/\//g, '-')
const today = new Date().format('yyyy-MM-dd')?.replace(/\//g, '-')
const timeType = this.currentDate != today ? 1 : 0
this.getAllTimeOrPartTime(timeType)
},
......@@ -214,11 +209,7 @@ Component({
const { value } = e.detail
const index = value[0]
this.currentHour = hours[index]
// 验证时间有效性
if (!this.validateTime()) return
const today = new Date().format('yyyy/MM/dd')?.replace(/\//g, '-')
const today = new Date().format('yyyy-MM-dd')?.replace(/\//g, '-')
const timeType = this.currentDate != today ? 1 : 0
this.getAllTimeOrPartTimeMinute(timeType)
},
......@@ -228,10 +219,6 @@ Component({
const { value } = e.detail
const index = value[0]
this.currentMinute = minutes[index]
// 验证时间有效性
if (!this.validateTime()) return
this.updateSecondsByMinute()
},
......@@ -240,9 +227,6 @@ Component({
const { value } = e.detail
const index = value[0]
this.currentSecond = seconds[index]
// 验证时间有效性
this.validateTime()
},
// 新增方法:验证时间有效性
......@@ -282,7 +266,7 @@ Component({
}
const str = `${this.currentDate} ${this.currentHour}:${this.currentMinute}:${this.currentSecond}`
const result = new Date(str.replace(/-/g, '/')).format('yyyy/MM/dd hh:mm:ss')?.replace(/\//g, '-')
const result = new Date(str.replace(/-/g, '/')).format('yyyy-MM-dd hh:mm:ss')?.replace(/\//g, '-')
this.triggerEvent('confirm', result)
this.setData({ errorMsg: '' })
},
......@@ -344,7 +328,7 @@ Component({
const seconds = []
let second_len = 60
const currentDateStr = today.format('yyyy/MM/dd')?.replace(/\//g, '-')
const currentDateStr = today.format('yyyy-MM-dd')?.replace(/\//g, '-')
if (this.currentDate === currentDateStr &&
this.currentHour === today.getHours().toString().padStart(2, '0') &&
this.currentMinute === today.getMinutes().toString().padStart(2, '0')) {
......
......@@ -11,8 +11,9 @@
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize30);
color: #292D33;
font-size: var(--fontSize32);
font-weight: 500;
color: #222222;
}
}
.picker_max{
......
......@@ -12,21 +12,21 @@
<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>
<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>
<view class="view">{{item}}分</view>
</block>
</picker-view-column>
</picker-view>
<picker-view wx:if="{{!loading}}" class="picker" value="{{secondValues}}" indicator-class="indicator" bindchange="changeMinutes">
<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>
<view class="view">{{item}}秒</view>
</block>
</picker-view-column>
</picker-view>
......
// tabRepairOrder/pages/confirmWorkOrder/index.js
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/'
import api from '../../api'
import commonApi from '~/api/api'
import {getPositionList, setConfigInfo} from "~/store/index";
const app = getApp();
import { getPositionList, setConfigInfo } from '~/store/index'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
confirmInfo: {},
goodsObj: [{
label: '客户姓名',
key: 'customerName'
}, {
label: '客户车型',
key: 'customerCarName'
}],
goodsObj: [
{
label: '客户姓名',
key: 'customerName'
},
{
label: '客户车型',
key: 'customerCarName'
}
],
positionTypeList: [],
goodsList: [], // 所有可关联商品 包含当前施工单商品
mainSelected: [], // 主技师已选
......@@ -30,60 +33,43 @@ Page({
onRoute(options) {
let userInfo = wx.$util.getUserInfo()
this.setData({
userInfo
}, async () => {
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
this.getDetail(options)
this.getTechnicianList()
this.getGoodsList(options)
this.setData({
baseConfigData
})
this.getStaffPermissions()
})
this.setData(
{
userInfo
},
async () => {
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
this.getDetail(options)
this.getTechnicianList()
this.getGoodsList(options)
this.setData({
baseConfigData
})
this.getStaffPermissions()
}
)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onLoad(options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
onShow() {},
// 获取人员权限
getStaffPermissions() {
// 假数据开始
const res = {
code: 0,
data: [{
name: '施工确认',
code: 'SHIGONGQUEREN'
}, {
name: '完成施工',
code: 'WANCHENGSHIGONG'
}]
}
this.setData({
userPermissions: res.data
})
return
let { userInfo } = this.data
commonApi.staffPermissions({phone: userInfo?.phone}).then(res => {
commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res
if (code == 0) {
......@@ -97,72 +83,108 @@ Page({
},
// 获取详情数据
getDetail(data) {
api.getConstructionDetail({
id: data?.id,
constructionCode: data?.constructionCode
}).then(res => {
let { code, data, message } = res
const mainSelected = data?.mainTechnicianList?.filter(val => val.technicianType == 0)?.map(it => { return { technicianId: it.technicianId, staffName: it.technicianName, id: it.id, uuid: it.technicianUuid } })
const deputySelected = data?.mainTechnicianList?.filter(val => val.technicianType == 1)?.map(it => { return { technicianId: it.technicianId, staffName: it.technicianName, id: it.id, uuid: it.technicianUuid } })
data.customer.customerCarName = data.customer.carSeriesName ? `${data.customer.carBrand}-${data.customer.carChildsBrandName}-${data.customer.carSeriesName}` : ''
if (data.startTime) data.startTime = new Date(data.startTime).format("yyyy-MM-dd hh:mm:ss")
if (data.endTime) data.endTime = new Date(data.endTime).format("yyyy-MM-dd hh:mm:ss")
if (code == 0) {
this.setData({
mainSelected,
deputySelected,
confirmInfo: data || {}
})
} else {
wx.$util.showToast(message)
}
wx.showLoading({
title: '加载中'
})
api
.getConstructionDetail({
id: data?.id,
constructionCode: data?.constructionCode
})
.then(res => {
wx.hideLoading()
let { code, data, message } = res
const mainSelected = data?.mainTechnicianList
?.filter(val => val.technicianType == 0)
?.map(it => {
return {
technicianId: it.technicianId,
staffName: it.technicianName,
id: it.id,
uuid: it.technicianUuid
}
})
const deputySelected = data?.mainTechnicianList
?.filter(val => val.technicianType == 1)
?.map(it => {
return {
technicianId: it.technicianId,
staffName: it.technicianName,
id: it.id,
uuid: it.technicianUuid
}
})
data.customer.customerCarName = data.customer.carSeriesName
? `${data.customer.carBrand}-${data.customer.carChildsBrandName}-${data.customer.carSeriesName}`
: ''
if (data.startTime)
data.startTime = new Date(data.startTime).format(
'yyyy-MM-dd hh:mm:ss'
)
if (data.endTime)
data.endTime = new Date(data.endTime).format('yyyy-MM-dd hh:mm:ss')
if (code == 0) {
this.setData({
mainSelected,
deputySelected,
confirmInfo: data || {}
})
} else {
wx.$util.showToast(message)
}
})
},
// 获取技师数据
getTechnicianList() {
let { userInfo } = this.data
// 获取技师数据
commonApi.getQYTechnicianList({
yqMerchantId: !userInfo?.isSuper ? wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId : ''
}).then(respone => {
wx.hideLoading()
if (respone?.code == 0) {
this.setData({
artificerList: respone.data || []
})
}
})
api
.getTechnicianList({
yqMerchantId: !userInfo?.isSuper
? wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
: ''
})
.then(respone => {
wx.hideLoading()
if (respone?.code == 0) {
this.setData({
artificerList: respone.data || []
})
}
})
},
// 获取可关联的商品数据
getGoodsList(data) {
api.getCanRelateGoodsList({
orderCode: data?.orderCode,
constructionCode: data?.constructionCode
}).then(async res => {
let { code, data, message } = res
if (code == 0) {
const positionTypeList = (await getPositionList()) || [];
if (positionTypeList) {
data?.forEach(val => {
val.positionStr = positionTypeList.filter(
(v) => v.positionValue == val.position
)[0]?.positionName
api
.getCanRelateGoodsList({
orderCode: data?.orderCode,
constructionCode: data?.constructionCode
})
.then(async res => {
let { code, data, message } = res
if (code == 0) {
const positionTypeList = (await getPositionList()) || []
if (positionTypeList) {
data?.forEach(val => {
val.positionStr = positionTypeList.filter(
v => v.positionValue == val.position
)[0]?.positionName
})
}
this.setData({
goodsList: data || []
})
} else {
wx.$util.showToast(message)
}
this.setData({
goodsList: data || []
})
} else {
wx.$util.showToast(message)
}
})
})
},
// 关联商品
handleEditGoods() {
let { confirmInfo } = this.data
// 编辑时的商品数据
const editGoodsList = wx.$util.deepClone(confirmInfo.subOrderList)
this.setData({editGoodsFlag: true, editGoodsList})
this.setData({ editGoodsFlag: true, editGoodsList })
},
// 删除商品
......@@ -190,13 +212,13 @@ Page({
})
},
relateGoods () {
this.setData({relateGoodsVisable: true})
relateGoods() {
this.setData({ relateGoodsVisable: true })
},
// 关联商品弹窗取消
handelRelateGoodsCancel() {
this.setData({relateGoodsVisable: false})
this.setData({ relateGoodsVisable: false })
},
// 关联商品弹窗确认
......@@ -206,7 +228,7 @@ Page({
})
this.handelRelateGoodsCancel()
},
showPopup(e) {
let { type } = e.currentTarget.dataset
this.setData({
......@@ -275,7 +297,7 @@ Page({
},
// 选择服务项目弹窗
selectServices() {
this.setData({selectServiceVisable: true})
this.setData({ selectServiceVisable: true })
},
// 选择服务项目弹窗确定
handleSelectServiceConfirm(e) {
......@@ -286,11 +308,19 @@ Page({
},
// 选择服务项目弹窗取消
handleSelectServiceCancel() {
this.setData({selectServiceVisable: false})
this.setData({ selectServiceVisable: false })
},
// 提交电子施工单
submit() {
const { editGoodsFlag, editServiceFlag, confirmInfo, mainSelected, goodsList, deputySelected } = this.data
const {
editGoodsFlag,
editServiceFlag,
confirmInfo,
mainSelected,
goodsList,
deputySelected,
requesting
} = this.data
const validateWithImmediateFeedback = (condition, message) => {
if (condition) {
wx.$util.showToast(message)
......@@ -298,28 +328,47 @@ Page({
}
return false
}
if (validateWithImmediateFeedback(editGoodsFlag, '请确认完成商品关联')) return
if (validateWithImmediateFeedback(editServiceFlag, '请确认完成服务项目修改')) return
if (validateWithImmediateFeedback(!confirmInfo?.subOrderList?.length, '请关联商品')) return
if (validateWithImmediateFeedback(!mainSelected?.length, '请选择主技师')) return
if (validateWithImmediateFeedback(!confirmInfo?.serviceItemsList?.length, '请选择服务项目')) return
if (validateWithImmediateFeedback(editGoodsFlag, '请确认完成商品关联'))
return
if (
validateWithImmediateFeedback(editServiceFlag, '请确认完成服务项目修改')
)
return
if (
validateWithImmediateFeedback(
!confirmInfo?.subOrderList?.length,
'请关联商品'
)
)
return
if (validateWithImmediateFeedback(!mainSelected?.length, '请选择主技师'))
return
if (
validateWithImmediateFeedback(
!confirmInfo?.serviceItemsList?.length,
'请选择服务项目'
)
)
return
wx.showModal({
title: '是否确认生成电子施工单',
content: '请确认客户商品有无增减,服务项目是否完整。提交后不可修改客户商品、技师、服务项目',
content:
'请确认客户商品有无增减,服务项目是否完整。提交后不可修改客户商品、技师、服务项目',
confirmText: '确认提交',
confirmColor: '#347BFF',
cancelText: '返回',
complete: (res) => {
complete: res => {
if (res.confirm) {
const subOrderList = confirmInfo?.subOrderList?.map(val => {
return {
subOrderCode: val.subOrderCode,
subOrderCode: val.subOrderCode
}
})
const allRelationList = goodsList?.map(val => {
val.constructionFlag = 2
confirmInfo?.subOrderList?.map(item => {
if (val.upgradeGoodsId == item.upgradeGoodsId) val.constructionFlag = 1
if (val.upgradeGoodsId == item.upgradeGoodsId)
val.constructionFlag = 1
})
return {
subOrderCode: val.subOrderCode,
......@@ -329,46 +378,64 @@ Page({
const mainTechnicianList = [
...(mainSelected?.map(val => ({
id: val.id,
technicianId: val.id,
technicianName: val.staffName,
technicianUuid: val.uuid,
technicianType: 0
})) || []),
...(deputySelected?.map(val => ({
id: val.id,
technicianId: val.id,
technicianName: val.staffName,
technicianUuid: val.uuid,
technicianType: 1
})) || [])
];
const serviceItemsList = (confirmInfo?.serviceItemsList || []).reduce((acc, val) => {
const details = (val?.detailList || []).map(it => ({
serviceItemsId: it.serviceItemsId,
serviceItemsName: it.serviceItemsName,
categoryId: it.categoryId,
itemsConfigName: it.itemsConfigName,
materialStandard: it.materialStandard,
timeStandard: it.timeStandard,
serviceCost: it.serviceCost
}))
return acc.concat(details)
}, [])
]
const serviceItemsList = (confirmInfo?.serviceItemsList || []).reduce(
(acc, val) => {
const details = (val?.detailList || []).map(it => ({
serviceItemsId: it.serviceItemsId,
serviceItemsName: it.serviceItemsName,
categoryId: it.categoryId,
itemsConfigName: it.itemsConfigName,
materialStandard: it.materialStandard,
timeStandard: it.timeStandard,
serviceCost: it.serviceCost
}))
return acc.concat(details)
},
[]
)
let params = {
id: confirmInfo.id,
constructionCode: confirmInfo.constructionCode,
orderCode: confirmInfo.orderCode,
reworkFlag: confirmInfo?.reworkFlag,// 是否返工
reworkFlag: confirmInfo?.reworkFlag, // 是否返工
subOrderList,
mainTechnicianList,
serviceItemsList,
allRelationList // 传全部可选商品,区分是否需要施工
}
if (requesting) return false
this.setData({
requesting: true
})
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})
wx.$router.redirectTo('repairOrderDetail', {
id: confirmInfo.id,
constructionCode: confirmInfo.constructionCode,
orderCode: confirmInfo.orderCode
})
} else {
wx.$util.showToast(message)
}
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
})
}
}
......@@ -377,35 +444,25 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
onShareAppMessage() {}
})
......@@ -4,16 +4,18 @@
<view class="item goods">
<view class="title">
<view class="box">商品信息</view>
<block wx:if="{{!editGoodsFlag}}">
<view class="edit-btn" bindtap="handleEditGoods">
<image src="{{IMG_URL}}repair-order/relate-goods.png" mode=""/>关联商品
</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelGoodsCancel">取消</view>
<view bindtap="handelGoodsConfirm">完成</view>
</view>
<block wx:if="{{confirmInfo.reworkFlag != 1 && filter.btnPermissions(userPermissions, 'SHIGONGQUEREN')}}">
<block wx:if="{{!editGoodsFlag}}">
<view class="edit-btn" bindtap="handleEditGoods">
<image src="{{IMG_URL}}repair-order/relate-goods.png" mode=""/>关联商品
</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelGoodsCancel">取消</view>
<view bindtap="handelGoodsConfirm">完成</view>
</view>
</block>
</block>
</view>
<view class="box">
......@@ -68,14 +70,16 @@
<view class="item service">
<view class="title">
<view class="box">施工单信息</view>
<block wx:if="{{!editServiceFlag}}">
<view class="edit-btn" bindtap="handleEditService">编辑</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelServicesCancel">取消</view>
<view bindtap="handelServicesConfirm">完成</view>
</view>
<block wx:if="{{filter.btnPermissions(userPermissions, 'SHIGONGQUEREN')}}">
<block wx:if="{{!editServiceFlag}}">
<view class="edit-btn" bindtap="handleEditService">编辑</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelServicesCancel">取消</view>
<view bindtap="handelServicesConfirm">完成</view>
</view>
</block>
</block>
</view>
<view class="service-box">
......
......@@ -2,9 +2,10 @@
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import api from '../../api'
import { uploadImg, getSceneById } from '~/api/api'
import { uploadImg, getSceneById, staffPermissions } from '~/api/api'
import { setConfigInfo } from '~/store/index'
const app = getApp()
let time = null
Page({
/**
* 页面的初始数据
......@@ -12,7 +13,7 @@ Page({
data: {
IMG_URL,
detailInfo: {},
reworkVisible: true,
reworkVisible: false,
orderObj: [
{
label: '施工单编号',
......@@ -110,6 +111,10 @@ Page({
1: {
text: '已施工',
color: '#35C376'
},
2: {
text: '客户返工',
color: '#35C376'
}
},
outboundStatus: {
......@@ -122,16 +127,19 @@ Page({
color: '#35C376'
}
},
userPermissions: [], // 人员权限
userPermissions: [] // 人员权限
},
onRoute(options) {
this.setData({
queryOptions: options
}, () => {
this.getDetail()
this.getStaffPermissions()
})
this.setData(
{
queryOptions: options
},
() => {
this.getDetail()
this.getStaffPermissions()
}
)
},
/**
......@@ -139,12 +147,15 @@ Page({
*/
onLoad(options) {
if (options.id) {
this.setData({
queryOptions: options
}, () => {
this.getDetail()
this.getStaffPermissions()
})
this.setData(
{
queryOptions: options
},
() => {
this.getDetail()
this.getStaffPermissions()
}
)
}
if (options?.scene) {
this.setSceneData(options.scene)
......@@ -159,35 +170,11 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
onShow() {},
// 人员权限
getStaffPermissions() {
// 假数据开始
const res = {
code: 0,
data: [{
name: '施工确认',
code: 'SHIGONGQUEREN'
}, {
name: '完成施工',
code: 'WANCHENGSHIGONG'
}, {
name: '物料出库',
code: 'WULIAOCHUKU'
}, {
name: '审核施工单',
code: 'SHENHESHIGONGDAN'
}]
}
this.setData({
userPermissions: res.data
})
return
let { userInfo } = this.data
staffPermissions({phone: userInfo?.phone}).then(res => {
console.log(res)
staffPermissions({ phone: userInfo?.phone }).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
......@@ -234,18 +221,62 @@ Page({
})
},
setTime() {
let _this = this
let { queryOptions } = _this.data
time = setTimeout(() => {
api
.getConstructionDetail({
id: queryOptions?.id,
constructionCode: queryOptions?.constructionCode
})
.then(res => {
let { code, data, message } = res
let { detailInfo } = this.data
this.setTime()
if (code == 0) {
if (data.startTime) {
data.startTime = new Date(data.startTime).format(
'yyyy-MM-dd hh:mm:ss'
)
}
_this.setData({
'detailInfo.outboundStatus': data?.outboundStatus,
'detailInfo.startTime': detailInfo.startTime
? detailInfo.startTime
: data.startTime // 页面操作选了开始施工时间不做更新,未选择取更新后的时间(出库时间)
})
if (data.outboundStatus == 1) time && clearTimeout(time)
} else {
wx.$util.showToast(message)
}
})
}, 10 * 1000)
},
// 获取施工单详情
getDetail(toTopFlag) {
getDetail() {
let { queryOptions } = this.data
if (!queryOptions.id || !queryOptions.constructionCode) return
wx.showLoading({
title: '加载中'
})
api
.getConstructionDetail({
id: queryOptions?.id,
constructionCode: queryOptions?.constructionCode
})
.then(res => {
wx.hideLoading()
let { code, data, message } = res
let { detailInfo } = this.data
if (code == 0) {
// 未出库 轮询查订单状态,更新出库状态
if (data.outboundStatus == 0) {
this.setTime()
} else {
time && clearTimeout(time)
}
const mainTechnicianName = data?.mainTechnicianList?.find(
val => val.technicianType == 0
)?.technicianName
......@@ -271,17 +302,15 @@ Page({
'detailInfo.subTechnicianName': subTechnicianName,
'detailInfo.pictureList': data?.pictureList?.map(val => {
return val.pictureUrl
})
}),
'detailInfo.startTime': detailInfo.startTime
? detailInfo.startTime
: data.startTime // 页面操作选了开始施工时间不做更新,未选择取更新后的时间(出库时间)
},
() => {
if (data?.startTime && data?.endTime) {
this.calculateTimeDifference()
}
if (toTopFlag) {
wx.pageScrollTo({
scrollTop: 0
})
}
}
)
} else {
......@@ -351,6 +380,7 @@ Page({
// 物料出库确认
handleOutboundConfirm(e) {
let { requesting } = this.data
let { subOrderList } = e.detail
for (var i = 0; i < subOrderList.length; i++) {
if ((subOrderList[i]?.materialsUsed ?? '') === '') {
......@@ -377,6 +407,10 @@ Page({
outBoundTime: e.detail?.outBoundTime,
subOrderList: arr
}
if (requesting) return false
this.setData({
requesting: true
})
api.outboundAPI(params).then(res => {
let { code, message } = res
if (code == 0) {
......@@ -389,10 +423,16 @@ Page({
} else {
wx.$util.showToast(message)
}
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
})
},
// 客户返工
handleReworkConfirm(e) {
let { requesting } = this.data
let { subOrderList } = e.detail
for (var i = 0; i < subOrderList.length; i++) {
if ((subOrderList[i]?.materialsUsed ?? '') === '') {
......@@ -420,6 +460,10 @@ Page({
subOrderList: arr
}
let { orderCode, constructionCode } = this.data.detailInfo
if (requesting) return false
this.setData({
requesting: true
})
api.reworkAPI(params).then(res => {
let { code, data, message } = res
if (code == 0) {
......@@ -435,6 +479,11 @@ Page({
} else {
wx.$util.showToast(message)
}
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
})
},
......@@ -499,7 +548,7 @@ Page({
const minutesDiff = Math.floor(timeDiff / (1000 * 60))
// 更新数据
this.setData({
'detailInfo.constructionDuration': minutesDiff
'detailInfo.constructionDuration': `${minutesDiff}`
})
} catch (error) {
console.error('时间计算错误:', error)
......@@ -615,10 +664,30 @@ Page({
}
})
}
if (!detailInfo?.startTime || !detailInfo?.endTime)
if (!detailInfo?.startTime)
return wx.$util.showToast('请在页面中提交施工时间')
if (!detailInfo?.pictureList?.length)
return wx.$util.showToast('请在页面中提交上传施工图片')
if (!detailInfo.endTime) {
// 未选择施工结束时间取当前时间
this.setData(
{
'detailInfo.endTime': new Date().format('yyyy-MM-dd hh:mm:ss')
},
() => {
this.calculateTimeDifference() // 自动计算施工时长
this.submitData()
}
)
} else {
this.submitData()
}
},
submitData() {
let { detailInfo } = this.data
const pictureList = detailInfo?.pictureList?.map(val => {
return {
pictureUrl: val
......@@ -636,71 +705,123 @@ Page({
constructionDuration: detailInfo.constructionDuration,
pictureList: pictureList
}
wx.showLoading({
title: '加载中'
})
api
.completeConstructionOrder(params)
.then(res => {
wx.hideLoading()
let { code, message } = res
this.setData({
submitFlag: false
})
setTimeout(() => {
this.setData({
submitFlag: false
})
}, 1000)
if (code == 0) {
wx.showToast({
title: '完成施工',
icon: 'success'
wx.$router.redirectTo('repairOrderDetail', {
id: detailInfo.id,
constructionCode: detailInfo.constructionCode,
orderCode: detailInfo.orderCode
})
this.getDetail(true)
} else {
wx.$util.showToast(message)
}
}).catch(() => {
this.setData({
submitFlag: false
})
})
.catch(() => {
wx.hideLoading()
setTimeout(() => {
this.setData({
submitFlag: false
})
}, 1000)
})
},
// 审核施工单
checkOrder() {
this.setData({
reviewVisible: true
})
},
reviewEvent(type) {
let { detailInfo } = this.data
wx.showModal({
title: '审核施工单',
content: '驻店零售/区域经理可审核每笔技师施工单的施工结果',
confirmColor: '#347BFF',
confirmText: '审核通过',
cancelText: '不通过',
success(res) {
api.approvalRepairOrder({
id: detailInfo.id,
constructionCode: detailInfo.constructionCode,
approvalStatus: res.confirm ? 1 : res.cancel ? 2 : ''
}).then(result => {
let { code, message } = result
if (code == 0) {
wx.$util.showToast('')
wx.showToast({
title: '操作成功',
icon: 'success'
})
setTimeout(() => {
wx.$router.back()
}, 200)
} else {
wx.$util.showToast(message)
}
})
}
if (this.data.reviewFlag) return
this.setData({
reviewFlag: true
})
wx.showLoading({
title: '加载中'
})
api
.approvalRepairOrder({
id: detailInfo.id,
constructionCode: detailInfo.constructionCode,
approvalStatus: type
})
.then(result => {
wx.hideLoading()
this.reviewClose()
let { code, message } = result
setTimeout(() => {
this.setData({
reviewFlag: false
})
}, 1000)
if (code == 0) {
wx.$util.showToast('')
wx.showToast({
title: '操作成功',
icon: 'success'
})
setTimeout(() => {
wx.$router.back()
}, 200)
} else {
wx.$util.showToast(message)
}
})
.catch(() => {
wx.hideLoading()
setTimeout(() => {
this.setData({
reviewFlag: false
})
}, 1000)
})
},
// 审核通过
reviewConfirm() {
this.reviewEvent(1)
},
// 审核不通过
reviewCancel() {
this.reviewEvent(2)
},
// 关闭审核弹窗
reviewClose() {
this.setData({
reviewVisible: false
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
onHide() {
time && clearTimeout(time)
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
onUnload() {
time && clearTimeout(time)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
......
......@@ -2,7 +2,8 @@
"usingComponents": {
"time-select": "../../components/timeSelect/index",
"outbound-popup": "../../components/outboundPopup/index",
"rework-popup": "../../components/reworkPopup/index"
"rework-popup": "../../components/reworkPopup/index",
"review-popup": "../../components/reviewPopup/index"
},
"navigationBarTitleText": "施工单详情"
}
......@@ -14,22 +14,26 @@ page {
color: #FFFFFF;
padding: var(--fontSize48) var(--fontSize40) var(--fontSize48) var(--fontSize60);
box-sizing: border-box;
.user-info {
display: flex;
align-items: flex-end;
.hide-text {
display: -webkit-box;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.car {
font-size: var(--fontSize40);
font-weight: 600;
margin-right: var(--fontSize8);
max-width: var(--fontSize400);
image {
width: var(--fontSize40);
height: var(--fontSize40);
......@@ -37,44 +41,52 @@ page {
margin-top: var(--fontSize8);
}
}
.staff-name {
position: relative;
background: none;
max-width: var(--fontSize242);
&::before {
content: "(";
position: absolute;
left: 0;
top: 0;
}
&::after {
content: ")";
position: absolute;
right: 0;
bottom: 0;
}
.name {
padding-right: 1.2em;
text-indent: 1.2em;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 限制显示两行 */
-webkit-line-clamp: 2;
/* 限制显示两行 */
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
}
margin-bottom: var(--fontSize32);
}
.content {
display: flex;
align-items: center;
justify-content: space-between;
.tips {
font-size: var(--fontSize24);
margin-right: var(--fontSize50);
}
.btn {
flex-shrink: 0;
padding: var(--fontSize8) var(--fontSize28);
......@@ -83,6 +95,7 @@ page {
}
}
}
.box {
background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10);
......@@ -90,12 +103,14 @@ page {
padding: var(--fontSize40) var(--fontSize40) var(--fontSize2);
position: relative;
margin: var(--fontSize20) var(--fontSize20) 0;
.title {
font-size: var(--fontSize32);
color: #292D33;
margin-bottom: var(--fontSize20);
position: relative;
font-weight: 600;
&::after {
position: absolute;
content: '';
......@@ -107,38 +122,47 @@ page {
transform: translateY(-50%);
}
}
.flex {
display: flex;
align-items: center;
justify-content: space-between;
.example {
font-weight: 400;
color: #347BFF;
font-size: var(--fontSize26);
}
}
.cell {
font-size: var(--fontSize28);
color: #999EA8;
display: flex;
align-items: flex-start;
margin-bottom: var(--fontSize32);
.label {
flex-shrink: 0;
width: var(--fontSize208);
}
.value {
color: #292D33;
display: flex;
flex-flow: wrap;
align-items: center;
}
.placeholder {
color: #BEC1C7;
}
.copy,.edit {
.copy,
.edit {
color: #347BFF;
margin-left: auto;
.image {
width: var(--fontSize32);
height: var(--fontSize32);
......@@ -146,10 +170,12 @@ page {
}
}
}
.image-box {
display: flex;
flex-wrap: wrap;
margin-bottom: var(--fontSize32);
.tire-block {
width: var(--fontSize196);
height: var(--fontSize196);
......@@ -161,20 +187,25 @@ page {
text-align: center;
border-radius: var(--fontSize8);
overflow: hidden;
&:not(:nth-child(3n)) {
margin-right: var(--fontSize20);
}
&:nth-child(n+4) {
margin-top: var(--fontSize20);
}
.tire-img-box {
position: relative;
width: 100%;
height: 100%;
.tire-img {
width: 100%;
height: 100%;
}
.icon-delete {
position: absolute;
top: var(--fontSize12);
......@@ -183,29 +214,35 @@ page {
height: var(--fontSize40);
}
}
.icon-plus {
width: var(--fontSize80);
height: var(--fontSize80);
}
.plus-text {
color: #999EA8;
font-size: var(--fontSize28);
}
}
}
.service {
padding-bottom: var(--fontSize16);
.category {
padding-bottom: var(--fontSize8);
font-size: var(--fontSize28);
color: #292D33;
}
.service-item {
background: #F7F8FA;
border-radius: var(--fontSize12);
padding: var(--fontSize24);
font-size: var(--fontSize26);
margin: var(--fontSize16) calc(-1 * var(--fontSize8));
.name {
color: #EA6612;
margin-bottom: var(--fontSize12);
......@@ -216,19 +253,23 @@ page {
text-overflow: ellipsis;
word-break: break-all;
}
.bott {
display: flex;
font-size: var(--fontSize24);
color: #5A5E66;
.split {
margin: 0 var(--fontSize6);
}
}
}
.edit-item {
display: flex;
align-items: center;
image {
width: var(--fontSize32);
height: var(--fontSize32);
......@@ -237,6 +278,7 @@ page {
}
}
}
.empty-box {
width: 100%;
font-size: var(--fontSize24);
......@@ -244,27 +286,32 @@ page {
display: flex;
align-items: center;
justify-content: center;
image {
width: var(--fontSize86);
height: var(--fontSize86);
margin-right: var(--fontSize16);
}
}
.goods {
margin: 0 calc(-1 * var(--fontSize8));
font-size: var(--fontSize28);
color: #292D33;
padding-bottom: var(--fontSize32);
.goods-item {
padding: var(--fontSize24);
background: #F7F8FA;
border-radius: var(--fontSize12);
margin-bottom: var(--fontSize16);
position: relative;
.goods-name {
width: calc(100% - var(--fontSize52));
padding-left: var(--fontSize28);
}
&::after {
position: absolute;
width: var(--fontSize12);
......@@ -276,24 +323,29 @@ page {
background: #347BFF;
border-radius: 100%;
}
&:last-child {
margin-bottom: 0;
}
}
.bott {
margin-top: var(--fontSize12);
padding-left: var(--fontSize28);
font-size: var(--fontSize24);
color: #999EA8;
.split {
margin: 0 var(--fontSize6);
}
}
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.btns {
position: fixed;
left: 0;
......@@ -309,6 +361,7 @@ page {
font-weight: 500;
z-index: 99;
flex-direction: column;
.tips_box {
display: flex;
align-items: center;
......@@ -320,28 +373,33 @@ page {
font-size: var(--fontSize24);
color: #FF9D0A;
background: #FEF5E7;
.tipsIcon {
flex-shrink: 0;
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize8);
}
.contentText {
margin-right: auto;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.close-image {
width: var(--fontSize32);
height: var(--fontSize32);
}
}
.btns-con {
box-sizing: border-box;
display: flex;
padding: var(--fontSize10) 0;
width: calc(100% - var(--fontSize80));
.confirm {
border-radius: var(--fontSize12);
height: var(--fontSize80);
......
......@@ -5,7 +5,9 @@
<view class="main" style="padding-bottom: {{'var(--fontSize290)'}};">
<view class="status-box">
<view class="user-info">
<view class="car hide-text"><image wx:if="{{detailInfo.constructionStatus == 1}}" src="{{IMG_URL}}repair-order/complete.png" mode=""/>{{detailInfo.customer.carSeriesName || '无车型客户'}}</view>
<view class="car hide-text">
<image wx:if="{{detailInfo.constructionStatus != 0}}" src="{{IMG_URL}}repair-order/complete.png" mode="" />{{detailInfo.customer.carSeriesName || '无车型客户'}}
</view>
<view class="staff-name">
<text class="name">{{detailInfo.customer.customerName || '-'}}</text>
</view>
......@@ -16,13 +18,13 @@
<view class="btn text-center" wx:if="{{detailInfo.outboundStatus != 1}}" bindtap="handleOutbound">物料出库</view>
</view>
</block>
<block wx:elif="{{detailInfo.constructionStatus == 1}}">
<block wx:else>
<view class="content">
<view class="tips">
<view>完成施工,如客户返工请点击</view>
<view wx:if="{{detailInfo.approvalStatus}}">{{detailInfo.approvalName}}已审核{{detailInfo.approvalStatus == 1 ? '通过' : '不通过'}}</view>
</view>
<view class="btn text-center" bindtap="handleRedo" wx:if="{{filter.btnPermissions(userPermissions, 'WULIAOCHUKU')}}">客户返工</view>
<view class="btn text-center" bindtap="handleRedo" wx:if="{{filter.btnPermissions(userPermissions, 'WULIAOCHUKU')&&detailInfo.effectiveFlag == 0}}">客户返工</view>
</view>
</block>
</view>
......@@ -30,7 +32,7 @@
<view class="title infoTitle">
<view class="flex">施工单信息</view>
</view>
<block wx:for="{{ detailInfo.constructionStatus == 1 ? constructionOrderObj : orderObj }}" wx:key="index">
<block wx:for="{{ detailInfo.constructionStatus != 0 ? constructionOrderObj : orderObj }}" wx:key="index">
<view class="cell">
<view class="label">{{item.label}}</view>
<block wx:if="{{ item.key == 'status' }}">
......@@ -85,9 +87,9 @@
</view>
</view>
</block>
<block wx:elif="{{detailInfo.constructionStatus == 1}}">
<block wx:elif="{{detailInfo.constructionStatus != 0}}">
<view class="empty-box">
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode=""/>
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode="" />
暂无数据
</view>
</block>
......@@ -121,7 +123,7 @@
</block>
<block wx:else>
<view class="empty-box">
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode=""/>
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode="" />
暂无数据
</view>
</block>
......@@ -164,7 +166,7 @@
</view>
</view>
</view>
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{(detailInfo.constructionStatus == 0 && filter.btnPermissions(userPermissions, 'WANCHENGSHIGONG')) || (detailInfo.constructionStatus == 1 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN'))}}">
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{(detailInfo.constructionStatus == 0 && filter.btnPermissions(userPermissions, 'WANCHENGSHIGONG')) || (detailInfo.constructionStatus != 0 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN'))}}">
<!-- 未施工 技师可操作 -->
<block wx:if="{{detailInfo.constructionStatus == 0 && filter.btnPermissions(userPermissions, 'WANCHENGSHIGONG')}}">
<view class="tips_box" wx:if="{{!hideOutTips && detailInfo.outboundStatus == 0}}">
......@@ -186,7 +188,7 @@
</view>
</block>
<!-- 已施工/未审核 区域运营/驻店销售可操作 -->
<block wx:if="{{detailInfo.constructionStatus == 1 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN')}}">
<block wx:if="{{detailInfo.constructionStatus != 0 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN')}}">
<view class="btns-con">
<view class="confirm text-center" bindtap="checkOrder">审核施工单</view>
</view>
......@@ -194,13 +196,8 @@
</view>
</view>
</block>
<time-select show="{{startTimeVisible}}" title="开始施工时间" defaultTime="{{detailInfo.startTime}}" isStartTime="{{true}}" endTime="{{detailInfo.endTime}}" bind:confirm="onStartTimeConfirm" bindcancel="onClosePicker"/>
<time-select show="{{endTimeVisible}}" title="结束施工时间" defaultTime="{{detailInfo.endTime}}" isStartTime="{{false}}" startTime="{{detailInfo.startTime}}" bind:confirm="onEndTimeConfirm" bindcancel="onClosePicker" />
<outbound-popup show="{{outboundVisible}}" title="物料出库" detailInfo="{{detailInfo}}" bindcancel="handleOutboundCancel" bindconfirm="handleOutboundConfirm" userPermissions="{{userPermissions}}"></outbound-popup>
<rework-popup
show="{{ reworkVisible }}"
title="返工确认"
detailInfo="{{ detailInfo }}"
bindcancel="handleReworkCancel"
bindconfirm="handleReworkConfirm"
></rework-popup>
<time-select show="{{ startTimeVisible }}" title="开始施工时间" defaultTime="{{ detailInfo.startTime }}" isStartTime="{{ true }}" endTime="{{ detailInfo.endTime }}" bind:confirm="onStartTimeConfirm" bindcancel="onClosePicker" />
<time-select show="{{ endTimeVisible }}" title="结束施工时间" defaultTime="{{ detailInfo.endTime }}" isStartTime="{{ false }}" startTime="{{ detailInfo.startTime }}" bind:confirm="onEndTimeConfirm" bindcancel="onClosePicker" />
<outbound-popup show="{{ outboundVisible }}" title="物料出库" detailInfo="{{ detailInfo }}" bindcancel="handleOutboundCancel" bindconfirm="handleOutboundConfirm" userPermissions="{{ userPermissions }}"></outbound-popup>
<rework-popup show="{{ reworkVisible }}" title="返工确认" detailInfo="{{ detailInfo }}" bindcancel="handleReworkCancel" bindconfirm="handleReworkConfirm"></rework-popup>
<review-popup show="{{reviewVisible}}" bindcancel="reviewCancel" bindconfirm="reviewConfirm" bindclose="reviewClose"></review-popup>
\ No newline at end of file
......@@ -361,5 +361,9 @@ module.exports = {
// 根据主订单查询施工单列表
listConstruction(data) {
return api.post('dj.api.smartcarlife.construction.list.construction', data)
},
// 获取园区店下角色名包含技师员工有效列表
getQYTechnicianList(data) {
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', data)
}
}
......@@ -43,6 +43,15 @@ Component({
* 组件的方法列表
*/
methods: {
navto(e) {
let { item } = e.currentTarget.dataset
console.log(item, 'item')
let path = item.electronicFlag == 1 ? 'tabRepairOrder.repairOrderDetail' : 'tabRepairOrder.confirmWorkOrder'
wx.$router.go(path, {
...item
})
this.handleCancel()
},
selectType(e) {
let { type } = e.currentTarget.dataset
this.setData({
......@@ -78,8 +87,8 @@ Component({
show: true,
tabTitleShow: true,
tapTitle: '查看客户施工单',
success: res => {},
error: () => {}
success: res => { },
error: () => { }
},
'#modal'
)
......
<!--components/SelectInvoiceModal/SelectInvoiceModal.wxml-->
<!-- btns="{{ ['取消','确定'] }}" -->
<modal id="modal" class="modal" custom="true" btns="{{ [] }}" maskEnable="{{ false }}" tapTitle="查看客户施工单">
<view class="modatcontent">
<view wx:for="{{ constructionList }}" wx:for-item="item" wx:for-index="index" class="item" wx:key="index">
<!-- bind:tap="handleDetail" -->
<view class="itembox">
<view class="subName">{{item.subGoodsName}}</view>
<view class="part">
<view class="position">{{item.mainTechnician}}</view>
<view class="statusBox" wx:if="{{ item.constructionStatus == 0 }}">已施工</view>
<view class="statusBox wait" wx:if="{{ item.constructionStatus == 1 }}">待施工</view>
</view>
</view>
<view class="right">
<image class="arrow" src="/components/images/arrow-x.png"></image>
</view>
</view>
</view>
<view class="btnbox">
<view class="btn cancel" bind:tap="handleCancel">关闭</view>
<!-- <view class="btn confirm" bind:tap="handleConfirm">下一步</view> -->
</view>
<view class="modatcontent">
<view wx:for="{{ constructionList }}" wx:for-item="item" wx:for-index="index" class="item" wx:key="index">
<!-- bind:tap="handleDetail" -->
<view class="itembox" bind:tap="navto" data-item="{{item}}">
<view class="subName">{{item.subGoodsName}}</view>
<view class="part">
<view class="position">{{item.mainTechnician}}</view>
<view class="statusBox" wx:if="{{ item.constructionStatus == 1||item.constructionStatus ==2 }}">已施工</view>
<view class="statusBox wait" wx:if="{{ item.constructionStatus == 0 }}">待施工</view>
</view>
</view>
<view class="right">
<image class="arrow" src="/components/images/arrow-x.png"></image>
</view>
</view>
</view>
<view class="btnbox">
<view class="btn cancel" bind:tap="handleCancel">关闭</view>
<!-- <view class="btn confirm" bind:tap="handleConfirm">下一步</view> -->
</view>
</modal>
\ No newline at end of file
......@@ -29,7 +29,8 @@ Component({
data: {
// selectType: 82,
constructionList: [],
loading: false
loading: false,
first: true
},
/**
......@@ -46,15 +47,18 @@ Component({
// let {constructionList} = this.data
let { index, value } = e.currentTarget.dataset
this.setData({
first: false,
['constructionList[' + index + '].constructionFlag']: value
})
},
handleOpen() {
let { orderCode } = this.data
let { orderCode, first } = this.data
api.listSubOrder({ orderCode }).then(res => {
console.log(res.data, 'constructionList')
first = res.data.every(item => ['1', '2', 1, 2].includes(item.constructionFlag))
this.setData({
constructionList: res.data
constructionList: res.data,
first: !first
})
})
wx.$modal(
......@@ -99,7 +103,7 @@ Component({
})
})
},
error: () => {}
error: () => { }
},
'#modal'
)
......@@ -108,13 +112,60 @@ Component({
this.triggerEvent('cancel')
},
handleConfirm() {
let { constructionList, orderCode } = this.data
let { constructionList, orderCode, first, requesting } = this.data
if (constructionList.length == 0 || first) return false
if (constructionList.length > 0) {
let flag = constructionList.some(item => item.constructionFlag == 1)
let flag = constructionList.every(item => {
// console.log(item);
return ['1', '2', 1, 2].includes(item.constructionFlag)
})
// console.log(flag, 'constructionFlag');
if (!flag) {
wx.$util.showToast('请最少选择一个施工商品')
wx.$util.showToast('需要勾选全部施工商品')
return
}
// 如果全部不施工,直接调用接口
let no = constructionList.every(item => {
return item.constructionFlag == 2
})
if (no) {
const constructionInfoList = constructionList.map(val => {
return {
subOrderCode: val.subOrderCode,
upgradeGoodsId: val.upgradeGoodsId,
upgradeGoodsName: val.upgradeGoodsName,
constructionFlag: val.constructionFlag
}
})
let params = {
subOrderRelationList: constructionInfoList,
orderCode
// subOrderRelationList: []
}
if (requesting) return false
this.setData({
requesting: true
})
api.batchAdd(params).then(res => {
let { code, message } = res
if (code == 0) {
wx.$util.showToast('提交成功')
this.handleCancel()
let thisPage = wx.$router.getPageInstance()
thisPage.onRoute({ orderCode })
} else {
wx.$util.showToast(message)
}
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
})
return false
}
}
this.handleCancel()
// this.triggerEvent('confirm', constructionList)
......
......@@ -123,4 +123,8 @@
background: #347BFF;
margin-left: 24rpx;
}
.disabled {
background: #D0D2D6;
color: #FFFFFF;
}
}
\ No newline at end of file
......@@ -22,6 +22,6 @@
</view>
<view class="btnbox">
<view class="btn cancel" bind:tap="handleCancel">取消</view>
<view class="btn confirm" bind:tap="handleConfirm">下一步</view>
<view class="btn confirm {{constructionList.length == '0' || first? 'disabled' : '' }}" bind:tap="handleConfirm">下一步</view>
</view>
</modal>
\ No newline at end of file
// tabWorkOrder/components/applyRefundBtn/applyRefundBtn.js
import api from "~/api/api"
import api from '~/api/api'
Component({
/**
* 组件的属性列表
*/
properties: {
orderInfo: Object
orderInfo: Object,
showRefundBtn: Boolean,
updateFlag: Boolean
},
/**
......@@ -27,12 +28,15 @@ Component({
selectTap() {
let { orderInfo } = this.data
// 查询订单可展示按钮
api.getMoreBtnAPI({orderCode: orderInfo.orderCode}).then(res => {
api.getMoreBtnAPI({ orderCode: orderInfo.orderCode }).then(res => {
let { code, data } = res
if (code == 0) {
this.setData({
moreSelectData: this.filterMoreSelectData(data.refundApplyButton, data.refundApplyDetailButton),
showSelect: !this.data.showSelect,
moreSelectData: this.filterMoreSelectData(
data.refundApplyButton,
data.refundApplyDetailButton
),
showSelect: !this.data.showSelect
})
}
})
......@@ -41,8 +45,8 @@ Component({
filterMoreSelectData(refundApplyButton, refundApplyDetailButton) {
const allOptions = ['申请退款', '退款详情']
const conditions = {
'申请退款': refundApplyButton === 'Y',
'退款详情': refundApplyDetailButton === 'Y'
申请退款: refundApplyButton === 'Y',
退款详情: refundApplyDetailButton === 'Y'
}
return allOptions.filter(option => conditions[option])
},
......@@ -53,7 +57,13 @@ Component({
moreSelectIndex: null
})
},
tapConstruction() {
this.closeSelect()
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
sublistVisible: true
})
},
optionTap(e) {
let { index, item } = e.currentTarget.dataset
let { orderInfo } = this.data
......@@ -62,47 +72,54 @@ Component({
// 申请退款点击埋点
wx.$track.setTrackData(0, 'apply_refund_page', {}, '', 1)
// 退款申请时区域运营查询
api.areaSupervisionExistsAPI({merchantId: userInfo.shopMerchantId, sceneType: userInfo.sceneType}).then(res => {
let { code, data, message} = res
if (code == 0) {
if (!data) {
return this.setData({
areaOperationsFlag: true,
showSelect: !this.data.showSelect
})
api
.areaSupervisionExistsAPI({
merchantId: userInfo.shopMerchantId,
sceneType: userInfo.sceneType
})
.then(res => {
let { code, data, message } = res
if (code == 0) {
if (!data) {
return this.setData({
areaOperationsFlag: true,
showSelect: !this.data.showSelect
})
} else {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?orderCode=${orderInfo.orderCode}&shopMerchantName=${orderInfo.merchantName}&shopMerchantId=${orderInfo.merchantId}`
})
this.closeSelect()
}
} else {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?orderCode=${orderInfo.orderCode}&shopMerchantName=${orderInfo.merchantName}&shopMerchantId=${orderInfo.merchantId}`,
})
this.closeSelect()
return wx.$util.showToast(message)
}
} else {
return wx.$util.showToast(message)
}
})
})
} else {
// 退款详情点击埋点
wx.$track.setTrackData(0, 'refund_detail_page', {}, '', 1)
// 点击退款详情,判断是否存在多条退款申请记录,存在跳转列表页,不存在直接跳转详情页
api.getRefundDetailListAPI({orderCode: orderInfo.orderCode}).then(res => {
let { code, data } = res
if (code == 0) {
if (data?.length > 1) {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundDetailList/refundDetailList?orderCode=${orderInfo.orderCode}`,
})
} else if (data.length == 1) {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${data[0].applyCode}`,
})
api
.getRefundDetailListAPI({ orderCode: orderInfo.orderCode })
.then(res => {
let { code, data } = res
if (code == 0) {
if (data?.length > 1) {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundDetailList/refundDetailList?orderCode=${orderInfo.orderCode}`
})
} else if (data.length == 1) {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${data[0].applyCode}`
})
}
}
}
this.closeSelect()
})
this.closeSelect()
})
}
this.setData({
moreSelectIndex: index,
moreSelectIndex: index
// showSelect: !this.data.showSelect
})
},
......@@ -112,4 +129,4 @@ Component({
})
}
}
})
\ No newline at end of file
})
/* tabWorkOrder/components/applyRefundBtn/applyRefundBtn.wxss */
.select_box {
position: relative;
.select {
display: flex;
align-items: center;
}
.icon {
width: 32rpx;
height: 32rpx;
// margin-right: 7rpx;
}
.more-btn {
position: relative;
font-size: var(--fontSize28);
color: #347BFF;
font-weight: 400;
}
.option_box{
.option_box {
position: absolute;
z-index: 1005;
top: var(--fontSize60);
right: calc(-1 * var(--fontSize24));
right: calc(-1 * var(--fontSize24));
width: var(--fontSize194);
box-sizing: border-box;
background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize12) #0000000d;
border-radius: var(--fontSize16);
overflow: hidden;
.option{
.option {
display: block;
height: var(--fontSize88);
line-height: var(--fontSize88);
......@@ -28,18 +42,22 @@
font-weight: 400;
font-size: var(--fontSize28);
}
.option:first-child{
.option:first-child {
border-radius: var(--fontSize16) var(--fontSize16) 0 0;
}
.option:last-child{
.option:last-child {
border-radius: 0 0 var(--fontSize16) var(--fontSize16);
}
.option.active{
.option.active {
background: #347bff1a;
color: #347BFF;
}
}
.option_box::after{
.option_box::after {
height: 0;
width: 0;
content: '';
......@@ -52,20 +70,22 @@
transform: rotate(90deg);
filter: drop-shadow(0 var(--fontSize4) var(--fontSize8) #0000000d)
}
.option_box::before{
.option_box::before {
height: 0;
width: 0;
content: '';
position: absolute;
border: var(--fontSize14) solid transparent;
border-right: var(--fontSize14) solid #FFFFFF;
border-right: var(--fontSize14) solid #FFFFFF;
top: calc(-1 * var(--fontSize28));
left: var(--fontSize88);
z-index: 1;
transform: rotate(90deg);
filter: drop-shadow(0 var(--fontSize4) var(--fontSize8) #0000000d)
}
.mask_class{
.mask_class {
width: 100vw;
height: 100vh;
background: transparent;
......
<!--tabWorkOrder/components/applyRefundBtn/applyRefundBtn.wxml-->
<view class='select_box' >
<view class='select' catchtap='selectTap'>
<view class='more-btn'>更多</view>
</view>
<view class='option_box' wx:if="{{showSelect}}">
<view class='option {{moreSelectIndex == index ? "active" : ""}}' wx:for='{{moreSelectData}}' wx:key='this' data-index='{{index}}' data-item="{{item}}" catchtap='optionTap'>{{item}}</view>
</view>
<view class="mask_class" wx:if="{{showSelect}}" bindtap="closeSelect"></view>
<view class="select_box">
<view class="select" catchtap="selectTap">
<gl-image class="icon" src="/miniProgram/more.png"></gl-image>
<view class="more-btn">更多</view>
</view>
<view class="option_box" wx:if="{{ showSelect }}">
<view class="option" wx:if="{{ updateFlag }}" catchtap="tapConstruction">修改施工</view>
<block wx:if="{{ showRefundBtn }}">
<view
class="option {{ moreSelectIndex == index ?'active' : '' }}"
wx:for="{{ moreSelectData }}"
wx:key="this"
data-index="{{ index }}"
data-item="{{ item }}"
catchtap="optionTap"
>{{item}}</view>
</block>
</view>
<view class="mask_class" wx:if="{{ showSelect }}" bindtap="closeSelect"></view>
</view>
<area-operations-modal wx:if="{{areaOperationsFlag}}" isShow="{{areaOperationsFlag}}" bindclose="closeModal"></area-operations-modal>
\ No newline at end of file
<area-operations-modal wx:if="{{ areaOperationsFlag }}" isShow="{{ areaOperationsFlag }}" bindclose="closeModal"></area-operations-modal>
\ No newline at end of file
// tabRepairOrder/components/relateGoodsPop/index.js
Component({
/**
* 组件的属性列表
*/
......@@ -10,15 +9,18 @@ Component({
baseConfigData: Object,
show: {
type: Boolean,
observer: function(n) {
observer: function (n) {
if (n) {
let {goodsList, selected} = this.data
let { goodsList, selected } = this.data
goodsList?.map(val => {
val.active = false
if (selected?.findIndex(v => v.upgradeGoodsId == val.upgradeGoodsId) > -1) val.active = true
if (
selected?.findIndex(v => v.subOrderCode == val.subOrderCode) > -1
)
val.active = true
return val
})
this.setData({goodsList})
this.setData({ goodsList })
}
}
}
......@@ -27,9 +29,7 @@ Component({
/**
* 组件的初始数据
*/
data: {
},
data: {},
/**
* 组件的方法列表
......@@ -39,7 +39,7 @@ Component({
let { item } = e.currentTarget.dataset
let { goodsList } = this.data
goodsList?.forEach(val => {
if (val.upgradeGoodsId == item.upgradeGoodsId) val.active = !val.active
if (val.subOrderCode == item.subOrderCode) val.active = !val.active
})
this.setData({
goodsList
......@@ -55,4 +55,4 @@ Component({
this.triggerEvent('confirm', arr)
}
}
})
\ No newline at end of file
})
/* tabRepairOrder/components/relateGoodsPop/index.wxss */
.tips {
background: #FDECE9;
font-size: 28rpx;
color: #F24724;
line-height: 40rpx;
padding: 16rpx 40rpx;
margin-left: calc(-1 * var(--fontSize32));
width: 100%;
}
.goods-content {
width: calc(100% + var(--fontSize64));
height: 100%;
height: calc(100% - var(--fontSize90));
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;
......@@ -27,17 +42,22 @@
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))
width: calc(100vw - var(--fontSize100));
color: #292D33;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
......@@ -48,13 +68,21 @@
}
}
}
.selected-box {
text-align: center;
font-size: var(--fontSize28);
color: #888888;
margin-top: var(--fontSize30);
text {
color: #347BFF;
}
}
}
.nothing {
text-align: center;
margin-top: 30rpx;
}
\ No newline at end of file
<!--tabRepairOrder/components/relateGoodsPop/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="50%" bindcancel="cancel">
<popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="60%" bindcancel="cancel">
<view class="tips">
选定当前施工单的商品,未选的商品将自动创建第二笔施工单,可由不同技师负责施工
</view>
<view class="goods-content">
<scroll-view class="content" scroll-y show-scrollbar="{{false}}">
<block wx:if="{{goodsList.length > 0}}">
......
......@@ -150,7 +150,43 @@ var techicianName = function (array) {
}
return result
}
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 subStatusName = function (constructionStatus) {
console.log(constructionStatus)
switch (constructionStatus) {
case 1:
case 2:
return '已施工'
case 0:
return '待施工'
case 3:
return ''
default:
return ''
}
}
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return false
}
/*
* 导出
*/
......@@ -165,5 +201,8 @@ module.exports = {
filterOrderStatus: filterOrderStatus,
filterRefundDisabled: filterRefundDisabled,
activeNum: activeNum,
techicianName: techicianName
techicianName: techicianName,
subStatus: subStatus,
subStatusName: subStatusName,
btnPermissions: btnPermissions
}
......@@ -50,10 +50,10 @@
</view>
<view class="meal-bd-bottom">{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}
<view class="count">x{{g.number}}</view>
<view class="artificer" bindtap="selectArtificer" data-item="{{g}}">
<!-- <view class="artificer" bindtap="selectArtificer" data-item="{{g}}">
<text class="{{!g.technicianName ? 'grey_text' : ''}} 'text-hide'">{{g.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
</view> -->
</view>
</view>
</view>
......@@ -73,10 +73,10 @@
<view class="type">x{{item.number}}</view>
</view>
<!-- 太阳膜类且配置技师 不需要限制是太阳膜 && item.upgradeGoodsPosition-->
<view wx:if="{{orderInfo.isOpenArtificer }}" class="artificer" bindtap="selectArtificer" data-item="{{item}}">
<!-- <view wx:if="{{orderInfo.isOpenArtificer }}" class="artificer" bindtap="selectArtificer" data-item="{{item}}">
<text class="{{!item.technicianName ? 'grey_text' : ''}} 'text-hide'">{{item.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
</view> -->
</view>
</view>
</block>
......
// tabWorkOrder/pages/orderDetail/orderDetail.js
import api from "../../api.js";
import order_mixins, { data } from "../order_mixins.js";
import { getPositionList } from "~/store/index";
import { checkDailyReport } from "~/store/ModalToQueueControl";
import api from '../../api.js'
import order_mixins, { data } from '../order_mixins.js'
import { getPositionList } from '~/store/index'
import { checkDailyReport } from '~/store/ModalToQueueControl'
import commonApi from '~/api/api'
const IMG_URL =
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/";
const app = getApp();
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const app = getApp()
Page({
/**
* 页面的初始数据
......@@ -20,11 +20,11 @@ Page({
qrHeight: 107,
isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff,
customerService: "",
customerService: '',
defaultCustomerService:
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/kf.png",
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/kf.png',
// defaultCustomerService: 'https://img01.glsx.com.cn/group1/M00/21/01/wKgFHWKEkeSAZRltAAED5CfS91o118.png',
failCustomerService: "../images/kfrefresh.png",
failCustomerService: '../images/kfrefresh.png',
showTip: false,
warrantyCardVisible: true,
showRatingPopup: false,
......@@ -34,24 +34,30 @@ Page({
// 发票按钮
invoiceName: '申请开票',
invoiveVisible: false,
showMoreBtn: false
showMoreBtn: false,
constructionVisible: false
},
constructionCancel() {
this.setData({
constructionVisible: false
})
},
RatingPopupSetting() {
this.setData({
showRatingPopup: !this.data.showRatingPopup,
});
showRatingPopup: !this.data.showRatingPopup
})
// 更新数据
this.getOrderDetail(this.data.orderInfo.orderCode)
},
jumpUserPortrait() {
wx.$router.go("tabDate.userPortrait", this.data.orderInfo);
wx.$router.go('tabDate.userPortrait', this.data.orderInfo)
},
selectTypeOrder(e) {
let { type } = e.currentTarget.dataset;
console.log(e, e.currentTarget.dataset, type);
let { type } = e.currentTarget.dataset
console.log(e, e.currentTarget.dataset, type)
this.setData({
selectTypeOrder: type,
});
selectTypeOrder: type
})
},
blur(e) {
console.log(e)
......@@ -69,7 +75,7 @@ Page({
},
// 确定是否要显示
showWarranty(e) {
let { item } = e.currentTarget.dataset;
let { item } = e.currentTarget.dataset
this.setData({
warrantyEditObj: item,
focus: true
......@@ -80,14 +86,15 @@ Page({
show: true,
title: '',
tabTitleShow: false,
success: (res) => {
success: res => {
let { orderCode } = this.data
api.modifyWarrantyPrice({ ...this.data.warrantyEditObj }).then((result) => {
wx.$util.showToast('更新成功')
this.getOrderDetail(orderCode);
}).catch((err) => {
});
api
.modifyWarrantyPrice({ ...this.data.warrantyEditObj })
.then(result => {
wx.$util.showToast('更新成功')
this.getOrderDetail(orderCode)
})
.catch(err => {})
// 跳转新增订单页面 并带特定参数
// let { selectType } = this.data;
// if (selectType == 1) {
......@@ -102,23 +109,23 @@ Page({
// });
// }
},
error: () => { },
error: () => {}
},
"#modal4"
);
'#modal4'
)
},
// 确定是否要显示
showSelectTypeOrder({ scene = "", item = {} }) {
showSelectTypeOrder({ scene = '', item = {} }) {
wx.$modal(
this,
{
show: true,
title: "请选择录单入口",
title: '请选择录单入口',
tabTitleShow: false,
success: (res) => {
success: res => {
// 跳转新增订单页面 并带特定参数
let { selectTypeOrder } = this.data;
console.log(item, "showSelectType");
let { selectTypeOrder } = this.data
console.log(item, 'showSelectType')
// if (orderInfo?.selectPayType == 0) { // 解决战败进新建工单导致查询战败商品的问题
// orderInfo.selectPayType = 2
// }
......@@ -126,41 +133,41 @@ Page({
this.setData({ showPromptDialog: true })
} else {
let orderInfo = this.deleteOrderInfo()
wx.$router.go("tabWorkOrder.defeatOrder", {
wx.$router.go('tabWorkOrder.defeatOrder', {
scene,
...orderInfo,
});
...orderInfo
})
}
},
error: () => { },
error: () => {}
},
"#modal3"
);
'#modal3'
)
},
deleteOrderInfo() {
let { orderInfo } = this.data;
let { orderInfo } = this.data
let copyOrderInfo = wx.$util.deepClone(orderInfo)
copyOrderInfo.orderSource = 4
let deleteList = [
"orderCode",
"associateOrderCode",
"packageGoodsList",
"merchantDistributionList",
"expenseCategoryList",
"profitAllocatinList",
"clientSignatureDTOList",
"customerPhotos",
"rating",
"sellerName",
"sellerUserId",
"sellerMerchantName",
"sellerMerchantId",
"subOrderList",
"technicianList",
"merchantExpenseDistributionList",
];
'orderCode',
'associateOrderCode',
'packageGoodsList',
'merchantDistributionList',
'expenseCategoryList',
'profitAllocatinList',
'clientSignatureDTOList',
'customerPhotos',
'rating',
'sellerName',
'sellerUserId',
'sellerMerchantName',
'sellerMerchantId',
'subOrderList',
'technicianList',
'merchantExpenseDistributionList'
]
for (var i = 0; i < deleteList.length; i++) {
copyOrderInfo[deleteList[i]] && delete copyOrderInfo[deleteList[i]];
copyOrderInfo[deleteList[i]] && delete copyOrderInfo[deleteList[i]]
}
copyOrderInfo.againOrder = true
return copyOrderInfo
......@@ -186,66 +193,66 @@ Page({
},
// 跳转正确订单
redirectOrder() {
let { orderInfo } = this.data;
let _this = this;
wx.$util.showLoading("加载中...");
let { orderInfo } = this.data
let _this = this
wx.$util.showLoading('加载中...')
api
.getOrderDetail({
orderCode: orderInfo.associatedOrderCode,
orderCode: orderInfo.associatedOrderCode
})
.then((result) => {
.then(result => {
// 根据不同状态和施工标志做对应跳转
let { code, data: item } = result;
let { code, data: item } = result
if (code == 0) {
item.oldOrderCode = orderInfo.associatedOrderCode;
item.oldOrderCode = orderInfo.associatedOrderCode
let name =
item.status == 3
? "confirmOrder"
? 'confirmOrder'
: item.status == 1
? "createOrder"
: "orderDetail";
if (item.constructionFlag == "Y" && item.status != 10) {
wx.$router.go("constructionOrderDetail", item);
? 'createOrder'
: 'orderDetail'
if (item.constructionFlag == 'Y' && item.status != 10) {
wx.$router.go('constructionOrderDetail', item)
} else {
// console.log(item)
// 解决错单能切换支付方式的问题
// wx.$router.go(name, { ...item, associateOrderType: true })
wx.$router.go(name, { ...item });
wx.$router.go(name, { ...item })
}
}
})
.catch((err) => {
console.log(err);
});
.catch(err => {
console.log(err)
})
// wx.$router.redirectTo('constructionOrderDetail', { orderCode: orderInfo.associatedOrderCode })
},
targetOperate() {
let { showTip } = this.data;
let { showTip } = this.data
this.setData({
showTip: !showTip,
});
showTip: !showTip
})
},
selectType(e) {
let { type } = e.currentTarget.dataset;
console.log(e, e.currentTarget.dataset, type);
let { type } = e.currentTarget.dataset
console.log(e, e.currentTarget.dataset, type)
this.setData({
selectType: type,
});
selectType: type
})
},
// 确定是否要显示
async targetError() {
// 校验是否填写昨日日报
let staffCheck = await checkDailyReport();
if (staffCheck) return false;
let staffCheck = await checkDailyReport()
if (staffCheck) return false
wx.$modal(this, {
show: true,
title: "工单标记",
title: '工单标记',
tabTitleShow: false,
success: (res) => {
this.showErrorType();
success: res => {
this.showErrorType()
},
error: () => { },
});
error: () => {}
})
},
// 确定是否要显示
showErrorType() {
......@@ -253,131 +260,196 @@ Page({
this,
{
show: true,
title: "请选择录单入口",
title: '请选择录单入口',
tabTitleShow: false,
success: (res) => {
success: res => {
// 跳转新增订单页面 并带特定参数
let { orderInfo, selectType } = this.data;
let { orderInfo, selectType } = this.data
console.log(orderInfo)
if (selectType == 1) {
orderInfo.associateOrderCode = orderInfo.orderCode;
delete orderInfo.orderCode;
orderInfo.associateOrderCode = orderInfo.orderCode
delete orderInfo.orderCode
if (orderInfo.technicianList) {
delete orderInfo.technicianList;
delete orderInfo.technicianList
}
orderInfo.selectPayType = 2;
let urlName = "createOrder";
wx.$router.redirectTo(urlName, orderInfo);
orderInfo.selectPayType = 2
let urlName = 'createOrder'
wx.$router.redirectTo(urlName, orderInfo)
} else {
// 无需补录
api
.noNeedSupplementOrder({ oldOrderCode: orderInfo.orderCode })
.then((res) => {
console.log(res);
.then(res => {
console.log(res)
if (res.code == 0) {
wx.$util.refreshPageData();
wx.$util.refreshPageData()
wx.$router.go("pages.index");
wx.$router.go('pages.index')
this.setData({
modalShow: false,
});
wx.$modal(this, { show: false }, "#modal2");
modalShow: false
})
wx.$modal(this, { show: false }, '#modal2')
} else {
wx.$util.showToast(res.message);
wx.$util.showToast(res.message)
}
})
.catch((err) => {
console.log(err);
});
.catch(err => {
console.log(err)
})
}
},
error: () => { },
error: () => {}
},
"#modal2"
);
'#modal2'
)
},
// 选择技师确认
changeArtificer(e) {
let value = e?.detail || {};
let { orderInfo } = this.data;
orderInfo?.subOrderList?.forEach((val) => {
let value = e?.detail || {}
let { orderInfo } = this.data
orderInfo?.subOrderList?.forEach(val => {
if (val.subOrderCode == value?.subOrderCode) {
val.technicianName = value.technicianName;
val.technicianUuid = value.technicianUuid;
val.technicianId = value.technicianId;
val.technicianName = value.technicianName
val.technicianUuid = value.technicianUuid
val.technicianId = value.technicianId
}
});
})
let params = {
orderCode: orderInfo?.orderCode,
subOrderCode: value?.subOrderCode,
technicianName: value?.technicianName,
technicianUuid: value?.technicianUuid,
technicianId: value?.technicianId,
};
api.updateTechnicianInfo(params).then((res) => {
let { code, message } = res;
technicianId: value?.technicianId
}
api.updateTechnicianInfo(params).then(res => {
let { code, message } = res
if (code == 0) {
this.setData({
artificerSelectPopup: false,
artificerSelectObj: value,
orderInfo,
});
orderInfo
})
} else {
wx.$util.showToast(message);
wx.$util.showToast(message)
}
});
})
},
// 选择技师
selectArtificer(e) {
// 已施工完成不可操作
return;
let { item } = e.currentTarget.dataset;
return
let { item } = e.currentTarget.dataset
this.setData({
artificerSelectPopup: true,
artificerSelectObj: item,
});
artificerSelectObj: item
})
},
jumpUpdate() {
let { orderInfo } = this.data;
wx.$router.go("updateOrderInfo", orderInfo);
let { orderInfo } = this.data
wx.$router.go('updateOrderInfo', orderInfo)
},
async againOrder() {
// 校验是否填写昨日日报
let staffCheck = await checkDailyReport();
if (staffCheck) return false;
let staffCheck = await checkDailyReport()
if (staffCheck) return false
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
// 新增订单
this.showSelectTypeOrder(4);
this.showSelectTypeOrder(4)
},
showAgain() {
this.setData({
showPopup: true,
});
showPopup: true
})
},
showModal(e) {
let { btnname } = e.currentTarget.dataset
console.log(e, btnname)
this.setData({
[btnname]: true
})
},
setCopyData(e) {
let { content } = e.currentTarget.dataset;
console.log(e, "e");
wx.$util.setCopyData(`${content}`);
let { content } = e.currentTarget.dataset
console.log(e, 'e')
wx.$util.setCopyData(`${content}`)
},
makePhoneCall(e) {
let { data } = e.currentTarget.dataset;
let { data } = e.currentTarget.dataset
wx.makePhoneCall({
phoneNumber: data,
});
phoneNumber: data
})
},
sublistCancel() {
this.setData({
sublistVisible: false
})
},
// 获取人员权限
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)
}
})
},
showFlag(orderCode) {
const confirmFlagObj = {
0: {
showBtn: false
},
1: {
showBtn: '确认订单是否施工',
btnName: 'sublistVisible'
},
2: {
showBtn: '查看施工单',
btnName: 'constructionVisible'
}
}
//confirmFlag 确认施工单按钮:0-隐藏,1-展示确认按钮,2-展示查询按钮
// 用策略模式处理不同值会有不同展示和操作
api
.showFlag({
orderCode
})
.then(res => {
console.log(res)
let { code, message, data } = res
console.log('showFlag', res)
if (code == 0) {
this.setData({
confirmFlagObj: confirmFlagObj[data.confirmFlag],
updateFlag: data.updateFlag
})
}
})
.catch(err => {
console.log(err)
})
},
onRoute(options) {
// wx.$router.go("pages.index");
console.log(options);
console.log(options)
let {orderCode} = this.data
options.orderCode = options.orderCode || orderCode
// options.orderCode = '250908213534979'
if (options.orderCode) {
this.setData({
orderCode: options.orderCode,
});
this.getOrderDetail(options.orderCode);
orderCode: options.orderCode
})
this.getOrderDetail(options.orderCode)
this.showFlag(options.orderCode)
// this.getGrass(options.orderCode)
}
},
......@@ -385,75 +457,88 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options);
console.log(options)
// debugger
// options.orderCode = '250908213534979'
if (options.orderCode) {
this.getOrderDetail(options.orderCode);
this.getOrderDetail(options.orderCode)
this.showFlag(options.orderCode)
}
let userInfo = wx.$util.getUserInfo();
let o = wx.$util.getStorageSync("dj_boutique_user_info");
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig);
let userInfo = wx.$util.getUserInfo()
let o = wx.$util.getStorageSync('dj_boutique_user_info')
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
this.getStaffPermissions()
this.setData({
userInfo: o,
isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff,
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
)
})
},
checkPhoneShow(config) {
console.log("config", config);
console.log('config', config)
// 有就屏蔽手机号的显示
if (config) {
let { customerObj } = this.data;
delete customerObj[2];
let { customerObj } = this.data
delete customerObj[2]
this.setData({
customerObj,
});
customerObj
})
}
},
async getOrderDetail(orderCode) {
let _this = this;
const positionTypeList = (await getPositionList()) || [];
wx.$util.showLoading("加载中...");
let _this = this
const positionTypeList = (await getPositionList()) || []
wx.$util.showLoading('加载中...')
api
.getPackageGoodsDetail({
orderCode,
orderCode
})
.then((res) => {
let { code, message, data } = res;
.then(res => {
let { code, message, data } = res
if (code == 0) {
wx.$util.hideLoading();
if (data.selectPayType != 2 && (data.status == 4 || data.status == 6 || data.status == 12)) {
wx.$util.hideLoading()
if (
data.selectPayType != 2 &&
(data.status == 4 || data.status == 6 || data.status == 12)
) {
// 查询订单可展示按钮
commonApi.getMoreBtnAPI({ orderCode: data.orderCode }).then(res => {
let { code, data } = res
if (code == 0) {
this.setData({
showMoreBtn: data.refundApplyButton == "Y" || data.refundApplyDetailButton == 'Y'
showMoreBtn:
data.refundApplyButton == 'Y' ||
data.refundApplyDetailButton == 'Y'
})
}
})
}
let couponName = data.customerCoupon
? data.customerCoupon.couponName
: "";
let total_price = 0;
let warrantyCardList = [];
: ''
let total_price = 0
let warrantyCardList = []
data.subOrderList = data.subOrderList.filter(
(item) => item.merchantGoodsId
);
item => item.merchantGoodsId
)
for (var i = 0; i < data?.subOrderList?.length; i++) {
let e = data?.subOrderList[i];
total_price += e.totalPrice;
let e = data?.subOrderList[i]
total_price += e.totalPrice
e.price = Number(
wx.$util.decimal(Number(e.totalPrice / e.number), 2)
).toFixed(2);
).toFixed(2)
e.positionStr =
positionTypeList.filter(
(v) => v.positionValue == e.upgradeGoodsPosition
)[0]?.positionName || "";
v => v.positionValue == e.upgradeGoodsPosition
)[0]?.positionName || ''
if (
(e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) &&
data.selectPayType != 0
......@@ -463,31 +548,31 @@ Page({
goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName,
cardCode: e.cardCode,
warrantyPrice: e.warrantyPrice
});
})
}
}
data?.packageGoodsList &&
data.packageGoodsList.forEach((item) => {
item.packageGoodsOrderList.forEach((g) => {
data.packageGoodsList.forEach(item => {
item.packageGoodsOrderList.forEach(g => {
g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice;
});
item.goodsList = item.packageGoodsOrderList;
: g.upgradePrice
})
item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number);
}, 0);
item.count = item.goodsList.length ? item.goodsList[0].number : 1;
let total = item.price * item.count;
item.totalPrice = wx.$util.decimal(total, 2);
item.packageGoodsOrderList.forEach((g) => {
return prev + Number(cur.totalPrice) / Number(cur.number)
}, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1
let total = item.price * item.count
item.totalPrice = wx.$util.decimal(total, 2)
item.packageGoodsOrderList.forEach(g => {
g.positionStr =
positionTypeList.filter(
(v) => v.positionValue == g.upgradeGoodsPosition
)[0]?.positionName || "";
});
total_price += item.totalPrice;
});
v => v.positionValue == g.upgradeGoodsPosition
)[0]?.positionName || ''
})
total_price += item.totalPrice
})
data = {
...data.customer,
...data.payOrder,
......@@ -497,64 +582,65 @@ Page({
total_price:
data.selectPayType == 0
? 0
: Number(wx.$util.decimal(total_price, 2)).toFixed(2),
};
: Number(wx.$util.decimal(total_price, 2)).toFixed(2)
}
if (data.customerCoupon) {
data.customerCoupon.customerCouponCode =
data.customerCoupon.customerCouponCode.split("-")[0];
data.customerCoupon.customerCouponCode.split('-')[0]
}
if (data.orderTime)
data.time = new Date(data.orderTime).format("yyyy-MM-dd hh:mm:ss");
data.time = new Date(data.orderTime).format('yyyy-MM-dd hh:mm:ss')
if (data.customer && data.customer.carSeriesName) {
data.carType = `${data.customer.carBrand || ""}-${data.customer.carChildsBrandName || ""
}-${data.customer.carSeriesName || ""}`;
data.carType = `${data.customer.carBrand || ''}-${
data.customer.carChildsBrandName || ''
}-${data.customer.carSeriesName || ''}`
}
// 处理订单是否显示 操作按钮 支付方式为pos和微信 并且订单状态是 4和6
// data.failureFlag != 'Y'
data.canOperate =
[1, 3, 4].includes(data.selectPayType) &&
[4, 6].includes(data.status);
const orderInfo = data;
console.log(orderInfo);
[4, 6].includes(data.status)
const orderInfo = data
console.log(orderInfo)
const clientSignatureDTOList =
orderInfo.clientSignatureDTOList?.[0] || [];
console.log(clientSignatureDTOList);
orderInfo.clientSignatureDTOList?.[0] || []
console.log(clientSignatureDTOList)
const showRatingCard =
[6, 4, 2].includes(orderInfo.status) &&
orderInfo.selectPayType != 0 &&
!clientSignatureDTOList.electronicSignature;
!clientSignatureDTOList.electronicSignature
this.setData({
orderInfo: { ...clientSignatureDTOList, ...data },
flag: true,
warrantyCardList,
showRatingCard,
invoiceName: data.invoiceStatus == 2 ? '查看发票' : '申请开票'
});
this.setQrBoxHeight();
})
this.setQrBoxHeight()
// 超时关闭的不显示客服码和
data.status != 10 && this.getWorkWechatLiveQRCode();
data.status != 10 && this.getWorkWechatLiveQRCode()
// 已评价的就不再显示评价码 战败也不显示
data.status != 6 && data.selectPayType != 0 && this.getQrCode(data);
data.status != 6 && data.selectPayType != 0 && this.getQrCode(data)
// 条形码
warrantyCardList.length && this.getBarCode();
this.getServiceBaseInfo(data.merchantId);
warrantyCardList.length && this.getBarCode()
this.getServiceBaseInfo(data.merchantId)
// if (data.status == 6) return
// 校验是否显示二级流量方
if (data.subShopMerchantName) {
let { customerObj } = this.data;
let { customerObj } = this.data
if (
customerObj.findIndex(
(val) => val?.key && val.key == "subShopMerchantName"
val => val?.key && val.key == 'subShopMerchantName'
) < 0
) {
customerObj[customerObj.length - 2] = {
label: "二级流量方",
key: "subShopMerchantName",
};
label: '二级流量方',
key: 'subShopMerchantName'
}
}
this.setData({
customerObj,
});
customerObj
})
}
// 门店是否配置技师
// if (data?.technicianConfigDTOList?.length > 0) {
......@@ -573,65 +659,65 @@ Page({
// });
} else {
wx.showModal({
title: "温馨提示",
title: '温馨提示',
content: message,
showCancel: false,
confirmText: "刷新",
confirmColor: "#347BFF",
confirmText: '刷新',
confirmColor: '#347BFF',
success(res) {
if (res.confirm) {
_this.getOrderDetail(orderCode);
_this.getOrderDetail(orderCode)
}
},
});
}
})
}
});
})
},
async getPackageGoodsDetail(orderCode) {
try {
let params = {
orderCode,
};
let { total_price } = this.data.orderInfo;
const positionTypeList = (await getPositionList()) || [];
api.getPackageGoodsDetail(params).then((res) => {
res.data.packageGoodsList.forEach((item) => {
item.packageGoodsOrderList.forEach((g) => {
orderCode
}
let { total_price } = this.data.orderInfo
const positionTypeList = (await getPositionList()) || []
api.getPackageGoodsDetail(params).then(res => {
res.data.packageGoodsList.forEach(item => {
item.packageGoodsOrderList.forEach(g => {
g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice;
});
item.goodsList = item.packageGoodsOrderList;
: g.upgradePrice
})
item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number);
}, 0);
item.count = item.goodsList.length ? item.goodsList[0].number : 1;
let total = item.price * item.count;
item.totalPrice = wx.$util.decimal(total, 2);
item.packageGoodsOrderList.forEach((g) => {
return prev + Number(cur.totalPrice) / Number(cur.number)
}, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1
let total = item.price * item.count
item.totalPrice = wx.$util.decimal(total, 2)
item.packageGoodsOrderList.forEach(g => {
g.positionStr =
positionTypeList.filter(
(v) => v.positionValue == g.upgradeGoodsPosition
)[0]?.positionName || "";
});
total_price = Number(total_price) + Number(item.totalPrice);
});
v => v.positionValue == g.upgradeGoodsPosition
)[0]?.positionName || ''
})
total_price = Number(total_price) + Number(item.totalPrice)
})
if (res.code == 0) {
this.setData({
packageGoodsList: res.data.packageGoodsList,
"orderInfo.total_price": Number(
'orderInfo.total_price': Number(
wx.$util.decimal(total_price, 2)
).toFixed(2),
});
).toFixed(2)
})
}
});
} catch (err) { }
})
} catch (err) {}
},
isArtificer(data) {
let { customerObj, orderInfo } = this.data;
orderInfo.isOpenArtificer = true;
orderInfo.technicianList = data || []; // 技师数据
let { customerObj, orderInfo } = this.data
orderInfo.isOpenArtificer = true
orderInfo.technicianList = data || [] // 技师数据
// if (customerObj.findIndex(val => val?.key && val.key == 'technicianName') < 0) {
// customerObj[customerObj.length] = {
// label: '选择技师:',
......@@ -641,126 +727,126 @@ Page({
this.setData({
artificerList: data,
customerObj,
orderInfo,
});
orderInfo
})
},
getBarCode() {
// warrantyCardList
let that = this;
let { warrantyCardList } = this.data;
let that = this
let { warrantyCardList } = this.data
warrantyCardList.forEach((element, index) => {
setTimeout(() => {
// console.log(data.now())
api
.createBarCode({ content: element.cardCode })
.then((result) => {
.then(result => {
// console.log(index)
// console.log(element.cardCode)
// console.log(result)
let { code, data } = result;
let { code, data } = result
// 待优化 应该都有之后再一次性更新
// warrantyCardList[index].barCodeUrl = 'http://qcimg01.glsx.com.cn:7060/group1/M00/02/96/wKgD3mNXkD-ALMu3AAABmn9Id4c794.png'
if (code == 0) {
warrantyCardList[index].barCodeUrl = data;
warrantyCardList[index].barCodeUrl = data
}
that.setData({
warrantyCardList,
});
warrantyCardList
})
})
.catch((err) => { });
}, 500 * index);
});
.catch(err => {})
}, 500 * index)
})
},
getServiceBaseInfo(merchantId) {
api.getServiceBaseInfo({ merchantId }).then((result) => {
console.log(result, "result");
let { data, code } = result;
console.log(data);
api.getServiceBaseInfo({ merchantId }).then(result => {
console.log(result, 'result')
let { data, code } = result
console.log(data)
if (data.cardCodeFlag && data.cardCodeFlag == 1) {
this.setData({
warrantyCardVisible: false,
});
warrantyCardVisible: false
})
}
});
})
},
setQrBoxHeight() {
const { orderInfo } = this.data;
let statusList = [2, 4, 6];
const { orderInfo } = this.data
let statusList = [2, 4, 6]
if (statusList.includes(orderInfo.status) && orderInfo.selectPayType != 0) {
wx.$util.getViewInfo("#qr-view", () => {
wx.$util.getViewInfo('#qr-view', () => {
this.setData({
// qrHeight: height,
qrFlag: true,
});
});
qrFlag: true
})
})
}
},
showQrBox() {
this.setData({
qrFlag: !this.data.qrFlag,
});
qrFlag: !this.data.qrFlag
})
},
getQrCode() {
// console.log('getQrcode')
let data = this.data.orderInfo;
let appId = "wx06d1198e751435d1";
let data = this.data.orderInfo
let appId = 'wx06d1198e751435d1'
let path =
"packagePersonal/pages/boutiquePages/boutiqueInstall/boutiqueInstall";
let scene = `orderCode=${data.orderCode}&merchantId=${data.merchantId}`;
'packagePersonal/pages/boutiquePages/boutiqueInstall/boutiqueInstall'
let scene = `orderCode=${data.orderCode}&merchantId=${data.merchantId}`
// B端小程序调用接口生成领券码时,传参userId用uuid,类型由int变string
api
.createWeappQrcode({
qrcodeType: "QR_WXA_UNLIMIT",
qrcodeType: 'QR_WXA_UNLIMIT',
appId,
channelType: 1,
path,
scene,
scene
})
.then((qr) => {
.then(qr => {
if (qr.data) {
this.setData({
qr: qr.data,
});
qr: qr.data
})
}
this.setData({
qrFlag: true,
});
});
qrFlag: true
})
})
},
keepGoing(type) {
let { orderInfo } = this.data;
orderInfo.orderSource = type;
let { orderInfo } = this.data
orderInfo.orderSource = type
// delete orderInfo.orderCode
// 去除掉错误订单对应的关联码
// delete orderInfo.associateOrderCode
// 1031车膜下单版本 再次下单去掉商品信息 需重新选择
let deleteList = [
"orderCode",
"associateOrderCode",
"packageGoodsList",
"merchantDistributionList",
"expenseCategoryList",
"profitAllocatinList",
"clientSignatureDTOList",
"customerPhotos",
"rating",
"sellerName",
"sellerUserId",
"sellerMerchantName",
"sellerMerchantId",
"subOrderList",
"technicianList",
"merchantExpenseDistributionList",
];
'orderCode',
'associateOrderCode',
'packageGoodsList',
'merchantDistributionList',
'expenseCategoryList',
'profitAllocatinList',
'clientSignatureDTOList',
'customerPhotos',
'rating',
'sellerName',
'sellerUserId',
'sellerMerchantName',
'sellerMerchantId',
'subOrderList',
'technicianList',
'merchantExpenseDistributionList'
]
for (var i = 0; i < deleteList.length; i++) {
// console.log(arr[i])
orderInfo[deleteList[i]] && delete orderInfo[deleteList[i]];
orderInfo[deleteList[i]] && delete orderInfo[deleteList[i]]
}
orderInfo.againOrder = true;
orderInfo.againOrder = true
// console.log(orderInfo);
// return
wx.$router.redirectTo("createOrder", orderInfo);
wx.$router.redirectTo('createOrder', orderInfo)
// merchantDistributionList,expenseCategoryList,profitAllocatinList
},
// previewImage(e) {
......@@ -784,43 +870,43 @@ Page({
// },
getWorkWechatLiveQRCode() {
this.setData({
customerService: "",
});
customerService: ''
})
// setTimeout(() => {
let { failCustomerService, defaultCustomerService } = this.data;
let { failCustomerService, defaultCustomerService } = this.data
let {
orderCode,
customerPhone: phoneNumber,
selectPayType,
} = this.data.orderInfo;
selectPayType
} = this.data.orderInfo
// console.log(orderCode, phoneNumber, selectPayType)
// 订单状态 1-升级订单 2-战败订单
let orderType = selectPayType == 0 ? 2 : 1;
let orderType = selectPayType == 0 ? 2 : 1
api
.getWorkWechatLiveQRCode({ orderCode, phoneNumber, orderType })
.then((result) => {
let { code, data: url, message } = result;
console.log(url);
.then(result => {
let { code, data: url, message } = result
console.log(url)
if (code == 0 && url) {
this.setData({
customerService: url,
});
customerService: url
})
} else {
// console.log(defaultCustomerService)
this.setData({
customerService: defaultCustomerService,
});
customerService: defaultCustomerService
})
}
// else {
// wx.$util.showToast(message)
// }
})
.catch((err) => {
.catch(err => {
// console.log(err)
this.setData({
customerService: failCustomerService,
});
});
customerService: failCustomerService
})
})
// }, 3000)
},
......@@ -841,72 +927,77 @@ Page({
orderCode: orderInfo.orderCode
}
wx.$util.showLoading()
commonApi.getOrderCode(params).then(res => {
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
// 开票成功、开票失败
wx.$router.go("tabWorkOrder.invoiceResult", {
obj: {
// code - 0000:成功;其他:失败
code: invoiceInfo.code,
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceIssueQrcode.createdDate,
imgUrl: invoiceInfo.imgUrl,
msg: invoiceInfo.msg
}
})
} else {
/**
* 未开发票
* invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。
* */
!invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", {
obj: invoiceIssueQrcode
})
}
}).finally(() => {
wx.$util.hideLoading()
})
commonApi
.getOrderCode(params)
.then(res => {
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
// 开票成功、开票失败
wx.$router.go('tabWorkOrder.invoiceResult', {
obj: {
// code - 0000:成功;其他:失败
code: invoiceInfo.code,
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceIssueQrcode.createdDate,
imgUrl: invoiceInfo.imgUrl,
msg: invoiceInfo.msg
}
})
} else {
/**
* 未开发票
* invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。
* */
!invoiceIssueQrcode
? this.handleSelectInvoice()
: wx.$router.go('tabWorkOrder.invoiceCode', {
obj: invoiceIssueQrcode
})
}
})
.finally(() => {
wx.$util.hideLoading()
})
},
previewImage(e) {
let { url, index } = e.currentTarget.dataset;
let urlList = url.map((v) => {
return v.payVoucher;
});
let { url, index } = e.currentTarget.dataset
let urlList = url.map(v => {
return v.payVoucher
})
wx.previewImage({
urls: urlList,
current: urlList[index],
});
current: urlList[index]
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () { },
onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function (options) {
console.log(this.data);
let code = this.data.orderCode || "";
const selectInvoiceObj = getApp().globalData.selectInvoiceObj;
console.log(this.data)
let code = this.data.orderCode || ''
const selectInvoiceObj = getApp().globalData.selectInvoiceObj
if (selectInvoiceObj?.isOpen) {
this.handleSelectInvoice()
}
delete getApp().globalData?.selectInvoiceObj; // 使用后清除
delete getApp().globalData?.selectInvoiceObj // 使用后清除
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () { },
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () { },
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
......@@ -921,5 +1012,5 @@ Page({
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () { },
});
onReachBottom: function () {}
})
......@@ -6,6 +6,7 @@
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal",
"apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn",
"order-prompt-popup": "/components/orderPromptPop/orderPromptPop",
"ConstructionDetailModal": "/tabWorkOrder/components/ConstructionDetailModal/ConstructionDetailModal"
"ConstructionDetailModal": "/tabWorkOrder/components/ConstructionDetailModal/ConstructionDetailModal",
"sublist-modal": "/tabWorkOrder/components/SublistModal/SublistModal"
}
}
......@@ -4,7 +4,8 @@ page {
}
.main {
padding-bottom: var(--fontSize160);
padding-bottom: var(--fontSize210);
overflow: scroll;
}
.status-box {
......@@ -236,17 +237,43 @@ page {
font-size: var(--fontSize24);
}
.constructionFlaged {
width: var(--fontSize62);
height: var(--fontSize26);
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize18);
color: #35C376;
border: 1px solid #35C376;
line-height: var(--fontSize26);
text-align: center;
border-radius: var(--fontSize4);
}
.constructionFlaging {
width: var(--fontSize62);
height: var(--fontSize26);
line-height: var(--fontSize26);
text-align: center;
border: 1px solid #FF9D0A;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 18rpx;
color: #FF9D0A;
border-radius: var(--fontSize4);
}
.artificer {
height: var(--fontSize48);
background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3;
border-radius: var(--fontSize26);
display: flex;
align-items: center;
justify-content: center;
padding: 0 var(--fontSize24);
color: #292D33;
font-size: var(--fontSize24);
// height: var(--fontSize48);
// background: #FFFFFF;
// border: var(--fontSize1) solid #DEE0E3;
// border-radius: var(--fontSize26);
// display: flex;
// align-items: center;
// justify-content: center;
// padding: 0 var(--fontSize24);
// color: #292D33;
// font-size: var(--fontSize24);
margin-left: auto;
}
......@@ -436,8 +463,9 @@ page {
.isFullSucreen {
padding-bottom: var(--fontSize228) !important;
page .isFullSucreen {
box-sizing: border-box;
padding-bottom: var(--fontSize310) !important;
}
.isFullSucreen-btn {
......@@ -731,8 +759,17 @@ page {
box-sizing: border-box;
/* min-height: var(--fontSize100); */
background-color: #fff;
padding-bottom: var(--fontSize10);
padding-top: 24rpx;
padding: 0 var(--fontSize32);
.btn {
height: var(--fontSize80);
background: #347BFF;
border-radius: var(--fontSize12);
font-size: var(--fontSize28);
color: #FFFFFF;
margin: 0 var(--fontSize32);
}
}
......@@ -745,6 +782,7 @@ page {
color: #347BFF;
font-size: var(--fontSize24);
font-weight: 600;
justify-content: center;
}
.btn-box .checkBtn {
......
......@@ -5,16 +5,16 @@
<block wx:if="{{ flag }}">
<view
class="main {{ isFullSucreen?'isFullSucreen':'' }}"
style="{{ showRatingPopup ? 'overflow: hidden;height:100vh;' : '' }}"
style="{{ sublistVisible||constructionVisible ? 'overflow: hidden;height:100vh;' : '' }}"
>
<view class="status-box">
<view class="userInfo" hover-class="none" hover-stop-propagation="false">
<image class="" src="../../images/activeIcon.png" />
<view class="customerName">客户{{orderInfo.customerName}}</view>
<!-- wx:if="{{ orderInfo.constructionFlag !='Y' }}" -->
<block>
<!-- <block>
<view class="signBtn text-center" bindtap="RatingPopupSetting">查看签名/施工图</view>
</block>
</block> -->
</view>
<view class="orderContainer">
<!-- 已微信通知客户前往取车, -->
......@@ -57,10 +57,11 @@
<view class="meal-bd-bottom">
{{g.positionStr || g.upgradeGoodsTypeName}}
<view class="count">x{{g.number}}</view>
<view wx:if="{{ g.technicianName }}" class="artificer disabled">
<view class="artificer {{ filter.subStatus(g.constructionStatus) }}">{{filter.subStatusName(g.constructionStatus)}}</view>
<!-- <view wx:if="{{ g.technicianName }}" class="artificer disabled">
<text class="{{ !g.technicianName ? 'grey_text' : '' }} 'text-hide'">{{g.technicianName }}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
</view> -->
</view>
</view>
</view>
......@@ -88,11 +89,12 @@
<text class="'text-hide'">{{item.filmRollNo}}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
<view class="artificer {{ filter.subStatus(item.constructionStatus) }}">{{filter.subStatusName(item.constructionStatus)}}</view>
<!-- 技师 -->
<view wx:if="{{ item.technicianName }}" class="artificer disabled" data-item="{{ item }}">
<!-- <view wx:if="{{ item.technicianName }}" class="artificer disabled" data-item="{{ item }}">
<text class="{{ !item.technicianName ? 'grey_text' : '' }} 'text-hide'">{{item.technicianName }}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
</view> -->
</view>
</view>
</block>
......@@ -125,8 +127,12 @@
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
<view wx:if="{{ isStaff && showMoreBtn }}">
<apply-refund-btn orderInfo="{{ orderInfo }}"></apply-refund-btn>
<view>
<apply-refund-btn
updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}"
orderInfo="{{ orderInfo }}"
showRefundBtn="{{ isStaff && showMoreBtn }}"
></apply-refund-btn>
</view>
</view>
</view>
......@@ -311,16 +317,33 @@
</view>
</block>
</view>
<block wx:if="{{ orderInfo.failureFlag == 'Y'&&isMake && orderInfo.associatedOrderCode }}">
<!-- <view class="btn text-center" bindtap="showAgain">继续下单</view> -->
<view class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<!-- <block wx:if="{{ orderInfo.failureFlag == 'Y'&&isMake && orderInfo.associatedOrderCode }}"> -->
<!-- <view class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
</view> -->
<!-- </block> -->
<view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<block wx:if="{{ orderInfo.failureFlag == 'Y'&&isMake && orderInfo.associatedOrderCode }}">
<view class="tips">
<image class="tipsIcon" src="../../../images/tips.png" />
<view class="contentText">该订单录入信息有误,点击跳转正确工单页面。</view>
<view class="checkBtn" bindtap="redirectOrder">去查看</view>
</view>
</view>
</block>
</block>
<!-- <view class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view> -->
<view
wx:if="{{ confirmFlagObj.btnName == 'constructionVisible' }}"
class="btn text-center"
data-btnName="{{ confirmFlagObj.btnName }}"
bindtap="showModal"
>{{confirmFlagObj.showBtn}}</view>
<view
wx:if="{{ confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}"
class="btn text-center"
data-btnName="{{ confirmFlagObj.btnName }}"
bindtap="showModal"
>{{confirmFlagObj.showBtn}}</view>
</view>
</block>
<modal id="modal3" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
<view class="modatcontent">
......@@ -396,4 +419,16 @@
height="var(--fontSize540);"
includesChildHeight="var(--fontSize1020);"
sceneObj="{{ orderInfo }}"
></order-prompt-popup>
\ No newline at end of file
></order-prompt-popup>
<ConstructionDetailModal
visible="{{ constructionVisible }}"
orderInfo="{{ orderInfo }}"
orderCode="{{ orderInfo.orderCode }}"
bindcancel="constructionCancel"
></ConstructionDetailModal>
<sublist-modal
visible="{{ sublistVisible }}"
orderInfo="{{ orderInfo }}"
orderCode="{{ orderInfo.orderCode }}"
bindcancel="sublistCancel"
></sublist-modal>
\ No newline at end of file
......@@ -4,7 +4,6 @@ const IMG_URL =
import commonApi from '~/api/api'
import { setConfigInfo, getPositionList } from '~/store/index'
import api from '~/tabWorkOrder/api'
import { deepClone } from '../../../miniprogram_npm/glsk-applet-component/utils'
const app = getApp()
Page({
/**
......@@ -231,7 +230,8 @@ Page({
copySubOrderRelationList,
orderCode,
confirmInfo,
subOrderRelationList
subOrderRelationList,
requesting
} = this.data
console.log(subOrderRelationList, 'copySubOrderRelationList')
subOrderRelationList = wx.$util.deepClone(subOrderRelationList)
......@@ -282,11 +282,45 @@ Page({
delete item.confirmInfo
return item
})
let params = {
constructionInfoList: subOrderRelationList,
orderCode,
subOrderRelationList: copySubOrderRelationList
}
let checkFlag = false
for (let index = 0; index < subOrderRelationList.length; index++) {
const item = subOrderRelationList[index]
// Check if the sub-order has associated products
if (!item.subOrderList.length) {
wx.$util.showToast(`施工单${index + 1}关联商品不能为空`)
checkFlag = true
break // Move to the next index
}
// Check if the sub-order has a main technician
if (!item.mainTechnicianList.length) {
wx.$util.showToast(`施工单${index + 1}主技师不能为空`)
checkFlag = true
break // Move to the next index
}
// Check if the sub-order has service items
if (!item.serviceItemsList.length) {
wx.$util.showToast(`施工单${index + 1}服务项目不能为空`)
checkFlag = true
break // Move to the next index
}
}
console.log(params, 'params')
if (requesting || checkFlag) return false
this.setData({
requesting: true
})
console.log(params, 'confirmInfo')
api.batchAdd(params).then(res => {
let { code, data, message } = res
......@@ -298,6 +332,11 @@ Page({
} else {
wx.$util.showToast(message)
}
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
})
},
backup() {
......@@ -344,7 +383,7 @@ Page({
if (goodsList.length > 0) {
tabList.push('施工单' + (tabList.length + 1))
let obj = {
servicesList: copyServicesList,
servicesList: wx.$util.deepClone(copyServicesList),
mainSelected: [],
deputySelected: []
}
......@@ -594,7 +633,8 @@ Page({
return
}
// 切换tab 重新赋值刷新数据
const currentTabIndex = e?.detail || 0
const currentTabIndex =
e?.detail !== undefined && e?.detail !== null ? e.detail : tabIndex
console.log(tabIndex, currentTabIndex, 'tabIndex')
subOrderRelationList[tabIndex] = wx.$util.deepClone({
...subOrderRelationList[tabIndex],
......@@ -624,7 +664,7 @@ Page({
getTechnicianList() {
let { userInfo } = this.data
// 获取技师数据
commonApi
api
.getQYTechnicianList({
yqMerchantId: !userInfo?.isSuper
? wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
......
......@@ -21,6 +21,12 @@ page {
overflow: hidden;
margin-top: var(--fontSize20);
}
.techic-value {
display: flex;
align-items: center;
justify-content: flex-end;
}
}
......@@ -292,6 +298,7 @@ page {
}
.item-box {
box-sizing: border-box;
background: #F7F8FA;
border-radius: var(--fontSize12);
padding: var(--fontSize24) var(--fontSize32) var(--fontSize24) var(--fontSize24);
......@@ -300,9 +307,10 @@ page {
justify-content: space-between;
margin-bottom: var(--fontSize16);
&:last-child {
margin-bottom: 0;
}
// &:last-child {
// margin-bottom: 0;
// }
.cellBox {
width: calc(100% - var(--fontSize56));
......@@ -322,6 +330,9 @@ page {
.other {
color: #5A5E66;
font-size: var(--fontSize24);
.split {
margin: 0 var(--fontSize6);
}
}
}
......@@ -344,6 +355,11 @@ page {
}
}
}
.active {
border: 2rpx solid #347BFF;
background: #347bff14;
}
}
.bottom {
......
......@@ -87,12 +87,12 @@
</view>
<block wx:for="{{ item.detailList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view hidden="{{ !item.showItemFlag }}" class="mt">
<view class="item-box">
<view class="item-box {{i.active?'active':''}}">
<view class="cellBox">
<view class="ser-name text-hide">{{i.serviceItemsName}}</view>
<view class="other">
<text>用料标准{{i.materialStandard}}米/件</text>
|
<text class="split">|</text>
<text>施工标准{{i.timeStandard}}min</text>
</view>
</view>
......
......@@ -17,6 +17,8 @@ Page({
data: {
IMG_URL,
...order_mixins.data,
allNoConstruction: true,
userPermissions: [], // 权限数组
showTips: true,
isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff,
......@@ -176,7 +178,24 @@ Page({
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)
}
})
},
async onRoute(options) {
let { orderCode } = this.data
options.orderCode = options.orderCode || orderCode
if (options.orderCode) {
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
......@@ -223,6 +242,7 @@ Page({
userInfo.loginRole == 7
)
})
this.getStaffPermissions()
},
showFlag(orderCode) {
const confirmFlagObj = {
......@@ -247,10 +267,11 @@ Page({
.then(res => {
console.log(res)
let { code, message, data } = res
console.log('showFlag', res);
console.log('showFlag', res)
if (code == 0) {
this.setData({
confirmFlagObj: confirmFlagObj[data.confirmFlag]
confirmFlagObj: confirmFlagObj[data.confirmFlag],
updateFlag: data.updateFlag
})
}
})
......@@ -270,7 +291,8 @@ Page({
},
async getOrderDetail(orderCode) {
let _this = this
let { signatureSwitch, baseConfigData } = _this.data
let { signatureSwitch, baseConfigData, allNoConstruction } = _this.data
const positionTypeList = (await getPositionList()) || []
wx.$util.showLoading('加载中...')
......@@ -322,7 +344,14 @@ Page({
let total_price = 0
let warrantyCardList = []
for (var i = 0; i < data?.subOrderList?.length; i++) {
if (true) {
}
let e = data?.subOrderList[i]
// 判断是否全为无需施工
if (e.constructionStatus != 3) {
allNoConstruction = false
}
total_price += e.totalPrice
e.price = Number(
wx.$util.decimal(Number(e.totalPrice / e.number), 2)
......@@ -364,6 +393,10 @@ Page({
g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice
// 判断是否全为无需施工
if (g.constructionStatus != 3) {
allNoConstruction = false
}
})
item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => {
......@@ -405,6 +438,7 @@ Page({
}
this.setData({
allNoConstruction,
orderInfo: data,
flag: true,
warrantyCardList,
......
......@@ -5,6 +5,7 @@ page {
.hildden {
height: 100vh;
overflow: hidden;
}
.copyImage,
......@@ -140,17 +141,44 @@ page {
}
.artificer {
height: var(--fontSize48);
background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3;
border-radius: var(--fontSize26);
display: flex;
align-items: center;
justify-content: center;
padding: 0 var(--fontSize24);
color: #292D33;
font-size: var(--fontSize24);
// height: var(--fontSize48);
// background: #FFFFFF;
// border: var(--fontSize1) solid #DEE0E3;
// border-radius: var(--fontSize26);
// display: flex;
// align-items: center;
// justify-content: center;
// padding: 0 var(--fontSize24);
// color: #292D33;
// font-size: var(--fontSize24);
margin-left: auto;
}
.constructionFlaged {
width: var(--fontSize62);
height: var(--fontSize26);
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize18);
color: #35C376;
border: 1px solid #35C376;
line-height: var(--fontSize26);
text-align: center;
border-radius: var(--fontSize4);
}
.constructionFlaging {
width: var(--fontSize62);
height: var(--fontSize26);
line-height: var(--fontSize26);
text-align: center;
border: 1px solid #FF9D0A;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 18rpx;
color: #FF9D0A;
border-radius: var(--fontSize4);
}
.artificer text {
......@@ -335,6 +363,7 @@ page {
min-height: var(--fontSize100);
background: #FFFFFF;
padding-bottom: var(--fontSize10);
padding-top: 24rpx;
}
.btn-box .tips {
......@@ -730,4 +759,8 @@ page {
.meal-bd-bottom .count {
margin-left: var(--fontSize12);
}
.warrantyCardList {
margin-bottom: 120rpx;
}
\ No newline at end of file
......@@ -3,23 +3,30 @@
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<!-- wx:if="{{flag}}" -->
<block>
<view class="main {{ sublistVisible?'hildden':''}} {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="status-box" wx:if="{{ orderInfo.status!=10&&orderInfo.status!=9 }}">
<view class="content">客户已付款</view>
<view class="tips">技师施工完毕后,点击完成施工按钮可通知车主前来取车</view>
</view>
<view class="status-box" wx:if="{{ orderInfo.status == 10 }}">
<view class="content">订单关闭</view>
<view class="tips">客户支付超过24小时,系统自动关闭订单</view>
</view>
<view class="status-box" wx:if="{{ orderInfo.status == 9 }}">
<view class="content">订单已撤销</view>
<!-- <view class="tips">客户支付超过24小时,系统自动关闭订单</view> -->
</view>
<view class="box">
<!-- <view class="title">礼券信息</view> -->
<!-- 不升级 -->
<!-- <block wx:if="{{orderInfo.selectPayType ==0}}">
<view class="main {{ sublistVisible||constructionVisible?'hildden':''}} {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="status-box" wx:if="{{ orderInfo.status!=10&&orderInfo.status!=9 }}">
<block wx:if="{{allNoConstruction}}" >
<view class="content">客户已付款</view>
<view class="tips">订单无需施工,如需要请在本页面工单-更多修改为需要施工</view>
</block>
<block wx:else>
<view class="content">客户已付款</view>
<view class="tips">请确认订单是否施工,并选择施工服务项目,将产生施工单</view>
</block>
</view>
<view class="status-box" wx:if="{{ orderInfo.status == 10 }}">
<view class="content">订单关闭</view>
<view class="tips">客户支付超过24小时,系统自动关闭订单</view>
</view>
<view class="status-box" wx:if="{{ orderInfo.status == 9 }}">
<view class="content">订单已撤销</view>
</view>
<view class="box">
<!-- <view class="title">礼券信息</view> -->
<!-- 不升级 -->
<!-- <block wx:if="{{orderInfo.selectPayType ==0}}">
<view class="title">商品</view>
<view class="cell">
<view class="label">抵用礼券:</view>
......@@ -28,238 +35,208 @@
</view>
</view>
</block> -->
<!-- <block wx:if="{{orderInfo.selectPayType != 0 && orderInfo.totalPrice!= 0}}"> -->
<view class="title">商品</view>
<view class="meal-box" wx:for="{{ orderInfo.packageGoodsList }}" wx:key="index">
<view class="meal-hd">
<view>{{item.packageName}}</view>
<view class="price">¥{{item.totalPrice}}</view>
</view>
<view class="meal-bd">
<view class="meal-bd-box" wx:for="{{ item.packageGoodsOrderList }}" wx:for-item="g">
<view class="meal-bd-head">
<view class="dot"></view>
<view class="name">{{g.upgradeGoodsAlias||g.upgradeGoodsName}}</view>
<view class="price">¥{{g.price}}</view>
</view>
<view class="meal-bd-bottom">
{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}
<view class="count">x{{g.number}}</view>
<view class="artificer" bindtap="selectArtificer" data-item="{{ g }}">
<!-- <block wx:if="{{orderInfo.selectPayType != 0 && orderInfo.totalPrice!= 0}}"> -->
<view class="title">商品</view>
<view class="meal-box" wx:for="{{ orderInfo.packageGoodsList }}" wx:key="index">
<view class="meal-hd">
<view>{{item.packageName}}</view>
<view class="price">¥{{item.totalPrice}}</view>
</view>
<view class="meal-bd">
<view class="meal-bd-box" wx:for="{{ item.packageGoodsOrderList }}" wx:for-item="g">
<view class="meal-bd-head">
<view class="dot"></view>
<view class="name">{{g.upgradeGoodsAlias||g.upgradeGoodsName}}</view>
<view class="price">¥{{g.price}}</view>
</view>
<view class="meal-bd-bottom">
{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}
<view class="count">x{{g.number}}</view>
<view class="artificer {{ filter.subStatus(g.constructionStatus) }}">{{filter.subStatusName(g.constructionStatus)}}</view>
<!-- <view class="artificer" bindtap="selectArtificer" data-item="{{ g }}">
<text class="{{ !g.technicianName ? 'grey_text' : '' }} 'text-hide'">{{g.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
</view>
</view>
</view>
</view>
<view class="goods">
<block wx:for="{{ orderInfo.subOrderList }}" wx:key="index">
<view class="item">
<view class="subItem_box goods_name">
<view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || ''}}
</view>
<view class="price">¥{{item.price}}</view>
</view>
<view class="subItem_box">
<view
style="{{ !orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;' }}"
>
<!-- 太阳膜类展示部位 精品类展示类目名 -->
<view class="position">
{{item.positionStr || item.upgradeGoodsTypeName}}
<text class="type">x{{item.number}}</text>
</view>
</view>
<!-- 设置膜卷号(不需走签名 战败订单) -->
<view
wx:if="{{ (!signatureSwitch || orderInfo.selectPayType == 0) && isUseFilmRoll && item.filmNumberData.length }}"
class="film-roll disabled"
bindtap="selectfilmRollNo"
data-item="{{ item }}"
data-index="{{ index }}"
>
<text class="{{ !item.filmRollNo ? 'grey_text' : '' }} 'text-hide'">{{item.filmRollNo || '选择膜卷号'}}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
<!-- 太阳膜类且配置技师 25-8月版本全部放开 -->
<!-- wx:if="{{ item.upgradeGoodsPosition}}" -->
<view class="artificer" bindtap="selectArtificer" data-item="{{ item }}">
</view> -->
</view>
</view>
</view>
</view>
<view class="goods">
<block wx:for="{{ orderInfo.subOrderList }}" wx:key="index">
<view class="item">
<view class="subItem_box goods_name">
<view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || ''}}
</view>
<view class="price">¥{{item.price}}</view>
</view>
<view class="subItem_box">
<view style="{{ !orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;' }}">
<!-- 太阳膜类展示部位 精品类展示类目名 -->
<view class="position">
{{item.positionStr || item.upgradeGoodsTypeName}}
<text class="type">x{{item.number}}</text>
</view>
</view>
<!-- 设置膜卷号(不需走签名 战败订单) -->
<!-- <view wx:if="{{ (!signatureSwitch || orderInfo.selectPayType == 0) && isUseFilmRoll && item.filmNumberData.length }}" class="film-roll disabled" bindtap="selectfilmRollNo" data-item="{{ item }}" data-index="{{ index }}">
<text class="{{ !item.filmRollNo ? 'grey_text' : '' }} 'text-hide'">{{item.filmRollNo || '选择膜卷号'}}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view> -->
<!-- 太阳膜类且配置技师 25-8月版本全部放开 -->
<!-- wx:if="{{ item.upgradeGoodbpsPosition}}" -->
<!-- <view class="artificer" bindtap="selectArtificer" data-item="{{ item }}">
<text class="{{ !item.technicianName ? 'grey_text' : '' }} 'text-hide'">{{item.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
</view>
</view>
</block>
</view>
<view class="cell">
<view class="label icon">
<image src="../../images/voucher_icon.png" mode="" />
</view>
<view
class="value"
wx:if="{{ orderInfo.couponName || orderInfo.customerCoupon.customerCouponCode || orderInfo.customerCoupon.employeeName }}"
>
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
</view>
<view class="value" wx:else>无</view>
</view>
<view class="line" />
<view class="cell total">
<view class="label">商品总金额:</view>
<view class="price">¥{{orderInfo.total_price}}</view>
</view>
<!-- </block> -->
</view>
<view class="box">
<view class="title invoice">
工单信息
<view style="display: flex;gap: var(--fontSize32);">
<!-- 非门店收款 已支付/已退款展示 -->
<view
wx:if="{{ isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}"
>
<apply-refund-btn orderInfo="{{ orderInfo }}"></apply-refund-btn>
</view>
<view
wx:if="{{ orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2 }}"
class="invoice-btn"
bindtap="handleBtnInvoice"
>
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
</view>
</view>
<block wx:for="{{ orderObj }}" wx:key="index">
<view class="cell">
<view class="label">{{item.label}}</view>
<block wx:if="{{ item.key == 'status' }}">
<view class="value" style="color:{{ item.constructionFlag == 'Y'? status[orderInfo.status].color:'' }};">
<!-- {{ item.constructionFlag == 'Y'? status[orderInfo.status].text: '待施工'}} -->
{{ status[orderInfo.status].text}}
</view>
</block>
<block wx:else>
<view class="value">
<block wx:if="{{ item.key == 'payType' }}">{{payType[orderInfo.selectPayType] || ''}}</block>
<block wx:else>{{orderInfo[item.key] || ''}}</block>
</view>
</block>
<block wx:if="{{ item.copy }}">
<view class="copy" bindtap="setCopyData" data-content="{{ orderInfo[item.key] }}">
<!-- 复制 -->
<image src="{{ IMG_URL }}copy_icon_gapy.png" class="copyImage" binderror="" bindload=""></image>
</view>
</block>
</view>
</block>
<block
wx:if="{{ (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length }}"
>
<view class="cell">
<view class="label">付款凭证</view>
<view class="image-box">
<view
class="value"
bindtap="previewImage"
wx:for="{{ orderInfo.payVoucherList }}"
wx:key="index"
data-index="{{ index }}"
data-url="{{ orderInfo.payVoucherList }}"
>
<view class="image">
<image src="{{ item.payVoucher }}" />
</view>
</view>
</view>
</view>
</block>
<block wx:if="{{ orderInfo.status == 5||orderInfo.status == 12 }}">
<view class="cell">
<view class="label">退款明细</view>
<view class="value">{{ orderInfo.refundType == 1 ? "退全款":"退部分款"}}¥{{orderInfo.refundAmount}}</view>
</view>
</block>
<view class="paid" wx:if="{{ orderInfo.payOrder&&orderInfo.payOrder.payStatus == 2 }}">
<image src="../../images/paid.png" />
</view>
</view>
<view class="box customer">
<view class="title userTitle">
<text>客户信息</text>
<!-- 已退款或已开票不可修改客户任何信息 -->
<view
bindtap="jumpUserPortrait"
class="updateInfo icon {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2||!isMake ? 'isHide' : '' }}"
>
<image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image>
画像
</view>
<view
wx:if="{{ isYqdSuper||isStaff }}"
bindtap="jumpUpdate"
class="updateInfo {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : '' }}"
>
<image src="{{ IMG_URL }}miniProgram/edit_icon.png" class="iconImage"></image>
客户信息
</view>
</view>
<block wx:for="{{ customerObj }}" wx:key="index">
<view class="cell">
<view class="label">{{item.label}}</view>
<view class="value" style="color:{{ item.color|| '#333' }};" catchtap="item.callBack" data-data="{{ orderInfo[item.key] }}">
<block wx:if="{{ item.arr }}">
<block wx:if="{{ orderInfo[item.arr[1]] }}">
<block wx:for="{{ item.arr }}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="value-item text-hide">
<text wx:if="{{ ind == 1 }}">|</text>
{{orderInfo[i]}}
</view>
</block>
</block>
</block>
<block wx:else>{{item.enum ? item.enum[orderInfo[item.key]] :orderInfo[item.key] || ''}}</block>
<block wx:if="{{ item.copy }}">
<view class="copy" catchtap="setCopyData" data-content="{{ orderInfo[item.key] }}">
<!-- 复制 -->
<image src="{{ IMG_URL }}copy_icon_gapy.png" class="copyImage" binderror="" bindload=""></image>
</view>
</block>
</view>
</view>
</block>
<block wx:if="{{ orderInfo.selectPayType == 0 }}">
<view class="cell">
<view class="label">拒升理由</view>
<view class="value">{{orderInfo.customer.refusalReason?orderInfo.customer.refusalReason:""}}</view>
</view>
</block>
</view>
<!-- wx:if="{{warrantyCardList&&warrantyCardList.length}}" -->
<!-- 没有屏蔽质保卡 就显示 -->
<!-- wx:if="{{!warrantyCardVisible&&orderInfo.selectPayType==0}}" -->
<block wx:if="{{ warrantyCardList.length || warrantyCardVisible }}">
<view class="box">
<view class="title">{{orderInfo.selectPayType==0? '客服' :'质保'}}</view>
<view class="warranty-box">
<block wx:for="{{ warrantyCardList }}" wx:key="index">
<view class="warranty-card">
<view class="name text-hide">{{filter.replaceItemText(item.goodsName)}}</view>
<view class="value">
质保期
<text>{{item.warrantyPeriod}}年</text>
</view>
<view class="codeImg-box">
<image src="{{ item.barCodeUrl }}" class="barCodeImg" />
</view>
<!-- <view class="barCode">{{item.carCode}}</view> -->
</view>
</block>
</view>
<qr-box wx:if="{{ warrantyCardVisible }}" imgSrc="{{ customerService }}" bindrefresh="getWorkWechatLiveQRCode" />
<!-- <view class="qr-box">
</view> -->
<view class="artificer {{ filter.subStatus(item.constructionStatus) }}">{{filter.subStatusName(item.constructionStatus)}}</view>
</view>
</view>
</block>
</view>
<view class="cell">
<view class="label icon">
<image src="../../images/voucher_icon.png" mode="" />
</view>
<view class="value" wx:if="{{ orderInfo.couponName || orderInfo.customerCoupon.customerCouponCode || orderInfo.customerCoupon.employeeName }}">
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
</view>
<view class="value" wx:else>无</view>
</view>
<view class="line" />
<view class="cell total">
<view class="label">商品总金额:</view>
<view class="price">¥{{orderInfo.total_price}}</view>
</view>
<!-- </block> -->
</view>
<view class="box">
<view class="title invoice">
工单信息
<view style="display: flex;gap: var(--fontSize32);">
<!-- 非门店收款 已支付/已退款展示 -->
<!-- wx:if="{{ isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}" -->
<view>
<apply-refund-btn orderInfo="{{ orderInfo }}" updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}" showRefundBtn="{{ isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12)}}"></apply-refund-btn>
</view>
<view wx:if="{{ orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2 }}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
</view>
</view>
<block wx:for="{{ orderObj }}" wx:key="index">
<view class="cell">
<view class="label">{{item.label}}</view>
<block wx:if="{{ item.key == 'status' }}">
<view class="value" style="color:{{ status[orderInfo.status].color||'' }};">
<!-- {{ item.constructionFlag == 'Y'? status[orderInfo.status].text: '待施工'}} -->
{{ status[orderInfo.status].text}}
</view>
</block>
<block wx:else>
<view class="value">
<block wx:if="{{ item.key == 'payType' }}">{{payType[orderInfo.selectPayType] || ''}}</block>
<block wx:else>{{orderInfo[item.key] || ''}}</block>
</view>
</block>
<block wx:if="{{ item.copy }}">
<view class="copy" bindtap="setCopyData" data-content="{{ orderInfo[item.key] }}">
<!-- 复制 -->
<image src="{{ IMG_URL }}copy_icon_gapy.png" class="copyImage" binderror="" bindload=""></image>
</view>
</block>
</view>
</block>
<block wx:if="{{ (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length }}">
<view class="cell">
<view class="label">付款凭证</view>
<view class="image-box">
<view class="value" bindtap="previewImage" wx:for="{{ orderInfo.payVoucherList }}" wx:key="index" data-index="{{ index }}" data-url="{{ orderInfo.payVoucherList }}">
<view class="image">
<image src="{{ item.payVoucher }}" />
</view>
</view>
</view>
</view>
</block>
<block wx:if="{{ orderInfo.status == 5||orderInfo.status == 12 }}">
<view class="cell">
<view class="label">退款明细</view>
<view class="value">{{ orderInfo.refundType == 1 ? "退全款":"退部分款"}}¥{{orderInfo.refundAmount}}</view>
</view>
</block>
<view class="paid" wx:if="{{ orderInfo.payOrder&&orderInfo.payOrder.payStatus == 2 }}">
<image src="../../images/paid.png" />
</view>
</view>
<view class="box customer">
<view class="title userTitle">
<text>客户信息</text>
<!-- 已退款或已开票不可修改客户任何信息 -->
<view bindtap="jumpUserPortrait" class="updateInfo icon {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2||!isMake ? 'isHide' : '' }}">
<image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image>
画像
</view>
<view wx:if="{{ isYqdSuper||isStaff }}" bindtap="jumpUpdate" class="updateInfo {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : '' }}">
<image src="{{ IMG_URL }}miniProgram/edit_icon.png" class="iconImage"></image>
客户信息
</view>
</view>
<block wx:for="{{ customerObj }}" wx:key="index">
<view class="cell">
<view class="label">{{item.label}}</view>
<view class="value" style="color:{{ item.color|| '#333' }};" catchtap="item.callBack" data-data="{{ orderInfo[item.key] }}">
<block wx:if="{{ item.arr }}">
<block wx:if="{{ orderInfo[item.arr[1]] }}">
<block wx:for="{{ item.arr }}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="value-item text-hide">
<text wx:if="{{ ind == 1 }}">|</text>
{{orderInfo[i]}}
</view>
</block>
</block>
</block>
<block wx:else>{{item.enum ? item.enum[orderInfo[item.key]] :orderInfo[item.key] || ''}}</block>
<block wx:if="{{ item.copy }}">
<view class="copy" catchtap="setCopyData" data-content="{{ orderInfo[item.key] }}">
<!-- 复制 -->
<image src="{{ IMG_URL }}copy_icon_gapy.png" class="copyImage" binderror="" bindload=""></image>
</view>
</block>
</view>
</view>
</block>
<block wx:if="{{ orderInfo.selectPayType == 0 }}">
<view class="cell">
<view class="label">拒升理由</view>
<view class="value">{{orderInfo.customer.refusalReason?orderInfo.customer.refusalReason:""}}</view>
</view>
</block>
</view>
<!-- wx:if="{{warrantyCardList&&warrantyCardList.length}}" -->
<!-- 没有屏蔽质保卡 就显示 -->
<!-- wx:if="{{!warrantyCardVisible&&orderInfo.selectPayType==0}}" -->
<block wx:if="{{ warrantyCardList.length || warrantyCardVisible }}">
<view class="box warrantyCardList">
<view class="title">{{orderInfo.selectPayType==0? '客服' :'质保'}}</view>
<view class="warranty-box">
<block wx:for="{{ warrantyCardList }}" wx:key="index">
<view class="warranty-card">
<view class="name text-hide">{{filter.replaceItemText(item.goodsName)}}</view>
<view class="value">
质保期
<text>{{item.warrantyPeriod}}年</text>
</view>
<view class="codeImg-box">
<image src="{{ item.barCodeUrl }}" class="barCodeImg" />
</view>
<!-- <view class="barCode">{{item.carCode}}</view> -->
</view>
</block>
</view>
<qr-box wx:if="{{ warrantyCardVisible }}" imgSrc="{{ customerService }}" bindrefresh="getWorkWechatLiveQRCode" />
<!-- <view class="qr-box">
<view wx:if="{{!customerService}}" class="loader box-center" />
<image
wx:else
......@@ -272,10 +249,10 @@
src="{{customerService}}"
/>
</view> -->
<view class="warranty-tips" wx:if="{{ warrantyCardVisible }}">{{orderInfo.selectPayType==0? '建议让客户扫码关注客服号领取礼包' :'建议让客户扫码关注客服查询质保'}}</view>
</view>
</block>
<!-- <block wx:if="{{orderInfo.status == 6 || orderInfo.status== 4 || orderInfo.status == 2}}">
<view class="warranty-tips" wx:if="{{ warrantyCardVisible }}">{{orderInfo.selectPayType==0? '建议让客户扫码关注客服号领取礼包' :'建议让客户扫码关注客服查询质保'}}</view>
</view>
</block>
<!-- <block wx:if="{{orderInfo.status == 6 || orderInfo.status== 4 || orderInfo.status == 2}}">
<view class="box">
<view class="box-btn" bindtap="showQrBox">
<image src="{{qrFlag?'../../images/open.png':'../../images/close.png'}}" />
......@@ -301,48 +278,31 @@
</view>
</view>
</block> -->
</view>
<!-- 已支付4 战败2 已评价6 三种状态才展示 并且不是通过失效客户录入的战败单 -->
<block
</view>
<!-- 已支付4 战败2 已评价6 三种状态才展示 并且不是通过失效客户录入的战败单 -->
<!-- <block
wx:if="{{ (!userInfo.isSuper && userInfo.loginRole != 3 && userInfo.loginRole != 6 && userInfo.userType == 2 && (orderInfo.status == 4 || orderInfo.status == 2 || orderInfo.status == 6)) && ((orderInfo.subOrderList && orderInfo.subOrderList.length) ||(orderInfo.packageGoodsList&&orderInfo.packageGoodsList.length)) }}"
>
<view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
</view>
<!-- 不需要走签名逻辑 -->
<!-- <view wx:if="{{ signatureSwitch&&orderInfo.selectPayType!=0 }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
> -->
<view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view wx:if="{{confirmFlagObj.btnName == 'constructionVisible'}}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
<view wx:if="{{confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
</view>
<!-- 不需要走签名逻辑 -->
<!-- <view wx:if="{{ signatureSwitch&&orderInfo.selectPayType!=0 }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn text-center" bindtap="navOrderSignature">客户签名确认</view>
</view>
<view wx:else class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
<view class="btn text-center" bindtap="confirmConstruction">确认完成施工</view>
</view> -->
</block>
<!-- </block> -->
</block>
<order-popup orderType="4" show="{{ showPopup }}" />
<artificer-select-popup
show="{{ artificerSelectPopup }}"
title="选择技师"
copyArtificerList="{{ artificerList }}"
orderInfo="{{ orderInfo }}"
artificerSelectObj="{{ artificerSelectObj }}"
bindconfirm="changeArtificer"
/>
<artificer-select-popup show="{{ artificerSelectPopup }}" title="选择技师" copyArtificerList="{{ artificerList }}" orderInfo="{{ orderInfo }}" artificerSelectObj="{{ artificerSelectObj }}" bindconfirm="changeArtificer" />
<!-- <wxs src="/utils/index.wxs" module="common" /> -->
<film-roll-no-popup
show="{{ filmRollNoPopup }}"
title="选择膜卷号"
copyfilmRollNoList="{{ filmRollNoList }}"
filmSelectedItem="{{ filmSelectedItem }}"
bindconfirm="changefilmRollNo"
/>
<film-roll-no-popup show="{{ filmRollNoPopup }}" title="选择膜卷号" copyfilmRollNoList="{{ filmRollNoList }}" filmSelectedItem="{{ filmSelectedItem }}" bindconfirm="changefilmRollNo" />
<select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{ orderInfo }}"></select-invoice-modal>
<sublist-modal visible="{{ sublistVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="sublistCancel"></sublist-modal>
<ConstructionDetailModal
visible="{{ constructionVisible }}"
orderInfo="{{ orderInfo }}"
orderCode="{{ orderCode }}"
bindcancel="constructionCancel"
></ConstructionDetailModal>
<ConstructionDetailModal visible="{{ constructionVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="constructionCancel"></ConstructionDetailModal>
<!-- <dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}">
</dialog> -->
\ No newline at end of file
......@@ -15,8 +15,9 @@
</view>
<view class="main {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="mainheader">
<!-- catchtap="showStaffPicker" -->
<view class="title">日报切换</view>
<view class="navigation-title templateNameTitle" bindtap="showStaffPicker">
<view class="navigation-title templateNameTitle">
<picker bindchange="handleTemplagePickerChange" value="{{ orderObj.templateType-1 }}" range-key="name" range="{{ pickerTemplateList }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || isHmStore}}">
<view class="picker">
<view class="text-hide templateName">{{pickerTemplateList[orderObj.templateType-1]['name']}}</view>
......@@ -93,7 +94,7 @@
<block wx:if="{{ item.brandType == 0 }}">
<view class="mainheader">
<view class="title">问界</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
......@@ -119,7 +120,7 @@
<block wx:if="{{ item.brandType == 1 }}">
<view class="mainheader">
<view class="title">鸿蒙</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
......@@ -145,7 +146,7 @@
<block wx:if="{{ item.brandType == 2 }}">
<view class="mainheader">
<view class="title">{{ item.brandType == 1? '非问界': item.firstBrandName}}</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
......
......@@ -340,7 +340,7 @@ Page({
type: 'number',
required: true,
min: 0,
max: 1000,
max: 3000,
inputPlaceholder: ''
},
{
......@@ -349,7 +349,7 @@ Page({
type: 'number',
required: true,
min: 0,
max: 1000,
max: 3000,
inputPlaceholder: ''
},
{
......@@ -393,23 +393,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
......@@ -533,7 +533,7 @@ Page({
showCancel: false,
confirmText: '确定',
confirmColor: '#347BFF',
success(res) {}
success(res) { }
})
} else {
wx.$util.showToast(message)
......@@ -651,7 +651,7 @@ Page({
showCancel: false,
confirmText: '确定',
confirmColor: '#347BFF',
success(res) {}
success(res) { }
})
} else {
wx.$util.showToast(message)
......@@ -759,11 +759,9 @@ Page({
0: '问界',
1: '鸿蒙'
}
context += `【${
bandType[el.brandType] || item.firstBrandName
}】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${
item.differenceValue
},请相关驻店销售对齐核销再次提交\t\n`
context += `【${bandType[el.brandType] || item.firstBrandName
}】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${item.differenceValue
},请相关驻店销售对齐核销再次提交\t\n`
el.deliveryCountinputError = true
el.equityToShopCountinputError = true
el.notDeliveryCountinputError = true
......@@ -927,7 +925,7 @@ Page({
hwOhterObjArray[hwohterIndex]
const min = currentConfig.min || 0 // 默认最小值 0
const max = currentConfig.max || 9999999 // 默认最大值
// console.log(currentConfig, 'currentConfig')
console.log(currentConfig, 'currentConfig')
if (currentConfig.type == 'digit') {
let [number, decimal] = value.toString().split('.')
// console.log(value, '222')
......@@ -1353,7 +1351,7 @@ Page({
wx.$util.message(message)
}
})
.catch(err => {})
.catch(err => { })
},
inputSearch(e) {
let { pickerType } = this.data
......@@ -1560,7 +1558,7 @@ Page({
}
// }
})
.catch(err => {})
.catch(err => { })
},
/**
* 生命周期函数--监听页面加载
......@@ -1682,5 +1680,5 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {}
onReady: function () { }
})
......@@ -3,19 +3,19 @@
<wxs src="../../index.wxs" module="filter" />
<!-- <block wx:if="{{ flag }}"> -->
<view class="layout {{ flag?'opacity':'' }}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ role!='other' && approvedSource != '3' ? true:false }}">
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{orderObj.merchantName}}</view>
<view class="arrow" wx:if="{{ userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 }}">
<image class="img" src="/images/arrow_bottom.png" />
</view>
</view>
</navigation-bar>
<view style="margin-top:{{ navBarHeight }}px">
<weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar>
</view>
<view class="main {{ isFullSucreen?'isFullSucreen':'' }}">
<!-- <view class="mainheader">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ role!='other' && approvedSource != '3' ? true:false }}">
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{orderObj.merchantName}}</view>
<view class="arrow" wx:if="{{ userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 }}">
<image class="img" src="/images/arrow_bottom.png" />
</view>
</view>
</navigation-bar>
<view style="margin-top:{{ navBarHeight }}px">
<weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar>
</view>
<view class="main {{ isFullSucreen?'isFullSucreen':'' }}">
<!-- <view class="mainheader">
<view class="title">日报切换</view>
<view class="navigation-title templateNameTitle" bindtap="showStaffPicker">
<picker bindchange="handleTemplagePickerChange" value="{{ orderObj.templateType-1 }}" range-key="name" range="{{ pickerTemplateList }}">
......@@ -28,194 +28,107 @@
</view>
</view>
</view> -->
<view class="box">
<view class="input-item">
<view class="left">
<view class="label {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}">
今日驻店人数(按店)
<text class="required_text" wx:if="{{ orderObj.onBreak == 'N' }}"> *</text>
</view>
</view>
<input
value="{{ orderObj.staffCount }}"
data-name="staffCount"
placeholder-class="placeholder-class"
placeholder-style="{{ orderObj.staffCountEmptyError&& orderObj.onBreak == 'N' ? 'color: #F24724 ': 'color: #D0D2D6' }};"
class="content-input {{ orderObj.staffCountError ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}"
placeholder="{{ orderObj.staffCountEmptyError && orderObj.onBreak == 'N' ? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': '请输入' }}"
bindinput="inputCount"
bindblur="checkValueStaffCount"
disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) }}"
type="{{ 'number' }}"
/>
</view>
<view class="input-item">
<view class="left">
<view class="label {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}">
当日调休
<text class="required_text"> *</text>
</view>
</view>
<picker
disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) }}"
bindchange="handlePickerChange"
bindcancel="showShortcutPicker"
value="{{ orderObj.pickerValue }}"
range-key="name"
range="{{ pickerdateList }}"
>
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide">{{pickerdateList[orderObj.pickerValue]['name']}}</view>
</view>
</picker>
</view>
<view class="input-item">
<view class="left">
<view class="label disabled">
今日成交金额
<text class="required_text"> *</text>
</view>
</view>
<input
value="{{ orderObj.totalOrderMoney }}"
placeholder-class="placeholder-class"
placeholder-style="{{ 'color: #D0D2D6' }};"
class="content-input disabled"
disabled="{{ true }}"
type="{{ 'number' }}"
/>
</view>
<!-- 备注 -->
<view class="remark_box">
<view class="label">备注</view>
<view
class="textArea_box {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || role != 'staff' ?'disabled':'' }}"
>
<textarea
value="{{ orderObj.remark }}"
maxlength="500"
placeholder="请输入"
class="textarea"
bindinput="remarkInput"
disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || role != 'staff' }}"
/>
<view class="currentWordNumber">{{currentWordNumber || 0}} / 500</view>
</view>
</view>
</view>
<!-- 品牌 -->
<block wx:for="{{ carBandList }}" wx:key="arr_index" wx:for-index="arr_index" wx:for-item="item">
<view class="mainheader">
<view class="title" wx:if="{{ item.brandType == 0 }}">问界</view>
<view class="title" wx:elif="{{ item.brandType == 1 }}">鸿蒙</view>
<view class="title" wx:else>{{ item.firstBrandName}}</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
</view>
</view>
</view>
<view class="box" wx:if="{{ item.firstBrandId != -1 }}">
<block
wx:for="{{ filter.filterTemplateList(hwOhterObjArray,orderObj.templateType) }}"
wx:key="hw_index"
wx:for-index="hw_index"
wx:for-item="hw_item"
>
<view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view>
<view wx:else class="input-item">
<view class="left">
<view class="label {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}">
{{hw_item.label}}
<text class="required_text"> {{hw_item.required && orderObj.onBreak == 'N' ? '*' :''}}</text>
</view>
<view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view>
</view>
<input
type="{{ hw_item.type||'number' }}"
value="{{ item[hw_item.key] }}"
data-index="{{ arr_index }}"
data-hwohter-index="{{ hw_index }}"
placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};"
class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}"
placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}"
bindinput="input"
bindblur="checkValue"
data-name="{{ hw_item.key }}"
disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}"
/>
</view>
</block>
</view>
<view class="box" wx:if="{{ item.firstBrandId == -1 }}">
<block
wx:for="{{ filter.filterTemplateList(otherObjArray,orderObj.templateType) }}"
wx:key="hw_index"
wx:for-index="hw_index"
wx:for-item="hw_item"
>
<view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view>
<view wx:else class="input-item">
<view class="left">
<view class="label {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}">
{{hw_item.label}}
<text class="required_text"> {{hw_item.required && orderObj.onBreak == 'N' ? '*' :''}}</text>
</view>
<view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view>
</view>
<input
type="{{ hw_item.type||'number' }}"
value="{{ item[hw_item.key] }}"
data-index="{{ arr_index }}"
data-hwohter-index="{{ hw_index }}"
placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};"
class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}"
placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}"
bindinput="input"
bindblur="checkValue"
data-name="{{ hw_item.key }}"
disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}"
/>
</view>
</block>
</view>
</block>
</view>
<view
class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}"
wx:if="{{ (role == 'staff' && orderObj.isDateWithin7Days) || (role == 'super' && orderObj.isDateWithin60Days) || role == 'other' }}"
>
<!-- 员工 可编辑7天 超管可编辑 60天 督导/老板 可添加评论提交 -->
<view class="btns-con">
<block wx:if="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate) && role != 'other' }}">
<view class="confirm text-center" wx:if="{{ !isEditReport }}" bindtap="editReport">编辑</view>
<block wx:else>
<view class="confirm text-center" bindtap="submit">保存</view>
<view class="save text-center" bindtap="cancelReport">取消</view>
</block>
</block>
<view wx:else class="confirm text-center" bindtap="submit">提交</view>
</view>
</view>
<view class="box">
<view class="input-item">
<view class="left">
<view class="label {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}">
今日驻店人数(按店)
<text class="required_text" wx:if="{{ orderObj.onBreak == 'N' }}"> *</text>
</view>
</view>
<input value="{{ orderObj.staffCount }}" data-name="staffCount" placeholder-class="placeholder-class" placeholder-style="{{ orderObj.staffCountEmptyError&& orderObj.onBreak == 'N' ? 'color: #F24724 ': 'color: #D0D2D6' }};" class="content-input {{ orderObj.staffCountError ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}" placeholder="{{ orderObj.staffCountEmptyError && orderObj.onBreak == 'N' ? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': '请输入' }}" bindinput="inputCount" bindblur="checkValueStaffCount" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) }}" type="{{ 'number' }}" />
</view>
<view class="input-item">
<view class="left">
<view class="label {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}">
当日调休
<text class="required_text"> *</text>
</view>
</view>
<picker disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) }}" bindchange="handlePickerChange" bindcancel="showShortcutPicker" value="{{ orderObj.pickerValue }}" range-key="name" range="{{ pickerdateList }}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide">{{pickerdateList[orderObj.pickerValue]['name']}}</view>
</view>
</picker>
</view>
<view class="input-item">
<view class="left">
<view class="label disabled">
今日成交金额
<text class="required_text"> *</text>
</view>
</view>
<input value="{{ orderObj.totalOrderMoney }}" placeholder-class="placeholder-class" placeholder-style="{{ 'color: #D0D2D6' }};" class="content-input disabled" disabled="{{ true }}" type="{{ 'number' }}" />
</view>
<!-- 备注 -->
<view class="remark_box">
<view class="label">备注</view>
<view class="textArea_box {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || role != 'staff' ?'disabled':'' }}">
<textarea value="{{ orderObj.remark }}" maxlength="500" placeholder="请输入" class="textarea" bindinput="remarkInput" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || role != 'staff' }}" />
<view class="currentWordNumber">{{currentWordNumber || 0}} / 500</view>
</view>
</view>
</view>
<!-- 品牌 -->
<block wx:for="{{ carBandList }}" wx:key="arr_index" wx:for-index="arr_index" wx:for-item="item">
<view class="mainheader">
<view class="title" wx:if="{{ item.brandType == 0 }}">问界</view>
<view class="title" wx:elif="{{ item.brandType == 1 }}">鸿蒙</view>
<view class="title" wx:else>{{ item.firstBrandName}}</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
</view>
</view>
</view>
<view class="box" wx:if="{{ item.firstBrandId != -1 }}">
<block wx:for="{{ filter.filterTemplateList(hwOhterObjArray,orderObj.templateType) }}" wx:key="hw_index" wx:for-index="hw_index" wx:for-item="hw_item">
<view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view>
<view wx:else class="input-item">
<view class="left">
<view class="label {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}">
{{hw_item.label}}
<text class="required_text"> {{hw_item.required && orderObj.onBreak == 'N' ? '*' :''}}</text>
</view>
<view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view>
</view>
<input type="{{ hw_item.type||'number' }}" value="{{ item[hw_item.key] }}" data-index="{{ arr_index }}" data-hwohter-index="{{ hw_index }}" placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};" class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}" placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}" bindinput="input" bindblur="checkValue" data-name="{{ hw_item.key }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}" />
</view>
</block>
</view>
<view class="box" wx:if="{{ item.firstBrandId == -1 }}">
<block wx:for="{{ filter.filterTemplateList(otherObjArray,orderObj.templateType) }}" wx:key="otherIndex" wx:for-index="otherIndex" wx:for-item="hw_item">
<view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view>
<view wx:else class="input-item">
<view class="left">
<view class="label {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}">
{{hw_item.label}}
<text class="required_text"> {{hw_item.required && orderObj.onBreak == 'N' ? '*' :''}}</text>
</view>
<view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view>
</view>
<input type="{{ hw_item.type||'number' }}" value="{{ item[hw_item.key] }}" data-index="{{ arr_index }}" data-other-index="{{ otherIndex }}" placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};" class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}" placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}" bindinput="input" bindblur="checkValue" data-name="{{ hw_item.key }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}" />
</view>
</block>
</view>
</block>
</view>
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{ (role == 'staff' && orderObj.isDateWithin7Days) || (role == 'super' && orderObj.isDateWithin60Days) || role == 'other' }}">
<!-- 员工 可编辑7天 超管可编辑 60天 督导/老板 可添加评论提交 -->
<view class="btns-con">
<block wx:if="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate) && role != 'other' }}">
<view class="confirm text-center" wx:if="{{ !isEditReport }}" bindtap="editReport">编辑</view>
<block wx:else>
<view class="confirm text-center" bindtap="submit">保存</view>
<view class="save text-center" bindtap="cancelReport">取消</view>
</block>
</block>
<view wx:else class="confirm text-center" bindtap="submit">提交</view>
</view>
</view>
</view>
<store-picker
subIndex="{{ pickerType == 'merchant' ? subIndex : staffCurrent }}"
pickList="{{ pickerType == 'merchant' ? merchantRangeList : staffRangeList }}"
show="{{ showPicker }}"
bindsearch="inputSearch"
bindconfirm="changePicker"
bindcancel="cancelPicker"
pickerType="{{ pickerType }}"
/>
<store-picker subIndex="{{ pickerType == 'merchant' ? subIndex : staffCurrent }}" pickList="{{ pickerType == 'merchant' ? merchantRangeList : staffRangeList }}" show="{{ showPicker }}" bindsearch="inputSearch" bindconfirm="changePicker" bindcancel="cancelPicker" pickerType="{{ pickerType }}" />
<!-- 选择流量问题/技能问题/套餐问题 -->
<select-item-popup
show="{{ showSelectItemPopup }}"
title="{{ selectItemTitle }}"
optionList="{{ formData[selectItemIndex].optionList }}"
index="{{ selectItemIndex }}"
bindconfirm="changePromble"
bindcancel="closeSlectItemPopup"
bindclick="click"
/>
\ No newline at end of file
<select-item-popup show="{{ showSelectItemPopup }}" title="{{ selectItemTitle }}" optionList="{{ formData[selectItemIndex].optionList }}" index="{{ selectItemIndex }}" bindconfirm="changePromble" bindcancel="closeSlectItemPopup" bindclick="click" />
\ No newline at end of file
......@@ -61,9 +61,9 @@ const domain_items = {
// dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.104:8292', //叶立庆
// dj: "http://192.168.1.169:8292", //蔡远明
// dj: 'http://192.168.1.104:8292',//范富荣
dj: 'http://192.168.1.104: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.67:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!