Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lumastoreapp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xieyishang
lumastoreapp
Commits
a1a30795
Commit
a1a30795
authored
Nov 09, 2020
by
home
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zxf
parent
a7480613
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
456 additions
and
186 deletions
+456
-186
components/plan-image-upload/up_img.vue
components/plan-image-upload/up_img.vue
+1
-1
manifest.json
manifest.json
+7
-7
pages/addEditEleProduct/addEditEleProduct.vue
pages/addEditEleProduct/addEditEleProduct.vue
+320
-141
pages/eleProduct/eleProduct.scss
pages/eleProduct/eleProduct.scss
+9
-1
pages/eleProduct/eleProduct.vue
pages/eleProduct/eleProduct.vue
+54
-19
pages/index/index.vue
pages/index/index.vue
+54
-16
utils/api/merchant.js
utils/api/merchant.js
+11
-1
No files found.
components/plan-image-upload/up_img.vue
View file @
a1a30795
...
...
@@ -228,7 +228,7 @@
console
.
info
(
this
.
value
,
imageIndex
);
let
arr
=
this
.
value
.
map
((
item
,
index
)
=>
{
return
this
.
staticUrl1
+
item
.
data
;
return
this
.
staticUrl1
+
item
.
data
;
})
uni
.
previewImage
({
...
...
manifest.json
View file @
a1a30795
...
...
@@ -3,13 +3,13 @@
//
"appid"
:
"__UNI__FC9419E"
,
"appid"
:
"__UNI__1EA80F1"
,
//这个是
web
的
"description"
:
"商家"
,
"versionName"
:
"1.0.8
8
"
,
"versionCode"
:
18
8
,
"versionName"
:
"1.0.8
9
"
,
"versionCode"
:
18
9
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
/*
5
+App特有相关
weex
*/
"app-plus"
:
{
"usingComponents"
:
true
,
"nvueCompiler"
:
"
weex
"
,
"nvueCompiler"
:
"
uni-app
"
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
false
,
"waiting"
:
false
,
...
...
@@ -115,9 +115,9 @@
},
"splashscreen"
:
{
"android"
:
{
"hdpi"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe8
6.png"
,
"xhdpi"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"xxhdpi"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe8
6.png"
"hdpi"
:
"C:/Users/Administrator/Desktop/
da/DefaultLaunch640_113
6.png"
,
"xhdpi"
:
"C:/Users/Administrator/Desktop/
da/DefaultLaunch750_1334
.png"
,
"xxhdpi"
:
"C:/Users/Administrator/Desktop/
da/DefaultLaunch1125_243
6.png"
},
"ios"
:
{
"iphone"
:
{
...
...
pages/addEditEleProduct/addEditEleProduct.vue
View file @
a1a30795
<
template
>
<!-- 添加外卖商品 -->
<view
class=
"productpages"
>
<view
class=
"flexv ali-c"
style=
"padding: 30upx 0 0 0;"
>
<view
class=
"flexv ali-c"
style=
"padding: 30upx 0 0 0;"
:hidden=
"linkage_product_id != 0 "
v-if=
"is_bld == 1 && is_datashow"
>
<image
class=
"mb-20 img"
@
tap=
"saoma"
src=
"/static/icon/saoma.png"
></image>
<view>
扫码入库
</view>
</view>
<!--
<view
class=
"noecellbox"
>
<view
class=
"title"
>
关联产品
</view>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"text"
v-model=
""
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写产品名称"
/>
</view>
</view>
-->
<view
class=
"noecellbox"
>
<view
class=
"title"
>
关联产品
</view>
<view
class=
"inputbox flex"
>
<picker
mode=
"multiSelector"
:value=
"classDataValue"
:range=
"classData"
@
change=
"bindData"
@
columnchange=
"columnbindData"
>
<input
disabled=
"true"
class=
"input flex1"
type=
"text"
v-model=
"classValue"
placeholder-class=
"plclass"
placeholder=
"请选择关联产品"
/>
</picker>
</view>
</view>
<view
class=
"noecellbox"
>
<view
class=
"title"
>
产品规格(kg或个)
</view>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"text"
value=
""
v-model=
"form.specifications"
placeholder-class=
"plclass"
placeholder=
"请填写产品规格"
/>
</view>
</view>
<view
class=
"noecellbox"
>
<view
class=
"title"
>
产品名称
<text
style=
"color: red;"
>
(必填)
</text></view>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"text"
v-model=
"form.product_name"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写产品名称"
/>
</view>
</view>
...
...
@@ -31,7 +55,8 @@
original_name 原始商品名
-->
<!-- 2020-10-12 -->
<view
class=
"noecellbox"
>
<view
class=
""
:hidden=
"linkage_product_id != 0 "
v-if=
"is_bld == 1 && is_datashow"
>
<!--
<view
class=
"noecellbox"
>
<view
class=
"title"
>
售卖类型
</view>
<view
class=
"inputbox flex"
>
<radio-group
@
change=
"radioChange"
>
...
...
@@ -44,13 +69,10 @@
<view
class=
"titles"
>
{{
item
.
name
}}
</view>
</label>
</view>
</view>
</radio-group>
</view>
</view>
</view>
-->
<view
class=
"noecellbox"
v-if=
"isadd==1"
>
...
...
@@ -90,7 +112,7 @@
<view
class=
"noecellbox"
v-if=
"!codeDisabled"
>
<view
class=
"title"
>
条形编码
</view>
<view
class=
"title"
>
条形编码
<text
style=
"color: #808080;"
>
(称重商品编码1-4000)
</text>
</view>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"number"
v-model=
"form.code"
@
tap=
"onCodeFocus"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写条形编码"
/>
</view>
...
...
@@ -117,8 +139,8 @@
<view
class=
"noecellbox"
>
<view
class=
"title"
>
生产日期
</view>
<view
class=
"inputbox flex"
>
<picker
mode=
"date
"
:value=
"form.manufacture_date"
@
change=
"bindDateChange"
>
<input
class=
"input flex1"
type=
"text"
v-model=
"form.manufacture_date"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写生产日期"
/>
<picker
mode=
"date"
fields=
"day
"
:value=
"form.manufacture_date"
@
change=
"bindDateChange"
>
<input
disabled=
"true"
class=
"input flex1"
type=
"text"
v-model=
"form.manufacture_date"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写生产日期"
/>
<!--
<view
class=
"uni-input"
>
{{
date
}}
</view>
-->
</picker>
</view>
...
...
@@ -151,8 +173,11 @@
</view>
</view>
</view>
<!-- YYYYY -->
<view
class=
""
:hidden=
"linkage_product_id != 0 "
v-if=
"is_datashow"
>
<view
class=
"briefIntroduction"
>
<view
class=
"title fontColor"
>
产品描述
<text
style=
"color: red;"
>
(必填)
</text></view>
...
...
@@ -184,7 +209,6 @@
</view>
</view>
<view
class=
"addmigs"
>
<view
class=
"titlehe"
>
缩略图
<text
style=
"color: red;"
>
(必传)
</text></view>
<robby-image-upload
...
...
@@ -256,7 +280,7 @@
</picker-view-column>
</picker-view>
</view>
</view>
<view
class=
"submitbtn active"
@
tap=
"getForm"
>
提交
</view>
</view>
...
...
@@ -265,6 +289,8 @@
<
script
>
import
QSApp
from
'
@/components/QS-inputs-split/js/app.js
'
;
import
{
addEditEleProduct
,
typeManager
,
eleProductInfo
,
findEleProduct
}
from
"
@/utils/api/api.js
"
;
import
{
getskipShop
,
getshopclass
}
from
"
@/utils/api/merchant.js
"
;
import
robbyImageUpload
from
'
@/components/plan-image-upload/up_img
'
;
//上传资质图片组件
import
{
getActivityList
}
from
'
@/utils/api/merchant.js
'
;
export
default
{
...
...
@@ -272,8 +298,20 @@
robbyImageUpload
},
data
()
{
return
{
linkage_id
:
''
,
is_datashow
:
true
,
bools
:
''
,
linkage_product_id
:
''
,
classValue
:
''
,
ordinary
:[],
weigh
:[],
classData
:[
[
'
普通商品
'
,
'
称重商品
'
],
[]
],
classDataValue
:[
0
,
0
],
is_bld
:
''
,
isadd
:
0
,
//0 填写商品库存 1修改库存
stock_number
:
''
,
stockType
:
1
,
...
...
@@ -307,7 +345,10 @@
name
:
'
product
'
,
result
:[],
form
:
{
linkage_id
:
''
,
//cost_price 成本价 stock 商品库存purchase 进货价钱code 条形编码commission 返佣比例original_name 原始商品名
specifications
:
''
,
//商品规格
stock
:
''
,
//商品库存
cost_price
:
''
,
//进货价钱
code
:
''
,
//条形编码
...
...
@@ -315,7 +356,7 @@
sell_type
:
0
,
// 售卖类型
commodity_data
:{},
//原始商品名
quality_guarantee_period
:
0
,
//保质期(月)
manufacture_date
:
'
2020-10-1
'
,
//生产日期
manufacture_date
:
''
,
//生产日期
manufacturer
:
''
,
///生产厂商
brand
:
''
,
// 品牌
checkbox
:
[],
//断选
...
...
@@ -361,7 +402,8 @@
cate_name
:
""
,
index
:
0
,
isScanCode
:
true
,
//是不是点击了扫码
codeDisabled
:
false
//条形码是否能输入
codeDisabled
:
false
,
//条形码是否能输入
update
:
true
}
},
computed
:
{
...
...
@@ -379,9 +421,34 @@
// }
},
onLoad
(
opdata
)
{
this
.
isadd
=
opdata
.
isadd
getskipShop
({
type
:
'
bld
'
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
is_bld
=
res
.
data
.
is_bld
// this.is_bld=1
}
})
getshopclass
({}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
console
.
log
(
res
.
data
)
this
.
ordinary
=
res
.
data
.
ordinary
this
.
weigh
=
res
.
data
.
weigh
this
.
classData
[
1
]
=
Array
.
from
(
res
.
data
.
ordinary
)
if
(
this
.
ordinary
.
length
!=
[]){
for
(
let
i
=
0
;
i
<
res
.
data
.
ordinary
.
length
;
i
++
){
this
.
classData
[
1
][
i
]
=
res
.
data
.
ordinary
[
i
].
product_name
}
}
console
.
log
(
this
.
classData
[
1
])
}
})
console
.
log
(
this
.
isadd
,
'
aaa
'
)
this
.
isadd
=
opdata
.
isadd
// console.log(this.isadd,'aaa')
this
.
c_formData
.
user_token
=
this
.
$store
.
state
.
token
;
this
.
activity_type
=
opdata
.
activity_type
,
this
.
isShow
=
this
.
activity_type
==
1
?
true
:
false
...
...
@@ -398,16 +465,97 @@
this
.
typeManagerfun
();
this
.
getActivityListfun
();
//获取数据列表
// console.log(JSON.parse(opdata.results).data.code,111111111111111111111111111111111)
// let results=JSON.parse(opdata.results);
if
(
opdata
.
results
){
if
(
JSON
.
parse
(
opdata
.
results
).
data
.
code
==
1
){
let
results
=
JSON
.
parse
(
opdata
.
results
);
//扫描得到得商品信息
this
.
findEleProduct
(
results
);
// this.findEleProduct(opdata.results);
}
else
{
let
results
=
JSON
.
parse
(
opdata
.
results
);
this
.
form
.
code
=
results
.
code
this
.
findEleProduct
(
results
)
}
}
// this.issancodeType = opdata.results.issancodeType
// this.isType = opdata.results.isType
// console.log(this.isType)
},
methods
:
{
columnbindData
(
e
){
// console.log(e,'啊啊啊啊啊')
this
.
classDataValue
[
e
.
detail
.
column
]
=
e
.
detail
.
value
;
if
(
e
.
detail
.
column
==
0
){
if
(
e
.
detail
.
value
==
0
){
console
.
log
(
'
我滑动到普通商品
'
)
this
.
$set
(
this
.
classData
,
1
,[]);
if
(
this
.
ordinary
.
length
!=
0
){
this
.
ordinary
.
map
(
item
=>
{
this
.
classData
[
1
].
push
(
item
.
product_name
);
})
}
console
.
log
(
this
.
classData
[
1
])
}
else
{
console
.
log
(
'
我滑动到称重商品
'
)
// this.classData[1] = [];
this
.
$set
(
this
.
classData
,
1
,[]);
if
(
this
.
weigh
.
length
!=
0
){
this
.
weigh
.
map
(
item
=>
{
this
.
classData
[
1
].
push
(
item
.
product_name
);
})
}
}
}
},
bindData
(
e
){
let
that
=
this
console
.
log
(
e
)
if
(
e
.
detail
.
value
[
0
]
==
0
){
console
.
log
(
that
.
ordinary
.
length
,
'
左边
'
)
if
(
that
.
ordinary
.
length
!=
0
){
that
.
linkage_id
=
that
.
ordinary
[
e
.
detail
.
value
[
1
]].
product_id
that
.
product_id
=
that
.
ordinary
[
e
.
detail
.
value
[
1
]].
product_id
that
.
classValue
=
that
.
ordinary
[
e
.
detail
.
value
[
1
]].
product_name
}
else
{
AZ
uni
.
showToast
({
title
:
'
没有选中商品
'
,
icon
:
'
none
'
})
return
false
;
}
}
else
{
console
.
log
(
that
.
weigh
.
length
,
'
右边
'
)
if
(
that
.
weigh
.
length
!=
0
){
that
.
linkage_id
=
that
.
weigh
[
e
.
detail
.
value
[
1
]].
product_id
that
.
product_id
=
that
.
weigh
[
e
.
detail
.
value
[
1
]].
product_id
that
.
classValue
=
that
.
weigh
[
e
.
detail
.
value
[
1
]].
product_name
}
else
{
uni
.
showToast
({
title
:
'
没有选中商品
'
,
icon
:
'
none
'
})
return
false
;
}
}
that
.
eleProductInfofun
();
this
.
is_datashow
=
false
;
console
.
log
(
this
.
is_datashow
)
},
bingInput
(
e
){
let
stock_number
=
e
.
detail
.
value
;
this
.
stock_number
=
stock_number
;
...
...
@@ -435,7 +583,11 @@
},
async
findEleProduct
(
results
){
uni
.
showLoading
({
title
:
'
请稍后
'
});
let
res
=
await
findEleProduct
({
code
:
results
.
code
});
console
.
log
(
res
,
11111111111111111111111
)
uni
.
hideLoading
();
if
(
res
.
code
==-
1
){
//没有就录入
this
.
isadd
=
0
;
...
...
@@ -449,6 +601,7 @@
this
.
form
.
price
=
results
.
data
.
data
.
price
;
this
.
isScanCode
=
results
.
isScanCode
;
this
.
codeDisabled
=
false
;
//条形码输入框是否禁止输入
}
else
if
(
res
.
code
==
0
){
//有就把信息展示
this
.
isadd
=
1
;
this
.
form
.
quality_guarantee_period
=
res
.
data
.
quality_guarantee_period
...
...
@@ -523,7 +676,6 @@
},
radioChange
(
e
){
// console.log(this.isType)
this
.
form
.
sell_type
=
e
.
detail
.
value
console
.
log
(
this
.
form
.
sell_type
)
...
...
@@ -581,10 +733,10 @@
let
res
=
await
eleProductInfo
({
product_id
:
this
.
product_id
,
});
console
.
log
(
res
,
'
法大师傅大师傅大师傅士大夫大师傅
'
);
//
console.log(res,'法大师傅大师傅大师傅士大夫大师傅');
if
(
res
.
code
==
0
){
this
.
linkage_product_id
=
res
.
data
.
linkage_product_id
this
.
bools
=
res
.
data
.
product_name
;
this
.
defaultinfo
=
res
.
data
;
this
.
form
.
product_name
=
res
.
data
.
product_name
;
//名称
this
.
form
.
desc
=
res
.
data
.
desc
;
//描述
...
...
@@ -596,24 +748,20 @@
this
.
form
.
cate_id
=
res
.
data
.
cate_id
;
//分类id
this
.
form
.
activity_id
=
res
.
data
.
activity_id
//秒杀时段id
this
.
form
.
limit_num
=
res
.
data
.
limit_num
// this.classValue = res.data.product_name
this
.
form
.
specifications
=
res
.
data
.
gram
// quality_guarantee_period:this.qualitYears*365+this.qualityMonths*30+this.qualityDays, //保质期(月)
// manufacture_date:'' , //生产日期
// manufacturer :'', ///生产厂商
// brand :'', // 品牌
this
.
form
.
quality_guarantee_period
=
res
.
data
.
quality_guarantee_period
this
.
qualitYears
=
parseInt
(
res
.
data
.
quality_guarantee_period
/
365
)
this
.
qualityMonths
=
parseInt
((
res
.
data
.
quality_guarantee_period
%
365
)
/
30
)
this
.
qualityDays
=
parseInt
((
res
.
data
.
quality_guarantee_period
%
365
)
%
30
)
this
.
form
.
manufacture_date
=
res
.
data
.
manufacture_date
this
.
form
.
manufacturer
=
res
.
data
.
manufacturer
this
.
form
.
brand
=
res
.
data
.
brand
// 2020-10-22 添加字段
this
.
form
.
stock
=
res
.
data
.
stock
,
//商品库存
this
.
form
.
cost_price
=
res
.
data
.
cost_price
/
100
,
//进货价钱
this
.
form
.
code
=
res
.
data
.
code
,
//条形编码
...
...
@@ -622,6 +770,11 @@
// this.form.commodity_data:{}, //原始商品名
// 2020-10-22 添加字段
// this.commodity_type = ordinary
//下拉分类 初始值
this
.
chindformList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
cate_id
==
res
.
data
.
cate_id
){
...
...
@@ -630,6 +783,31 @@
}
});
// this.classValue = res.data.product_name
if
(
res
.
data
.
commodity_type
==
'
ordinary
'
)
{
this
.
ordinary
.
map
(
item
=>
{
if
(
this
.
linkage_product_id
==
item
.
product_id
){
this
.
classValue
=
item
.
product_name
}
})
}
else
if
(
res
.
data
.
commodity_type
==
'
weigh
'
){
console
.
log
(
res
.
data
.
commodity_type
,
585555555555555555555555
)
this
.
weigh
.
map
(
item
=>
{
if
(
this
.
linkage_product_id
==
item
.
product_id
){
this
.
classValue
=
item
.
product_name
console
.
log
(
this
.
classValue
,
item
.
product_name
)
}
console
.
log
(
this
.
classValue
)
})
}
else
{
this
.
classValue
=
''
;
}
console
.
log
(
this
.
classValue
)
//属性选默认值
if
(
res
.
data
.
is_new
==
1
){
this
.
selchildList
.
push
(
"
is_new
"
);
...
...
@@ -679,21 +857,24 @@
// quality_guarantee_period = this.qualitYears*365 + this.qualityMonths*30 + this.qualityDays
console
.
log
(
this
.
qualitYears
*
365
+
this
.
qualityMonths
*
30
+
this
.
qualityDays
*
1
)
//
console.log(this.qualitYears*365+this.qualityMonths*30+this.qualityDays*1)
// if(this.c_pics.length == 0){
// this.$api.msg('产品图片未上传');
// }
let
can
=
{
linkage_id
:
this
.
linkage_id
,
gram
:
this
.
form
.
specifications
,
//商品规格
quality_guarantee_period
:
this
.
qualitYears
*
365
+
this
.
qualityMonths
*
30
+
this
.
qualityDays
*
1
,
//保质期(月)
manufacture_date
:
this
.
form
.
manufacture_date
,
//生产日期
manufacturer
:
this
.
form
.
manufacturer
,
///生产厂商
brand
:
this
.
form
.
brand
,
// 品牌
// stock:this.form.stock, //商品库存
cost_price
:
this
.
form
.
cost_price
,
//进货价钱
code
:
this
.
form
.
code
,
//条形编码
sell_type
:
this
.
form
.
sell_type
,
commission
:
this
.
form
.
commission
,
//返佣比例
commodity_data
:
this
.
form
.
commodity_data
,
//产品数据
product_name
:
this
.
form
.
product_name
,
//产品名称
...
...
@@ -722,8 +903,6 @@
})
// if(this.stockType==1){
// console.log(this.stockType,1111111111)
// can.stock = this.stock_number
// }else{
...
...
@@ -742,7 +921,7 @@
}
else
{
can
.
is_hot
=
0
;
}
if
(
this
.
product_id
!=
""
){
if
(
this
.
product_id
!=
""
&&
this
.
is_datashow
!=
false
){
can
.
action
=
"
edit
"
;
can
.
product_id
=
this
.
product_id
;
}
...
...
@@ -792,7 +971,7 @@
},
//图片上传
c_delImage
(
e
)
{
console
.
log
(
e
,
'
反对发射点
'
)
//
console.log(e,'反对发射点')
let
arr
=
[]
for
(
let
k
in
e
.
allImages
)
{
arr
[
k
]
=
e
.
allImages
[
k
].
id
...
...
@@ -810,7 +989,7 @@
},
onMove_c
(
e
)
{
this
.
c_pics
=
e
;
console
.
log
(
e
,
'
反对法地方
'
)
//
console.log(e,'反对法地方')
const
obj
=
e
for
(
let
index
in
obj
)
{
let
id
=
obj
[
index
].
data
...
...
pages/eleProduct/eleProduct.scss
View file @
a1a30795
...
...
@@ -148,3 +148,11 @@
width
:
100%
;
border-radius
:
14upx
;
}
.submitbtns2
{
height
:
44px
;
line-height
:
44px
;
border-bottom
:
1px
solid
#eee
;
text-align
:
center
;
width
:
100%
;
}
\ No newline at end of file
pages/eleProduct/eleProduct.vue
View file @
a1a30795
...
...
@@ -2,8 +2,17 @@
<!-- 产品管理 -->
<!-- 产品 -->
<view
class=
"ProductManage pb-100 yocode"
>
<view
class=
"projuctTab flex"
style=
"background-color: #EEEEEE;justify-content: center;align-items:center ;"
>
<view
class=
""
style=
"width: 65%;"
>
<input
type=
"searchInput"
value=
""
placeholder=
"搜索"
style=
" "
/>
</view>
<view
class=
""
style=
"width: 90upx;height: 90upx;"
>
<image
src=
"../../static/icon/1.png"
mode=
""
style=
"display: inline;"
></image>
</view>
</view>
<!-- tab切换 -->
<view
class=
"projuctTab flex"
>
<view
class=
"projuctTab flex"
style=
"top: 184upx;"
>
<view
class=
"tabitems flex1"
:class=
"
{active:tabactive==1}" @tap="taggletab(1)">
<view
class=
"tabtitle"
>
出售中
</view>
<!-- (
{{
count
[
0
]
}}
) -->
...
...
@@ -24,7 +33,7 @@
<checkbox
:value=
"item.id.toString()"
:checked=
"item.checked==true"
/>
</label>
-->
<image
class=
"thumbnail"
:src=
"staticUrl + item.photo"
mode=
""
></image>
<view
class=
"infobox"
>
<view
class=
"infobox"
style=
"width: 60%;"
>
<view
class=
"title oneline"
>
{{
item
.
product_name
}}
</view>
<!--
<view
class=
"time"
>
上架时间:
{{
item
.
create_time
}}
</view>
-->
<view
class=
"price"
>
¥
{{
item
.
price
}}
元
</view>
...
...
@@ -63,12 +72,20 @@
<view
class=
"btns btns2"
v-show=
"tabactive==1"
@
tap=
"sold_outfun('all',1)"
>
下架
</view>
<view
class=
"btns btns2"
v-show=
"tabactive==2"
@
tap=
"sold_outfun('all',0)"
>
上架
</view>
</view>
-->
<!--
<view
@
click=
"open"
class=
"submitbtns"
>
添加
</view>
-->
<navigator
:url=
"'/pages/addEditEleProduct/addEditEleProduct?activity_type='+activity_type+'&isadd=0' "
class=
"submitbtns"
>
添加
</navigator>
</view>
<pageScrollTo
v-if=
"isshowtop"
></pageScrollTo>
<!--
<uniPopup
ref=
"popup"
type=
"bottom"
>
<view
class=
""
style=
"background-color: #fff;"
>
<button
@
click=
"addeleproduct"
type=
"default"
>
添加外卖
</button>
<navigator
:url=
"'/pages/addEditEleProduct/addEditEleProduct?activity_type='+activity_type+'&isadd=0' "
class=
"submitbtns2"
>
添加外卖
</navigator>
<navigator
:url=
"'/pages/addEditEleProduct/addEditEleProduct?activity_type='+activity_type+'&isadd=0' "
class=
"submitbtns2"
>
商品入库
</navigator>
<button
type=
"default"
>
商品入库
</button>
<view
@
click=
"close"
type=
"default"
class=
"submitbtns2"
>
取消
</view>
</view>
</uniPopup>
-->
</view>
</
template
>
...
...
@@ -76,12 +93,13 @@
// import { goods_product_list, sold_out,sold_outAll} from "@/utils/api/store.js";
import
pageScrollTo
from
"
@/components/pageScrollTo/pageScrollTo.vue
"
import
empty
from
"
@/components/empty/empty.vue
"
import
uniPopup
from
'
@/components/uni-popup/uni-popup.vue
'
import
{
eleProductList
,
autoManageProduct
,
deleteEleProduct
}
from
"
@/utils/api/api.js
"
;
export
default
{
components
:{
pageScrollTo
,
empty
,
uniPopup
},
data
()
{
return
{
...
...
@@ -113,6 +131,7 @@
},
onShow
()
{
// console.log(this.$refs.popup)
this
.
goods_list
=
[];
this
.
page
=
0
;
this
.
isallshow
=
false
;
...
...
@@ -140,6 +159,22 @@
},
methods
:{
addeleproduct
(){
console
.
log
(
'
外卖
'
)
// :url="'/pages/addEditEleProduct/addEditEleProduct?activity_type='+activity_type+'&isadd=0' "
uni
.
navigateTo
({
url
:
"
'/pages/addEditEleProduct/addEditEleProduct?activity_type=
"
+
this
.
activity_type
+
'
&isadd=0
'
})
},
close
(){
this
.
$refs
.
popup
.
close
()
},
open
(){
this
.
$refs
.
popup
.
open
()
},
//修改外卖产品
tochanges
(
data
,
index
){
uni
.
navigateTo
({
...
...
@@ -294,5 +329,5 @@
</
script
>
<
style
lang=
"scss"
>
@import
"./eleProduct.scss"
@import
"./eleProduct.scss"
;
</
style
>
pages/index/index.vue
View file @
a1a30795
...
...
@@ -6,28 +6,30 @@
<view
class=
"tit"
>
店铺名称:
{{
storeinfo
.
shop_name
}}
</view>
<!--
{{
shop
.
shop_name
}}
-->
<view
:class=
"['jiu', shop_type == 'ele'?'':'jus-b']"
>
<view
class=
"jiu_01"
v-if=
"shop_type == 'ele'"
>
<view
class=
"jiu_01"
v-if=
"is_bld == 1"
>
<view
@
tap=
"saoma"
>
<image
class=
"img"
src=
"/static/icon/1.png"
mode=
""
></image>
<image
class=
"img"
src=
"/static/icon/1.png"
mode=
""
></image>
<view>
扫码入库
</view>
</view>
</view>
<view
class=
"jiu_01"
>
<view
class=
"jiu_01"
:style=
"is_bld==1?'':'width: 33%;'"
>
<navigator
url=
"/pages/notice/notice"
>
<view><image
class=
"img"
src=
"/static/icon/newsicon.png"
mode=
""
></image></view>
<view><image
class=
"img"
src=
"/static/icon/newsicon.png"
mode=
""
></image></view>
<view>
消息通知
</view>
</navigator>
</view>
<view
class=
"jiu_01"
>
<view
class=
"jiu_01"
:style=
"is_bld==1?'':'width: 33%;'"
>
<navigator
url=
"/pages/user/tongji/tongji"
>
<view><image
class=
"img"
src=
"/static/icon/zijinicons.png"
mode=
""
></image></view>
<view><image
class=
"img"
src=
"/static/icon/zijinicons.png"
mode=
""
></image></view>
<view>
商户资金
</view>
</navigator>
</view>
<view
class=
"jiu_01
"
>
<view
class=
"jiu_01
"
:style=
"is_bld==1?'':'width: 33%;'
"
>
<navigator
url=
"/pages/user/mingxi/mingxi"
>
<view><image
class=
"img"
src=
"/static/icon/3.png"
mode=
""
></image></view>
<view><image
class=
"img"
src=
"/static/icon/3.png"
mode=
""
></image></view>
<view>
佣金明细
</view>
</navigator>
</view>
...
...
@@ -79,7 +81,7 @@
</view>
<view
class=
"jiu_max "
v-if=
"shop_type == 'ele'"
>
<navigator
:url=
"'/pages/eleProduct/eleProduct?activity_type='+ activity_type "
>
<navigator
:url=
"'/pages/eleProduct/eleProduct?
edit=0&
activity_type='+ activity_type "
>
<view
class=
"jiu_min"
>
<view><image
class=
"img"
src=
"/static/icon/20.png"
mode=
""
></image></view>
<view>
外卖产品
</view>
...
...
@@ -221,6 +223,25 @@
</view>
</navigator>
</view>
<view
class=
"jiu_max "
>
<navigator
url=
"/pages/eleProduct/eleProduct?edit=1"
>
<view
class=
"jiu_min"
>
<view><image
class=
"img"
src=
"/static/icon/psfei.png"
mode=
""
></image></view>
<view>
快捷改价
</view>
</view>
</navigator>
</view>
<view
class=
"jiu_max "
>
<navigator
url=
"/pages/eleProduct/eleProduct?edit=2"
>
<view
class=
"jiu_min"
>
<view><image
class=
"img"
src=
"/static/icon/psfei.png"
mode=
""
></image></view>
<view>
增减库存
</view>
</view>
</navigator>
</view>
</view>
<view
class=
"BH"
></view>
<Welcome
ref=
"Welcome"
></Welcome>
...
...
@@ -229,6 +250,7 @@
</
template
>
<
script
>
import
{
getskipShop
}
from
"
@/utils/api/merchant.js
"
;
import
uniBadge
from
"
@/components/uni/uni-badge/uni-badge.vue
"
import
uniIcon
from
"
@/components/uni/uni-icon/uni-icon.vue
"
import
yomolUpgrade
from
'
@/components/yomol-upgrade/yomol-upgrade.vue
'
;
//升级组件
...
...
@@ -244,7 +266,8 @@
shop_type
:
""
,
//店铺类型 ele goods
is_luck_draw
:
""
,
money_type
:
""
,
activity_type
:
0
activity_type
:
0
,
is_bld
:
''
}
},
components
:
{
...
...
@@ -259,6 +282,14 @@
}
},
onLoad
()
{
getskipShop
({
type
:
'
bld
'
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
is_bld
=
res
.
data
.
is_bld
// this.is_bld = 1
}
})
//显示欢迎回来~
setTimeout
(()
=>
{
this
.
$refs
.
Welcome
.
show
();
...
...
@@ -298,7 +329,12 @@
success
:
(
results
)
=>
{
console
.
log
(
results
);
if
(
results
.
data
.
code
==
0
){
this
.
$api
.
msg
(
results
.
data
.
msg
);
// this.$api.msg(results.data.msg);
results
.
isScanCode
=
false
;
results
.
code
=
res
.
result
;
uni
.
navigateTo
({
url
:
'
/pages/addEditEleProduct/addEditEleProduct?results=
'
+
JSON
.
stringify
(
results
)
})
}
else
if
(
results
.
data
.
code
==
1
){
results
.
isScanCode
=
false
;
results
.
code
=
res
.
result
;
...
...
@@ -433,6 +469,8 @@
width
:
33%
;
}
.jiu_min
{
width
:
100%
;
text-align
:
center
;
...
...
utils/api/merchant.js
View file @
a1a30795
...
...
@@ -35,3 +35,13 @@ import request from "./../request.js";//这里用的是two
export
function
getActivityList
(
data
){
return
request
.
post
(
"
store/getActivityList
"
,
data
,
{
noAuth
:
true
});
}
//判断商家类型 商品入库
export
function
getskipShop
(
data
){
return
request
.
post
(
"
/user/skipShop
"
,
data
,
{
noAuth
:
true
});
}
//获取分类 列表
export
function
getshopclass
(
data
){
return
request
.
post
(
"
/ele/weigh
"
,
data
,
{
noAuth
:
true
});
}
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