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
ee1aa799
Commit
ee1aa799
authored
Oct 26, 2020
by
home
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zxf
parent
122defed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
22 deletions
+122
-22
manifest.json
manifest.json
+5
-5
pages/addEditEleProduct/addEditEleProduct.vue
pages/addEditEleProduct/addEditEleProduct.vue
+113
-13
utils/debug.js
utils/debug.js
+4
-4
No files found.
manifest.json
View file @
ee1aa799
...
...
@@ -3,8 +3,8 @@
//
"appid"
:
"__UNI__FC9419E"
,
"appid"
:
"__UNI__1EA80F1"
,
//这个是
web
的
"description"
:
"商家"
,
"versionName"
:
"1.0.8
6
"
,
"versionCode"
:
18
6
,
"versionName"
:
"1.0.8
7
"
,
"versionCode"
:
18
7
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
"app-plus"
:
{
...
...
@@ -114,9 +114,9 @@
},
"splashscreen"
:
{
"android"
:
{
"hdpi"
:
"C:/Users/Administrator/Desktop/da/
5068bbdfa7abe42f1b4f0dc664ca740
.png"
,
"xhdpi"
:
"C:/Users/Administrator/Desktop/da/
b73ca75a08529e9697118029256f408
.png"
,
"xxhdpi"
:
"C:/Users/Administrator/Desktop/da/
b73ca75a08529e9697118029256f408
.png"
"hdpi"
:
"C:/Users/Administrator/Desktop/da/
DefaultLaunch640_1136
.png"
,
"xhdpi"
:
"C:/Users/Administrator/Desktop/da/
DefaultLaunch640_1136
.png"
,
"xxhdpi"
:
"C:/Users/Administrator/Desktop/da/
DefaultLaunch640_1136
.png"
},
"ios"
:
{
"iphone"
:
{
...
...
pages/addEditEleProduct/addEditEleProduct.vue
View file @
ee1aa799
<
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;"
>
<image
class=
"mb-20 img"
@
tap=
"saoma"
src=
"/static/icon/saoma.png"
></image>
<view>
扫码入库
</view>
</view>
-->
</view>
<view
class=
"noecellbox"
>
<view
class=
"title"
>
产品名称
<text
style=
"color: red;"
>
(必填)
</text></view>
...
...
@@ -63,7 +63,7 @@
<view
class=
"noecellbox"
v-if=
"codeDisabled"
>
<view
class=
"title"
>
条形编码
</view>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"
text
"
:disabled=
'codeDisabled'
@
tap=
"onCodeFocus"
:value=
"form.code"
placeholder-class=
"plclass"
placeholder=
"请填写条形编码"
/>
<input
class=
"input flex1"
type=
"
number
"
:disabled=
'codeDisabled'
@
tap=
"onCodeFocus"
:value=
"form.code"
placeholder-class=
"plclass"
placeholder=
"请填写条形编码"
/>
</view>
</view>
...
...
@@ -71,7 +71,7 @@
<view
class=
"noecellbox"
v-if=
"!codeDisabled"
>
<view
class=
"title"
>
条形编码
</view>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"
text
"
v-model=
"form.code"
@
tap=
"onCodeFocus"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写条形编码"
/>
<input
class=
"input flex1"
type=
"
number
"
v-model=
"form.code"
@
tap=
"onCodeFocus"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写条形编码"
/>
</view>
</view>
...
...
@@ -88,13 +88,47 @@
<input
class=
"input flex1"
type=
"text"
v-model=
"form.cost_price"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写进货价"
/>
</view>
</view>
<!--quality_guarantee_period 保质期(月)
manufacture_date 生产日期
manufacturer 生产厂商
brand 品牌
-->
<view
class=
"noecellbox"
>
<view
class=
"title"
>
生产日期
</view>
<view
class=
"inputbox flex"
>
<picker
mode=
"date"
:value=
"form.manufacture_date"
:start=
"startDate"
:end=
"endDate"
@
change=
"bindDateChange"
>
<input
class=
"input flex1"
type=
"text"
v-model=
"form.manufacture_date"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写生产日期"
/>
<!--
<view
class=
"uni-input"
>
{{
date
}}
</view>
-->
</picker>
</view>
</view>
<
!--
<
view
class=
"noecellbox"
>
<view
class=
"title"
>
售卖类型
</view>
<view
class=
"noecellbox"
>
<view
class=
"title"
>
保质期
</view>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"text"
v-model=
"form.sell_type"
value=
""
placeholder-class=
"plclass"
placeholder=
"售卖类型(计件 1,计重 2)"
/>
<input
class=
"input flex1"
style=
"text-align: center;"
type=
"number"
v-model=
"qualitYears"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写年"
/>
年
<input
class=
"input flex1"
style=
"text-align: center;"
type=
"number"
v-model=
"qualityMonths"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写月"
/>
月
<input
class=
"input flex1"
style=
"text-align: center;"
type=
"number"
v-model=
"qualityDays"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写日"
/>
日
</view>
</view>
-->
</view>
<view
class=
"noecellbox"
>
<view
class=
"title"
>
生产厂商
</view>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"text"
v-model=
"form.manufacturer"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写生产厂商"
/>
</view>
</view>
<view
class=
"noecellbox"
>
<view
class=
"title"
>
品牌
</view>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
type=
"text"
v-model=
"form.brand"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写品牌"
/>
</view>
</view>
<!-- YYYYY -->
...
...
@@ -216,8 +250,13 @@
components
:{
robbyImageUpload
},
data
()
{
data
()
{
return
{
qualitYears
:
""
,
qualityMonths
:
""
,
qualityDays
:
""
,
sellType
:
[{
value
:
'
1
'
,
name
:
'
计件(件)
'
,
...
...
@@ -242,7 +281,11 @@
code
:
''
,
//条形编码
commission
:
''
,
//返佣比例
sell_type
:
0
,
// 售卖类型
commodity_data
:{},
//原始商品名
commodity_data
:{},
//原始商品名
quality_guarantee_period
:
0
,
//保质期(月)
manufacture_date
:
'
2020-10-1
'
,
//生产日期
manufacturer
:
''
,
///生产厂商
brand
:
''
,
// 品牌
checkbox
:
[],
//断选
product_id
:
""
,
//修改的时候的产品id
product_name
:
""
,
//产品名称
...
...
@@ -261,6 +304,9 @@
activity_list
:
''
,
//秒杀列表
limit_num
:
"
0
"
//秒杀限购数量 0 不限制
},
timeList
:[
{}
],
isShow
:
false
,
chindformList
:[],
//上传图片相关的
...
...
@@ -292,7 +338,13 @@
},
staticUrl
(){
return
this
.
$store
.
state
.
staticUrl
;
}
},
// startDate() {
// return '2020-11-20';
// },
// endDate() {
// return this.getDate('');
// }
},
onLoad
(
opdata
)
{
// console.log(this.isType)
...
...
@@ -323,6 +375,10 @@
},
methods
:
{
bindDateChange
:
function
(
e
)
{
this
.
form
.
manufacture_date
=
e
.
target
.
value
},
onCodeFocus
(){
//条形码输入框聚焦事件
if
(
this
.
codeDisabled
){
...
...
@@ -334,6 +390,10 @@
let
res
=
await
findEleProduct
({
code
:
results
.
code
});
uni
.
hideLoading
();
if
(
res
.
code
==-
1
){
//没有就录入
// manufacturer :'', ///生产厂商
// brand :'', // 品牌
this
.
form
.
manufacturer
=
results
.
data
.
data
.
supplier
this
.
form
.
brand
=
results
.
data
.
data
.
brand
this
.
form
.
code
=
results
.
code
;
//条形码
this
.
form
.
original_name
=
results
.
data
.
data
.
goodsName
;
this
.
form
.
product_name
=
results
.
data
.
data
.
goodsName
;
...
...
@@ -343,6 +403,17 @@
this
.
isScanCode
=
results
.
isScanCode
;
this
.
codeDisabled
=
false
;
//条形码输入框是否禁止输入
}
else
if
(
res
.
code
==
0
){
//有就把信息展示
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
this
.
form
.
sell_type
=
res
.
data
.
sell_type
,
this
.
form
.
stock
=
res
.
data
.
stock
,
//商品库存
this
.
form
.
cost_price
=
res
.
data
.
cost_price
,
//进货价钱
this
.
form
.
code
=
res
.
data
.
code
,
//条形编码
...
...
@@ -468,6 +539,20 @@
this
.
form
.
limit_num
=
res
.
data
.
limit_num
// 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
,
//商品库存
...
...
@@ -532,8 +617,17 @@
this
.
$api
.
msg
(
"
秒杀库存或限购数量不能为小数
"
);
return
false
;
}
// quality_guarantee_period = this.qualitYears*365 + this.qualityMonths*30 + this.qualityDays
console
.
log
(
this
.
qualitYears
*
365
+
this
.
qualityMonths
*
30
+
this
.
qualityDays
*
1
)
let
can
=
{
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
,
//条形编码
...
...
@@ -551,8 +645,7 @@
store_count
:
this
.
form
.
store_count
,
//秒杀库存
activity_id
:
this
.
form
.
activity_id
,
//秒杀时间id
activity_list
:
this
.
form
.
activity_list
,
limit_num
:
this
.
form
.
limit_num
,
//秒杀限购数量
limit_num
:
this
.
form
.
limit_num
,
//秒杀限购数量
};
...
...
@@ -676,5 +769,12 @@
}
.img
{
width
:
100upx
;
height
:
100upx
;
}
.
input1
:
:-
ms-input-placeholder
{
text-align
:
center
;
}
.
input1
:
:-
webkit-input-placeholder
{
text-align
:
center
;
}
</
style
>
\ No newline at end of file
utils/debug.js
View file @
ee1aa799
...
...
@@ -5,15 +5,15 @@ module.exports = {
//
isdebug:false,//正式
isdebug
:
true
,
//测试
isdebug
:
false
,
//正式
//
isdebug:true,//测试
//
xqdebug:false,//正式权限
xqdebug
:
true
,
//发布审核权限 也是测试环境的 主要用于ios
xqdebug
:
false
,
//正式权限
//
xqdebug:true,//发布审核权限 也是测试环境的 主要用于ios
// #ifdef APP-PLUS
...
...
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