Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
party-build-cloud
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
party-build-cloud
Commits
20e7f987
Commit
20e7f987
authored
Oct 12, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订购更新
parent
c81d49f6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
64 additions
and
101 deletions
+64
-101
ionic.config.json
ionic.config.json
+2
-2
food.ts
src/pages/serve-pages/food/food.ts
+1
-2
rush-buy.html
src/pages/serve-pages/food/rush-buy/rush-buy.html
+6
-20
rush-buy.scss
src/pages/serve-pages/food/rush-buy/rush-buy.scss
+12
-3
rush-buy.ts
src/pages/serve-pages/food/rush-buy/rush-buy.ts
+29
-63
hair-cut.ts
src/pages/serve-pages/hair-cut/hair-cut.ts
+10
-7
serve.service.ts
src/pages/serve-pages/serve.service.ts
+0
-0
discover.ts
src/pages/tabs/discover/discover.ts
+2
-0
http.service.ts
src/service/http.service.ts
+2
-4
No files found.
ionic.config.json
View file @
20e7f987
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
"proxies"
:
[
"proxies"
:
[
{
{
"path"
:
"/wisdomgroup"
,
"path"
:
"/wisdomgroup"
,
"proxyUrl"
:
"http://
218.78.19.169:8081
/wisdomgroup"
"proxyUrl"
:
"http://
47.103.33.196:8080
/wisdomgroup"
},
},
{
{
"path"
:
"/logistics"
,
"path"
:
"/logistics"
,
"proxyUrl"
:
"http://
218.78.19.169:8081
/logistics"
"proxyUrl"
:
"http://
47.103.33.196:8080
/logistics"
}
}
]
]
}
}
src/pages/serve-pages/food/food.ts
View file @
20e7f987
...
@@ -201,11 +201,10 @@ export class FoodPage {
...
@@ -201,11 +201,10 @@ export class FoodPage {
this
.
serveSer
.
getGoodsInfo
().
subscribe
(
this
.
serveSer
.
getGoodsInfo
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
const
obj
=
res
.
data
[
0
];
const
obj
=
res
.
data
[
0
]
.
goodsStoreList
[
0
]
;
if
(
obj
.
isPurchasing
==
0
)
this
.
commonSer
.
toast
(
'订购时间为:'
+
obj
.
startTime
+
"~"
+
obj
.
endTime
);
if
(
obj
.
isPurchasing
==
0
)
this
.
commonSer
.
toast
(
'订购时间为:'
+
obj
.
startTime
+
"~"
+
obj
.
endTime
);
if
(
obj
.
isPurchasing
==
1
)
this
.
navCtrl
.
push
(
RushBuyPage
);
if
(
obj
.
isPurchasing
==
1
)
this
.
navCtrl
.
push
(
RushBuyPage
);
if
(
obj
.
isPurchasing
==
2
)
this
.
commonSer
.
toast
(
'今日物品已订购完,请明天再来'
);
if
(
obj
.
isPurchasing
==
2
)
this
.
commonSer
.
toast
(
'今日物品已订购完,请明天再来'
);
;
}
else
{
}
else
{
this
.
commonSer
.
toast
(
'暂无订购物品'
)
this
.
commonSer
.
toast
(
'暂无订购物品'
)
}
}
...
...
src/pages/serve-pages/food/rush-buy/rush-buy.html
View file @
20e7f987
...
@@ -8,28 +8,14 @@
...
@@ -8,28 +8,14 @@
<ion-content>
<ion-content>
<ion-item
(
click
)="
chooseFood
()"
>
<div
class=
"item-box"
*
ngFor=
"let item of goodsInfo?.goodsStoreList"
>
<ion-label
class=
"item-left"
><span
class=
"color-red"
>
*
</span>
物品:
</ion-label>
<div
class=
"left"
>
{{item.goodsName}}
<span>
(余:{{item.everydayAmount - item.purchasedAmount}})
</span>
:
</div>
<ion-label
[
ngStyle
]="{'
color
'
:obj
.
foodText =
=
'请选择'?'#
999
'
:
'#
333
'}"
class=
"choose"
>
{{obj.foodText}}
</ion-label>
<ion-label
class=
"right-arrow"
>
<ion-icon
name=
"arrow-forward"
></ion-icon>
</ion-label>
</ion-item>
<div
class=
"item-box"
>
<div
class=
"left"
>
剩余数量:
</div>
<div
class=
"right num"
>
<div
class=
"right num"
>
{{obj?.everydayAmount - obj?.purchasedAmount}}
<span
class=
"reduce"
(
click
)="
reduce
(
item
)"
>
-
</span>
<input
type=
"number"
value=
"1"
[(
ngModel
)]="
item
.
peopleCount
"
>
<span
class=
"add"
(
click
)="
add
(
item
)"
>
+
</span>
</div>
</div>
</div>
</div>
<div
class=
"item-box"
>
<p
class=
"buy-remark"
>
{{goodsInfo?.remark}}
</p>
<div
class=
"left"
>
数量:
</div>
<div
class=
"right num"
>
<span
class=
"reduce"
(
click
)="
reduce
()"
>
-
</span>
<input
type=
"number"
value=
"1"
[(
ngModel
)]="
obj
.
peopleCount
"
>
<span
class=
"add"
(
click
)="
add
()"
>
+
</span>
</div>
</div>
<p
class=
"buy-remark"
>
{{obj.remark}}
</p>
<button
class=
"submit-btn submit"
(
click
)="
save
()"
>
提交
</button>
<button
class=
"submit-btn submit"
(
click
)="
save
()"
>
提交
</button>
</ion-content>
</ion-content>
src/pages/serve-pages/food/rush-buy/rush-buy.scss
View file @
20e7f987
...
@@ -76,15 +76,24 @@ page-rush-buy {
...
@@ -76,15 +76,24 @@ page-rush-buy {
border-bottom
:
0
.55px
solid
#eeeeee
;
border-bottom
:
0
.55px
solid
#eeeeee
;
.left
{
.left
{
text-align
:
right
;
width
:
40%
;
width
:
20%
;
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
1
.4rem
;
font-size
:
1
.4rem
;
margin
:
11px
8px
11px
0
;
margin
:
11px
8px
11px
0
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
span
{
display
:
inline-block
;
font-size
:
12px
;
transform
:
scale
(
0
.9
);
font-weight
:
normal
;
}
}
}
.right
{
.right
{
width
:
8
0%
;
width
:
6
0%
;
padding
:
11px
8px
11px
16px
;
padding
:
11px
8px
11px
16px
;
.div-tag
{
.div-tag
{
...
...
src/pages/serve-pages/food/rush-buy/rush-buy.ts
View file @
20e7f987
...
@@ -9,18 +9,8 @@ import {CommonService} from "../../../../provide/common.service";
...
@@ -9,18 +9,8 @@ import {CommonService} from "../../../../provide/common.service";
})
})
export
class
RushBuyPage
{
export
class
RushBuyPage
{
obj
=
{
peopleCount
:
10
,
goodsInfo
;
food
:
''
,
foodText
:
'请选择'
,
type
:
null
,
unitPrice
:
null
,
purchaseVersion
:
null
,
remark
:
null
,
everydayAmount
:
null
,
purchasedAmount
:
null
};
foodList
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
commonSer
:
CommonService
,
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
commonSer
:
CommonService
,
private
actionSheetCtrl
:
ActionSheetController
,
private
serveSer
:
ServeService
,
private
actionSheetCtrl
:
ActionSheetController
,
private
serveSer
:
ServeService
,
...
@@ -28,82 +18,58 @@ export class RushBuyPage {
...
@@ -28,82 +18,58 @@ export class RushBuyPage {
}
}
ionViewDidLoad
()
{
ionViewDidLoad
()
{
console
.
log
(
'ionViewDidLoad RushBuyPage'
);
this
.
getGoodsInfo
();
this
.
getGoodsInfo
();
}
}
getGoodsInfo
()
{
getGoodsInfo
()
{
this
.
serveSer
.
getGoodsInfo
().
subscribe
(
this
.
serveSer
.
getGoodsInfo
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
foodList
=
res
.
data
;
this
.
goodsInfo
=
res
.
data
[
0
];
this
.
obj
.
foodText
=
this
.
foodList
[
0
].
goodsName
;
this
.
goodsInfo
.
goodsStoreList
.
forEach
(
e
=>
e
.
peopleCount
=
"0"
);
this
.
obj
.
purchaseVersion
=
this
.
foodList
[
0
].
version
;
console
.
log
(
this
.
goodsInfo
);
this
.
obj
.
unitPrice
=
this
.
foodList
[
0
].
unitPrice
;
this
.
obj
.
type
=
this
.
foodList
[
0
].
id
;
this
.
obj
.
remark
=
this
.
foodList
[
0
].
remark
;
this
.
obj
.
purchasedAmount
=
this
.
foodList
[
0
].
purchasedAmount
;
this
.
obj
.
everydayAmount
=
this
.
foodList
[
0
].
everydayAmount
;
}
}
)
)
}
}
chooseFood
()
{
const
btnArr
=
this
.
foodList
.
map
(
e
=>
{
const
data
=
{
text
:
e
.
goodsName
,
role
:
e
.
id
,
handler
:
()
=>
{
this
.
obj
.
foodText
=
e
.
goodsName
;
this
.
obj
.
purchaseVersion
=
e
.
version
;
this
.
obj
.
unitPrice
=
e
.
unitPrice
;
this
.
obj
.
type
=
e
.
id
;
this
.
obj
.
purchasedAmount
=
e
.
purchasedAmount
;
this
.
obj
.
everydayAmount
=
e
.
everydayAmount
;
}
};
return
data
;
});
btnArr
.
push
({
text
:
'取消'
,
role
:
'cancel'
,
handler
:
()
=>
{
console
.
log
(
'Cancel clicked'
);
}
});
const
actionSheet
=
this
.
actionSheetCtrl
.
create
({
cssClass
:
'cameraAction'
,
buttons
:
btnArr
});
actionSheet
.
present
();
}
//增加
//增加
add
()
{
add
(
item
)
{
if
(
this
.
obj
.
peopleCount
<
10
)
this
.
obj
.
peopleCount
++
;
if
(
item
.
peopleCount
<
10
)
item
.
peopleCount
++
;
}
}
//减少
//减少
reduce
()
{
reduce
(
item
)
{
if
(
this
.
obj
.
peopleCount
>
1
)
this
.
obj
.
peopleCount
--
;
if
(
item
.
peopleCount
>
0
)
item
.
peopleCount
--
;
}
}
save
()
{
save
()
{
if
(
!
this
.
obj
.
type
)
{
let
sum
=
0
;
this
.
goodsInfo
.
goodsStoreList
.
forEach
((
e
)
=>
sum
+=
Number
(
e
.
peopleCount
));
console
.
log
(
sum
);
if
(
sum
==
0
)
{
this
.
commonSer
.
toast
(
'请选择物品'
);
this
.
commonSer
.
toast
(
'请选择物品'
);
return
false
;
return
false
;
}
}
if
(
sum
>
10
)
{
this
.
commonSer
.
toast
(
'总数最多选择10个'
);
return
false
;
}
const
loading
=
this
.
loadCtrl
.
create
({
const
loading
=
this
.
loadCtrl
.
create
({
content
:
'订购中...'
,
content
:
'订购中...'
,
});
});
loading
.
present
();
loading
.
present
();
const
data
=
{
const
data
=
[];
diffFlag
:
'2'
,
this
.
goodsInfo
.
goodsStoreList
.
forEach
(
e
=>
{
type
:
this
.
obj
.
type
,
const
d
=
{
peopleCount
:
this
.
obj
.
peopleCount
,
type
:
this
.
goodsInfo
.
id
,
unitPrice
:
this
.
obj
.
unitPrice
,
reserve1
:
e
.
id
,
version
:
this
.
obj
.
purchaseVersion
peopleCount
:
e
.
peopleCount
,
amount
:
e
.
unitPrice
,
remark
:
this
.
goodsInfo
.
remark
,
diffFlag
:
2
};
};
this
.
serveSer
.
saveMeals
(
data
).
subscribe
(
data
.
push
(
d
);
});
this
.
serveSer
.
savePurchase
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
loading
.
dismiss
();
loading
.
dismiss
();
if
(
res
.
errcode
==
"1000"
)
{
if
(
res
.
errcode
==
"1000"
)
{
...
...
src/pages/serve-pages/hair-cut/hair-cut.ts
View file @
20e7f987
...
@@ -91,8 +91,9 @@ export class HairCutPage {
...
@@ -91,8 +91,9 @@ export class HairCutPage {
this
.
page
.
isLoad
=
false
;
this
.
page
.
isLoad
=
false
;
this
.
applyList
=
res
.
data
.
list
;
this
.
applyList
=
res
.
data
.
list
;
this
.
page
.
total
=
res
.
data
.
total
;
this
.
page
.
total
=
res
.
data
.
total
;
this
.
applyList
.
forEach
(
e
=>
{
this
.
applyList
.
forEach
(
e
=>
{
e
.
appointmentTime
=
new
Date
(
e
.
appointmentDate
+
' 00:00:00'
).
getTime
();
const
startTime
=
e
.
appointmentDate
+
" "
+
e
.
startEndStr
.
split
(
"-"
)[
0
]
+
":00"
;
e
.
appointmentTime
=
new
Date
(
startTime
).
getTime
();
})
})
timer
(
800
).
subscribe
(
e
.
complete
());
timer
(
800
).
subscribe
(
e
.
complete
());
}
}
...
@@ -114,8 +115,9 @@ export class HairCutPage {
...
@@ -114,8 +115,9 @@ export class HairCutPage {
(
res
)
=>
{
(
res
)
=>
{
this
.
page
.
total
=
res
.
total
;
this
.
page
.
total
=
res
.
total
;
this
.
applyList
=
this
.
applyList
.
concat
(
res
.
list
);
this
.
applyList
=
this
.
applyList
.
concat
(
res
.
list
);
this
.
applyList
.
forEach
(
e
=>
{
this
.
applyList
.
forEach
(
e
=>
{
e
.
appointmentTime
=
new
Date
(
e
.
appointmentDate
+
' 00:00:00'
).
getTime
();
const
startTime
=
e
.
appointmentDate
+
" "
+
e
.
startEndStr
.
split
(
"-"
)[
0
]
+
":00"
;
e
.
appointmentTime
=
new
Date
(
startTime
).
getTime
();
})
})
timer
(
800
).
subscribe
(()
=>
e
.
complete
());
timer
(
800
).
subscribe
(()
=>
e
.
complete
());
}
}
...
@@ -134,8 +136,9 @@ export class HairCutPage {
...
@@ -134,8 +136,9 @@ export class HairCutPage {
this
.
page
.
isLoad
=
false
;
this
.
page
.
isLoad
=
false
;
this
.
applyList
=
res
.
data
.
list
;
this
.
applyList
=
res
.
data
.
list
;
this
.
page
.
total
=
res
.
data
.
total
;
this
.
page
.
total
=
res
.
data
.
total
;
this
.
applyList
.
forEach
(
e
=>
{
this
.
applyList
.
forEach
(
e
=>
{
e
.
appointmentTime
=
new
Date
(
e
.
appointmentDate
+
' 00:00:00'
).
getTime
();
const
startTime
=
e
.
appointmentDate
+
" "
+
e
.
startEndStr
.
split
(
"-"
)[
0
]
+
":00"
;
e
.
appointmentTime
=
new
Date
(
startTime
).
getTime
();
})
})
}
}
)
)
...
@@ -147,7 +150,7 @@ export class HairCutPage {
...
@@ -147,7 +150,7 @@ export class HairCutPage {
this
.
commonSer
.
toast
(
"已过期不可取消"
);
this
.
commonSer
.
toast
(
"已过期不可取消"
);
return
;
return
;
}
}
this
.
commonSer
.
alert
(
'确定取消?'
,
()
=>
{
this
.
commonSer
.
alert
(
'确定取消?'
,
()
=>
{
this
.
serveSer
.
cancelHair
(
item
.
id
).
subscribe
(
this
.
serveSer
.
cancelHair
(
item
.
id
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errcode
==
1000
)
{
if
(
res
.
errcode
==
1000
)
{
...
...
src/pages/serve-pages/serve.service.ts
View file @
20e7f987
This diff is collapsed.
Click to expand it.
src/pages/tabs/discover/discover.ts
View file @
20e7f987
...
@@ -598,6 +598,8 @@ export class DiscoverPage {
...
@@ -598,6 +598,8 @@ export class DiscoverPage {
this
.
obj
.
branchId
=
null
;
this
.
obj
.
branchId
=
null
;
}
}
this
.
getBanner
();
this
.
getBanner
();
this
.
pageNum
=
1
;
const
data
=
{
const
data
=
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
this
.
pageSize
,
pageSize
:
this
.
pageSize
,
...
...
src/service/http.service.ts
View file @
20e7f987
...
@@ -22,12 +22,10 @@ export class AppGlobal {
...
@@ -22,12 +22,10 @@ export class AppGlobal {
static
domain
=
""
;
//本地环境
static
domain
=
""
;
//本地环境
//图片地址
//图片地址
// static picture = AppGlobal.domain + "/wisdomgroup/manager/getIcon/"; //正式地址
static
picture
=
AppGlobal
.
domain
+
"/wisdomgroup/manager/getIcon/"
;
static
picture
=
AppGlobal
.
domain
+
"/wisdomgroup/manager/getIcon/"
;
//测试
//通知公告图片参数
//通知公告图片参数
// static pictureNotice = AppGlobal.domain; //正式地址
static
pictureNotice
=
AppGlobal
.
domain
;
static
pictureNotice
=
AppGlobal
.
domain
;
//测试
//默认版本
//默认版本
static
defaultVersion
=
"4.6.0"
;
//dev
static
defaultVersion
=
"4.6.0"
;
//dev
...
...
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