Commit ef57a5e5 by 张立顺

Merge branch 'SAAS+V4.55.0-0730' into 'develop'

上线合并

See merge request !406
2 parents fb1f7b16 bc832b58
Showing 133 changed files with 3350 additions and 269 deletions
...@@ -5,13 +5,14 @@ ...@@ -5,13 +5,14 @@
供应商账号:13978573226 (选testfws1) 15023656699 13978573226 供应商账号:13978573226 (选testfws1) 15023656699 13978573226
园区店管理员: 15589265685(测试环境) 15626599736(开发环境) 园区店管理员: 15589265685(测试环境) 15626599736(开发环境)
员工账号 :15626599735 (选明明塘朗园区店) 15626599738(开发环境) 员工账号 :15626599735 (选明明塘朗园区店) 15626599738(开发环境)
员工账号 :18775035205 (选测试园店) 18775035205(选最下面的) 员工账号 :18775035205 (选测试园店) 18775035205(选最下面的) 15814019200
员工账号 :13632791593 (选fennun03能下单 园区测试门店有多条数据) 13132112126(导师) 13132112120(学员) 员工账号 :13632791593 (选fennun03能下单 园区测试门店有多条数据) 13132112126(导师) 13132112120(学员)
员工账号 :15626599738 (开发环境) 员工账号 :15626599738 (开发环境)
超管:18129809927 18372203315 超管:18129809927 18372203315
商户管理员:15814019200 商户管理员:15814019200
区域督导:187750352053 区域督导:187750352053
销售: 15626599743(开发) 销售: 15626599743(开发)
技师: 18925261040(开发)
# 生产环境跟手机号和验证码绑定 需要自己到账号中心绑定手机号成为员工或超管 # 生产环境跟手机号和验证码绑定 需要自己到账号中心绑定手机号成为员工或超管
......
...@@ -360,5 +360,25 @@ module.exports = { ...@@ -360,5 +360,25 @@ module.exports = {
// 根据订单号查询二维码和发票信息 // 根据订单号查询二维码和发票信息
getOrderCode(data) { getOrderCode(data) {
return api.post("dj.api.smartcarlife.vpt.invoiceIssueQrcode.getByOrderCode", data); return api.post("dj.api.smartcarlife.vpt.invoiceIssueQrcode.getByOrderCode", data);
},
// 作废开票二维码
cancelInvoiceQrcode(data) {
return api.post("dj.api.smartcarlife.vpt.invoiceIssueQrcode.cancelInvoiceQrcode", data);
},
// 获取退款申请待审批数目查询
getWaitAuditCountAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.waitForAudit.count', data)
},
// 查询订单可展示按钮类型
getMoreBtnAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.button.select', data)
},
// 退款申请时区域运营查询
areaSupervisionExistsAPI(data) {
return api.post('dj.api.smartcarlife.serviceMerchant.areaSupervision.exists', data)
},
// 退款详情列表查询
getRefundDetailListAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.singleOrder.list', data)
} }
} }
...@@ -116,7 +116,11 @@ ...@@ -116,7 +116,11 @@
"pages/mentorshipManage/mentorshipManage", "pages/mentorshipManage/mentorshipManage",
"pages/tabWorkOrderRelevance/index", "pages/tabWorkOrderRelevance/index",
"pages/invoiceCode/invoiceCode", "pages/invoiceCode/invoiceCode",
"pages/invoiceResult/invoiceResult" "pages/invoiceResult/invoiceResult",
"pages/technicianSearchList/pages/index/technicianSearchList",
"pages/refundOperationList/refundOperationList",
"pages/refundDetailList/refundDetailList",
"pages/refundApply/refundApply"
] ]
}, },
{ {
......
/* components/subShopMerchant/subShopMerchant.wxss */ /* components/subShopMerchant/subShopMerchant.wxss */
.artificer-select-popup-box{ .artificer-select-popup-box {
height: 100%; height: 100%;
width: calc(100% + var(--fontSize64)); width: calc(100% + var(--fontSize64));
transform: translateX(calc(-1 * var(--fontSize32))); transform: translateX(calc(-1 * var(--fontSize32)));
} }
.sub-title { .sub-title {
height: var(--fontSize100); height: var(--fontSize100);
font-size: var(--fontSize32); font-size: var(--fontSize32);
...@@ -15,26 +16,31 @@ ...@@ -15,26 +16,31 @@
z-index: 2; z-index: 2;
border-bottom: var(--fontSize2) solid #F9F9F9; border-bottom: var(--fontSize2) solid #F9F9F9;
} }
.text-hide { .text-hide {
white-space:nowrap; white-space: nowrap;
overflow:hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
} }
.text-center{
.text-center {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.box{
.box {
height: 100%; height: 100%;
padding: 0 var(--fontSize32); padding: 0 var(--fontSize32);
} }
.artificer-box{
.artificer-box {
height: calc(100% - var(--fontSize102)); height: calc(100% - var(--fontSize102));
overflow: hidden; overflow: hidden;
transition: all .25s; transition: all .25s;
} }
.box-title{
.box-title {
color: #333333; color: #333333;
font-size: var(--fontSize32); font-size: var(--fontSize32);
height: var(--fontSize88); height: var(--fontSize88);
...@@ -43,36 +49,42 @@ ...@@ -43,36 +49,42 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.box-title .tips{
.box-title .tips {
color: #333333; color: #333333;
font-size: var(--fontSize24); font-size: var(--fontSize24);
} }
.box-title .tips text{
.box-title .tips text {
color: #347BFF; color: #347BFF;
} }
.artificerList { .artificerList {
width: calc(100% - var(--fontSize50)); width: calc(100% - var(--fontSize50));
height: var(--fontSize98); height: var(--fontSize98);
display: flex; display: flex;
align-items: center; align-items: center;
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #999999; font-size: 28rpx;
color: #292D33;
padding: 0 var(--fontSize25); padding: 0 var(--fontSize25);
transition: all .5s; transition: all .5s;
} }
.checked_img{ .checked_img {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
flex-shrink: 0; flex-shrink: 0;
margin-right: var(--fontSize20); margin-right: var(--fontSize20);
} }
.artificerList .text_box{
.artificerList .text_box {
flex: 1; flex: 1;
border-bottom: var(--fontSize2) solid #F9F9F9; border-bottom: var(--fontSize2) solid #F9F9F9;
height: 100%; height: 100%;
line-height: var(--fontSize98); line-height: var(--fontSize98);
} }
.artificerList.active { .artificerList.active {
color: #347BFF; color: #347BFF;
font-weight: 700; font-weight: 700;
......
...@@ -88,4 +88,5 @@ ...@@ -88,4 +88,5 @@
font-size: 32rpx; font-size: 32rpx;
color: #222222; color: #222222;
text-align: center; text-align: center;
border-bottom: var(--fontSize1) solid #EBEDF0;
} }
\ No newline at end of file \ No newline at end of file
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
<scroll-view wx:if="{{searchSelectIndex == 0}}" scroll-y style="height: calc(100vh - var(--fontSize264) - var(--fontSize88));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" bindscrolltolower="scrollonReachBottom"> <scroll-view wx:if="{{searchSelectIndex == 0}}" scroll-y style="height: calc(100vh - var(--fontSize264) - var(--fontSize88));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" bindscrolltolower="scrollonReachBottom">
<block wx:for="{{storeRangeList}}" wx:key="index" wx:for-index="index"> <block wx:for="{{storeRangeList}}" wx:key="index" wx:for-index="index">
<view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element {{item.actived ? 'active' : ''}}"> <view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element {{item.actived ? 'active' : ''}}">
<view><image src="{{IMG_URL}}/store_icon_nobg.png"></image></view> <view>
<image src="{{IMG_URL}}/store_icon_nobg.png"></image>
</view>
<view class="text_box"> <view class="text_box">
<view class="label">{{item.merchantName}}</view> <view class="label">{{item.merchantName}}</view>
<view class="label_no" wx:if="{{item.merchantId}}">商户号:{{item.merchantId}}</view> <view class="label_no" wx:if="{{item.merchantId}}">商户号:{{item.merchantId}}</view>
...@@ -39,7 +41,9 @@ ...@@ -39,7 +41,9 @@
<scroll-view wx:if="{{customStoreList.length && searchSelectIndex == 1 && userInfo.sceneType == 1}}" scroll-y style="height: calc(100vh - var(--fontSize264) - var(--fontSize88));" enhanced="{{true}}" show-scrollbar="{{false}}" bindscrolltolower="scrollonReachBottom"> <scroll-view wx:if="{{customStoreList.length && searchSelectIndex == 1 && userInfo.sceneType == 1}}" scroll-y style="height: calc(100vh - var(--fontSize264) - var(--fontSize88));" enhanced="{{true}}" show-scrollbar="{{false}}" bindscrolltolower="scrollonReachBottom">
<block wx:for="{{customStoreList}}" wx:key="index" wx:for-index="index"> <block wx:for="{{customStoreList}}" wx:key="index" wx:for-index="index">
<view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element custom_element {{item.actived ? 'active' : ''}}"> <view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element custom_element {{item.actived ? 'active' : ''}}">
<view><image src="{{IMG_URL}}/user_avatar.png"></image></view> <view>
<image src="{{IMG_URL}}/user_avatar.png"></image>
</view>
<view class="text_box"> <view class="text_box">
<view class="custom_text"> <view class="custom_text">
<view class="name_phone"> <view class="name_phone">
...@@ -56,7 +60,7 @@ ...@@ -56,7 +60,7 @@
</scroll-view> </scroll-view>
<block wx:if="{{(!customStoreList.length && searchSelectIndex == 1) || (!storeRangeList.length && searchSelectIndex == 0)}}"> <block wx:if="{{(!customStoreList.length && searchSelectIndex == 1) || (!storeRangeList.length && searchSelectIndex == 0)}}">
<view class="list_not"> <view class="list_not">
<image class="list_nothing_img {{customSearchFlag ? '' : 'big_list_nothing_img'}}" src="{{IMG_URL}}/{{customSearchFlag ? 'no_data_bg' : 'search_icon_bg'}}.png" mode=""/> <image class="list_nothing_img {{customSearchFlag ? '' : 'big_list_nothing_img'}}" src="{{IMG_URL}}/{{customSearchFlag ? 'no_data_bg' : 'search_icon_bg'}}.png" mode="" />
<view class="list_not_text">{{customSearchFlag ? '您搜索的内容暂无结果' : '快去搜索看看'}}</view> <view class="list_not_text">{{customSearchFlag ? '您搜索的内容暂无结果' : '快去搜索看看'}}</view>
</view> </view>
</block> </block>
......
// components/areaOperationsModal/areaOperationsModal.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
isShow: {
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL
},
/**
* 组件的方法列表
*/
methods: {
handleClose() {
this.triggerEvent('close')
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* components/areaOperationsModal/areaOperationsModal.wxss */
.icon {
width: 64px;
height: 64px;
}
.layout {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 1000;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.bg {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
background: rgba(0, 0, 0, .8);
}
.content {
position: relative;
text-align: center;
box-sizing: border-box;
padding: var(--fontSize48) var(--fontSize76);
width: var(--fontSize542);
height: var(--fontSize576);
background-image: linear-gradient(180deg, #F7F9FF 0%, #FFFFFF 54%);
border-radius: var(--fontSize24);
font-weight: 400;
font-size: var(--fontSize28);
color: #9B9B9E;
}
.title {
text-align: center;
font-weight: 500;
font-size: var(--fontSize48);
color: #292D33;
margin-top: var(--fontSize32);
}
.tipTxt {
font-size: 14px;
color: #9B9B9E;
margin-top: var(--fontSize8);
}
.btn {
position: absolute;
bottom: var(--fontSize80);
width: var(--fontSize392);
height: var(--fontSize96);
line-height: var(--fontSize96);
text-align: center;
background: #347BFF;
border-radius: var(--fontSize12);
font-weight: 600;
font-size: var(--fontSize36);
color: #FFFFFF;
margin-top: var(--fontSize48);
}
\ No newline at end of file \ No newline at end of file
<!--components/areaOperationsModal/areaOperationsModal.wxml-->
<view wx:if="{{isShow}}" class="layout">
<view class="bg" bindtap="handleShow" />
<view class="content">
<image class="icon" src="{{IMG_URL}}equity/reopen_error.png" show-menu-by-longpress="{{true}}"></image>
<view class="title">申请失败</view>
<view class="tipTxt">未配置区域运营,请联系总部处理</view>
<view class="btn" bindtap="handleClose">知道了</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2; let index = 1;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
......
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
} = await api.post('dj.api.carboutique.staff.study.punish') } = await api.post('dj.api.carboutique.staff.study.punish')
if (data) wx.showModal({ if (data) wx.showModal({
title: '温馨提示', title: '温馨提示',
content: '未完成学习任务,禁止提单!\n请在展业助手上完成任务。', content: '未完成学习任务,禁止提单!\n请在平板电脑上展业助手-学习中心完成学习。',
showCancel: false, showCancel: false,
cancelColor: "#292D33", cancelColor: "#292D33",
confirmText: '确定', confirmText: '确定',
......
...@@ -237,5 +237,9 @@ module.exports = { ...@@ -237,5 +237,9 @@ module.exports = {
// 根据商户号获取可选商品列表 // 根据商户号获取可选商品列表
getSelectOrderGoodsList(data){ getSelectOrderGoodsList(data){
return api.post('dj.api.smartcarlife.selectOrderGoods.list', data) return api.post('dj.api.smartcarlife.selectOrderGoods.list', data)
},
// 查询订单可展示按钮类型
getMoreBtnAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.button.select', data)
} }
} }
...@@ -70,6 +70,7 @@ Page({ ...@@ -70,6 +70,7 @@ Page({
isStaff: false, isStaff: false,
storeRange: [], storeRange: [],
showPage: false, showPage: false,
invoiceOrderInfo: {}
// hasMode:true // hasMode:true
}, },
async navigator(e) { async navigator(e) {
...@@ -635,6 +636,11 @@ Page({ ...@@ -635,6 +636,11 @@ Page({
*/ */
onShow() { onShow() {
this.initList(); this.initList();
const selectInvoiceObj = getApp().globalData.selectInvoiceObj;
this.setData({
invoiceOrderInfo: selectInvoiceObj?.isOpen ? selectInvoiceObj.codeInfo : {}
})
delete getApp().globalData?.selectInvoiceObj; // 使用后清除
// let { tabIndex } = this.data // let { tabIndex } = this.data
// this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad() // this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad()
}, },
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<view class="layout {{ waitInputCount && mode == 1 && tabIndex == 0 ?'tipsHeigh':'layout_noTips' }}" style="padding-top:{{ navBarHeight }}px;position: relative;"> <view class="layout {{ waitInputCount && mode == 1 && tabIndex == 0 ?'tipsHeigh':'layout_noTips' }}" style="padding-top:{{ navBarHeight }}px;position: relative;">
<block wx:if="{{ navBarHeight && showPage }}"> <block wx:if="{{ navBarHeight && showPage }}">
<!-- wx:if="{{ tabIndex == 0}}" wx:if="{{ tabIndex == 1}}" --> <!-- wx:if="{{ tabIndex == 0}}" wx:if="{{ tabIndex == 1}}" -->
<quotation-list id="page-1" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 1?'':'hide' }}" mode="{{ mode }}" staffUuid="{{staffUuid}}" /> <quotation-list id="page-1" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 1?'':'hide' }}" mode="{{ mode }}" staffUuid="{{staffUuid}}" invoiceOrderInfo="{{invoiceOrderInfo}}"/>
<home id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}" navBarHeight="{{ navBarHeight }}" waitInputCount="{{waitInputCount}}" mode="{{ mode }}" showScreen="{{showScreen}}" show="{{tabIndex == 0}}"></home> <home id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}" navBarHeight="{{ navBarHeight }}" waitInputCount="{{waitInputCount}}" mode="{{ mode }}" showScreen="{{showScreen}}" show="{{tabIndex == 0}}"></home>
<equity-list id="page-2" outTabIndex="{{ tabIndex }}" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 2?'':'hide' }}" /> <equity-list id="page-2" outTabIndex="{{ tabIndex }}" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 2?'':'hide' }}" />
<makert-material id="page-3" navBarHeight="{{ navBarHeight }}" class="pagedetail {{tabIndex == 3?'':'hide'}}"></makert-material> <makert-material id="page-3" navBarHeight="{{ navBarHeight }}" class="pagedetail {{tabIndex == 3?'':'hide'}}"></makert-material>
......
...@@ -9,13 +9,15 @@ import { ...@@ -9,13 +9,15 @@ import {
getQuotationInfoById, getQuotationInfoById,
updateCustomerInfo, updateCustomerInfo,
errorOrderById, errorOrderById,
updateZyInfo updateZyInfo,
getMoreBtnAPI
} from "../../../api"; } from "../../../api";
import { import {
checkDailyReport checkDailyReport
} from "~/store/ModalToQueueControl"; } from "~/store/ModalToQueueControl";
import data from "../constant/data"; import data from "../constant/data";
import constantData from "../constant/data"; import constantData from "../constant/data";
import api from "~/api/api"
import { import {
ImgUrl as IMG_URL ImgUrl as IMG_URL
} from "~/config"; } from "~/config";
...@@ -38,6 +40,9 @@ Component({ ...@@ -38,6 +40,9 @@ Component({
}, },
staffUuid: { staffUuid: {
type: String type: String
},
invoiceOrderInfo: {
type: Object
} }
}, },
/** /**
...@@ -217,11 +222,10 @@ Component({ ...@@ -217,11 +222,10 @@ Component({
// 更多按钮 // 更多按钮
moreBtnVisible: false, moreBtnVisible: false,
btnOrderInfo: {}, btnOrderInfo: {},
btnsList: [{ btnsList: [],
name: '申请开票'
}],
// 选择发票 // 选择发票
invoiveVisible: false invoiveVisible: false,
areaOperationsFlag: false
}, },
observers: { observers: {
mode: function (value) { mode: function (value) {
...@@ -234,6 +238,14 @@ Component({ ...@@ -234,6 +238,14 @@ Component({
tabList: value ? tabListSimple : tabListNor, tabList: value ? tabListSimple : tabListNor,
}); });
}, },
'invoiceOrderInfo'(val) {
if(val?.orderCode) {
this.setData({
btnOrderInfo: val || {}
})
this.handleSelectInvoice()
}
}
}, },
lifetimes: { lifetimes: {
attached() { attached() {
...@@ -312,7 +324,7 @@ Component({ ...@@ -312,7 +324,7 @@ Component({
merchantBrand merchantBrand
} = this.data; } = this.data;
// wx.$router.go(mode ? 'createOrderCarQuotationSimple' : 'createOrderCarQuotation') // wx.$router.go(mode ? 'createOrderCarQuotationSimple' : 'createOrderCarQuotation')
if (merchantBrand.findIndex((i) => ["鸿蒙智行"].includes(i.name)) != -1) if (merchantBrand?.findIndex((i) => ["鸿蒙智行"].includes(i.name)) != -1)
wx.$router.go("beforeCreate", { wx.$router.go("beforeCreate", {
mode, mode,
}); });
...@@ -366,7 +378,7 @@ Component({ ...@@ -366,7 +378,7 @@ Component({
if (!arr) { if (!arr) {
return arr; return arr;
} }
var attrList = ["equityPrice", "quotedPrice", "quotedPriceUpdate"]; var attrList = ["equityPrice", "quotedPrice", "quotedPriceUpdate", "refundAmount"];
arr.forEach((item) => { arr.forEach((item) => {
attrList.forEach((k) => { attrList.forEach((k) => {
if (item[k]) { if (item[k]) {
...@@ -1253,17 +1265,39 @@ Component({ ...@@ -1253,17 +1265,39 @@ Component({
}, },
/** 更多按钮 */ /** 更多按钮 */
handleMoreBtn(e) { handleMoreBtn(e) {
let { const { target } = e.currentTarget.dataset
target let { isOrder } = this.data
} = e.currentTarget.dataset const btnArr = []
console.log(target, 'tttt') // 判断是否显示发票入口
if (target.showInvoiceEntrance) {
btnArr.push({
name: target.invoicing === 2 ? '查看发票' : '申请开票'
})
}
// 查询订单可展示按钮
getMoreBtnAPI({orderCode: target.payId}).then(res => {
let { code, message, data } = res
if (code == 0) {
if (data.refundApplyButton == 'Y' && target.zyPayStatus != 1 && isOrder) {
btnArr.push({ name: '申请退款' })
}
if (data.refundApplyDetailButton == 'Y' && target.zyPayStatus != 1 && isOrder) {
btnArr.push({ name: '退款详情' })
}
this.setData({ this.setData({
'btnsList[0].name': target.invoicing == 2 ? '查看发票' : '申请开票' btnsList: btnArr,
btnOrderInfo: { ...target, orderCode: target.payId }
}) })
target.orderCode = target.payId
this.handleBtnCancel() this.handleBtnCancel()
} else {
wx.$util.showToast(message)
}
})
},
// 关闭未配置区域运营弹窗提示
closeModal() {
this.setData({ this.setData({
btnOrderInfo: target || {} areaOperationsFlag: false
}) })
}, },
handleBtnCancel() { handleBtnCancel() {
...@@ -1275,7 +1309,53 @@ Component({ ...@@ -1275,7 +1309,53 @@ Component({
}) })
}, },
handleBtnClick(e) { handleBtnClick(e) {
const btnName = e.detail.name
let { btnOrderInfo } = this.data
switch (btnName) {
case '申请开票':
case '查看发票':
this.handleInvoiceDetail() this.handleInvoiceDetail()
break
case '申请退款':
// 申请退款点击埋点
wx.$track.setTrackData(0, 'apply_refund_page', {}, '', 0)
let userInfo = wx.$util.getUserInfo()
// 退款申请时区域运营查询
api.areaSupervisionExistsAPI({merchantId: userInfo.shopMerchantId, sceneType: userInfo.sceneType}).then(res => {
let {code, data} = res
if (code == 0) {
if (!data) {
this.setData({ areaOperationsFlag: true })
this.handleBtnCancel()
return
} else {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?orderCode=${btnOrderInfo.orderCode}&shopMerchantName=${btnOrderInfo.merchantName}&shopMerchantId=${btnOrderInfo.merchantId}`,
})
}
}
})
break
case '退款详情':
// 退款详情点击埋点
wx.$track.setTrackData(0, 'refund_detail_page', {}, '', 0)
// 点击退款详情,判断是否存在多条退款申请记录,存在跳转列表页,不存在直接跳转详情页
api.getRefundDetailListAPI({orderCode: btnOrderInfo.orderCode}).then(res => {
let { code, data } = res
if (code == 0) {
if (data?.length > 1) {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundDetailList/refundDetailList?orderCode=${btnOrderInfo.orderCode}`,
})
} else if (data.length == 1) {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${data[0].applyCode}`,
})
}
}
})
break
}
this.handleBtnCancel() this.handleBtnCancel()
}, },
handleSelectInvoice() { handleSelectInvoice() {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"order-screen": "../components/OrderScreen/OrderScreen", "order-screen": "../components/OrderScreen/OrderScreen",
"zy-pay-popup": "../components/zyPayPopup/zyPayPopup", "zy-pay-popup": "../components/zyPayPopup/zyPayPopup",
"more-btn": "/components/MoreBtn/MoreBtn", "more-btn": "/components/MoreBtn/MoreBtn",
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal" "select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal",
"area-operations-modal": "/components/areaOperationsModal/areaOperationsModal"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -121,6 +121,10 @@ ...@@ -121,6 +121,10 @@
<text class="unit">¥</text> <text class="unit">¥</text>
{{item.quotedPriceUpdate || ''}} {{item.quotedPriceUpdate || ''}}
</view> </view>
<view class="refund-box" wx:if="{{item.refundAmount}}">部分退款
<text class="unit">¥</text>
{{item.refundAmount}}
</view>
<!-- 已录单未签名 --> <!-- 已录单未签名 -->
<!-- <view wx:if="{{(item.orderStatus == '3' && item.equityOrderStatus == '0') || (item.orderStatus == '5' && item.equityOrderStatus == '0')}}" class="orange-txt"> <!-- <view wx:if="{{(item.orderStatus == '3' && item.equityOrderStatus == '0') || (item.orderStatus == '5' && item.equityOrderStatus == '0')}}" class="orange-txt">
<image class="icon-info" src="/packageEquity/images/icon-info.png"></image> <image class="icon-info" src="/packageEquity/images/icon-info.png"></image>
...@@ -169,7 +173,7 @@ ...@@ -169,7 +173,7 @@
</block> </block>
<block wx:else> <block wx:else>
<view wx:if="{{ item.orderStatus != '4' && item.orderStatus!=11&& item.orderStatus!=9 }}" class="btn_class"> <view wx:if="{{ item.orderStatus != '4' && item.orderStatus!=11&& item.orderStatus!=9 }}" class="btn_class">
<block wx:if="{{item.showInvoiceEntrance}}"> <block wx:if="{{item.showInvoiceEntrance || ((item.orderStatus == 3 || item.orderStatus == 5 || item.orderStatus == 6) && item.payType != 2 && isOrder)}}">
<view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view> <view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view>
</block> </block>
<block wx:if="{{ item.canUpdateZyPayUrl == 1 && item.zyPayStatus == 2 }}"> <block wx:if="{{ item.canUpdateZyPayUrl == 1 && item.zyPayStatus == 2 }}">
...@@ -196,14 +200,14 @@ ...@@ -196,14 +200,14 @@
</block> </block>
</view> </view>
<view wx:else class="btn_class"> <view wx:else class="btn_class">
<block wx:if="{{item.showInvoiceEntrance}}"> <block wx:if="{{item.showInvoiceEntrance || ((item.orderStatus == 3 || item.orderStatus == 5 || item.orderStatus == 6) && item.payType != 2 && isOrder)}}">
<view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view> <view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view>
</block> </block>
</view> </view>
</block> </block>
</block> </block>
<view wx:else class="btn_class"> <view wx:else class="btn_class">
<block wx:if="{{item.showInvoiceEntrance}}"> <block wx:if="{{item.showInvoiceEntrance || ((item.orderStatus == 3 || item.orderStatus == 5 || (item.orderStatus == 6 && item.refundAmount)) && item.payType != 2 && isOrder)}}">
<view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view> <view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view>
</block> </block>
</view> </view>
...@@ -306,3 +310,4 @@ ...@@ -306,3 +310,4 @@
<zy-pay-popup wx:if="{{showZyPayPopup}}" showZyTarget="{{showZyTarget}}" updateZyFlag="{{updateZyFlag}}" isListShow="{{true}}" show="{{showZyPayPopup}}" bindconfirm="zyPayConfirm"></zy-pay-popup> <zy-pay-popup wx:if="{{showZyPayPopup}}" showZyTarget="{{showZyTarget}}" updateZyFlag="{{updateZyFlag}}" isListShow="{{true}}" show="{{showZyPayPopup}}" bindconfirm="zyPayConfirm"></zy-pay-popup>
<more-btn wx:if="{{ moreBtnVisible }}" popupVisible="{{ moreBtnVisible }}" btnsList="{{btnsList}}" bindcancel="handleBtnCancel" bindbtnClick="handleBtnClick"></more-btn> <more-btn wx:if="{{ moreBtnVisible }}" popupVisible="{{ moreBtnVisible }}" btnsList="{{btnsList}}" bindcancel="handleBtnCancel" bindbtnClick="handleBtnClick"></more-btn>
<select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{btnOrderInfo}}"></select-invoice-modal> <select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{btnOrderInfo}}"></select-invoice-modal>
<area-operations-modal wx:if="{{areaOperationsFlag}}" isShow="{{areaOperationsFlag}}" bindclose="closeModal"></area-operations-modal>
\ No newline at end of file \ No newline at end of file
...@@ -503,6 +503,21 @@ ...@@ -503,6 +503,21 @@
color: #347BFF; color: #347BFF;
} }
.refund-box{
margin-left: var(--fontSize16);
background: #FFF2E0;
padding: var(--fontSize4) var(--fontSize8);
color: #F7A431;
font-size: var(--fontSize24);
font-weight: 500;
font-family: 'numberBold';
border-radius: var(--fontSize4);
}
.refund-box .unit {
font-size: var(--fontSize24);
}
.orange-txt { .orange-txt {
color: #EB9B2F; color: #EB9B2F;
} }
......
...@@ -42,7 +42,8 @@ Page({ ...@@ -42,7 +42,8 @@ Page({
} }
], ],
businessTypeList: [ businessTypeList: [
{ label: '延保/权益', type: 0 }, { label: '延保', type: 0 },
{ label: '权益', type: 2 },
{ label: '精品', type: 1 } { label: '精品', type: 1 }
], ],
activeTab: -1, activeTab: -1,
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
</view> </view>
<view class="record-message"> <view class="record-message">
<view> <view>
<text class="record-label" wx:if="{{itemInfo.carBrand}}">{{itemInfo.carBrand}}</text>
<text class="record-label" wx:if="{{itemInfo.carModel}}">{{itemInfo.carModel}}</text> <text class="record-label" wx:if="{{itemInfo.carModel}}">{{itemInfo.carModel}}</text>
<text class="record-label" wx:if="{{itemInfo.tag}}">{{itemInfo.tag}}</text> <text class="record-label" wx:if="{{itemInfo.tag}}">{{itemInfo.tag}}</text>
<text class="record-label-error" wx:if="{{itemInfo.qualityCheckScore <= 20 && itemInfo.qualityCheckScore !== null && itemInfo.qualityCheckScore !== undefined && !hideScore}}">疑似虚假接待</text> <text class="record-label-error" wx:if="{{itemInfo.qualityCheckScore <= 20 && itemInfo.qualityCheckScore !== null && itemInfo.qualityCheckScore !== undefined && !hideScore}}">疑似虚假接待</text>
......
...@@ -10,6 +10,7 @@ import { ...@@ -10,6 +10,7 @@ import {
getRecordDetailList getRecordDetailList
} from "../../receptionRecordsApi" } from "../../receptionRecordsApi"
import aiApi from '../../aiApi' import aiApi from '../../aiApi'
import { getWaitAuditCountAPI } from '~/api/api'
let lastPath = null; // 用于存储上一次的路径 let lastPath = null; // 用于存储上一次的路径
function throttle(func, delay) { function throttle(func, delay) {
let timeoutId; let timeoutId;
...@@ -609,6 +610,7 @@ Component({ ...@@ -609,6 +610,7 @@ Component({
this.getTotal(this.data.dataActive); this.getTotal(this.data.dataActive);
let eventArr = [this.getYqStoreConfig(), this.getInspectionBadgeCode(), this.getBusiness(), this.getStoreList(), this.extractCheck()] let eventArr = [this.getYqStoreConfig(), this.getInspectionBadgeCode(), this.getBusiness(), this.getStoreList(), this.extractCheck()]
if (isStaff) eventArr.push(this.getStaffTargetTask(), this.getIsMentor()) if (isStaff) eventArr.push(this.getStaffTargetTask(), this.getIsMentor())
if (userInfo.loginRole == 3) eventArr.push(this.getAwaitAuditCount(userInfo))
Promise.all(eventArr).then(() => { Promise.all(eventArr).then(() => {
this.menuListRest(); // 解决融合和非融合互相切换导致战败按钮问题 this.menuListRest(); // 解决融合和非融合互相切换导致战败按钮问题
}) })
...@@ -617,6 +619,30 @@ Component({ ...@@ -617,6 +619,30 @@ Component({
// 非区域督导和超管角色 // 非区域督导和超管角色
if (!userInfo?.isSuper && userInfo?.loginRole != 3 && userInfo?.loginRole != 6) this.getMerchantCarBrandList(); if (!userInfo?.isSuper && userInfo?.loginRole != 3 && userInfo?.loginRole != 6) this.getMerchantCarBrandList();
}, },
getAwaitAuditCount(userInfo) {
return new Promise(resolve => {
let { menuList } = this.data
// 区域运营角色退款审批入口
if (userInfo?.loginRole == 3 && menuList.every(item => item.menuText != '待审批')) {
menuList.push({
menuText: '待审批',
path: 'tabWorkOrder.refundOperationList',
icon: 'refund_review_icon',
tipsNum: 0
})
}
let index = menuList.findIndex(e => e.menuText == '待审批')
getWaitAuditCountAPI({sceneType: userInfo?.sceneType}).then(res => {
let { code, data } = res
if (code == 0) {
this.setData({
[`menuList[${index}].tipsNum`]: data.waiteForAuditNum
})
}
})
resolve()
})
},
getStoreList() { getStoreList() {
return new Promise(resolve => { return new Promise(resolve => {
// if (wx.$receptionLoaded) return // if (wx.$receptionLoaded) return
...@@ -1193,7 +1219,7 @@ Component({ ...@@ -1193,7 +1219,7 @@ Component({
/**禁止提单 */ /**禁止提单 */
if(item.beforeClick && await wx.$globalDataFunction[item.beforeClick]()) return if(item.beforeClick && await wx.$globalDataFunction[item.beforeClick]()) return
if ( if (
merchantBrand.findIndex((i) => ["鸿蒙智行"].includes(i.name)) != -1 merchantBrand?.findIndex((i) => ["鸿蒙智行"].includes(i.name)) != -1
) { ) {
wx.$router.go("beforeCreate", { wx.$router.go("beforeCreate", {
mode, mode,
......
...@@ -7,9 +7,12 @@ import { ...@@ -7,9 +7,12 @@ import {
import dayjs from 'dayjs' import dayjs from 'dayjs'
export default { export default {
enterPageTrack(e) { enterPageTrack(e) {
const userInfo = wx.$util.getUserInfo()
const params = { const params = {
goodsId: e.detail, goodsId: e.detail,
goodsType: 0, goodsType: 0,
merchantId: userInfo.default4SStoreInfo.merchantId,
merchantName: userInfo.default4SStoreInfo.merchantName
} }
enterPageTrack(params).then(({ enterPageTrack(params).then(({
data data
......
...@@ -135,9 +135,12 @@ Page({ ...@@ -135,9 +135,12 @@ Page({
this.onClose() this.onClose()
}, },
enterPageTrack(goodsId) { enterPageTrack(goodsId) {
const userInfo = wx.$util.getUserInfo()
const params = { const params = {
goodsId, goodsId,
goodsType: 0, goodsType: 0,
merchantId: userInfo.default4SStoreInfo.merchantId,
merchantName: userInfo.default4SStoreInfo.merchantName
} }
enterPageTrack(params).then(({ enterPageTrack(params).then(({
data data
......
...@@ -19,7 +19,8 @@ Page({ ...@@ -19,7 +19,8 @@ Page({
3: '区域运营', 3: '区域运营',
4: '驻店负责人', 4: '驻店负责人',
5: '销售', 5: '销售',
6: '飞行督导' 6: '飞行督导',
7: '技师'
}, },
selectedUuid: '', selectedUuid: '',
requestFlag: false requestFlag: false
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<block wx:for="{{loginUserInfoList}}" wx:key="index"> <block wx:for="{{loginUserInfoList}}" wx:key="index">
<view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}"> <view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<view class="right"> <view class="right">
<view class="midle {{item.isSuper==true?'midle_1':item.userType==1?'midle_2':(item.loginRole == 3 || item.loginRole == 5 || item.loginRole == 6) ?'midle_3' : item.loginRole == 4 ? 'midle_4' : 'midle_5'}}"> <view class="midle {{item.isSuper==true?'midle_1':item.userType==1?'midle_2':(item.loginRole == 3 || item.loginRole == 5 || item.loginRole == 6) ?'midle_3' : item.loginRole == 4 ? 'midle_4' :item.loginRole == 7 ? 'midle_6':'midle_5'}}">
{{item.isSuper==true?'超管':item.userType==1?'商户':item.loginRole == 3 || item.loginRole == 6 ? '督导' : item.loginRole == 5? '销售':item.loginRole == 4 ? '驻店' : '员工'}} {{item.isSuper==true?'超管':item.userType==1?'商户':item.loginRole == 3 || item.loginRole == 6 ? '督导' : item.loginRole == 5? '销售':item.loginRole == 4 ? '驻店' : item.loginRole == 7 ? '技师':'员工'}}
</view> </view>
</view> </view>
<view class="left"> <view class="left">
......
...@@ -132,6 +132,11 @@ ...@@ -132,6 +132,11 @@
/* border: var(--fontSize2) solid #35C376; */ /* border: var(--fontSize2) solid #35C376; */
background-color: #35c3761a; background-color: #35c3761a;
} }
.items .right .midle_6{
color: #7F80FE;
/* border: var(--fontSize2) solid #35C376; */
background: #7f80fe1a;
}
.items .right .icon{ .items .right .icon{
width: var(--fontSize40); width: var(--fontSize40);
height: var(--fontSize40); height: var(--fontSize40);
......
...@@ -32,6 +32,7 @@ Page({ ...@@ -32,6 +32,7 @@ Page({
initData(auto = true, navigateParams) { initData(auto = true, navigateParams) {
console.log('initData');
try { try {
if (this.scene && auto) return //有scene return if (this.scene && auto) return //有scene return
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
......
...@@ -24,10 +24,11 @@ Page({ ...@@ -24,10 +24,11 @@ Page({
if (jumpPageFlag) return; if (jumpPageFlag) return;
this.setData({ jumpPageFlag: true }); this.setData({ jumpPageFlag: true });
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
if ( if (
!openSceneArr.includes(scene) && !openSceneArr.includes(scene) &&
!userInfo?.isSuper && !userInfo?.isSuper &&
!(userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6) !(userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6)
) { ) {
this.setData({ jumpPageFlag: false }); this.setData({ jumpPageFlag: false });
return wx.$util.showToast("暂未开通此场景"); return wx.$util.showToast("暂未开通此场景");
......
...@@ -325,7 +325,7 @@ Page({ ...@@ -325,7 +325,7 @@ Page({
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig, phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
}); });
// this.getStatByPeriod() // this.getStatByPeriod()
// this.getiIviteRecord() // this.getiIviteRecord()
......
...@@ -116,7 +116,7 @@ Page({ ...@@ -116,7 +116,7 @@ Page({
show: true, show: true,
title: "请选择录单入口", title: "请选择录单入口",
tabTitleShow: false, tabTitleShow: false,
success:async (res) => { success: async (res) => {
// 跳转新增订单页面 并带特定参数 // 跳转新增订单页面 并带特定参数
let { let {
orderInfo, orderInfo,
...@@ -124,7 +124,7 @@ Page({ ...@@ -124,7 +124,7 @@ Page({
} = this.data; } = this.data;
console.log(item, "showSelectType"); console.log(item, "showSelectType");
if (selectType == 1) { if (selectType == 1) {
if(await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
wx.$router.go("tabWorkOrder.createOrder", { wx.$router.go("tabWorkOrder.createOrder", {
scene, scene,
...item, ...item,
...@@ -240,7 +240,7 @@ Page({ ...@@ -240,7 +240,7 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport();
if (staffCheck) return false; if (staffCheck) return false;
if(name == 'createOrder' && await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */ if (name == 'createOrder' && await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */
// 是微信支付直接跳转确认页面 // 是微信支付直接跳转确认页面
if (userType == 2 && item?.selectPayType == 1) { if (userType == 2 && item?.selectPayType == 1) {
wx.$router.go("tabWorkOrder.confirmOrder", item); wx.$router.go("tabWorkOrder.confirmOrder", item);
...@@ -796,7 +796,7 @@ Page({ ...@@ -796,7 +796,7 @@ Page({
// this.test() // this.test()
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
}); });
this.getCreateOrderSetting() this.getCreateOrderSetting()
}, },
......
...@@ -8,15 +8,7 @@ ...@@ -8,15 +8,7 @@
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
<input <input type="text" placeholder="客户姓名/商品名称/订单编号/手机号" class="input" value="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
type="text"
placeholder="客户姓名/商品名称/订单编号/手机号"
class="input"
value="{{ keyword }}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search"
/>
<block wx:if="{{ keyword }}"> <block wx:if="{{ keyword }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" /> <image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block> </block>
...@@ -32,40 +24,14 @@ ...@@ -32,40 +24,14 @@
</view> </view>
<!-- 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 --> <!-- 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 -->
<block wx:if="{{ flag }}"> <block wx:if="{{ flag }}">
<scroll-view <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 }}">
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:if="{{ list.length > 0 }}">
<block wx:for="{{ list }}" wx:key="index"> <block wx:for="{{ list }}" wx:key="index">
<block wx:for="{{ item }}" wx:for-item="li" wx:for-index="ind" wx:key="ind"> <block wx:for="{{ item }}" wx:for-item="li" wx:for-index="ind" wx:key="ind">
<view <view style="{{ li.txtStyle }}" class="touch-item {{ li.isTouchMove ? 'touch-move-active' : '' }}" data-ind="{{ ind }}" data-index="{{ index }}">
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" /> <image wx:if="{{ li.outboundStatus == 4 }}" class="stockIcon" src="../../images/stockIcon.png" />
<view <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 }}">
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 }};"> <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="{{ li.status == 1||li.status == 3 }}">
<block wx:if="{{ status[li.status].background }}"> <block wx:if="{{ status[li.status].background }}">
...@@ -82,11 +48,7 @@ ...@@ -82,11 +48,7 @@
<view class="name"> <view class="name">
<!-- <image src="/images/avatar.png" /> --> <!-- <image src="/images/avatar.png" /> -->
<view class="name-text text-hide">{{li.customer.customerName}}</view> <view class="name-text text-hide">{{li.customer.customerName}}</view>
<image <image class="name-sex-icon" src="{{ IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png' }}" mode="" />
class="name-sex-icon"
src="{{ IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png' }}"
mode=""
/>
</view> </view>
<view class="goods-list" style="padding-bottom:{{ li.subOrderList.length<1?0:'' }}"> <view class="goods-list" style="padding-bottom:{{ li.subOrderList.length<1?0:'' }}">
<block wx:if="{{ li.subOrderList.length }}"> <block wx:if="{{ li.subOrderList.length }}">
...@@ -171,14 +133,7 @@ ...@@ -171,14 +133,7 @@
<!-- footer --> <!-- footer -->
</view> </view>
<block wx:if="{{ isMake }}"> <block wx:if="{{ isMake }}">
<view <view wx:if="{{ !li['confirmIndex'] }}" class="del" catchtap="delBtn" data-ind="{{ ind }}" data-item="{{ li }}" data-index="{{ index }}">
wx:if="{{ !li['confirmIndex'] }}"
class="del"
catchtap="delBtn"
data-ind="{{ ind }}"
data-item="{{ li }}"
data-index="{{ index }}"
>
<view>撤销</view> <view>撤销</view>
<view>工单</view> <view>工单</view>
</view> </view>
...@@ -197,7 +152,7 @@ ...@@ -197,7 +152,7 @@
</scroll-view> </scroll-view>
</block> </block>
</view> </view>
<block wx:if="{{ (!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 )&& showIcon1 && isMake }}"> <block wx:if="{{ (!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && userInfo.loginRole!=7 )&& showIcon1 && isMake }}">
<view class="fixed-btns"> <view class="fixed-btns">
<view class="btn text-center" bindtap="jump" data-name="createOrder"> <view class="btn text-center" bindtap="jump" data-name="createOrder">
<image src="{{ IMG_URL }}upgrade/scancode_verification02.png" /> <image src="{{ IMG_URL }}upgrade/scancode_verification02.png" />
......
...@@ -250,7 +250,8 @@ export const checkScene = options => { ...@@ -250,7 +250,8 @@ export const checkScene = options => {
'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex', 'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex',
'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex', 'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex',
'h5AuthPhone': 'pages/h5AuthPhone/h5AuthPhone', 'h5AuthPhone': 'pages/h5AuthPhone/h5AuthPhone',
'mentorShipManage': 'tabWorkOrder/pages/mentorshipManage/mentorshipManage' 'mentorShipManage': 'tabWorkOrder/pages/mentorshipManage/mentorshipManage',
'refundApply': 'tabWorkOrder/pages/refundApply/refundApply'
} }
options.path = pagePath[query.page] options.path = pagePath[query.page]
} }
......
...@@ -166,7 +166,7 @@ Page({ ...@@ -166,7 +166,7 @@ Page({
} }
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6), isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6|| userInfo?.loginRole == 7),
}); });
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig); this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig);
}, },
......
...@@ -8,12 +8,7 @@ ...@@ -8,12 +8,7 @@
<block wx:for="{{ customerObj }}" wx:key="index"> <block wx:for="{{ customerObj }}" wx:key="index">
<view class="item"> <view class="item">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view <view class="value {{ item.key != 'userPortrait' ? 'text-hide' : '' }}" style="color:{{ item.color }};" catchtap="item.callBack" data-data="{{ detail[item.key] }}">
class="value {{ item.key != 'userPortrait' ? 'text-hide' : '' }}"
style="color:{{ item.color }};"
catchtap="item.callBack"
data-data="{{ detail[item.key] }}"
>
<!-- <view>{{item.key}}</view> --> <!-- <view>{{item.key}}</view> -->
<block wx:if="{{ item.key=='carName' }}"> <block wx:if="{{ item.key=='carName' }}">
<block wx:if="{{ detail.customer.carSeriesName }}"> <block wx:if="{{ detail.customer.carSeriesName }}">
...@@ -44,12 +39,7 @@ ...@@ -44,12 +39,7 @@
<view class="box"> <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 }}">
<!-- 已施工/已撤销/已支付 不显示 --> <!-- 已施工/已撤销/已支付 不显示 -->
<view <view wx:if="{{ detail.inviteStatus != 4&&detail.inviteStatus!=6&&detail.inviteStatus!=7 }}" class="icon date-icon" bindtap="showPopup" data-name="showDate">
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" /> <image src="../../images/date.png" />
</view> </view>
</block> </block>
...@@ -60,9 +50,7 @@ ...@@ -60,9 +50,7 @@
<view class="date text-center {{ detail.inviteStatus == 6 ? 'gray' : '' }}"> <view class="date text-center {{ detail.inviteStatus == 6 ? 'gray' : '' }}">
{{detail.inviteDate}} {{detail.inviteDate}}
<!-- 已施工/已支付/已撤销 不显示 --> <!-- 已施工/已支付/已撤销 不显示 -->
<block <block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6&&isOrder }}">
wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6&&isOrder }}"
>
<view class="cancel y-center" bindtap="cancelInvite">取消预约</view> <view class="cancel y-center" bindtap="cancelInvite">取消预约</view>
</block> </block>
</view> </view>
...@@ -113,9 +101,7 @@ ...@@ -113,9 +101,7 @@
<view class="value">{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}</view> <view class="value">{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}</view>
</view> </view>
</block> </block>
<block <block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6&&isOrder }}">
wx:if="{{ !userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6&&isOrder }}"
>
<view class="icon" bindtap="showPopup" data-name="showRemark"> <view class="icon" bindtap="showPopup" data-name="showRemark">
<image src="../../images/edit.png" /> <image src="../../images/edit.png" />
</view> </view>
...@@ -130,10 +116,7 @@ ...@@ -130,10 +116,7 @@
</block> </block>
</view> </view>
<!-- 已施工/已撤销/已支付 不显示 --> <!-- 已施工/已撤销/已支付 不显示 -->
<view <view wx:if="{{ detail.inviteStatus != 4&&detail.inviteStatus != 6 && detail.inviteStatus != 7&&isOrder }}" class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}">
wx:if="{{ detail.inviteStatus != 4&&detail.inviteStatus != 6 && detail.inviteStatus != 7&&isOrder }}"
class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}"
>
<view class="btn text-center" bindtap="orderSubmit">去下单</view> <view class="btn text-center" bindtap="orderSubmit">去下单</view>
</view> </view>
</view> </view>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import mixins from './index_mixins' import mixins from './index_mixins'
import api from '../../api.js' import api from '../../api.js'
import NP from 'number-precision' import NP from 'number-precision'
import { getWaitAuditCountAPI } from '~/api/api'
import { import {
getYQInfo, getYQInfo,
get4SStoreList, get4SStoreList,
...@@ -97,17 +98,6 @@ Page({ ...@@ -97,17 +98,6 @@ Page({
title: '关闭成功', title: '关闭成功',
icon: 'success' icon: 'success'
}) })
// if (taskId == 5) {
// //培训提醒
// return wx.$router.go("packageEquity.trainingMaterials");
// }
// if (taskId == 6) {
// // 资料查看提醒
// return wx.switchTab({
// url: '/pages/materails/index',
// })
// }
} }
}) })
}, },
...@@ -154,7 +144,7 @@ Page({ ...@@ -154,7 +144,7 @@ Page({
'确定', '确定',
false, false,
1, 1,
() => {} () => { }
) )
} }
wx.$storage.set('dateStaffPop', { wx.$storage.set('dateStaffPop', {
...@@ -398,7 +388,7 @@ Page({ ...@@ -398,7 +388,7 @@ Page({
merchantRange merchantRange
}) })
}) })
.catch(err => {}) .catch(err => { })
}, },
changePicker(e, value) { changePicker(e, value) {
let { let {
...@@ -536,6 +526,10 @@ Page({ ...@@ -536,6 +526,10 @@ Page({
if (item.url == 'tabWorkOrder.supervisorDaily' && (userInfo?.loginRole == 6 || mentorFlag)) { if (item.url == 'tabWorkOrder.supervisorDaily' && (userInfo?.loginRole == 6 || mentorFlag)) {
wx.$track.setTrackData(0, 'supervisor_daily_page', {}, '', 1) wx.$track.setTrackData(0, 'supervisor_daily_page', {}, '', 1)
} }
// 区域运营点击退款审批
if (item.path == 'tabWorkOrder.refundOperationList') {
return wx.$router.go(item.path)
}
console.log(userInfo); console.log(userInfo);
// 判断是不是门店员工 // 判断是不是门店员工
if (userInfo?.merchantType && !userInfo.isSuper && type == 2) { if (userInfo?.merchantType && !userInfo.isSuper && type == 2) {
...@@ -575,7 +569,7 @@ Page({ ...@@ -575,7 +569,7 @@ Page({
console.log(staffCheck, 'staffCheck') console.log(staffCheck, 'staffCheck')
if (staffCheck) return false if (staffCheck) return false
} }
if(item.beforeClick && await wx.$globalDataFunction[item.beforeClick]()) return /**禁止提单 */ if (item.beforeClick && await wx.$globalDataFunction[item.beforeClick]()) return /**禁止提单 */
console.log(item.url, 'item.url') console.log(item.url, 'item.url')
wx.$router.go(item.url) wx.$router.go(item.url)
} }
...@@ -623,7 +617,7 @@ Page({ ...@@ -623,7 +617,7 @@ Page({
}) })
} }
}, },
error: () => {} error: () => { }
}, },
'#modal2' '#modal2'
) )
...@@ -744,7 +738,7 @@ Page({ ...@@ -744,7 +738,7 @@ Page({
}) })
} }
}) })
.catch(err => {}) .catch(err => { })
}, },
setTab(tableBtn, index) { setTab(tableBtn, index) {
console.log(index) console.log(index)
...@@ -960,7 +954,7 @@ Page({ ...@@ -960,7 +954,7 @@ Page({
}) })
} }
}) })
.catch(err => {}) .catch(err => { })
}, },
getUserStat(userInfo) { getUserStat(userInfo) {
api api
...@@ -993,7 +987,7 @@ Page({ ...@@ -993,7 +987,7 @@ Page({
}) })
} }
}) })
.catch(err => {}) .catch(err => { })
}, },
totalListSet() { totalListSet() {
let { let {
...@@ -1296,7 +1290,7 @@ Page({ ...@@ -1296,7 +1290,7 @@ Page({
.setTaskDialog({ .setTaskDialog({
id: data[0]?.id id: data[0]?.id
}) })
.then(() => {}) .then(() => { })
} }
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -1451,6 +1445,18 @@ Page({ ...@@ -1451,6 +1445,18 @@ Page({
icon: 'boutique-syzs' icon: 'boutique-syzs'
}) })
} }
//区域督导和超管角色
if (
(userInfo?.isSuper || userInfo?.loginRole === 3 || userInfo?.loginRole === 5) &&
menu.every(item => item.name != '技师工单')
) {
menu.push({
name: '技师工单',
url: 'tabWorkOrder.technicianSearchList',
recordId: 17,
icon: 'technician'
})
}
// if ((userInfo?.loginRole == 3 || userInfo.loginRole == 5) && menu.every((item) => item.name != '积分审批')) { // if ((userInfo?.loginRole == 3 || userInfo.loginRole == 5) && menu.every((item) => item.name != '积分审批')) {
// menu.push({ // menu.push({
// name: '积分审批', // name: '积分审批',
...@@ -1544,14 +1550,38 @@ Page({ ...@@ -1544,14 +1550,38 @@ Page({
}) })
} }
}) })
// 区域运营角色审批退款申请入口
if (userInfo?.loginRole == 3 && menu.every(item => item.name != '待审批')) {
menu.push({
name: '待审批',
icon: 'refund_review_icon',
path: 'tabWorkOrder.refundOperationList',
noCheckdailyReport: true
})
}
this.setData({ this.setData({
menu, menu,
isNoStaff, isNoStaff,
newMenu newMenu
}, () => {
let index = menu.findIndex(e => e.name == '待审批')
if (index > -1) {
// 获取待审批数量
this.getAwaitAuditCount(userInfo, index)
}
}) })
this.getIsBusinessSchoolEnableCurrentUser() this.getIsBusinessSchoolEnableCurrentUser()
}, },
getAwaitAuditCount(userInfo, index) {
getWaitAuditCountAPI({sceneType: userInfo?.sceneType}).then(res => {
let { code, data } = res
if (code == 0) {
this.setData({
[`menu[${index}].tipsNum`]: data.waiteForAuditNum
})
}
})
},
onRoute(options) { onRoute(options) {
options && this.checkShowOrderPop(options) options && this.checkShowOrderPop(options)
wx.__HAS_SHOW_MODAL = false wx.__HAS_SHOW_MODAL = false
...@@ -1686,14 +1716,14 @@ Page({ ...@@ -1686,14 +1716,14 @@ Page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {} onShareAppMessage: function () { }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -83,6 +83,8 @@ ...@@ -83,6 +83,8 @@
<view wx:for="{{ 3 }}" wx:key="item" wx:for-index="idx" class="dot {{ changeSelectIndex==idx?'active':'' }}"></view> <view wx:for="{{ 3 }}" wx:key="item" wx:for-index="idx" class="dot {{ changeSelectIndex==idx?'active':'' }}"></view>
</view> </view>
</view> </view>
<view wx:if="{{userInfo.loginRole != 7}}">
<block wx:if="{{ isWait&&todoList.length>0 }}"> <block wx:if="{{ isWait&&todoList.length>0 }}">
<view class="todo-list"> <view class="todo-list">
<view class="title">今日待办·{{todoList.length}}</view> <view class="title">今日待办·{{todoList.length}}</view>
...@@ -317,11 +319,11 @@ ...@@ -317,11 +319,11 @@
</block> </block>
</view> </view>
</view> </view>
<!-- </view> --> </view>
</block> </block>
</view> </view>
</view> </view>
<view class="waitOrderCon" wx:if="{{ waitInputCount }}"> <view class="waitOrderCon" wx:if="{{ waitInputCount && userInfo.loginRole != 7}}">
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" beforeClick="inspectionOfProhibitionBill" /> <tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" beforeClick="inspectionOfProhibitionBill" />
</view> </view>
<modal id="modal2" class="modal" custom="true" btns="{{ ['取消','确定'] }}"> <modal id="modal2" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
......
// packageEquity/pages/carEquity/components/ShadeTip/ShadeTip.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
isShow: {
type: Boolean,
value: false
},
type: {
type: String,
value: 'success'
},
title: {
type: String,
value: '成功'
},
tipTxt: {
type: String,
value: ''
},
btnTxt: {
type: String,
value: '知道了'
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
},
/**
* 组件的方法列表
*/
methods: {
handleClick() {
this.triggerEvent('handleConfirm')
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--packageEquity/pages/carEquity/components/ShadeTip/ShadeTip.wxml-->
<view wx:if="{{isShow}}" class="layout">
<view class="bg" bindtap="handleShow" />
<view class="content">
<image wx:if="{{type == 'error'}}" class="icon" src="{{IMG_URL}}/icon-error.png"></image>
<image wx:else class="icon" src="{{IMG_URL}}/icon-success.png"></image>
<view class="title">{{title}}</view>
<view class="tipTxt">{{tipTxt}}</view>
<view class="btn" bindtap="handleClick">{{btnTxt}}</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carEquity/components/ShadeTip/ShadeTip.wxss */
.icon {
width: 64px;
height: 64px;
}
.layout {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 998;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.bg {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
background: rgba(0, 0, 0, .8);
}
.content {
position: relative;
text-align: center;
box-sizing: border-box;
padding: var(--fontSize48) var(--fontSize76);
width: var(--fontSize542);
height: var(--fontSize592);
background-image: linear-gradient(180deg, #F7F9FF 0%, #FFFFFF 54%);
border-radius: var(--fontSize24);
font-weight: 400;
font-size: var(--fontSize28);
color: #9B9B9E;
}
.title {
text-align: center;
font-weight: 600;
font-size: var(--fontSize48);
margin: 32rpx 0 16rpx;
color: #292D33;
}
.tipTxt {
font-size: 14px;
color: #9B9B9E;
}
.btn {
position: absolute;
bottom: var(--fontSize80);
width: var(--fontSize392);
height: var(--fontSize96);
line-height: var(--fontSize96);
text-align: center;
background: #347BFF;
border-radius: var(--fontSize12);
font-weight: 600;
font-size: var(--fontSize36);
color: #FFFFFF;
margin-top: var(--fontSize48);
}
\ No newline at end of file \ No newline at end of file
// tabWorkOrder/components/applyRefundBtn/applyRefundBtn.js
import api from "~/api/api"
Component({
/**
* 组件的属性列表
*/
properties: {
orderInfo: Object
},
/**
* 组件的初始数据
*/
data: {
moreSelectData: [],
showSelect: false,
moreSelectIndex: null,
areaOperationsFlag: false
},
/**
* 组件的方法列表
*/
methods: {
// 点击更多按钮
selectTap() {
let { orderInfo } = this.data
// 查询订单可展示按钮
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,
})
}
})
},
filterMoreSelectData(refundApplyButton, refundApplyDetailButton) {
const allOptions = ['申请退款', '退款详情']
const conditions = {
'申请退款': refundApplyButton === 'Y',
'退款详情': refundApplyDetailButton === 'Y'
}
return allOptions.filter(option => conditions[option])
},
closeSelect() {
this.setData({
showSelect: false,
moreSelectIndex: null
})
},
optionTap(e) {
let { index, item } = e.currentTarget.dataset
let { orderInfo } = this.data
let userInfo = wx.$util.getUserInfo()
if (item == '申请退款') {
// 申请退款点击埋点
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
})
} else {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?orderCode=${orderInfo.orderCode}&shopMerchantName=${orderInfo.merchantName}&shopMerchantId=${orderInfo.merchantId}`,
})
this.closeSelect()
}
} 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}`,
})
}
}
this.closeSelect()
})
}
this.setData({
moreSelectIndex: index,
// showSelect: !this.data.showSelect
})
},
closeModal() {
this.setData({
areaOperationsFlag: false
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"area-operations-modal": "/components/areaOperationsModal/areaOperationsModal"
}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/components/applyRefundBtn/applyRefundBtn.wxss */
.select_box {
position: relative;
.more-btn {
position: relative;
font-size: var(--fontSize28);
color: #347BFF;
font-weight: 400;
}
.option_box{
position: absolute;
z-index: 1005;
top: var(--fontSize60);
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{
display: block;
height: var(--fontSize88);
line-height: var(--fontSize88);
text-align: center;
color: #181A1F;
overflow: hidden;
font-weight: 400;
font-size: var(--fontSize28);
}
.option:first-child{
border-radius: var(--fontSize16) var(--fontSize16) 0 0;
}
.option:last-child{
border-radius: 0 0 var(--fontSize16) var(--fontSize16);
}
.option.active{
background: #347bff1a;
color: #347BFF;
}
}
.option_box::after{
height: 0;
width: 0;
content: '';
position: absolute;
border: var(--fontSize14) solid transparent;
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)
}
.option_box::before{
height: 0;
width: 0;
content: '';
position: absolute;
border: var(--fontSize14) solid transparent;
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{
width: 100vw;
height: 100vh;
background: transparent;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
}
}
\ No newline at end of file \ No newline at end of file
<!--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>
<area-operations-modal wx:if="{{areaOperationsFlag}}" isShow="{{areaOperationsFlag}}" bindclose="closeModal"></area-operations-modal>
\ No newline at end of file \ No newline at end of file
// import api from '../../api/api.js' import api from '../../api.js'
// import Util from '../../utils/util' // import Util from '../../utils/util'
import { uploadImg } from '~/api/api'
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/'
Component({ Component({
options: { options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持 multipleSlots: true // 在组件定义时的选项中启用多slot支持
...@@ -56,8 +59,12 @@ Component({ ...@@ -56,8 +59,12 @@ Component({
}, },
/* 组件的初始数据 */ /* 组件的初始数据 */
data: { data: {
IMG_URL,
wrapAnimate: 'wrapAnimate', wrapAnimate: 'wrapAnimate',
popupAnimate: 'popupAnimate', popupAnimate: 'popupAnimate',
searchSelectData: ['通过', '不通过'],
searchSelectIndex: 0,
showSelect: false,
tags: [ tags: [
{ {
name: '服务态度好', name: '服务态度好',
...@@ -84,6 +91,9 @@ Component({ ...@@ -84,6 +91,9 @@ Component({
}, },
lifetimes: { lifetimes: {
attached: function () { attached: function () {
this.setData({
userInfo: wx.$util.getUserInfo()
})
// 在组件实例进入页面节点树时执行 // 在组件实例进入页面节点树时执行
}, },
detached: function () { detached: function () {
...@@ -92,9 +102,165 @@ Component({ ...@@ -92,9 +102,165 @@ Component({
}, },
/* 组件的方法列表 */ /* 组件的方法列表 */
methods: { methods: {
optionTap(e) {
let { orderInfo } = this.data
let { index, sub, subindex } = e.currentTarget.dataset
orderInfo.subOrderList[subindex].approveStatus = index == 0 ? 'Y' : 'N'
this.setData({
searchSelectIndex: index,
showSelect: !this.data.showSelect,
orderInfo
})
let params = {
orderCode: orderInfo.orderCode,
subOrderCode: sub,
approveStatus: index == 0 ? 'Y' : 'N'
}
api.technicianApprove(params).then((result) => {
wx.$util.showToast('审批成功')
}).catch((err) => {
});
// this.searchEvent(true)
},
closeSelect() {
this.setData({
showSelect: false
})
},
// 查询条件类型切换
selectTap(e) {
let { imgindex } = e.currentTarget.dataset
this.setData({
selectIndex: imgindex,
showSelect: !this.data.showSelect
})
},
updateCustomerphotos(params) {
console.log(params, 'updateCustomerphotos')
api
.updateCustomerphotos(params)
.then(res => {
console.log(res)
})
.catch(err => {
console.log(err)
})
},
handleUpload(e) {
let that = this
// console.log(e);
let { index } = e.currentTarget.dataset
// console.log(index);
let { constructionImgList, orderInfo } = this.data
wx.chooseImage({
count: 1,
success(res) {
let [tempFiles] = res.tempFilePaths
let tempFilesList = tempFiles.split('.')
let imgType = tempFilesList[tempFilesList.length - 1]
let type = imgType == 'unknown' ? 'jpg' : imgType
wx.getFileSystemManager().readFile({
filePath: tempFiles, //选择图片返回的相对路径
encoding: 'base64', //编码格式
success(_res) {
wx.$util.showLoading('上传中...')
uploadImg({
file: `${type}@${_res.data}`
}).then(img => {
wx.$util.hideLoading()
let { code, data, message } = img
if (code == 0) {
orderInfo.subOrderList[index].constructionImgList =
orderInfo.subOrderList[index].constructionImgList || []
orderInfo.subOrderList[index].constructionImgList.push(data)
that.setData({
orderInfo
})
// const customerPhotos = orderInfo.subOrderList[
// index
// ].constructionImgList.map(item => {
// return {
// customerPhoto: item,
// subOrderCode: orderInfo.subOrderList[index].subOrderCode
// }
// })
const customerPhotos = orderInfo.subOrderList.reduce((pre, item) => {
if (item.constructionImgList) {
item.constructionImgList.map(el => {
pre.push({
customerPhoto: el,
subOrderCode: item.subOrderCode
})
})
}
return pre;
}, [])
that.updateCustomerphotos({
orderCode: orderInfo.orderCode,
customerPhotos
})
} else {
wx.$util.showToast(message)
}
})
}
})
}
})
},
// 删除图片
handleDelete(e) {
let { index, imgindex } = e.currentTarget.dataset
let { orderInfo, constructionImgList } = this.data
if (orderInfo.subOrderList[imgindex].constructionImgList.length == 1) {
return wx.$util.showToast('最少需要一张图片')
}
orderInfo.subOrderList[imgindex].constructionImgList.splice(index, 1)
const customerPhotos = orderInfo.subOrderList.reduce((pre, item) => {
if (item.constructionImgList) {
item.constructionImgList.map(el => {
pre.push({
customerPhoto: el,
subOrderCode: item.subOrderCode
})
})
}
return pre;
}, [])
this.updateCustomerphotos({
orderCode: orderInfo.orderCode,
customerPhotos
})
this.setData({
orderInfo
})
},
// 放大图片
handlePreviewImg(e) {
let { item, imgIndex } = e.currentTarget.dataset
console.log(item)
wx.$util.previewImage({
urls: [item]
})
},
setOrderInfo(orderInfo) { setOrderInfo(orderInfo) {
console.log(orderInfo, 'orderInfo') console.log(orderInfo, 'orderInfo')
// constructionImgList
orderInfo.customerPhotos.forEach(item => {
orderInfo.subOrderList.forEach(el => {
if (item.subOrderCode == el.subOrderCode) {
if (el.constructionImgList) {
el.constructionImgList.push(item.customerPhoto)
} else {
el.constructionImgList = [item.customerPhoto]
}
}
})
})
orderInfo.evaluation = orderInfo.evaluation.split(',') orderInfo.evaluation = orderInfo.evaluation.split(',')
console.log(orderInfo.subOrderList, 'orderInfo.evaluation')
console.log(orderInfo.evaluation, 'orderInfo.evaluation') console.log(orderInfo.evaluation, 'orderInfo.evaluation')
let { tags } = this.data let { tags } = this.data
tags.forEach((item, index) => { tags.forEach((item, index) => {
...@@ -112,6 +278,6 @@ Component({ ...@@ -112,6 +278,6 @@ Component({
//触发取消回调 //触发取消回调
this.triggerEvent('close') this.triggerEvent('close')
}, },
_success() {} _success() { }
} }
}) })
/* components/orderSwitchPopup/orderSwitchPopup.wxss */
.container {
font-size: 15px;
color: #666;
font-weight: bold;
z-index: 10;
position: fixed;
width: 100vw;
height: 100vh;
}
.wrap {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.popup-container {
position: fixed;
left: 50%;
/* top: 70%; */
width: var(--fontSize633);
/* max-height: 60%; */
/* max-height: var(--fontSize886); */
/* overflow: ; */
border: var(--fontSize2) solid #ccc;
border-radius: var(--fontSize16);
box-sizing: bordre-box;
transform: translate(-50%, -50%);
background: #fff;
opacity: 0;
}
.wx-popup-title {
width: 100%;
padding: var(--fontSize26) 0;
text-align: center;
/* font-size: var(--fontSize30); */
font-size: var(--fontSize32);
font-weight: 600;
color: #333;
border-bottom: var(--fontSize1) solid #EBEDF0;
}
.wx-popup-con {
/* margin: var(--fontSize60) var(--fontSize10); */
padding: 0 var(--fontSize32);
height: var(--fontSize600);
text-align: center;
font-weight: 400;
}
.v_title {
display: flex;
justify-content: center;
align-items: center;
/* padding: 0 var(--fontSize28); */
position: relative;
}
.btn-colse {
position: absolute;
right: var(--fontSize28);
top: 50%;
transform: translateY(-50%);
width: var(--fontSize44);
height: var(--fontSize44);
/* display: flex; */
/* justify-content: flex-end; */
}
.arc {
/* width: 100%;
height: 100%; */
width: var(--fontSize34);
height: var(--fontSize34);
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
.wrapAnimate {
animation: wrapAnimate 1s linear forwards
}
@keyframes wrapAnimate {
0% {}
100% {
background: rgba(0, 0, 0, 0.7);
}
}
.wrapAnimateOut {
animation: wrapAnimateOut 1s 0.2s linear forwards
}
@keyframes wrapAnimateOut {
0% {
background: rgba(0, 0, 0, 0.7);
}
100% {
background: rgba(0, 0, 0, 0);
}
}
.popupAnimate {
animation: popupAnimate 1.2s linear forwards
}
@keyframes popupAnimate {
0% {}
60% {
top: 47%;
opacity: 1;
}
80% {
top: 53%;
opacity: 1;
}
100% {
top: 50%;
opacity: 1;
}
}
.popupAnimateOut {
animation: popupAnimateOut 1.2s linear forwards
}
@keyframes popupAnimateOut {
0% {
top: 50%;
opacity: 1;
}
20% {
top: 47%;
opacity: 1;
}
100% {}
}
.tips {
font-size: var(--fontSize24);
margin-bottom: var(--fontSize20);
}
.signature {
width: var(--fontSize566);
height: var(--fontSize350);
background: #F4F5F7;
border: var(--fontSize2) solid #EFF0F2;
border-radius: var(--fontSize11);
margin: var(--fontSize10) auto;
}
.customerPhotos {
display: flex;
flex-wrap: wrap;
}
.customerPhotosItem {
width: var(--fontSize174);
height: var(--fontSize174);
border-radius: var(--fontSize12);
margin-right: var(--fontSize20);
margin-bottom: var(--fontSize20);
}
.customerPhotosItem:nth-child(3n) {
margin-right: 0;
}
.star-box {
margin-top: var(--fontSize60);
display: grid;
grid-template-columns: var(--fontSize80) repeat(5, var(--fontSize40));
grid-template-rows: repeat(1, var(--fontSize40));
gap: var(--fontSize20);
/* align-items: center; */
/* justify-content: center; */
}
.star-box .label {
width: var(--fontSize100);
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize32);
color: #333333;
}
.star {
width: var(--fontSize42);
height: var(--fontSize38);
margin-right: var(--fontSize20);
}
.tags {
/* padding-left: var(--fontSize12); */
margin-top: var(--fontSize26);
display: flex;
flex-wrap: wrap;
/* display: grid;
grid-template-columns: repeat(4, var(--fontSize168));
gap: var(--fontSize12); */
color: #888888;
}
.tag {
display: flex;
align-items: center;
justify-content: center;
height: var(--fontSize56);
width: var(--fontSize168);
border-radius: var(--fontSize8);
font-size: var(--fontSize24);
background: #F7F7F7;
margin-right: var(--fontSize12);
margin-bottom: var(--fontSize12);
}
.tag:nth-last-child(1) {
margin-right: 0;
/* width: var(--fontSize84); */
}
.act {
background: #347BFF;
color: #FFFFFF;
}
.placeholder {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-size: var(--fontSize32);
font-weight: 500;
color: #BEC1C7;
}
.tire-block {
margin-top: 16rpx;
width: var(--fontSize175);
height: var(--fontSize180);
box-sizing: border-box;
background-color: #F4F5F7;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
border-radius: var(--fontSize8);
overflow: hidden;
}
.tire-block:not(:nth-child(3n)) {
margin-right: var(--fontSize20);
}
.tire-block:nth-child(n+4) {
margin-top: var(--fontSize20);
}
.tire-img-box {
position: relative;
width: 100%;
height: 100%;
}
.tire-img-box .tire-img {
width: 100%;
height: 100%;
}
.icon-delete {
position: absolute;
top: var(--fontSize16);
right: var(--fontSize16);
width: var(--fontSize48);
height: var(--fontSize48);
}
.tire-tip {
height: var(--fontSize40);
line-height: var(--fontSize40);
background-color: #ebf2fd;
border-radius: var(--fontSize8);
font-size: var(--fontSize24);
color: #347BFF;
margin-top: var(--fontSize28);
padding: var(--fontSize4) var(--fontSize24);
border-radius: var(--fontSize8);
}
.icon-plus {
width: var(--fontSize80);
height: var(--fontSize80);
margin-bottom: var(--fontSize20);
}
.flex {
display: flex;
flex-wrap: wrap;
}
.box {
.technicianName {
display: flex;
align-items: center;
margin-top: 24rpx;
.name {
font-weight: 500;
font-size: 32rpx;
color: #292D33;
}
.icon {
width: 72rpx;
height: 36rpx;
background: #EAF1FF;
border: 1rpx solid #347bff80;
border-radius: 4rpx;
line-height: 36rpx;
text-align: center;
font-weight: 600;
font-size: 20rpx;
color: #347BFF;
margin-left: 10rpx;
}
.status {
margin-left: auto;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #757980;
}
}
.title {
text-align-last: left;
margin-top: 14rpx;
font-weight: 400;
font-size: 24rpx;
color: #757980;
}
.flex {
margin-top: 16rpx;
}
}
.search-box {
display: flex;
position: sticky;
top: 0;
left: 0;
z-index: 1009;
box-sizing: border-box;
margin-bottom: var(--fontSize16);
}
.select_box {
margin-left: auto;
position: relative;
// width: var(--fontSize180);
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
font-size: var(--fontSize24);
color: #999999;
}
.select_box .select {
position: relative;
display: flex;
align-items: center;
// width: var(--fontSize132);
}
.select_box .select .select_text {
color: #347BFF;
font-size: var(--fontSize28);
}
.select_box .select .select_img {
transform: rotate(0deg);
width: var(--fontSize32);
height: var(--fontSize32);
flex-shrink: 0;
// margin-left: var(--fontSize12);
}
.select_box .select .select_img_rotate {
transform: rotate(-180deg);
}
.select_box .option_box {
position: absolute;
z-index: 200;
top: var(--fontSize50);
// left: var(--fontSize-150);
left: -35rpx;
width: var(--fontSize150);
box-sizing: border-box;
background: #FFFFFF;
box-shadow: 0 var(--fontSize6) var(--fontSize12) 0 #0000000d;
border-radius: var(--fontSize16);
height: var(--fontSize176);
}
.select_box .option_box::after {
height: 0;
width: 0;
content: '';
position: absolute;
border: var(--fontSize14) solid transparent;
border-right: var(--fontSize14) solid #FFFFFF;
top: calc(-1 * var(--fontSize24));
left: var(--fontSize88);
z-index: -1;
transform: rotate(90deg);
}
.select_box .option_box::before {
height: 0;
width: 0;
content: '';
position: absolute;
border: var(--fontSize14) solid transparent;
border-right: var(--fontSize14) solid #FFFFFF;
top: calc(-1 * var(--fontSize24));
left: var(--fontSize88);
z-index: -1;
transform: rotate(90deg);
}
.select_box .option_box .option {
display: block;
height: var(--fontSize88);
line-height: var(--fontSize88);
text-align: center;
color: #333333;
overflow: hidden;
}
.select_box .option_box .option:first-child {
border-radius: var(--fontSize16) var(--fontSize16) 0 0;
}
.select_box .option_box .option:last-child {
border-radius: 0 0 var(--fontSize16) var(--fontSize16);
}
.select_box .option_box .option.active {
background: #347bff1a;
color: #347BFF;
}
\ No newline at end of file \ No newline at end of file
<!-- components/orderSwitchPopup/orderSwitchPopup.wxml --> <!-- components/orderSwitchPopup/orderSwitchPopup.wxml -->
<view wx:if="{{flag}}" class='container' style=''> <wxs src="../../index.wxs" module="filter" />
<view wx:if="{{ flag }}" class="container" style="">
<!-- bindtap='_close' 取消遮光层关闭事件 --> <!-- bindtap='_close' 取消遮光层关闭事件 -->
<view class='wrap {{wrapAnimate}}' style='background:rgba(0,0,0,{{bgOpacity}});' /> <view class="wrap {{ wrapAnimate }}" style="background:rgba(0,0,0,{{ bgOpacity }});" />
<view class='popup-container {{popupAnimate}}'> <view class="popup-container {{ popupAnimate }}">
<view class="v_title"> <view class="v_title">
<view class="wx-popup-title">{{title}}</view> <view class="wx-popup-title">{{title}}</view>
<image <image bindtap="_close" src="../../images/order-close.png" mode="widthFix" class="btn-colse" wx:if="{{ isShowClose }}" />
bindtap='_close'
src='../../images/order-close.png'
mode='widthFix'
class='btn-colse'
wx:if="{{isShowClose}}" />
</view> </view>
<view class="wx-popup-con"> <view class="wx-popup-con">
<scroll-view <scroll-view scroll-y enable-back-to-top refresher-enabled="{{ false }}" refresher-threshold="104" style="height:100%;">
scroll-y
enable-back-to-top
refresher-enabled="{{false}}"
refresher-threshold="104"
style="height:100%;">
<view class="signature"> <view class="signature">
<image src="{{orderInfo.electronicSignature}}" binderror="" bindload="" /> <image src="{{ orderInfo.electronicSignature }}" binderror="" bindload="" />
</view> </view>
<view class="customerPhotos"> <!-- <view class="customerPhotos">
<image <image
class="customerPhotosItem" class="customerPhotosItem"
wx:for="{{orderInfo.customerPhotos}}" wx:for="{{orderInfo.customerPhotos}}"
...@@ -30,28 +21,57 @@ ...@@ -30,28 +21,57 @@
wx:key="index" wx:key="index"
binderror="" binderror=""
bindload="" /> bindload="" />
</view> -->
<block wx:for="{{ orderInfo.subOrderList }}" wx:key="index" wx:for-item="imgItem" wx:for-index="imgIndex">
<view class="box">
<view class="technicianName" wx:if="{{imgItem.technicianName}}">
<view class="name">{{imgItem.technicianName}}</view>
<view class="icon">技师</view>
<view class="select_box" wx:if="{{ userInfo.isSuper || userInfo.loginRole ==3||userInfo.loginRole==5||userInfo.loginRole==6 }}">
<view class="select" catchtap="selectTap" data-imgindex="{{imgIndex}}">
<view class="select_text">{{imgItem.approveStatus == null? '审批':imgItem.approveStatus == 'Y'?'通过':'不通过'}}</view>
<image class="select_img {{ showSelect && selectIndex == imgIndex&&'select_img_rotate' }}" src="/images/arrow_blue.png"></image>
</view>
<view class="option_box" wx:if="{{ showSelect && selectIndex == imgIndex }}">
<view class="option {{ imgItem.approveStatus =='Y'&& index == 0 ? 'active' : ''}} {{ imgItem.approveStatus =='N'&& index == 1 ? 'active' : '' }}" wx:for="{{ searchSelectData }}" wx:key="this" data-index="{{ index }}" data-subindex="{{ imgIndex }}" data-sub="{{ imgItem.subOrderCode }}" catchtap="optionTap">{{item}}</view>
</view>
<view class="mask_class" wx:if="{{ showSelect }}" bindtap="closeSelect"></view>
</view>
<view class="status" wx:else>{{imgItem.approveStatus == null? '审批':imgItem.approveStatus == 'Y'?'通过':'不通过'}}</view>
</view>
<view class="title">
<!-- 上传客户合照或车辆照片 -->
<text class="goodsName"> {{filter.replaceItemText(imgItem.upgradeGoodsAlias) ||filter.replaceItemText(imgItem.upgradeGoodsName) || ''}}</text>
</view>
<view class="flex">
<view class="tire-block" wx:for="{{ imgItem.constructionImgList || [] }}" wx:key="index">
<view class="tire-img-box" catchtap="handlePreviewImg" data-item="{{ item }}" data-imgindex="{{ imgIndex }}">
<image wx:if="{{ ( userInfo.loginRole== 7 ||userInfo.userType==2) }}" class="icon-delete" catchtap="handleDelete" data-index="{{ index }}" data-imgindex="{{ imgIndex }}" src="/tabWorkOrder/images/icon-delete.png" />
<image class="tire-img" src="{{ item }}" />
</view>
</view> </view>
<view class='star-box'> <view class="tire-block" bindtap="handleUpload" data-index="{{ imgIndex }}" wx:if="{{ (!imgItem.constructionImgList || imgItem.constructionImgList.length<9 )&&( userInfo.loginRole== 7 ||userInfo.userType==2)}}">
<view>
<image class="icon-plus" src="{{ IMG_URL }}camera_icon.png" />
</view>
</view>
</view>
</view>
</block>
<view class="star-box">
<view class="label">评分:</view> <view class="label">评分:</view>
<block wx:for="{{5}}" wx:key="index"> <block wx:for="{{ 5 }}" wx:key="index">
<view class="star" bindtap="setStar" data-index="{{index}}"> <view class="star" bindtap="setStar" data-index="{{ index }}">
<image src="{{index < orderInfo.rating?'/tabWorkOrder/images/star-active.png':'/tabWorkOrder/images/star.png'}}" /> <image src="{{ index < orderInfo.rating?'/tabWorkOrder/images/star-active.png':'/tabWorkOrder/images/star.png' }}" />
</view> </view>
</block> </block>
</view> </view>
<view class="tags"> <view class="tags">
<block wx:for="{{tags}}" wx:key="index"> <block wx:for="{{ tags }}" wx:key="index">
<view <view wx:if="{{ item.checked }}" class="tag {{ item.checked?'act':'' }}" bindtap="chooseTag" data-index="{{ index }}">{{item.name}}</view>
wx:if="{{item.checked}}"
class="tag {{item.checked?'act':''}}"
bindtap="chooseTag"
data-index="{{index}}">
{{item.name}}
</view>
</block> </block>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
var replaceItemText = function (item) { var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g') var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ') // return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null return item ? item.replace(reg, ' ') : null
...@@ -16,7 +15,9 @@ var formatPosition = function (item, positionTypeList) { ...@@ -16,7 +15,9 @@ var formatPosition = function (item, positionTypeList) {
var filterData = positionTypeList.filter(function (v) { var filterData = positionTypeList.filter(function (v) {
return v.positionValue == item return v.positionValue == item
}) })
return (filterData.length && filterData[0] && filterData[0].positionName) || '' return (
(filterData.length && filterData[0] && filterData[0].positionName) || ''
)
} }
var isDateWithin7Days = function (date) { var isDateWithin7Days = function (date) {
...@@ -53,8 +54,8 @@ var filterIncludes = function (item, arr) { ...@@ -53,8 +54,8 @@ var filterIncludes = function (item, arr) {
var filterTemplateList = function (arr, value) { var filterTemplateList = function (arr, value) {
if (value == 3) { if (value == 3) {
return arr.filter(function (item) { return arr.filter(function (item) {
return item.templateValue != 3; return item.templateValue != 3
}); })
} else { } else {
return arr return arr
} }
...@@ -62,15 +63,60 @@ var filterTemplateList = function (arr, value) { ...@@ -62,15 +63,60 @@ var filterTemplateList = function (arr, value) {
var filterDisabled = function (role, weeklyList, date, disabledStatus) { var filterDisabled = function (role, weeklyList, date, disabledStatus) {
console.log(role, weeklyList) console.log(role, weeklyList)
if (role == 'staff') { // 员工七天内可操作 if (role == 'staff') {
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin7Days(date) // 员工七天内可操作
} else if (role == 'super') { // 超管60天内可操作 return (
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin60Days(date) (weeklyList.indexOf(date) > -1 && !disabledStatus) ||
!isDateWithin7Days(date)
)
} else if (role == 'super') {
// 超管60天内可操作
return (
(weeklyList.indexOf(date) > -1 && !disabledStatus) ||
!isDateWithin60Days(date)
)
} else { } else {
return !disabledStatus return !disabledStatus
} }
} }
var filterShowBtn = function (list) {
var arr = list.filter(function (val) {
return val.status == 2
})
return arr
}
// 判断子订单数据和退款申请已选子订单数据状态
var filterOrderStatus = function (infoData) {
var flag = true
var subOrderList = infoData.subOrderList
var refundApplyDetailList = infoData.refundApplyDetailList
subOrderList.forEach(function (val) {
refundApplyDetailList && refundApplyDetailList.forEach(function (v) {
if (val.subOrderCode == v.subOrderCode && val.status == 2) flag = false
})
})
return flag
}
// 判断退款详情是否可操作
var filterRefundDisabled = function (infoData, userInfo,) {
var afterStatus = infoData.afterStatus
var subOrderList = infoData.subOrderList
var refundApplyDetailList = infoData.refundApplyDetailList
var loginRole = userInfo.loginRole
var flag = false
subOrderList.forEach(function (val) {
refundApplyDetailList && refundApplyDetailList.forEach(function (v) {
if (val.subOrderCode == v.subOrderCode && val.status == 2) flag = true
})
})
return afterStatus === 0
|| (afterStatus && afterStatus != 5)
|| loginRole == 3
|| (afterStatus == 5 && flag)
}
/* /*
* 导出 * 导出
...@@ -81,5 +127,8 @@ module.exports = { ...@@ -81,5 +127,8 @@ module.exports = {
formatPosition: formatPosition, formatPosition: formatPosition,
filterIncludes: filterIncludes, filterIncludes: filterIncludes,
filterDisabled: filterDisabled, filterDisabled: filterDisabled,
filterTemplateList: filterTemplateList filterTemplateList: filterTemplateList,
filterShowBtn: filterShowBtn,
filterOrderStatus: filterOrderStatus,
filterRefundDisabled: filterRefundDisabled
} }
...@@ -339,10 +339,6 @@ Page({ ...@@ -339,10 +339,6 @@ Page({
customerObj, customerObj,
}); });
} }
// // 有配置技师
// if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data)
// }
// 是2:门店收款 5:嘀加收款 6:对公转账 7:其它收款并且不是错误订单 自动打开门店收款弹窗 // 是2:门店收款 5:嘀加收款 6:对公转账 7:其它收款并且不是错误订单 自动打开门店收款弹窗
if ( !isErrorOrder && [2, 5, 6, 7].includes(Number(data.selectPayType)) ) { if ( !isErrorOrder && [2, 5, 6, 7].includes(Number(data.selectPayType)) ) {
this.toshowDateModal(); this.toshowDateModal();
......
...@@ -34,11 +34,14 @@ Page({ ...@@ -34,11 +34,14 @@ Page({
// 发票按钮 // 发票按钮
invoiceName: '申请开票', invoiceName: '申请开票',
invoiveVisible: false, invoiveVisible: false,
showMoreBtn: false
}, },
RatingPopupSetting() { RatingPopupSetting() {
this.setData({ this.setData({
showRatingPopup: !this.data.showRatingPopup, showRatingPopup: !this.data.showRatingPopup,
}); });
// 更新数据
this.getOrderDetail(this.data.orderInfo.orderCode)
}, },
jumpUserPortrait() { jumpUserPortrait() {
wx.$router.go("tabDate.userPortrait", this.data.orderInfo); wx.$router.go("tabDate.userPortrait", this.data.orderInfo);
...@@ -377,7 +380,7 @@ Page({ ...@@ -377,7 +380,7 @@ Page({
userInfo: o, userInfo: o,
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo.loginRole == 6), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
}); });
}, },
...@@ -404,6 +407,17 @@ Page({ ...@@ -404,6 +407,17 @@ Page({
let { code, message, data } = res; let { code, message, data } = res;
if (code == 0) { if (code == 0) {
wx.$util.hideLoading(); 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'
})
}
})
}
let couponName = data.customerCoupon let couponName = data.customerCoupon
? data.customerCoupon.couponName ? data.customerCoupon.couponName
: ""; : "";
...@@ -529,16 +543,16 @@ Page({ ...@@ -529,16 +543,16 @@ Page({
// this.isArtificer(data) // this.isArtificer(data)
// } // }
// 获取园区店技师配置数据 wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId // 获取园区店技师配置数据 wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
api // api
.getQYTechnicianList({ // .getQYTechnicianList({
yqMerchantId: wx.$util.getStorageSync("dj_boutique_user_info") // yqMerchantId: wx.$util.getStorageSync("dj_boutique_user_info")
?.merchantId, // ?.merchantId,
}) // })
.then((respone) => { // .then((respone) => {
if (respone?.code == 0) { // if (respone?.code == 0) {
if (respone?.data.length > 0) this.isArtificer(respone.data); // if (respone?.data.length > 0) this.isArtificer(respone.data);
} // }
}); // });
} else { } else {
wx.showModal({ wx.showModal({
title: "温馨提示", title: "温馨提示",
...@@ -859,6 +873,11 @@ Page({ ...@@ -859,6 +873,11 @@ Page({
onShow: function (options) { onShow: function (options) {
console.log(this.data); console.log(this.data);
let code = this.data.orderCode || ""; let code = this.data.orderCode || "";
const selectInvoiceObj = getApp().globalData.selectInvoiceObj;
if (selectInvoiceObj?.isOpen) {
this.handleSelectInvoice()
}
delete getApp().globalData?.selectInvoiceObj; // 使用后清除
}, },
/** /**
...@@ -876,7 +895,7 @@ Page({ ...@@ -876,7 +895,7 @@ Page({
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
let { orderCode } = this.data let { orderCode } = this.data
if(orderCode) { if (orderCode) {
this.getOrderDetail(orderCode) this.getOrderDetail(orderCode)
} }
}, },
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"usingComponents": { "usingComponents": {
"orderRatingPopup": "/tabWorkOrder/components/orderRatingPopup/orderRatingPopup", "orderRatingPopup": "/tabWorkOrder/components/orderRatingPopup/orderRatingPopup",
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal" "select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal",
"apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn"
} }
} }
...@@ -58,7 +58,7 @@ page { ...@@ -58,7 +58,7 @@ page {
} }
.signBtn { .signBtn {
width: var(--fontSize144); width: var(--fontSize220);
height: var(--fontSize40); height: var(--fontSize40);
background: #ffffffcc; background: #ffffffcc;
border-radius: var(--fontSize30); border-radius: var(--fontSize30);
...@@ -90,6 +90,7 @@ page { ...@@ -90,6 +90,7 @@ page {
position: relative; position: relative;
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #347BFF; color: #347BFF;
font-weight: normal;
} }
...@@ -156,7 +157,6 @@ page { ...@@ -156,7 +157,6 @@ page {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #347BFF; color: #347BFF;
margin-left: 20rpx;
} }
.invoice-btn .icon { .invoice-btn .icon {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<image class="" src="../../images/activeIcon.png" /> <image class="" src="../../images/activeIcon.png" />
客户{{orderInfo.customerName}} 客户{{orderInfo.customerName}}
<block wx:if="{{ orderInfo.electronicSignature }}"> <block wx:if="{{ orderInfo.electronicSignature }}">
<view class="signBtn text-center" bindtap="RatingPopupSetting">查看签名</view> <view class="signBtn text-center" bindtap="RatingPopupSetting">查看签名/施工图</view>
</block> </block>
</view> </view>
<view class="orderContainer"> <view class="orderContainer">
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view>
<!-- 技师 --> <!-- 技师 -->
<view wx:if="{{ orderInfo.isOpenArtificer && item.upgradeGoodsPosition }}" class="artificer disabled" data-item="{{ item }}"> <view wx:if="{{ item.technicianName && item.upgradeGoodsPosition }}" class="artificer disabled" data-item="{{ item }}">
<text class="{{ !item.technicianName ? 'grey_text' : '' }} 'text-hide'">{{item.technicianName || '选择技师'}}</text> <text class="{{ !item.technicianName ? 'grey_text' : '' }} 'text-hide'">{{item.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view>
...@@ -105,10 +105,15 @@ ...@@ -105,10 +105,15 @@
<view class="box"> <view class="box">
<view class="title infoTitle"> <view class="title infoTitle">
<view class="flex">工单信息 <view class="flex">工单信息
<view style="display: flex;gap: var(--fontSize32);margin-left: var(--fontSize32);">
<view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice"> <view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image> <gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}} {{invoiceName}}
</view> </view>
<view wx:if="{{isStaff && showMoreBtn}}">
<apply-refund-btn orderInfo="{{orderInfo}}"></apply-refund-btn>
</view>
</view>
</view> </view>
<view class="operate" wx:if="{{ orderInfo.canOperate&&(isYqdSuper||isStaff)&&isMake }}"> <view class="operate" wx:if="{{ orderInfo.canOperate&&(isYqdSuper||isStaff)&&isMake }}">
<text bindtap="targetOperate">操作</text> <text bindtap="targetOperate">操作</text>
...@@ -344,5 +349,5 @@ ...@@ -344,5 +349,5 @@
</view> </view>
</view> </view>
</modal> </modal>
<orderRatingPopup bind:close="RatingPopupSetting" title="客户签字" flag="{{ showRatingPopup }}" wx:if="{{ showRatingPopup }}" orderInfoSetting="{{ orderInfo }}" /> <orderRatingPopup bind:close="RatingPopupSetting" title="查看签名/施工图" flag="{{ showRatingPopup }}" wx:if="{{ showRatingPopup }}" orderInfoSetting="{{ orderInfo }}" />
<select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{orderInfo}}"></select-invoice-modal> <select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{orderInfo}}"></select-invoice-modal>
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,14 @@ Page({ ...@@ -6,7 +6,14 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isloading: false,
codeInfo: {}, codeInfo: {},
isShadeShow: false,
shadeObj: {
type: 'success',
title: '申请成功',
tipTxt: '已经开票成功,无法申请重开,有问题建议线下联系总部'
},
editFormData: [{ editFormData: [{
label: '销售方名称', label: '销售方名称',
name: 'enterpriseName' name: 'enterpriseName'
...@@ -26,11 +33,17 @@ Page({ ...@@ -26,11 +33,17 @@ Page({
}] }]
}, },
handleConfirm() { handleConfirm() {
let { codeInfo } = this.data let { codeInfo, isloading } = this.data
if (isloading) {
return true
}
const params = { const params = {
orderCode: codeInfo.orderCode orderCode: codeInfo.bizOrderCode
} }
wx.$util.showLoading() wx.$util.showLoading()
this.setData({
isloading: true
})
commonApi.getOrderCode(params).then(res => { commonApi.getOrderCode(params).then(res => {
console.log(res, 'res---') console.log(res, 'res---')
let { invoiceInfo, invoiceIssueQrcode } = res.data let { invoiceInfo, invoiceIssueQrcode } = res.data
...@@ -50,12 +63,63 @@ Page({ ...@@ -50,12 +63,63 @@ Page({
} }
}).finally(() => { }).finally(() => {
wx.$util.hideLoading() wx.$util.hideLoading()
this.setData({
isloading: false
})
})
},
handleCancelInvoice() {
let { codeInfo, isloading } = this.data
console.log(codeInfo, '---')
if (isloading) {
return true
}
const params = {
qrcodeNo: codeInfo.qrcodeNo
}
this.setData({
isloading: true
})
commonApi.cancelInvoiceQrcode(params).then(res => {
console.log(res, 'res---')
let { code, data } = res
if(code == 0) {
this.setData({
isShadeShow: true,
'shadeObj.type': data.code == 0 ? 'success' : 'error',
'shadeObj.title': data.code == 0 ? '申请成功' : '申请失败',
'shadeObj.tipTxt': data.code == 0 ? '原开票二维码已经作废,请选择发票类型重新开票' : data.message,
})
}
}).finally(() => {
this.setData({
isloading: false
})
}) })
}, },
handleShadeConfirm() {
let { shadeObj } = this.data
this.setData({
isShadeShow: false
})
shadeObj.type == 'success' ? this.handleNewInvoce() : this.handleConfirm()
},
handleNewInvoce() {
let { codeInfo } = this.data
codeInfo.orderCode = codeInfo?.bizOrderCode || ''
getApp().globalData.selectInvoiceObj = { isOpen: true, codeInfo: JSON.parse(JSON.stringify(codeInfo)) };
wx.$router.back()
},
handleBack() { handleBack() {
let { isloading } = this.data
if (isloading) {
return true
}
getApp().globalData.selectInvoiceObj = { isOpen: false };
wx.$router.back() wx.$router.back()
}, },
onRoute(res) { onRoute(res) {
console.log(res)
this.setData({ this.setData({
codeInfo: JSON.parse(JSON.stringify(res.obj)) codeInfo: JSON.parse(JSON.stringify(res.obj))
}) })
......
{ {
"navigationBarTitleText": "查看二维码", "navigationBarTitleText": "查看二维码",
"usingComponents": {} "usingComponents": {
"shade-tip": "../../components/ShadeTip/ShadeTip"
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
</view> </view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn" bindtap="handleConfirm">结果查询</view> <view class="btn" bindtap="handleConfirm">结果查询</view>
<view class="btn btn-back" bindtap="handleCancelInvoice">发票类型有误,申请重开</view>
<view class="btn btn-back" bindtap="handleBack">返回列表</view> <view class="btn btn-back" bindtap="handleBack">返回列表</view>
</view> </view>
</view> </view>
<shade-tip isShow="{{isShadeShow}}" type="{{shadeObj.type}}" title="{{shadeObj.title}}" tipTxt="{{shadeObj.tipTxt}}" bindhandleConfirm="handleShadeConfirm"></shade-tip>
\ No newline at end of file \ No newline at end of file
...@@ -49,6 +49,18 @@ Page({ ...@@ -49,6 +49,18 @@ Page({
this.triggerEvent('longtouch', info.imgUrl) this.triggerEvent('longtouch', info.imgUrl)
}, },
previewImage(e) {
let { url } = e.currentTarget.dataset
if (url.includes('http')) {
wx.previewImage({
urls: [url],
current: url
})
} else {
// this.triggerEvent('refresh')
}
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
......
<!--tabWorkOrder/pages/invoiceResult/invoiceResult.wxml--> <!--tabWorkOrder/pages/invoiceResult/invoiceResult.wxml-->
<van-overlay wx:if="{{ info.code == '0000' }}" show z-index="99999"> <van-overlay wx:if="{{ info.code == '0000' }}" show z-index="99999">
<view class="wrapper"> <view class="wrapper">
<image show-menu-by-longpress bindlongpress="longpress" src="{{info.imgUrl}}" mode="widthFix" /> <image show-menu-by-longpress bindlongpress="longpress" bindtap="previewImage" src="{{info.imgUrl}}"
data-url="{{info.imgUrl}}" mode="widthFix" />
</view> </view>
</van-overlay> </van-overlay>
<view wx:else> <view wx:else>
......
...@@ -207,7 +207,7 @@ Page({ ...@@ -207,7 +207,7 @@ Page({
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
userInfo: o, userInfo: o,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo.loginRole == 6) isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo.loginRole == 6 || userInfo.loginRole == 7)
}) })
}, },
...@@ -249,6 +249,17 @@ Page({ ...@@ -249,6 +249,17 @@ Page({
// 获取对应园区店配置 // 获取对应园区店配置
await this.getServiceBaseInfo(data.merchantId) await this.getServiceBaseInfo(data.merchantId)
await this.getSignatureSwitch(data.merchantId) await this.getSignatureSwitch(data.merchantId)
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'
})
}
})
}
// 服务商是否使用膜卷号配置 // 服务商是否使用膜卷号配置
if (!userInfo?.isSuper && userInfo.userType == 2 && data.status != 10 && data.status != 9) { if (!userInfo?.isSuper && userInfo.userType == 2 && data.status != 10 && data.status != 9) {
isUseFilmRoll = await getServiceFilmRollSetting(data?.sellerMerchantId) isUseFilmRoll = await getServiceFilmRollSetting(data?.sellerMerchantId)
...@@ -737,7 +748,13 @@ Page({ ...@@ -737,7 +748,13 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function (options) { }, onShow: function (options) {
const selectInvoiceObj = getApp().globalData.selectInvoiceObj;
if (selectInvoiceObj?.isOpen) {
this.handleSelectInvoice()
}
delete getApp().globalData?.selectInvoiceObj; // 使用后清除
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
...@@ -754,7 +771,7 @@ Page({ ...@@ -754,7 +771,7 @@ Page({
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
let { orderCode } = this.data let { orderCode } = this.data
if(orderCode) { if (orderCode) {
this.getOrderDetail(orderCode) this.getOrderDetail(orderCode)
} }
}, },
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"usingComponents": { "usingComponents": {
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup", "artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup",
"film-roll-no-popup": "/tabWorkOrder/components/FilmRollNoPopup/FilmRollNoPopup", "film-roll-no-popup": "/tabWorkOrder/components/FilmRollNoPopup/FilmRollNoPopup",
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal" "select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal",
"apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view>
<!-- 太阳膜类且配置技师 --> <!-- 太阳膜类且配置技师 -->
<view wx:if="{{orderInfo.isOpenArtificer && item.upgradeGoodsPosition}}" class="artificer" bindtap="selectArtificer" data-item="{{item}}"> <view wx:if="{{ item.upgradeGoodsPosition}}" class="artificer" bindtap="selectArtificer" data-item="{{item}}">
<text class="{{!item.technicianName ? 'grey_text' : ''}} 'text-hide'">{{item.technicianName || '选择技师'}}</text> <text class="{{!item.technicianName ? 'grey_text' : ''}} 'text-hide'">{{item.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" /> <image src="/components/images/arrow-x.png" mode="" />
</view> </view>
...@@ -95,11 +95,17 @@ ...@@ -95,11 +95,17 @@
<view class="box"> <view class="box">
<view class="title invoice"> <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"> <view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image> <gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}} {{invoiceName}}
</view> </view>
</view> </view>
</view>
<block wx:for="{{orderObj}}" wx:key="index"> <block wx:for="{{orderObj}}" wx:key="index">
<view class="cell"> <view class="cell">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
......
...@@ -20,7 +20,6 @@ Page({ ...@@ -20,7 +20,6 @@ Page({
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isShowPhone: app.globalData.YQorderSetting?.yqPhoneConfig, isShowPhone: app.globalData.YQorderSetting?.yqPhoneConfig,
ctx: '', ctx: '',
hasDraw: false,
canvasWidth: 0, canvasWidth: 0,
canvasHeight: 0, canvasHeight: 0,
startPoint: { startPoint: {
...@@ -32,8 +31,9 @@ Page({ ...@@ -32,8 +31,9 @@ Page({
lineSize: 3, // 笔记倍数 lineSize: 3, // 笔记倍数
radius: 1.5, //画圆的半径 radius: 1.5, //画圆的半径
showPlaceHoder: true, showPlaceHoder: true,
hasDraw: true,
signImage: '', signImage: '',
constructionImgList: [], constructionImgList: [''],
rating: 5, rating: 5,
formData: {}, formData: {},
tags: [{ tags: [{
...@@ -89,10 +89,6 @@ Page({ ...@@ -89,10 +89,6 @@ Page({
this.setData({ this.setData({
[name]: !tags[index].checked [name]: !tags[index].checked
}) })
// customerComment = `${customerComment || ''}${tags[index]}`
// this.setData({
// customerComment
// })
}, },
setStar(e) { setStar(e) {
let { let {
...@@ -105,21 +101,26 @@ Page({ ...@@ -105,21 +101,26 @@ Page({
// 删除图片 // 删除图片
handleDelete(e) { handleDelete(e) {
let { let {
index index,
imgindex,
} = e.currentTarget.dataset } = e.currentTarget.dataset
let { let {
orderInfo,
constructionImgList constructionImgList
} = this.data } = this.data
constructionImgList.splice(index, 1) orderInfo.subOrderList[imgindex].constructionImgList.splice(index, 1)
this.setData({ this.setData({
constructionImgList // constructionImgList
orderInfo
}) })
}, },
// 放大图片 // 放大图片
handlePreviewImg(e) { handlePreviewImg(e) {
let { let {
item item,
imgIndex
} = e.currentTarget.dataset } = e.currentTarget.dataset
console.log(item) console.log(item)
wx.$util.previewImage({ wx.$util.previewImage({
...@@ -129,8 +130,12 @@ Page({ ...@@ -129,8 +130,12 @@ Page({
handleUpload(e) { handleUpload(e) {
let that = this let that = this
// console.log(e);
let { index } = e.currentTarget.dataset
// console.log(index);
let { let {
constructionImgList constructionImgList,
orderInfo
} = this.data } = this.data
wx.chooseImage({ wx.chooseImage({
count: 1, count: 1,
...@@ -154,9 +159,11 @@ Page({ ...@@ -154,9 +159,11 @@ Page({
message message
} = img } = img
if (code == 0) { if (code == 0) {
constructionImgList.push(data) orderInfo.subOrderList[index].constructionImgList = orderInfo.subOrderList[index].constructionImgList || []
orderInfo.subOrderList[index].constructionImgList.push(data)
that.setData({ that.setData({
constructionImgList // constructionImgList
orderInfo
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -200,6 +207,17 @@ Page({ ...@@ -200,6 +207,17 @@ Page({
} = res } = res
if (code == 0) { if (code == 0) {
wx.$util.hideLoading() 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'
})
}
})
}
let couponName = data.customerCoupon ? data.customerCoupon.couponName : '' let couponName = data.customerCoupon ? data.customerCoupon.couponName : ''
let total_price = 0 let total_price = 0
let warrantyCardList = [] let warrantyCardList = []
...@@ -535,7 +553,8 @@ Page({ ...@@ -535,7 +553,8 @@ Page({
let { let {
hasDraw, hasDraw,
constructionImgList, constructionImgList,
tags tags,
orderInfo
} = this.data } = this.data
let that = this let that = this
if (!hasDraw) { if (!hasDraw) {
...@@ -546,7 +565,7 @@ Page({ ...@@ -546,7 +565,7 @@ Page({
}) })
return return
} }
if (constructionImgList.length == 0) { if (!orderInfo.subOrderList.some(item => item?.constructionImgList?.length > 0)) {
wx.showToast({ wx.showToast({
title: '请上传客户合照或车辆照片', title: '请上传客户合照或车辆照片',
icon: 'none', icon: 'none',
...@@ -592,11 +611,17 @@ Page({ ...@@ -592,11 +611,17 @@ Page({
} }
return list return list
}, []) }, [])
customerPhotos = customerPhotos.map(item => { customerPhotos = orderInfo.subOrderList.reduce((pre, item) => {
return { if (item.constructionImgList) {
customerPhoto: item item.constructionImgList.map(el => {
} pre.push({
customerPhoto: el,
subOrderCode: item.subOrderCode
})
}) })
}
return pre;
}, [])
let params = { let params = {
orderCode, orderCode,
customerPhotos, customerPhotos,
...@@ -604,9 +629,9 @@ Page({ ...@@ -604,9 +629,9 @@ Page({
rating, rating,
merchantId: orderInfo.merchantId, merchantId: orderInfo.merchantId,
sceneType: 1, sceneType: 1,
// tags,
evaluationList evaluationList
} }
console.log(params, 'params');
// return // return
// 使用膜卷号 // 使用膜卷号
if (isUseFilmRoll) { if (isUseFilmRoll) {
...@@ -835,6 +860,11 @@ Page({ ...@@ -835,6 +860,11 @@ Page({
// console.log(this.data) // console.log(this.data)
// let code = this.data.orderCode || '' // let code = this.data.orderCode || ''
// this.getGrass(code) // this.getGrass(code)
const selectInvoiceObj = getApp().globalData.selectInvoiceObj;
if (selectInvoiceObj?.isOpen) {
this.handleSelectInvoice()
}
delete getApp().globalData?.selectInvoiceObj; // 使用后清除
}, },
/** /**
...@@ -852,7 +882,7 @@ Page({ ...@@ -852,7 +882,7 @@ Page({
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
let { orderCode } = this.data let { orderCode } = this.data
if(orderCode) { if (orderCode) {
this.getOrderDetail(orderCode) this.getOrderDetail(orderCode)
} }
}, },
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"usingComponents": { "usingComponents": {
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup", "artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup",
"film-roll-no-popup": "/tabWorkOrder/components/FilmRollNoPopup/FilmRollNoPopup", "film-roll-no-popup": "/tabWorkOrder/components/FilmRollNoPopup/FilmRollNoPopup",
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal" "select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal",
"apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn"
} }
} }
...@@ -54,21 +54,21 @@ page { ...@@ -54,21 +54,21 @@ page {
.box .title.invoice { .box .title.invoice {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.invoice-btn { .invoice-btn {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #347BFF; color: #347BFF;
} }
.invoice-btn .icon { .invoice-btn .icon {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-right: 6rpx; margin-right: 6rpx;
} }
.box .flex { .box .flex {
display: flex; display: flex;
...@@ -91,25 +91,26 @@ page { ...@@ -91,25 +91,26 @@ page {
color: #888888; color: #888888;
} }
.box .goods .item:first-child{ .box .goods .item:first-child {
margin-top: 0; margin-top: 0;
} }
.box .goods .item:last-child{ .box .goods .item:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.box .goods .item .subItem_box{ .box .goods .item .subItem_box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
} }
.box .goods .item .subItem_box .type{ .box .goods .item .subItem_box .type {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
} }
.box .goods .item .subItem_box .artificer,.film-roll{ .box .goods .item .subItem_box .artificer,
.film-roll {
height: var(--fontSize48); height: var(--fontSize48);
background: #FFFFFF; background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3; border: var(--fontSize1) solid #DEE0E3;
...@@ -122,26 +123,28 @@ page { ...@@ -122,26 +123,28 @@ page {
font-size: var(--fontSize24); font-size: var(--fontSize24);
} }
.artificer text{ .artificer text {
max-width: var(--fontSize96); max-width: var(--fontSize96);
} }
.film-roll text{ .film-roll text {
max-width: var(--fontSize120); max-width: var(--fontSize120);
} }
.artificer .grey_text,.film-roll .grey_text{ .artificer .grey_text,
.film-roll .grey_text {
color: #BEC1C7; color: #BEC1C7;
} }
.artificer image,.film-roll image{ .artificer image,
.film-roll image {
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize28); height: var(--fontSize28);
margin-left: var(--fontSize8); margin-left: var(--fontSize8);
flex-shrink: 0; flex-shrink: 0;
} }
.box .goods .item .subItem_box .artificer{ .box .goods .item .subItem_box .artificer {
height: var(--fontSize48); height: var(--fontSize48);
background: #FFFFFF; background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3; border: var(--fontSize1) solid #DEE0E3;
...@@ -154,7 +157,7 @@ page { ...@@ -154,7 +157,7 @@ page {
font-size: var(--fontSize24); font-size: var(--fontSize24);
} }
.box .goods .item .goods_name{ .box .goods .item .goods_name {
color: #333333; color: #333333;
margin-bottom: var(--fontSize22); margin-bottom: var(--fontSize22);
} }
...@@ -163,7 +166,7 @@ page { ...@@ -163,7 +166,7 @@ page {
width: var(--fontSize492); width: var(--fontSize492);
} }
.box .goods .item .goods_name .price{ .box .goods .item .goods_name .price {
font-weight: 600; font-weight: 600;
} }
...@@ -188,7 +191,7 @@ page { ...@@ -188,7 +191,7 @@ page {
justify-content: flex-end; justify-content: flex-end;
} }
.box .cell.total .label{ .box .cell.total .label {
width: auto; width: auto;
color: #757980; color: #757980;
} }
...@@ -207,13 +210,13 @@ page { ...@@ -207,13 +210,13 @@ page {
width: var(--fontSize152); width: var(--fontSize152);
} }
.box .cell .label.icon{ .box .cell .label.icon {
width: var(--fontSize96); width: var(--fontSize96);
height: var(--fontSize36); height: var(--fontSize36);
margin-right: var(--fontSize8); margin-right: var(--fontSize8);
} }
.box .cell .image-box{ .box .cell .image-box {
display: flex; display: flex;
flex-flow: wrap; flex-flow: wrap;
gap: var(--fontSize10); gap: var(--fontSize10);
...@@ -329,6 +332,7 @@ page { ...@@ -329,6 +332,7 @@ page {
bottom: var(--fontSize24); bottom: var(--fontSize24);
z-index: 100; z-index: 100;
} }
.icon { .icon {
width: var(--fontSize40); width: var(--fontSize40);
height: var(--fontSize40); height: var(--fontSize40);
...@@ -465,7 +469,8 @@ page { ...@@ -465,7 +469,8 @@ page {
background: #347BFF; background: #347BFF;
color: #FFFFFF; color: #FFFFFF;
} }
.comfirmBtn{
.comfirmBtn {
z-index: 2000; z-index: 2000;
} }
...@@ -532,7 +537,7 @@ page { ...@@ -532,7 +537,7 @@ page {
.meal-bd-head .price { .meal-bd-head .price {
font-family: "numberNor"; font-family: "numberNor";
margin-left:auto; margin-left: auto;
} }
.meal-bd-bottom { .meal-bd-bottom {
...@@ -541,9 +546,18 @@ page { ...@@ -541,9 +546,18 @@ page {
font-weight: 400; font-weight: 400;
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #757980; color: #757980;
margin-left:var(--fontSize24); margin-left: var(--fontSize24);
} }
.meal-bd-bottom .count { .meal-bd-bottom .count {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
} }
.bottom {
margin-bottom: 100rpx;
}
.goodsName {
font-size: 24rpx;
color: #292D33;
}
\ No newline at end of file \ No newline at end of file
import api from "~/utils/request/request.js";
module.exports = {
// 退款申请流程状态栏
getRefundStatusAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.audit.select', data)
},
// 标记订单子订单详情查询
getSubOrderInfoAPI(data) {
return api.post('dj.api.smartcarlife.goodsOrder.goodsSubOrder.list', data)
},
// 退款详情明细查询
getRefundDetailInfoAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.detail.select', data)
},
// 发起退款申请
applyRefundAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.add', data)
},
// 退款审核
auditRefundAllpyAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.audit.update', data)
},
// 根据主订单号获取退款成功记录
getRefundLogByOrderCodeAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.refundedGoodsOrder.list', data)
}
}
\ No newline at end of file \ No newline at end of file
// tabWorkOrder/components/reviewStatus/reviewStatus.js
import api from '../../api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
infoData: {
type: Object,
observer: function(n) {
this.setStatusInfo(n.beforeStatus, n.afterStatus, n.transferStatus)
}
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
statusList: [ //进度条
{
nameObj: {
1: '申请退款',
2: '已申请'
},
type: 1,
active: true
},
{
nameObj: {
1: '区域运营审核',
2: '区域运营审核',
3: '区域运营审核'
},
type: 1,
active: false
},
{
nameObj: {
1: '总部审核',
2: '总部审核',
3: '总部审核'
},
type: 1,
active: false
},
{
nameObj: {
1: '待退款',
2: '已退款',
},
type: 1,
active: false
}
]
},
/**
* 组件的方法列表
*/
methods: {
setStatusInfo(beforeStatus, afterStatus, transferStatus) {
const STATUS = {
INITIATE: 0, // 发起申请
APPLIED: 1, // 已申请
REGION_REVIEW: 2, // 区域运营审核
REGION_PASS: 3, // 区域运营审核通过
REGION_REJECT: 4, // 区域运营审核不通过
HEAD_REVIEW: 5, // 总部审核
HEAD_PASS: 6, // 总部审核通过
HEAD_REJECT: 7, // 总部审核不通过
PENDING_REFUND: 8, // 待退款
REFUNDED: 9 // 已退款
}
// 定义状态类型
const STATUS_TYPE = {
CURRENT: 1, // 当前进行中
COMPLETED: 2, // 已完成
REJECTED: 3 // 已驳回
}
// 处理空值
const before = beforeStatus ?? ''
const after = afterStatus ?? ''
const transfer = transferStatus ?? ''
// 确定当前状态
let currentStatus
if (transfer == 3) {
currentStatus = STATUS.REFUNDED
} else if (before === '' && after === '') {
currentStatus = STATUS.INITIATE
} else if (before === '' && after == 6) {
currentStatus = STATUS.APPLIED
} else if (before == 6 && after == 7) {
currentStatus = STATUS.REGION_REVIEW
} else if (before == 7 && after == 8) {
currentStatus = STATUS.HEAD_REVIEW
} else if (before == 7 && after == 5) {
currentStatus = STATUS.REGION_REJECT
} else if ([0, 1, 2, 8].includes(before) && [0, 1, 2, 3].includes(after)) {
currentStatus = STATUS.HEAD_REVIEW
} else if (before == 3 && after == 4) {
currentStatus = STATUS.PENDING_REFUND
} else if ([0, 1, 2, 3].includes(before) && after == 5) {
currentStatus = STATUS.HEAD_REJECT
} else if (after == 4) {
currentStatus = STATUS.PENDING_REFUND
}
// 更新状态列表
const { statusList } = this.data
statusList.forEach((item, index) => {
// 第一步状态
if (index === 0) {
item.type = currentStatus === STATUS.INITIATE ? STATUS_TYPE.CURRENT : STATUS_TYPE.COMPLETED
item.active = currentStatus === STATUS.INITIATE
}
// 第二步状态(区域审核)
if (index === 1) {
if (currentStatus === STATUS.REGION_REVIEW) {
item.type = STATUS_TYPE.CURRENT
item.active = true
} else if (currentStatus === STATUS.REGION_REJECT) {
item.type = STATUS_TYPE.REJECTED
item.active = true
} else if (currentStatus > STATUS.REGION_REVIEW) {
item.type = STATUS_TYPE.COMPLETED
item.active = false
}
}
// 第三步状态(总部审核)
if (index === 2) {
if (currentStatus === STATUS.HEAD_REVIEW) {
item.type = STATUS_TYPE.CURRENT
item.active = true
} else if (currentStatus === STATUS.HEAD_REJECT) {
item.type = STATUS_TYPE.REJECTED
item.active = true
} else if (currentStatus > STATUS.HEAD_REVIEW) {
item.type = STATUS_TYPE.COMPLETED
item.active = false
}
}
// 第四步状态(退款)
if (index === 3) {
if (currentStatus == STATUS.PENDING_REFUND) {
item.type = STATUS_TYPE.CURRENT
item.active = true
} else if (currentStatus > STATUS.PENDING_REFUND) {
item.type = STATUS_TYPE.COMPLETED
item.active = false
}
}
})
this.setData({
statusList
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/components/reviewStatus/reviewStatus.wxss */
.status-wrap{
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
margin: var(--fontSize32) 0;
.status-item{
display: flex;
flex-wrap: nowrap;
font-size: var(--fontSize24);
font-weight: 500;
color: #999EA8;
.info{
display: flex;
flex-direction: column;
align-items: center;
width: 80rpx;
.circle-box{
width: var(--fontSize56);
height: var(--fontSize56);
display: flex;
align-items: center;
justify-content: center;
position: relative;
.circle{
width: var(--fontSize40);
height: var(--fontSize40);
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
font-size: var(--fontSize24);
font-weight: 500;
.circle_text{
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
border-radius: 50%;
background: #DEE0E3;
}
}
.status-img{
position: absolute;
top: 0;
left: 0;
z-index: 1;
width: var(--fontSize56);
height: var(--fontSize56);
}
}
.name{
margin-top: var(--fontSize20);
font-weight: 500;
white-space: nowrap;
color: #7A8299;
margin-bottom: var(--fontSize4);
}
}
.line{
margin: 24rpx 8rpx 0;
width: var(--fontSize100);
height: var(--fontSize8);
background: #DEE0E3;
border-radius: var(--fontSize4);
}
.line_color{
background: #347bff1a;
}
}
}
.no_pass_box{
box-sizing: border-box;
width: 100%;
background: #FDECE9;
font-size: var(--fontSize24);
color: #F24724;
padding: var(--fontSize10) var(--fontSize24);
word-break: break-all;
}
.pass_box{
box-sizing: border-box;
width: 100%;
background: #EFF5FE;
font-size: var(--fontSize24);
padding: var(--fontSize10) var(--fontSize24);
color: #666666;
.time{
color: #347BFF;
margin-bottom: var(--fontSize8);
}
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/components/reviewStatus/reviewStatus.wxml-->
<view class="status-wrap">
<view class="status-item" wx:for="{{statusList}}" wx:key="index">
<view class="info {{ item.active && item.type==1 ? 'active' : '' }}">
<view class="circle-box">
<view class="circle">
<image wx:if="{{item.active}}" class="status-img" webp src="{{IMG_URL}}equity/review_icon.png"></image>
<image wx:if="{{item.type==2}}" class="status-img" webp src="{{IMG_URL}}equity/review_success_icon.png"></image>
<image wx:if="{{item.active && item.type==3}}" class="status-img" webp src="{{IMG_URL}}equity/review_error_icon.png"></image>
<view wx:if="{{!item.active && item.type < 2}}" class="circle_text">{{index + 1}}</view>
</view>
</view>
<view class="name" style="color: {{item.active || item.type > 1 ? '#292D33' : '#999EA8'}}">{{item.nameObj[item.type]}}</view>
<block>
<view wx:if="{{(index == 1 || index == 2) && item.type > 1}}" class="status-text" style="color: {{item.type == 2 ? '#292D33' : '#E75E58'}}">{{item.type == 2 ? '通过' : '不通过'}}</view>
<view style="height: var(--fontSize32);" wx:else>{{' '}}</view>
</block>
</view>
<view class="line {{item.type == 2 ? 'line_color' : ''}}" wx:if="{{index!=statusList.length-1}}"></view>
</view>
</view>
<view class="no_pass_box" wx:if="{{infoData.afterStatus == 5}}">
<text>退款申请失败:</text><text>{{infoData.reviewRemark}}</text>
</view>
<view class="pass_box" wx:if="{{infoData.transferStatus == 3}}">
<view class="time">退款成功:{{infoData.refundTime}},实际退款 ¥{{infoData.payAmount}}。</view>
</view>
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "零售退款申请表",
"usingComponents": {
"review-status": "./components/reviewStatus/reviewStatus",
"van-loading": "@vant/weapp/loading/index"
}
}
\ No newline at end of file \ No newline at end of file
// tabWorkOrder/pages/refundDetailList/refundDetailList.js
import api from "~/api/api"
import dayjs from 'dayjs'
Page({
/**
* 页面的初始数据
*/
data: {
orderObj: [{
label: '申请时间',
key: 'createdDate'
}, {
label: '订单支付总额',
key: 'orderTotalPrice',
unit: true
}, {
label: '退款申请金额',
key: 'applyRefundAmount',
unit: true
}],
reviewObj: [{
label: '申请时间',
key: 'createdDate'
}, {
label: '退款时间',
key: 'refundTime'
}, {
label: '订单支付总额',
key: 'orderTotalPrice',
unit: true
}, {
label: '退款申请金额',
key: 'applyRefundAmount',
unit: true
}],
list: [],
flag: true,
reviewStatusObj: {
0: {
text: '区域运营审核中',
background: '#FFF2E0',
color: '#F7A431'
},
1: {
text: '区域运营审核不通过',
background: '#FDECE9',
color: '#F24724'
},
2: {
text: '总部审核',
background: '#FFF2E0',
color: '#F7A431'
},
3: {
text: '总部审核不通过',
background: '#FDECE9',
color: '#F24724'
},
4: {
text: '待退款',
background: '#FFF2E0',
color: '#F7A431'
},
5: {
text: '已退款',
background: '#EAF1FF',
color: '#347BFF'
}
}
},
jump(e) {
let { item } = e.currentTarget.dataset
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${item.applyCode}`
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 获取退款详情列表
api.getRefundDetailListAPI({orderCode: options.orderCode}).then(res => {
let { code, data } = res
if (code == 0) {
// 处理审批状态
data.forEach(val => {
if (val.beforeStatus == 6 && val.afterStatus == 7) {
val.reviewStatus = 0 // 区域运营审批
}
if (val.beforeStatus == 7 && val.afterStatus == 5) {
val.reviewStatus = 1 // 区域审核不通过
}
if (([0, 1, 2, 8].includes(val.beforeStatus) && [0, 1, 2, 3].includes(val.afterStatus)) || (val.beforeStatus == 7 && val.afterStatus == 8)) {
val.reviewStatus = 2 // 总部审核
}
if ([0, 1, 2, 3].includes(val.beforeStatus) && val.afterStatus == 5) {
val.reviewStatus = 3 // 总部审核不通过
}
if (val.afterStatus == 4) {
val.reviewStatus = 4 // 待退款
}
if (val.transferStatus == 3) {
val.reviewStatus = 5 // 已退款
}
val.orderCode = options.orderCode
if (val.createdDate) val.createdDate = dayjs(val.createdDate).format("YYYY-MM-DD HH:mm:ss")
if (val.refundTime) val.refundTime = dayjs(val.refundTime).format("YYYY-MM-DD HH:mm:ss")
val.remark = val.remark || `你的申请被【${val.oaSpFailAuditorName || '总部'}】驳回,请联系驳回人员!`
})
this.setData({
list: data || []
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "退款详情",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/refundDetailList/refundDetailList.wxss */
page {
background-color: #F4F5F7;
}
.list-content {
padding-bottom: var(--fontSize30);
.item {
box-sizing: border-box;
background: #FFFFFF;
padding: var(--fontSize32);
position: relative;
margin: var(--fontSize20);
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 #0000001a;
border-radius: var(--fontSize16);
font-size: var(--fontSize24);
.item-top{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: var(--fontSize28);
.code{
color: '#292D33';
font-size: var(--fontSize32);
font-weight: 500;
.code-text{
font-size: var(--fontSize24);
font-weight: 400;
margin-left: var(--fontSize12);
}
}
.status{
padding: var(--fontSize4) var(--fontSize8);
font-size: var(--fontSize24);
}
}
.order-list {
.order {
display: flex;
margin-bottom: var(--fontSize16);
.order-label {
width: var(--fontSize160);
color: #999EA8;
}
.order-value{
width: calc(100% - var(--fontSize160));
color: #292D33;
display: flex;
align-items: center;
.split {
margin: 0 var(--fontSize6);
}
}
.break-value{
word-break: break-all;
}
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/refundDetailList/refundDetailList.wxml-->
<view class="list-content">
<block wx:if="{{ flag }}">
<block wx:if="{{ list.length > 0 }}">
<block wx:for="{{ list }}" wx:for-item="li" wx:for-index="ind" wx:key="ind">
<view
class="item content"
catchtap="jump"
data-ind="{{ ind }}"
data-item="{{ li }}"
>
<view class="item-top">
<view class="code">
<text>退款编号</text>
<text class="code-text">{{li.applyCode}}</text>
</view>
<view class="status text-center" style="color:{{ reviewStatusObj[li.reviewStatus].color }};background-color:{{reviewStatusObj[li.reviewStatus].background }};">
{{reviewStatusObj[li.reviewStatus].text }}
</view>
</view>
<view class="order-list">
<block wx:for="{{li.reviewStatus != 5 ? orderObj : reviewObj }}" 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><text wx:if="{{i.unit && li[i.key]}}" style="margin-right: var(--fontSize10);">¥</text>{{li[i.key] || ''}}</block>
</view>
</view>
</block>
<block wx:if="{{li.reviewStatus == 5}}">
<view class="order" >
<view class="order-label">实际退款金额</view>
<view class="order-value"><text style="margin-right: var(--fontSize10);">¥</text>{{li.payAmount}}</view>
</view>
</block>
<block wx:if="{{li.reviewStatus == 1 || li.reviewStatus == 3}}">
<view class="order">
<view class="order-label">不通过原因</view>
<view class="order-value break-value">{{li.remark}}</view>
</view>
</block>
</view>
</view>
</block>
</block>
</block>
</view>
\ No newline at end of file \ No newline at end of file
import api from "../../api"
import { getWaitAuditCountAPI } from '~/api/api'
import dayjs from 'dayjs'
// tabWorkOrder/pages/refundOperationList/refundOperationList.js
Page({
/**
* 页面的初始数据
*/
data: {
tabList: [{
text: '全部'
}, {
text: '待审批',
count: 0
}, {
text: '已审批'
}],
activeIndex: 0,
flag: false,
list: [],
pageNum: 1,
reviewStatusObj: {
0: {
text: '待审批',
background: '#FFF2E0',
color: '#F7A431'
},
1: {
text: '审批通过',
background: '#EAF9F1',
color: '#35C376'
},
2: {
text: '不通过',
background: '#FDECE9',
color: '#F24724'
}
},
reviewObj: [{
label: '申请人',
arr: ['applyStaffYqMerchantName', 'applyStaffName']
}, {
label: '申请时间',
key: 'createdDate'
}, {
label: '审批状态',
key: 'reviewText'
}, {
label: '退款状态',
key: 'refundText'
}, {
label: '订单支付总额',
key: 'orderTotalPrice',
unit: true
}, {
label: '退款申请金额',
key: 'applyRefundAmount',
unit: true
}],
orderObj: [{
label: '申请人',
arr: ['applyStaffYqMerchantName', 'applyStaffName']
}, {
label: '申请时间',
key: 'createdDate'
}, {
label: '审批状态',
key: 'reviewText'
}, {
label: '审批人',
key: 'auditor'
}, {
label: '退款状态',
key: 'refundText'
}, {
label: '订单支付总额',
key: 'orderTotalPrice',
unit: true
}, {
label: '退款申请金额',
key: 'applyRefundAmount',
unit: true
}],
nothing: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
scrollonReachBottom() {
this.getList()
this.getStatByStatus()
},
search() {
this.setData({
list: [],
pageNum: 1,
flag: false,
nothing: false,
})
this.getList()
this.getStatByStatus()
},
tabClick(e) {
this.setData({
tabIndex: e.detail
}, () => {
this.search()
})
},
// 获取待审批数目
getStatByStatus() {
let userInfo = wx.$util.getUserInfo()
let { activeIndex, nothing } = this.data
const status = activeIndex == 1 ? 0 : activeIndex == 2 ? 1 : ''
if (nothing) return
getWaitAuditCountAPI({sceneType: userInfo?.sceneType, status}).then(res => {
let { code, data } = res
if (code == 0) {
this.setData({
[`tabList[1].count`]: data.waiteForAuditNum || 0
})
}
})
},
// 获取列表数据
getList() {
let { pageNum, tabIndex, nothing, reviewStatusObj } = this.data
let userInfo = wx.$util.getUserInfo()
if (nothing) return
const auditStatus = tabIndex == 1 ? 0 : tabIndex == 2 ? 3 : ''
wx.$util.showLoading()
api.getRefundReviewListAPI({sceneType: userInfo.sceneType, auditStatus, pageNum, pageSize: 4}).then(res => {
wx.$util.hideLoading()
let total = 0
let list = []
let {
code,
data,
message
} = res
if (code == 0) {
data?.list?.forEach(val => {
val.reviewText = reviewStatusObj[val.auditStatus].text
if (val.beforeStatus == 6 && val.afterStatus == 7) {
val.refundText = '区域运营审核中' // 区域运营审批
val.refundStatus = 0
}
if (val.beforeStatus == 7 && val.afterStatus == 5) {
val.refundText = '区域运营审核不通过' // 区域审核不通过
val.refundStatus = 1
}
if (([0, 1, 2, 8].includes(val.beforeStatus) && [0, 1, 2, 3].includes(val.afterStatus)) || (val.beforeStatus == 7 && val.afterStatus == 8)) {
val.refundText = '总部审核' // 总部审核
val.refundStatus = 2
}
if ([0, 1, 2, 3].includes(val.beforeStatus) && val.afterStatus == 5) {
val.refundText = '总部审核不通过' // 总部审核不通过
val.refundStatus = 3
}
if (val.afterStatus == 4) {
val.refundText = '待退款'
val.refundStatus = 4
}
if (val.transferStatus == 3) {
val.refundText = '已退款' // 已退款
val.refundStatus = 5
}
if (val.createdDate) val.createdDate = dayjs(val.createdDate).format("YYYY-MM-DD HH:mm:ss")
if (val.refundTime) val.refundTime = dayjs(val.refundTime).format("YYYY-MM-DD HH:mm:ss")
val.remark = val.remark || `你的申请被【${val.oaSpFailAuditorName || '总部'}】驳回,请联系驳回人员!`
})
list = data.list
total = data.total
} else {
wx.$util.showToast(message)
}
if (total != 0) {
this.setData({
[`list[${pageNum - 1}]`]: list
})
}
this.setData({
total,
flag: true,
triggered: false,
pageNum: pageNum + 1,
nothing: pageNum == data.pages
})
})
},
jump(e) {
let { item } = e.currentTarget.dataset
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${item.applyCode}`
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.search()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "审批详情",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/refundOperationList/refundOperationList.wxss */
page {
background-color: #F4F5F7;
}
.list-content {
.to-box {
position: sticky;
left: 0;
z-index: 2;
background: #FFFFFF;
}
.list {
box-sizing: border-box;
width: 100%;
.item {
box-sizing: border-box;
background: #FFFFFF;
padding: var(--fontSize32);
position: relative;
margin: 0 var(--fontSize20) var(--fontSize20);
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 #0000001a;
border-radius: var(--fontSize16);
font-size: var(--fontSize24);
.item-top{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: var(--fontSize28);
.code{
color: '#292D33';
font-size: var(--fontSize32);
font-weight: 500;
.code-text{
font-size: var(--fontSize24);
font-weight: 400;
margin-left: var(--fontSize12);
}
}
.status{
padding: var(--fontSize4) var(--fontSize8);
font-size: var(--fontSize24);
}
}
.order-list {
.order {
display: flex;
margin-bottom: var(--fontSize16);
.order-label {
width: var(--fontSize160);
color: #999EA8;
}
.order-value{
width: calc(100% - var(--fontSize160));
color: #292D33;
display: flex;
align-items: center;
.split {
margin: 0 var(--fontSize6);
}
}
.break-value{
word-break: break-all;
}
}
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/refundOperationList/refundOperationList.wxml-->
<view class="list-content">
<view class="to-box">
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" />
</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 - var(--fontSize92));"
refresher-threshold="104"
refresher-triggered="{{ triggered }}"
>
<view style="width: 100%;height: var(--fontSize20);"></view>
<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
data-ind="{{ ind }}"
data-index="{{ index }}"
>
<view
class="item content"
catchtap="jump"
data-ind="{{ ind }}"
data-index="{{ index }}"
data-item="{{ li }}"
>
<view class="item-top">
<view class="code">
<text>退款编号</text>
<text class="code-text">{{li.applyCode}}</text>
</view>
<view class="status text-center" style="color:{{ reviewStatusObj[li.auditStatus].color }};background-color:{{reviewStatusObj[li.auditStatus].background }};">
{{reviewStatusObj[li.auditStatus].text }}
</view>
</view>
<view class="order-list">
<block wx:for="{{li.auditStatus != 0 ? orderObj : reviewObj }}" 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><text wx:if="{{i.unit && li[i.key]}}" style="margin-right: var(--fontSize10);">¥</text>{{li[i.key] || ''}}</block>
</view>
</view>
</block>
<block wx:if="{{li.refundStatus == 5}}">
<view class="order" >
<view class="order-label">实际退款金额</view>
<view class="order-value"><text style="margin-right: var(--fontSize10);">¥</text>{{li.payAmount}}</view>
</view>
<view class="order" >
<view class="order-label">退款时间</view>
<view class="order-value">{{li.refundTime}}</view>
</view>
</block>
<block wx:if="{{li.refundStatus == 1 || li.refundStatus == 3}}">
<view class="order">
<view class="order-label">不通过原因</view>
<view class="order-value break-value">{{li.remark}}</view>
</view>
</block>
</view>
</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>
...@@ -176,7 +176,7 @@ Page({ ...@@ -176,7 +176,7 @@ Page({
inputPlaceholder: '自动填入系统数据' inputPlaceholder: '自动填入系统数据'
}, },
{ {
label: '安心包MAX成交数', label: '安心包成交数',
key: 'axPackageCount', key: 'axPackageCount',
type: 'number', type: 'number',
required: false, required: false,
...@@ -188,6 +188,30 @@ Page({ ...@@ -188,6 +188,30 @@ Page({
inputPlaceholder: '自动填入系统数据' inputPlaceholder: '自动填入系统数据'
}, },
{ {
label: '安心包Pro成交数',
key: 'axPackageProCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: '',
disabled: true,
templateValue: 3,
inputPlaceholder: '自动填入系统数据'
},
{
label: '安心包MAX成交数',
key: 'axPackageMaxCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: '',
disabled: true,
templateValue: 3,
inputPlaceholder: '自动填入系统数据'
},
{
label: '电池延保成交数', label: '电池延保成交数',
key: 'batteryExtendedWarrantyCount', key: 'batteryExtendedWarrantyCount',
type: 'number', type: 'number',
......
...@@ -81,12 +81,24 @@ export const tempRuleFnObj = { ...@@ -81,12 +81,24 @@ export const tempRuleFnObj = {
return /^\d{1}$|^[1-9]\d{0,1}$/.test(value) ? null : { message: '今日接待请输入两位数字' } return /^\d{1}$|^[1-9]\d{0,1}$/.test(value) ? null : { message: '今日接待请输入两位数字' }
} }
}, },
/** 本月接待 */
monthReceptions: {
ruleFn: (rule, value) => {
return /^\d{1}$|^[1-9]\d{0,1}$/.test(value) ? null : { message: '本月接待请输入两位数字' }
}
},
/** 今日成交 */ /** 今日成交 */
todayTransactions: { todayTransactions: {
ruleFn: (rule, value) => { ruleFn: (rule, value) => {
return /^\d{1}$|^[1-9]\d{0,1}$/.test(value) ? null : { message: '今日成交请输入两位数字' } return /^\d{1}$|^[1-9]\d{0,1}$/.test(value) ? null : { message: '今日成交请输入两位数字' }
} }
}, },
/** 本月成交 */
monthTransactions: {
ruleFn: (rule, value) => {
return /^\d{1}$|^[1-9]\d{0,1}$/.test(value) ? null : { message: '本月成交请输入两位数字' }
}
},
}, },
/** 工作总结 */ /** 工作总结 */
// workSummary: { // workSummary: {
......
// const api = wx.$request
import api from '~/utils/request/request.js'
// const api = wx.$request
module.exports = {
/** 工单列表 */
getWorkList(data) {
let params = data || {}
params.sceneType = 1
return api.post('dj.api.smartcarlife.order.search', {
pageSize: 10,
...params
})
},
/**搜索订单(含套餐) */
getWorkPackageGoodsList(data){
let params = data || {}
params.sceneType = 1
return api.post('dj.api.smartcarlife.order.search.containPackageGoods', {
pageSize: 10,
...params
})
},
/**撤销工单 */
revokeOrder(data) {
return api.post('dj.api.smartcarlife.order.revoke', data)
},
/** 根据订单状态统计订单数*/
statByStatus(data) {
data = data || {}
data.sceneType = 1
return api.post('dj.api.smartcarlife.order.statByStatus', data)
},
/** 获取商户基本信息 */
getServiceBaseInfo(data) {
return api.post("dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo", data)
}
}
{
"component": true,
"usingComponents": {
"store-select-popup": "/components/StoreSelectPopup/StoreSelectPopup"
}
}
\ No newline at end of file \ 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.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 \ No newline at end of file
/* pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxss */
.confirm-box {
position: fixed;
top: 0;
z-index: 10;
height: 100vh;
width: 100%;
box-sizing: border-box;
background-color: #fff;
animation: show-confirm-box .5s forwards;
}
@keyframes show-confirm-box {
0%{
right: -100%;
}
100%{
right: 0;
}
}
.box {
margin: 0 var(--fontSize32);
}
.box .title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
color: #292D33;
padding: var(--fontSize34) 0 var(--fontSize30);
position: sticky;
left: 0;
top: 0;
background: #fff;
z-index: 2;
}
.box .title .title-left{
display: flex;
align-items: flex-end;
}
.box .title .title-tips{
font-size: var(--fontSize22);
font-weight: 400;
color: #757980;
margin-left: var(--fontSize8);
}
.box .title .collapse-btn{
width: var(--fontSize48);
height: var(--fontSize48);
}
.box .title .collapse-btn.rotate-180{
transform: rotate(180deg);
}
.box .list-box {
display: flex;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
flex-wrap: wrap;
padding-bottom: var(--fontSize20);
}
.box .list-box .item {
/* width: var(--fontSize214); */
width: calc(234 / 750 * 100%);
min-height: var(--fontSize68);
border-radius: var(--fontSize4);
box-sizing: border-box;
border: var(--fontSize2) solid transparent;
padding: var(--fontSize16) var(--fontSize33);
flex-wrap: wrap;
font-size: var(--fontSize24);
text-align: center;
background-color: #F7F8FA;
color: #292D33;
transition: all .2s;
margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0;
}
.box .list-box .item .text-item{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.box .list-box .item.flex-1{
width: 100%;
text-align: left;
margin-right: 0;
line-height: 100%;
display: flex;
align-items: center;
}
.box .list-box .item.grey{
color: #999EA8;
}
.box .list-box .item.custom-time{
/* width: var(--fontSize316); */
width: calc(316 / 750 * 100%);
margin-bottom: 0;
}
.box .list-box .item.custom-time:last-child{
margin-right: 0;
margin-left: var(--fontSize20);
}
.box .list-box .item:nth-of-type(3n+3) {
margin-right: 0;
}
.box .list-box .calendar .item {
margin-right: 0;
}
.box .list-box .item.active {
background: rgba(53, 130, 238, 0.08);
border: var(--fontSize2) solid #347BFF;
color: #347BFF;
}
.box .list-box .item.disabled {
opacity: .4;
}
.box .list-box .item .inline-block{
display: inline-block;
}
.box .list-box .item .merchant-name{
max-width: calc(100% - var(--fontSize140));
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.btn-box {
position: sticky;
padding: var(--fontSize10) var(--fontSize32);
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize28);
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 9;
background-color: #fff;
}
.btn-box .btn {
border-radius: var(--fontSize12);
border: var(--fontSize2) solid #0075F9;
box-sizing: border-box;
height: var(--fontSize80);
}
.btn-box .btn.clear {
border: var(--fontSize2) solid #DEE0E3;
width: var(--fontSize186);
color: #292D33;
}
.btn-box .btn.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;
text-overflow: ellipsis;
}
\ No newline at end of file \ No newline at end of file
// import api from '../../api/api.js'
// import Util from '../../utils/util'
Component({
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
/*组件的属性列表*/
properties: {
title: {
type: String,
value: '标题'
},
// 弹窗内容
content: {
type: String,
value: '内容'
},
// 弹窗取消按钮文字
btn_no: {
type: String,
value: '取消'
},
// 弹窗确认按钮文字
btn_ok: {
type: String,
value: '补录这笔订单'
},
//是否显示取消按钮
isShowCancel: {
type: Boolean,
value: true
},
//是否显示右上角关闭按钮
isShowClose: {
type: Boolean,
value: true
},
//应用于某些场景的button的open-type属性
sureButtonType: {
type: String,
value: ''
},
//控制弹窗的显示
flag: {
type: Boolean,
value: true
},
orderInfoSetting: {
type: Object,
value: {},
observer: function (n) {
console.log(n, 'orderInfoSetting')
n && this.setOrderInfo(n)
}
}
},
/* 组件的初始数据 */
data: {
wrapAnimate: 'wrapAnimate',
popupAnimate: 'popupAnimate',
tags: [
{
name: '服务态度好',
value: '1',
checked: false
},
{
name: '性价比高',
value: '2',
checked: false
},
{
name: '价格便宜',
value: '3',
checked: false
},
{
name: '一般',
value: '4',
checked: false
}
],
orderInfo: {}
},
lifetimes: {
attached: function () {
// 在组件实例进入页面节点树时执行
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
}
},
/* 组件的方法列表 */
methods: {
setOrderInfo(orderInfo) {
console.log(orderInfo, 'orderInfo')
orderInfo.evaluation = orderInfo.evaluation.split(',')
console.log(orderInfo.evaluation, 'orderInfo.evaluation')
let { tags } = this.data
tags.forEach((item, index) => {
if (orderInfo.evaluation.includes(item.value)) {
item.checked = true
}
})
this.setData({
orderInfo,
tags
})
},
/* 内部私有方法建议以下划线开头 triggerEvent 用于触发事件 */
_close() {
//触发取消回调
this.triggerEvent('close')
},
_success() {}
}
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!