Commit 9a6e2e7b by 李伟康

Merge branch 'SAAS+V4.55.0-0730' of http://192.168.3.233:8090/saas_plus/dj-car-b…

…outique-work-wechat into SAAS+V4.55.0-0730
2 parents 76f0fcb8 141f0db1
Showing 70 changed files with 2049 additions and 179 deletions
...@@ -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,10 @@ ...@@ -116,7 +116,10 @@
"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/refundOperationList/refundOperationList",
"pages/refundDetailList/refundDetailList",
"pages/refundApply/refundApply"
] ]
}, },
{ {
......
// 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 = 0;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
......
...@@ -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') // 判断是否显示发票入口
this.setData({ if (target.showInvoiceEntrance) {
'btnsList[0].name': target.invoicing == 2 ? '查看发票' : '申请开票' 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({
btnsList: btnArr,
btnOrderInfo: { ...target, orderCode: target.payId }
})
this.handleBtnCancel()
} else {
wx.$util.showToast(message)
}
}) })
target.orderCode = target.payId },
this.handleBtnCancel() // 关闭未配置区域运营弹窗提示
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) {
this.handleInvoiceDetail() const btnName = e.detail.name
let { btnOrderInfo } = this.data
switch (btnName) {
case '申请开票':
case '查看发票':
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>
...@@ -305,4 +309,5 @@ ...@@ -305,4 +309,5 @@
</view> </view>
<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>
\ No newline at end of file \ No newline at end of file
<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;
} }
......
...@@ -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;
...@@ -413,6 +414,10 @@ Component({ ...@@ -413,6 +414,10 @@ Component({
if (menuList.some((item) => item.menuText == "战败下单" && mode == 0)) { if (menuList.some((item) => item.menuText == "战败下单" && mode == 0)) {
menuList = menuList.filter((item) => item.menuText != "战败下单"); menuList = menuList.filter((item) => item.menuText != "战败下单");
} }
const auditIndex = menuList.findIndex(e => e.menuText == '待审批')
if (auditIndex > -1) {
this.getAwaitAuditCount(userInfo, auditIndex)
}
// console.log('menuList', mode, menuList,); // console.log('menuList', mode, menuList,);
// 将menuList排序 // 将menuList排序
menuList.sort((a, b) => a.sortVal - b.sortVal) menuList.sort((a, b) => a.sortVal - b.sortVal)
...@@ -602,6 +607,15 @@ Component({ ...@@ -602,6 +607,15 @@ Component({
icon: "mentorship-manage" icon: "mentorship-manage"
}); });
} }
// 区域运营角色退款审批入口
if (userInfo?.loginRole == 3 && menuList.every(item => item.menuText != '待审批')) {
menuList.push({
menuText: '待审批',
path: 'tabWorkOrder.refundOperationList',
icon: 'refund_review_icon',
tipsNum: 0
})
}
this.checkIsPadOrNot(); this.checkIsPadOrNot();
this.getData(); this.getData();
// 隐藏待办事项模块 // 隐藏待办事项模块
...@@ -617,6 +631,16 @@ Component({ ...@@ -617,6 +631,16 @@ 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, index) {
getWaitAuditCountAPI({sceneType: userInfo?.sceneType}).then(res => {
let { code, data } = res
if (code == 0) {
this.setData({
[`menuList[${index}].tipsNum`]: data.waiteForAuditNum
})
}
})
},
getStoreList() { getStoreList() {
return new Promise(resolve => { return new Promise(resolve => {
// if (wx.$receptionLoaded) return // if (wx.$receptionLoaded) return
...@@ -1193,7 +1217,7 @@ Component({ ...@@ -1193,7 +1217,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,
......
...@@ -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()
}, },
......
...@@ -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);
}, },
......
...@@ -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,
...@@ -536,6 +537,10 @@ Page({ ...@@ -536,6 +537,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) {
...@@ -1544,14 +1549,38 @@ Page({ ...@@ -1544,14 +1549,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
......
// 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/api.js'
// import Util from '../../utils/util' // import Util from '../../utils/util'
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/'
Component({ Component({
options: { options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持 multipleSlots: true // 在组件定义时的选项中启用多slot支持
...@@ -56,6 +58,7 @@ Component({ ...@@ -56,6 +58,7 @@ Component({
}, },
/* 组件的初始数据 */ /* 组件的初始数据 */
data: { data: {
IMG_URL,
wrapAnimate: 'wrapAnimate', wrapAnimate: 'wrapAnimate',
popupAnimate: 'popupAnimate', popupAnimate: 'popupAnimate',
tags: [ tags: [
...@@ -94,7 +97,20 @@ Component({ ...@@ -94,7 +97,20 @@ Component({
methods: { methods: {
setOrderInfo(orderInfo) { setOrderInfo(orderInfo) {
console.log(orderInfo, 'orderInfo') console.log(orderInfo, 'orderInfo')
// constructionImgList
orderInfo.customerPhotos.forEach(item => {
orderInfo.subOrderList.forEach(el => {
if (item.subOrderCode == el.subOrderCode) {
if (el.constructionImgList) {
el.constructionImgList.push(item.customerPhoto)
} else {
el.constructionImgList = [item.customerPhoto]
}
}
})
})
orderInfo.evaluation = orderInfo.evaluation.split(',') orderInfo.evaluation = orderInfo.evaluation.split(',')
console.log(orderInfo.subOrderList, 'orderInfo.evaluation')
console.log(orderInfo.evaluation, 'orderInfo.evaluation') console.log(orderInfo.evaluation, 'orderInfo.evaluation')
let { tags } = this.data let { tags } = this.data
tags.forEach((item, index) => { tags.forEach((item, index) => {
......
...@@ -240,4 +240,81 @@ ...@@ -240,4 +240,81 @@
.act { .act {
background: #347BFF; background: #347BFF;
color: #FFFFFF; color: #FFFFFF;
}
\ No newline at end of file \ No newline at end of file
}
.placeholder {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-size: var(--fontSize32);
font-weight: 500;
color: #BEC1C7;
}
.tire-block {
width: var(--fontSize180);
height: var(--fontSize180);
box-sizing: border-box;
background-color: #F4F5F7;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
border-radius: var(--fontSize8);
overflow: hidden;
}
.tire-block:not(:nth-child(3n)) {
margin-right: var(--fontSize20);
}
.tire-block:nth-child(n+4) {
margin-top: var(--fontSize20);
}
.tire-img-box {
position: relative;
width: 100%;
height: 100%;
}
.tire-img-box .tire-img {
width: 100%;
height: 100%;
}
.icon-delete {
position: absolute;
top: var(--fontSize16);
right: var(--fontSize16);
width: var(--fontSize48);
height: var(--fontSize48);
}
.tire-tip {
height: var(--fontSize40);
line-height: var(--fontSize40);
background-color: #ebf2fd;
border-radius: var(--fontSize8);
font-size: var(--fontSize24);
color: #347BFF;
margin-top: var(--fontSize28);
padding: var(--fontSize4) var(--fontSize24);
border-radius: var(--fontSize8);
}
.icon-plus {
width: var(--fontSize80);
height: var(--fontSize80);
margin-bottom: var(--fontSize20);
}
.flex {
display: flex;
flex-wrap: wrap;
}
.box {}
\ No newline at end of file \ No newline at end of file
<!-- components/orderSwitchPopup/orderSwitchPopup.wxml --> <!-- components/orderSwitchPopup/orderSwitchPopup.wxml -->
<view wx:if="{{flag}}" class='container' style=''> <wxs src="../../index.wxs" module="filter" />
<view wx:if="{{ flag }}" class="container" style="">
<!-- bindtap='_close' 取消遮光层关闭事件 --> <!-- bindtap='_close' 取消遮光层关闭事件 -->
<view class='wrap {{wrapAnimate}}' style='background:rgba(0,0,0,{{bgOpacity}});' /> <view class="wrap {{ wrapAnimate }}" style="background:rgba(0,0,0,{{ bgOpacity }});" />
<view class='popup-container {{popupAnimate}}'> <view class="popup-container {{ popupAnimate }}">
<view class="v_title"> <view class="v_title">
<view class="wx-popup-title">{{title}}</view> <view class="wx-popup-title">{{title}}</view>
<image <image bindtap="_close" src="../../images/order-close.png" mode="widthFix" class="btn-colse" wx:if="{{ isShowClose }}" />
bindtap='_close'
src='../../images/order-close.png'
mode='widthFix'
class='btn-colse'
wx:if="{{isShowClose}}" />
</view> </view>
<view class="wx-popup-con"> <view class="wx-popup-con">
<scroll-view <scroll-view scroll-y enable-back-to-top refresher-enabled="{{ false }}" refresher-threshold="104" style="height:100%;">
scroll-y
enable-back-to-top
refresher-enabled="{{false}}"
refresher-threshold="104"
style="height:100%;">
<view class="signature"> <view class="signature">
<image src="{{orderInfo.electronicSignature}}" binderror="" bindload="" /> <image src="{{ orderInfo.electronicSignature }}" binderror="" bindload="" />
</view> </view>
<view class="customerPhotos"> <!-- <view class="customerPhotos">
<image <image
class="customerPhotosItem" class="customerPhotosItem"
wx:for="{{orderInfo.customerPhotos}}" wx:for="{{orderInfo.customerPhotos}}"
...@@ -30,28 +21,58 @@ ...@@ -30,28 +21,58 @@
wx:key="index" wx:key="index"
binderror="" binderror=""
bindload="" /> bindload="" />
</view> </view> -->
<view class='star-box'> <block wx:for="{{ orderInfo.subOrderList }}" wx:key="index" wx:for-item="imgItem" wx:for-index="imgIndex">
<view class="box">
<view class="technicianName">
<view class="name">{{imgItem.technicianName}}</view>
<view class="icon">技师</view>
<view class="status">{{imgItem.approveStatus == null? '未通过':imgItem.approveStatus == 'Y'?'通过':'不通过'}}</view>
</view>
<view class="title">
<!-- 上传客户合照或车辆照片 -->
<text class="goodsName"> {{filter.replaceItemText(imgItem.upgradeGoodsAlias) ||filter.replaceItemText(imgItem.upgradeGoodsName) || ''}}</text>
</view>
<view class="flex">
<view class="tire-block" wx:for="{{ imgItem.constructionImgList || [] }}" wx:key="index">
<view class="tire-img-box" catchtap="handlePreviewImg" data-item="{{ item }}" data-imgindex="{{ imgIndex }}">
<image
class="icon-delete"
catchtap="handleDelete"
data-index="{{ index }}"
data-imgindex="{{ imgIndex }}"
src="/tabWorkOrder/images/icon-delete.png"
/>
<image class="tire-img" src="{{ item }}" />
</view>
</view>
<view
class="tire-block"
bindtap="handleUpload"
data-index="{{ imgIndex }}"
wx:if="{{ !imgItem.constructionImgList || imgItem.constructionImgList.length<9 }}"
>
<view>
<image class="icon-plus" src="{{ IMG_URL }}camera_icon.png" />
</view>
</view>
</view>
</view>
</block>
<view class="star-box">
<view class="label">评分:</view> <view class="label">评分:</view>
<block wx:for="{{5}}" wx:key="index"> <block wx:for="{{ 5 }}" wx:key="index">
<view class="star" bindtap="setStar" data-index="{{index}}"> <view class="star" bindtap="setStar" data-index="{{ index }}">
<image src="{{index < orderInfo.rating?'/tabWorkOrder/images/star-active.png':'/tabWorkOrder/images/star.png'}}" /> <image src="{{ index < orderInfo.rating?'/tabWorkOrder/images/star-active.png':'/tabWorkOrder/images/star.png' }}" />
</view> </view>
</block> </block>
</view> </view>
<view class="tags"> <view class="tags">
<block wx:for="{{tags}}" wx:key="index"> <block wx:for="{{ tags }}" wx:key="index">
<view <view wx:if="{{ item.checked }}" class="tag {{ item.checked?'act':'' }}" bindtap="chooseTag" data-index="{{ index }}">{{item.name}}</view>
wx:if="{{item.checked}}"
class="tag {{item.checked?'act':''}}"
bindtap="chooseTag"
data-index="{{index}}">
{{item.name}}
</view>
</block> </block>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
var replaceItemText = function (item) { var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g') var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ') // return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null return item ? item.replace(reg, ' ') : null
...@@ -16,7 +15,9 @@ var formatPosition = function (item, positionTypeList) { ...@@ -16,7 +15,9 @@ var formatPosition = function (item, positionTypeList) {
var filterData = positionTypeList.filter(function (v) { var filterData = positionTypeList.filter(function (v) {
return v.positionValue == item return v.positionValue == item
}) })
return (filterData.length && filterData[0] && filterData[0].positionName) || '' return (
(filterData.length && filterData[0] && filterData[0].positionName) || ''
)
} }
var isDateWithin7Days = function (date) { var isDateWithin7Days = function (date) {
...@@ -53,8 +54,8 @@ var filterIncludes = function (item, arr) { ...@@ -53,8 +54,8 @@ var filterIncludes = function (item, arr) {
var filterTemplateList = function (arr, value) { var filterTemplateList = function (arr, value) {
if (value == 3) { if (value == 3) {
return arr.filter(function (item) { return arr.filter(function (item) {
return item.templateValue != 3; return item.templateValue != 3
}); })
} else { } else {
return arr return arr
} }
...@@ -62,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
} }
...@@ -34,6 +34,7 @@ Page({ ...@@ -34,6 +34,7 @@ Page({
// 发票按钮 // 发票按钮
invoiceName: '申请开票', invoiceName: '申请开票',
invoiveVisible: false, invoiveVisible: false,
showMoreBtn: false
}, },
RatingPopupSetting() { RatingPopupSetting() {
this.setData({ this.setData({
...@@ -377,7 +378,7 @@ Page({ ...@@ -377,7 +378,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 +405,17 @@ Page({ ...@@ -404,6 +405,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
: ""; : "";
...@@ -828,14 +840,14 @@ Page({ ...@@ -828,14 +840,14 @@ Page({
/** /**
* 未开发票 * 未开发票
* invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。 * invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。
* */ * */
!invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", { !invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", {
obj: invoiceIssueQrcode obj: invoiceIssueQrcode
}) })
} }
}).finally(() => { }).finally(() => {
wx.$util.hideLoading() wx.$util.hideLoading()
}) })
}, },
previewImage(e) { previewImage(e) {
...@@ -859,6 +871,11 @@ Page({ ...@@ -859,6 +871,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; // 使用后清除
}, },
/** /**
...@@ -874,9 +891,9 @@ Page({ ...@@ -874,9 +891,9 @@ 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"
} }
} }
...@@ -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 {
......
...@@ -105,9 +105,14 @@ ...@@ -105,9 +105,14 @@
<view class="box"> <view class="box">
<view class="title infoTitle"> <view class="title infoTitle">
<view class="flex">工单信息 <view class="flex">工单信息
<view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice"> <view style="display: flex;gap: var(--fontSize32);margin-left: var(--fontSize32);">
<gl-image class="icon" src="/icon-invoice.png"></gl-image> <view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice">
{{invoiceName}} <gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
<view wx:if="{{isStaff && showMoreBtn}}">
<apply-refund-btn orderInfo="{{orderInfo}}"></apply-refund-btn>
</view>
</view> </view>
</view> </view>
<view class="operate" wx:if="{{ orderInfo.canOperate&&(isYqdSuper||isStaff)&&isMake }}"> <view class="operate" wx:if="{{ orderInfo.canOperate&&(isYqdSuper||isStaff)&&isMake }}">
......
...@@ -6,6 +6,7 @@ Page({ ...@@ -6,6 +6,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isloading: false,
codeInfo: {}, codeInfo: {},
editFormData: [{ editFormData: [{
label: '销售方名称', label: '销售方名称',
...@@ -26,36 +27,89 @@ Page({ ...@@ -26,36 +27,89 @@ 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
if (invoiceInfo) { if (invoiceInfo) {
// 开票成功、开票失败 // 开票成功、开票失败
wx.$router.redirectTo("tabWorkOrder.invoiceResult", { wx.$router.redirectTo("tabWorkOrder.invoiceResult", {
obj: { obj: {
// code - 0000:成功;其他:失败 // code - 0000:成功;其他:失败
code: invoiceInfo.code, code: invoiceInfo.code,
bizOrderCode: invoiceIssueQrcode.bizOrderCode, bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount, invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceIssueQrcode.createdDate, createdDate: invoiceIssueQrcode.createdDate,
imgUrl: invoiceInfo.imgUrl, imgUrl: invoiceInfo.imgUrl,
msg: invoiceInfo.msg msg: invoiceInfo.msg
} }
}) })
} }
}).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
}
var that = this
const params = {
qrcodeNo: codeInfo.qrcodeNo
}
this.setData({
isloading: true
})
commonApi.cancelInvoiceQrcode(params).then(res => {
console.log(res, 'res---')
let { data } = res
wx.showModal({
title: data ? '申请成功' : '申请失败',
content: data ? '原开票二维码已经作废,请选择发票类型重新开票' : '已经开票成功,无法申请重开,有问题建议线下联系总部',
showCancel: false,
confirmText: '知道了',
confirmColor: '#347BFF',
success(res) {
data ? that.handleNewInvoce() : that.handleConfirm()
}
})
}).finally(() => {
this.setData({
isloading: false
}) })
})
},
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))
}) })
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<view>未显示可5分钟后重试。</view> <view>未显示可5分钟后重试。</view>
</view> </view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn" bindtap="handleCancelInvoice">发票类型有误,申请重开</view>
<view class="btn" bindtap="handleConfirm">结果查询</view> <view class="btn" bindtap="handleConfirm">结果查询</view>
<view class="btn btn-back" bindtap="handleBack">返回列表</view> <view class="btn btn-back" bindtap="handleBack">返回列表</view>
</view> </view>
......
...@@ -34,7 +34,7 @@ Page({ ...@@ -34,7 +34,7 @@ Page({
} }
}) })
}, },
handleBack() { handleBack() {
wx.$router.back() wx.$router.back()
}, },
...@@ -49,13 +49,25 @@ Page({ ...@@ -49,13 +49,25 @@ 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')
}
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
wx.hideShareMenu({ wx.hideShareMenu({
menus: ['shareAppMessage', 'shareTimeline'] menus: ['shareAppMessage', 'shareTimeline']
}) })
}, },
/** /**
......
<!--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>
......
...@@ -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; // 使用后清除
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
......
...@@ -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
...@@ -95,9 +95,15 @@ ...@@ -95,9 +95,15 @@
<view class="box"> <view class="box">
<view class="title invoice"> <view class="title invoice">
工单信息 工单信息
<view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice"> <view style="display: flex;gap: var(--fontSize32);">
<!-- 非门店收款 已支付/已退款展示 -->
<view wx:if="{{isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12)}}">
<apply-refund-btn orderInfo="{{orderInfo}}"></apply-refund-btn>
</view>
<view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image> <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">
......
...@@ -20,7 +20,6 @@ Page({ ...@@ -20,7 +20,6 @@ Page({
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isShowPhone: app.globalData.YQorderSetting?.yqPhoneConfig, isShowPhone: app.globalData.YQorderSetting?.yqPhoneConfig,
ctx: '', ctx: '',
hasDraw: false,
canvasWidth: 0, canvasWidth: 0,
canvasHeight: 0, canvasHeight: 0,
startPoint: { startPoint: {
...@@ -32,8 +31,9 @@ Page({ ...@@ -32,8 +31,9 @@ Page({
lineSize: 3, // 笔记倍数 lineSize: 3, // 笔记倍数
radius: 1.5, //画圆的半径 radius: 1.5, //画圆的半径
showPlaceHoder: true, showPlaceHoder: true,
signImage: '', hasDraw: true,
constructionImgList: [], signImage: 'http://qcimg01.glsx.com.cn:7060/group1/M00/0E/6E/wKgD3mhwuRWAHRWPAABVORH__8o582.png',
constructionImgList: ['http://qcimg01.glsx.com.cn:7060/group1/M00/0E/6E/wKgD3mhwuRWAHRWPAABVORH__8o582.png'],
rating: 5, rating: 5,
formData: {}, formData: {},
tags: [{ tags: [{
...@@ -89,10 +89,6 @@ Page({ ...@@ -89,10 +89,6 @@ Page({
this.setData({ this.setData({
[name]: !tags[index].checked [name]: !tags[index].checked
}) })
// customerComment = `${customerComment || ''}${tags[index]}`
// this.setData({
// customerComment
// })
}, },
setStar(e) { setStar(e) {
let { let {
...@@ -105,21 +101,26 @@ Page({ ...@@ -105,21 +101,26 @@ Page({
// 删除图片 // 删除图片
handleDelete(e) { handleDelete(e) {
let { let {
index index,
imgIndex,
} = e.currentTarget.dataset } = e.currentTarget.dataset
let { let {
orderInfo,
constructionImgList constructionImgList
} = this.data } = this.data
constructionImgList.splice(index, 1) orderInfo.subOrderList[index].constructionImgList.splice(index, 1)
this.setData({ this.setData({
constructionImgList // constructionImgList
orderInfo
}) })
}, },
// 放大图片 // 放大图片
handlePreviewImg(e) { handlePreviewImg(e) {
let { let {
item item,
imgIndex
} = e.currentTarget.dataset } = e.currentTarget.dataset
console.log(item) console.log(item)
wx.$util.previewImage({ wx.$util.previewImage({
...@@ -129,8 +130,12 @@ Page({ ...@@ -129,8 +130,12 @@ Page({
handleUpload(e) { handleUpload(e) {
let that = this let that = this
// console.log(e);
let { index } = e.currentTarget.dataset
// console.log(index);
let { let {
constructionImgList constructionImgList,
orderInfo
} = this.data } = this.data
wx.chooseImage({ wx.chooseImage({
count: 1, count: 1,
...@@ -154,9 +159,11 @@ Page({ ...@@ -154,9 +159,11 @@ Page({
message message
} = img } = img
if (code == 0) { if (code == 0) {
constructionImgList.push(data) orderInfo.subOrderList[index].constructionImgList = orderInfo.subOrderList[index].constructionImgList || []
orderInfo.subOrderList[index].constructionImgList.push(data)
that.setData({ that.setData({
constructionImgList // constructionImgList
orderInfo
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -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 = []
...@@ -467,14 +485,14 @@ Page({ ...@@ -467,14 +485,14 @@ Page({
/** /**
* 未开发票 * 未开发票
* invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。 * invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。
* */ * */
!invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", { !invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", {
obj: invoiceIssueQrcode obj: invoiceIssueQrcode
}) })
} }
}).finally(() => { }).finally(() => {
wx.$util.hideLoading() wx.$util.hideLoading()
}) })
}, },
...@@ -535,7 +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; // 使用后清除
}, },
/** /**
...@@ -850,9 +880,9 @@ Page({ ...@@ -850,9 +880,9 @@ 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"
} }
} }
...@@ -52,23 +52,23 @@ page { ...@@ -52,23 +52,23 @@ page {
} }
.box .title.invoice { .box .title.invoice {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.invoice-btn { .invoice-btn {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #347BFF; color: #347BFF;
} }
.invoice-btn .icon { .invoice-btn .icon {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-right: 6rpx; margin-right: 6rpx;
} }
.box .flex { .box .flex {
display: flex; display: flex;
...@@ -91,25 +91,26 @@ page { ...@@ -91,25 +91,26 @@ page {
color: #888888; color: #888888;
} }
.box .goods .item:first-child{ .box .goods .item:first-child {
margin-top: 0; margin-top: 0;
} }
.box .goods .item:last-child{ .box .goods .item:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.box .goods .item .subItem_box{ .box .goods .item .subItem_box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
} }
.box .goods .item .subItem_box .type{ .box .goods .item .subItem_box .type {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
} }
.box .goods .item .subItem_box .artificer,.film-roll{ .box .goods .item .subItem_box .artificer,
.film-roll {
height: var(--fontSize48); height: var(--fontSize48);
background: #FFFFFF; background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3; border: var(--fontSize1) solid #DEE0E3;
...@@ -122,26 +123,28 @@ page { ...@@ -122,26 +123,28 @@ page {
font-size: var(--fontSize24); font-size: var(--fontSize24);
} }
.artificer text{ .artificer text {
max-width: var(--fontSize96); max-width: var(--fontSize96);
} }
.film-roll text{ .film-roll text {
max-width: var(--fontSize120); max-width: var(--fontSize120);
} }
.artificer .grey_text,.film-roll .grey_text{ .artificer .grey_text,
.film-roll .grey_text {
color: #BEC1C7; color: #BEC1C7;
} }
.artificer image,.film-roll image{ .artificer image,
.film-roll image {
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize28); height: var(--fontSize28);
margin-left: var(--fontSize8); margin-left: var(--fontSize8);
flex-shrink: 0; flex-shrink: 0;
} }
.box .goods .item .subItem_box .artificer{ .box .goods .item .subItem_box .artificer {
height: var(--fontSize48); height: var(--fontSize48);
background: #FFFFFF; background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3; border: var(--fontSize1) solid #DEE0E3;
...@@ -154,7 +157,7 @@ page { ...@@ -154,7 +157,7 @@ page {
font-size: var(--fontSize24); font-size: var(--fontSize24);
} }
.box .goods .item .goods_name{ .box .goods .item .goods_name {
color: #333333; color: #333333;
margin-bottom: var(--fontSize22); margin-bottom: var(--fontSize22);
} }
...@@ -163,7 +166,7 @@ page { ...@@ -163,7 +166,7 @@ page {
width: var(--fontSize492); width: var(--fontSize492);
} }
.box .goods .item .goods_name .price{ .box .goods .item .goods_name .price {
font-weight: 600; font-weight: 600;
} }
...@@ -188,7 +191,7 @@ page { ...@@ -188,7 +191,7 @@ page {
justify-content: flex-end; justify-content: flex-end;
} }
.box .cell.total .label{ .box .cell.total .label {
width: auto; width: auto;
color: #757980; color: #757980;
} }
...@@ -207,13 +210,13 @@ page { ...@@ -207,13 +210,13 @@ page {
width: var(--fontSize152); width: var(--fontSize152);
} }
.box .cell .label.icon{ .box .cell .label.icon {
width: var(--fontSize96); width: var(--fontSize96);
height: var(--fontSize36); height: var(--fontSize36);
margin-right: var(--fontSize8); margin-right: var(--fontSize8);
} }
.box .cell .image-box{ .box .cell .image-box {
display: flex; display: flex;
flex-flow: wrap; flex-flow: wrap;
gap: var(--fontSize10); gap: var(--fontSize10);
...@@ -313,7 +316,7 @@ page { ...@@ -313,7 +316,7 @@ page {
/* width: var(--fontSize686); /* width: var(--fontSize686);
height: var(--fontSize560); */ height: var(--fontSize560); */
width: var(--fontSize646); width: var(--fontSize646);
height: var(--fontSize400); height: var(--fontSize400);
} }
.full_icon { .full_icon {
...@@ -329,6 +332,7 @@ page { ...@@ -329,6 +332,7 @@ page {
bottom: var(--fontSize24); bottom: var(--fontSize24);
z-index: 100; z-index: 100;
} }
.icon { .icon {
width: var(--fontSize40); width: var(--fontSize40);
height: var(--fontSize40); height: var(--fontSize40);
...@@ -465,7 +469,8 @@ page { ...@@ -465,7 +469,8 @@ page {
background: #347BFF; background: #347BFF;
color: #FFFFFF; color: #FFFFFF;
} }
.comfirmBtn{
.comfirmBtn {
z-index: 2000; z-index: 2000;
} }
...@@ -473,7 +478,7 @@ page { ...@@ -473,7 +478,7 @@ page {
background: #F7F8FA; background: #F7F8FA;
border: var(--fontSize1) solid #EFF0F2; border: var(--fontSize1) solid #EFF0F2;
border-radius: var(--fontSize12); border-radius: var(--fontSize12);
margin: 0 calc(-1 * var(--fontSize20)) var(--fontSize16); margin: 0 calc(-1 * var(--fontSize20)) var(--fontSize16);
} }
.meal-hd { .meal-hd {
...@@ -532,7 +537,7 @@ page { ...@@ -532,7 +537,7 @@ page {
.meal-bd-head .price { .meal-bd-head .price {
font-family: "numberNor"; font-family: "numberNor";
margin-left:auto; margin-left: auto;
} }
.meal-bd-bottom { .meal-bd-bottom {
...@@ -541,9 +546,18 @@ page { ...@@ -541,9 +546,18 @@ page {
font-weight: 400; font-weight: 400;
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #757980; color: #757980;
margin-left:var(--fontSize24); margin-left: var(--fontSize24);
} }
.meal-bd-bottom .count { .meal-bd-bottom .count {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
}
.bottom {
margin-bottom: 100rpx;
}
.goodsName {
font-size: 24rpx;
color: #292D33;
} }
\ No newline at end of file \ No newline at end of file
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"
}
}
\ No newline at end of file \ No newline at end of file
// tabWorkOrder/pages/refundDetailList/refundDetailList.js
import api from "~/api/api"
Page({
/**
* 页面的初始数据
*/
data: {
orderObj: [{
label: '申请时间',
key: 'createdDate'
}, {
label: '订单支付总额',
key: 'refundableTotalPrice',
unit: true
}, {
label: '退款申请金额',
key: 'applyRefundAmount',
unit: true
}],
reviewObj: [{
label: '申请时间',
key: 'createdDate'
}, {
label: '退款时间',
key: 'refundTime'
}, {
label: '订单支付总额',
key: 'refundableTotalPrice',
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 = new Date(val.createdDate).format("yyyy-MM-dd hh:mm:ss")
if (val.refundTime) val.refundTime = new Date(val.refundTime).format("yyyy-MM-dd hh:mm:ss")
})
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'
// 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: 'refundableTotalPrice',
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: 'refundableTotalPrice',
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 = new Date(val.createdDate).format("yyyy-MM-dd hh:mm:ss")
if (val.refundTime) val.refundTime = new Date(val.refundTime).format("yyyy-MM-dd hh:mm:ss")
})
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>
...@@ -63,9 +63,9 @@ const domain_items = { ...@@ -63,9 +63,9 @@ const domain_items = {
// dj: "http://192.168.1.169:8292", //蔡远明 // dj: "http://192.168.1.169:8292", //蔡远明
// dj: 'http://192.168.1.174:8292',//范富荣 // dj: 'http://192.168.1.174:8292',//范富荣
// dj: 'http://192.168.1.89:8292', //周杭 // dj: 'http://192.168.1.89:8292', //周杭
dj: 'http://192.168.1.76:8292', //璐琦 // dj: 'http://192.168.1.76:8292', //璐琦
// dj: 'http://192.168.1.227:8292',//陈希 // dj: 'http://192.168.1.227:8292',//陈希
// dj: 'http://192.168.1.67:8292',//周立明 dj: 'http://192.168.1.67:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺 // dj: 'http://192.168.148.235:8292',// 熊正顺
// dj: 'http://192.168.148.221:8292', // dj: 'http://192.168.148.221:8292',
// scrm: 'http://192.168.1.165:8292' // scrm: 'http://192.168.1.165:8292'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!