Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
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
new-sing
admin-base
Commits
9a7a0777
Commit
9a7a0777
authored
Dec 24, 2018
by
chenfenglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增订单
parent
e77d1671
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
13 deletions
+59
-13
index.vue
src/components/order/index.vue
+11
-3
newDialog.vue
src/components/order/newDialog.vue
+48
-10
No files found.
src/components/order/index.vue
View file @
9a7a0777
...
...
@@ -39,7 +39,7 @@
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"
推广人ID
"
>
<el-form-item
label=
"
添加推广人
"
>
<el-input
v-model=
"searchFrom.invite_id"
:placeholder=
"inviteSearchPlaceholder"
></el-input>
</el-form-item>
</el-col>
...
...
@@ -95,7 +95,7 @@
</el-col>
<el-col
:span=
"3"
:offset=
"3"
v-if=
"!$store.state.readonly"
>
<el-form-item>
<
el-button
type=
"success"
plain
@
click=
"add"
>
新增订单
</el-button
>
<
!-- <el-button type="success" plain @click="add">新增订单</el-button> --
>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -280,7 +280,7 @@
v-for=
"item in teacherList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.
user_
id"
>
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -664,6 +664,14 @@
this
.
getOrderList
();
this
.
getGoodsOption
();
},
watch
:{
"newdialogObj.show"
:
function
(
val
){
if
(
!
val
){
this
.
getOrderList
();
}
}
},
filters
:{
payMentFilter
(
val
){
return
val
==
'1'
?
'已付款'
:
'未付款'
...
...
src/components/order/newDialog.vue
View file @
9a7a0777
...
...
@@ -60,8 +60,22 @@
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"推广人ID"
>
<el-input
v-model=
"form.invite_id"
></el-input>
<el-form-item
label=
"添加推广人"
>
<!--
<el-input
v-model=
"form.invite_id"
></el-input>
-->
<el-select
v-model=
"form.invite_id"
filterable
clearable
placeholder=
"请输入名称"
:remote-method=
"remoteMethod"
>
<el-option
v-for=
"item in teacherList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -102,7 +116,7 @@
</
template
>
<
script
>
import
{
getGoodsListApi
,
setOrderApi
,
getPeriodsApi
}
from
"../../service/api"
import
{
getGoodsListApi
,
setOrderApi
,
getPeriodsApi
,
getTeacherListApi
}
from
"../../service/api"
import
vueAddress
from
'../framework/address-picker/Address'
import
AddressArray
from
'../framework/address-picker/addr'
import
{
ORDERSTATUS
,
BUYTYPEOPTION
,
BUYWay
,
GOODSTYPE
}
from
"../../util/wordbook"
...
...
@@ -166,6 +180,7 @@ import {getGoodsListApi,setOrderApi,getPeriodsApi} from "../../service/api"
buyTypeOptions
:
BUYTYPEOPTION
,
pickerOptions1
:
''
,
buyWayOptioms
:
BUYWay
,
teacherList
:
[],
}
},
...
...
@@ -189,7 +204,7 @@ import {getGoodsListApi,setOrderApi,getPeriodsApi} from "../../service/api"
buy_type
:
data
.
buy_type
,
province_name
:
data
.
province_name
,
city_id
:
data
.
city
,
city
_name
:
data
.
city_name
,
city
:
data
.
city_name
,
area
:
data
.
district_name
,
area_id
:
data
.
district
,
province_id
:
data
.
province
,
...
...
@@ -209,29 +224,32 @@ import {getGoodsListApi,setOrderApi,getPeriodsApi} from "../../service/api"
if
(
this
.
form
.
desc
){
json
.
desc
=
this
.
form
.
desc
}
json
.
invite_type
=
"TEACHER"
;
json
.
status
=
2
;
json
.
invite_earnings
=
0
;
json
.
is_captain
=
""
;
json
.
out_trade_no
=
"1"
console
.
log
(
json
)
// this.newdialogObj.show=false
if
(
json
.
province_name
&&
json
.
address
&&
json
.
receive_mobile
&&
json
.
receive_name
){
setOrderApi
(
json
).
then
(
res
=>
{
this
.
newdialogObj
.
show
=
false
this
.
$message
({
message
:
'添加成功'
,
type
:
'success'
});
})
}
else
{
this
.
$message
({
message
:
"缺少必填项"
,
type
:
"warning"
});
}
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
}
});
},
handlerAddressChange
(
val
){
if
(
!
val
.
province
||
!
val
.
city
||
!
val
.
district
){
...
...
@@ -290,10 +308,30 @@ import {getGoodsListApi,setOrderApi,getPeriodsApi} from "../../service/api"
this
.
form
.
periods_id
=
data
[
1
];
}
},
getTeacherList
(
name
){
let
json
=
{
limit
:
100
,
page
:
1
};
if
(
name
)
{
json
.
name
=
name
}
getTeacherListApi
(
json
).
then
(
res
=>
{
this
.
teacherList
=
res
.
list
});
},
remoteMethod
(
query
)
{
if
(
query
!==
''
)
{
this
.
getTeacherList
(
query
);
}
else
{
this
.
getTeacherList
();
}
},
},
mounted
(){
this
.
getGoodsOption
();
this
.
getPeriodsList
();
this
.
getTeacherList
();
},
}
</
script
>
...
...
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