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
0cdf24c9
Commit
0cdf24c9
authored
Oct 31, 2020
by
home
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zxh' into dev
parents
15a88031
3300b08d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
18 deletions
+111
-18
pages/addEditEleProduct/addEditEleProduct.vue
pages/addEditEleProduct/addEditEleProduct.vue
+92
-12
pages/deliveryCost/deliveryCost.vue
pages/deliveryCost/deliveryCost.vue
+17
-4
pages/eleProduct/eleProduct.vue
pages/eleProduct/eleProduct.vue
+2
-2
No files found.
pages/addEditEleProduct/addEditEleProduct.vue
View file @
0cdf24c9
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<view
class=
"noecellbox"
>
<view
class=
"noecellbox"
>
<view
class=
"title"
>
产品价格
<text
style=
"color: red;"
>
(必填)
</text></view>
<view
class=
"title"
>
产品价格
<text
style=
"color: red;"
>
(必填)
</text></view>
<view
class=
"inputbox flex"
>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"
text
"
v-model=
"form.price"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写产品价格"
/>
<input
class=
"input flex1"
type=
"
number
"
v-model=
"form.price"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写产品价格"
/>
</view>
</view>
</view>
</view>
...
@@ -53,13 +53,34 @@
...
@@ -53,13 +53,34 @@
</view>
</view>
<view
class=
"noecellbox"
>
<view
class=
"noecellbox"
v-if=
"isadd==1"
>
<view
class=
"title"
>
商品库存(库存剩余
{{
form
.
stock
}}
)
</view>
<view
class=
"inputbox flex"
>
<radio-group
@
change=
"radioChanges"
>
<view
class=
"chindlost ali-c flex flex-wrap"
>
<view
class=
""
style=
"margin-right: 20rpx;"
v-for=
"(item, index) in storeNumber"
:key=
"item.value"
>
<label
class=
"lableitem flex ali-c"
>
<view>
<radio
color=
"#FF6900"
:value=
"item.value"
:checked=
"item.checked == 1"
/>
</view>
<view
class=
"titles"
>
{{
item
.
name
}}
</view>
</label>
</view>
</view>
</radio-group>
数量:
<input
class=
"input flex1"
v-if=
""
@
input=
"bingInput"
type=
"number"
v-model=
"stock_number"
value=
""
placeholder-class=
"plclass"
placeholder=
"增加库存数量"
/>
</view>
</view>
<view
class=
"noecellbox"
v-if=
"isadd==0"
>
<view
class=
"title"
>
商品库存
</view>
<view
class=
"title"
>
商品库存
</view>
<view
class=
"inputbox flex"
>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"number"
v-model=
"form.stock"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写商品库存"
/>
<input
class=
"input flex1"
v-if=
""
type=
"number"
v-model=
"stock_number"
value=
""
placeholder-class=
"plclass"
placeholder=
"增加库存数量"
/>
</view>
</view>
</view>
</view>
<view
class=
"noecellbox"
v-if=
"codeDisabled"
>
<view
class=
"noecellbox"
v-if=
"codeDisabled"
>
<view
class=
"title"
>
条形编码
</view>
<view
class=
"title"
>
条形编码
</view>
<view
class=
"inputbox flex"
>
<view
class=
"inputbox flex"
>
...
@@ -96,7 +117,7 @@
...
@@ -96,7 +117,7 @@
<view
class=
"noecellbox"
>
<view
class=
"noecellbox"
>
<view
class=
"title"
>
生产日期
</view>
<view
class=
"title"
>
生产日期
</view>
<view
class=
"inputbox flex"
>
<view
class=
"inputbox flex"
>
<picker
mode=
"date"
:value=
"form.manufacture_date"
:start=
"startDate"
:end=
"endDate"
@
change=
"bindDateChange"
>
<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=
"请填写生产日期"
/>
<input
class=
"input flex1"
type=
"text"
v-model=
"form.manufacture_date"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写生产日期"
/>
<!--
<view
class=
"uni-input"
>
{{
date
}}
</view>
-->
<!--
<view
class=
"uni-input"
>
{{
date
}}
</view>
-->
</picker>
</picker>
...
@@ -253,7 +274,9 @@
...
@@ -253,7 +274,9 @@
data
()
{
data
()
{
return
{
return
{
isadd
:
0
,
//0 填写商品库存 1修改库存
stock_number
:
''
,
stockType
:
1
,
qualitYears
:
""
,
qualitYears
:
""
,
qualityMonths
:
""
,
qualityMonths
:
""
,
qualityDays
:
""
,
qualityDays
:
""
,
...
@@ -266,6 +289,15 @@
...
@@ -266,6 +289,15 @@
name
:
'
计重(kg)
'
,
name
:
'
计重(kg)
'
,
checked
:
'
2
'
checked
:
'
2
'
}],
}],
storeNumber
:
[{
value
:
'
1
'
,
name
:
'
增加库存
'
,
checked
:
'
1
'
},
{
value
:
'
2
'
,
name
:
'
减少库存
'
,
checked
:
'
2
'
}],
// issancodeType:1,
// issancodeType:1,
ischeckedtime
:[
0
],
//默认选中,
ischeckedtime
:[
0
],
//默认选中,
myProps
:
{
myProps
:
{
...
@@ -347,7 +379,9 @@
...
@@ -347,7 +379,9 @@
// }
// }
},
},
onLoad
(
opdata
)
{
onLoad
(
opdata
)
{
// console.log(this.isType)
this
.
isadd
=
opdata
.
isadd
console
.
log
(
this
.
isadd
,
'
aaa
'
)
this
.
c_formData
.
user_token
=
this
.
$store
.
state
.
token
;
this
.
c_formData
.
user_token
=
this
.
$store
.
state
.
token
;
this
.
activity_type
=
opdata
.
activity_type
,
this
.
activity_type
=
opdata
.
activity_type
,
this
.
isShow
=
this
.
activity_type
==
1
?
true
:
false
this
.
isShow
=
this
.
activity_type
==
1
?
true
:
false
...
@@ -374,7 +408,19 @@
...
@@ -374,7 +408,19 @@
// console.log(this.isType)
// console.log(this.isType)
},
},
methods
:
{
methods
:
{
bingInput
(
e
){
let
stock_number
=
e
.
detail
.
value
;
this
.
stock_number
=
stock_number
;
let
stock
=
Number
(
this
.
form
.
stock
);
//库存
let
checked
=
this
.
storeNumber
[
1
].
checked
;
if
(
checked
==
1
){
if
(
stock
-
stock_number
<
0
){
this
.
stock_number
=
0
;
this
.
$api
.
msg
(
'
库存不足
'
)
}
}
},
bindDateChange
:
function
(
e
)
{
bindDateChange
:
function
(
e
)
{
this
.
form
.
manufacture_date
=
e
.
target
.
value
this
.
form
.
manufacture_date
=
e
.
target
.
value
},
},
...
@@ -390,8 +436,7 @@
...
@@ -390,8 +436,7 @@
let
res
=
await
findEleProduct
({
code
:
results
.
code
});
let
res
=
await
findEleProduct
({
code
:
results
.
code
});
uni
.
hideLoading
();
uni
.
hideLoading
();
if
(
res
.
code
==-
1
){
//没有就录入
if
(
res
.
code
==-
1
){
//没有就录入
// manufacturer :'', ///生产厂商
this
.
isadd
=
0
;
// brand :'', // 品牌
this
.
form
.
manufacturer
=
results
.
data
.
data
.
supplier
this
.
form
.
manufacturer
=
results
.
data
.
data
.
supplier
this
.
form
.
brand
=
results
.
data
.
data
.
brand
this
.
form
.
brand
=
results
.
data
.
data
.
brand
this
.
form
.
code
=
results
.
code
;
//条形码
this
.
form
.
code
=
results
.
code
;
//条形码
...
@@ -403,7 +448,7 @@
...
@@ -403,7 +448,7 @@
this
.
isScanCode
=
results
.
isScanCode
;
this
.
isScanCode
=
results
.
isScanCode
;
this
.
codeDisabled
=
false
;
//条形码输入框是否禁止输入
this
.
codeDisabled
=
false
;
//条形码输入框是否禁止输入
}
else
if
(
res
.
code
==
0
){
//有就把信息展示
}
else
if
(
res
.
code
==
0
){
//有就把信息展示
this
.
isadd
=
1
;
this
.
form
.
quality_guarantee_period
=
res
.
data
.
quality_guarantee_period
this
.
form
.
quality_guarantee_period
=
res
.
data
.
quality_guarantee_period
this
.
qualitYears
=
parseInt
(
res
.
data
.
quality_guarantee_period
/
365
)
this
.
qualitYears
=
parseInt
(
res
.
data
.
quality_guarantee_period
/
365
)
this
.
qualityMonths
=
parseInt
((
res
.
data
.
quality_guarantee_period
%
365
)
/
30
)
this
.
qualityMonths
=
parseInt
((
res
.
data
.
quality_guarantee_period
%
365
)
/
30
)
...
@@ -462,7 +507,6 @@
...
@@ -462,7 +507,6 @@
}
else
if
(
results
.
data
.
code
==
1
){
}
else
if
(
results
.
data
.
code
==
1
){
results
.
code
=
code
;
results
.
code
=
code
;
results
.
isScanCode
=
false
;
results
.
isScanCode
=
false
;
// results.isType = 0;
this
.
findEleProduct
(
results
);
this
.
findEleProduct
(
results
);
}
}
...
@@ -482,6 +526,19 @@
...
@@ -482,6 +526,19 @@
this
.
form
.
sell_type
=
e
.
detail
.
value
this
.
form
.
sell_type
=
e
.
detail
.
value
console
.
log
(
this
.
form
.
sell_type
)
console
.
log
(
this
.
form
.
sell_type
)
},
},
radioChanges
(
e
){
let
index
=
Number
(
e
.
detail
.
value
)
-
1
;
let
storeNumber
=
this
.
storeNumber
;
storeNumber
.
map
(
item
=>
{
item
.
checked
=
2
;
})
storeNumber
[
index
].
checked
=
1
;
this
.
$set
(
this
,
'
storeNumber
'
,
storeNumber
);
},
confirm
(
e
){
confirm
(
e
){
console
.
log
(
e
)
console
.
log
(
e
)
this
.
cate_name
=
e
.
item
.
cate_name
;
this
.
cate_name
=
e
.
item
.
cate_name
;
...
@@ -628,10 +685,13 @@
...
@@ -628,10 +685,13 @@
manufacture_date
:
this
.
form
.
manufacture_date
,
//生产日期
manufacture_date
:
this
.
form
.
manufacture_date
,
//生产日期
manufacturer
:
this
.
form
.
manufacturer
,
///生产厂商
manufacturer
:
this
.
form
.
manufacturer
,
///生产厂商
brand
:
this
.
form
.
brand
,
// 品牌
brand
:
this
.
form
.
brand
,
// 品牌
stock
:
this
.
form
.
stock
,
//商品库存
// stock:this.form.stock, //商品库存
cost_price
:
this
.
form
.
cost_price
,
//进货价钱
cost_price
:
this
.
form
.
cost_price
,
//进货价钱
code
:
this
.
form
.
code
,
//条形编码
code
:
this
.
form
.
code
,
//条形编码
sell_type
:
this
.
form
.
sell_type
,
sell_type
:
this
.
form
.
sell_type
,
commission
:
this
.
form
.
commission
,
//返佣比例
commission
:
this
.
form
.
commission
,
//返佣比例
commodity_data
:
this
.
form
.
commodity_data
,
//产品数据
commodity_data
:
this
.
form
.
commodity_data
,
//产品数据
product_name
:
this
.
form
.
product_name
,
//产品名称
product_name
:
this
.
form
.
product_name
,
//产品名称
...
@@ -648,6 +708,26 @@
...
@@ -648,6 +708,26 @@
limit_num
:
this
.
form
.
limit_num
,
//秒杀限购数量
limit_num
:
this
.
form
.
limit_num
,
//秒杀限购数量
};
};
this
.
storeNumber
.
map
((
item
,
index
)
=>
{
if
(
item
.
checked
==
1
){
if
(
index
==
0
){
can
.
stock
=
this
.
stock_number
}
else
{
can
.
stock
=
'
-
'
+
this
.
stock_number
}
}
})
// if(this.stockType==1){
// console.log(this.stockType,1111111111)
// can.stock = this.stock_number
// }else{
// can.stock = '-'+this.stock_number
// console.log(this.stockType,1111111111)
// }
if
(
this
.
selchildList
.
includes
(
"
is_new
"
)){
if
(
this
.
selchildList
.
includes
(
"
is_new
"
)){
...
...
pages/deliveryCost/deliveryCost.vue
View file @
0cdf24c9
...
@@ -73,7 +73,17 @@
...
@@ -73,7 +73,17 @@
<view
class=
"mints"
>
<view
class=
"mints"
>
*注:起步配送费单位为 元
*注:起步配送费单位为 元
</view>
</view>
<view
class=
"cell_input jus-b ali-c"
>
<view
class=
"lablename"
>
配送距离范围:
</view>
<view
class=
"inputboxs "
>
<input
type=
"number"
class=
"input"
value=
""
v-model=
"delivery_distance"
placeholder-class=
'hahatext'
placeholder=
"请输入"
/>
</view>
</view>
<view
class=
"mints"
>
*注:配送距离范围 公里
</view>
<view
class=
"submitbtns"
@
tap=
"setShop"
>
确认
</view>
<view
class=
"submitbtns"
@
tap=
"setShop"
>
确认
</view>
...
@@ -97,7 +107,8 @@
...
@@ -97,7 +107,8 @@
dawn_basics_priceP
:
0
,
//凌晨基础距离起步费用
dawn_basics_priceP
:
0
,
//凌晨基础距离起步费用
dawn_single_price
:
0
,
//凌晨每公里增加费用
dawn_single_price
:
0
,
//凌晨每公里增加费用
meals_fee_price
:
''
,
//餐盒费分配
meals_fee_price
:
''
,
//餐盒费分配
nitial_delivery_fee
:
''
,
//起步配送费
nitial_delivery_fee
:
''
,
//起步配送费
delivery_distance
:
0
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -139,7 +150,8 @@
...
@@ -139,7 +150,8 @@
dawn_basics_priceP
:
this
.
dawn_basics_priceP
,
dawn_basics_priceP
:
this
.
dawn_basics_priceP
,
dawn_single_price
:
this
.
dawn_single_price
,
dawn_single_price
:
this
.
dawn_single_price
,
meals_fee_price
:
this
.
meals_fee_price
,
meals_fee_price
:
this
.
meals_fee_price
,
nitial_delivery_fee
:
this
.
nitial_delivery_fee
,
nitial_delivery_fee
:
this
.
nitial_delivery_fee
,
delivery_distance
:
this
.
delivery_distance
})
})
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
uni
.
showModal
({
uni
.
showModal
({
...
@@ -169,7 +181,8 @@
...
@@ -169,7 +181,8 @@
this
.
dawn_basics_priceP
=
res
.
data
.
dawn_basics_priceP
,
this
.
dawn_basics_priceP
=
res
.
data
.
dawn_basics_priceP
,
this
.
dawn_single_price
=
res
.
data
.
dawn_single_price
,
this
.
dawn_single_price
=
res
.
data
.
dawn_single_price
,
this
.
meals_fee_price
=
res
.
data
.
meals_fee_price
,
this
.
meals_fee_price
=
res
.
data
.
meals_fee_price
,
this
.
nitial_delivery_fee
=
res
.
data
.
nitial_delivery_fee
this
.
nitial_delivery_fee
=
res
.
data
.
nitial_delivery_fee
this
.
delivery_distance
=
res
.
data
.
delivery_distance
}
}
}
}
...
...
pages/eleProduct/eleProduct.vue
View file @
0cdf24c9
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<view
class=
"btns btns2"
v-show=
"tabactive==2"
@
tap=
"sold_outfun('all',0)"
>
上架
</view>
<view
class=
"btns btns2"
v-show=
"tabactive==2"
@
tap=
"sold_outfun('all',0)"
>
上架
</view>
</view>
-->
</view>
-->
<navigator
:url=
"'/pages/addEditEleProduct/addEditEleProduct?activity_type='+activity_type"
class=
"submitbtns"
>
添加
</navigator>
<navigator
:url=
"'/pages/addEditEleProduct/addEditEleProduct?activity_type='+activity_type
+'&isadd=0'
"
class=
"submitbtns"
>
添加
</navigator>
</view>
</view>
<pageScrollTo
v-if=
"isshowtop"
></pageScrollTo>
<pageScrollTo
v-if=
"isshowtop"
></pageScrollTo>
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
//修改外卖产品
//修改外卖产品
tochanges
(
data
,
index
){
tochanges
(
data
,
index
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/addEditEleProduct/addEditEleProduct?id=
${
data
.
product_id
}
&activity_type=
${
this
.
activity_type
}
`
,
url
:
`/pages/addEditEleProduct/addEditEleProduct?id=
${
data
.
product_id
}
&activity_type=
${
this
.
activity_type
}
&isadd=1
`
,
})
})
},
},
//删除外卖产品
//删除外卖产品
...
...
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