Commit ffbb4ffb by 前端

Merge branch 'SAAS+V4.53.0-0528' into 'develop'

上线合并

See merge request !393
2 parents 044e4d3c 27810296
Showing 102 changed files with 2632 additions and 392 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,
});
}
}
},
......
......@@ -3,7 +3,7 @@
<view class="fixed-box fixed-date-box" catchtouchmove="noScroll">
<view class="fixed-bg" data-name="showDateSelect"></view>
<view class="fixed-content">
<view class="fixed-title text-center">{{selectPay==2?'门店收款时间':'嘀加收款时间'}}</view>
<view class="fixed-title text-center">{{selectPay==2?'4S店收款时间':'嘀加收款时间'}}</view>
<view class="fixed-body">
<picker-view class="picker picker_max" value="{{dateValues}}" indicator-class="indicator" bindchange="changeDate">
<picker-view-column>
......
......@@ -4,6 +4,7 @@
.item {
justify-content: space-between;
padding-right: var(--fontSize32);
width: calc(100% - var(--fontSize130));
}
.title .tips {
......@@ -26,6 +27,7 @@
.item .value .name {
max-width: 85%;
width:calc(100vw - var(--fontSize100))
}
.item .value .name .warning_text {
......@@ -114,4 +116,28 @@
.item {
flex: 1;
}
}
.specification {
background: #F7F7F7;
border-radius: 16rpx 16rpx 0 0;
width:calc(100% - var(--fontSize80));
margin:var(--fontSize9) 0 var(--fontSize32) var(--fontSize52);
}
.picker {
display: flex;
flex-direction: row-reverse;
height: var(--fontSize80);
line-height: var(--fontSize80);
text-align: right;
}
.placeholder {
font-weight: 400;
font-size: var(--fontSize28);
color: #B6B6B8;
}
.arrow {
width: var(--fontSize28);
height: var(--fontSize26);
margin-top: var(--fontSize26);
flex-shrink: 0;
}
\ No newline at end of file
......@@ -4,40 +4,39 @@
<search-input bindsearch="searchGoods" value="{{keyWord}}" />
<scroll-view class="coupon" scroll-y>
<block wx:if="{{goodsList.length > 0}}">
<block wx:for="{{goodsList}}" wx:key="index">
<view class="title">
{{item.goodsTypeName}}
<text class="tips">|建议价</text>
</view>
<view class="box">
<view class="itemBox" wx:for="{{item.upgradeGoodsList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="choose" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<image src="{{filter.getImageSrc(i.active)}}" />
</view>
<view class="item {{minPrice?(minPrice/100)>= i.shopMinPrice ?'':'disableSelect':'' }}">
<view class="value {{i.active?'labelWidth':''}}" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<view class="name text-hide {{i.active?'textWidth':''}}">
<text>{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsInfo.goodsName)}}</text>
<text wx:if="{{i.merchantGoodsPosition && (i.goodsInfo.goodsType == 1 || i.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.positionStr+'」'}}</text>
<text class="warning_text" wx:if="{{!i.merchantGoodsPosition && (i.goodsInfo.goodsType == 1 || i.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text>
</view>
<view class="last" wx:if="{{!i.active}}">
<text class="price">¥{{i.upgradePrice}}</text>
</view>
<view class="box">
<block wx:for="{{goodsList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="item-wrap">
<view class="itemBox">
<view class="choose" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}">
<image src="{{filter.getImageSrc(i.active)}}" />
</view>
<block wx:if="{{i.active}}">
<view class="control">
<view class="minus" catchtap="addCount" data-count="{{-1}}" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
-
<!-- 单商品 -->
<block wx:if="{{i.goodsFlag==1}}">
<view class="item {{minPrice?(minPrice/100)>= i.minSellPrice ?'':'disableSelect':'' }}">
<view class="value {{i.active?'labelWidth':''}}" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}">
<view class="name text-hide {{i.active?'textWidth':''}}">
<text>{{filter.replaceItemText(i.goods.goodsAlias) ||filter.replaceItemText(i.goods.upgradeGoodsName) || filter.replaceItemText(i.goodsInfo.goodsName)}}</text>
<text wx:if="{{i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.goods.positionStr+'」'}}</text>
<text class="warning_text" wx:if="{{!i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text>
</view>
<input type="number" catchtap="noScroll" class="input" value="{{i.count || 1}}" catchinput="input" data-index="{{index}}" data-ind="{{ind}}" />
<view class="add" catchtap="addCount" data-count="{{1}}" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
+
<view class="last" wx:if="{{!i.active}}">
<text class="price">¥{{i.goods.price}}</text>
</view>
</view>
</block>
<block wx:if="{{i.active}}">
<view class="control">
<view class="minus" catchtap="addCount" data-count="{{-1}}" data-ind="{{ind}}" data-item="{{i}}">
-
</view>
<input type="number" catchtap="noScroll" class="input" value="{{i.count || 1}}" catchinput="input" data-ind="{{ind}}" data-item="{{i}}" />
<view class="add" catchtap="addCount" data-count="{{1}}" data-ind="{{ind}}" data-item="{{i}}">
+
</view>
</view>
</block>
<!-- <view class=" choose" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<!-- <view class=" choose" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<block wx:if="{{i.active}}">
<image src="../images/radio.png" />
</block>
......@@ -45,10 +44,53 @@
<view class="arc" />
</block>
</view> -->
</view>
</block>
<!-- 多规格 -->
<block wx:if="{{i.goodsFlag==2}}">
<view class="item {{minPrice?(minPrice/100)>= i.minSellPrice ?'':'disableSelect':'' }}">
<view class="value {{i.active?'labelWidth':''}}" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}">
<view class="name text-hide {{i.active?'textWidth':''}}">
<text>{{i.multipleSpecificationsGoods.baseGoodsName }}</text>
</view>
<view class="last" wx:if="{{!i.active}}">
<text class="price" wx:if="{{i.multipleSpecificationsGoods.goods.sellPrice}}">¥{{i.multipleSpecificationsGoods.goods.sellPrice}}</text>
</view>
</view>
<block wx:if="{{i.active}}">
<view class="control">
<view class="minus" catchtap="addCount" data-count="{{-1}}" data-ind="{{ind}}" data-item="{{i}}">
-
</view>
<input type="number" catchtap="noScroll" class="input" value="{{i.count || 1}}" catchinput="input" data-ind="{{ind}}" data-item="{{i}}" />
<view class="add" catchtap="addCount" data-count="{{1}}" data-ind="{{ind}}" data-item="{{i}}">
+
</view>
</view>
</block>
</view>
</block>
</view>
<view class="specification" wx:if="{{i.goodsFlag==2}}">
<view wx:for="{{i.multipleSpecificationsGoods.specificationList}}" wx:for-item="specific" wx:for-index="specInd">
<gl-cell border valueAlign="right" label="{{specific.specificationName}}" labelWidth="var(--fontSize180)" placeholder="请选择" bindclick="showPopup" background="#F7F7F7" data-show-name="specificBox">
<picker bindchange="handlePickerChange" data-item="{{i}}" value="{{specific.value}}" data-specIndex="{{specInd}}" data-index="{{ind}}" range="{{specific.specificationSelectValueList}}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{specific.value}}">
{{specific.value}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
</gl-cell>
</view>
</view>
</view>
</view>
</block>
</block>
</view>
</block>
<block wx:else>
<view class="nothing">暂无数据</view>
......
......@@ -518,6 +518,10 @@ Component({
// oderType != 'recorder' && util.setSellerInfo({ ...this.data.orderObj, subLoginMechantId: userInfo.subLoginUser.merchantId })
thisPage.getOrderBaseGoodsList &&
thisPage.getOrderBaseGoodsList(orderObj.merchantId);
thisPage.getSelectOrderGoodsList &&
thisPage.getSelectOrderGoodsList(orderObj.merchantId);
if (type != 3) {
delete orderObj.couponName;
delete orderObj.merchantCouponId;
......
// 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" />
......
......@@ -4,7 +4,7 @@
display: flex;
align-items: center;
justify-content: center;
border-bottom: var(--fontSize2) solid #EBEDF0;
/* border-bottom: var(--fontSize2) solid #EBEDF0; */
margin: 0 var(--fontSize32);
font-size: var(--fontSize28);
}
......
// 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: 82,
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;
}
.txt {
font-size: 24rpx;
}
}
.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 == 82?'act': '' }} com" bindtap="selectType" data-type="82">
<gl-image class="icon" src="/miniProgram/icon-invoice.png"></gl-image>
普通发票<text class="txt">(税率6%)</text>
</view>
<view class="modalbox cancle {{ selectType == 81?'act': '' }}" bindtap="selectType" data-type="81">
<gl-image class="icon" src="/miniProgram/icon-invoice-add.png"></gl-image>
增值税专用发票<text class="txt">(税率6%)</text>
</view>
</view>
</modal>
\ No newline at end of file
......@@ -9,14 +9,22 @@ Component({
show: {
type: Boolean,
observer: function (n) {
if (n) this.getMerchantPackageGoods();
if (n) this.initPackageGoods();
},
},
chooseGoodsList: {
type: Array,
observer: function (n) {
console.log(n);
if (n) this.filterData(n);
if (n) this.filterData();
},
},
goodsData: {
type: Array,
observer: function (n) {
if (n.length > 0) {
this.getOrderBaseGoodsList(n)
this.initPackageGoods()
}
},
},
},
......@@ -25,7 +33,7 @@ Component({
* 组件的初始数据
*/
data: {
goodsData: [],
goodsList: [],
selectData: [],
matchPackageName: "",
},
......@@ -34,6 +42,11 @@ Component({
* 组件的方法列表
*/
methods: {
getOrderBaseGoodsList(data) {
this.setData({
goodsList: data,
});
},
filterData() {
let {
selectData,
......@@ -52,14 +65,14 @@ Component({
},
choose(e) {
let {
goodsData
goodsList
} = this.data, {
index
} = e.currentTarget.dataset;
let thisPage = wx.$router.getPageInstance();
goodsData[index].active = !goodsData[index].active;
goodsList[index].active = !goodsList[index].active;
this.setData({
goodsData,
goodsList,
},
() => {
this.handleSelectData();
......@@ -72,16 +85,16 @@ Component({
count,
item
} = e.currentTarget.dataset;
let target = `goodsData[${index}].count`;
let target = `goodsList[${index}].count`;
if (!item.count) item.count = 1;
item.count += count;
if (item.count < 1) item.count = 1;
if (item.count > 999) item.count = 999;
let total = item.price * item.count;
let total = item.packageGoods.price * item.count;
item.totalPrice = wx.$util.decimal(total, 3);
this.setData({
[target]: item.count,
[`goodsData[${index}].totalPrice`]: item.totalPrice,
[`goodsList[${index}].totalPrice`]: item.totalPrice,
},
() => {
this.handleSelectData();
......@@ -90,21 +103,21 @@ Component({
},
input(e) {
let {
goodsData
goodsList
} = this.data;
let {
index
} = e.currentTarget.dataset;
let target = `goodsData[${index}].count`;
let target = `goodsList[${index}].count`;
let {
value
} = e.detail;
if (value < 1) value = 1;
if (value > 999) value = 999;
let total = wx.$util.decimal(goodsData[index].price * value, 2);
let total = wx.$util.decimal(goodsList[index].packageGoods.price * value, 2);
this.setData({
[target]: Number(value),
[`goodsData[${index}].totalPrice`]: total,
[`goodsList[${index}].totalPrice`]: total,
},
() => {
this.handleSelectData();
......@@ -114,32 +127,35 @@ Component({
handleSelectData() {
let {
selectData,
goodsData,
goodsList,
matchPackageName
} = this.data;
console.log(!matchPackageName,goodsList)
if (!matchPackageName) {
selectData = goodsData.filter((item) => {
selectData = goodsList.filter((item) => {
if (item.active) {
return item;
}
});
} else {
if (selectData.length === 0) {
selectData = goodsData.filter((item) => {
selectData = goodsList.filter((item) => {
if (item.active) {
return item;
}
});
} else {
goodsData.forEach((item, index) => {
goodsList.forEach((item, index) => {
if (item.active) {
if (!selectData.find((s) => s.packageCode == item.packageCode)) {
if (!selectData.find((s) => s.packageGoods.packageCode == item.packageGoods.packageCode)) {
selectData.push(item);
}
} else {
if (selectData.find((s) => s.packageCode == item.packageCode)) {
selectData.splice(index, 1);
}
selectData.forEach((s,sindex)=>{
if(s.packageGoods.packageCode == item.packageGoods.packageCode){
selectData.splice(sindex, 1);
}
})
}
});
}
......@@ -154,79 +170,72 @@ Component({
selectDataTotal,
});
},
getMerchantPackageGoods() {
let userInfo = wx.$util.getUserInfo();
let merchantId, params;
if (!userInfo.isSuper) {
merchantId = userInfo?.shopMerchantId;
}
params = {
merchantId,
matchPackageName: this.data.matchPackageName,
};
try {
api.getGoodsList(params).then((res) => {
if (res.code == 0) {
res.data.forEach((item) => {
item.active = false;
item.goodsList.forEach((g) => {
g.price = g.sellPrice;
});
item.price = item.goodsList.reduce((prev, cur) => {
prev = NP.plus(prev + cur.price);
return prev;
}, 0);
item.upgradePrice = item.goodsList.reduce((prev, cur) => {
// console.log("cur.price ", cur.price);
prev = NP.plus(prev + cur.price);
// console.log("prev ", prev);
return prev;
}, 0);
// console.log(NP.plus(0.1, 0.2));
item.price = NP.round(item.price, 2);
item.upgradePrice = NP.round(item.upgradePrice, 2);
// console.log("item.upgradePrice ", item.upgradePrice);
item.count = 1;
let total = NP.times(item.price, item.count);
item.totalPrice = wx.$util.decimal(total, 2);
item.isType = "meal";
initPackageGoods() {
let {
chooseGoodsList,
goodsList
} = this.data
if(goodsList.length>0){
goodsList.forEach((item) => {
item.active = false;
item.packageGoods.goodsList.forEach((g) => {
g.price = g.sellPrice;
});
this.setData({
goodsData: res.data,
},
() => {
this.setGoodsActive();
}
);
}
});
} catch (err) {
console.log(err);
new Error(err);
}
item.packageGoods.price = item.packageGoods.goodsList.reduce((prev, cur) => {
prev = NP.plus(prev + cur.sellPrice);
return prev;
}, 0);
item.packageGoods.upgradePrice = item.packageGoods.goodsList.reduce((prev, cur) => {
// console.log("cur.price ", cur.price);
prev = NP.plus(prev + cur.sellPrice);
// console.log("prev ", prev);
return prev;
}, 0);
// console.log(NP.plus(0.1, 0.2));
item.packageGoods.price = NP.round(item.packageGoods.price, 2);
item.packageGoods.upgradePrice = NP.round(item.packageGoods.upgradePrice, 2);
// console.log("item.upgradePrice ", item.upgradePrice);
item.count = 1;
let total = NP.times(item.packageGoods.price, item.count);
item.totalPrice = wx.$util.decimal(total, 2);
item.isType = "meal";
});
this.setData({
goodsList
},
() => {
this.setGoodsActive();
}
);
}
console.log(goodsList,'goodsList')
},
setGoodsActive() {
let {
chooseGoodsList,
goodsData,
goodsList,
selectData
} = this.data;
console.log(selectData,goodsList,'测试')
if (selectData.length == 0) {
goodsData.map((e) => {
goodsList.map((e) => {
e.active = false;
});
} else {
goodsData.map((e, index) => {
goodsList.map((e, index) => {
e.active = false;
selectData.map((s) => {
if (s.packageCode == e.packageCode) {
Object.assign(e, s);
if (s.packageGoods.packageCode == e.packageGoods.packageCode) {
Object.assign(e, s,{
active:true
});
}
});
});
}
this.setData({
goodsData,
goodsList,
},
() => {
this.handleSelectData();
......@@ -235,10 +244,38 @@ Component({
},
searchGoods(e) {
let {
goodsData
} = this.data;
let {
value
} = e.detail;
this.data.matchPackageName = value;
this.getMerchantPackageGoods();
this.data.matchPackageName=value
if (!value) {
this.getOrderBaseGoodsList(goodsData);
setTimeout(() => {
this.setGoodsActive();
}, 500);
return;
}
let _DATA_ = JSON.parse(JSON.stringify(goodsData));
let arr = [];
_DATA_.map(c => {
// let nameList = []
let name
// debugger
if (c.goodsFlag == 3 && c.packageGoods) {
name = c.packageGoods.packageName||c.packageGoods.packageAlias
}
console.log(name, c, 'name');
if (name.indexOf(value) != -1) {
arr.push(c)
}
})
console.log(arr,'arr')
this.setData({
goodsList: arr,
});
},
getChooseList(selectData, alreadyData) {
let arr = [];
......@@ -271,6 +308,7 @@ Component({
selectData
} = this.data;
let chooseList = this.getChooseList(selectData, chooseGoodsList);
console.log(chooseList,'chooseList')
let thisPage = wx.$router.getPageInstance();
if (!selectData.length) return wx.$util.showToast("请勾选套餐");
this.setData({
......
......@@ -6,8 +6,8 @@
套餐
<text>丨建议价</text>
</view>
<block wx:if="{{goodsData.length}}">
<view class="goods-item" wx:for="{{ goodsData }}" wx:key=" {{item.packageCode}}">
<block wx:if="{{goodsList.length}}">
<view class="goods-item" wx:for="{{ goodsList }}" wx:key=" {{item.packageGoods.packageCode}}">
<view class="item-hd">
<view class="icon" catchtap="choose" data-index="{{ index }}">
<block wx:if="{{ item.active }}">
......@@ -18,9 +18,9 @@
</block>
</view>
<!-- <checkbox value="{{item.packageCode}}" active="{{item.active}}" /> -->
<view class="packageName" catchtap="choose" data-index="{{ index }}">{{item.packageName}}</view>
<view class="packageName" catchtap="choose" data-index="{{ index }}">{{item.packageGoods.packageAlias||item.packageGoods.packageName}}</view>
<block wx:if="{{ !item.active }}">
<view class="total-price">¥{{item.upgradePrice}}</view>
<view class="total-price">¥{{item.packageGoods.upgradePrice}}</view>
</block>
<view class="control" wx:else>
<view class="minus" catchtap="addCount" data-count="{{ -1 }}" data-index="{{ index }}" data-item="{{ item }}">-</view>
......@@ -29,9 +29,9 @@
</view>
</view>
<view class="item-bd" catchtap="choose" data-index="{{ index }}">
<view class="upgrade-item" wx:for="{{ item.goodsList }}" wx:for-item="i" wx:for-index="ind">
<view class="upgrade-item" wx:for="{{ item.packageGoods.goodsList }}" wx:for-item="i" wx:for-index="ind">
<view class="dot"></view>
<view class="name">{{i.upgradeGoodsAlias||i.upgradeGoodsName}}</view>
<view class="name">{{i.goodsAlias||i.upgradeGoodsAlias||i.upgradeGoodsName}}</view>
<view class="price">¥{{i.sellPrice}}</view>
</view>
</view>
......
......@@ -55,7 +55,9 @@ Component({
fontSizeSetting,
statusBarHeight,
screenWidth,
pixelRatio
pixelRatio,
safeArea,
platform
} = res
const {
height,
......@@ -66,6 +68,7 @@ Component({
// 判断是否是华为平板设备
// && pixelRatio >= 2
let isPad = screenWidth >= 600
statusBarHeight = platform == 'ios' ? safeArea.top : statusBarHeight
if (isLandscape) statusBarHeight = 0
// console.log(isPad, screenWidth, 'screenWidth');
// let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5
......
......@@ -7,8 +7,12 @@
z-index: 99;
box-shadow: 0 var(--fontSize1) 0 0 #E9E9E9;
background-color: #fff;
/* padding-top: constant(safe-area-inset-top); */
/* padding-top: env(safe-area-inset-top); */
/* padding-top: 40px; */
}
.navigation-bar-box {
position: relative;
height: 100%;
......@@ -64,8 +68,9 @@
width: var(--fontSize40);
height: var(--fontSize40);
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.navigation-bar-box{
.navigation-bar-box {
font-size: var(--fontSize23);
}
......
......@@ -87,6 +87,7 @@ module.exports = {
quotationGoodsList(data) {
return api.post('dj.api.smartcarlife.quotationGoods.list', data)
},
/** 待补录订单统计 */
waitinputorder(data) {
let params = data || {}
......@@ -231,5 +232,10 @@ module.exports = {
// 更新合同协议内容
updateZyInfo(data) {
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update', data)
}
} ,
// 根据商户号获取可选商品列表
getSelectOrderGoodsList(data){
return api.post('dj.api.smartcarlife.selectOrderGoods.list', data)
}
}
......@@ -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({
......
......@@ -3,7 +3,8 @@
.coupon-box {
/* width: calc(100% + var(--fontSize64)); */
height: 100%;
/* margin-left: -var(--fontSize32); */
width: calc(100% + var(--fontSize64));
margin-left: calc(-1 * var(--fontSize32));
}
.coupon {
......@@ -12,7 +13,7 @@
.box {
border-bottom: var(--fontSize2) solid #EBEDF0;
padding-left: var(--fontSize72);
padding-left: var(--fontSize32);
}
.title {
......@@ -26,11 +27,12 @@
.text-center {
text-align: center;
}
.item-wrap{
border-bottom: var(--fontSize2) solid #EBEDF0;
}
.item {
box-sizing: border-box;
padding: var(--fontSize23) 0;
border-top: var(--fontSize2) solid #EBEDF0;
/* height: 84rpx; */
display: flex;
/* align-items: center; */
......@@ -61,7 +63,7 @@
display: none;
width: var(--fontSize32);
height: var(--fontSize32);
position: absolute;
// position: absolute;
top: var(--fontSize28);
left: calc(var(--fontSize52) * -1);
/* transform: translateY(-50%); */
......@@ -92,8 +94,8 @@
}
.item .value {
/* width: calc(100% - var(--fontSize180)); */
width: 100%;
width: calc(100% - var(--fontSize52));
// width: 100%;
display: flex;
/* flex-direction: ; */
justify-content: space-between;
......@@ -245,4 +247,29 @@
.isPad .item {
font-size: var(--fontSize22);
}
.specification {
background: #F7F7F7;
border-radius: 16rpx 16rpx 0 0;
width:calc(100% - var(--fontSize80));
margin:var(--fontSize9) 0 var(--fontSize32) var(--fontSize52);
}
.picker {
display: flex;
flex-direction: row-reverse;
height: var(--fontSize80);
line-height: var(--fontSize80);
text-align: right;
}
.placeholder {
font-weight: 400;
font-size: var(--fontSize28);
color: #B6B6B8;
}
.arrow {
width: var(--fontSize28);
height: var(--fontSize26);
margin-top: var(--fontSize26);
flex-shrink: 0;
}
\ No newline at end of file
......@@ -5,54 +5,82 @@
<scroll-view class="coupon" scroll-y>
<block wx:if="{{goodsList.length > 0}}">
<!-- <block wx:for="{{goodsList}}" wx:key="index"> -->
<!-- <view class="title">
{{item.goodsTypeName}}
<text class="tips">|建议价</text>
</view> -->
<!-- <view class="title"> -->
<!-- {{item.goodsTypeName}} -->
<!-- <text class="tips">|建议价</text>
</view> -->
<view class="box">
<block wx:for="{{goodsList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="item {{minPrice?(minPrice/100)>= i.shopMinPrice ?'':'disableSelect':'' }}">
<view class="value " catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<block wx:if="{{i.goods}}">
<view class="name text-hide ">
<view class="goodsname serveName ">{{filter.replaceItemText(i.goods.goodsAlias) ||filter.replaceItemText(i.goods.upgradeGoodsName + (i.goods.specificationData? '/'+i.goods.specificationData:'')) || filter.replaceItemText(i.goods.goodsInfo.goodsName + (i.goods.specificationData? ('/'+i.goods.specificationData):'') )}}</view>
<!-- <text wx:if="{{i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">{{'「' + i.positionStr+'」'}}</text> -->
<view class="serveName" wx:if="{{i.goods.serveName}}">(包含{{i.goods.serveName}})</view>
<!-- <text class="warning_text" wx:if="{{!i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">无部位</text> -->
</view>
<view class="last">
<text class="price">¥{{i.goods.sellPrice}}</text>
</view>
</block>
<block wx:if="{{i.packageGoods}}">
<view class="childbox">
<view class="item">
<view class="name ">
<view>{{i.packageGoods.packageAlias || i.packageGoods.packageName}}</view>
</view>
<view class="last">
<text class="price">¥{{i.packageGoods.sellPrice}}</text>
</view>
<view class="item-wrap">
<view class="item {{minPrice?(minPrice/100)>= i.shopMinPrice ?'':'disableSelect':'' }}">
<view class="icon" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<block wx:if="{{i.active}}">
<image src="./images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view>
<view class="value " catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<block wx:if="{{i.goodsFlag==1}}">
<view class="name text-hide ">
<view class="goodsname serveName ">{{filter.replaceItemText(i.goods.goodsAlias) ||filter.replaceItemText(i.goods.upgradeGoodsName + (i.goods.specificationData? '/'+i.goods.specificationData:'')) || filter.replaceItemText(i.goods.goodsInfo.goodsName + (i.goods.specificationData? ('/'+i.goods.specificationData):'') )}}</view>
<!-- <text wx:if="{{i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">{{'「' + i.positionStr+'」'}}</text> -->
<view class="serveName" wx:if="{{i.goods.serveName}}">(包含{{i.goods.serveName}})</view>
<!-- <text class="warning_text" wx:if="{{!i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">无部位</text> -->
</view>
<view class="last">
<text class="price">¥{{i.goods.sellPrice}}</text>
</view>
</block>
<block wx:if="{{i.goodsFlag==3}}">
<view class="childbox">
<view class="item">
<view class="name ">
<view>{{i.packageGoods.packageAlias || i.packageGoods.packageName}}</view>
</view>
<view class="last">
<text class="price">¥{{i.packageGoods.sellPrice}}</text>
</view>
</view>
<view class="goodsChild">
<view class="goodsItem" wx:for="{{i.packageGoods.goodsList}}" wx:key="childind" wx:for-index="childind" wx:for-item="child">
<view class="goodsListName">{{filter.replaceItemText(child.goodsAlias) ||filter.replaceItemText(child.upgradeGoodsName +( child.specificationData ? ('/'+child.specificationData): '') ) || filter.replaceItemText(child.goodsInfo.goodsName+( child.specificationData? ('/'+child.specificationData): '') )}}</view>
<view class="goodsListPrice">¥{{child.sellPrice}}</view>
<view class="goodsChild">
<view class="goodsItem" wx:for="{{i.packageGoods.goodsList}}" wx:key="childind" wx:for-index="childind" wx:for-item="child">
<view class="goodsListName">{{filter.replaceItemText(child.goodsAlias) ||filter.replaceItemText(child.upgradeGoodsName +( child.specificationData ? ('/'+child.specificationData): '') ) || filter.replaceItemText(child.goodsInfo.goodsName+( child.specificationData? ('/'+child.specificationData): '') )}}</view>
<view class="goodsListPrice">¥{{child.sellPrice}}</view>
</view>
</view>
</view>
</view>
</block>
</block>
<block wx:if="{{i.goodsFlag==2}}">
<view class="name text-hide ">
<view class="goodsname serveName ">{{i.multipleSpecificationsGoods.baseGoodsName }}</view>
<view class="serveName" wx:if="{{i.multipleSpecificationsGoods.goods.serveName}}">(包含{{i.multipleSpecificationsGoods.goods.serveName}})</view>
</view>
<view class="last">
<text class="price" wx:if="{{i.multipleSpecificationsGoods.goods.sellPrice}}">¥{{i.multipleSpecificationsGoods.goods.sellPrice}}</text>
</view>
</block>
</view>
</view>
<view class="icon" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<block wx:if="{{i.active}}">
<image src="./images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
<view class="specification" wx:if="{{i.goodsFlag==2}}">
<view wx:for="{{i.multipleSpecificationsGoods.specificationList}}" wx:for-item="specific" wx:for-index="specInd">
<gl-cell border valueAlign="right" label="{{specific.specificationName}}" labelWidth="var(--fontSize180)" placeholder="请选择" bindclick="showPopup" background="#F7F7F7" data-show-name="specificBox" >
<picker bindchange="handlePickerChange" data-item="{{i}}" value="{{specific.value}}" data-specIndex="{{specInd}}" data-index="{{ind}}" range="{{specific.specificationSelectValueList}}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{specific.value}}">
{{specific.value}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
</gl-cell>
</view>
</view>
</view>
</block>
</view>
<!-- </block> -->
......
......@@ -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,8 +96,7 @@ Component({
{
name: '战败',
value: '-1'
},
],
}],
maxDate: new Date().format('yyyy-MM-dd'),
orderTimeList: [{
name: '全部',
......@@ -144,8 +143,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
});
// }
},
......@@ -111,6 +131,7 @@ Component({
},
// '1', '2', '3',
activeNames: ["1", "2", "3", "4"],
goodsBox:false,
showPicker: false,
// optionsSelect: Object.freeze(optionsSelect),
popObj: {
......@@ -122,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: "",
},
......@@ -170,6 +185,19 @@ Component({
// }
this.setGoodsListTotal();
},
//多规格单价修改
changeSpecific(e){
let { value } = e.detail;
let { index, item } = e.currentTarget.dataset;
console.log(item, "item");
let thisPage = wx.$router.getPageInstance();
let target = `orderInfo.vdQuotationGoodsList[${index}].multipleSpecificationsGoods.goods.price`;
let number = wx.$util.removeLeadingZerosAndEnsureNonNegative(value);
thisPage.setData({
[target]: number,
});
this.setGoodsListTotal();
},
changePricePackage(e) {
let { value } = e.detail;
let { index, item, childind } = e.currentTarget.dataset;
......@@ -247,27 +275,36 @@ Component({
setGoodsListTotal() {
let thisPage = wx.$router.getPageInstance();
let { orderInfo } = thisPage.data;
// console.log(orderInfo,'orderInfo');
console.log(orderInfo,'orderInfo');
let total = 0;
orderInfo.vdQuotationGoodsList.map((i) => {
if (i.goods) {
// total += parseFloat(i.goods.count || 1) * parseFloat(i.goods.price)
total = NP.plus(
total,
NP.times(parseFloat(i.goods.count || 1), parseFloat(i.goods.price))
NP.times(parseFloat(i.count || 1), parseFloat(i.goods.price))
);
}
if (i.packageGoods) {
console.log(i.packageGoods, "i.packageGoods");
i.packageGoods.goodsList.map((ele) => {
// total += parseFloat(ele.count || 1) * parseFloat(ele.price)
total = NP.plus(
total,
NP.times(parseFloat(ele.count || 1), parseFloat(ele.price))
NP.times(parseFloat(i.count || 1), parseFloat(ele.price))
);
});
}
//多规格
if(i.multipleSpecificationsGoods){
if (i.multipleSpecificationsGoods.goods) {
// total += parseFloat(i.goods.count || 1) * parseFloat(i.goods.price)
total = NP.plus(
total,
NP.times(parseFloat(i.count || 1), parseFloat(i.multipleSpecificationsGoods.goods.price))
);
}
}
});
console.log(total, "total");
thisPage.setData({
......@@ -537,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,
......@@ -551,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;
......
......@@ -276,6 +276,18 @@
position: relative;
color: #222222;
}
.goods-box .goods{
display: flex;
align-items: center;
justify-content: space-between;
min-height: var(--fontSize118);
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
padding: 20rpx var(--fontSize28) 20rpx var(--fontSize90);
font-size: var(--fontSize28);
background: #F5F5F7;
position: relative;
color: #222222;
}
.goods .package {
background: #fff;
......@@ -308,6 +320,7 @@
position: relative;
margin-right: var(--fontSize32);
margin-left: auto;
min-width:160rpx;
}
.goods-box .goods .price-box text {
......@@ -325,6 +338,7 @@
min-height: 100%;
font-size: var(--fontSize28);
padding: 0 var(--fontSize16) 0 var(--fontSize50);
color: #333333;
}
.goods-box .goods .price input.error {
......@@ -471,11 +485,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; */
}
......@@ -507,7 +529,7 @@
font-size: var(--fontSize28);
color: #999999;
height: var(--fontSize56);
padding: 0 var(--fontSize24);
padding: 0 var(--fontSize20);
position: relative;
}
......@@ -534,4 +556,21 @@
.payType-box .item.active .active-icon {
display: block;
}
.alias{
font-size: 12px;
color: #222222!important;
}
.bottom_box{
display: flex;
align-items: center;
justify-content: space-between;
}
.bottom_box .position {
color: #888888;
}
.bottom_box .right{
display: flex;
align-items: center;
justify-content: space-between;
}
\ No newline at end of file
......@@ -24,7 +24,7 @@
</view>
<view class="name ">
<!-- -->
{{item.goods.goodsAlias || item.goods.goodsNameAlias|| filter.replaceItemText(item.goods.upgradeGoodsName ,( item.goods.specificationData? '/'+item.goods.specificationData:'')) || filter.replaceItemText(item.goods.goodsName, (item.goods.specificationData? '/'+item.goods.specificationData:''))}}
{{item.goods.goodsAlias || item.goods.goodsNameAlias|| filter.replaceItemText(item.goods.upgradeGoodsName ,( item.goods.specificationData? '/'+item.goods.specificationData:'')) || filter.replaceItemText(item.goods.goodsName, (item.goods.specificationData? '/'+item.goods.specificationData:''))}}
<!-- {{filter.replaceItemText(item.goods.goodsAlias) ||filter.replaceItemText(item.goods.upgradeGoodsName) || filter.replaceItemText(item.goods.goodsName)}} -->
</view>
<view class="price-box">
......@@ -47,7 +47,7 @@
</view>
<view class="packageBox">
<view class="itemSty" wx:for="{{ item.packageGoods.goodsList }}" wx:key="childind" wx:for-index="childind" wx:for-item="child">
<view class="name ">{{child.goodsAlias || child.goodsNameAlias || filter.replaceItemText(child.upgradeGoodsName , (item.specificationData? '/'+child.specificationData: '') ) ||filter.replaceItemText(child.goodsName ,( item.specificationData? '/'+child.specificationData: '') ) }}</view>
<view class="name ">{{child.goodsAlias || child.goodsNameAlias || filter.replaceItemText(child.upgradeGoodsName , (item.specificationData? '/'+child.specificationData: '') ) ||filter.replaceItemText(child.goodsName ,( item.specificationData? '/'+child.specificationData: '') ) }}</view>
<view class="price-box">
<text>¥</text>
<view class="price">
......@@ -58,6 +58,34 @@
</view>
</view>
</view>
<!-- 多规格 -->
<view class="goods" wx:if="{{ item.multipleSpecificationsGoods }}">
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="./images/del.png" />
</view>
<view class="goods-content" >
<view class="alias" wx:if="{{item.multipleSpecificationsGoods.goods.goodsAlias}}" >
商品别名:{{item.multipleSpecificationsGoods.goods.goodsAlias}}
</view>
<view class="bottom_box">
<view class="name left">
<view class="name">{{item.multipleSpecificationsGoods.baseGoodsName}}</view>
<view class="position" wx:if="{{ item.multipleSpecificationsGoods.goods.specificationStr }}">{{item.multipleSpecificationsGoods.goods.specificationStr}}</view>
</view>
<view class="right">
<view class="price-box">
<text>¥</text>
<view class="price">
<input type="digit" value="{{item.multipleSpecificationsGoods.goods.price}}" bindinput="changeSpecific" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.multipleSpecificationsGoods.goods.checkError ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view>
</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox">x{{item.count||1}}</view>
</view>
</view>
</view>
</view>
</block>
<view class="goods total-box">
<view>总价</view>
......@@ -90,10 +118,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">
<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 }}">门店收款</view>
<view class="item text-center active" wx:elif="{{ orderInfo.outTradeArr}}">嘀加收款</view>
<!-- 错误工单或非正常分账期单流水补录 固定显示嘀加收款 -->
<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>
......@@ -101,8 +138,9 @@
</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>
<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="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?'4S店收款时间':'嘀加收款时间'}}" 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?'4S店收款时间':'嘀加收款时间'}}" valueAlign="right" labelWidth="var(--fontSize200)"></gl-cell>
<view class="box">
<view class="title remarkTitle">备注</view>
<van-field type="textarea" maxlength="30" autosize class="inputBox" border="{{ false }}" data-hold-keyboard value="{{ orderInfo.notes }}" data-attrName="notes" placeholder="请输入(30字以内)" data-attrType="" bindinput="handleInput"></van-field>
......@@ -112,5 +150,5 @@
</van-collapse>
<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
<goods show="{{ goodsBox }}" wx:if="{{goodsBox}}" bindconfirm="chooseGoods" goodsData="{{ quotationGoodsList }}" chooseGoodsList="{{ orderInfo.vdQuotationGoodsList }}" />
<date-select show="{{ showDateSelect }}" bind:close="closeDateModal" selectPay="{{orderInfo.payType}}" bind:confirm="onChanteSuccessDate"></date-select>
\ No newline at end of file
......@@ -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: "其它收款"
},
},
],
......@@ -143,7 +146,9 @@ Component({
mapValue: {
1: "线上支付",
2: "门店收款",
5: "嘀加收款"
5: "嘀加收款",
6: "对公转账",
7: "其它收款"
},
},
],
......@@ -206,7 +211,15 @@ Component({
repealReason: '',
repealId: '',
zyPayStatus: '', // 合同协议状态
selectType: 1
selectType: 1,
// 更多按钮
moreBtnVisible: false,
btnOrderInfo: {},
btnsList: [{
name: '申请开票'
}],
// 选择发票
invoiveVisible: false
},
observers: {
mode: function (value) {
......@@ -534,6 +547,15 @@ Component({
async handleClickBtn(e) {
let { target, type } = e.currentTarget.dataset;
console.log(target);
// 待上传去处理
if (target?.zyPayStatus == '1' && type == 'handle') {
let staffCheck = await checkDailyReport(true);
if (staffCheck) return false;
return wx.$router.go("serviceInfo", {
orderId: target.orderId,
apiName: "handler",
});
}
// 上传合同协议
if (target?.zyPayStatus == '1' && type == 'upload') {
// 校验是否填写昨日日报
......@@ -1126,6 +1148,69 @@ 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) {
this.handleInvoiceDetail()
this.handleBtnCancel()
},
handleSelectInvoice() {
let { invoiveVisible } = this.data
this.setData({
invoiveVisible: !invoiveVisible
})
},
handleInvoiceDetail() {
let { btnOrderInfo } = this.data
const params = {
orderCode: btnOrderInfo.payId
}
wx.$util.showLoading()
commonApi.getOrderCode(params).then(res => {
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
// 开票成功、开票失败
wx.$router.go("tabWorkOrder.invoiceResult", {
obj: {
// code - 0000:成功;其他:失败
code: invoiceInfo.code,
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceIssueQrcode.createdDate,
imgUrl: invoiceInfo.imgUrl,
msg: invoiceInfo.msg
}
})
} else {
/**
* 未开发票
* invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。
* */
!invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", {
obj: invoiceIssueQrcode
})
}
}).finally(() => {
wx.$util.hideLoading()
})
},
/**获取门店主营品牌 */
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
......@@ -155,14 +155,23 @@
<block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2||staffUuid }}">
<block wx:if="{{ item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4 || item.orderStatus == 7) }}">
<view class="btn_class">
<block wx:if="{{item.showInvoiceEntrance || item.invoicing == 2}}">
<view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view>
</block>
<block wx:if="{{ item.orderStatus != '0' }}">
<view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{ item }}">接待记录</view>
</block>
<view class="order-btn" bindtap="handleClickBtn" data-target="{{ item }}" data-type="upload">上传协议</view>
<block wx:if="{{item.equityOrderStatus == 0 && item.equityGoodsFlag == 1}}">
<view class="order-btn" bindtap="handleClickBtn" data-target="{{ item }}" data-type="handle">去处理</view>
</block>
</view>
</block>
<block wx:else>
<view wx:if="{{ item.orderStatus != '4' && item.orderStatus!=11&& item.orderStatus!=9 }}" class="btn_class">
<block wx:if="{{item.showInvoiceEntrance}}">
<view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view>
</block>
<block wx:if="{{ item.canUpdateZyPayUrl == 1 && item.zyPayStatus == 2 }}">
<view class="order-btn default-btn padding_20" bindtap="handleClickBtn" data-type="upload" data-target="{{ item }}">修改协议</view>
</block>
......@@ -170,7 +179,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>
......@@ -186,8 +195,18 @@
</block>
</block>
</view>
<view wx:else class="btn_class">
<block wx:if="{{item.showInvoiceEntrance}}">
<view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view>
</block>
</view>
</block>
</block>
<view wx:else class="btn_class">
<block wx:if="{{item.showInvoiceEntrance}}">
<view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view>
</block>
</view>
</view>
<!-- <view class="tipsCon"> -->
<block wx:if="{{ !staffUuid && item.zyPayStatus != 1 }}">
......@@ -202,7 +221,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 +303,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
......@@ -516,7 +516,7 @@
.btn_class {
display: flex;
gap: var(--fontSize16);
gap: var(--fontSize8);
margin-left: auto;
}
......
......@@ -402,6 +402,8 @@ Page({
// 接口请求
toPostData(params, type) {
console.log(params);
// 添加收款方 0:嘀加收款
params.payee = 0
wx.showLoading({ title: "提交中..." })
defeatOrderCreate(params).then(res => {
wx.hideLoading();
......
......@@ -42,7 +42,7 @@ Page({
}
],
businessTypeList: [
{ label: '延保', type: 0 },
{ label: '延保/权益', type: 0 },
{ label: '精品', type: 1 }
],
activeTab: -1,
......
......@@ -9,7 +9,21 @@ Component({
*/
properties: {
recordData: Object,
batchId: Number,
batchId: {
type: Number,
observer: function(n) {
console.log(n, '====123456')
thisPage = wx.$router.getPageInstance()
this.innerAudioContext = thisPage.qualityAudio
const data = {
batchId: n,
currentPage: 1,
pageSize: 999999,
};
this.findConversationDetailByBatchId(data)
this.findCbByBatchId(data)
}
},
autoPlayConfig: Object
},
lifetimes: {
......
// packageEquity/pages/receptionDetail/receptionDetail.js
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
import { getRecordDetailList, getShortUrl } from "../../receptionRecordsApi"
Page({
behaviors: [reportPageTrackMixin],
......@@ -20,18 +21,64 @@ Page({
currentTime: '00:00', //当前音频的播放位置
isOperate: true,
track_event_code: 'reception_detail', //埋点动作类型
receptionStartTime: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
async onLoad(options) {
console.log(options, 'onload')
// 若有参数,则是短链进入
if (Object.keys(options).length) {
// 调用接口获取详情,默认取第一条
const time = new Date(+options.receptionStartTime).format('yyyy-MM-dd')
console.log(time)
this.setData({
receptionStartTime: options.receptionStartTime
})
const params = {
batchId: options.batchId,
merchantNo: options.merchantNo,
startDateTime: time,
endDateTime: time
}
// this.setData({
// record: {batchId: options.batchId}
// })
const res = await getRecordDetailList(params)
let {
code,
data,
message
} = res
if (code == 0) {
const detailInfo = data.list[0] || {}
if (Object.keys(detailInfo).length) {
detailInfo.staticDate = new Date(detailInfo.staticDate).format('MM月dd日')
this.track_businessParam = {
batchId: detailInfo.batchId
} //埋点业务参数
let typeLists = [
"对话",
],
showViolationBtn = false,
autoPlayConfig = {}
this.setData({
record: detailInfo,
typeLists: typeLists,
showViolationBtn,
autoPlayConfig
}, () => {
this.setAudio()
})
}
}
}
},
back() {
this.qualityAudio.pause()
if (this.qualityAudio) this.qualityAudio.pause()
wx.$router.back()
},
onHandle(e) {
let {
......@@ -152,6 +199,7 @@ Page({
return `${minutes}:${remainingSeconds}`;
},
onRoute(options) {
console.log(options, '===')
if (Object.keys(options).length) {
options.staticDate = new Date(options.staticDate).format('MM月dd日')
this.track_businessParam = {
......@@ -228,7 +276,7 @@ Page({
qualityRef() {
return this.selectComponent('#quality')
},
share(e) {
async share(e) {
let userInfo = wx.$util.getUserInfo() || {}
const {
record
......@@ -241,14 +289,26 @@ Page({
endTime,
totalDuration,
fileUrl,
startTime
startTime,
merchantNo,
batchId,
// receptionStartTime
} = record
// 门店 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址
let text = [record.merchantName, wx.$util.tsFormatTime(startTime, 'Y年M月D日 h:m:s'), wx.$util.tsFormatTime(endTime, 'Y年M月D日 h:m:s'), this.format(totalDuration), receptionStatus, fileUrl].join(' - ')
wx.$util.setCopyData(text)
this.setTrackData('copy_content', {
context: text,
})
console.log(record, 'record')
// 获取短链地址
const {receptionStartTime} = this.data
const res = await getShortUrl({merchantNo, batchId, receptionStartTime})
console.log(res, 'res')
if (res.code == '0') {
// 门店 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址(更换成短链)
let text = [record.merchantName, wx.$util.tsFormatTime(startTime, 'Y年M月D日 h:m:s'), wx.$util.tsFormatTime(endTime, 'Y年M月D日 h:m:s'), this.format(totalDuration), receptionStatus, res.data].join(' - ')
wx.$util.setCopyData(text)
this.setTrackData('copy_content', {
context: text,
})
} else {
wx.$util.showToast('获取短链失败')
}
// wx.$util.showToast('复制成功')
},
format(seconds) {
......
......@@ -24,6 +24,7 @@ Page({
onLoad(options) {
this.getTabHeight()
this.getSceneMarketMaterialMenu()
this.getAIUrl()
},
/**
......
......@@ -2,6 +2,7 @@ import {
getSceneMarketMaterialMenu,
getSceneMarketMaterialList,
enterPageTrack,
getAiagent
} from '../request'
import dayjs from 'dayjs'
export default {
......@@ -148,8 +149,35 @@ export default {
})
},
jumpAI() {
wx.navigateToMiniProgram({
appId: 'wx4cc95d0fd0729c32'
if (this.aiUrl) wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(this.aiUrl)}`
})
else {
wx.$util.showToast('暂无权限')
this.getAIUrl()
}
},
async getAIUrl() {
const {
phone,
uuid
} = this.data.userInfo, {
code,
data
} = await getAiagent({
accountPhone: phone,
ownerShipType: 0,
agentCode: 'AI6'
})
if (code == 0 && data && data.length) {
let [item] = data, {
ownerPost,
agentUrl,
domainName,
presuppositionProblem,
accountPhone
} = item
this.aiUrl = `${agentUrl}?one_id=${uuid}&platformType=0&phone=${accountPhone}&position=${ownerPost}&domain=${domainName}&presuppositionProblem=`
}
}
}
\ No newline at end of file
......@@ -43,7 +43,14 @@ module.exports = {
leavePageTrack(data = {}) {
return api.post('dj.api.customer.dynamic.record.leave', data)
},
getSceneMarketConfig(){
getSceneMarketConfig() {
return api.getMock('scene-market-config')
}
},
getAiagent(data = {}) {
return api.post('dj.pad.api.aiagent.get.special.agent',
data,
[],
"/rop-dj-pad/router",
"dj")
},
}
\ No newline at end of file
......@@ -11,5 +11,10 @@ module.exports = {
// 分页查询接待列表
getRecordDetailList(data) {
return api.post("dj.api.smartcarlife.reception.findReceptionByConditionPage", data)
},
// 获取短链地址
getShortUrl(data) {
return api.post("dj.api.car.boutique.inspection.batch.file.short.url", data)
}
}
\ No newline at end of file
......@@ -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
......@@ -236,7 +248,14 @@ Component({
name: '全部',
value: '',
active: true
}, ...wx.$util.deepClone(this.data.payTypeList)]
}, ...wx.$util.deepClone(this.data.payTypeList), {
name: '对公转账',
value: '6'
},
{
name: '其它收款',
value: '7'
}]
this.setData({
['form.payType']: payArr
})
......
......@@ -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,7 @@ Page({
isMake: true,
selectType: 1,
isSettingExpiredTraffic: false, // 是否启用流量失效
isScan: false // 是否扫码核销
isScan: false, // 是否扫码核销
},
// 创建一个动画实例
// createAnimation: function () {
......@@ -112,31 +113,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 +489,7 @@ Page({
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI);
},
init(userInfo) {},
init(userInfo) { },
search() {
wx.$orderListRefresh = false;
let {
......@@ -581,6 +582,8 @@ Page({
});
e.total_price = e.totalPrice;
e.totalPrice = Number(wx.$util.decimal(e.totalPrice, 2)).toFixed(2);
// 开票按钮
e.invoiceName = e.invoiceStatus == 2 ? '查看发票' : '申请开票'
// && e.status != 1 待跟进现在也能撤销
let orderType =
(userInfo.userType == 1 || userInfo.userType == 2) &&
......@@ -642,7 +645,7 @@ Page({
}
if (total != 0) {
this.setData({
[`list[${pageNum - 1}]`]: list,
[`list[${pageNum - 1}]`]: list
});
}
this.setData({
......@@ -757,9 +760,9 @@ Page({
if (wx.$orderListRefresh) {
// 清空筛选条件 搜索条件
this.setData({
searchObj: {},
keyword: "",
},
searchObj: {},
keyword: "",
},
() => {
this.search();
this.getCreateOrderSetting()
......@@ -798,41 +801,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 +853,5 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
onShareAppMessage: function () { },
});
\ 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,7 @@
</view> -->
<!-- </block> -->
<!-- </block> -->
<!-- footer -->
</view>
<block wx:if="{{ isMake }}">
<view
......
......@@ -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
......@@ -61,7 +61,7 @@ Page({
},
selectType: 1,
styleHight: 'auto',
ispopUp: false,
ispopUp: true,
isPad: false,
isWait: false //今日待办
},
......@@ -75,7 +75,8 @@ Page({
}
commonApi.getStaffRemindList(params).then(result => {
this.setData({
todoList: result.data || []
todoList: result.data || [],
stodoList:result.data.slice(0, 2)
})
})
},
......
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 == 3) {
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
}
Component({
options: {
styleIsolation: 'isolated',//表示样式隔离,默认隔离
},
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function (n) {
if (n) {
this.setData({
keyWord: ''
})
this.setGoodsActive();
}
},
},
goodsData: {
type: Array,
observer: function (n) {
if (n.length > 0) {
this.getOrderBaseGoodsList(n);
}
},
},
chooseGoodsList: {
type: Array,
observer: function (n) {
this.setGoodsActive();
},
},
minPrice: {
type: Number,
// value:0
},
isSolarFilm: Boolean,
baseConfigData: Object,
},
/**
* 组件的初始数据
*/
data: {
goodsList: [],
keyWord: ''
},
/**
* 组件的方法列表
*/
methods: {
setGoodsActive() {
let { chooseGoodsList, goodsList } = this.data;
if (chooseGoodsList.length == 0) {
goodsList.map((e) => {
e.upgradeGoodsList.map((c) => (c.active = false));
});
} else {
let indexList = [];
goodsList.map((e, index) => {
e.upgradeGoodsList.map((c, ind) => {
c.active = false;
chooseGoodsList.map((s) => {
if (s.merchantGoodsId == c.id || s.id == c.id) {
c.count = s.count;
indexList.push({
index,
ind,
});
}
});
});
});
indexList.map((e) => {
goodsList[e.index].upgradeGoodsList[e.ind].active = true;
});
}
this.setData({
goodsList,
});
},
getOrderBaseGoodsList(data) {
this.setData({
goodsList: data,
});
},
// 删除数组重复项 都不保留
removeDuplicates(arr, property) {
console.log(arr, 'packageCode');
var uniqueArray = [];
for (var i = 0; i < arr.length; i++) {
var value = arr[i][property];
// 兼容套餐
if ((!uniqueArray.some((obj) => obj[property] === value) || arr[i]?.packageCode)) {
uniqueArray.push(arr[i]);
}
}
return uniqueArray;
},
// 去重保留第二项
arrayUnique(arr, name, packageCode = 'packageCode') {
console.log(arr, 'arrayUnique');
var hash = {};
return arr.reduce(function (acc, cru, index) {
// 兼容套餐逻辑
if (!hash[cru[name]] || !hash[cru[packageCode]]) {
hash[cru[name]] = { index: index };
acc.push(cru);
} else {
acc.splice(hash[cru[name]]["index"], 1, cru);
}
return acc;
}, []);
},
getChooseList() {
let { goodsList, chooseGoodsList, isSolarFilm } = this.data;
console.log(goodsList, chooseGoodsList, 'goodsList');
let chooseList = [];
// debugger
// 太阳膜下单 需保留已选的商品
if (isSolarFilm) {
let upgradeGoodsList = [];
goodsList.map((e) => {
upgradeGoodsList = upgradeGoodsList.concat(e.upgradeGoodsList);
});
let selectActiveArr = [];
for (var i = 0; i < upgradeGoodsList?.length; i++) {
let val = upgradeGoodsList[i];
if (val.active) selectActiveArr.push(val);
}
if (!selectActiveArr?.length) return wx.$util.showToast("请勾选商品");
// 将已选商品与当前弹窗数据对比处理数据
console.log(upgradeGoodsList, chooseGoodsList, 'chooseGoodsList');
let arr = this.removeDuplicates(
upgradeGoodsList.concat(chooseGoodsList),
"id"
);
console.log(arr, 'arr');
arr?.map((c) => {
if (c.active) {
if (!c.count) c.count = 1;
if (chooseGoodsList.length > 0) {
chooseGoodsList.map((x) => {
if (x.id == c.id) {
c.price = x.price || 0;
}
});
} else {
c.price = c.upgradePrice || 0;
}
if (!c.price) c.price = c.upgradePrice;
chooseList.push(c);
}
});
} else {
goodsList.map((e) => {
e.upgradeGoodsList.map((c) => {
if (c.active) {
if (!c.count) c.count = 1;
if (chooseGoodsList.length > 0) {
chooseGoodsList.map((x) => {
if (x.id == c.id) {
c.price = x.price || 0;
}
});
} else {
c.price = c.upgradePrice || 0;
}
if (!c.price) c.price = c.upgradePrice;
console.log(c, 'isSolarFilm');
chooseList.push(c);
}
});
});
}
return this.arrayUnique(chooseList, "id");
},
choose(e) {
let { item, index, ind } = e.currentTarget.dataset;
let { active } = item;
let { minPrice } = this.data;
// item
// console.log(item)
// console.log(minPrice)
// console.log(item.goodsInfo.shopMinPrice)
// console.log(minPrice && minPrice < item.shopMinPrice)
// 如果有设置订单价格 那就不能选单个成本价比总价还高的
if (minPrice && minPrice / 100 < item.shopMinPrice) return false;
// 太阳膜类商品 未配置部位不可选择
// if (item?.goodsInfo?.goodsType == 1 && !item.merchantGoodsPosition) return false
let target = `goodsList[${index}].upgradeGoodsList[${ind}].active`;
this.setData({
[target]: !active,
});
},
addCount(e) {
let { index, count, item, ind } = e.currentTarget.dataset;
let target = `goodsList[${index}].upgradeGoodsList[${ind}].count`;
if (!item.count) item.count = 1;
item.count += count;
if (item.count < 1) item.count = 1;
if (item.count > 999) item.count = 999;
this.setData({
[target]: item.count,
});
},
input(e) {
let { index, ind } = e.currentTarget.dataset;
let target = `goodsList[${index}].upgradeGoodsList[${ind}].count`;
let { value } = e.detail;
if (value < 1) value = 1;
if (value > 999) value = 999;
this.setData({
[target]: Number(value),
});
},
searchGoods(e) {
let { goodsData } = this.data;
let { value } = e.detail;
if (!value) {
this.getOrderBaseGoodsList(goodsData);
setTimeout(() => {
this.setGoodsActive();
}, 500);
return;
}
let _DATA_ = JSON.parse(JSON.stringify(goodsData));
let arr = [];
_DATA_.map((i) => {
let upgradeGoodsList = [];
i.upgradeGoodsList.map((c) => {
// console.log(c);
let name =
c.upgradeGoodsAlias || c.upgradeGoodsName || c.goodsInfo.goodsName;
if (name.indexOf(value) != -1) {
upgradeGoodsList.push(c);
}
});
if (
i.goodsTypeName.indexOf(value) != -1 ||
upgradeGoodsList.length > 0
) {
i.upgradeGoodsList =
upgradeGoodsList.length > 0 ? upgradeGoodsList : i.upgradeGoodsList;
arr.push(i);
}
});
console.log(arr);
this.setData({
goodsList: arr,
});
},
cancel() {
this.setData({
show: false,
});
},
confirm() {
let chooseList = this.getChooseList();
let { goodsList } = this.data;
if (goodsList.length < 1) return;
if (!chooseList.length) return wx.$util.showToast("请勾选商品");
let thisPage = wx.$router.getPageInstance();
thisPage?.setGoodsTotal && thisPage.setGoodsTotal(chooseList);
// console.log(chooseList)
thisPage.setData({
goodsList: chooseList,
});
this.triggerEvent("confirm", chooseList);
this.setData({
show: false,
});
},
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.coupon-box {
width: calc(100% + var(--fontSize64));
height: 100%;
margin-left: calc(-1 * var(--fontSize32));
}
.coupon {
height: calc(100% - var(--fontSize104));
}
.box {
border-bottom: var(--fontSize2) solid #EBEDF0;
padding-left: var(--fontSize72);
}
.title {
padding: var(--fontSize18) 0 0 var(--fontSize32);
font-size: var(--fontSize32);
color: #333333;
height: var(--fontSize88);
box-sizing: border-box;
}
.text-center {
text-align: center;
}
.item {
border-top: var(--fontSize2) solid #EBEDF0;
height: var(--fontSize84);
display: flex;
align-items: center;
font-size: var(--fontSize28);
color: #888888;
position: relative;
}
.item.disabled {
color: #ccc;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.item .iconCoupon {
display: none;
width: var(--fontSize32);
height: var(--fontSize32);
position: absolute;
top: 50%;
left: calc(-1 * var(--fontSize52));
transform: translateY(-50%);
}
.item.active {
color: #347BFF;
}
.item.active .iconCoupon {
display: block;
}
.nothing {
padding: var(--fontSize100);
text-align: center;
color: #999;
}
.item {
justify-content: space-between;
padding-right: var(--fontSize32);
width: calc(100% - var(--fontSize130));
}
.title .tips {
font-size: var(--fontSize24);
color: #999999;
}
.item .value {
/* width: calc(100% - var(--fontSize180)); */
width: 100%;
display: flex;
/* flex-direction: ; */
justify-content: space-between;
}
.item .labelWidth {
width: calc(100% - var(--fontSize180));
/* display: flex; */
}
.item .value .name {
max-width: 85%;
width:calc(100vw - var(--fontSize100))
}
.item .value .name .warning_text {
color: #F24724;
margin-left: var(--fontSize10);
font-size: var(--fontSize22);
}
.item .value .textWidth {
max-width: 100%;
}
.item .value .last {
max-width: 15%;
}
.item .value .price {
color: #347BFF;
}
.item .control {
display: flex;
align-items: center;
}
.item .control .minus,
.item .control .add {
width: var(--fontSize44);
height: var(--fontSize44);
color: #347BFF;
background: #F7F7F7;
border-radius: var(--fontSize6);
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize32);
font-weight: 700;
}
.item .control .input {
width: var(--fontSize72);
height: var(--fontSize40);
text-align: center;
font-size: var(--fontSize28);
color: #333333;
margin: 0 var(--fontSize5);
}
.disableSelect {
opacity: 0.4;
}
.choose {
width: var(--fontSize32);
height: var(--fontSize32);
margin: 0 var(--fontSize32);
// position: absolute;
// top: 50%;
// left: calc(-1 * var(--fontSize52));
// transform: translateY(-50%);
.arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
}
.nothing {
padding: var(--fontSize100);
text-align: center;
color: #999;
}
.box {
padding-left: 0;
}
.itemBox {
display: flex;
align-items: center;
.item {
flex: 1;
}
}
\ No newline at end of file
<wxs src="index.wxs" module="filter" />
<popup show="{{show}}" title="选择商品" bindconfirm="confirm" bindcancel="cancel">
<view class="coupon-box">
<search-input bindsearch="searchGoods" value="{{keyWord}}" />
<scroll-view class="coupon" scroll-y>
<block wx:if="{{goodsList.length > 0}}">
<block wx:for="{{goodsList}}" wx:key="index">
<view class="title">
{{item.goodsTypeName}}
<text class="tips">|建议价</text>
</view>
<view class="box">
<view class="itemBox" wx:for="{{item.upgradeGoodsList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="choose" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<image src="{{filter.getImageSrc(i.active)}}" />
</view>
<view class="item {{minPrice?(minPrice/100)>= i.shopMinPrice ?'':'disableSelect':'' }}">
<view class="value {{i.active?'labelWidth':''}}" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<view class="name text-hide {{i.active?'textWidth':''}}">
<text>{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsInfo.goodsName)}}</text>
<text wx:if="{{i.merchantGoodsPosition && (i.goodsInfo.goodsType == 1 || i.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.positionStr+'」'}}</text>
<text class="warning_text" wx:if="{{!i.merchantGoodsPosition && (i.goodsInfo.goodsType == 1 || i.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text>
</view>
<view class="last" wx:if="{{!i.active}}">
<text class="price">¥{{i.upgradePrice}}</text>
</view>
</view>
<block wx:if="{{i.active}}">
<view class="control">
<view class="minus" catchtap="addCount" data-count="{{-1}}" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
-
</view>
<input type="number" catchtap="noScroll" class="input" value="{{i.count || 1}}" catchinput="input" data-index="{{index}}" data-ind="{{ind}}" />
<view class="add" catchtap="addCount" data-count="{{1}}" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
+
</view>
</view>
</block>
<!-- <view class=" choose" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<block wx:if="{{i.active}}">
<image src="../images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view> -->
</view>
</view>
</view>
</block>
</block>
<block wx:else>
<view class="nothing">暂无数据</view>
</block>
</scroll-view>
</view>
</popup>
\ No newline at end of file
var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g')
return item ? item.replace(reg, ' ') : ''
}
var getImageSrc = function (active) {
var baseImagePath = active ? './images/radio.png' : './images/radio_icon.png';
var timestamp = Date.now(); // 使用 Date.now() 获取当前时间戳
return baseImagePath + '?t=' + timestamp; // 使用字符串拼接
}
/*
* 导出
*/
module.exports = {
replaceItemText: replaceItemText,
getImageSrc: getImageSrc
}
......@@ -114,7 +114,7 @@ Page({
}
} else {
if (!successDate && !isErrorOrder && selectPayType != 0)
return wx.$util.showToast(selectPayType == 5 ? "请选择嘀加收款时间" : "请选择门店收款时间");
return wx.$util.showToast(selectPayType == 2 ? "请选择4S店收款时间" : "请选择嘀加收款时间");
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,9 +17,9 @@
<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="date-box-value">{{successDate || (orderInfo.selectPayType == 2?'请选择4S店收款时间':'请选择嘀加收款时间')}}</view>
<view class="handlerBtn" bind:tap="toshowDateModal">编辑</view>
</view>
<view class="box">
......@@ -38,7 +38,7 @@
<view class="title">商品</view>
<view class="meal-box" wx:for="{{orderInfo.packageGoodsList}}">
<view class="meal-hd">
<view>{{item.packageName}}</view>
<view>{{item.packageAlias||item.packageName}}</view>
<view class="price">¥{{item.totalPrice}}</view>
</view>
<view class="meal-bd">
......
......@@ -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,52 @@ Page({
// }, 3000)
},
// 开票
handleBtnInvoice() {
this.handleInvoiceDetail()
},
handleSelectInvoice() {
let { invoiveVisible } = this.data
this.setData({
invoiveVisible: !invoiveVisible
})
},
handleInvoiceDetail() {
let { orderInfo } = this.data
const params = {
orderCode: orderInfo.orderCode
}
wx.$util.showLoading()
commonApi.getOrderCode(params).then(res => {
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
// 开票成功、开票失败
wx.$router.go("tabWorkOrder.invoiceResult", {
obj: {
// code - 0000:成功;其他:失败
code: invoiceInfo.code,
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceIssueQrcode.createdDate,
imgUrl: invoiceInfo.imgUrl,
msg: invoiceInfo.msg
}
})
} else {
/**
* 未开发票
* invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。
* */
!invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", {
obj: invoiceIssueQrcode
})
}
}).finally(() => {
wx.$util.hideLoading()
})
},
previewImage(e) {
let { url, index } = e.currentTarget.dataset;
let urlList = url.map((v) => {
......@@ -822,7 +873,12 @@ Page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () { },
onPullDownRefresh: function () {
let { orderCode } = this.data
if(orderCode) {
this.getOrderDetail(orderCode)
}
},
/**
* 页面上拉触底事件的处理函数
......
{
"navigationBarTitleText": "完成施工",
"enablePullDownRefresh": true,
"usingComponents": {
"orderRatingPopup": "/tabWorkOrder/components/orderRatingPopup/orderRatingPopup"
"orderRatingPopup": "/tabWorkOrder/components/orderRatingPopup/orderRatingPopup",
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal"
}
}
......@@ -146,6 +146,25 @@ page {
align-items: center;
}
.flex {
display: flex;
}
.invoice-btn {
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #347BFF;
margin-left: 20rpx;
}
.invoice-btn .icon {
width: 32rpx;
height: 32rpx;
margin-right: 6rpx;
}
.box .title::after {
position: absolute;
content: '';
......
......@@ -104,7 +104,12 @@
</view>
<view class="box">
<view class="title infoTitle">
<text>工单信息</text>
<view class="flex">工单信息
<view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
</view>
<view class="operate" wx:if="{{ orderInfo.canOperate&&(isYqdSuper||isStaff)&&isMake }}">
<text bindtap="targetOperate">操作</text>
<view class="tip {{ showTip?'':'none' }}" bindtap="targetError">
......@@ -134,7 +139,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 +344,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;
}
......@@ -270,6 +277,7 @@ page {
}
.goods-box .goods .price {
color: #333333;
width: var(--fontSize240);
height: var(--fontSize64);
background: #FFFFFF;
......@@ -309,6 +317,7 @@ page {
.goods-box .goods .count {
min-width: var(--fontSize64);
color: #292D33;
}
.goods-box .total-box {
......@@ -554,4 +563,8 @@ page {
.closeIcon {
width: var(--fontSize32);
height: var(--fontSize32);
}
.alias{
font-size: 12px;
color: #222222!important;
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
"usingComponents": {
"car-brands": "/components/CarBrands/CarBrands",
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"goods": "/components/Goods/Goods",
"goods": "../GoodsPackage/Goods",
"customerInfo": "/components/CustomerInfo/CustomerInfo",
"sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant"
}
......
// tabWorkOrder/pages/invoiceCode/invoiceCode.js
import commonApi from '~/api/api'
Page({
/**
* 页面的初始数据
*/
data: {
codeInfo: {},
editFormData: [{
label: '销售方名称',
name: 'enterpriseName'
}, {
label: '开票金额',
name: 'invoiceAmount',
prefix: '¥'
}, {
label: '票通订单号',
name: 'tradeNo'
}, {
label: '生成时间',
name: 'tradeTime'
}, {
label: '二维码有效期',
name: 'expireTime'
}]
},
handleConfirm() {
let { codeInfo } = this.data
const params = {
orderCode: codeInfo.orderCode
}
wx.$util.showLoading()
commonApi.getOrderCode(params).then(res => {
console.log(res, 'res---')
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
// 开票成功、开票失败
wx.$router.redirectTo("tabWorkOrder.invoiceResult", {
obj: {
// code - 0000:成功;其他:失败
code: invoiceInfo.code,
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceIssueQrcode.createdDate,
imgUrl: invoiceInfo.imgUrl,
msg: invoiceInfo.msg
}
})
}
}).finally(() => {
wx.$util.hideLoading()
})
},
handleBack() {
wx.$router.back()
},
onRoute(res) {
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>{{item.prefix || ''}}{{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'
}]
},
toCopy(e) {
const { value } = e.currentTarget.dataset
wx.setClipboardData({
data: value.toString(),
success(res) {
wx.$util.showToast('已复制')
}
})
},
handleBack() {
wx.$router.back()
},
onRoute(res) {
this.setData({
info: JSON.parse(JSON.stringify(res.obj))
})
},
longpress() {
let { info } = this.data
this.triggerEvent('longtouch', info.imgUrl)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.hideShareMenu({
menus: ['shareAppMessage', 'shareTimeline']
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "查看发票",
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index"
}
}
\ 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 {
line-height: 40rpx;
display: flex;
align-items: flex-star;
font-size: 28rpx;
color: #222222;
border-bottom: 2rpx solide #000000;
margin-bottom: 16rpx;
}
.cell .label {
width: 112rpx;
margin-right: 48rpx;
}
.cell .txt {
width: calc(100% - 160rpx);
}
.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' }}" show z-index="99999">
<view class="wrapper">
<image show-menu-by-longpress bindlongpress="longpress" src="{{info.imgUrl}}" mode="widthFix" />
</view>
</van-overlay>
<view wx:else>
<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 class="txt">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>{{info[item.name] || ''}}
<image wx:if="{{ item.isCopy }}" catch:tap="toCopy" data-value="{{ info[item.name] }}" class="copy_icon" src="../../images/copy_name.png" />
</view>
</view>
<view class="tip">开票失败,请联系总部运营并提供工单编号及失败原因。</view>
</view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<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)
......@@ -175,7 +179,7 @@ Page({
this.getOrderDetail(options.orderCode)
this.setData({
orderCode: options.orderCode
orderCode: options.orderCode,
})
}
},
......@@ -220,7 +224,6 @@ Page({
}
},
async getOrderDetail(orderCode) {
console.log(orderCode)
let _this = this
let {
signatureSwitch,
......@@ -314,10 +317,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 +669,52 @@ Page({
// }, 3000)
},
// 开票
handleBtnInvoice() {
this.handleInvoiceDetail()
},
handleSelectInvoice() {
let { invoiveVisible } = this.data
this.setData({
invoiveVisible: !invoiveVisible
})
},
handleInvoiceDetail() {
let { orderInfo } = this.data
const params = {
orderCode: orderInfo.orderCode
}
wx.$util.showLoading()
commonApi.getOrderCode(params).then(res => {
let { invoiceInfo, invoiceIssueQrcode } = res.data
if (invoiceInfo) {
// 开票成功、开票失败
wx.$router.go("tabWorkOrder.invoiceResult", {
obj: {
// code - 0000:成功;其他:失败
code: invoiceInfo.code,
bizOrderCode: invoiceIssueQrcode.bizOrderCode,
invoiceAmount: invoiceIssueQrcode.invoiceAmount,
createdDate: invoiceIssueQrcode.createdDate,
imgUrl: invoiceInfo.imgUrl,
msg: invoiceInfo.msg
}
})
} else {
/**
* 未开发票
* invoiceIssueQrcode若存在,已开了开票二维码,无需选择发票类型;反之,需选。
* */
!invoiceIssueQrcode ? this.handleSelectInvoice() : wx.$router.go("tabWorkOrder.invoiceCode", {
obj: invoiceIssueQrcode
})
}
}).finally(() => {
wx.$util.hideLoading()
})
},
previewImage(e) {
let {
url,
......@@ -701,7 +752,12 @@ Page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () { },
onPullDownRefresh: function () {
let { orderCode } = this.data
if(orderCode) {
this.getOrderDetail(orderCode)
}
},
/**
* 页面上拉触底事件的处理函数
......
{
"navigationBarTitleText": "工单详情",
"enablePullDownRefresh": true,
"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 || orderInfo.invoiceStatus == 2}}" 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);
......
{
"navigationBarTitleText": "客户签字",
"enablePullDownRefresh": true,
"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 || orderInfo.invoiceStatus == 2}}" 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: [
{
......
......@@ -35,5 +35,4 @@ module.exports = {
return api.post("dj.api.smartcarlife.staff.dailyReportConfig.update", data);
},
};
};
\ No newline at end of file
......@@ -10,6 +10,9 @@ Component({
// 属性名 在wxml调用组件时利用该属性传递组件显示的数据
type: Object, // 类型(必填),目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型)
value: '' // 属性初始值(可选),如果未指定则会根据类型选择一个
},
index: {
type: Number
}
// weeklyList: {
// type: Array,
......
......@@ -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!