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 39c367f7
authored
Sep 26, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 客户返工
1 parent
b0951b26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
436 additions
and
4 deletions
tabRepairOrder/api.js
tabRepairOrder/components/reworkPopup/index.js
tabRepairOrder/components/reworkPopup/index.json
tabRepairOrder/components/reworkPopup/index.sass
tabRepairOrder/components/reworkPopup/index.wxml
tabRepairOrder/pages/repairOrderDetail/repairOrderDetail.js
tabRepairOrder/pages/repairOrderDetail/repairOrderDetail.json
tabRepairOrder/pages/repairOrderDetail/repairOrderDetail.wxml
tabRepairOrder/api.js
View file @
39c367f
...
...
@@ -3,7 +3,10 @@ import api from '~/utils/request/request.js'
module
.
exports
=
{
/**获取施工单详情数据 */
getConstructionDetail
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.construction.get.construction.detail'
,
data
)
return
api
.
post
(
'dj.api.smartcarlife.construction.get.construction.detail'
,
data
)
},
/**获取可关联商品数据 */
getCanRelateGoodsList
(
data
)
{
...
...
@@ -32,5 +35,9 @@ module.exports = {
/**审核施工单 */
approvalRepairOrder
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.construction.approval'
,
data
)
},
// 施工单返工
reworkAPI
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.construction.rework'
,
data
)
}
}
\ No newline at end of file
}
tabRepairOrder/components/reworkPopup/index.js
0 → 100644
View file @
39c367f
// tabRepairOrder/components/outboundPopup/index.js
const
IMG_URL
=
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import
{
createQrcodeImage
}
from
'~/api/api'
import
api
from
'../../api'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
show
:
{
type
:
Boolean
,
observer
:
function
(
n
)
{
if
(
n
)
{
this
.
setData
({
scrollTop
:
0
})
let
{
infoData
}
=
this
.
data
if
(
infoData
)
{
this
.
getDetailInfo
(
infoData
)
}
}
}
},
title
:
String
,
detailInfo
:
{
type
:
Object
,
observer
:
function
(
n
)
{
if
(
n
)
{
this
.
setData
({
infoData
:
wx
.
$util
.
deepClone
(
n
)
})
}
}
}
},
/**
* 组件的初始数据
*/
data
:
{
IMG_URL
,
infoData
:
{},
filmRollNoList
:
[],
scrollTop
:
0
},
/**
* 组件的方法列表
*/
methods
:
{
async
getDetailInfo
(
data
)
{
let
oParams
=
{}
oParams
.
appId
=
'wx570d9331f9ace0bd'
oParams
.
qrcodeType
=
'QR_WXA_UNLIMIT'
oParams
.
path
=
'tabRepairOrder/pages/repairOrderDetail/repairOrderDetail'
oParams
.
scene
=
`merchantId=
${
data
.
merchantId
}
&yqMerchantId=
${
data
.
sellerMerchantId
}
&id=
${
data
.
id
}
&constructionCode=
${
data
.
constructionCode
}
&orderCode=
${
data
.
orderCode
}
`
oParams
.
channelType
=
1
// const res = await createQrcodeImage(oParams)
// this.setData({
// weappQrcode: res.data
// })
},
// 选择膜卷号
handleRollNumber
(
e
)
{
let
{
target
,
index
}
=
e
.
currentTarget
.
dataset
let
{
detailInfo
}
=
this
.
data
// 获取膜卷号数据
api
.
getfilmRollNoByGoods
({
upgradeGoodsId
:
target
.
upgradeGoodsId
,
yqMerchantId
:
detailInfo
?.
sellerMerchantId
,
merchantId
:
detailInfo
?.
merchantId
})
.
then
(
res
=>
{
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
this
.
setData
({
filmRollNoList
:
data
||
[],
filmRollNoVisible
:
true
,
filmSelectedItem
:
target
.
rollNumber
,
selectRollIndex
:
index
})
}
else
{
wx
.
$util
.
showToast
(
message
)
}
})
},
// 膜卷号确认
changefilmRollNo
(
e
)
{
let
{
selectRollIndex
}
=
this
.
data
this
.
setData
({
[
`infoData.subOrderList[
${
selectRollIndex
}
].rollNumber`
]:
e
.
detail
})
this
.
handelCancelRollPopup
()
},
// 膜卷号取消
handelCancelRollPopup
()
{
this
.
setData
({
filmRollNoVisible
:
false
})
},
// 实际用料输入框
handleInput
(
e
)
{
const
{
index
}
=
e
.
currentTarget
.
dataset
let
value
=
e
.
detail
.
value
value
=
value
.
replace
(
/
[^\d
.
]
/g
,
''
)
// 处理多个小数点的情况,只保留第一个
const
dotIndex
=
value
.
indexOf
(
'.'
)
if
(
dotIndex
!==
-
1
)
{
value
=
value
.
substring
(
0
,
dotIndex
+
1
)
+
value
.
substring
(
dotIndex
+
1
).
replace
(
/
\.
/g
,
''
)
}
// 限制小数点后最多两位
if
(
dotIndex
!==
-
1
)
{
const
decimalPart
=
value
.
substring
(
dotIndex
+
1
)
if
(
decimalPart
.
length
>
2
)
{
value
=
value
.
substring
(
0
,
dotIndex
+
3
)
}
}
// 转换为数字进行最大值验证
const
numValue
=
parseFloat
(
value
||
0
)
if
(
!
isNaN
(
numValue
)
&&
numValue
>
99999.99
)
{
value
=
'99999.99'
}
this
.
setData
({
[
`infoData.subOrderList[
${
index
}
].materialsUsed`
]:
value
})
},
// 产品出库时间
handleOutboundTime
()
{
this
.
setData
({
timeVisible
:
true
})
},
// 产品出库时间确认
onTimeConfirm
(
e
)
{
this
.
setData
({
'infoData.outBoundTime'
:
e
.
detail
})
this
.
onClosePicker
()
},
// 产品出库时间弹窗取消
onClosePicker
()
{
this
.
setData
({
timeVisible
:
false
})
},
// 关闭物料出库弹窗
cancel
()
{
this
.
triggerEvent
(
'cancel'
)
},
confirm
()
{
let
{
infoData
}
=
this
.
data
this
.
triggerEvent
(
'confirm'
,
infoData
)
}
}
})
tabRepairOrder/components/reworkPopup/index.json
0 → 100644
View file @
39c367f
{
"component"
:
true
,
"usingComponents"
:
{
"film-roll-no-popup"
:
"../FilmRollNoPopup/FilmRollNoPopup"
,
"time-select"
:
"../timeSelect/index"
}
}
\ No newline at end of file
tabRepairOrder/components/reworkPopup/index.sass
0 → 100644
View file @
39c367f
/* tabRepairOrder/components/outboundPopup/index.wxss */
.text-hide
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.outbound-popup-box
{
height
:
calc
(
100%
-
var
(
--
fontSize120
))
;
.sub-title
{
height
:
var
(
--
fontSize112
)
;
line-height
:
var
(
--
fontSize112
)
;
border-bottom
:
var
(
--
fontSize1
)
solid
#EBEDF0
;
margin-bottom
:
var
(
--
fontSize20
)
;
.text-center
{
text-align
:
center
;
font-weight
:
500
;
color
:
#222222
;
}
}
.outbound-box
{
height
:
calc
(
100%
-
var
(
--
fontSize114
))
;
.scroll-box
{
height
:
100%
;
}
.qrcode-box
{
margin
:
0
var
(
--
fontSize32
)
;
background
:
#F4F5F7
;
border-radius
:
var
(
--
fontSize11
)
;
padding
:
var
(
--
fontSize24
)
;
display
:
flex
;
flex-flow
:
column
;
align-items
:
center
;
image
{
width
:
var
(
--
fontSize256
)
;
height
:
var
(
--
fontSize256
)
;
}
.tips
{
margin-top
:
var
(
--
fontSize16
)
;
font-size
:
var
(
--
fontSize24
)
;
color
:
#757980
;
}
}
.box
{
padding
:
var
(
--
fontSize40
)
var
(
--
fontSize32
)
var
(
--
fontSize2
)
var
(
--
fontSize40
)
;
position
:
relative
;
margin
:
var
(
--
fontSize20
)
0
0
;
.title
{
font-size
:
var
(
--
fontSize28
)
;
color
:
#292D33
;
margin-bottom
:
var
(
--
fontSize20
)
;
position
:
relative
;
font-weight
:
500
;
&
:
:
after
{
position
:
absolute
;
content
:
''
;
width
:
var
(
--
fontSize8
)
;
height
:
var
(
--
fontSize44
)
;
background
:
#347BFF
;
left
:
calc
(
-1
*
var
(
--
fontSize40
))
;
top
:
50%
;
transform
:
translateY
(
-50%
)
;
}
.text-name
{
max-width
:
calc
(
100%
-
var
(
--
fontSize100
))
;
}
}
.box-item
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
height
:
var
(
--
fontSize104
)
;
font-size
:
var
(
--
fontSize28
)
;
.label
{
color
:
#292D33
;
flex-shrink
:
0
;
width
:
var
(
--
fontSize180
)
;
.required
{
color
:
#f00
;
margin-left
:
var
(
--
fontSize8
)
;
}
}
.value-box
{
width
:
calc
(
100%
-
var
(
--
fontSize190
))
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
}
.value
{
text-align
:
right
;
width
:
calc
(
100%
-
var
(
--
fontSize32
))
;
.placeholder
{
color
:
#BEC1C7
;
}
}
.pickerArrow
{
width
:
var
(
--
fontSize32
)
;
height
:
var
(
--
fontSize32
)
;
}
}
.input-box
{
.label
{
width
:
var
(
--
fontSize330
)
;
}
.value
{
width
:
var
(
--
fontSize240
)
;
.input
{
width
:
100%
;
height
:
var
(
--
fontSize68
)
;
min-height
:
var
(
--
fontSize68
)
;
border
:
var
(
--
fontSize2
)
solid
#DEE0E3
;
overflow
:
hidden
;
border-radius
:
var
(
--
fontSize8
)
;
text-align
:
right
;
box-sizing
:
border-box
;
padding
:
0
var
(
--
fontSize20
)
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
-webkit-appearance
:
none
;
appearance
:
none
;
&
:
:
placeholder
{
position
:
relative
;
top
:
0
;
transform
:
none
;
}
}
.disabled
{
background
:
#DEE0E3
;
}
}
}
.time-box
{
padding-bottom
:
var
(
--
fontSize48
)
;
}
}
}
}
.popup-footer
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
var
(
--
fontSize20
)
var
(
--
fontSize32
)
;
.btn
{
height
:
var
(
--
fontSize80
)
;
box-sizing
:
border-box
;
border-radius
:
var
(
--
fontSize12
)
;
font-size
:
var
(
--
fontSize32
)
;
text-align
:
center
;
line-height
:
var
(
--
fontSize80
)
;
}
.cancel
{
width
:
var
(
--
fontSize186
)
;
height
:
var
(
--
fontSize76
)
;
color
:
#292D33
;
border
:
var
(
--
fontSize2
)
solid
#DEE0E3
;
}
.confirm
{
width
:
calc
(
100%
-
var
(
--
fontSize206
))
;
background
:
#347BFF
;
color
:
#fff
;
}
}
.popup-footer.isFullSucreen
{
padding-bottom
:
var
(
--
fontSize68
)
!
important
;
}
\ No newline at end of file
tabRepairOrder/components/reworkPopup/index.wxml
0 → 100644
View file @
39c367f
<!--tabRepairOrder/components/outboundPopup/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<van-popup
show="{{ show }}"
position="bottom"
custom-style="height: 90%;"
round
closeable
close-on-click-overlay="{{ false }}"
bind:close="cancel"
>
<view class="outbound-popup-box">
<view class="sub-title">
<view class="text-center">{{title}}</view>
</view>
<view class="outbound-box">
<scroll-view scroll-y class="scroll-box" enhanced="{{ true }}" scroll-top="{{ scrollTop }}" show-scrollbar="{{ false }}">
<!-- <view class="qrcode-box">
<image src="{{ weappQrcode }}" mode="" />
<view class="tips">请仓库管理员扫描此二维码确认产品实际用料</view>
</view> -->
<block wx:for="{{ infoData.subOrderList }}" wx:key="index">
<view class="box">
<view class="title infoTitle">
<view class="text-name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}
</view>
</view>
<view class="box-item">
<view class="label">产品膜卷号</view>
<view class="value-box" bindtap="handleRollNumber" data-target="{{ item }}" data-index="{{ index }}">
<view class="value text-hide">
<block wx:if="{{ item.rollNumber }}">{{item.rollNumber}}</block>
<block wx:else>
<view class="placeholder">请选择</view>
</block>
</view>
<image class="pickerArrow" src="/components/images/arrow-x.png" />
</view>
</view>
<view class="box-item input-box">
<view class="label">
产品实际用料(米/件)
<text class="required">*</text>
</view>
<view class="value">
<input
class="input {{ false ? 'disabled' : '' }}"
bindinput="handleInput"
value="{{ item.materialsUsed }}"
data-index="{{ index }}"
type="digit"
placeholder-style="color: #BEC1C7;"
placeholder="输入数字"
/>
</view>
</view>
</view>
</block>
<!-- <view class="box">
<view class="title infoTitle">出库时间</view>
<view class="box-item time-box">
<view class="label">产品出库时间</view>
<view class="value-box" bindtap="handleOutboundTime">
<view class="value text-hide">
<block wx:if="{{ infoData.outBoundTime }}">{{infoData.outBoundTime}}</block>
<block wx:else>
<view class="placeholder">请选择</view>
</block>
</view>
<image class="pickerArrow" src="/components/images/arrow-x.png" />
</view>
</view>
</view> -->
</scroll-view>
</view>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bind:tap="cancel">取消</view>
<view class="confirm btn text-center" bind:tap="confirm">确认返工</view>
</view>
</van-popup>
<film-roll-no-popup
show="{{ filmRollNoVisible }}"
title="产品膜卷号"
copyfilmRollNoList="{{ filmRollNoList }}"
filmSelectedItem="{{ filmSelectedItem }}"
bindconfirm="changefilmRollNo"
bindcancel="handelCancelRollPopup"
/>
<time-select
show="{{ timeVisible }}"
title="产品出库时间"
defaultTime="{{ infoData.outBoundTime }}"
bind:confirm="onTimeConfirm"
bindcancel="onClosePicker"
/>
\ No newline at end of file
tabRepairOrder/pages/repairOrderDetail/repairOrderDetail.js
View file @
39c367f
This diff is collapsed.
Click to expand it.
tabRepairOrder/pages/repairOrderDetail/repairOrderDetail.json
View file @
39c367f
{
"usingComponents"
:
{
"time-select"
:
"../../components/timeSelect/index"
,
"outbound-popup"
:
"../../components/outboundPopup/index"
"outbound-popup"
:
"../../components/outboundPopup/index"
,
"rework-popup"
:
"../../components/reworkPopup/index"
},
"navigationBarTitleText"
:
"施工单详情"
}
\ No newline at end of file
}
tabRepairOrder/pages/repairOrderDetail/repairOrderDetail.wxml
View file @
39c367f
This diff is collapsed.
Click to expand it.
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