Commit eefe7407 by cen

feat: 新增补录弹窗

1 parent 61a3b6c0
......@@ -131,12 +131,20 @@ module.exports = {
...data
})
},
/**补录订单 */
/**补录订单数 */
waitinputorder(data) {
return http.post({
method: 'dj.api.smartcarlife.weapp.waitinputorder.count',
projectName: 'boutique',
...{ ...data, inputStatus: 0 }
})
},
/**交易流水号 */
transactionSerialNumber(data) {
return http.post({
method: 'dj.api.smartcarlife.weapp.waitinputorder.page',
projectName: 'boutique',
...data
})
}
}
......@@ -35,4 +35,29 @@
font-size: toRpx(32);
color: #1a1a1a;
}
}
\ No newline at end of file
}
.flex {
display: flex;
}
.justify-between {
-webkit-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
.align-center {
align-items: center;
}
.justify-center {
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
.flex-wrap {
-ms-flex-wrap: wrap;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
<!--针对弹窗穿透滚动,统一封装的popup-->
<template>
<page-meta :page-style="'overflow:' + (show ? 'hidden' : 'visible')"></page-meta>
<uni-popup :class="popupClass" ref="publishPopup" :type="type" @change="change" :is-mask-click="isMaskClick" :safe-area="safeArea" :showClose="showClose">
<!-- 顶部标题栏插槽 -->
<slot name="header">
<view class="popup-top-box flex justify-between align-center">
<text></text>
<text>{{ title }}</text>
<uni-icons @click="closePopup" class="icon-close" type="closeempty"></uni-icons>
</view>
</slot>
<!-- 主要内容插槽 -->
<slot name="content"></slot>
<!-- 底部插槽 -->
<slot name="footer"></slot>
</uni-popup>
</template>
<script>
export default {
name: 'PublishPopup',
props: {
type: {
type: String,
default: 'bottom'
},
isMaskClick: {
type: Boolean,
default: true
},
safeArea: {
type: Boolean,
default: true
},
popupClass: {
type: String,
default: ''
},
showClose: {
type: Boolean,
default: true
},
title: {
type: String,
default: ''
}
},
data() {
return {
show: false
}
},
methods: {
open() {
this.$refs.publishPopup.open()
},
change(e) {
this.show = e.show
},
closePopup() {
this.$refs.publishPopup.close()
this.$emit('close')
}
}
}
</script>
<style scoped lang="scss">
.popup-top-box {
color: #333333;
font-size: toRpx(36);
font-weight: 500;
text-align: center;
padding: toRpx(32) toRpx(52);
}
.justify-between {
-webkit-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
.align-center {
align-items: center;
}
.uniui-closeempty {
color: #1a1a1a;
font-size: toRpx(24);
font-weight: 600;
}
</style>
......@@ -179,7 +179,6 @@ export default {
padding: toRpx(8);
font-size: toRpx(24);
font-weight: 500;
font-family: 'HarmonyOSSansSC';
border-radius: toRpx(4);
border: toRpx(1) solid transparent;
}
......@@ -208,14 +207,12 @@ export default {
font-size: toRpx(24);
color: #999ea8;
font-weight: 400;
font-family: 'HarmonyOSSansSC';
}
.order-value {
font-size: toRpx(24);
color: #666666;
font-weight: 400;
font-family: 'HarmonyOSSansSC';
.split {
margin: 0 toRpx(6);
}
......@@ -233,14 +230,12 @@ export default {
font-size: toRpx(24);
color: #999ea8;
font-weight: 400;
font-family: 'HarmonyOSSansSC';
}
.payType-value {
font-size: toRpx(24);
color: #666666;
font-weight: 400;
font-family: 'HarmonyOSSansSC';
}
}
......@@ -254,7 +249,6 @@ export default {
margin-right: toRpx(24);
font-size: toRpx(24);
font-weight: 400;
font-family: 'HarmonyOSSansSC';
color: #999ea8;
}
......@@ -264,7 +258,6 @@ export default {
color: #4673ff;
font-size: toRpx(36);
font-weight: 700;
font-family: 'D-DIN-PRO';
}
}
......@@ -278,7 +271,6 @@ export default {
margin-right: toRpx(8);
font-size: toRpx(28);
font-weight: 700;
font-family: 'D-DIN-PRO';
}
.construction-staff {
......@@ -290,14 +282,12 @@ export default {
margin-right: toRpx(24);
font-size: toRpx(24);
font-weight: 400;
font-family: 'HarmonyOSSansSC';
color: #999ea8;
}
.staff-value {
font-size: toRpx(24);
color: #666666;
font-weight: 400;
font-family: 'HarmonyOSSansSC';
}
}
......@@ -307,13 +297,12 @@ export default {
opacity: 1;
border-bottom: toRpx(2) solid #f7f7f6;
background: #f5f7fa;
margin-top: toRpx(20);
margin: toRpx(20) 0;
padding: toRpx(20) toRpx(32);
.goods {
color: #333333;
font-size: toRpx(28);
font-weight: 400;
font-family: 'HarmonyOSSans';
padding-top: toRpx(12);
.goods-name {
.point {
......@@ -331,7 +320,6 @@ export default {
color: #4673ff;
font-size: toRpx(24);
font-weight: 400;
font-family: 'HarmonyOSSansSC';
text-align: right;
margin-top: toRpx(12);
}
......
......@@ -21,23 +21,143 @@
<z-paging ref="paging" :fixed="false" paging-class="paging-class px-48" :loading-full-fixed="false" :auto-show-system-loading="true" :show-scrollbar="false" v-model="dataList" @query="queryList" :default-page-size="10">
<OrderCard v-for="(item, index) in dataList" :key="index" :orderCardDetail="item" @toggle-goods-list="handleToggleGoodsList"></OrderCard>
</z-paging>
<PublishPopup ref="WaitinputorderPopup" popupClass="waitinputorderPopup" :showClose="true" title="选择交易参考号">
<template #content>
<view class="popup-content px-48">
<view class="waitinputorder-tab-container">
<view class="waitinputorder-tab-buttons">
<view v-for="(item, index) in waitinputorderTabList" :key="index" class="waitinputorder-tab-button" :class="{ active: activeIndex === index }" @click="tabChange(index)">
<text>{{ item.name }}</text>
<view v-if="item.showQuestion" class="question-icon" @click="showQuestionPopup()">
<uni-icons type="help" size="16" color="#999"></uni-icons>
</view>
</view>
</view>
</view>
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="true" v-show="activeIndex === 0" @scrolltolower="pageonReachBottom">
<view v-if="normalOrderNoList.length > 0" class="order-gap">
<view v-for="(item, index) in normalOrderNoList" :key="index" class="order_no_item">
<view class="message">
<view v-for="(subItem, idx) in itemFormObj" :key="idx" class="item flex align-center">
<view class="label">{{ subItem.label }}</view>
<view v-if="subItem.type === 'price'" class="value price_value">¥{{ priceFilter(item[subItem.prop]) }}</view>
<view v-else-if="subItem.type === 'select'" class="select_value" @click="selectTap(index)" :data-index="index">
<text class="text-hide">{{ filmOrderData[item.filmOrder] }}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
<view v-else class="value flex align-center">
{{ subItem.type === 'time' ? formatDate(item[subItem.prop]) : item[subItem.prop] }}
<view v-if="subItem.type === 'copy'" class="copy-btn" @click="copyText">
<view class="sprite-icon icon-icon-copy copy"></view>
复制
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="true" v-show="activeIndex === 1" @scrolltolower="pageonReachBottom">
<view v-if="abnormalOrderNoList.length > 0" class="order-gap">
<view v-for="(item, index) in abnormalOrderNoList" :key="index" class="order_no_item">
<view class="message">
<view v-for="(subItem, idx) in itemFormObj" :key="idx" class="item flex align-center">
<view class="label">{{ subItem.label }}</view>
<view v-if="subItem.type === 'price'" class="value price_value">¥{{ priceFilter(item[subItem.prop]) }}</view>
<view v-else-if="subItem.type === 'select'" class="select_value" @click="selectTap(index)" :data-index="index">
<text class="text-hide">{{ filmOrderData[item.filmOrder] }}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
<view v-else class="value flex align-center">
{{ subItem.type === 'time' ? formatDate(item[subItem.prop]) : item[subItem.prop] }}
<view v-if="subItem.type === 'copy'" class="copy-btn" @click="copyText">
<view class="sprite-icon icon-icon-copy copy"></view>
复制
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<template #footer>
<view class="footer-box flex justify-center">
<view class="cancle-btn btn">取消</view>
<view class="sure-btn btn">确认</view>
</view>
</template>
</PublishPopup>
<PublishPopup ref="abnormalTipsPopup" popupClass="abnormalTipsPopup" :showClose="true" title="超分账期">
<template #content>
<scroll-view scroll-y class="ul px-48">
<view class="title">字段定义</view>
<view class="li">○ 正常分账期:指客户付款后,未超过分账期 (一般指支付时间≤20日),驻店未在系统补录或特殊情况下需运营在后台关联订单的交易流水号。</view>
<view class="li last">○ 超分账期:指客户付款后,超过分账期 (一般指支付时间>20日),驻店未在系统补录或特殊情况下需运营在后台关联订单的交易流水号。</view>
<view class="title">操作指导</view>
<view class="li">① 补录订单:支持正常分账期或超分账期单笔或多笔流水补录1个订单</view>
<view class="li">情况一:单笔支付直接补录创建工单</view>
<view class="li last">情况二:客户多笔支付,补录工单时勾选多笔交易流水</view>
<view class="li">② 特殊情况:需通知运营在后台关联工单</view>
<view class="li">情况一:客户支付定金时间与尾款时间间隔20天以上</view>
<view class="li">情况二:客户购买车辆2台及以上的费用,一笔支付</view>
<view class="li last">情况三:支付费用时误操作(多付了)需部分退款</view>
<view class="li last">操作流程:驻店在小程序点击新建工单,收款方选择嘀加收款,收款方式选择其它收款,复制交易流水号(填写时流水号末尾加逗号,多笔交易流水号中间用逗号隔开),工单录完后通知线上运营在后台关联。</view>
</scroll-view>
</template>
</PublishPopup>
</view>
</template>
<script>
import order_mixins from '../../order_mixins.js'
import { interceptionMixin } from '@/mixin/index'
import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin'
import OrderCard from '../../components/OrderCard'
import PublishPopup from '@/components/PublishPopup.vue'
import dayjs from 'dayjs'
import utils from '@/utils/utils'
export default {
name: 'OrderManagement',
mixins: [ZPMixin],
mixins: [ZPMixin, interceptionMixin],
components: {
OrderCard
OrderCard,
PublishPopup
},
data() {
return {
itemFormObj: [
{
label: '交易参考号',
prop: 'tradeNo',
type: 'copy'
},
{
label: '支付时间',
prop: 'accountDate',
type: 'time'
},
{
label: '支付金额',
prop: 'totalFee',
type: 'price'
},
{
label: '商户名称',
prop: 'shopMerchantName'
}
],
tabList: [
{ tabName: '全部', num: 0 },
{ tabName: '待跟进', num: 0 },
......@@ -45,6 +165,11 @@ export default {
{ tabName: '战败', num: 0 }
],
tabIndex: 0,
waitinputorderTabList: [
{ name: '正常分账期', showQuestion: false },
{ name: '超分账期', showQuestion: true }
],
activeIndex: 0,
keyword: '',
searchObj: {},
dataList: [],
......@@ -57,6 +182,12 @@ export default {
type: 2,
typeText: '补录订单'
},
normalOrderNoList: [],
abnormalOrderNoList: [],
abnormalCurrentPage: 1,
normalCurrentPage: 1,
abnormalPages: 1,
normalPages: 1,
...order_mixins.data
}
},
......@@ -77,8 +208,10 @@ export default {
this.$refs.paging.reload()
this.getStatByStatus()
},
waitinputorderClick() {
console.log('waitinputorderClick')
async waitinputorderClick() {
if (await this.inspectionOfProhibitionBill()) return
this.getTransactionSerialNumber()
this.$refs.WaitinputorderPopup.open()
},
handleToggleGoodsList(data) {
this.$set(data.item, 'showAllGoodsListFlag', data.flag)
......@@ -88,6 +221,10 @@ export default {
delete this.searchObj.statusList
this.search()
},
tabChange(index) {
this.activeIndex = index
this.getTransactionSerialNumber()
},
getStatByStatus() {
uni.$api.boutiqueApi
.statByStatus({
......@@ -105,6 +242,33 @@ export default {
console.log(err)
})
},
pageonReachBottom() {
if (this.activeIndex === 0) {
if (this.normalPages == this.normalCurrentPage) return uni.showToast({ title: '列表已到底', icon: 'none' })
this.normalCurrentPage += 1
} else {
if (this.abnormalPages == this.abnormalCurrentPage) return uni.showToast({ title: '列表已到底', icon: 'none' })
this.abnormalCurrentPage += 1
}
this.getTransactionSerialNumber()
},
getTransactionSerialNumber() {
uni.$api.boutiqueApi
.transactionSerialNumber({ currentPage: this.activeIndex === 0 ? this.normalCurrentPage : this.abnormalCurrentPage, pageSize: 10, inputOrderType: this.activeIndex + 1, inputStatus: 0 })
.then(result => {
if (this.activeIndex == 0) {
this.normalOrderNoList = [...this.normalOrderNoList, ...result.list]
this.normalPages = result.pages
} else {
this.abnormalOrderNoList = [...this.abnormalOrderNoList, ...result.list]
this.abnormalPages = result.pages
}
})
.catch(err => {
console.log(err)
})
},
queryList(pageNo, pageSize) {
let obj = {
keyword: this.keyword,
......@@ -221,12 +385,34 @@ export default {
clearInterval(this.waitOrderTimer)
this.waitOrderTimer = null
}
},
// 价格过滤器
priceFilter(num) {
var pow = Math.pow(10, 2)
return (Math.round((num / 100) * pow) / pow).toFixed(2)
},
formatDate(time) {
return dayjs(time).format('YYYY-MM-DD HH:mm:ss')
},
// 选择点击事件
selectTap(index) {
this.$emit('select-tap', index)
},
// 复制订单号
copyOutTradeNo(item) {
this.$emit('copy-out-trade-no', item)
},
showQuestionPopup() {
this.$refs.abnormalTipsPopup.open()
}
}
}
</script>
<style scoped lang="scss">
<style lang="scss" scope>
.order-management {
height: 100%;
.paging-class {
......@@ -235,6 +421,7 @@ export default {
.px-48 {
padding: 0 toRpx(48);
}
.search-box {
padding: toRpx(40) toRpx(48) toRpx(24);
position: relative;
......@@ -307,7 +494,6 @@ export default {
margin-left: toRpx(4);
font-size: toRpx(20);
font-weight: 500;
font-family: 'HarmonyOSSansSC';
}
}
......@@ -339,10 +525,151 @@ export default {
color: #4673ff;
font-size: toRpx(24);
font-weight: 500;
font-family: 'HarmonyOSSansSC';
text-align: center;
line-height: toRpx(50);
}
}
.waitinputorderPopup .popup-content {
.waitinputorder-tab-container {
width: toRpx(488);
border-radius: toRpx(64);
opacity: 1;
background: #f5f7fa;
}
.waitinputorder-tab-buttons {
display: flex;
background-color: #f5f5f5;
border-radius: 24rpx;
overflow: hidden;
margin-bottom: 20rpx;
}
.waitinputorder-tab-button {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: toRpx(28);
font-weight: 500;
color: #333;
position: relative;
width: toRpx(236);
height: toRpx(56);
border-radius: toRpx(40);
&.active {
background-color: #000;
color: #fff;
}
.question-icon {
margin-left: 8rpx;
opacity: 0.6;
}
}
}
.order_no_box {
height: calc(67vh - #{toRpx(364)});
.order-gap {
display: grid;
grid-template-columns: 1fr 1fr;
gap: toRpx(36);
}
.order_no_item {
border-radius: toRpx(16);
opacity: 1;
border: toRpx(2) solid #dce0e6;
padding: toRpx(24) toRpx(32);
background: #f5f7fa;
.message {
.item {
margin-bottom: toRpx(12);
}
.label {
color: #999ea8;
font-size: toRpx(24);
font-weight: 400;
width: toRpx(120);
margin-right: toRpx(24);
}
.value {
color: #333333;
font-size: toRpx(24);
font-weight: 400;
}
}
}
.copy-btn {
display: flex;
align-items: center;
margin-left: auto;
color: #808291;
.copy {
margin-right: toRpx(8);
margin-left: toRpx(20);
}
}
}
.footer-box {
width: 100%;
height: toRpx(164);
background-color: #fff;
.btn {
width: 30%;
height: toRpx(80);
border-radius: toRpx(48);
opacity: 1;
line-height: toRpx(80);
text-align: center;
color: #333333;
font-size: toRpx(32);
font-weight: 500;
}
.cancle-btn {
background: #f0f1f5;
}
.sure-btn {
color: #fff;
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
margin-left: toRpx(32);
}
}
}
::v-deep .waitinputorderPopup .uni-popup__wrapper {
border-radius: toRpx(32) toRpx(32) 0 0;
opacity: 1;
width: 100%;
height: 67vh;
background-color: #fff !important;
}
::v-deep .abnormalTipsPopup .uni-popup__wrapper {
border-radius: toRpx(32) toRpx(32) 0 0;
opacity: 1;
width: 100%;
height: 51vh;
background-color: #fff !important;
.ul {
height: 100%;
.title {
font-weight: 600;
font-size: toRpx(26);
color: #282829;
margin-bottom: toRpx(8);
}
.li {
font-size: toRpx(26);
color: #282829;
margin-bottom: toRpx(8);
}
.last {
margin-bottom: toRpx(32);
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!