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 54f7a147
authored
Nov 21, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
db47cf12
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
48 deletions
tabWorkOrder/pages/defeatOrder/defeatOrder.js
tabWorkOrder/pages/defeatOrder/defeatOrder.wxml
tabWorkOrder/pages/defeatOrder/defeatOrder.js
View file @
54f7a14
...
@@ -502,7 +502,7 @@ Page({
...
@@ -502,7 +502,7 @@ Page({
if
([
5
,
6
,
7
].
includes
(
subVal
.
merchantGoodsPosition
))
{
if
([
5
,
6
,
7
].
includes
(
subVal
.
merchantGoodsPosition
))
{
skylightArr
.
push
(
subVal
)
skylightArr
.
push
(
subVal
)
}
}
if
([
1
,
baseConfigData
?.
selfBuildFilmType
].
includes
(
val
.
goodsType
))
{
if
(
!
[
1
,
baseConfigData
?.
selfBuildFilmType
].
includes
(
val
.
goodsType
))
{
otherGoodsArr
.
push
(
subVal
)
otherGoodsArr
.
push
(
subVal
)
}
}
})
})
...
@@ -537,9 +537,10 @@ Page({
...
@@ -537,9 +537,10 @@ Page({
copyGoodsData
:
goodsData
copyGoodsData
:
goodsData
})
})
// 仅有一件商品 默认选中
// 仅有一件商品 默认选中
// if (goodsData.length == 1 && goodsData[0].upgradeGoodsList.length == 1) {
// console.log(goodsData.length == 1 && goodsData[0].upgradeGoodsList.length == 1, 'goodsData.length == 1 && goodsData[0].upgradeGoodsList.length == 1');
if
(
goodsData
.
length
==
1
&&
goodsData
[
0
].
upgradeGoodsList
.
length
==
1
)
{
this
.
defaultChoose
(
0
)
this
.
defaultChoose
(
0
)
//
}
}
}
else
{
}
else
{
wx
.
$util
.
showToast
(
message
)
wx
.
$util
.
showToast
(
message
)
}
}
...
@@ -549,6 +550,10 @@ Page({
...
@@ -549,6 +550,10 @@ Page({
defaultChoose
(
index
)
{
defaultChoose
(
index
)
{
let
{
frontGearArr
,
sideRearGearArr
,
skylightArr
,
sideBeforeRearGearArr
,
sideAfterRearGearArr
,
otherGoodsArr
}
=
this
.
data
let
{
frontGearArr
,
sideRearGearArr
,
skylightArr
,
sideBeforeRearGearArr
,
sideAfterRearGearArr
,
otherGoodsArr
}
=
this
.
data
// 仅有一个商品直接选中
// 仅有一个商品直接选中
otherGoodsArr
=
otherGoodsArr
.
map
((
item
)
=>
{
item
.
otherFlag
=
true
return
item
;
})
let
arr
=
[].
concat
(
let
arr
=
[].
concat
(
sideRearGearArr
.
length
==
1
?
sideRearGearArr
:
[],
sideRearGearArr
.
length
==
1
?
sideRearGearArr
:
[],
frontGearArr
.
length
==
1
?
frontGearArr
:
[],
frontGearArr
.
length
==
1
?
frontGearArr
:
[],
...
@@ -557,6 +562,7 @@ Page({
...
@@ -557,6 +562,7 @@ Page({
sideAfterRearGearArr
.
length
==
1
?
sideAfterRearGearArr
:
[],
sideAfterRearGearArr
.
length
==
1
?
sideAfterRearGearArr
:
[],
otherGoodsArr
.
length
==
1
?
otherGoodsArr
:
[],
otherGoodsArr
.
length
==
1
?
otherGoodsArr
:
[],
)
)
console
.
log
(
arr
,
'defaultChoose'
);
arr
.
forEach
(
val
=>
{
arr
.
forEach
(
val
=>
{
val
.
count
=
1
val
.
count
=
1
val
.
active
=
true
val
.
active
=
true
...
...
tabWorkOrder/pages/defeatOrder/defeatOrder.wxml
View file @
54f7a14
...
@@ -285,12 +285,11 @@
...
@@ -285,12 +285,11 @@
<input
<input
type="digit"
type="digit"
value="{{ item.price }}"
value="{{ item.price }}"
bindinput="changePrice"
disabled="{{ true }}"
disabled="{{ true }}"
data-item="{{ item }}"
data-item="{{ item }}"
bindblur="priceBlur"
bindblur="priceBlur"
data-index="{{ index }}"
data-index="{{ index }}"
class="
{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':'' }} 'disabled'
"
class="
disabled
"
always-embed
always-embed
/>
/>
</view>
</view>
...
@@ -347,12 +346,10 @@
...
@@ -347,12 +346,10 @@
<input
<input
type="digit"
type="digit"
value="{{ item.price }}"
value="{{ item.price }}"
bindinput="changePrice"
disabled="{{ true }}"
disabled="{{ orderObj.selectPayType ==0 }}"
data-item="{{ item }}"
data-item="{{ item }}"
bindblur="priceBlur"
data-index="{{ index }}"
data-index="{{ index }}"
class="
{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}
"
class="
disabled
"
always-embed
always-embed
/>
/>
</view>
</view>
...
@@ -409,12 +406,10 @@
...
@@ -409,12 +406,10 @@
<input
<input
type="digit"
type="digit"
value="{{ item.price }}"
value="{{ item.price }}"
bindinput="changePrice"
disabled="{{ true }}"
disabled="{{ orderObj.selectPayType ==0 }}"
data-item="{{ item }}"
data-item="{{ item }}"
bindblur="priceBlur"
data-index="{{ index }}"
data-index="{{ index }}"
class="
{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}
"
class="
disabled
"
always-embed
always-embed
/>
/>
</view>
</view>
...
@@ -468,22 +463,12 @@
...
@@ -468,22 +463,12 @@
<view class="price_count">
<view class="price_count">
<view class="price">
<view class="price">
<text>¥</text>
<text>¥</text>
<input
<input type="digit" value="{{ item.price }}" disabled="{{ true }}" class="disabled" always-embed />
type="digit"
value="{{ item.price }}"
bindinput="changePrice"
disabled="{{ orderObj.selectPayType ==0 }}"
data-item="{{ item }}"
bindblur="priceBlur"
data-index="{{ index }}"
class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}"
always-embed
/>
</view>
</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view>
</view>
</view>
</view>
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}"
data-custom-index="{{ ind }}"
>
<image src="../../images/del.png" />
<image src="../../images/del.png" />
</view>
</view>
</view>
</view>
...
@@ -529,17 +514,7 @@
...
@@ -529,17 +514,7 @@
<view class="price_count">
<view class="price_count">
<view class="price">
<view class="price">
<text>¥</text>
<text>¥</text>
<input
<input type="digit" value="{{ item.price }}" disabled="{{ true }}" class="disabled" always-embed />
type="digit"
value="{{ item.price }}"
bindinput="changePrice"
disabled="{{ true }}"
data-item="{{ item }}"
bindblur="priceBlur"
data-index="{{ index }}"
class="{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':'' }} 'disabled'"
always-embed
/>
</view>
</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-index="{{ ind }}" data-type="3">x{{item.count}}</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-index="{{ ind }}" data-type="3">x{{item.count}}</view>
</view>
</view>
...
@@ -590,17 +565,7 @@
...
@@ -590,17 +565,7 @@
<view class="price_count">
<view class="price_count">
<view class="price">
<view class="price">
<text>¥</text>
<text>¥</text>
<input
<input type="digit" value="{{ item.price }}" disabled="{{ true }}" class="disabled" always-embed />
type="digit"
value="{{ item.price }}"
bindinput="changePrice"
disabled="{{ true }}"
data-item="{{ item }}"
bindblur="priceBlur"
data-index="{{ index }}"
class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':'' }} 'disabled'"
always-embed
/>
</view>
</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4" data-positionnnum="other">x{{item.count}}</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4" data-positionnnum="other">x{{item.count}}</view>
</view>
</view>
...
@@ -624,7 +589,6 @@
...
@@ -624,7 +589,6 @@
<input
<input
type="digit"
type="digit"
value="{{ item.multipleSpecificationsGoods.price }}"
value="{{ item.multipleSpecificationsGoods.price }}"
bindinput="changePrice"
disabled="{{ true }}"
disabled="{{ true }}"
data-item="{{ item }}"
data-item="{{ item }}"
bindblur="priceBlur"
bindblur="priceBlur"
...
...
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