Commit ffb5574e by 胡悦

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

…outique-work-wechat into SAAS+V4.53.0-0528
2 parents 9c87985d 3ffb55a1
Showing 69 changed files with 1688 additions and 250 deletions
......@@ -349,8 +349,16 @@ module.exports = {
getStaffMentorFlag(data) {
return api.post('dj.api.smartcarlife.employee.isMentor', data)
},
// 查询店铺配置
getShopMerchantPointConfig(data) {
// 查询店铺配置
getShopMerchantPointConfig(data) {
return api.post("dj.api.smartcarlife.shopMerchantPointConfig.get", data);
},
// 申请开票
createOrderCode(data) {
return api.post("dj.api.smartcarlife.vpt.invoiceIssueQrcode.createByOrder", data);
},
// 根据订单号查询二维码和发票信息
getOrderCode(data) {
return api.post("dj.api.smartcarlife.vpt.invoiceIssueQrcode.getByOrderCode", data);
}
}
......@@ -114,7 +114,9 @@
"pages/supervisorDaily/supervisorDaily",
"pages/residentManage/residentManage",
"pages/mentorshipManage/mentorshipManage",
"pages/tabWorkOrderRelevance/index"
"pages/tabWorkOrderRelevance/index",
"pages/invoiceCode/invoiceCode",
"pages/invoiceResult/invoiceResult"
]
},
{
......
......@@ -47,7 +47,7 @@ Component({
observer: function (n, o) {
const phoneRex = /^[1]([3-9])[0-9]{9}$/;
if (phoneRex.test(n)) {
this.getCustomerCouponList(n);
// this.getCustomerCouponList(n);
this.getCouponList(this.data.merchantId);
}
},
......@@ -115,7 +115,7 @@ Component({
} else {
wx.$util.showToast(message);
}
this.getCustomerCouponList(customerPhone);
// this.getCustomerCouponList(customerPhone);
this.getCouponList(
this.data.merchantId,
!(data && Object.keys(data)?.length)
......@@ -123,38 +123,41 @@ Component({
});
}
},
getCustomerCouponList(customerPhone) {
// statusList 客户券状态 0待使用 1使用中 2已回收 3已使用
getCouponList(merchantId, setCoupon) {
let { yqMerchantId, customerPhone} = this.data;
// 先判断是否有客户券
let params = {
customerPhone,
statusList: [0, 1],
usedFlag: "N",
};
api.getCustomerCouponList(params).then((res) => {
let { code, data, message } = res;
if (code == 0) {
let thisPage = wx.$router.getPageInstance();
let { orderObj } = thisPage.data;
let filterList = data.filter((item) => {
return (
item.status != 1 ||
(item.status == 1 && item.id == orderObj.customerCouponId)
);
});
this.setData({
customerCouponList: filterList,
});
this.checkCoupon();
} else {
wx.$util.showToast(message);
}
});
if (customerPhone) {
api.getCustomerCouponList(params).then((res) => {
let { code, data, message } = res;
if (code == 0) {
let thisPage = wx.$router.getPageInstance();
let { orderObj } = thisPage.data;
let filterList = data.filter((item) => {
return (
item.status != 1 ||
(item.status == 1 && item.id == orderObj.customerCouponId)
);
});
this.setData({
customerCouponList: filterList,
})
} else {
wx.$util.showToast(message);
}
this.getMerchantCoupon(merchantId, yqMerchantId, setCoupon)
});
} else { // 获取门店券
this.getMerchantCoupon(merchantId, yqMerchantId, setCoupon)
}
},
getCouponList(merchantId, setCoupon) {
let { yqMerchantId, filmOrder } = this.data;
// console.log(merchantId, yqMerchantId, 'yqMerchantId');
// 解决 yqMerchantId 为0 请求空数据的问题
getMerchantCoupon(merchantId, yqMerchantId, setCoupon) {
let { filmOrder } = this.data
merchantId &&
yqMerchantId &&
api
......@@ -330,7 +333,21 @@ Component({
},
});
}
this.confirm();
// this.confirm();
// 卡券数据赋值
let { chooseItem } = this.data;
let thisPage = wx.$router.getPageInstance();
let { orderObj } = thisPage.data;
delete orderObj.customerCouponId;
delete orderObj.merchantCouponId;
orderObj = {
...orderObj,
...chooseItem,
};
console.log(chooseItem, orderObj, "chooseItem");
thisPage.setData({
orderObj,
});
}
}
},
......
......@@ -71,58 +71,76 @@ Component({
[target]: selectValue
}, () => {
//监听规格是否全部选中
this.watchAllChose(index, true)
this.watchAllChose(index)
})
},
watchAllChose(index, type) {
/*
index:索引
cancel:点击选择按钮的操作;只有选中后,取消才可以触发
*/
watchAllChose(index, cancel) {
let {
goodsList,
strTemp
} = this.data;
let result = goodsList[index].multipleSpecificationsGoods.specificationList.every(item => item.value)
let active = goodsList[index].active //取消选中时,情况规格的选中值
if (!active) {
console.log(result, goodsList[index],1)
if (result) {
if (!cancel) {
let arr = []
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(spec => {
arr.push(spec.value)
})
let str = arr.join(';~;')
goodsList[index].active = true
// strTemp用来存储上一次选中的值,判断规格是否重新选择 ,避免页面交互闪烁
// if (type && str != strTemp) {
//获取该规格的商品是否存在
console.log(str)
if( goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]){
goodsList[index].active = true
console.log(goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str],'str')
goodsList[index].multipleSpecificationsGoods.goods = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]
goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId
goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(';~;', '/')
}else{
console.log(88888)
wx.$util.showToast('暂无该规格商品')
goodsList[index].active=false
goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = ''
})
}
this.setData({
goodsList,
strTemp: !active ? str : ''
}, () => {
this.synchronousChange(goodsList[index])
})
this.setData({
goodsList,
strTemp: str
}, () => {
//同步更新
this.synchronousChange(goodsList[index])
})
}else{
if(goodsList[index].active){
goodsList[index].active=false
goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = ''
})
console.log(33333, goodsList)
this.setData({
goodsList
},()=>{
this.synchronousChange(goodsList[index])
})
}
}
}
} else {
goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = ''
})
console.log(33333, goodsList)
this.setData({
goodsList
})
}
//规格全部选中逻辑处理
return result
return result
},
setGoodsActive(isFlag) {
if (this.data.show) {
......@@ -132,7 +150,7 @@ Component({
goodsData
// recordList
} = this.data
console.log(chooseGoodsList, goodsList, 'goodsList')
console.log(chooseGoodsList, goodsList,goodsData, 'goodsList')
let chooseList = [];
goodsData.map((e) => {
if (e.active) {
......@@ -163,7 +181,7 @@ Component({
e.goods.sellPrice = s.goods.sellPrice
}
}
//初始化进来不显示标识
if (!s.isFlag) {
if (s.multipleSpecificationsGoods && e.multipleSpecificationsGoods) {
if (s.multipleSpecificationsGoods.id == e.multipleSpecificationsGoods.id) {
......@@ -341,7 +359,7 @@ Component({
} = this.data;
//单独处理多规格商品点击事件
if (item.goodsFlag == 2) {
if (!this.watchAllChose(ind)) {
if (!this.watchAllChose(ind,true)) {
wx.$util.showToast('请先选择该商品规格')
return
}
......@@ -376,6 +394,13 @@ Component({
i.active = item.active
i.count = item.count
i.multipleSpecificationsGoods=item.multipleSpecificationsGoods
if(!item.active){
i.multipleSpecificationsGoods.goods=''
i.multipleSpecificationsGoods.specificationList.forEach(m=>{
m.value=''
})
}
}
}
})
......@@ -398,8 +423,10 @@ Component({
console.log(target)
this.setData({
[target]: item.count,
},()=>{
this.synchronousChange(this.data.goodsList[ind])
});
console.log(this.data.goodsList[ind])
},
input(e) {
let {
......@@ -415,7 +442,11 @@ Component({
if (value > 999) value = 999;
this.setData({
[target]: Number(value),
});
},
()=>{
this.synchronousChange(this.data.goodsList[ind])
}
);
},
searchGoods(e) {
let {
......
// packageEquity/components/MoreBtn/MoreBtn.js
Component({
externalClasses: ['popup-slot-class'],
/**
* 组件的属性列表
*/
properties: {
popupVisible: {
type: Boolean,
value: false,
observer: function (n, o) {
n && wx.hideKeyboard()
this.setData({
showPopup: n
})
}
},
title: {
type: String,
value: '更多操作'
},
height: {
type: String,
value: '85%'
},
btnsList: {
type: Array,
value: [],
observer: function(n) {
this.setData({
height: (112 * n.length + 74 + 124) + 'rpx'
})
}
},
slotStyle: String
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
noScroll() { },
hidePopup() {
this.setData({
popupVisible: false
})
this.triggerEvent('cancel')
},
handleClick(e) {
let { idx } = e.currentTarget.dataset
let { btnsList } = this.data
const obj = btnsList[idx]
this.triggerEvent('btnClick', obj)
}
},
attached() {
// console.log(wx.$util.isFullSucreen(), 'wx.$util.isFullSucreen()')
this.setData({
isFullSucreen: wx.$util.isFullSucreen(true)
})
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* packageEquity/components/MoreBtn/MoreBtn.wxss */
.popup {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 998;
}
.popup-bg {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, .6);
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.popup-content {
position: absolute;
left: 0;
width: 100%;
background: #F4F5F7;
animation: show-popup .5s forwards;
box-sizing: border-box;
border-radius: var(--fontSize20) var(--fontSize20) 0 0;
}
.popup-title {
box-sizing: border-box;
height: 72rpx;
line-height: 72rpx;
font-size: var(--fontSize24);
color: #9B9B9E;
background: #FFFFFF;
border-radius: var(--fontSize20) var(--fontSize20) 0 0;
border-bottom: var(--fontSize2) solid #EBEDF0;
}
.popup-slot {
box-sizing: border-box;
height: calc(100% - var(--fontSize214));
background: #FFFFFF;
}
.popup-footer {
box-sizing: border-box;
background: #FFFFFF;
margin-top: 12rpx;
}
.popup-footer.isFullSucreen {
padding-bottom: var(--fontSize68) !important;
}
.popup-footer .btn {
width: 100%;
height: 112rpx;
box-sizing: border-box;
border-radius: var(--fontSize12);
font-size: var(--fontSize32);
}
.popup-footer .cancel {
color: #222222;
}
@keyframes show-popup {
0% {
bottom: -100%;
}
100% {
bottom: 0;
}
}
.popup-row {
height: 112rpx;
line-height: 112rpx;
font-weight: 500;
font-size: 32rpx;
color: #222222;
text-align: center;
}
\ No newline at end of file
<!--packageEquity/components/MoreBtn/MoreBtn.wxml-->
<view class="popup" hidden="{{ !showPopup }}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content" style="height:{{ height }}">
<block wx:if="{{ title }}">
<view class="popup-title text-center">{{title}}</view>
</block>
<view class="popup-slot popup-slot-class" style="{{slotStyle}}">
<view wx:for="{{btnsList}}" wx:key="index" class="popup-row" data-idx="{{index}}" bindtap="handleClick">{{item.name}}</view>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bind:tap="hidePopup">取消</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -213,7 +213,8 @@ Component({
}, 1000)
console.log(thisPage, 'thisPage');
let thisPage = wx.$router.getPageInstance()
if (orderType == 2 || orderType == 5) {
// 支付方式 2:门店收款 5:嘀加收款 6:对公转账 7:其它收款
if ([2, 5, 6, 7].includes(Number(orderType))) {
if (payVoucherList.length && outTradeNo) {
thisPage.setData({
outTradeNo,
......
......@@ -2,12 +2,13 @@
<view class="order-popup" wx:if="{{show}}" catchtouchmove="noScroll">
<view class="order-popup-bg" bindtap="close" />
<view class="order-popup-content">
<view class="title" wx:if="{{orderType == 2 || orderType == 5}}">上传付款凭证</view>
<!-- 支付方式 2:门店收款 5:嘀加收款 6:对公转账 7:其它收款 -->
<view class="title" wx:if="{{orderType == 2 || orderType == 5 || orderType == 6 || orderType == 7}}">上传付款凭证</view>
<view class="order-popup-close" bindtap="close">
<image src="../images/order-close.png" />
</view>
<!-- 4s店 开始 -->
<block wx:if="{{orderType == 2 || orderType == 5}}">
<block wx:if="{{orderType == 2 || orderType == 5 || orderType == 6 || orderType == 7}}">
<view class="input-item">
<view class="input-box">
<input type="text" class="input" bindinput="input" value="{{outTradeNo}}" placeholder="输入交易流水号" placeholder-class="outTradeNo_placeholder" maxlength="150" />
......
// components/SelectInvoiceModal/SelectInvoiceModal.js
import commonApi from '~/api/api'
Component({
/**
* 组件的属性列表
*/
properties: {
invoiveVisible: {
type: Boolean,
value: false,
observer: function (n, o) {
this.handleOpen()
}
},
orderInfo: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
selectType: 81,
loading: false
},
/**
* 组件的方法列表
*/
methods: {
selectType(e) {
let {
type
} = e.currentTarget.dataset;
this.setData({
selectType: type,
});
},
handleOpen() {
wx.$modal(
this, {
show: true,
title: "选择发票类型",
tabTitleShow: false,
success: (res) => {
// 跳转新增订单页面 并带特定参数
let {
selectType,
orderInfo,
loading
} = this.data;
if (loading) {
return true
}
console.log(orderInfo, 'orderInfo----')
const params = {
orderCode: orderInfo.orderCode,
invoiceType: selectType
}
wx.$util.showLoading()
this.setData({
loading: true
})
commonApi.createOrderCode(params).then(res => {
wx.$util.hideLoading()
if (res.code == 0) {
wx.$util.showToast('开票成功')
wx.$router.go("tabWorkOrder.invoiceCode", {
obj: {
orderCode: orderInfo.orderCode,
...res.data
}
})
} else {
wx.$util.showToast(res.message)
}
}).finally(() => {
this.setData({
loading: false
})
})
},
error: () => { },
},
"#modal"
);
}
},
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
"modal": "/components/modal/modal"
}
}
\ No newline at end of file
/* components/SelectInvoiceModal/SelectInvoiceModal.wxss */
.modatcontent {
box-sizing: border-box;
padding: var(--fontSize48) 0;
}
.modal {
.icon {
width: 96rpx;
height: 96rpx;
margin-right: 30rpx;
}
.modalbox {
display: flex;
align-items: center;
box-sizing: border-box;
width: 522rpx;
height: 136rpx;
background: #F7F8FA;
border-radius: 8rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
padding-left: 24rpx;
margin: 0 auto;
&+.modalbox {
margin-top: 16rpx;
}
}
.act {
background: #347bff1a;
border: 2rpx solid #347BFF;
color: #3582EE;
}
}
\ No newline at end of file
<!--components/SelectInvoiceModal/SelectInvoiceModal.wxml-->
<!-- 申请开票 - 选择发票类型弹窗 -->
<modal id="modal" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
<view class="modatcontent">
<view class="modalbox {{ selectType == 81?'act': '' }} com" bindtap="selectType" data-type="81">
<gl-image class="icon" src="/miniProgram/order1.png"></gl-image>
普通发票
</view>
<view class="modalbox cancle {{ selectType == 82?'act': '' }}" bindtap="selectType" data-type="82">
<gl-image class="icon" src="/miniProgram/order3.png"></gl-image>
增值税专用发票
</view>
</view>
</modal>
\ No newline at end of file
......@@ -165,6 +165,7 @@
}
.ul {
height: 100%;
.title {
font-weight: 600;
font-size: 26rpx;
......
......@@ -5,7 +5,7 @@
<view class="block text-center {{ switchVlaue== 1?'':'labelRight' }}" />
<view class="left text-center {{ switchVlaue == 1?'active':'' }}" bindtap="changeSwitch" data-value="1">正常分账期</view>
<view class="right text-center {{ switchVlaue == 2?'active':'' }}" bindtap="changeSwitch" data-value="2">超分账期
<image class="question" src="/components/images/question.png" bind:tap="showTips"></image>
<image class="question" src="/components/images/question.png" catch:tap="showTips"></image>
</view>
</view>
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="restPageNum" bindscrolltolower="scrollonReachBottom" refresher-threshold="104" refresher-triggered="{{triggered}}">
......@@ -36,7 +36,7 @@
</scroll-view>
</popup>
<tipsPopup show="{{ tipsshow }}" bindconfirm="confirm" bindcancel="cancel" height="70%" title="超分账期">
<view class="ul">
<scroll-view scroll-y class="ul">
<view class="title">
字段定义
</view>
......@@ -66,7 +66,7 @@
<view class="li last"> 情况三:支付费用时误操作(多付了)需部分退款
</view>
<view class="li last">
操作流程:驻店在小程序点击新建工单,收款方式选择嘀加收款,复制交易流水号(填写时流水号末尾加逗号,多笔交易流水号中间用逗号隔开),工单录完后通知线上运营在后台关联。
操作流程:驻店在小程序点击新建工单,收款方选择嘀加收款,收款方式选择其它收款,复制交易流水号(填写时流水号末尾加逗号,多笔交易流水号中间用逗号隔开),工单录完后通知线上运营在后台关联。
</view>
<!-- <view class="title">
特殊情况
......@@ -79,7 +79,7 @@
情况二:客户购买车辆2台及以上的费用,一笔支付
情况三:支付费用时误操作 (多付了) 需部分退款
</view> -->
</view>
</scroll-view>
<!-- <view>说明内容</view> -->
</tipsPopup>
\ No newline at end of file
......@@ -335,8 +335,8 @@ Component({
//是否配置园区店面档案互通 Y / N
if (data) {
if (data.customerExchangeFlag == 'N') {
customerFormList = customerFormList.filter(item => !item.configItem)
carFormList = carFormList.filter(item => !item.configItem)
customerFormList = customerFormList?.filter(item => !item.configItem)
carFormList = carFormList?.filter(item => !item.configItem)
}
}
this.setData({
......
......@@ -2,12 +2,12 @@
<view class="order-popup" wx:if="{{show}}" catchtouchmove="noScroll">
<view class="order-popup-bg" bindtap="close" />
<view class="order-popup-content">
<view class="title" wx:if="{{orderType == 2 ||orderType == 5}}">上传付款凭证</view>
<view class="title" wx:if="{{orderType == 2 ||orderType == 5 || orderType == 6 || orderType == 7}}">上传付款凭证</view>
<view class="order-popup-close" bindtap="close">
<image src="./images/order-close.png" />
</view>
<!-- 门店 开始 -->
<block wx:if="{{orderType == 2 ||orderType == 5}}">
<block wx:if="{{orderType == 2 ||orderType == 5 || orderType == 6 || orderType == 7}}">
<view class="input-item">
<view class="title-text">交易流水号</view>
<view class="input-box" wx:if="{{resetOrder}}">{{resetTransNo}}</view>
......
......@@ -96,7 +96,11 @@ Component({
{
name: '战败',
value: '-1'
},
},
// {
// name: '部分退款',
// value: '8'
// }
],
maxDate: new Date().format('yyyy-MM-dd'),
orderTimeList: [{
......@@ -144,8 +148,13 @@ Component({
{
name: '嘀加收款',
value: 5
}
],
}, {
name: '对公转账',
value: 6
}, {
name: '其它收款',
value: 7
}],
// 合同协议状态数据
zyPayStatus: [{
name: '全部',
......
......@@ -4,6 +4,26 @@ import data from "../constant/stepData";
import { priceCounter } from "~/packageEquity/api";
import NP from "number-precision";
const defaultLabelWidth = "var(--fontSize140)";
const djPayTypeList = [
{
value: 1,
name: "线上支付",
},
{
value: 6,
name: "对公转账",
},
{
value: 7,
name: "其它收款",
},
]
const merchantPayTypeList = [
{
value: 2,
name: "门店收款",
}
]
Component({
options: {
// styleIsolation: 'apply-shared'
......@@ -65,12 +85,12 @@ Component({
// }
},
"orderInfo.payType": function (paytype) {
// console.log(value, 'outTradeNo')
// if (value) {
paytype &&
this.setData({
["textNameObj.confirmName"]:
paytype == 1 ? "下一步·去支付(1/2)" : "下一步·上传凭证",
payTypeList: paytype == 2 ? merchantPayTypeList : djPayTypeList
});
// }
},
......@@ -123,20 +143,14 @@ Component({
showError: false,
insuranceCheck: false,
testQuotedPriceUpdate: 0,
payTypeList: [
{
value: 1,
name: "线上支付",
},
{
value: 2,
name: "门店收款",
},
{
value: 5,
name: "嘀加收款",
},
],
payeeList: [{
name: '嘀加收款',
value: 0
}, {
name: '4S店收款',
value: 1
}],
payTypeList: djPayTypeList,
successDateTime: "",
},
......@@ -560,6 +574,16 @@ Component({
}
});
}
if (val.multipleSpecificationsGoods) {
val.multipleSpecificationsGoods.goods.checkError = false;
if (
val.multipleSpecificationsGoods.goods?.price < val.multipleSpecificationsGoods.goods.minSellPrice &&
val.multipleSpecificationsGoods.goods?.validMinSellPrice == "Y"
) {
val.multipleSpecificationsGoods.goods.checkError = true;
goodsError.push(val.multipleSpecificationsGoods.goods);
}
}
});
this.setData({
orderInfo,
......@@ -574,6 +598,32 @@ Component({
this.triggerEvent("editSave");
}
},
// 切换收款方式
changePayee(e) {
let { payee } = e.currentTarget.dataset
let { orderInfo } = this.data
if (orderInfo.resetOrder||orderInfo.outTradeArr) return
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
["orderInfo.payee"]: payee
})
if (payee == 1) {
this.setData({
payTypeList: merchantPayTypeList
})
thisPage.setData({
["orderInfo.payType"]: 2
})
} else {
this.setData({
payTypeList: djPayTypeList
})
thisPage.setData({
["orderInfo.payType"]: 1
})
}
},
// 切换支付方式
changePayType(e) {
console.log(e);
let { paytype } = e.currentTarget.dataset;
......
......@@ -472,11 +472,19 @@
}
}
.paytype-tips {
color: #B6B6B8;
font-size: var(--fontSize22);
padding: var(--fontSize20) 0 0 var(--fontSize20);
}
.payType-box {
display: flex;
align-items: center;
// flex-wrap: wrap;
padding-top: var(--fontSize20);
justify-content: flex-end;
margin-right: calc(-1 * var(--fontSize40));
/* justify-content: space-between; */
}
......@@ -508,7 +516,7 @@
font-size: var(--fontSize28);
color: #999999;
height: var(--fontSize56);
padding: 0 var(--fontSize24);
padding: 0 var(--fontSize20);
position: relative;
}
......
......@@ -113,10 +113,19 @@
<view class="right text-center {{ orderInfo.payType == 2?'active':'' }}" bindtap="changePayType" data-payType="2">门店收款</view>
</view>
</gl-cell> -->
<gl-cell border class="pay-type" label="支付方式" wx:if="{{!orderInfo.outTradeNo ||orderInfo.resetOrder||orderInfo.outTradeArr }}" valueAlign="right" labelWidth="var(--fontSize140)">
<!-- 非正常分账期单流水补录 -->
<gl-cell border class="pay-type" label="收款方" valueAlign="right" labelWidth="var(--fontSize140)" wx:if="{{!orderInfo.normalSinglePipeline}}">
<view class="payType-box">
<view class="item text-center active" wx:if="{{ orderInfo.resetOrder }}">门店收款</view>
<view class="item text-center active" wx:elif="{{ orderInfo.outTradeArr}}">嘀加收款</view>
<block wx:for="{{ payeeList }}" wx:key="index">
<view class="item text-center {{ orderInfo.payee == item.value?'active':'' }} {{(orderInfo.resetOrder||orderInfo.outTradeArr) && orderInfo.payee != item.value ? 'disabled' : ''}}" bindtap="changePayee" data-payee="{{ item.value }}">{{item.name}}</view>
</block>
</view>
</gl-cell>
<!-- 非正常分账期单流水补录 -->
<gl-cell border class="pay-type" label="支付方式" valueAlign="right" labelWidth="var(--fontSize140)" wx:if="{{!orderInfo.normalSinglePipeline}}">
<view class="payType-box">
<!-- 错误工单或非正常分账期单流水补录 固定显示嘀加收款 -->
<view class="item text-center active" wx:if="{{ orderInfo.resetOrder || orderInfo.outTradeArr}}">嘀加收款</view>
<block wx:else>
<block wx:for="{{ payTypeList }}" wx:key="index">
<view class="item text-center {{ orderInfo.payType == item.value?'active':'' }}" bindtap="changePayType" data-payType="{{ item.value }}">{{item.name}}</view>
......@@ -124,7 +133,8 @@
</block>
</view>
</gl-cell>
<gl-cell wx:if="{{ (orderInfo.payType == 2 ||orderInfo.payType ==5 )&&!orderInfo.resetOrder&&!orderInfo.outTradeArr }}" value="{{ successDateTime }}" bind:click="toSelectDate" haveArrow="{{ true }}" placeholder="请选择时间" required="{{ true }}" requiredAfter="{{ true }}" border class="pay-type" label="{{orderInfo.payType == 2?'门店收款时间':'嘀加收款时间'}}" valueAlign="right" labelWidth="var(--fontSize200)"></gl-cell>
<view class="paytype-tips" wx:if="{{orderInfo.payType == 7}}">其它收款:当客户已向嘀加付款但无法使用流水补录时,新建工单应选择收款方为「嘀加收款」且支付方为「其它收款」。</view>
<gl-cell wx:if="{{ (orderInfo.payType == 2 ||orderInfo.payType ==5 || orderInfo.payType == 6 || orderInfo.payType == 7 )&&!orderInfo.resetOrder&&!orderInfo.outTradeArr }}" value="{{ successDateTime }}" bind:click="toSelectDate" haveArrow="{{ true }}" placeholder="请选择时间" required="{{ true }}" requiredAfter="{{ true }}" border class="pay-type" label="{{orderInfo.payType == 2?'门店收款时间':'嘀加收款时间'}}" valueAlign="right" labelWidth="var(--fontSize200)"></gl-cell>
<gl-cell wx:if="{{ orderInfo.outTradeArr }}" value="{{ orderInfo.successDateTime }}" haveArrow="{{ true }}" placeholder="请选择时间" required="{{ true }}" requiredAfter="{{ true }}" border class="pay-type" label="{{orderInfo.payType == 2?'门店收款时间':'嘀加收款时间'}}" valueAlign="right" labelWidth="var(--fontSize200)"></gl-cell>
<view class="box">
<view class="title remarkTitle">备注</view>
......@@ -136,4 +146,4 @@
<Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{ textNameObj }}" />
</view>
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ quotationGoodsList }}" chooseGoodsList="{{ orderInfo.vdQuotationGoodsList }}" />
<date-select show="{{ showDateSelect }}" bind:close="closeDateModal" bind:confirm="onChanteSuccessDate"></date-select>
\ No newline at end of file
<date-select show="{{ showDateSelect }}" bind:close="closeDateModal" selectPay="{{orderInfo.payType}}" bind:confirm="onChanteSuccessDate"></date-select>
\ No newline at end of file
......@@ -9,7 +9,8 @@ const orderStatusObj = {
'-1': '战败',
'9': '已撤销',
'11': '已失效',
'6': '已退款'
'6': '已退款',
// '8': '部分退款'
}
const orderStatusList = [{
confName: '待报价',
......@@ -40,7 +41,11 @@ const orderStatusList = [{
}, {
confName: '战败',
confId: '-1'
}
},
// {
// confName: '部分退款',
// confId: '8'
// }
]
export default {
......
......@@ -72,6 +72,7 @@ Page({
// },
orderInfo: {
mode: 1,
payee: 0,
payType: 1,
insurancePrice: '',
vdQuotationGoodsList: []
......@@ -279,16 +280,13 @@ Page({
supplementaryFlag: true
}) // 补录订单标识
// 获取保险信息
let {
outTradeNo
} = this.data
let { outTradeNo, userInfo } = this.data
let orderInfo = this.getInsurance()
let owner = this.getOwnerInfo()
owner.salesType = owner.salesType == '售后' ? 1 : 0
orderInfo.owner = owner
orderInfo.check = true
orderInfo.outTradeNo = orderInfo.outTradeNo || outTradeNo
delete orderInfo.payType
if (orderInfo.paymentDocList.length) {
let _tempMap = orderInfo.paymentDocList.map(el => {
let obj = {
......@@ -324,7 +322,8 @@ Page({
})
// 校验下单商品是否需要上传合同协议
const params = {
goodsIds: orderInfo?.vdQuotationGoodsList?.map(v => v.goodsId)
goodsIds: orderInfo?.vdQuotationGoodsList?.map(v => v.goodsId),
merchantId: userInfo?.default4SStoreInfo?.merchantId
}
let res = await checkZyPayFlag(params)
if (res?.code == 0) {
......@@ -517,12 +516,11 @@ Page({
if (!orderInfo.vdQuotationGoodsList.length)
return wx.$util.showToast('请选择增值车损险商品')
// 非标记错误,门店收款
// 非标记错误或非正常分账期单流水补录,2:门店收款 5:嘀加收款 6:对公转账 7:其它收款
if (
!orderInfo.pay2Time &&
(orderInfo.payType == 2 || orderInfo.payType == 5) &&
!orderInfo.resetOrder &&
!orderInfo.outTradeArr
([2, 5, 6, 7].includes(Number(orderInfo.payType))) &&
!orderInfo.resetOrder && !orderInfo.outTradeArr
)
return wx.$util.showToast(
orderInfo.payType == 2 ? '请选择门店收款时间' : '请选择嘀加收款时间'
......@@ -533,7 +531,7 @@ Page({
confirmStatus: true
})
// 多订单补录是否已上传凭证 是在走下一步
// 正常分账期多流水或超分账期是否已上传凭证 是在走下一步
if (orderInfo.outTradeArr) {
if (!orderInfo.paymentDocList.length) {
return this.setData({
......@@ -548,9 +546,9 @@ Page({
return this.setQuotationRecording()
// debugger
// 如果是门店收款 并且付款凭证没有填
// 如果是2:门店收款 5:嘀加收款 6:对公转账 7:其它收款 并且付款凭证没有填
if (
(orderInfo.payType == 2 || orderInfo.payType == 5) &&
([2, 5, 6, 7].includes(Number(orderInfo.payType))) &&
!(orderInfo.transactionNo && orderInfo.paymentDocList.length)
)
return this.setData({
......@@ -589,8 +587,8 @@ Page({
console.log(result)
// 校验生成告知书是否成功
if (id) {
// 门店付款就直接返回列表
if (orderInfo.payType == 2 || orderInfo.payType == 5)
// 2:门店收款 5:嘀加收款 6:对公转账 7:其它收款 就直接返回列表
if ([2, 5, 6, 7].includes(Number(orderInfo.payType)))
return wx.$router.reLaunch('packageEquity.equityPage', {
tabIndex: 1
})
......@@ -608,7 +606,8 @@ Page({
// 线上支付判断是否需要上传协议
let obj = this.getInsurance()
const params = {
goodsIds: obj?.vdQuotationGoodsList?.map(v => v.goodsId)
goodsIds: obj?.vdQuotationGoodsList?.map(v => v.goodsId),
merchantId: userInfo?.default4SStoreInfo?.merchantId
}
let res = await checkZyPayFlag(params)
let zyPayFlag = res?.code == 0 && res?.data
......@@ -734,6 +733,7 @@ Page({
// 获取保险信息
let orderInfo = this.getInsurance()
let owner = this.getOwnerInfo()
let { userInfo } = this.data
owner.salesType = owner.salesType == '售后' ? 1 : 0
orderInfo.owner = owner
orderInfo.check = check
......@@ -745,14 +745,15 @@ Page({
// 当合同协议弹窗点击稍后补录会传值detail:cancel, 提交表单时不会重复弹出合同协议弹出
if (
check &&
(orderInfo.payType == 2 || orderInfo.payType == 5) &&
([2, 5, 6, 7].includes(Number(orderInfo.payType))) &&
detail != 'cancel' &&
!orderInfo?.zyPayUrl
) {
wx.hideLoading()
// 请求接口判断是否需要上传合同协议
const params = {
goodsIds: orderInfo?.vdQuotationGoodsList?.map(v => v.goodsId)
goodsIds: orderInfo?.vdQuotationGoodsList?.map(v => v.goodsId),
merchantId: userInfo?.default4SStoreInfo?.merchantId
}
let res = await checkZyPayFlag(params)
if (res?.code == 0) {
......@@ -954,7 +955,12 @@ Page({
if (this.resetOrder) {
orderInfo.resetOrder = this.resetOrder
tableInfo.zyPayUrl = '' // 标记错误工单重新下单,将合同协议字段清除,需重新校验是否上传并重新上传
tableInfo.payType = 2
tableInfo.payType = 5 // 支付方式 5:嘀加收款
tableInfo.payee = 0 // 收款方 0:嘀加收款
}
// 是门店收款
if (tableInfo.payType == 2) {
tableInfo.payee = 1
}
tableInfo.owner.salesType =
tableInfo.owner.salesType == 1 ? '售后' : '售前'
......@@ -1386,10 +1392,12 @@ Page({
outTradeNo,
tradeNo,
['orderInfo.outTradeArr']: '',
['orderInfo.payType']: 1,
['orderInfo.payType']: 1, // 流水补录 支付方式1:线上支付
['orderInfo.payee']: 0, // 流水补录 收款方1:嘀加收款
['orderInfo.outTradeNo']: outTradeNo,
['orderInfo.tradeNo']: tradeNo,
['orderInfo.transactionNo']: tradeNo,
['orderInfo.normalSinglePipeline']: true,
accountDate,
totalFee: totalFee,
showTips: true
......@@ -1421,12 +1429,15 @@ Page({
tradeNo,
showTips: true,
// outTradeArr,
['orderInfo.payType']: 5,
['orderInfo.payType']: 5, // 流水补录 支付方式5:嘀加收款
['orderInfo.payee']: 0, // 流水补录 收款方1:嘀加收款
['orderInfo.outTradeNo']: outTradeNo,
['orderInfo.tradeNo']: tradeNo,
['orderInfo.transactionNo']: tradeNo,
['orderInfo.outTradeArr']: outTradeArr,
['orderInfo.successDateTime']: accountDate
['orderInfo.successDateTime']: accountDate,
['orderInfo.pay2Time']: accountDate,
['orderInfo.normalSinglePipeline']: false
})
}
}
......
......@@ -19,6 +19,7 @@ let timeoutId;
const IMG_URL2 =
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/";
import carLifeApi from "../../../carEquityApi";
import commonApi from '~/api/api'
Component({
/**
* 组件的属性列表
......@@ -92,7 +93,9 @@ Component({
mapValue: {
1: "线上支付",
2: "门店收款",
5: "嘀加收款"
5: "嘀加收款",
6: "对公转账",
7: "其它收款"
},
},
],
......@@ -206,7 +209,15 @@ Component({
repealReason: '',
repealId: '',
zyPayStatus: '', // 合同协议状态
selectType: 1
selectType: 1,
// 更多按钮
moreBtnVisible: false,
btnOrderInfo: {},
btnsList: [{
name: '申请开票'
}],
// 选择发票
invoiveVisible: false
},
observers: {
mode: function (value) {
......@@ -1126,6 +1137,70 @@ Component({
zyPayStatus: e.detail.zyPayStatus
});
},
/** 更多按钮 */
handleMoreBtn(e) {
let { target } = e.currentTarget.dataset
console.log(target, 'tttt')
this.setData({
'btnsList[0].name': target.invoicing == 2 ? '查看发票' : '申请开票'
})
target.orderCode = target.payId
this.handleBtnCancel()
this.setData({
btnOrderInfo: target || {}
})
},
handleBtnCancel() {
let { moreBtnVisible } = this.data
this.setData({
moreBtnVisible: !moreBtnVisible
})
},
handleBtnClick(e) {
let obj = e.detail
switch (obj.name) {
case '申请开票':
this.handleSelectInvoice()
break
case '查看发票':
this.handleInvoiceDetail()
break
}
this.handleBtnCancel()
},
handleSelectInvoice() {
let { invoiveVisible } = this.data
this.setData({
invoiveVisible: !invoiveVisible
})
},
handleInvoiceDetail() {
let { btnOrderInfo } = this.data
const params = {
orderCode: btnOrderInfo.payId
}
commonApi.getOrderCode(params).then(res => {
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
if(invoiceInfo.code == '0000') {
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(invoiceInfo.downloadUrl)}`
})
} else {
wx.$router.go("tabWorkOrder.invoiceResult", {
obj: {
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceInfo.createdDate,
code: invoiceInfo.code,
downloadUrl: invoiceInfo.downloadUrl,
msg: invoiceInfo.msg
}
})
}
}
})
},
/**获取门店主营品牌 */
async getMerchantCarBrandList() {
const { userInfo } = this.data,
......
......@@ -2,6 +2,8 @@
"component": true,
"usingComponents": {
"order-screen": "../components/OrderScreen/OrderScreen",
"zy-pay-popup": "../components/zyPayPopup/zyPayPopup"
"zy-pay-popup": "../components/zyPayPopup/zyPayPopup",
"more-btn": "/components/MoreBtn/MoreBtn",
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal"
}
}
\ No newline at end of file
......@@ -151,6 +151,9 @@
</view>
<!-- footer -->
<view class="item-footer">
<view class="btn_class" wx:if="{{item.showInvoiceEntrance}}">
<view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view>
</view>
<!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2||staffUuid }}">
<block wx:if="{{ item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4 || item.orderStatus == 7) }}">
......@@ -170,7 +173,7 @@
<view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{ item }}">接待记录</view>
</block>
<block wx:if="{{ !staffUuid&&isOrder }}">
<view wx:if="{{ item.orderStatus == '-1' || item.orderStatus == '0' }}" class="order-btn" bindtap="handleClickBtn" data-target="{{ item }}">{{btnTxt[item.orderStatus]}}</view>
<view wx:if="{{ item.orderStatus == '-1' || item.orderStatus == '0' }}" class="order-btn" bindtap="handleClickBtn" data-target="{{ item }}">{{btnTxt[item.orderStatus]}}</view>
<block wx:elif="{{ item.orderStatus != 6 }}">
<block wx:if="{{ item.orderStatus == '2' || item.orderStatus == '3' || item.orderStatus == '5' }}">
<view wx:if="{{ item.orderStatus == '2' }}" class="order-btn default-btn padding_20" bindtap="handleClickBtn" data-target="{{ item }}">战败</view>
......@@ -202,7 +205,7 @@
</view>
</block>
</view>
<view wx:if="{{ (item.payType==2 ||item.payType==5)|| item.onlyRepeal }}" data-id="{{ item.id }}" data-repeal="{{ item.onlyRepeal }}" data-status="{{ item.orderStatus }}" bind:tap="toConfirmReturanOrder" class="del">
<view wx:if="{{ (item.payType==2 ||item.payType==5 || item.payType == 6 || item.payType == 7)|| item.onlyRepeal }}" data-id="{{ item.id }}" data-repeal="{{ item.onlyRepeal }}" data-status="{{ item.orderStatus }}" bind:tap="toConfirmReturanOrder" class="del">
<view>撤销</view>
<view>工单</view>
</view>
......@@ -284,4 +287,6 @@
</view>
</view>
</view>
<zy-pay-popup wx:if="{{showZyPayPopup}}" showZyTarget="{{showZyTarget}}" updateZyFlag="{{updateZyFlag}}" isListShow="{{true}}" show="{{showZyPayPopup}}" bindconfirm="zyPayConfirm"></zy-pay-popup>
\ No newline at end of file
<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>
<select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{btnOrderInfo}}"></select-invoice-modal>
\ No newline at end of file
......@@ -402,6 +402,8 @@ Page({
// 接口请求
toPostData(params, type) {
console.log(params);
// 添加收款方 0:嘀加收款
params.payee = 0
wx.showLoading({ title: "提交中..." })
defeatOrderCreate(params).then(res => {
wx.hideLoading();
......
......@@ -107,10 +107,10 @@ Page({
}).then((result) => {
wx.$util.hideLoading();
let arr =
result.map((val) => {
if (val.sceneOpenFlag == 0) return val.scene;
result?.filter(v => v.sceneOpenFlag == 0)?.map((val) => {
return val.scene;
}) || [];
for (var i = 0; i++; i < arr.length) {
for (var i = 0; i < arr.length; i++) {
if (arr.indexOf(arr[i]) !== i) {
arr.splice(i, 1);
i--;
......
......@@ -93,6 +93,10 @@ Component({
{
name: '已施工',
value: ['Y']
},
{
name: '已退款',
value: [5, 12]
}
],
maxDate: new Date().format('yyyy-MM-dd'),
......@@ -222,7 +226,15 @@ Component({
value: '',
active: true
},
...list
...list,
{
name: '对公转账',
value: '6'
},
{
name: '其它收款',
value: '7'
}
]
this.setData({
['form.payType']: payList
......
......@@ -7,6 +7,7 @@ let timeoutId;
import {
checkDailyReport
} from "~/store/ModalToQueueControl";
import commonApi from '~/api/api'
Page({
/**
* 页面的初始数据
......@@ -19,42 +20,42 @@ Page({
activeIndex: 0,
//分润
pointsMultiObj: [{
label: "销售顾问 /录单员",
arr: ["merchantName", "employeeName"],
},
{
label: "交付人员",
arr: ["merchantName", "deliveryEmployeeName"],
},
{
label: "转化人员",
arr: ["sellerMerchantName", "sellerName"],
},
{
label: "工单编号",
key: "orderCode",
},
{
label: "工单时间",
key: "orderTime",
},
label: "销售顾问 /录单员",
arr: ["merchantName", "employeeName"],
},
{
label: "交付人员",
arr: ["merchantName", "deliveryEmployeeName"],
},
{
label: "转化人员",
arr: ["sellerMerchantName", "sellerName"],
},
{
label: "工单编号",
key: "orderCode",
},
{
label: "工单时间",
key: "orderTime",
},
],
orderObj: [{
label: "销售顾问",
arr: ["merchantName", "employeeName"],
},
{
label: "转化人员",
arr: ["sellerMerchantName", "sellerName"],
},
{
label: "工单编号",
key: "orderCode",
},
{
label: "工单时间",
key: "orderTime",
},
label: "销售顾问",
arr: ["merchantName", "employeeName"],
},
{
label: "转化人员",
arr: ["sellerMerchantName", "sellerName"],
},
{
label: "工单编号",
key: "orderCode",
},
{
label: "工单时间",
key: "orderTime",
},
],
searchObj: {},
pageNum: 1,
......@@ -66,7 +67,15 @@ Page({
isMake: true,
selectType: 1,
isSettingExpiredTraffic: false, // 是否启用流量失效
isScan: false // 是否扫码核销
isScan: false, // 是否扫码核销
// 更多按钮
moreBtnVisible: false,
btnOrderInfo: {},
btnsList: [{
name: '申请开票'
}],
// 选择发票
invoiveVisible: false
},
// 创建一个动画实例
// createAnimation: function () {
......@@ -112,31 +121,31 @@ Page({
}
wx.$modal(
this, {
show: true,
title: "请选择录单入口",
tabTitleShow: false,
success: (res) => {
// 跳转新增订单页面 并带特定参数
let {
orderInfo,
selectType
} = this.data;
console.log(item, "showSelectType");
if (selectType == 1) {
wx.$router.go("tabWorkOrder.createOrder", {
scene,
...item,
});
} else {
wx.$router.go("tabWorkOrder.defeatOrder", {
scene,
...item,
isExpiredTraffic: selectType == 3
});
}
},
error: () => {},
show: true,
title: "请选择录单入口",
tabTitleShow: false,
success: (res) => {
// 跳转新增订单页面 并带特定参数
let {
orderInfo,
selectType
} = this.data;
console.log(item, "showSelectType");
if (selectType == 1) {
wx.$router.go("tabWorkOrder.createOrder", {
scene,
...item,
});
} else {
wx.$router.go("tabWorkOrder.defeatOrder", {
scene,
...item,
isExpiredTraffic: selectType == 3
});
}
},
error: () => { },
},
"#modal2"
);
},
......@@ -488,7 +497,7 @@ Page({
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI);
},
init(userInfo) {},
init(userInfo) { },
search() {
wx.$orderListRefresh = false;
let {
......@@ -757,9 +766,9 @@ Page({
if (wx.$orderListRefresh) {
// 清空筛选条件 搜索条件
this.setData({
searchObj: {},
keyword: "",
},
searchObj: {},
keyword: "",
},
() => {
this.search();
this.getCreateOrderSetting()
......@@ -783,6 +792,68 @@ Page({
})
}
},
/** 更多按钮 */
handleMoreBtn(e) {
let { target } = e.currentTarget.dataset
this.setData({
'btnsList[0].name': target.invoiceStatus == 2 ? '查看发票' : '申请开票'
})
this.handleBtnCancel()
this.setData({
btnOrderInfo: target || {}
})
},
handleBtnCancel() {
let { moreBtnVisible } = this.data
this.setData({
moreBtnVisible: !moreBtnVisible
})
},
handleBtnClick(e) {
let obj = e.detail
switch (obj.name) {
case '申请开票':
this.handleSelectInvoice()
break
case '查看发票':
this.handleInvoiceDetail()
break
}
this.handleBtnCancel()
},
handleSelectInvoice() {
let { invoiveVisible } = this.data
this.setData({
invoiveVisible: !invoiveVisible
})
},
handleInvoiceDetail() {
let { btnOrderInfo } = this.data
const params = {
orderCode: btnOrderInfo.orderCode
}
commonApi.getOrderCode(params).then(res => {
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
if(invoiceInfo.code == '0000') {
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(invoiceInfo.downloadUrl)}`
})
} else {
wx.$router.go("tabWorkOrder.invoiceResult", {
obj: {
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceInfo.createdDate,
code: invoiceInfo.code,
downloadUrl: invoiceInfo.downloadUrl,
msg: invoiceInfo.msg
}
})
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -798,41 +869,43 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
onReady: function () { },
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {},
onShow: function () {
this.search()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
onHide: function () { },
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
onUnload: function () { },
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
onPullDownRefresh: function () { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
onReachBottom: function () { },
scrollonReachBottom() {
let {
total,
pageNum
} = this.data;
wx.$util.onReachBottom({
total,
pageNum,
},
total,
pageNum,
},
(res) => {
this.getWorkList();
this.getStatByStatus();
......@@ -848,5 +921,5 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
onShareAppMessage: function () { },
});
\ No newline at end of file
{
"navigationStyle":"custom",
"usingComponents": {
"order-screen": "../../components/OrderScreen/OrderScreen"
"order-screen": "../../components/OrderScreen/OrderScreen",
"more-btn": "/components/MoreBtn/MoreBtn",
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal"
}
}
\ No newline at end of file
......@@ -591,4 +591,46 @@ page {
.modatcontent {
box-sizing: border-box;
padding: var(--fontSize48) 0;
}
.item-footer {
display: flex;
justify-content: space-between;
align-items: center;
font-size: var(--fontSize24);
color: #9B9B9E;
border-top: var(--fontSize1) solid #EDEDED;
padding: var(--fontSize20) var(--fontSize32) 0;
}
.btn_class {
display: flex;
gap: var(--fontSize16);
margin-left: auto;
}
.order-btn {
box-sizing: border-box;
height: var(--fontSize56);
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize28);
color: #FFFFFF;
background: #347BFF;
border-radius: var(--fontSize32);
padding: var(--fontSize8) var(--fontSize20);
flex-shrink: 0;
}
.order-btn.default-btn {
background: #FFFFFF;
border: var(--fontSize2) solid #347BFF;
border-radius: var(--fontSize32);
color: #347BFF;
}
.padding_20 {
padding: 0 var(--fontSize14);
}
\ No newline at end of file
......@@ -168,6 +168,12 @@
</view> -->
<!-- </block> -->
<!-- </block> -->
<!-- footer -->
<view class="item-footer" wx:if="{{li.showInvoiceEntrance}}">
<view class="btn_class">
<view class="order-btn default-btn padding_20" catchtap="handleMoreBtn" data-target="{{ li }}">更多</view>
</view>
</view>
</view>
<block wx:if="{{ isMake }}">
<view
......@@ -234,4 +240,6 @@
失效客户
</view>
</view>
</modal>
\ No newline at end of file
</modal>
<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
......@@ -82,7 +82,9 @@ module.exports = {
2: '门店收款',
3: 'pos机支付',
4: '支付宝支付',
5: '嘀加收款'
5: '嘀加收款',
6: '对公转账',
7: '其它收款'
},
orderType: [
{
......
......@@ -257,6 +257,7 @@
}
.ul {
height: 100%;
.title {
font-weight: 600;
font-size: 26rpx;
......
......@@ -9,7 +9,7 @@
<view class="left text-center {{ switchVlaue == 1?'active':'' }}" bindtap="changeSwitch" data-value="1">正常分账期</view>
<view class="right text-center {{ switchVlaue == 2?'active':'' }}" bindtap="changeSwitch" data-value="2">
超分账期
<image class="question" src="/components/images/question.png" bind:tap="showTips"></image>
<image class="question" src="/components/images/question.png" catch:tap="showTips"></image>
</view>
</view>
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="restPageNum" bindscrolltolower="scrollonReachBottom" refresher-threshold="104" refresher-triggered="{{ triggered }}">
......@@ -50,7 +50,7 @@
</scroll-view>
</popup>
<tipsPopup show="{{ tipsshow }}" bindconfirm="confirm" bindcancel="cancel" height="70%" title="超分账期">
<view class="ul">
<scroll-view scroll-y class="ul">
<view class="title">
字段定义
</view>
......@@ -80,7 +80,7 @@
<view class="li last"> 情况三:支付费用时误操作(多付了)需部分退款
</view>
<view class="li last">
操作流程:驻店在小程序点击新建工单,收款方式选择嘀加收款,复制交易流水号(填写时流水号末尾加逗号,多笔交易流水号中间用逗号隔开),工单录完后通知线上运营在后台关联。
操作流程:驻店在小程序点击新建工单,收款方选择嘀加收款,收款方式选择其它收款,复制交易流水号(填写时流水号末尾加逗号,多笔交易流水号中间用逗号隔开),工单录完后通知线上运营在后台关联。
</view>
</view>
</scroll-view>
</tipsPopup>
\ No newline at end of file
var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null
......@@ -13,7 +13,7 @@ var isIncludesItem = function (list, item) {
}
var formatPosition = function (item, positionTypeList) {
var filterData = positionTypeList.filter(function(v) {
var filterData = positionTypeList.filter(function (v) {
return v.positionValue == item
})
return (filterData.length && filterData[0] && filterData[0].positionName) || ''
......@@ -47,11 +47,20 @@ var isDateWithin60Days = function (date) {
return diffDays >= -60
}
var filterIncludes = function(item, arr) {
var filterIncludes = function (item, arr) {
return arr.indexOf(item) > -1
}
var filterTemplateList = function (arr, value) {
if (value == 2) {
return arr.filter(function (item) {
return item.templateValue != 3;
});
} else {
return arr
}
}
var filterDisabled = function(role, weeklyList, date, disabledStatus) {
var filterDisabled = function (role, weeklyList, date, disabledStatus) {
console.log(role, weeklyList)
if (role == 'staff') { // 员工七天内可操作
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin7Days(date)
......@@ -71,5 +80,6 @@ module.exports = {
isIncludesItem: isIncludesItem,
formatPosition: formatPosition,
filterIncludes: filterIncludes,
filterDisabled: filterDisabled
filterDisabled: filterDisabled,
filterTemplateList: filterTemplateList
}
......@@ -114,7 +114,7 @@ Page({
}
} else {
if (!successDate && !isErrorOrder && selectPayType != 0)
return wx.$util.showToast(selectPayType == 5 ? "请选择嘀加收款时间" : "请选择门店收款时间");
return wx.$util.showToast(selectPayType == 2 ? "请选择门店收款时间" : "请选择嘀加收款时间");
this.setData({
showPopup: true,
});
......@@ -122,7 +122,7 @@ Page({
},
createPayOrder() {
let {
orderInfo: { selectPayType, orderCode },
orderInfo: { selectPayType, orderCode, payeeType },
outTradeNo,
payVoucherList,
successDate,
......@@ -131,8 +131,10 @@ Page({
let obj = {
orderCode,
payType: selectPayType,
payeeType: payeeType
};
if ((selectPayType == 2 || selectPayType == 5) && !isErrorOrder) {
// 支付方式 2:门店收款 5:嘀加收款 6:对公转账 7:其它收款
if (([2, 5, 6, 7].includes(Number(selectPayType))) && !isErrorOrder) {
obj.successDate = new Date(successDate).format("yyyy-MM-dd hh:mm:ss");
}
if (payVoucherList?.length && outTradeNo) {
......@@ -341,8 +343,8 @@ Page({
// if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data)
// }
// 是门店收款并且不是错误订单 自动打开门店收款弹窗
if (!isErrorOrder && (data.selectPayType == 2 || data.selectPayType == 5)) {
// 是2:门店收款 5:嘀加收款 6:对公转账 7:其它收款并且不是错误订单 自动打开门店收款弹窗
if ( !isErrorOrder && [2, 5, 6, 7].includes(Number(data.selectPayType)) ) {
this.toshowDateModal();
}
// 获取园区店技师配置信息
......
......@@ -8,7 +8,7 @@
<view class="content">等待客户付款</view>
<view class="tips">点击下一步,锁定并生成工单码。</view>
</block>
<block wx:if="{{orderInfo.selectPayType == 2 ||orderInfo.selectPayType == 5}}">
<block wx:if="{{orderInfo.selectPayType == 2 ||orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7}}">
<view class="content">请上传付款凭证结束工单</view>
<view class="tips">点击确认工单,提交付款凭证。</view>
</block>
......@@ -17,7 +17,7 @@
<view class="tips">点击确认工单,根据操作结束工单。</view>
</block>
</view>
<view wx:if="{{!isErrorOrder&&(orderInfo.selectPayType == 2 ||orderInfo.selectPayType==5)}}" class="box date-box">
<view wx:if="{{!isErrorOrder&&(orderInfo.selectPayType == 2 ||orderInfo.selectPayType==5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7)}}" class="box date-box">
<view class="date-box-label">收款时间<text class='required'>*</text></view>
<view class="date-box-value">{{successDate || (orderInfo.selectPayType == 2?'请选择门店收款时间':'请选择嘀加收款时间')}}</view>
<view class="handlerBtn" bind:tap="toshowDateModal">编辑</view>
......
......@@ -3,6 +3,7 @@ import api from "../../api.js";
import order_mixins, { data } from "../order_mixins.js";
import { getPositionList } from "~/store/index";
import { checkDailyReport } from "~/store/ModalToQueueControl";
import commonApi from '~/api/api'
const IMG_URL =
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/";
const app = getApp();
......@@ -29,7 +30,10 @@ Page({
showRatingPopup: false,
showRatingCard: true, // 显示评价卡片
isMake: true,
warrantyEditObj: {}
warrantyEditObj: {},
// 发票按钮
invoiceName: '申请开票',
invoiveVisible: false,
},
RatingPopupSetting() {
this.setData({
......@@ -491,6 +495,7 @@ Page({
flag: true,
warrantyCardList,
showRatingCard,
invoiceName: data.invoiceStatus == 2 ? '查看发票' : '申请开票'
});
this.setQrBoxHeight();
// 超时关闭的不显示客服码和
......@@ -786,6 +791,53 @@ Page({
// }, 3000)
},
// 开票
handleBtnInvoice() {
let { invoiceName } = this.data
switch (invoiceName) {
case '申请开票':
this.handleSelectInvoice()
break
case '查看发票':
this.handleInvoiceDetail()
break
}
},
handleSelectInvoice() {
let { invoiveVisible } = this.data
this.setData({
invoiveVisible: !invoiveVisible
})
},
handleInvoiceDetail() {
let { orderInfo } = this.data
const params = {
orderCode: orderInfo.orderCode
}
commonApi.getOrderCode(params).then(res => {
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
if (invoiceInfo.code == '0000') {
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(invoiceInfo.downloadUrl)}`
})
} else {
wx.$router.go("tabWorkOrder.invoiceResult", {
obj: {
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceInfo.createdDate,
code: invoiceInfo.code,
downloadUrl: invoiceInfo.downloadUrl,
msg: invoiceInfo.msg
}
})
}
}
})
},
previewImage(e) {
let { url, index } = e.currentTarget.dataset;
let urlList = url.map((v) => {
......
{
"navigationBarTitleText": "完成施工",
"usingComponents": {
"orderRatingPopup": "/tabWorkOrder/components/orderRatingPopup/orderRatingPopup"
"orderRatingPopup": "/tabWorkOrder/components/orderRatingPopup/orderRatingPopup",
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal"
}
}
......@@ -146,6 +146,20 @@ page {
align-items: center;
}
.invoice-btn {
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #347BFF;
}
.invoice-btn .icon {
width: 32rpx;
height: 32rpx;
margin-right: 6rpx;
}
.box .title::after {
position: absolute;
content: '';
......
......@@ -105,6 +105,10 @@
<view class="box">
<view class="title infoTitle">
<text>工单信息</text>
<view wx:if="{{orderInfo.showInvoiceEntrance}}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
<view class="operate" wx:if="{{ orderInfo.canOperate&&(isYqdSuper||isStaff)&&isMake }}">
<text bindtap="targetOperate">操作</text>
<view class="tip {{ showTip?'':'none' }}" bindtap="targetError">
......@@ -134,7 +138,7 @@
</block>
</view>
</block>
<block wx:if="{{ orderInfo.selectPayType == 2 }}">
<block wx:if="{{ (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length }}">
<view class="cell">
<view class="label">付款凭证</view>
<view class="image-box">
......@@ -339,4 +343,5 @@
</view>
</view>
</modal>
<orderRatingPopup bind:close="RatingPopupSetting" title="客户签字" flag="{{ showRatingPopup }}" wx:if="{{ showRatingPopup }}" orderInfoSetting="{{ orderInfo }}" />
\ No newline at end of file
<orderRatingPopup bind:close="RatingPopupSetting" title="客户签字" flag="{{ showRatingPopup }}" wx:if="{{ showRatingPopup }}" orderInfoSetting="{{ orderInfo }}" />
<select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{orderInfo}}"></select-invoice-modal>
\ No newline at end of file
......@@ -152,11 +152,18 @@ page {
color: #fff;
}
.paytype-tips {
color: #B6B6B8;
font-size: var(--fontSize22);
padding: var(--fontSize40);
}
.payType-box {
display: flex;
align-items: center;
// flex-wrap: wrap;
padding-top: var(--fontSize20);
justify-content: flex-end;
/* justify-content: space-between; */
}
......@@ -192,7 +199,7 @@ page {
font-size: var(--fontSize28);
color: #999999;
height: var(--fontSize56);
padding: 0 var(--fontSize24);
padding: 0 var(--fontSize20);
position: relative;
}
......
......@@ -374,7 +374,7 @@
<view class="price_count">
<view class="price">
<text>¥</text>
<input type="digit" value="{{ item.multipleSpecificationsGoods.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class=" {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
<input type="digit" value="{{ item.multipleSpecificationsGoods.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.multipleSpecificationsGoods.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4">x{{item.count}}</view>
</view>
......@@ -397,6 +397,13 @@
</block>
</view>
</block>
<gl-cell border label="收款方" valueAlign="right" labelWidth="var(--fontSize152)" wx:if="{{!(switchVlaue == 1 && outTradeArr.length == 1)}}">
<view class="payType-box">
<block wx:for="{{ payeeList }}" wx:key="index">
<view class="item text-center {{ orderObj.payeeType === item.value?'active':''}} {{(isErrorOrder || switchVlaue) && orderObj.payeeType != item.value?'disabled':'' }}" bindtap="changePayee" data-item="{{ item }}" data-index="{{ index }}">{{item.name}}</view>
</block>
</view>
</gl-cell>
<gl-cell border label="支付方式" valueAlign="right" wx:if="{{ orderCreateType != 'additionRecordOrder'&& !associateOrderType && !isErrorOrder && orderObj.selectPayType != 0 }}" labelWidth="var(--fontSize152)">
<view class="payType-box">
<block wx:for="{{ showPayList }}" wx:key="index">
......@@ -404,20 +411,11 @@
</block>
</view>
</gl-cell>
<!-- 补录正常一单不显示 -->
<gl-cell border wx:if="{{switchVlaue == 2 || (switchVlaue == 1&&outTradeArr.length>1) }}" valueAlign="right" label="支付方式" labelWidth="var(--fontSize140)" requiredAfter required value="嘀加收款" disabled />
<!-- 错误订单补录 -->
<gl-cell border label="支付方式" valueAlign="right" labelStyle="margin-top:-40px" wx:if="{{ isErrorOrder }}" cellHeight="{{ false }}" labelWidth="var(--fontSize152)">
<view class="paytype-tips" wx:if="{{orderObj.selectPayType == 7}}">其它收款:当客户已向嘀加付款但无法使用流水补录时,新建工单应选择收款方为「嘀加收款」且支付方为「其它收款」。</view>
<!-- 错误订单补录或正常分账期多流水补录/超分账期单流水补录 -->
<gl-cell border label="支付方式" valueAlign="right" wx:if="{{ isErrorOrder || switchVlaue == 2 || (switchVlaue == 1 && outTradeArr.length > 1) }}" cellHeight="{{ false }}" labelWidth="var(--fontSize152)">
<view class="payType-box error-box">
<block wx:for="{{ showPayList }}" wx:key="index">
<view class="item text-center {{ item.value==2?'active':''}} {{item.value != 2?'disabled':'' }}" data-item="{{ item }}" data-index="{{ index }}">
<image class="wxPayIcon" src="{{ item.imgurl }}" wx:if="{{ item.imgurl }}" />
{{item.name}}
<view class="active-icon">
<image src="../../images/active.png" />
</view>
</view>
</block>
<view class="item text-center active">嘀加收款</view>
</view>
</gl-cell>
</view>
......@@ -458,7 +456,7 @@
</view>
</block>
<!-- &&!outTradeNo -->
<view class="waitOrderCon {{ showTips? 'showTips':'' }}" wx:if="{{ waitInputCount && !associateOrderType && !isErrorOrder&&!outTradeNo }}">
<view class="waitOrderCon {{ showTips? 'showTips':'' }}" wx:if="{{ waitInputCount && !associateOrderType && !isErrorOrder&&!outTradeNo && recordOrderFlag }}">
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
</view>
<recording-order-popup wx:if="{{ showOrderpop && !(isErrorOrder) }}" outTradeNo="{{ outTradeArr }}" switchVlauerec="{{switchVlaue}}" show="{{ showOrderpop }}" bind:success="navigator" title="请选择交易参考号" />
......
// tabWorkOrder/pages/invoiceCode/invoiceCode.js
import commonApi from '~/api/api'
Page({
/**
* 页面的初始数据
*/
data: {
codeInfo: {},
editFormData: [{
label: '销售方名称',
name: 'enterpriseName'
}, {
label: '企业联系电话',
name: ''
}, {
label: '开票金额',
name: 'invoiceAmount'
}, {
label: '票通订单号',
name: 'tradeNo'
}, {
label: '生成时间',
name: 'tradeTime'
}, {
label: '二维码有效期',
name: 'expireTime'
}]
},
handleConfirm() {
let { codeInfo } = this.data
const params = {
orderCode: codeInfo.orderCode
}
console.log(codeInfo)
console.log(params)
commonApi.getOrderCode(params).then(res => {
console.log(res, 'res---')
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
if (invoiceInfo.code == '0000') {
wx.$router.back()
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(invoiceInfo.downloadUrl)}`
})
} else {
wx.$router.redirectTo("tabWorkOrder.invoiceResult", {
obj: {
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceInfo.createdDate,
code: invoiceInfo.code,
downloadUrl: invoiceInfo.downloadUrl,
msg: invoiceInfo.msg
}
})
}
}
})
},
handleBack() {
wx.$router.back()
},
onRoute(res) {
console.log(res, 'res---')
res.obj = {
account: null,
orderCode: "250513144655824",
allowInvoiceCount: 1,
bizOrderCode: "250513144655824",
bizTradeNo: "kkkk9999",
casherName: "",
email: "zhoulm@didihu.com.cn",
enterpriseName: "500102201007206608",
expireDay: 7,
expireTime: "2025-05-21 11:18:34",
extractCode: "1922491705875894272",
invoiceAmount: "1.00",
invoiceQrCode: "https://invoice2025-test.oss-cn-shenzhen.aliyuncs.com/e204ed89-6d6f-45f9-a482-e744e61b95e3.png",
invoiceRemark: "",
invoiceType: "82,81",
invoiceUrl: "https://fpkjnw.vpiaotong.com/tp/scan/index/UnJFQVBFeW5HMUZ3TTJqdjNEUS9XTGdkWDg0SDc4Q1g=.pt",
qrcodeNo: "QR20250514111834KQQB",
reviewerName: "",
taxpayerNum: "500102201007206608",
tradeNo: "250513144655824",
tradeTime: "2025-05-13 17:31:00",
}
this.setData({
codeInfo: JSON.parse(JSON.stringify(res.obj))
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "查看二维码",
"usingComponents": {}
}
\ No newline at end of file
/* tabWorkOrder/pages/invoiceCode/invoiceCode.wxss */
page {
background-color: #F4F5F7;
}
.main {
box-sizing: border-box;
padding: 0rpx 20rpx 200rpx;
padding-bottom: 250rpx;
}
.box {
background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10);
border-radius: var(--fontSize16);
overflow: hidden;
margin-top: var(--fontSize20);
}
.cell {
height: 120rpx;
line-height: 120rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #222222;
padding: 0 40rpx;
border-bottom: 2rpx solide #000000;
}
.title {
font-size: 32rpx;
color: #222222;
font-weight: 600;
padding: 32rpx 32rpx 16rpx;
}
.code-box {
text-align: center;
font-size: 24rpx;
color: #757980;
margin: 20rpx 0 24rpx;
}
.img-code {
width: 240rpx;
height: 240rpx;
margin-bottom: 12rpx
}
.tips {
margin: 32rpx 0 20rpx;
text-align: center;
font-size: 24rpx;
color: #757980;
}
.btn-box{
width: 100%;
min-height: var(--fontSize100);
box-sizing: border-box;
font-size: var(--fontSize28);
}
.btn{
box-sizing: border-box;
width: calc(100% - 88rpx);
height: var(--fontSize88);
color: #fff;
font-size: 32rpx;
border-radius: var(--fontSize12);
background-color: #347BFF;
display: flex;
align-items: center;
justify-content: center;
margin: 0 44rpx 20rpx;
}
.btn-back {
background-color: #FFFFFF;
color: #347BFF;
}
\ No newline at end of file
<!--tabWorkOrder/pages/invoiceCode/invoiceCode.wxml-->
<view class="main ">
<view class="box">
<view class="title">开票二维码</view>
<view class="code-box">
<image src="{{codeInfo.invoiceQrCode}}" class="img-code" />
<view>客户可使用微信或支付宝,扫码开票</view>
</view>
<view wx:for="{{editFormData}}" wx:key="index" class="cell">
<view>{{item.label}}</view>
<view>{{codeInfo[item.name]}}</view>
</view>
</view>
<view class="tips">
<view>客户扫码提交成功后,点下方“结果查询”实时获取发票;</view>
<view>未显示可5分钟后重试。</view>
</view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn" bindtap="handleConfirm">结果查询</view>
<view class="btn btn-back" bindtap="handleBack">返回列表</view>
</view>
</view>
\ No newline at end of file
// tabWorkOrder/pages/invoiceResult/invoiceResult.js
Page({
/**
* 页面的初始数据
*/
data: {
info: {
code: ''
},
editFormData: [{
label: '工单编号',
name: 'bizOrderCode',
isCopy: true
}, {
label: '申请时间',
name: 'createdDate'
}, {
label: '申请金额',
name: 'invoiceAmount',
prefix: '¥'
}, {
label: '失败原因',
name: 'msg'
}]
},
handleJump() {
let { info } = this.data
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(info.downloadUrl)}`
})
// wx.showLoading({
// title: '加载中',
// mask: true
// })
// console.log(info, 'info----')
// wx.downloadFile({
// url: info.downloadUrl, // 将http文件地址转为https (开发环境文件服务器不支持https无法预览)
// success: function (res) {
// console.log(res, '==============')
// const manage = wx.getFileSystemManager()
// let file = info.downloadUrl.split('/')
// let fileName = file[file.length - 1]
// manage.saveFile({
// tempFilePath: res.tempFilePath,
// filePath: wx.env.USER_DATA_PATH + '/' + fileName,
// success: function (res) {
// console.log('00000000')
// wx.hideLoading()
// wx.openDocument({
// filePath: wx.env.USER_DATA_PATH + '/' + fileName,
// fileType: 'pdf',
// showMenu: true,
// success: function (res) {
// wx.hideLoading()
// }
// })
// }
// })
// }
// })
},
toCopy(e) {
const { value } = e.currentTarget.dataset
wx.setClipboardData({
data: value.toString(),
success(res) {
wx.$util.showToast('已复制')
}
})
},
handleBack() {
wx.$router.back()
},
onRoute(res) {
console.log(res, 'res---')
this.setData({
info: JSON.parse(JSON.stringify(res.obj))
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "查看发票",
"usingComponents": {}
}
\ No newline at end of file
/* tabWorkOrder/pages/invoiceResult/invoiceResult.wxss */
.wrapper {
position: absolute;
top: 50%;
width: 100%;
height: auto;
transform: translateY(-50%);
}
.content {
margin: 112rpx 64rpx 160rpx;
padding: 48rpx 64rpx;
background: #F4F5F7;
border-radius: 24rpx 24rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx 4rpx;
}
.tip {
font-size: 28rpx;
color: #999EA8;
}
.error-header {
text-align: center;
font-size: 32rpx;
color: #222222;
margin-bottom: 112rpx;
}
.icon {
width: 160rpx;
height: 160rpx;
margin: 128rpx 0 8rpx;
}
.cell {
height: 40rpx;
line-height: 40rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: #222222;
border-bottom: 2rpx solide #000000;
margin-bottom: 16rpx;
}
.cell .label {
width: 112rpx;
margin-right: 48rpx;
}
.btn-box{
width: 100%;
min-height: var(--fontSize100);
box-sizing: border-box;
font-size: var(--fontSize28);
}
.btn{
box-sizing: border-box;
width: calc(100% - 88rpx);
height: var(--fontSize88);
color: #fff;
font-size: 32rpx;
border-radius: var(--fontSize12);
background-color: #347BFF;
display: flex;
align-items: center;
justify-content: center;
margin: 0 44rpx 20rpx;
}
.btn-back {
background-color: #FFFFFF;
color: #292D33;
border: 2rpx solid #DEE0E3;
}
.copy_icon {
width: var(--fontSize28);
height: var(--fontSize28);
margin-left: 12rpx;
}
\ No newline at end of file
<!--tabWorkOrder/pages/invoiceResult/invoiceResult.wxml-->
<!-- <van-overlay wx:if="{{ info.code == '0000' }}" z-index="99999">
<view class="wrapper">
<image src="{{ IMG_URL}}equity/{{imgType }}.png" mode="widthFix" />
</view>
</van-overlay> -->
<!-- <view bindtap="previewFile">dianji</view> -->
<!-- <view wx:if="{{ info.code != '0000' }}"> -->
<view>
<view class="error-header">
<gl-image class="icon" src="/icon-invoice-error.png"></gl-image>
<view>开票失败</view>
</view>
<view class="content">
<view wx:for="{{editFormData}}" wx:key="index" class="cell">
<view class="label">{{item.label}}</view>
<view><text wx:if="{{item.prefix}}">{{item.prefix}}</text>{{info[item.name] || ''}}</view>
<image wx:if="{{ item.isCopy }}" catch:tap="toCopy" data-value="{{ info[item.name] }}" class="copy_icon" src="../../images/copy_name.png" />
</view>
<view class="tip">开票失败,请联系总部运营并提供工单编号及失败原因。</view>
</view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<!-- <view wx:if="{{info.code == '0000'}}" class="btn" bindtap="handleJump">发票</view> -->
<view class="btn btn-back" bindtap="handleBack">返回列表</view>
</view>
</view>
\ No newline at end of file
......@@ -6,6 +6,7 @@ import {
getServiceFilmRollSetting,
setConfigInfo
} from '~/store/index'
import commonApi from '~/api/api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const app = getApp()
Page({
......@@ -36,7 +37,10 @@ Page({
},
baseConfigData: {},
isMake: true,
packageGoodsList: []
packageGoodsList: [],
// 发票按钮
invoiceName: '申请开票',
invoiveVisible: false,
},
jumpUserPortrait() {
wx.$router.go('tabDate.userPortrait', this.data.orderInfo)
......@@ -314,10 +318,12 @@ Page({
if (data.customer && data.customer.carSeriesName) {
data.carType = `${data.customer.carBrand || ''}-${data.customer.carChildsBrandName || ''}-${data.customer.carSeriesName || ''}`
}
this.setData({
orderInfo: data,
flag: true,
warrantyCardList
warrantyCardList,
invoiceName: data.invoiceStatus == 2 ? '查看发票' : '申请开票'
})
// 去掉车主评价功能
// this.setQrBoxHeight()
......@@ -664,6 +670,53 @@ Page({
// }, 3000)
},
// 开票
handleBtnInvoice() {
let { invoiceName } = this.data
switch (invoiceName) {
case '申请开票':
this.handleSelectInvoice()
break
case '查看发票':
this.handleInvoiceDetail()
break
}
},
handleSelectInvoice() {
let { invoiveVisible } = this.data
this.setData({
invoiveVisible: !invoiveVisible
})
},
handleInvoiceDetail() {
let { orderInfo } = this.data
const params = {
orderCode: orderInfo.orderCode
}
commonApi.getOrderCode(params).then(res => {
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
if (invoiceInfo.code == '0000') {
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(invoiceInfo.downloadUrl)}`
})
} else {
wx.$router.go("tabWorkOrder.invoiceResult", {
obj: {
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceInfo.createdDate,
code: invoiceInfo.code,
downloadUrl: invoiceInfo.downloadUrl,
msg: invoiceInfo.msg
}
})
}
}
})
},
previewImage(e) {
let {
url,
......
......@@ -2,6 +2,7 @@
"navigationBarTitleText": "工单详情",
"usingComponents": {
"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"
}
}
\ No newline at end of file
......@@ -93,7 +93,13 @@
<!-- </block> -->
</view>
<view class="box">
<view class="title">工单信息</view>
<view class="title invoice">
工单信息
<view wx:if="{{orderInfo.showInvoiceEntrance}}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
</view>
<block wx:for="{{orderObj}}" wx:key="index">
<view class="cell">
<view class="label">{{item.label}}</view>
......@@ -119,7 +125,7 @@
</block>
</view>
</block>
<block wx:if="{{orderInfo.selectPayType == 2}}">
<block wx:if="{{(orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length}}">
<view class="cell">
<view class="label">付款凭证</view>
<view class="image-box">
......@@ -131,6 +137,14 @@
</view>
</view>
</block>
<block wx:if="{{orderInfo.status == 5||orderInfo.status == 12}}">
<view class="cell">
<view class="label">退款明细</view>
<view class="value" >
{{ orderInfo.refundType == 1 ? "退全款":"退部分款"}}¥{{orderInfo.refundAmount}}
</view>
</view>
</block>
<view class="paid" wx:if="{{orderInfo.payOrder&&orderInfo.payOrder.payStatus == 2}}">
<image src="../../images/paid.png" />
</view>
......@@ -264,4 +278,5 @@
<order-popup orderType="4" show="{{showPopup}}" />
<artificer-select-popup show="{{artificerSelectPopup}}" title="选择技师" copyArtificerList="{{artificerList}}" orderInfo="{{orderInfo}}" artificerSelectObj="{{artificerSelectObj}}" bindconfirm="changeArtificer" />
<!-- <wxs src="/utils/index.wxs" module="common" /> -->
<film-roll-no-popup show="{{filmRollNoPopup}}" title="选择膜卷号" copyfilmRollNoList="{{filmRollNoList}}" filmSelectedItem="{{filmSelectedItem}}" bindconfirm="changefilmRollNo" />
\ No newline at end of file
<film-roll-no-popup show="{{filmRollNoPopup}}" title="选择膜卷号" copyfilmRollNoList="{{filmRollNoList}}" filmSelectedItem="{{filmSelectedItem}}" bindconfirm="changefilmRollNo" />
<select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{orderInfo}}"></select-invoice-modal>
\ No newline at end of file
......@@ -72,6 +72,25 @@ page {
transform: translateY(-50%);
}
.box .title.invoice {
display: flex;
justify-content: space-between;
}
.invoice-btn {
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #347BFF;
}
.invoice-btn .icon {
width: 32rpx;
height: 32rpx;
margin-right: 6rpx;
}
.box .goods {
font-size: var(--fontSize28);
margin-bottom: var(--fontSize32);
......
......@@ -2,6 +2,7 @@
"navigationBarTitleText": "客户签字",
"usingComponents": {
"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"
}
}
......@@ -6,7 +6,12 @@
<view class="tips">感谢您的配合,请在确认以下信息后,在下方的签字区内签字确认,谢谢!</view>
</view>
<view class="box">
<view class="title">信息确认</view>
<view class="title invoice">信息确认
<view wx:if="{{orderInfo.showInvoiceEntrance}}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
</view>
<view class="cell">
<view class="label">客户姓名:</view>
<view class="value">{{orderInfo.customerName || ''}}</view>
......@@ -162,4 +167,5 @@
copyfilmRollNoList="{{filmRollNoList}}"
filmSelectedItem="{{filmSelectedItem}}"
bindconfirm="changefilmRollNo" />
<select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{orderInfo}}"></select-invoice-modal>
......@@ -51,6 +51,25 @@ page {
transform: translateY(-50%);
}
.box .title.invoice {
display: flex;
justify-content: space-between;
}
.invoice-btn {
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #347BFF;
}
.invoice-btn .icon {
width: 32rpx;
height: 32rpx;
margin-right: 6rpx;
}
.box .flex {
display: flex;
flex-wrap: wrap;
......
......@@ -82,7 +82,9 @@ module.exports = {
2: '门店收款',
3: 'pos机支付',
4: '支付宝支付',
5: '嘀加收款'
5: '嘀加收款',
6: '对公转账',
7: '其它收款'
},
orderType: [
{
......
......@@ -207,6 +207,8 @@ page .isFullSucreen {
height: var(--fontSize80);
line-height: var(--fontSize80);
text-align: right;
}
.placeholder {
......@@ -253,6 +255,18 @@ page .isFullSucreen {
}
}
.templateNameTitle {
margin-right: 20rpx;
.templateName {
color: #347BFF;
font-size: 28rpx;
font-weight: 400;
margin-right: 10rpx;
}
}
.remark_box {
padding: var(--fontSize20);
background-color: #fff;
......
......@@ -141,7 +141,11 @@ module.exports = {
text: '已评价',
color: '#347BFF',
background: '#EAF1FF'
}
},
5: {
text: '已退款',
color: '#8F959E'
},
},
// 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销
statusList: [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!