Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
iedgeMini
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
877e3f28
authored
Mar 21, 2025
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix部分问题
parent
13fca3da
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
878 additions
and
874 deletions
assets/css/car/confirmQuote.scss
pages/car/confirmQuote.vue
pages/car/list.vue
pages/user/companyInfo.vue
pages/user/qdDetail.vue
util/api.js
assets/css/car/confirmQuote.scss
View file @
877e3f28
...
@@ -16,9 +16,6 @@
...
@@ -16,9 +16,6 @@
height
:
92rpx
;
height
:
92rpx
;
line-height
:
92rpx
;
line-height
:
92rpx
;
border-bottom
:
1rpx
solid
#e7e7e7
;
border-bottom
:
1rpx
solid
#e7e7e7
;
&
:last-child
{
border-bottom
:
none
;
}
}
}
.address-box
{
.address-box
{
display
:
block
;
display
:
block
;
...
...
pages/car/confirmQuote.vue
View file @
877e3f28
...
@@ -5,7 +5,9 @@
...
@@ -5,7 +5,9 @@
<view
class=
"cons"
>
<view
class=
"cons"
>
<view
class=
"top-box"
>
<view
class=
"top-box"
>
<view
class=
"tit"
>
询价人:
{{
create_name
}}
</view>
<view
class=
"tit"
>
询价人:
{{
create_name
}}
</view>
<view
class=
"tit"
>
公司名称:
{{
priceInfo
.
company_name
}}
</view>
<view
class=
"tit row verCenter"
>
公司名称:
<input
class=
"uni-input"
v-model=
"company_name"
/>
</view>
<!--
<navigator
:url=
"'/pages/user/address?form=confirmQuote&address_id='+address_id+'&coupon_id='+coupon_id"
class=
"address-box"
>
<!--
<navigator
:url=
"'/pages/user/address?form=confirmQuote&address_id='+address_id+'&coupon_id='+coupon_id"
class=
"address-box"
>
<view
class=
"addbx row bothSide verCenter"
>
<view
class=
"addbx row bothSide verCenter"
>
<view
class=
"l"
>
<view
class=
"l"
>
...
@@ -135,6 +137,7 @@
...
@@ -135,6 +137,7 @@
coupon_list
:
[],
coupon_list
:
[],
coupon_id
:
""
,
coupon_id
:
""
,
priceInfo
:
""
,
priceInfo
:
""
,
company_name
:
''
,
isCompany
:
(
uni
.
getStorageSync
(
'user_info'
)
&&
JSON
.
parse
(
uni
.
getStorageSync
(
'user_info'
)).
company_name
)
?
true
:
false
isCompany
:
(
uni
.
getStorageSync
(
'user_info'
)
&&
JSON
.
parse
(
uni
.
getStorageSync
(
'user_info'
)).
company_name
)
?
true
:
false
}
}
},
},
...
@@ -173,6 +176,7 @@
...
@@ -173,6 +176,7 @@
this
.
request
(
Api_Url
+
'/api/order/calQuotePrice'
,
'post'
,
{
sku_json
:
JSON
.
stringify
(
sku_
),
user_coupon_id
:
(
this
.
coupon_id
||
""
)
},
true
,
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/api/order/calQuotePrice'
,
'post'
,
{
sku_json
:
JSON
.
stringify
(
sku_
),
user_coupon_id
:
(
this
.
coupon_id
||
""
)
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
priceInfo
=
res
.
data
;
this
.
priceInfo
=
res
.
data
;
this
.
company_name
=
res
.
data
.
company_name
;
this
.
pdf_email
=
res
.
data
.
recent_quote_email
;
this
.
pdf_email
=
res
.
data
.
recent_quote_email
;
}
}
...
@@ -232,7 +236,8 @@
...
@@ -232,7 +236,8 @@
sku_json
:
JSON
.
stringify
(
goods_json_arr
),
sku_json
:
JSON
.
stringify
(
goods_json_arr
),
user_coupon_id
:
this
.
coupon_id
,
user_coupon_id
:
this
.
coupon_id
,
address_id
:
this
.
address_id
,
address_id
:
this
.
address_id
,
purchase_sn
:
this
.
purchase_sn
purchase_sn
:
this
.
purchase_sn
,
company_name
:
this
.
company_name
}
}
this
.
request
(
Api_Url
+
'/api/xcx/confirmQuote'
,
'post'
,
obj_
,
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/api/xcx/confirmQuote'
,
'post'
,
obj_
,
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
...
...
pages/car/list.vue
View file @
877e3f28
<
template
>
<
template
>
<view
class=
"carListPage"
>
<view
class=
"carListPage"
>
<barX
/>
<barX
/>
<view
class=
"car-head row bothSide"
>
<view
class=
"car-head row bothSide"
>
<view
class=
"l row verCenter "
>
<view
class=
"l row verCenter "
>
<text
class=
"icon iconfont icon-arrowleft"
@
click=
"$goBack"
></text>
<text
class=
"icon iconfont icon-arrowleft"
@
click=
"$goBack"
></text>
<view>
购物车(
{{
carList
.
length
}}
)
</view>
<view>
购物车(
{{
carList
.
length
}}
)
</view>
</view>
</view>
<view
class=
"r row verCenter"
v-if=
"!isEdit"
>
<view
class=
"r row verCenter"
v-if=
"!isEdit"
>
<text
@
click=
"isEdit=!isEdit"
>
管理
</text>
<text
@
click=
"isEdit=!isEdit"
>
管理
</text>
<navigator
:url=
'$globalData.KFQQ'
class=
"it"
>
客服
</navigator>
<navigator
:url=
'$globalData.KFQQ'
class=
"it"
>
客服
</navigator>
</view>
</view>
<view
class=
"r row verCenter"
v-if=
"isEdit"
>
<view
class=
"r row verCenter"
v-if=
"isEdit"
>
<text
@
click=
"isEdit=!isEdit"
>
退出管理
</text>
<text
@
click=
"isEdit=!isEdit"
>
退出管理
</text>
</view>
</view>
</view>
</view>
<view
class=
"cons"
>
<view
class=
"cons"
>
<view
class=
"no-data"
v-if=
"(!isLogin)||(dataInited&&carList.length==0)"
>
<view
class=
"no-data"
v-if=
"(!isLogin)||(dataInited&&carList.length==0)"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/19/7fdab385a25db187f8e57370875f7546.png"
/>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/19/7fdab385a25db187f8e57370875f7546.png"
/>
<text>
暂无商品信息!
</text>
<text>
暂无商品信息!
</text>
</view>
</view>
<view
class=
"nodl"
v-if=
"!isLogin"
>
<view
class=
"nodl"
v-if=
"!isLogin"
>
<navigator
:url=
"`/pages/auth/login?referer=$
{encodeURIComponent(`/pages/car/list`)}`" class="login-btn">登录 / 注册
</navigator>
<navigator
:url=
"`/pages/auth/login?referer=$
{encodeURIComponent(`/pages/car/list`)}`" class="login-btn">登录 / 注册
</navigator>
</view>
</view>
<view
class=
"list-box"
v-if=
"carList.length>0"
>
<view
class=
"list-box"
v-if=
"carList.length>0"
>
<delSlideLeft
v-for=
"(item,index) in carList"
:key=
"index"
@
delItem=
"dels(item.sku_id)"
>
<delSlideLeft
v-for=
"(item,index) in carList"
:key=
"index"
@
delItem=
"dels(item.sku_id)"
>
<view
class=
"item-group row verCenter bothSide"
>
<view
class=
"item-group row verCenter bothSide"
>
<view
class=
"l row verCenter"
>
<view
class=
"l row verCenter"
>
<text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':item.checked}" @click.stop="checkboxchange(item.sku_id)">
</text>
<text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':item.checked}" @click.stop="checkboxchange(item.sku_id)">
</text>
<navigator
:url=
"'/pages/goods/detail?goods_id='+item.sku_id"
>
<navigator
:url=
"'/pages/goods/detail?goods_id='+item.sku_id"
>
<image
:src=
"item.goods_info.goods_images||'https://www.iedge.net/assets/images/common/defaultnew.png'"
/>
<image
:src=
"item.goods_info.goods_images||'https://www.iedge.net/assets/images/common/defaultnew.png'"
/>
</navigator>
</navigator>
</view>
</view>
<view
class=
"r"
>
<view
class=
"r"
>
<navigator
:url=
"'/pages/goods/detail?goods_id='+item.sku_id"
>
<navigator
:url=
"'/pages/goods/detail?goods_id='+item.sku_id"
>
<view
class=
"elep skun"
>
{{
item
.
goods_info
.
sku_name
}}
</view>
<view
class=
"elep skun"
>
{{
item
.
goods_info
.
sku_name
}}
</view>
<view
class=
"txt"
>
型号:
{{
item
.
goods_info
.
goods_name
}}
</view>
<view
class=
"txt"
>
型号:
{{
item
.
goods_info
.
goods_name
}}
</view>
<view
class=
"txt"
>
品牌:
{{
item
.
goods_info
.
brand_name
}}
</view>
<view
class=
"txt"
>
品牌:
{{
item
.
goods_info
.
brand_name
}}
</view>
<view
class=
"txt"
>
货期:
{{
item
.
goods_info
.
cn_delivery_time
}}
</view>
<view
class=
"txt"
>
货期:
{{
item
.
goods_info
.
cn_delivery_time
}}
</view>
</navigator>
</navigator>
<view
class=
"row verCenter bothSide"
>
<view
class=
"row verCenter bothSide"
>
<view
class=
"price"
>
¥
{{
item
.
price
}}
</view>
<view
class=
"price"
>
¥
{{
item
.
price
}}
</view>
<view
class=
"hbha row verCenter bothSide"
>
<view
class=
"hbha row verCenter bothSide"
>
<text
class=
"icon iconfont icon-jian"
@
click=
"addjNum(item.sku_id,1)"
></text>
<text
class=
"icon iconfont icon-jian"
@
click=
"addjNum(item.sku_id,1)"
></text>
<input
type=
"number"
v-model=
"item.goods_num"
@
input=
"changeNum(item.sku_id)"
/>
<input
type=
"number"
v-model=
"item.goods_num"
@
input=
"changeNum(item.sku_id)"
/>
<text
class=
"icon iconfont icon-jia"
@
click=
"addjNum(item.sku_id,2)"
></text>
<text
class=
"icon iconfont icon-jia"
@
click=
"addjNum(item.sku_id,2)"
></text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</delSlideLeft>
</delSlideLeft>
</view>
</view>
</view>
</view>
<view
class=
"car-foot row verCenter bothSide "
v-if=
"isEdit"
>
<view
class=
"car-foot row verCenter bothSide "
v-if=
"isEdit"
>
<view
class=
"checked-box row verCenter"
@
click
.
stop=
"checkboxchange(460053411)"
><text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':allcheck}">
</text>
全选
</view>
<view
class=
"checked-box row verCenter"
@
click
.
stop=
"checkboxchange(460053411)"
><text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':allcheck}">
</text>
全选
</view>
<view
class=
"del-btn"
@
click=
"dels()"
>
删除
</view>
<view
class=
"del-btn"
@
click=
"dels()"
>
删除
</view>
</view>
</view>
<view
class=
"car-foot car-foot1"
v-if=
"!isEdit"
>
<view
class=
"car-foot car-foot1"
v-if=
"!isEdit"
>
<view
class=
"t row bothSide"
>
<view
class=
"t row bothSide"
>
<view
class=
"checked-box row verCenter"
@
click
.
stop=
"checkboxchange(460053411)"
><text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':allcheck}">
</text>
全选
</view>
<view
class=
"checked-box row verCenter"
@
click
.
stop=
"checkboxchange(460053411)"
><text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':allcheck}">
</text>
全选
</view>
<view
class=
"pbx"
>
已选
{{
checkcount
}}
件,含税总额:
<text
class=
"price"
>
¥
{{
totalprice
}}
</text></view>
<view
class=
"pbx"
>
已选
{{
checkcount
}}
件,含税总额:
<text
class=
"price"
>
¥
{{
totalprice
}}
</text></view>
</view>
</view>
<view
class=
"b row bothSide"
>
<view
class=
"b row bothSide"
>
<view
class=
"bj-btn"
@
click=
"confirm(2)"
>
生成报价单
</view>
<view
class=
"bj-btn"
@
click=
"confirm(2)"
>
生成报价单
</view>
<view
class=
"row verCenter bothSide"
>
<view
class=
"row verCenter bothSide"
>
<view
class=
"add-car"
@
click=
"openAddList"
>
加入清单
</view>
<view
class=
"add-car"
@
click=
"openAddList"
>
加入清单
</view>
<view
class=
"add-confirm"
@
click=
"confirm(1)"
>
去订购
</view>
<view
class=
"add-confirm"
@
click=
"confirm(1)"
>
去订购
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<bottomNavFixed
actval=
"3"
ref=
"bottomNav"
/>
<bottomNavFixed
actval=
"3"
ref=
"bottomNav"
/>
<!--加入清单-->
<!--加入清单-->
<uni-popup
ref=
"popupaddlist"
type=
"bottom"
:safe-area=
"false"
>
<uni-popup
ref=
"popupaddlist"
type=
"bottom"
:safe-area=
"false"
>
<view
class=
"pop-add-list"
>
<view
class=
"pop-add-list"
>
<view
class=
"trt"
><text
class=
"icon iconfont icon-caca"
@
click=
"closeAddList"
></text></view>
<view
class=
"trt"
><text
class=
"icon iconfont icon-caca"
@
click=
"closeAddList"
></text></view>
<view
class=
"ttit elep"
>
加入清单
</view>
<view
class=
"ttit elep"
>
加入清单
</view>
<view
class=
"new-box row"
>
<view
class=
"new-box row"
>
<text
class=
"new-btn row verCenter"
@
click=
"openNewList"
>
新建清单
<text
<text
class=
"new-btn row verCenter"
@
click=
"openNewList"
>
新建清单
<text
class=
"icon iconfont icon-jia"
></text></text>
class=
"icon iconfont icon-jia"
></text></text>
</view>
</view>
<view
class=
"list-box"
v-if=
"qDList.length>0"
>
<view
class=
"list-box"
v-if=
"qDList.length>0"
>
<view
class=
"item row verCenter bothSide"
v-for=
"(item,index) in qDList"
:key=
"index"
>
<view
class=
"item row verCenter bothSide"
v-for=
"(item,index) in qDList"
:key=
"index"
>
<view
class=
"row verCenter"
@
click
.
stop=
"chooseQd(item.list_id)"
>
<view
class=
"row verCenter"
@
click
.
stop=
"chooseQd(item.list_id)"
>
<view
class=
"l"
>
<view
class=
"l"
>
<text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':item.checked}">
</text>
<text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':item.checked}" >
</text>
</view>
</view>
<view
class=
"c"
>
<view
class=
"c"
>
<view
class=
"elep"
>
{{
item
.
list_name
}}
</view>
<view
class=
"elep"
>
{{
item
.
list_name
}}
</view>
<text>
{{
item
.
create_time
}}
</text>
<text>
{{
item
.
create_time
}}
</text>
</view>
</view>
</view>
</view>
<navigator
:url=
"'/pages/user/qdDetail?list_id='+item.list_id"
>
<navigator
:url=
"'/pages/user/qdDetail?list_id='+item.list_id"
>
<view
class=
"r row verCenter"
>
<view
class=
"r row verCenter"
>
<text>
{{
item
.
list_goods_count
}}
个商品
</text>
<text>
{{
item
.
list_goods_count
}}
个商品
</text>
<text
class=
"icon iconfont icon-arrowright"
></text>
<text
class=
"icon iconfont icon-arrowright"
></text>
</view>
</view>
</navigator>
</navigator>
</view>
</view>
</view>
</view>
<view
class=
"list-box"
v-else
>
<view
class=
"list-box"
v-else
>
<view
class=
"no-data"
>
<view
class=
"no-data"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/07a360187d83ccf80a9d835029c27446.png"
/>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/07a360187d83ccf80a9d835029c27446.png"
/>
<view>
暂无清单数据,先去创建清单吧!
</view>
<view>
暂无清单数据,先去创建清单吧!
</view>
</view>
</view>
</view>
</view>
<view
class=
"add-list"
@
click=
"addQdList()"
>
确认
</view>
<view
class=
"add-list"
@
click=
"addQdList()"
>
确认
</view>
</view>
</view>
</uni-popup>
</uni-popup>
<!--新建清单-->
<!--新建清单-->
<uni-popup
ref=
"popupnewlist"
type=
"bottom"
:safe-area=
"false"
>
<uni-popup
ref=
"popupnewlist"
type=
"bottom"
:safe-area=
"false"
>
<view
class=
"pop-new-list"
>
<view
class=
"pop-new-list"
>
<view
class=
"trt"
><text
class=
"icon iconfont icon-caca"
@
click=
"closeNewList"
></text></view>
<view
class=
"trt"
><text
class=
"icon iconfont icon-caca"
@
click=
"closeNewList"
></text></view>
<view
class=
"ttit elep"
>
新建清单
</view>
<view
class=
"ttit elep"
>
新建清单
</view>
<view
class=
"cons"
>
<view
class=
"cons"
>
<input
type=
"text"
class=
"inputv"
v-model=
"list_name"
placeholder=
"请输入清单名称,若未输入则显示商品分类;"
/>
<input
type=
"text"
class=
"inputv"
v-model=
"list_name"
placeholder=
"请输入清单名称,若未输入则显示商品编码;"
/>
</view>
</view>
<view
class=
"add-list"
@
click=
"createList()"
>
确认
</view>
<view
class=
"add-list"
@
click=
"createList()"
>
确认
</view>
</view>
</view>
</uni-popup>
</uni-popup>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Api_Url
}
from
'@/util/api.js'
import
{
Api_Url
}
from
'@/util/api.js'
import
barX
from
'@/components/barx.vue'
;
import
barX
from
'@/components/barx.vue'
;
import
delSlideLeft
from
'@/components/ay-operate/del_slideLeft.vue'
import
delSlideLeft
from
'@/components/ay-operate/del_slideLeft.vue'
import
bottomNavFixed
from
'@/components/bottom_nav.vue'
;
import
bottomNavFixed
from
'@/components/bottom_nav.vue'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
timeout
:
""
,
//请求延迟定时器
timeout
:
""
,
//请求延迟定时器
dataInited
:
false
,
//是否加载过数据
dataInited
:
false
,
//是否加载过数据
allcheck
:
true
,
allcheck
:
true
,
isEdit
:
false
,
isEdit
:
false
,
carList
:
[],
carList
:
[],
totalprice
:
0
,
totalprice
:
0
,
checkcount
:
0
,
checkcount
:
0
,
isLogin
:
uni
.
getStorageSync
(
'token'
)?
true
:
false
,
isLogin
:
uni
.
getStorageSync
(
'token'
)
?
true
:
false
,
list_name
:
""
,
//清单名字
list_name
:
""
,
//清单名字
qDList
:[]
qDList
:
[]
}
}
},
},
onLoad
:
function
()
{
onLoad
:
function
()
{
if
(
this
.
isLogin
){
if
(
this
.
isLogin
)
{
this
.
getData
()
this
.
getData
()
}
}
this
.
getQdList
()
this
.
getQdList
()
},
},
methods
:
{
getData
(
type
)
{
if
(
!
type
)
{
this
.
carList
=
[]
}
this
.
request
(
Api_Url
+
'/api/cart/getCartList'
,
'GET'
,
{},
(
type
?
false
:
true
)).
then
(
res
=>
{
this
.
dataInited
=
true
;
this
.
allcheck
=
true
this
.
carList
=
[]
if
(
res
.
code
==
0
)
{
let
arr_
=
res
.
data
.
delivery_time_data
||
[]
let
newArr
=
[]
Object
.
keys
(
arr_
).
forEach
(
item
=>
{
arr_
[
item
].
forEach
(
item1
=>
{
newArr
.
push
(
item1
)
})
})
newArr
.
forEach
(
item
=>
{
item
.
checked
=
true
item
.
goods_num
=
Number
(
item
.
goods_num
)
this
.
carList
.
push
(
item
)
})
this
.
listUi
()
}
});
},
listUi
()
{
this
.
totalprice
=
0
this
.
checkcount
=
0
this
.
carList
.
forEach
(
item
=>
{
if
(
item
.
checked
)
{
this
.
checkcount
++
this
.
totalprice
+=
Number
(
item
.
price
*
item
.
goods_num
)
}
})
this
.
totalprice
=
this
.
totalprice
.
toFixed
(
2
)
},
changeNum
(
sku_id
,
type
)
{
clearTimeout
(
this
.
timeout
);
this
.
timeout
=
setTimeout
(()
=>
{
let
result
=
(
this
.
carList
.
filter
(
item
=>
(
item
.
sku_id
==
sku_id
)))[
0
]
let
mpl
=
Number
(
result
.
goods_info
.
multiple
||
result
.
goods_info
.
mpl
);
//倍数 加减的数量基数
let
stock
=
Number
(
result
.
goods_info
.
stock
);
//库存
let
moq
=
Number
(
result
.
goods_info
.
moq
);
//起订量
let
value_
=
Number
(
result
.
goods_num
);
//当前的数量
value_
=
Math
.
ceil
(
value_
/
mpl
)
*
mpl
;
//失去焦点数量
result
.
goods_num
=
value_
;
//最终的数量
if
(
value_
<
moq
)
{
result
.
goods_num
=
moq
}
if
(
value_
>
stock
)
{
result
.
goods_num
=
Math
.
floor
(
stock
/
mpl
)
*
mpl
;
}
this
.
request
(
Api_Url
+
'/api/cart/updateCartNum'
,
'POST'
,
{
sku_id
:
result
.
sku_id
,
goods_num
:
result
.
goods_num
},
false
).
then
(
res
=>
{
this
.
listUi
()
});
},
800
);
},
addjNum
(
sku_id
,
type
)
{
let
result
=
(
this
.
carList
.
filter
(
item
=>
(
item
.
sku_id
==
sku_id
)))[
0
]
let
mpl
=
Number
(
result
.
goods_info
.
multiple
||
result
.
goods_info
.
mpl
);
//倍数 加减的数量基数
let
stock
=
Number
(
result
.
goods_info
.
stock
);
//库存
let
moq
=
Number
(
result
.
goods_info
.
moq
);
//起订量
let
value_
=
Number
(
result
.
goods_num
);
//当前的数量
if
(
type
==
1
)
{
//减法
var
down_value
=
value_
-
mpl
;
//减过后的值
if
(
down_value
<
moq
)
{
result
.
goods_num
=
moq
;
uni
.
showToast
({
title
:
'数量不能小于起订量'
,
duration
:
2000
,
icon
:
"none"
})
}
else
{
result
.
goods_num
=
down_value
}
}
else
{
//加法
var
up_value
=
value_
+
mpl
;
//加过后的值
if
(
up_value
>
stock
)
{
uni
.
showToast
({
title
:
'数量不能大于库存'
,
duration
:
2000
,
icon
:
"none"
})
result
.
goods_num
=
Math
.
floor
(
stock
/
mpl
)
*
mpl
;
}
else
{
result
.
goods_num
=
up_value
}
}
this
.
request
(
Api_Url
+
'/api/cart/updateCartNum'
,
'POST'
,
{
sku_id
:
result
.
sku_id
,
goods_num
:
result
.
goods_num
},
false
).
then
(
res
=>
{
this
.
listUi
()
});
},
checkboxchange
(
sku_id
)
{
if
(
sku_id
==
'460053411'
)
{
this
.
allcheck
=
!
this
.
allcheck
//全选
this
.
carList
.
forEach
(
item
=>
{
item
.
checked
=
this
.
allcheck
})
}
else
{
var
isall
=
1
;
this
.
carList
.
forEach
(
item
=>
{
if
(
item
.
sku_id
==
sku_id
)
{
item
.
checked
=
!
item
.
checked
}
if
(
!
item
.
checked
)
{
isall
=
0
;
}
})
if
(
!
isall
)
{
this
.
allcheck
=
false
}
else
{
this
.
allcheck
=
true
}
}
this
.
listUi
()
return
false
},
dels
(
sku_id
)
{
let
result
=
this
.
carList
.
filter
(
item
=>
item
.
checked
)
let
ids
=
result
.
map
(
item
=>
item
.
sku_id
).
join
(
','
)
if
(
sku_id
)
{
ids
=
String
(
sku_id
)
}
if
(
!
ids
)
{
uni
.
showToast
({
title
:
'请选择至少一个商品'
,
duration
:
2000
,
icon
:
"none"
})
return
}
uni
.
showModal
({
title
:
"删除"
,
content
:
"是否删除当前"
+
(
sku_id
?
"选中"
:
""
)
+
"商品?"
,
success
:
(
resp
)
=>
{
if
(
resp
.
confirm
)
{
this
.
request
(
Api_Url
+
'/api/cart/delCart'
,
'POST'
,
{
sku_id
:
ids
},
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
uni
.
showToast
({
title
:
'删除成功'
,
duration
:
2000
,
icon
:
"none"
})
this
.
$refs
.
bottomNav
.
updateCar
()
let
result
=
this
.
carList
.
filter
(
item
=>
ids
.
indexOf
(
item
.
sku_id
)
==
-
1
)
this
.
carList
=
JSON
.
parse
(
JSON
.
stringify
(
result
))
this
.
listUi
()
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
duration
:
2000
,
icon
:
"none"
})
}
});
}
}
})
},
confirm
(
type
)
{
let
result
=
this
.
carList
.
filter
(
item
=>
item
.
checked
)
let
ids
=
result
.
map
(
item
=>
item
.
sku_id
).
join
(
','
)
if
(
!
ids
)
{
uni
.
showToast
({
title
:
'请选择至少一个商品'
,
duration
:
2000
,
icon
:
"none"
})
return
}
uni
.
setStorageSync
(
'car_ids'
,
ids
);
uni
.
setStorageSync
(
'confirmOrderBackUrl'
,
`/pages/car/list`
)
uni
.
navigateTo
({
url
:
type
==
1
?
'/pages/car/confirmOrder'
:
'/pages/car/confirmQuote'
});
},
getQdList
()
{
if
(
!
uni
.
getStorageSync
(
'token'
))
{
return
}
this
.
request
(
Api_Url
+
'/api/xcx/getGoodsList'
,
'get'
,
{
page
:
1
,
limit
:
100
},
false
).
then
(
res
=>
{
this
.
qDList
=
[]
if
(
res
.
code
==
0
)
{
let
arr_
=
res
.
data
.
list
||
[]
arr_
.
forEach
(
item
=>
{
item
.
checked
=
false
})
this
.
qDList
=
arr_
}
})
},
chooseQd
(
list_id
)
{
this
.
qDList
.
forEach
(
item
=>
{
if
(
item
.
list_id
==
list_id
)
{
item
.
checked
=
!
item
.
checked
}
else
{
item
.
checked
=
false
}
})
},
createList
()
{
if
(
!
this
.
list_name
)
{
uni
.
showToast
({
title
:
"请输入清单名称"
,
icon
:
'none'
});
return
}
this
.
request
(
Api_Url
+
'/api/xcx/createGoodsList'
,
'post'
,
{
list_name
:
this
.
list_name
},
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
uni
.
showToast
({
title
:
"创建清单成功"
,
icon
:
'success'
});
this
.
closeNewList
()
this
.
getQdList
()
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'nonde'
});
}
})
},
addQdList
()
{
let
checkList
=
this
.
qDList
.
filter
(
item
=>
item
.
checked
)
if
(
checkList
.
length
==
0
)
{
uni
.
showToast
({
title
:
"请选择一条清单"
,
icon
:
'none'
});
return
}
let
checkedArr
=
this
.
carList
.
filter
(
item
=>
item
.
checked
)
let
sku_json
=
[]
checkedArr
.
forEach
(
item
=>
{
sku_json
.
push
({
sku_id
:
item
.
sku_id
,
qty
:
item
.
goods_num
})
})
this
.
request
(
Api_Url
+
'/api/xcx/addGoodsList'
,
'post'
,
{
list_id
:
checkList
[
0
].
list_id
,
sku_json
:
JSON
.
stringify
(
sku_json
)
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
uni
.
showToast
({
title
:
"加入清单成功"
,
icon
:
'success'
});
this
.
closeAddList
()
this
.
getQdList
()
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'nonde'
});
}
})
},
openAddList
()
{
let
checkedArr
=
this
.
carList
.
filter
(
item
=>
item
.
checked
)
if
(
checkedArr
.
length
==
0
)
{
uni
.
showToast
({
title
:
"请至少选择一条数据"
,
icon
:
'none'
});
return
}
if
(
!
uni
.
getStorageSync
(
'token'
))
{
uni
.
navigateTo
({
url
:
"/pages/auth/login?referer="
+
encodeURIComponent
(
`/pages/goods/detail?goods_id=
${
this
.
goods_id_page
}
`
)
})
return
}
this
.
$refs
.
popupaddlist
.
open
(
'bottom'
);
},
closeAddList
()
{
this
.
$refs
.
popupaddlist
.
close
(
'bottom'
);
},
openNewList
()
{
this
.
closeAddList
()
this
.
$refs
.
popupnewlist
.
open
(
'bottom'
);
},
closeNewList
()
{
this
.
$refs
.
popupnewlist
.
close
(
'bottom'
);
},
methods
:
{
},
getData
(
type
){
components
:
{
if
(
!
type
){
barX
,
this
.
carList
=
[]
bottomNavFixed
,
}
delSlideLeft
this
.
request
(
Api_Url
+
'/api/cart/getCartList'
,
'GET'
,
{},
(
type
?
false
:
true
)).
then
(
res
=>
{
}
this
.
dataInited
=
true
;
}
this
.
allcheck
=
true
this
.
carList
=
[]
if
(
res
.
code
==
0
)
{
let
arr_
=
res
.
data
.
delivery_time_data
||
[]
let
newArr
=
[]
Object
.
keys
(
arr_
).
forEach
(
item
=>
{
arr_
[
item
].
forEach
(
item1
=>
{
newArr
.
push
(
item1
)
})
})
newArr
.
forEach
(
item
=>
{
item
.
checked
=
true
item
.
goods_num
=
Number
(
item
.
goods_num
)
this
.
carList
.
push
(
item
)
})
this
.
listUi
()
}
});
},
listUi
(){
this
.
totalprice
=
0
this
.
checkcount
=
0
this
.
carList
.
forEach
(
item
=>
{
if
(
item
.
checked
){
this
.
checkcount
++
this
.
totalprice
+=
Number
(
item
.
price
*
item
.
goods_num
)
}
})
this
.
totalprice
=
this
.
totalprice
.
toFixed
(
2
)
},
changeNum
(
sku_id
,
type
){
clearTimeout
(
this
.
timeout
);
this
.
timeout
=
setTimeout
(()
=>
{
let
result
=
(
this
.
carList
.
filter
(
item
=>
(
item
.
sku_id
==
sku_id
)))[
0
]
let
mpl
=
Number
(
result
.
goods_info
.
multiple
||
result
.
goods_info
.
mpl
);
//倍数 加减的数量基数
let
stock
=
Number
(
result
.
goods_info
.
stock
);
//库存
let
moq
=
Number
(
result
.
goods_info
.
moq
);
//起订量
let
value_
=
Number
(
result
.
goods_num
);
//当前的数量
value_
=
Math
.
ceil
(
value_
/
mpl
)
*
mpl
;
//失去焦点数量
result
.
goods_num
=
value_
;
//最终的数量
if
(
value_
<
moq
)
{
result
.
goods_num
=
moq
}
if
(
value_
>
stock
)
{
result
.
goods_num
=
Math
.
floor
(
stock
/
mpl
)
*
mpl
;
}
this
.
request
(
Api_Url
+
'/api/cart/updateCartNum'
,
'POST'
,
{
sku_id
:
result
.
sku_id
,
goods_num
:
result
.
goods_num
},
false
).
then
(
res
=>
{
this
.
listUi
()
});
},
800
);
},
addjNum
(
sku_id
,
type
){
let
result
=
(
this
.
carList
.
filter
(
item
=>
(
item
.
sku_id
==
sku_id
)))[
0
]
let
mpl
=
Number
(
result
.
goods_info
.
multiple
||
result
.
goods_info
.
mpl
);
//倍数 加减的数量基数
let
stock
=
Number
(
result
.
goods_info
.
stock
);
//库存
let
moq
=
Number
(
result
.
goods_info
.
moq
);
//起订量
let
value_
=
Number
(
result
.
goods_num
);
//当前的数量
if
(
type
==
1
){
//减法
var
down_value
=
value_
-
mpl
;
//减过后的值
if
(
down_value
<
moq
)
{
result
.
goods_num
=
moq
;
uni
.
showToast
({
title
:
'数量不能小于起订量'
,
duration
:
2000
,
icon
:
"none"
})
}
else
{
result
.
goods_num
=
down_value
}
}
else
{
//加法
var
up_value
=
value_
+
mpl
;
//加过后的值
if
(
up_value
>
stock
)
{
uni
.
showToast
({
title
:
'数量不能大于库存'
,
duration
:
2000
,
icon
:
"none"
})
result
.
goods_num
=
Math
.
floor
(
stock
/
mpl
)
*
mpl
;
}
else
{
result
.
goods_num
=
up_value
}
}
this
.
request
(
Api_Url
+
'/api/cart/updateCartNum'
,
'POST'
,
{
sku_id
:
result
.
sku_id
,
goods_num
:
result
.
goods_num
},
false
).
then
(
res
=>
{
this
.
listUi
()
});
},
checkboxchange
(
sku_id
){
if
(
sku_id
==
'460053411'
){
this
.
allcheck
=!
this
.
allcheck
//全选
this
.
carList
.
forEach
(
item
=>
{
item
.
checked
=
this
.
allcheck
})
}
else
{
var
isall
=
1
;
this
.
carList
.
forEach
(
item
=>
{
if
(
item
.
sku_id
==
sku_id
){
item
.
checked
=!
item
.
checked
}
if
(
!
item
.
checked
){
isall
=
0
;
}
})
if
(
!
isall
){
this
.
allcheck
=
false
}
else
{
this
.
allcheck
=
true
}
}
this
.
listUi
()
return
false
},
dels
(
sku_id
){
let
result
=
this
.
carList
.
filter
(
item
=>
item
.
checked
)
let
ids
=
result
.
map
(
item
=>
item
.
sku_id
).
join
(
','
)
if
(
sku_id
){
ids
=
String
(
sku_id
)
}
if
(
!
ids
){
uni
.
showToast
({
title
:
'请选择至少一个商品'
,
duration
:
2000
,
icon
:
"none"
})
return
}
uni
.
showModal
({
title
:
"删除"
,
content
:
"是否删除当前"
+
(
sku_id
?
"选中"
:
""
)
+
"商品?"
,
success
:(
resp
)
=>
{
if
(
resp
.
confirm
)
{
this
.
request
(
Api_Url
+
'/api/cart/delCart'
,
'POST'
,
{
sku_id
:
ids
},
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
){
uni
.
showToast
({
title
:
'删除成功'
,
duration
:
2000
,
icon
:
"none"
})
this
.
$refs
.
bottomNav
.
updateCar
()
let
result
=
this
.
carList
.
filter
(
item
=>
ids
.
indexOf
(
item
.
sku_id
)
==-
1
)
this
.
carList
=
JSON
.
parse
(
JSON
.
stringify
(
result
))
this
.
listUi
()
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
duration
:
2000
,
icon
:
"none"
})
}
});
}
}
})
},
confirm
(
type
){
let
result
=
this
.
carList
.
filter
(
item
=>
item
.
checked
)
let
ids
=
result
.
map
(
item
=>
item
.
sku_id
).
join
(
','
)
if
(
!
ids
){
uni
.
showToast
({
title
:
'请选择至少一个商品'
,
duration
:
2000
,
icon
:
"none"
})
return
}
uni
.
setStorageSync
(
'car_ids'
,
ids
);
uni
.
setStorageSync
(
'confirmOrderBackUrl'
,
`/pages/car/list`
)
uni
.
navigateTo
({
url
:
type
==
1
?
'/pages/car/confirmOrder'
:
'/pages/car/confirmQuote'
});
},
getQdList
(){
if
(
!
uni
.
getStorageSync
(
'token'
)){
return
}
this
.
request
(
Api_Url
+
'/api/xcx/getGoodsList'
,
'get'
,
{
page
:
1
,
limit
:
100
},
false
).
then
(
res
=>
{
this
.
qDList
=
[]
if
(
res
.
code
==
0
){
let
arr_
=
res
.
data
.
list
||
[]
arr_
.
forEach
(
item
=>
{
item
.
checked
=
false
})
this
.
qDList
=
arr_
}
})
},
chooseQd
(
list_id
){
this
.
qDList
.
forEach
(
item
=>
{
if
(
item
.
list_id
==
list_id
){
item
.
checked
=!
item
.
checked
}
else
{
item
.
checked
=
false
}
})
},
createList
(){
if
(
!
this
.
list_name
){
uni
.
showToast
({
title
:
"请输入清单名称"
,
icon
:
'none'
});
return
}
this
.
request
(
Api_Url
+
'/api/xcx/createGoodsList'
,
'post'
,
{
list_name
:
this
.
list_name
},
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
){
uni
.
showToast
({
title
:
"创建清单成功"
,
icon
:
'success'
});
this
.
closeNewList
()
this
.
getQdList
()
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'nonde'
});
}
})
},
addQdList
(){
let
checkList
=
this
.
qDList
.
filter
(
item
=>
item
.
checked
)
if
(
checkList
.
length
==
0
){
uni
.
showToast
({
title
:
"请选择一条清单"
,
icon
:
'none'
});
return
}
let
checkedArr
=
this
.
carList
.
filter
(
item
=>
item
.
checked
)
let
sku_json
=
[]
checkedArr
.
forEach
(
item
=>
{
sku_json
.
push
({
sku_id
:
item
.
sku_id
,
qty
:
item
.
goods_num
})
})
this
.
request
(
Api_Url
+
'/api/xcx/addGoodsList'
,
'post'
,
{
list_id
:
checkList
[
0
].
list_id
,
sku_json
:
JSON
.
stringify
(
sku_json
)
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
){
uni
.
showToast
({
title
:
"加入清单成功"
,
icon
:
'success'
});
this
.
closeAddList
()
this
.
getQdList
()
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'nonde'
});
}
})
},
openAddList
()
{
let
checkedArr
=
this
.
carList
.
filter
(
item
=>
item
.
checked
)
if
(
checkedArr
.
length
==
0
){
uni
.
showToast
({
title
:
"请至少选择一条数据"
,
icon
:
'none'
});
return
}
if
(
!
uni
.
getStorageSync
(
'token'
)){
uni
.
navigateTo
({
url
:
"/pages/auth/login?referer="
+
encodeURIComponent
(
`/pages/goods/detail?goods_id=
${
this
.
goods_id_page
}
`
)
})
return
}
this
.
$refs
.
popupaddlist
.
open
(
'bottom'
);
},
closeAddList
()
{
this
.
$refs
.
popupaddlist
.
close
(
'bottom'
);
},
openNewList
()
{
this
.
closeAddList
()
this
.
$refs
.
popupnewlist
.
open
(
'bottom'
);
},
closeNewList
()
{
this
.
$refs
.
popupnewlist
.
close
(
'bottom'
);
},
},
components
:
{
barX
,
bottomNavFixed
,
delSlideLeft
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
@import
'../../assets/css/car/list.scss'
;
@import
'../../assets/css/car/list.scss'
;
</
style
>
</
style
>
\ No newline at end of file
pages/user/companyInfo.vue
View file @
877e3f28
...
@@ -7,19 +7,19 @@
...
@@ -7,19 +7,19 @@
<view
class=
"input-box"
>
<view
class=
"input-box"
>
<view
class=
"input-group row verCenter"
>
<view
class=
"input-group row verCenter"
>
<text
class=
"label required"
>
公司名称
</text>
<text
class=
"label required"
>
公司名称
</text>
<input
type=
"text"
v-model=
"formParams.com_name"
placeholder=
"请输入公司名称"
placeholder-class=
"placeholder-class"
@
blur=
"tianyancha()"
/>
<input
type=
"text"
v-model=
"formParams.com_name"
placeholder=
"请输入公司名称"
placeholder-class=
"placeholder-class"
@
blur=
"tianyancha()"
:disabled=
"id"
/>
</view>
</view>
<view
class=
"input-group row verCenter"
>
<view
class=
"input-group row verCenter"
>
<text
class=
"label required "
>
公司税号
</text>
<text
class=
"label required "
>
公司税号
</text>
<input
type=
"text"
v-model=
"formParams.tax_no"
placeholder=
"系统自动查询后补充"
placeholder-class=
"placeholder-class"
/>
<input
type=
"text"
v-model=
"formParams.tax_no"
placeholder=
"系统自动查询后补充"
placeholder-class=
"placeholder-class"
:disabled=
"id"
/>
</view>
</view>
<view
class=
"input-group row verCenter"
>
<view
class=
"input-group row verCenter"
>
<text
class=
"label required"
>
公司电话
</text>
<text
class=
"label required"
>
公司电话
</text>
<input
type=
"text"
v-model=
"formParams.com_tel"
placeholder=
"系统自动查询后补充"
placeholder-class=
"placeholder-class"
/>
<input
type=
"text"
v-model=
"formParams.com_tel"
placeholder=
"系统自动查询后补充"
placeholder-class=
"placeholder-class"
:disabled=
"id"
/>
</view>
</view>
<view
class=
"input-group row verCenter"
>
<view
class=
"input-group row verCenter"
>
<text
class=
"label required"
>
注册地址
</text>
<text
class=
"label required"
>
注册地址
</text>
<input
type=
"text"
v-model=
"formParams.com_addr"
placeholder=
"系统自动查询后补充"
placeholder-class=
"placeholder-class"
/>
<input
type=
"text"
v-model=
"formParams.com_addr"
placeholder=
"系统自动查询后补充"
placeholder-class=
"placeholder-class"
:disabled=
"id"
/>
</view>
</view>
<view
class=
"input-group row verCenter"
>
<view
class=
"input-group row verCenter"
>
<text
class=
"label required"
>
联系人
</text>
<text
class=
"label required"
>
联系人
</text>
...
...
pages/user/qdDetail.vue
View file @
877e3f28
<
template
>
<
template
>
<view
class=
"qdDetailPage"
>
<view
class=
"qdDetailPage"
>
<barX
/>
<barX
/>
<view
class=
"car-head row bothSide"
>
<view
class=
"car-head row bothSide"
>
<view
class=
"l row verCenter "
>
<view
class=
"l row verCenter "
>
<text
class=
"icon iconfont icon-arrowleft"
@
click=
"$goBack"
></text>
<text
class=
"icon iconfont icon-arrowleft"
@
click=
"$goBack"
></text>
<view>
清单详情
</view>
<view>
清单详情
</view>
</view>
</view>
<view
class=
"r row verCenter"
>
<view
class=
"r row verCenter"
>
<text
@
click=
"dels()"
>
删除
</text>
<text
@
click=
"dels()"
>
删除
</text>
</view>
</view>
<view
class=
"name-box row verCenter"
><text
@
click=
"openNewList"
>
{{
list_name
}}
<text
class=
"icon iconfont icon-edit"
></text></text></view>
<view
class=
"cons"
>
<view
class=
"no-data"
v-if=
"dataInited&&carList.length==0"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/19/7fdab385a25db187f8e57370875f7546.png"
/>
<text>
暂无商品信息!
</text>
</view>
<view
class=
"list-box"
v-if=
"carList.length>0"
>
<view
class=
"item-group row verCenter bothSide"
v-for=
"(item,index) in carList"
:key=
"index"
>
<view
class=
"l row verCenter"
>
<text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':item.checked}" @click.stop="checkboxchange(item.sku_id)">
</text>
<image
:src=
"item.goods_images||'https://www.iedge.net/assets/images/common/defaultnew.png'"
/>
</view>
<view
class=
"r"
>
<view
class=
"elep skun"
>
{{
item
.
sku_name
}}
</view>
<view
class=
"txt"
>
型号:
{{
item
.
goods_name
}}
</view>
<view
class=
"txt"
>
品牌:
{{
item
.
brand_name
}}
</view>
<view
class=
"txt"
>
货期:
{{
item
.
cn_delivery_time
}}
</view>
<view
class=
"row verCenter bothSide"
>
<view
class=
"price"
>
¥
{{
item
.
goods_price
}}
</view>
<view
class=
"hbha row verCenter bothSide"
>
<text
class=
"icon iconfont icon-jian"
@
click=
"addjNum(item.sku_id,1)"
></text>
<input
type=
"number"
v-model=
"item.goods_count"
@
input=
"changeNum(item.sku_id)"
/>
<text
class=
"icon iconfont icon-jia"
@
click=
"addjNum(item.sku_id,2)"
></text>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"car-foot car-foot1 row bothSide"
>
</view>
<view
class=
"t row bothSide verCenter"
>
</view>
<view
class=
"checked-box row verCenter"
@
click
.
stop=
"checkboxchange(460053411)"
><text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':allcheck}">
</text>
全选
</view>
<view
class=
"name-box row verCenter"
><text
@
click=
"openNewList"
>
{{
list_name
}}
<text
class=
"icon iconfont icon-edit"
></text></text></view>
<view
class=
"pbx"
>
已选
{{
checkcount
}}
件,含税总额:
<view
class=
"price"
>
¥
{{
totalprice
}}
</view></view>
<view
class=
"cons"
>
</view>
<view
class=
"no-data"
v-if=
"dataInited&&carList.length==0"
>
<view
class=
"b row bothSide verCenter"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/19/7fdab385a25db187f8e57370875f7546.png"
/>
<view
class=
"row verCenter bothSide"
>
<text>
暂无商品信息!
</text>
<view
class=
"add-car"
@
click=
"addCar"
>
加入购物车
</view>
</view>
<view
class=
"add-confirm"
@
click=
"addCar(1)"
>
去订购
</view>
</view>
</view>
<view
class=
"list-box"
v-if=
"carList.length>0"
>
</view>
<view
class=
"item-group row verCenter bothSide"
v-for=
"(item,index) in carList"
:key=
"index"
>
<view
class=
"l row verCenter"
>
<!--修改清单-->
<text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':item.checked}" @click.stop="checkboxchange(item.sku_id)">
</text>
<uni-popup
ref=
"popupnewlist"
type=
"bottom"
:safe-area=
"false"
>
<image
:src=
"item.goods_images||'https://www.iedge.net/assets/images/common/defaultnew.png'"
/>
<view
class=
"pop-new-list"
>
</view>
<view
class=
"trt"
><text
class=
"icon iconfont icon-caca"
@
click=
"closeNewList"
></text></view>
<view
class=
"r"
>
<view
class=
"ttit elep"
>
修改清单
</view>
<view
class=
"elep skun"
>
{{
item
.
sku_name
}}
</view>
<view
class=
"cons"
>
<view
class=
"txt"
>
型号:
{{
item
.
goods_name
}}
</view>
<input
type=
"text"
class=
"inputv"
v-model=
"list_name"
placeholder=
"请输入清单名称,若未输入则显示商品编码;"
/>
<view
class=
"txt"
>
品牌:
{{
item
.
brand_name
}}
</view>
</view>
<view
class=
"txt"
>
货期:
{{
item
.
cn_delivery_time
}}
</view>
<view
class=
"add-list"
@
click=
"updateList()"
>
确认
</view>
<view
class=
"row verCenter bothSide"
>
</view>
<view
class=
"price"
>
¥
{{
item
.
goods_price
}}
</view>
</uni-popup>
<view
class=
"hbha row verCenter bothSide"
>
<text
class=
"icon iconfont icon-jian"
@
click=
"addjNum(item.sku_id,1)"
></text>
</view>
<input
type=
"number"
v-model=
"item.goods_count"
@
input=
"changeNum(item.sku_id)"
/>
<text
class=
"icon iconfont icon-jia"
@
click=
"addjNum(item.sku_id,2)"
></text>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"car-foot car-foot1 row bothSide"
>
<view
class=
"t row bothSide verCenter"
>
<view
class=
"checked-box row verCenter"
@
click
.
stop=
"checkboxchange(460053411)"
><text
class=
"icon iconfont icon-checked1"
:class=
"
{'icon-checked':allcheck}">
</text>
全选
</view>
<view
class=
"pbx"
>
已选
{{
checkcount
}}
件,含税总额:
<view
class=
"price"
>
¥
{{
totalprice
}}
</view>
</view>
</view>
<view
class=
"b row bothSide verCenter"
>
<view
class=
"row verCenter bothSide"
>
<view
class=
"add-car"
@
click=
"addCar"
>
加入购物车
</view>
<view
class=
"add-confirm"
@
click=
"addCar(1)"
>
去订购
</view>
</view>
</view>
</view>
<!--修改清单-->
<uni-popup
ref=
"popupnewlist"
type=
"bottom"
:safe-area=
"false"
>
<view
class=
"pop-new-list"
>
<view
class=
"trt"
><text
class=
"icon iconfont icon-caca"
@
click=
"closeNewList"
></text></view>
<view
class=
"ttit elep"
>
修改清单
</view>
<view
class=
"cons"
>
<input
type=
"text"
class=
"inputv"
v-model=
"list_name"
placeholder=
"请输入清单名称,若未输入则显示商品分类;"
/>
</view>
<view
class=
"add-list"
@
click=
"updateList()"
>
确认
</view>
</view>
</uni-popup>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
Api_Url
Api_Url
}
from
'@/util/api.js'
}
from
'@/util/api.js'
import
barX
from
'@/components/barx.vue'
;
import
barX
from
'@/components/barx.vue'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
checkcount
:
0
,
checkcount
:
0
,
timeout
:
""
,
//请求延迟定时器
timeout
:
""
,
//请求延迟定时器
dataInited
:
false
,
//是否加载过数据
dataInited
:
false
,
//是否加载过数据
allcheck
:
true
,
allcheck
:
true
,
isEdit
:
false
,
isEdit
:
false
,
carList
:
[],
carList
:
[],
totalprice
:
0
,
totalprice
:
0
,
list_id
:
""
,
list_id
:
""
,
share_uuid
:
""
,
share_uuid
:
""
,
list_name
:
""
,
//清单名字
list_name
:
""
,
//清单名字
isCompany
:(
uni
.
getStorageSync
(
'user_info'
)
&&
JSON
.
parse
(
uni
.
getStorageSync
(
'user_info'
)).
company_name
)?
true
:
false
,
isCompany
:
(
uni
.
getStorageSync
(
'user_info'
)
&&
JSON
.
parse
(
uni
.
getStorageSync
(
'user_info'
)).
company_name
)
?
true
:
false
,
miniShareOptions
:
{
miniShareOptions
:
{
title
:
'给您分享我的清单'
,
title
:
'给您分享我的清单'
,
path
:
'/pages/user/qdDetail'
,
path
:
'/pages/user/qdDetail'
,
imageUrl
:
'https://img.ichunt.com/images/ichunt/202503/11/8bd43dcc1b28a3fd8c417ac0c6410406.png'
,
imageUrl
:
'https://img.ichunt.com/images/ichunt/202503/11/8bd43dcc1b28a3fd8c417ac0c6410406.png'
,
desc
:
''
desc
:
''
}
}
}
}
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
list_id
=
options
.
list_id
this
.
list_id
=
options
.
list_id
this
.
share_uuid
=
options
.
share_uuid
this
.
share_uuid
=
options
.
share_uuid
this
.
getData
()
this
.
getData
()
},
},
onShareAppMessage
()
{
onShareAppMessage
()
{
return
{
return
{
...
this
.
miniShareOptions
,
...
this
.
miniShareOptions
,
success
:
()
=>
{
success
:
()
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'分享成功'
,
title
:
'分享成功'
,
icon
:
'success'
icon
:
'success'
});
});
},
},
fail
:
()
=>
{
fail
:
()
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'分享失败'
,
title
:
'分享失败'
,
icon
:
'none'
icon
:
'none'
});
});
}
}
};
};
},
},
onShareTimeline
()
{
onShareTimeline
()
{
return
{
return
{
...
this
.
miniShareOptions
,
...
this
.
miniShareOptions
,
success
:
()
=>
{
success
:
()
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'分享成功'
,
title
:
'分享成功'
,
icon
:
'success'
icon
:
'success'
});
});
},
},
fail
:
()
=>
{
fail
:
()
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'分享失败'
,
title
:
'分享失败'
,
icon
:
'none'
icon
:
'none'
});
});
}
}
};
};
},
},
methods
:
{
methods
:
{
getData
(
type
)
{
getData
(
type
)
{
if
(
!
type
)
{
if
(
!
type
)
{
this
.
carList
=
[]
this
.
carList
=
[]
}
}
this
.
request
(
Api_Url
+
'/api/xcx/goodsListDetail'
,
'GET'
,
{
list_id
:
this
.
list_id
,
share_uuid
:(
this
.
share_uuid
||
''
)},
(
type
?
false
:
true
)).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/api/xcx/goodsListDetail'
,
'GET'
,
{
list_id
:
this
.
list_id
,
share_uuid
:
(
this
.
share_uuid
||
''
)
},
(
type
?
false
:
true
)).
then
(
res
=>
{
this
.
dataInited
=
true
;
this
.
dataInited
=
true
;
this
.
allcheck
=
true
this
.
allcheck
=
true
this
.
carList
=
[]
this
.
carList
=
[]
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
list_name
=
res
.
data
.
info
.
list_name
this
.
list_name
=
res
.
data
.
info
.
list_name
this
.
list_id
=
res
.
data
.
info
.
list_id
this
.
list_id
=
res
.
data
.
info
.
list_id
this
.
share_uuid
=
res
.
data
.
info
.
share_uuid
this
.
share_uuid
=
res
.
data
.
info
.
share_uuid
this
.
miniShareOptions
.
path
=
'/pages/user/qdDetail?list_id='
+
this
.
list_id
+
"&share_uuid="
+
this
.
share_uuid
this
.
miniShareOptions
.
path
=
'/pages/user/qdDetail?list_id='
+
this
.
list_id
+
"&share_uuid="
+
this
.
share_uuid
let
arr_
=
res
.
data
.
list
||
[]
let
arr_
=
res
.
data
.
list
||
[]
arr_
.
forEach
(
item
=>
{
arr_
.
forEach
(
item
=>
{
item
.
checked
=
true
item
.
checked
=
true
item
.
buyPrice
=
item
.
goods_price
item
.
buyPrice
=
item
.
goods_price
if
(
item
.
ladder_price
&&
item
.
ladder_price
.
length
>
0
)
{
if
(
item
.
ladder_price
&&
item
.
ladder_price
.
length
>
0
)
{
item
.
buyPrice
=
this
.
isCompany
?(
item
[
'ladder_price'
][
1
][
'price_cn'
]
||
0
):(
item
[
'ladder_price'
][
0
][
'price_cn'
]
||
0
)
item
.
buyPrice
=
this
.
isCompany
?
(
item
[
'ladder_price'
][
1
][
'price_cn'
]
||
0
)
:
(
item
[
'ladder_price'
][
0
][
'price_cn'
]
||
0
)
}
}
item
.
goods_price
=
item
.
buyPrice
item
.
goods_price
=
item
.
buyPrice
this
.
carList
.
push
(
item
)
this
.
carList
.
push
(
item
)
})
})
this
.
listUi
()
this
.
listUi
()
}
}
});
});
},
},
listUi
()
{
listUi
()
{
this
.
totalprice
=
0
this
.
totalprice
=
0
this
.
checkcount
=
0
this
.
checkcount
=
0
this
.
carList
.
forEach
(
item
=>
{
this
.
carList
.
forEach
(
item
=>
{
if
(
item
.
checked
)
{
if
(
item
.
checked
)
{
this
.
checkcount
++
this
.
checkcount
++
this
.
totalprice
+=
Number
(
item
.
goods_price
*
item
.
goods_count
)
this
.
totalprice
+=
Number
(
item
.
goods_price
*
item
.
goods_count
)
}
}
})
})
this
.
totalprice
=
this
.
totalprice
.
toFixed
(
2
)
this
.
totalprice
=
this
.
totalprice
.
toFixed
(
2
)
},
},
changeNum
(
sku_id
,
type
)
{
changeNum
(
sku_id
,
type
)
{
clearTimeout
(
this
.
timeout
);
clearTimeout
(
this
.
timeout
);
this
.
timeout
=
setTimeout
(()
=>
{
this
.
timeout
=
setTimeout
(()
=>
{
let
result
=
(
this
.
carList
.
filter
(
item
=>
(
item
.
sku_id
==
sku_id
)))[
0
]
let
result
=
(
this
.
carList
.
filter
(
item
=>
(
item
.
sku_id
==
sku_id
)))[
0
]
let
mpl
=
Number
(
result
.
multiple
||
result
.
mpl
);
//倍数 加减的数量基数
let
mpl
=
Number
(
result
.
multiple
||
result
.
mpl
);
//倍数 加减的数量基数
let
stock
=
Number
(
result
.
stock
);
//库存
let
stock
=
Number
(
result
.
stock
);
//库存
let
moq
=
Number
(
result
.
moq
);
//起订量
let
moq
=
Number
(
result
.
moq
);
//起订量
let
value_
=
Number
(
result
.
goods_count
);
//当前的数量
let
value_
=
Number
(
result
.
goods_count
);
//当前的数量
value_
=
Math
.
ceil
(
value_
/
mpl
)
*
mpl
;
//失去焦点数量
value_
=
Math
.
ceil
(
value_
/
mpl
)
*
mpl
;
//失去焦点数量
result
.
goods_count
=
value_
;
//最终的数量
result
.
goods_count
=
value_
;
//最终的数量
if
(
value_
<
moq
)
{
if
(
value_
<
moq
)
{
result
.
goods_count
=
moq
result
.
goods_count
=
moq
}
}
if
(
value_
>
stock
)
{
if
(
value_
>
stock
)
{
result
.
goods_count
=
Math
.
floor
(
stock
/
mpl
)
*
mpl
;
result
.
goods_count
=
Math
.
floor
(
stock
/
mpl
)
*
mpl
;
}
}
this
.
request
(
Api_Url
+
'/api/xcx/updateGoodsNum'
,
'POST'
,
{
this
.
request
(
Api_Url
+
'/api/xcx/updateGoodsNum'
,
'POST'
,
{
sku_id
:
result
.
sku_id
,
sku_id
:
result
.
sku_id
,
goods_num
:
result
.
goods_count
,
goods_num
:
result
.
goods_count
,
list_id
:
this
.
list_id
list_id
:
this
.
list_id
},
false
).
then
(
res
=>
{
},
false
).
then
(
res
=>
{
this
.
listUi
()
this
.
listUi
()
});
});
},
800
);
},
800
);
},
},
addjNum
(
sku_id
,
type
)
{
addjNum
(
sku_id
,
type
)
{
let
result
=
(
this
.
carList
.
filter
(
item
=>
(
item
.
sku_id
==
sku_id
)))[
0
]
let
result
=
(
this
.
carList
.
filter
(
item
=>
(
item
.
sku_id
==
sku_id
)))[
0
]
let
mpl
=
Number
(
result
.
multiple
||
result
.
mpl
);
//倍数 加减的数量基数
let
mpl
=
Number
(
result
.
multiple
||
result
.
mpl
);
//倍数 加减的数量基数
let
stock
=
Number
(
result
.
stock
);
//库存
let
stock
=
Number
(
result
.
stock
);
//库存
let
moq
=
Number
(
result
.
moq
);
//起订量
let
moq
=
Number
(
result
.
moq
);
//起订量
let
value_
=
Number
(
result
.
goods_count
);
//当前的数量
let
value_
=
Number
(
result
.
goods_count
);
//当前的数量
if
(
type
==
1
)
{
if
(
type
==
1
)
{
//减法
//减法
var
down_value
=
value_
-
mpl
;
//减过后的值
var
down_value
=
value_
-
mpl
;
//减过后的值
if
(
down_value
<
moq
)
{
if
(
down_value
<
moq
)
{
result
.
goods_count
=
moq
;
result
.
goods_count
=
moq
;
uni
.
showToast
({
uni
.
showToast
({
title
:
'数量不能小于起订量'
,
title
:
'数量不能小于起订量'
,
duration
:
2000
,
duration
:
2000
,
icon
:
"none"
icon
:
"none"
})
})
}
else
{
}
else
{
result
.
goods_count
=
down_value
result
.
goods_count
=
down_value
}
}
}
else
{
}
else
{
//加法
//加法
var
up_value
=
value_
+
mpl
;
//加过后的值
var
up_value
=
value_
+
mpl
;
//加过后的值
if
(
up_value
>
stock
)
{
if
(
up_value
>
stock
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'数量不能大于库存'
,
title
:
'数量不能大于库存'
,
duration
:
2000
,
duration
:
2000
,
icon
:
"none"
icon
:
"none"
})
})
result
.
goods_count
=
Math
.
floor
(
stock
/
mpl
)
*
mpl
;
result
.
goods_count
=
Math
.
floor
(
stock
/
mpl
)
*
mpl
;
}
else
{
}
else
{
result
.
goods_count
=
up_value
result
.
goods_count
=
up_value
}
}
}
}
this
.
request
(
Api_Url
+
'/api/xcx/updateGoodsNum'
,
'POST'
,
{
this
.
request
(
Api_Url
+
'/api/xcx/updateGoodsNum'
,
'POST'
,
{
sku_id
:
result
.
sku_id
,
sku_id
:
result
.
sku_id
,
goods_num
:
result
.
goods_count
,
goods_num
:
result
.
goods_count
,
list_id
:
this
.
list_id
list_id
:
this
.
list_id
},
false
).
then
(
res
=>
{
},
false
).
then
(
res
=>
{
this
.
listUi
()
this
.
listUi
()
});
});
},
},
checkboxchange
(
sku_id
)
{
checkboxchange
(
sku_id
)
{
if
(
sku_id
==
'460053411'
)
{
if
(
sku_id
==
'460053411'
)
{
this
.
allcheck
=
!
this
.
allcheck
this
.
allcheck
=
!
this
.
allcheck
//全选
//全选
this
.
carList
.
forEach
(
item
=>
{
this
.
carList
.
forEach
(
item
=>
{
item
.
checked
=
this
.
allcheck
item
.
checked
=
this
.
allcheck
})
})
}
else
{
}
else
{
var
isall
=
1
;
var
isall
=
1
;
this
.
carList
.
forEach
(
item
=>
{
this
.
carList
.
forEach
(
item
=>
{
if
(
item
.
sku_id
==
sku_id
)
{
if
(
item
.
sku_id
==
sku_id
)
{
item
.
checked
=
!
item
.
checked
item
.
checked
=
!
item
.
checked
}
}
if
(
!
item
.
checked
)
{
if
(
!
item
.
checked
)
{
isall
=
0
;
isall
=
0
;
}
}
})
})
if
(
!
isall
)
{
if
(
!
isall
)
{
this
.
allcheck
=
false
this
.
allcheck
=
false
}
else
{
}
else
{
this
.
allcheck
=
true
this
.
allcheck
=
true
}
}
}
}
this
.
listUi
()
this
.
listUi
()
return
false
return
false
},
},
dels
()
{
dels
()
{
let
result
=
this
.
carList
.
filter
(
item
=>
item
.
checked
)
let
result
=
this
.
carList
.
filter
(
item
=>
item
.
checked
)
let
ids
=
result
.
map
(
item
=>
item
.
sku_id
).
join
(
','
)
let
ids
=
result
.
map
(
item
=>
item
.
sku_id
).
join
(
','
)
if
(
!
ids
)
{
if
(
!
ids
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'请选择至少一个商品'
,
title
:
'请选择至少一个商品'
,
duration
:
2000
,
duration
:
2000
,
icon
:
"none"
icon
:
"none"
})
})
return
return
}
}
uni
.
showModal
({
uni
.
showModal
({
title
:
"删除"
,
title
:
"删除"
,
content
:
"是否删除当前选中商品?"
,
content
:
"是否删除当前选中商品?"
,
success
:(
resp
)
=>
{
success
:
(
resp
)
=>
{
if
(
resp
.
confirm
)
{
if
(
resp
.
confirm
)
{
this
.
request
(
Api_Url
+
'/api/xcx/delGoods'
,
'POST'
,
{
list_id
:
this
.
list_id
,
sku_ids
:
ids
},
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/api/xcx/delGoods'
,
'POST'
,
{
list_id
:
this
.
list_id
,
sku_ids
:
ids
},
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'删除成功'
,
title
:
'删除成功'
,
duration
:
2000
,
duration
:
2000
,
icon
:
"none"
icon
:
"none"
})
})
let
result
=
this
.
carList
.
filter
(
item
=>
ids
.
indexOf
(
item
.
sku_id
)
==
-
1
)
let
result
=
this
.
carList
.
filter
(
item
=>
ids
.
indexOf
(
item
.
sku_id
)
==
-
1
)
this
.
carList
=
JSON
.
parse
(
JSON
.
stringify
(
result
))
this
.
carList
=
JSON
.
parse
(
JSON
.
stringify
(
result
))
this
.
listUi
()
this
.
listUi
()
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
msg
,
title
:
res
.
msg
,
duration
:
2000
,
duration
:
2000
,
icon
:
"none"
icon
:
"none"
})
})
}
}
});
});
}
}
}
}
})
})
},
},
addCar
(
type
)
{
addCar
(
type
)
{
let
json_arr
=
[]
let
json_arr
=
[]
let
ids
=
[]
let
ids
=
[]
this
.
carList
.
forEach
(
item
=>
{
this
.
carList
.
forEach
(
item
=>
{
if
(
item
.
checked
)
{
if
(
item
.
checked
)
{
let
js_
=
{
let
js_
=
{
goods_num
:
item
.
goods_count
,
goods_num
:
item
.
goods_count
,
sku_id
:
item
.
sku_id
,
sku_id
:
item
.
sku_id
,
price
:
item
.
goods_price
price
:
item
.
goods_price
}
}
if
(
type
==
1
)
{
if
(
type
==
1
)
{
js_
.
is_cover_goods_num
=
1
js_
.
is_cover_goods_num
=
1
}
}
json_arr
.
push
(
js_
)
json_arr
.
push
(
js_
)
ids
.
push
(
item
.
sku_id
)
ids
.
push
(
item
.
sku_id
)
}
}
})
})
if
(
ids
.
length
==
0
)
{
if
(
ids
.
length
==
0
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
"请勾选商品"
,
title
:
"请勾选商品"
,
icon
:
'none'
icon
:
'none'
});
});
return
return
}
}
this
.
request
(
Api_Url
+
'/api/cart/batchAddCart'
,
'POST'
,
{
sku_json
:
JSON
.
stringify
(
json_arr
)
},
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/api/cart/batchAddCart'
,
'POST'
,
{
sku_json
:
JSON
.
stringify
(
json_arr
)
},
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
if
(
type
==
1
)
{
if
(
type
==
1
)
{
uni
.
setStorageSync
(
'car_ids'
,
ids
.
join
(
","
));
uni
.
setStorageSync
(
'car_ids'
,
ids
.
join
(
","
));
uni
.
setStorageSync
(
'confirmOrderBackUrl'
,
`/pages/user/qdDetail?list_id=
${
this
.
list_id
}
`
)
uni
.
setStorageSync
(
'confirmOrderBackUrl'
,
`/pages/user/qdDetail?list_id=
${
this
.
list_id
}
`
)
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/car/confirmOrder'
url
:
'/pages/car/confirmOrder'
});
});
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
"加入购物车成功"
,
title
:
"加入购物车成功"
,
icon
:
'success'
icon
:
'success'
});
});
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
msg
,
title
:
res
.
msg
,
icon
:
'error'
icon
:
'error'
});
});
}
}
});
});
},
},
updateList
()
{
updateList
()
{
if
(
!
this
.
list_name
)
{
if
(
!
this
.
list_name
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'请输入清单名字'
,
title
:
'请输入清单名字'
,
duration
:
2000
,
duration
:
2000
,
icon
:
"none"
icon
:
"none"
})
})
}
}
this
.
request
(
Api_Url
+
'/api/xcx/updateGoodsList'
,
'post'
,
{
list_name
:
this
.
list_name
,
list_id
:
this
.
list_id
},
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/api/xcx/updateGoodsList'
,
'post'
,
{
list_name
:
this
.
list_name
,
list_id
:
this
.
list_id
},
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
"修改成功"
,
title
:
"修改成功"
,
icon
:
'success'
icon
:
'success'
});
});
this
.
closeNewList
()
this
.
closeNewList
()
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
msg
,
title
:
res
.
msg
,
icon
:
'nonde'
icon
:
'nonde'
});
});
}
}
})
})
},
},
openNewList
()
{
openNewList
()
{
this
.
$refs
.
popupnewlist
.
open
(
'bottom'
);
this
.
$refs
.
popupnewlist
.
open
(
'bottom'
);
},
},
closeNewList
()
{
closeNewList
()
{
this
.
$refs
.
popupnewlist
.
close
(
'bottom'
);
this
.
$refs
.
popupnewlist
.
close
(
'bottom'
);
},
},
},
},
components
:
{
components
:
{
barX
barX
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
@import
'../../assets/css/user/qdDetail.scss'
;
@import
'../../assets/css/user/qdDetail.scss'
;
</
style
>
</
style
>
\ No newline at end of file
util/api.js
View file @
877e3f28
...
@@ -17,8 +17,8 @@ if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台
...
@@ -17,8 +17,8 @@ if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台
api_url
=
_env
==
'release'
?
'https://www.iedge.net'
:
'http://iedge.liexindev.net'
//
api_url = _env == 'release' ? 'https://www.iedge.net' : 'http://iedge.liexindev.net'
//
api_url = 'https://www.iedge.net'
api_url
=
'https://www.iedge.net'
console
.
log
(
api_url
,
_env
)
console
.
log
(
api_url
,
_env
)
}
else
{
// 其他平台(如 App 等)
}
else
{
// 其他平台(如 App 等)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment