Commit 1179975f by 李伟康

commit 数字报价单

1 parent e6ef74ff
......@@ -2,7 +2,7 @@
<scroll-view class=" scroll" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}">
<block wx:for="{{tabList}}" wx:key="index">
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}" id="to-{{index}}">
<text id="tab-{{index}}" class="tab-text">
<text id="tab-{{index}}">
<text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">({{item.count}})</text>
</text>
</view>
......
......@@ -48,18 +48,15 @@
font-size: var(--fontSize28);
text-align: center;
position: relative;
padding: 0 var(--fontSize10);
}
.scroll .active .tab-text {
position: relative;
}
.scroll .active .tab-text::after {
.scroll .active::after {
position: absolute;
bottom: calc(-1 * var(--fontSize16));
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 100%;
width: 64rpx;
height: var(--fontSize4);
background-color: #347BFF;
content: '';
......
{
"component": true,
"usingComponents": {
"store-select-popup": "/components/StoreSelectPopup/StoreSelectPopup"
}
}
\ No newline at end of file
<!--pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxml-->
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight}}px);margin-top:{{navBarHeight}}px;"
hidden="{{!show}}">
<view class="main" style="padding-bottom:{{btnHeight}}px">
<!-- 非超管转化人员 -->
<view class="box" wx:if="{{!userInfo.isSuper}}">
<view class="title">
<view class="title-left">
转化人员
<view class="title-tips" wx:if="{{!userInfo.isSuper}}">{{userInfo.merchantName}}</view>
</view>
<view wx:if="{{form.transferIds.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<block wx:for="{{form.transferIds}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose"
data-list-name="transferIds" data-index="{{index}}" hidden="{{index >= 12 && !employShowMore}}">
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</view>
</view>
<!-- 超管转化人员 选择园区店 -->
<view class="box" wx:if="{{userInfo.isSuper}}">
<view class="title">
<view class="title-left">
转化人员
</view>
<view wx:if="{{form.selectedYqMerchantList.length > 3}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<view class="item text-center {{!form.selectedYqMerchantList.length?'active':''}}" bindtap="yqMerchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="1">自定义</view>
<block wx:for="{{form.selectedYqMerchantList}}" wx:key="index">
<view class="item active flex-1" bindtap="choose"
data-list-name="selectedYqMerchantList" data-index="{{index}}" hidden="{{index >= 3 && !employShowMore}}">
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view>
</view>
</block>
</view>
</view>
<!-- 非超管销售顾问 -->
<view class="box" wx:if="{{!userInfo.isSuper}}">
<view class="title">
<view class="title-left">
销售顾问
<view class="title-tips" wx:if="{{!userInfo.isSuper}}">{{userInfo.shopMerchantName}}</view>
</view>
<view wx:if="{{form.referrerIds.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<block wx:for="{{form.referrerIds}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="referrerIds"
data-index="{{index}}" hidden="{{index >= 12 && !salesmanShowMore}}">
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</view>
</view>
<!-- 超管销售顾问 选择4s店 -->
<view class="box" wx:if="{{userInfo.isSuper}}">
<view class="title">
<view class="title-left">
销售顾问
<view class="title-tips" wx:if="{{!userInfo.isSuper}}">{{userInfo.shopMerchantName}}</view>
</view>
<view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<view class="item text-center {{!form.selectedMerchantList.length?'active':''}}" bindtap="merchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="2">自定义</view>
<block wx:for="{{form.selectedMerchantList}}" wx:key="index">
<view class="item active flex-1" bindtap="choose"
data-list-name="selectedMerchantList" data-index="{{index}}" hidden="{{index >= 3 && !salesmanShowMore}}">
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view>
</view>
</block>
</view>
</view>
<view class="box">
<view class="title">
订单时间
</view>
<view class="list-box">
<block wx:for="{{form.orderTimeList}}" wx:key="index">
<block wx:if="{{item.type}}">
<calendar allowSameDay shortcut bindselect='rangeSelect' id="orderCalendar" data-index="{{index}}" data-name="orderTimeList" dateType='range' calenderColor='#347BFF'
vertical minDate="2020-10-01" maxDate="{{maxDate}}" isComponents>
</calendar>
<view style="display: flex;align-items: center;width: 100%;">
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.orderStartDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.orderStartDate || '开始时间'}}</view>-
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.orderEndDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.orderEndDate || '结束时间'}}</view>
</view>
</block>
<block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderTimeList"
data-index="{{index}}">{{item.name}}</view>
</block>
</block>
</view>
</view>
<view class="box">
<view class="title">
支付时间
</view>
<view class="list-box">
<block wx:for="{{form.payTimeList}}" wx:key="index">
<block wx:if="{{item.type}}">
<calendar allowSameDay shortcut bindselect='rangeSelect' data-index="{{index}}" id="payCalendar" data-name="payTimeList" dateType='range' calenderColor='#347BFF'
vertical minDate="2020-10-01" maxDate="{{maxDate}}" isComponents>
</calendar>
<view style="display: flex;align-items: center;width: 100%;">
<view bindtap="showCalendar" data-type="show" data-target="showPay" class="item custom-time text-center {{!item.payStartDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.payStartDate || '开始时间'}}</view>-
<view bindtap="showCalendar" data-type="show" data-target="showPay" class="item custom-time text-center {{!item.payEndDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.payEndDate || '结束时间'}}</view>
</view>
</block>
<block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="payTimeList"
data-index="{{index}}">{{item.name}}</view>
</block>
</block>
</view>
</view>
<view class="box">
<view class="title">
订单状态
</view>
<view class="list-box">
<block wx:for="{{form.orderStatus}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose"
data-list-name="orderStatus" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
<view class="box">
<view class="title">
支付方式
</view>
<view class="list-box">
<block wx:for="{{form.payType}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="payType"
data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
</view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn clear text-center" bindtap="reset">清除</view>
<view class="btn done text-center" bindtap="confirm">确定</view>
</view>
</scroll-view>
<store-select-popup show="{{showStoreSelectPopup}}" type="{{storeType}}" bindconfirm="storeConfirm" bindcancel="hideStorePopup" selectedData="{{storeType == 1 ? form.selectedYqMerchantList || [] : form.selectedMerchantList || []}}"></store-select-popup>
/* pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxss */
.confirm-box {
position: fixed;
top: 0;
z-index: 10;
height: 100vh;
width: 100%;
box-sizing: border-box;
background-color: #fff;
animation: show-confirm-box .5s forwards;
}
@keyframes show-confirm-box {
0%{
right: -100%;
}
100%{
right: 0;
}
}
.box {
margin: 0 var(--fontSize32);
}
.box .title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
color: #292D33;
padding: var(--fontSize34) 0 var(--fontSize30);
position: sticky;
left: 0;
top: 0;
background: #fff;
z-index: 2;
}
.box .title .title-left{
display: flex;
align-items: flex-end;
}
.box .title .title-tips{
font-size: var(--fontSize22);
font-weight: 400;
color: #757980;
margin-left: var(--fontSize8);
}
.box .title .collapse-btn{
width: var(--fontSize48);
height: var(--fontSize48);
}
.box .title .collapse-btn.rotate-180{
transform: rotate(180deg);
}
.box .list-box {
display: flex;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
flex-wrap: wrap;
padding-bottom: var(--fontSize20);
}
.box .list-box .item {
/* width: var(--fontSize214); */
width: calc(234 / 750 * 100%);
min-height: var(--fontSize68);
border-radius: var(--fontSize4);
box-sizing: border-box;
border: var(--fontSize2) solid transparent;
padding: var(--fontSize16) var(--fontSize33);
flex-wrap: wrap;
font-size: var(--fontSize24);
text-align: center;
background-color: #F7F8FA;
color: #292D33;
transition: all .2s;
margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0;
}
.box .list-box .item .text-item{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.box .list-box .item.flex-1{
width: 100%;
text-align: left;
margin-right: 0;
line-height: 100%;
}
.box .list-box .item.grey{
color: #999EA8;
}
.box .list-box .item.custom-time{
/* width: var(--fontSize316); */
width: calc(316 / 750 * 100%);
margin-bottom: 0;
}
.box .list-box .item.custom-time:last-child{
margin-right: 0;
margin-left: var(--fontSize20);
}
.box .list-box .item:nth-of-type(3n+3) {
margin-right: 0;
}
.box .list-box .calendar .item {
margin-right: 0;
}
.box .list-box .item.active {
background: rgba(53, 130, 238, 0.08);
border: var(--fontSize2) solid #347BFF;
color: #347BFF;
}
.box .list-box .item.disabled {
opacity: .4;
}
.box .list-box .item .inline-block{
display: inline-block;
}
.box .list-box .item .merchant-name{
max-width: calc(100% - var(--fontSize140));
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.btn-box {
position: sticky;
padding: var(--fontSize10) var(--fontSize32);
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize28);
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 9;
background-color: #fff;
}
.btn-box .btn {
border-radius: var(--fontSize12);
border: var(--fontSize2) solid #0075F9;
box-sizing: border-box;
height: var(--fontSize80);
}
.btn-box .btn.clear {
border: var(--fontSize2) solid #DEE0E3;
width: var(--fontSize186);
color: #292D33;
}
.btn-box .btn.done {
background: #347BFF;
color: #fff;
width: var(--fontSize480);
}
.isFullSucreen-btn {
padding-bottom: var(--fontSize68);
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file
......@@ -7,29 +7,41 @@ const orderStatusObj = {
'4': '已支付',
'5': '已完成',
'-1': '战败',
'9':'已撤销',
'11':'已失效',
'9': '已撤销',
'11': '已失效',
'6': '已退款'
}
const orderStatusList = [{
confName: '待报价',
confId: '0'
}, {
confName: '待确认',
confId: '1'
}, {
confName: '待支付',
confId: '2'
}, {
confName: '已支付',
confId: '3'
}, {
confName: '已完成',
confId: '5'
}, {
confName: '战败',
confId: '-1'
}]
confName: '待报价',
confId: '0'
}, {
confName: '待确认',
confId: '1'
}, {
confName: '待支付',
confId: '2'
}, {
confName: '已支付',
confId: '3'
}, {
confName: '已完成',
confId: '5'
}, {
confName: '已退款',
confId: '6'
},
{
confName: '已撤销',
confId: '9'
},
{
confName: '错误订单',
confId: '11'
}, {
confName: '战败',
confId: '-1'
}
]
export default {
orderStatusObj,
......
......@@ -36,43 +36,51 @@ Component({
IMG_URL2,
showIcon1: true, // 初始显示图标
orderObj: [{
label: '车架号',
key: 'carVin'
},
{
label: '购买商品',
key: 'goodsNameAlias',
otherKey: 'goodsName'
},
{
label: '工单编号',
key: 'payId'
},
{
label: '交易流水号',
key: 'transactionNo',
canCopy: true
},
{
label: '拒升原因',
key: 'remark'
},
{
label: '支付时间',
key: 'payTime'
},
{
label: '创建时间',
key: 'createdTime'
},
{
label: '支付方式',
key: 'payType',
mapValue: {
1: '线上支付',
2: '门店收款'
}
},
label: '销售顾问',
arr: ['merchantName', 'referrerName']
},
{
label: '转化人员',
arr: ['parkMerchantName', 'transferName']
},
{
label: '车架号',
key: 'carVin'
},
{
label: '购买商品',
key: 'goodsNameAlias',
otherKey: 'goodsName'
},
{
label: '工单编号',
key: 'payId'
},
{
label: '交易流水号',
key: 'transactionNo',
canCopy: true
},
{
label: '拒升原因',
key: 'remark'
},
{
label: '支付时间',
key: 'payTime'
},
{
label: '创建时间',
key: 'createdTime'
},
{
label: '支付方式',
key: 'payType',
mapValue: {
1: '线上支付',
2: '门店收款'
}
},
],
// statisticsObj: {},
btnTxt: {
......@@ -89,7 +97,7 @@ Component({
tabIndex: 0,
nothing: false,
orderStatusObj: data.orderStatusObj,
// 0待报价、1待确认、2待支付、3已支付、4已完成、-1战败
// 0待报价、1待确认、2待支付、3已支付、4已完成、-1战败 '已撤销','错误订单','已退款'
tabListNor: ['全部', '待报价', '待确认', '待支付', '已支付', '已完成', '战败'],
tabListSimple: ['全部', '待报价', '待支付', '已支付', '已完成', '战败'],
tabList: ['全部', '待报价', '待确认', '待支付', '已支付', '已完成', '战败'],
......@@ -108,7 +116,7 @@ Component({
},
observers: {
'mode': function (value) {
// console.log(value,'mode');
console.log(value, 'mode');
let {
tabListNor,
tabListSimple
......@@ -244,12 +252,14 @@ Component({
let {
pageSize,
currentPage,
tabList,
tabIndex,
orderStatus,
customerName,
storeInfo,
nothing
} = this.data
} = this.data, {
screenForm
} = this
if (!screenForm) screenForm = {}
if (nothing) {
return
}
......@@ -257,8 +267,9 @@ Component({
pageSize,
currentPage,
customerName,
orderStatus: constantData.orderStatusList.find(item => item.confName == tabList[tabIndex].text)?.confId || '',
merchantId: storeInfo?.merchantId
orderStatus,
merchantId: storeInfo?.merchantId,
...screenForm
}
quotationPage(params).then(res => {
if (res.code == '0') {
......@@ -324,12 +335,14 @@ Component({
// 首次进入会触发该方法,因此不需要在attached调getList
tabClick(e) {
let {
searchObj
} = this.data
delete searchObj.statusList
tabList
} = this.data,
orderStatus = ''
const tabIndex = e?.detail || 0
if (tabIndex) orderStatus = constantData.orderStatusList.find(item => item.confName == tabList[tabIndex].text)?.confId || ''
this.setData({
tabIndex: e?.detail,
searchObj
tabIndex,
orderStatus
})
this.search()
},
......@@ -450,8 +463,8 @@ Component({
let merchantIds = []
merchantIds.push(storeInfo?.merchantId)
orderStatistics({
merchantIds
})
merchantIds
})
.then(result => {
let {
data,
......@@ -585,7 +598,9 @@ Component({
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI)
},
toConfirmReturanOrder(e) {
const { id } = e.currentTarget.dataset
const {
id
} = e.currentTarget.dataset
let _this = this
wx.showModal({
title: '',
......@@ -602,7 +617,9 @@ Component({
})
},
toCopyNumber(e) {
let { ordernum } = e.currentTarget.dataset
let {
ordernum
} = e.currentTarget.dataset
ordernum = ordernum.replace(/,$/, "")
wx.setClipboardData({
data: ordernum.toString(),
......@@ -613,7 +630,9 @@ Component({
},
repeal(id) {
let _this = this
cancelOrderById({ id }).then(_res_ => {
cancelOrderById({
id
}).then(_res_ => {
let {
code,
message
......@@ -632,7 +651,9 @@ Component({
})
},
toshowErrorOrder(e) {
const { item } = e.currentTarget.dataset
const {
item
} = e.currentTarget.dataset
this.setData({
showErrorId: item.payId
}, () => {
......@@ -652,5 +673,32 @@ Component({
})
})
},
back() {
this.setData({
show_confirm: false
})
},
showConfirm() {
this.setData({
show_confirm: true
})
},
searchScreen(e) {
const {
tabList
} = this.data
let tabIndex = 0
this.back()
this.screenForm = e.detail
if (e.detail.orderStatus) {
let name = constantData.orderStatusList.find(item => item.confId == e.detail.orderStatus)?.confName
tabIndex = tabList.findIndex(item => item.text == name)
if(tabIndex == -1) tabIndex = 0
}
this.setData({
tabIndex
})
this.search()
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
"usingComponents": {
"order-screen": "../components/OrderScreen/OrderScreen"
}
}
\ No newline at end of file
......@@ -60,7 +60,7 @@
</view>
</view>
<view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" scroll />
<tab-bar tabList="{{tabList}}" bindclick="tabClick" scroll activeIndex="{{tabIndex}}" />
</view>
</view>
<!-- <view class="total-box">
......@@ -127,11 +127,25 @@
<view class="order" wx:else>
<view class="order-label">{{i.label}}</view>
<view class="order-value ">
<view class="text-hide {{i.canCopy&&item[i.key]? 'text-hideWidth' : '' }}">
<block wx:if="{{i.mapValue}}">{{i.mapValue[item[i.key]] || ''}}</block>
<block wx:else>{{item[i.key]|| item[i.otherKey]|| ''}}</block>
</view>
<image wx:if="{{i.canCopy&&item[i.key]}}" catch:tap="toCopyNumber" data-ordernum="{{item[i.key]}}" class="copy_icon" src="../../../images/copy_name.png" />
<block wx:if="{{i.arr}}">
<block wx:if="{{item[i.arr[1]]}}">
<block wx:for="{{i.arr}}" wx:key="sindex" wx:for-index="arr_index" wx:for-item="k">
<view class="order-value-item text-hide">
<block wx:if="{{arr_index == 1}}">
<text class="split">|</text>
</block>
{{item[k]}}
</view>
</block>
</block>
</block>
<block wx:else>
<view class="text-hide {{i.canCopy&&item[i.key]? 'text-hideWidth' : '' }}">
<block wx:if="{{i.mapValue}}">{{i.mapValue[item[i.key]] || ''}}</block>
<block wx:else>{{item[i.key]|| item[i.otherKey]|| ''}}</block>
</view>
<image wx:if="{{i.canCopy&&item[i.key]}}" catch:tap="toCopyNumber" data-ordernum="{{item[i.key]}}" class="copy_icon" src="../../../images/copy_name.png" />
</block>
</view>
</view>
</block>
......@@ -263,4 +277,8 @@
,并补录新工单以提供线下核对。
</view>
</view>
</modal>
\ No newline at end of file
</modal>
<page-container show="{{show_confirm}}" duration="{{0}}" overlay="{{false}}" bind:afterleave="back">
<order-screen show="{{show_confirm}}" userInfo="{{userInfo}}" navBarHeight="{{navBarHeight}}" status="{{orderStatus}}" bindconfirm="searchScreen" />
</page-container>
\ No newline at end of file
......@@ -112,7 +112,7 @@
}
},
"setting": {
"compileHotReLoad": true
"compileHotReLoad": false
},
"projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7",
"libVersion": "3.2.5"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!