Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 59bf190c
authored
Jun 29, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
门店收款 多凭证交易流水号需求开发
1 parent
da3c2141
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
159 additions
and
56 deletions
app.json
components/OrderPopup/OrderPopup.js
components/OrderPopup/OrderPopup.wxml
components/OrderPopup/OrderPopup.wxss
router/router.js
tabOperating/pages/index/index_mixins.js
tabWorkOrder/pages/confirmOrder/confirmOrder.js
tabWorkOrder/pages/confirmOrder/confirmOrder.wxml
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.js
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxml
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxss
tabWorkOrder/pages/orderDetail/orderDetail.js
tabWorkOrder/pages/orderDetail/orderDetail.wxml
tabWorkOrder/pages/orderDetail/orderDetail.wxss
app.json
View file @
59bf190
...
@@ -98,7 +98,8 @@
...
@@ -98,7 +98,8 @@
"gl-image"
:
"components/GlImage/index"
,
"gl-image"
:
"components/GlImage/index"
,
"van-field"
:
"@vant/weapp/field/index"
,
"van-field"
:
"@vant/weapp/field/index"
,
"van-popup"
:
"@vant/weapp/popup/index"
,
"van-popup"
:
"@vant/weapp/popup/index"
,
"van-dialog"
:
"@vant/weapp/dialog/index"
"van-dialog"
:
"@vant/weapp/dialog/index"
,
"van-uploader"
:
"@vant/weapp/uploader/index"
},
},
"preloadRule"
:
{
"preloadRule"
:
{
"pages/tabWorkOrder/pages/index/index"
:
{
"pages/tabWorkOrder/pages/index/index"
:
{
...
...
components/OrderPopup/OrderPopup.js
View file @
59bf190
...
@@ -5,6 +5,9 @@ Component({
...
@@ -5,6 +5,9 @@ Component({
/**
/**
* 组件的属性列表
* 组件的属性列表
*/
*/
options
:
{
styleIsolation
:
'shared'
,
// 自定义覆盖vant样式
},
properties
:
{
properties
:
{
show
:
Boolean
,
show
:
Boolean
,
orderType
:
{
orderType
:
{
...
@@ -62,8 +65,8 @@ Component({
...
@@ -62,8 +65,8 @@ Component({
textareaValue
:
''
,
textareaValue
:
''
,
routerBack
:
null
,
routerBack
:
null
,
outTradeNo
:
''
,
outTradeNo
:
''
,
payVoucher
:
''
,
wxqrcode
:
''
,
wxqrcode
:
''
payVoucherList
:
[]
},
},
/** 组件生命周期 */
/** 组件生命周期 */
...
@@ -137,17 +140,17 @@ Component({
...
@@ -137,17 +140,17 @@ Component({
},
},
input
(
e
)
{
input
(
e
)
{
let
{
value
}
=
e
.
detail
let
{
value
}
=
e
.
detail
let
val
=
value
.
replace
(
/
[^
a-zA-Z0-9
]
/g
,
''
)
let
val
=
value
.
replace
(
/
[^
\a
-
\z\A
-
\Z
0-9
\.\,\?\<\>\。\,\-\—
—
\=\;\;\/\'\"\’\‘\?\“\”\@\!\!\+\$
]
/g
,
''
)
this
.
setData
({
this
.
setData
({
outTradeNo
:
val
outTradeNo
:
val
})
})
},
},
upLoad
()
{
// 上传付款凭证
upLoad
(
event
)
{
let
_this
=
this
let
_this
=
this
wx
.
chooseImage
({
let
{
payVoucherList
}
=
_this
.
data
count
:
1
,
const
{
file
}
=
event
.
detail
success
(
res
)
{
let
tempFiles
=
file
?.
url
let
[
tempFiles
]
=
res
.
tempFilePaths
let
imgType
=
tempFiles
.
split
(
'.'
)[
1
]
let
imgType
=
tempFiles
.
split
(
'.'
)[
1
]
let
type
=
imgType
==
'unknown'
?
'jpg'
:
imgType
let
type
=
imgType
==
'unknown'
?
'jpg'
:
imgType
wx
.
getFileSystemManager
().
readFile
({
wx
.
getFileSystemManager
().
readFile
({
...
@@ -164,8 +167,9 @@ Component({
...
@@ -164,8 +167,9 @@ Component({
console
.
log
(
img
)
console
.
log
(
img
)
let
{
code
,
data
,
message
}
=
img
let
{
code
,
data
,
message
}
=
img
if
(
code
==
0
)
{
if
(
code
==
0
)
{
payVoucherList
.
push
({
url
:
data
})
_this
.
setData
({
_this
.
setData
({
payVoucher
:
data
payVoucherList
})
})
}
else
{
}
else
{
wx
.
$util
.
showToast
(
message
)
wx
.
$util
.
showToast
(
message
)
...
@@ -173,7 +177,15 @@ Component({
...
@@ -173,7 +177,15 @@ Component({
})
})
}
}
})
})
}
},
// 删除上传
deletePayVoucher
(
e
)
{
let
{
index
}
=
e
?.
detail
let
_this
=
this
let
{
payVoucherList
}
=
_this
.
data
payVoucherList
.
splice
(
index
,
1
)
this
.
setData
({
payVoucherList
})
})
},
},
changeOrderSource
(
e
)
{
changeOrderSource
(
e
)
{
...
@@ -187,20 +199,19 @@ Component({
...
@@ -187,20 +199,19 @@ Component({
})
})
},
},
confirm
(
e
)
{
confirm
(
e
)
{
let
{
orderType
,
outTradeNo
,
payVoucher
,
textareaValue
,
orderTypeList
}
=
this
.
data
let
{
orderType
,
outTradeNo
,
payVoucher
List
,
textareaValue
,
orderTypeList
}
=
this
.
data
// debugger
// debugger
console
.
log
(
wx
.
$router
)
console
.
log
(
wx
.
$router
)
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
wx
.
$router
.
getPageInstance
()
if
(
orderType
==
2
)
{
if
(
orderType
==
2
)
{
console
.
log
(
payVoucher
,
outTradeNo
)
if
(
payVoucherList
.
length
&&
outTradeNo
)
{
if
(
payVoucher
&&
outTradeNo
)
{
thisPage
.
setData
({
thisPage
.
setData
({
outTradeNo
,
outTradeNo
,
payVoucher
payVoucher
List
})
})
thisPage
.
createPayOrder
()
thisPage
.
createPayOrder
()
}
else
{
}
else
{
wx
.
$util
.
showToast
(
'
订单
号或付款凭证不能为空!'
)
wx
.
$util
.
showToast
(
'
交易流水
号或付款凭证不能为空!'
)
}
}
}
else
if
(
orderType
==
0
)
{
}
else
if
(
orderType
==
0
)
{
if
(
textareaValue
)
{
if
(
textareaValue
)
{
...
...
components/OrderPopup/OrderPopup.wxml
View file @
59bf190
<view class="order-popup" wx:if="{{show}}" catchtouchmove="noScroll">
<view class="order-popup" wx:if="{{show}}" catchtouchmove="noScroll">
<view class="order-popup-bg" bindtap="close" />
<view class="order-popup-bg" bindtap="close" />
<view class="order-popup-content">
<view class="order-popup-content">
<view class="title" wx:if="{{orderType == 2}}">上传付款凭证</view>
<view class="order-popup-close" bindtap="close">
<view class="order-popup-close" bindtap="close">
<image src="../images/order-close.png" />
<image src="../images/order-close.png" />
</view>
</view>
<!-- 4s店 开始 -->
<!-- 4s店 开始 -->
<block wx:if="{{orderType == 2}}">
<block wx:if="{{orderType == 2}}">
<view class="title">上传付款凭证</view>
<view class="input-item">
<view class="input-item">
交易流水号
<view class="input-box">
<view class="input-box">
<input
<input
type="text"
type="text"
class="input"
bindinput="input"
bindinput="input"
value="{{outTradeNo}}"
value="{{outTradeNo}}"
maxlength="32" />
placeholder="输入交易流水号"
placeholder-class="outTradeNo_placeholder"
maxlength="100" />
</view>
</view>
</view>
</view>
<view class="camera-box" bindtap="upLoad">
<view class="upload-content">
<block wx:if="{{payVoucher}}">
<view class="title-text">上传图片</view>
<image src="{{payVoucher}}" />
<view class="upload-box">
</block>
<van-uploader
<block wx:else>
file-list="{{ payVoucherList }}"
<view class="camera-icon">
max-count="9"
<image src="../images/order-camera.png" />
deletable
preview-size="160rpx"
bind:after-read="upLoad"
bind:delete="deletePayVoucher"
>
</van-uploader>
</view>
</view>
</block>
</view>
</view>
<view class="btn" bindtap="confirm">确定</view>
<view class="btn" bindtap="confirm">确定</view>
</block>
</block>
<!-- 4s店 end -->
<!-- 4s店 end -->
...
...
components/OrderPopup/OrderPopup.wxss
View file @
59bf190
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
position: absolute;
position: absolute;
left: 50%;
left: 50%;
top: 50%;
top: 50%;
width:
82.9%
;
width:
calc(100% - 128rpx)
;
background: #FFFFFF;
background: #FFFFFF;
box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.10);
box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.10);
border-radius: 16rpx;
border-radius: 16rpx;
...
@@ -70,10 +70,10 @@
...
@@ -70,10 +70,10 @@
}
}
.order-popup-content .title {
.order-popup-content .title {
padding:
70
rpx 0 32rpx;
padding:
26
rpx 0 32rpx;
font-size: 32rpx;
font-size: 32rpx;
color: #333333;
color: #333333;
font-weight:
7
00;
font-weight:
6
00;
text-align: center;
text-align: center;
}
}
...
@@ -121,18 +121,18 @@
...
@@ -121,18 +121,18 @@
.order-popup-content .input-item {
.order-popup-content .input-item {
display: flex;
display: flex;
padding: 0 50rpx;
align-items: center;
align-items: center;
font-size: 24rpx;
font-size: 24rpx;
color: #333333;
color: #333333;
justify-content: space-between
;
padding: 0 48rpx
;
}
}
.order-popup-content .input-box {
.order-popup-content .input-box {
width:
370rpx
;
width:
100%
;
height: 6
0
rpx;
height: 6
4
rpx;
border: 2rpx solid #
C3C3C3
;
border: 2rpx solid #
EFF0F2
;
border-radius: 8rpx;
border-radius: 8rpx;
background: #F4F5F7;
box-sizing: border-box;
box-sizing: border-box;
padding: 0 20rpx;
padding: 0 20rpx;
display: flex;
display: flex;
...
@@ -144,6 +144,62 @@
...
@@ -144,6 +144,62 @@
height: 100%;
height: 100%;
}
}
.order-popup-content .input-box .input .outTradeNo_placeholder{
color: #B6B6B8;
font-size: 24rpx;
}
.order-popup-content .upload-content{
display: flex;
flex-flow: column;
padding: 24rpx 48rpx;
}
.order-popup-content .upload-content .title-text{
font-weight: 500;
font-size: 28rpx;
color: #282829;
margin-bottom: 18rpx;
}
.van-uploader .van-uploader__wrapper {
display: flex;
flex-wrap: wrap;
gap: 22rpx;
}
.van-uploader .van-uploader__wrapper .van-uploader__upload{
order: -1;
}
.van-uploader .van-uploader__wrapper .van-uploader__preview,.van-uploader__upload{
margin: 0;
border-radius: 8rpx;
/* width: 160rpx !important;
height: 160rpx !important; */
position: relative;
}
.van-uploader .van-uploader__wrapper .van-uploader__preview image{
border-radius: 8rpx;
/* width: 160rpx !important;
height: 160rpx !important; */
}
.van-uploader .van-uploader__wrapper .van-uploader__preview .van-uploader__preview-delete{
width: 36rpx;
height: 36rpx;
background-color: rgba(0, 0, 0, 1);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: -8rpx;
right: -8rpx;
}
.van-uploader .van-uploader__wrapper .van-uploader__preview .van-uploader__preview-delete .van-uploader__preview-delete-icon{
font-size: 36rpx;
transform: scale(.7);
}
.van-uploader .van-uploader__wrapper .van-uploader__preview .van-uploader__preview-delete::after{
width: 0;
}
.order-popup-content .camera-box {
.order-popup-content .camera-box {
margin: 30rpx auto 40rpx;
margin: 30rpx auto 40rpx;
width: 522rpx;
width: 522rpx;
...
...
router/router.js
View file @
59bf190
...
@@ -129,6 +129,12 @@ class Router {
...
@@ -129,6 +129,12 @@ class Router {
query
query
}
}
}
}
/**跳转至H5 */
jumpH5
(
url
)
{
wx
.
navigateTo
({
url
:
`/pages/webView/webView?url=
${
encodeURIComponent
(
url
)}
`
})
}
/**页面跳转
/**页面跳转
*
*
*/
*/
...
...
tabOperating/pages/index/index_mixins.js
View file @
59bf190
...
@@ -12,8 +12,9 @@ export default {
...
@@ -12,8 +12,9 @@ export default {
recordId
:
29
recordId
:
29
},
},
{
{
name
:
'商品排行'
,
name
:
'趋势分析'
,
url
:
''
url
:
'http://baidu.com'
,
isH5
:
true
},
},
{
{
name
:
'员工排名'
,
name
:
'员工排名'
,
...
@@ -55,8 +56,13 @@ export default {
...
@@ -55,8 +56,13 @@ export default {
icon
:
'none'
icon
:
'none'
})
})
}
else
{
}
else
{
console
.
log
(
item
.
url
)
if
(
item
.
isH5
)
{
wx
.
$router
.
jumpH5
(
item
.
url
)
}
else
{
wx
.
$router
.
go
(
item
.
url
)
wx
.
$router
.
go
(
item
.
url
)
}
console
.
log
(
item
.
url
)
item
.
recordId
&&
wx
.
$util
.
pointRecord
(
item
.
recordId
)
item
.
recordId
&&
wx
.
$util
.
pointRecord
(
item
.
recordId
)
}
}
// 暂未上线,敬请期待
// 暂未上线,敬请期待
...
...
tabWorkOrder/pages/confirmOrder/confirmOrder.js
View file @
59bf190
...
@@ -138,14 +138,14 @@ Page({
...
@@ -138,14 +138,14 @@ Page({
let
{
let
{
orderInfo
:
{
selectPayType
,
orderCode
},
orderInfo
:
{
selectPayType
,
orderCode
},
outTradeNo
,
outTradeNo
,
payVoucher
payVoucher
List
}
=
this
.
data
}
=
this
.
data
let
obj
=
{
let
obj
=
{
orderCode
,
orderCode
,
payType
:
selectPayType
payType
:
selectPayType
}
}
if
(
payVoucher
&&
outTradeNo
)
{
if
(
payVoucher
List
&&
outTradeNo
)
{
obj
.
payVoucher
=
payVoucher
obj
.
payVoucher
List
=
payVoucherList
.
map
(
v
=>
{
return
v
?.
url
})
obj
.
outTradeNo
=
outTradeNo
obj
.
outTradeNo
=
outTradeNo
}
}
wx
.
$util
.
showLoading
()
wx
.
$util
.
showLoading
()
...
...
tabWorkOrder/pages/confirmOrder/confirmOrder.wxml
View file @
59bf190
...
@@ -198,7 +198,7 @@
...
@@ -198,7 +198,7 @@
orderType="{{orderInfo.selectPayType }}"
orderType="{{orderInfo.selectPayType }}"
wx:if="{{showPopup}}"
wx:if="{{showPopup}}"
show="{{showPopup}}"
show="{{showPopup}}"
qrCode="{{orderInfo.payOrder.outTradeNo}}"
qrCode="{{orderInfo.payOrder.outTradeNo
|| ''
}}"
price="{{orderInfo.total_price}}"
price="{{orderInfo.total_price}}"
orderCode="{{orderInfo.orderCode}}" />
orderCode="{{orderInfo.orderCode}}" />
<artificer-select-popup
<artificer-select-popup
...
...
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.js
View file @
59bf190
...
@@ -423,11 +423,11 @@ Page({
...
@@ -423,11 +423,11 @@ Page({
},
},
previewImage
(
e
)
{
previewImage
(
e
)
{
let
{
url
}
=
e
.
currentTarget
.
dataset
let
{
url
,
index
}
=
e
.
currentTarget
.
dataset
console
.
log
(
url
)
console
.
log
(
url
)
wx
.
previewImage
({
wx
.
previewImage
({
urls
:
[
url
]
,
urls
:
url
,
current
:
url
current
:
url
[
index
]
})
})
},
},
/**
/**
...
...
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxml
View file @
59bf190
...
@@ -100,9 +100,11 @@
...
@@ -100,9 +100,11 @@
<block wx:if="{{orderInfo.selectPayType == 2}}">
<block wx:if="{{orderInfo.selectPayType == 2}}">
<view class="cell">
<view class="cell">
<view class="label">付款凭证:</view>
<view class="label">付款凭证:</view>
<view class="value" bindtap="previewImage" data-url="{{orderInfo.payOrder.payVoucher}}">
<view class="image-box">
<view class="value" bindtap="previewImage" wx:for="{{orderInfo.payVoucherList}}" wx:key="index" data-index="{{index}}" data-url="{{orderInfo.payVoucherList}}">
<view class="image">
<view class="image">
<image src="{{orderInfo.payOrder.payVoucher}}" />
<image src="{{item}}" />
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxss
View file @
59bf190
...
@@ -211,6 +211,12 @@ page {
...
@@ -211,6 +211,12 @@ page {
width: 180rpx;
width: 180rpx;
}
}
.box .cell .image-box{
display: flex;
flex-flow: wrap;
gap: 10rpx;
}
.box .cell .value {
.box .cell .value {
color: #333333;
color: #333333;
max-width: 370rpx;
max-width: 370rpx;
...
@@ -219,8 +225,8 @@ page {
...
@@ -219,8 +225,8 @@ page {
}
}
.box .cell .value .image {
.box .cell .value .image {
width: 1
5
0rpx;
width: 1
4
0rpx;
height: 1
5
0rpx;
height: 1
4
0rpx;
}
}
.customer.box .cell .value {
.customer.box .cell .value {
...
...
tabWorkOrder/pages/orderDetail/orderDetail.js
View file @
59bf190
...
@@ -363,12 +363,12 @@ Page({
...
@@ -363,12 +363,12 @@ Page({
},
},
previewImage
(
e
)
{
previewImage
(
e
)
{
let
{
url
}
=
e
.
currentTarget
.
dataset
let
{
url
,
index
}
=
e
.
currentTarget
.
dataset
// if (url.includes('http')) {
// if (url.includes('http')) {
wx
.
previewImage
({
wx
.
previewImage
({
urls
:
[
url
]
,
urls
:
url
,
current
:
url
current
:
url
[
index
]
})
})
},
},
/**
/**
...
...
tabWorkOrder/pages/orderDetail/orderDetail.wxml
View file @
59bf190
...
@@ -82,9 +82,11 @@
...
@@ -82,9 +82,11 @@
<block wx:if="{{orderInfo.selectPayType == 2}}">
<block wx:if="{{orderInfo.selectPayType == 2}}">
<view class="cell">
<view class="cell">
<view class="label">付款凭证:</view>
<view class="label">付款凭证:</view>
<view class="value" bindtap="previewImage" data-url="{{orderInfo.payOrder.payVoucher}}">
<view class="image-box">
<view class="value" bindtap="previewImage" wx:for="{{orderInfo.payVoucherList}}" wx:key="index" data-index="{{index}}" data-url="{{orderInfo.payVoucherList}}">
<view class="image">
<view class="image">
<image src="{{orderInfo.payOrder.payVoucher}}" />
<image src="{{item}}" />
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
tabWorkOrder/pages/orderDetail/orderDetail.wxss
View file @
59bf190
...
@@ -118,6 +118,12 @@ page {
...
@@ -118,6 +118,12 @@ page {
width: 180rpx;
width: 180rpx;
}
}
.box .cell .image-box{
display: flex;
flex-flow: wrap;
gap: 10rpx;
}
.box .cell .value {
.box .cell .value {
color: #333333;
color: #333333;
max-width: 370rpx;
max-width: 370rpx;
...
@@ -126,8 +132,8 @@ page {
...
@@ -126,8 +132,8 @@ page {
}
}
.box .cell .value .image {
.box .cell .value .image {
width: 1
5
0rpx;
width: 1
4
0rpx;
height: 1
5
0rpx;
height: 1
4
0rpx;
}
}
.customer.box .cell .value {
.customer.box .cell .value {
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment