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 6fb9a32e
authored
May 30, 2025
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.53.0-0528' into 'develop'
上线合并 See merge request
!395
2 parents
893bbf9b
d19f6831
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
60 deletions
components/Goods/Goods.js
tabWorkOrder/pages/createOrder/createOrder.js
components/Goods/Goods.js
View file @
6fb9a32
...
...
@@ -85,62 +85,62 @@ Component({
strTemp
}
=
this
.
data
;
let
result
=
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationList
.
every
(
item
=>
item
.
value
)
console
.
log
(
result
,
goodsList
[
index
],
1
)
if
(
result
)
{
if
(
!
cancel
)
{
console
.
log
(
result
,
goodsList
[
index
],
1
)
if
(
result
)
{
if
(
!
cancel
)
{
let
arr
=
[]
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationList
.
forEach
(
spec
=>
{
arr
.
push
(
spec
.
value
)
})
let
str
=
arr
.
join
(
';~;'
)
// strTemp用来存储上一次选中的值,判断规格是否重新选择 ,避免页面交互闪烁
// if (type && str != strTemp) {
//获取该规格的商品是否存在
console
.
log
(
str
)
if
(
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationGoodsMap
[
str
])
{
goodsList
[
index
].
active
=
true
console
.
log
(
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationGoodsMap
[
str
],
'str'
)
//获取该规格的商品是否存在
console
.
log
(
str
)
if
(
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationGoodsMap
[
str
])
{
goodsList
[
index
].
active
=
true
console
.
log
(
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationGoodsMap
[
str
],
'str'
)
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
=
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationGoodsMap
[
str
]
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
goodsId
=
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
merchantGoodsId
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
specificationStr
=
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
specificationData
.
replace
(
/;~;/g
,
'/'
)
}
else
{
console
.
log
(
88888
)
wx
.
$util
.
showToast
(
'暂无该规格商品'
)
goodsList
[
index
].
active
=
false
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
=
''
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationList
.
forEach
(
item
=>
{
item
.
value
=
''
})
}
else
{
console
.
log
(
88888
)
wx
.
$util
.
showToast
(
'暂无该规格商品'
)
goodsList
[
index
].
active
=
false
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
=
''
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationList
.
forEach
(
item
=>
{
item
.
value
=
''
})
}
}
this
.
setData
({
goodsList
,
strTemp
:
str
},
()
=>
{
//同步更新
this
.
synchronousChange
(
goodsList
[
index
])
})
}
else
{
if
(
goodsList
[
index
].
active
)
{
goodsList
[
index
].
active
=
false
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
=
''
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationList
.
forEach
(
item
=>
{
item
.
value
=
''
})
console
.
log
(
33333
,
goodsList
)
this
.
setData
({
goodsList
,
strTemp
:
str
goodsList
},
()
=>
{
//同步更新
this
.
synchronousChange
(
goodsList
[
index
])
})
}
else
{
if
(
goodsList
[
index
].
active
){
goodsList
[
index
].
active
=
false
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
=
''
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationList
.
forEach
(
item
=>
{
item
.
value
=
''
})
console
.
log
(
33333
,
goodsList
)
this
.
setData
({
goodsList
},()
=>
{
this
.
synchronousChange
(
goodsList
[
index
])
})
}
}
}
}
return
result
return
result
},
setGoodsActive
(
isFlag
)
{
if
(
this
.
data
.
show
)
{
...
...
@@ -150,7 +150,7 @@ Component({
goodsData
// recordList
}
=
this
.
data
console
.
log
(
chooseGoodsList
,
goodsList
,
goodsData
,
'goodsList'
)
console
.
log
(
chooseGoodsList
,
goodsList
,
goodsData
,
'goodsList'
)
let
chooseList
=
[];
goodsData
.
map
((
e
)
=>
{
if
(
e
.
active
)
{
...
...
@@ -359,7 +359,7 @@ Component({
}
=
this
.
data
;
//单独处理多规格商品点击事件
if
(
item
.
goodsFlag
==
2
)
{
if
(
!
this
.
watchAllChose
(
ind
,
true
))
{
if
(
!
this
.
watchAllChose
(
ind
,
true
))
{
wx
.
$util
.
showToast
(
'请先选择该商品规格'
)
return
}
...
...
@@ -386,22 +386,22 @@ Component({
if
(
i
.
goodsFlag
==
1
&&
item
.
goods
)
{
if
(
i
.
goods
.
goodsId
==
item
.
goods
.
goodsId
)
{
i
.
active
=
item
.
active
i
.
count
=
item
.
count
i
.
count
=
item
.
count
||
1
i
.
goods
.
sellPrice
=
item
.
goods
.
sellPrice
}
}
else
if
(
i
.
goodsFlag
==
2
&&
item
.
goodsFlag
==
2
)
{
if
(
i
.
multipleSpecificationsGoods
.
id
==
item
.
multipleSpecificationsGoods
.
id
)
{
i
.
active
=
item
.
active
i
.
count
=
item
.
count
i
.
multipleSpecificationsGoods
=
item
.
multipleSpecificationsGoods
if
(
!
item
.
active
)
{
i
.
multipleSpecificationsGoods
.
goods
=
''
i
.
multipleSpecificationsGoods
.
specificationList
.
forEach
(
m
=>
{
m
.
value
=
''
})
}
}
}
else
if
(
i
.
goodsFlag
==
2
&&
item
.
goodsFlag
==
2
)
{
if
(
i
.
multipleSpecificationsGoods
.
id
==
item
.
multipleSpecificationsGoods
.
id
)
{
i
.
active
=
item
.
active
i
.
count
=
item
.
count
||
1
i
.
multipleSpecificationsGoods
=
item
.
multipleSpecificationsGoods
if
(
!
item
.
active
)
{
i
.
multipleSpecificationsGoods
.
goods
=
''
i
.
multipleSpecificationsGoods
.
specificationList
.
forEach
(
m
=>
{
m
.
value
=
''
})
}
}
}
})
this
.
setData
({
...
...
@@ -423,10 +423,10 @@ Component({
console
.
log
(
target
)
this
.
setData
({
[
target
]:
item
.
count
,
},
()
=>
{
},
()
=>
{
this
.
synchronousChange
(
this
.
data
.
goodsList
[
ind
])
});
},
input
(
e
)
{
let
{
...
...
@@ -443,7 +443,7 @@ Component({
this
.
setData
({
[
target
]:
Number
(
value
),
},
()
=>
{
()
=>
{
this
.
synchronousChange
(
this
.
data
.
goodsList
[
ind
])
}
);
...
...
tabWorkOrder/pages/createOrder/createOrder.js
View file @
6fb9a32
...
...
@@ -1446,11 +1446,11 @@ Page({
packageGoodsList
}
=
orderObj
;
let
chooseList
=
[];
subOrderList
=
subOrderList
.
concat
(
packageGoodsList
)
if
(
subOrderList
&&
subOrderList
.
length
)
{
subOrderList
.
map
((
e
)
=>
{
// 是普通商品
if
(
e
&&
!
e
.
packageName
)
{
...
...
@@ -1533,6 +1533,7 @@ Page({
this
.
setGoodsTotal
(
chooseList
);
},
handleSpecificationsEcho
(
item
)
{
console
.
log
(
item
)
let
{
otherProduct
}
=
this
.
data
,
...
...
@@ -1556,6 +1557,7 @@ Page({
goods
:
{
...
tempData
,
price
:
item
.
price
,
sellPrice
:
item
.
price
,
goodsId
:
item
.
goodsId
,
specificationStr
:
item
.
specificationData
.
replace
(
/;~;/g
,
'/'
)
}
...
...
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