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
dd43036e
Commit
dd43036e
authored
Aug 20, 2019
by
赵茹林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增 一次性物流信息 编辑
parent
0f3705a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
105 deletions
+88
-105
dialog.vue
src/components/disposable/dialog.vue
+75
-70
index.vue
src/components/disposable/index.vue
+13
-35
No files found.
src/components/disposable/dialog.vue
View file @
dd43036e
...
@@ -4,8 +4,23 @@
...
@@ -4,8 +4,23 @@
append-to-body
append-to-body
:visible
.
sync=
"dialogObj.show"
:visible
.
sync=
"dialogObj.show"
width=
"800px"
>
width=
"800px"
>
<vue-address
:province=
"dialogObj.province"
:city=
"dialogObj.city"
:district=
"dialogObj.district"
:detail=
"dialogObj.detail"
:mobile=
"dialogObj.receive_mobile"
:name=
"dialogObj.receive_name"
@
change=
"handlerAddressChange"
>
<el-form
label-width=
"100px"
style=
"margin-top: 20px;"
>
</vue-address>
<el-form-item
label=
"收货人"
required
>
<el-input
v-model=
"form.receive_name"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"收货手机号"
required
>
<el-input
v-model=
"form.receive_mobile"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"收货地址"
required
>
<el-input
v-model=
"form.receive_address"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"物流单号"
>
<el-input
v-model=
"form.express_no"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"物流名称"
>
<el-input
v-model=
"form.express_name"
type=
"text"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogObj.show = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogObj.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"saveAddress"
>
保 存
</el-button>
<el-button
type=
"primary"
@
click=
"saveAddress"
>
保 存
</el-button>
...
@@ -14,90 +29,80 @@
...
@@ -14,90 +29,80 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
editDeliverAddressApi
}
from
"../../service/api"
;
import
{
putDisposableApi
}
from
"../../service/api"
;
import
vueAddress
from
'../framework/address-picker/Address'
import
AddressArray
from
'../framework/address-picker/addr'
export
default
{
export
default
{
name
:
"dialogObj"
,
name
:
"dialogObj"
,
props
:[
props
:
[
'dialogObj'
'dialogObj'
],
],
data
(){
data
()
{
return
{
return
{
form
:
{
}
}
}
},
},
watch
:{
watch
:
{
'dialogObj.show'
:{
'dialogObj.show'
:
{
deep
:
true
,
deep
:
true
,
handler
:
function
()
{
handler
:
function
()
{
console
.
log
(
this
.
dialogObj
)
console
.
log
(
this
.
dialogObj
)
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dialogObj
))
}
}
}
}
},
},
methods
:{
methods
:
{
handlerAddressChange
(
val
)
{
saveAddress
()
{
if
(
!
val
.
province
||
!
val
.
city
||
!
val
.
district
){
if
(
!
this
.
form
.
receive_name
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请输入收货人名'
});
return
return
}
}
this
.
dialogObj
.
detail
=
val
.
detail
;
if
(
!
this
.
form
.
receive_mobile
)
{
this
.
dialogObj
.
province
=
val
.
province
;
this
.
$message
({
this
.
dialogObj
.
city
=
val
.
city
;
type
:
'error'
,
this
.
dialogObj
.
receive_mobile
=
val
.
mobile
;
message
:
'请输入收货手机号'
this
.
dialogObj
.
receive_name
=
val
.
name
;
});
let
provinceObj
=
AddressArray
.
filter
((
item
)
=>
{
return
return
item
.
value
===
val
.
province
}
})
if
(
!
this
.
form
.
receive_address
)
{
let
cityObj
=
provinceObj
[
0
].
children
.
filter
((
city
)
=>
{
this
.
$message
({
return
city
.
value
===
val
.
city
type
:
'error'
,
})
message
:
'请输入收货地址'
let
districtObj
=
cityObj
[
0
].
children
.
filter
((
district
)
=>
{
});
return
district
.
value
===
val
.
district
return
})
}
this
.
dialogObj
.
province_name
=
provinceObj
[
0
].
label
;
this
.
dialogObj
.
city_name
=
cityObj
[
0
].
label
;
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
this
.
dialogObj
.
district_name
=
districtObj
.
length
>
0
?
districtObj
[
0
].
label
:
cityObj
[
0
].
children
[
0
].
label
;
confirmButtonText
:
'确定'
,
this
.
dialogObj
.
district
=
districtObj
.
length
>
0
?
districtObj
[
0
].
value
:
cityObj
[
0
].
children
[
0
].
value
;
cancelButtonText
:
'取消'
,
},
type
:
'warning'
saveAddress
()
{
}).
then
(()
=>
{
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
let
json
=
{
confirmButtonText
:
'确定'
,
deliver_id
:
this
.
form
.
id
,
cancelButtonText
:
'取消'
,
receive_address
:
this
.
form
.
receive_address
,
type
:
'warning'
receive_name
:
this
.
form
.
receive_name
,
}).
then
(()
=>
{
receive_mobile
:
this
.
form
.
receive_mobile
,
let
json
=
{
};
province_id
:
this
.
dialogObj
.
province
,
this
.
form
.
express_no
?
json
.
express_no
=
this
.
form
.
express_no
:
''
;
province_name
:
this
.
dialogObj
.
province_name
,
this
.
form
.
express_name
?
json
.
express_name
=
this
.
form
.
express_name
:
''
;
city_id
:
this
.
dialogObj
.
city
,
putDisposableApi
(
this
.
form
.
id
,
json
).
then
(
res
=>
{
city
:
this
.
dialogObj
.
city_name
,
this
.
$message
({
area
:
this
.
dialogObj
.
district_name
,
type
:
'success'
,
area_id
:
this
.
dialogObj
.
district
,
message
:
'修改成功'
address
:
this
.
dialogObj
.
detail
,
receive_name
:
this
.
dialogObj
.
receive_name
,
receive_mobile
:
this
.
dialogObj
.
receive_mobile
};
editDeliverAddressApi
(
this
.
dialogObj
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功'
});
this
.
dialogObj
.
show
=
false
;
this
.
$emit
(
"reflash"
);
});
});
})
this
.
dialogObj
.
show
=
false
;
this
.
$emit
(
"reflash"
);
});
})
},
},
},
},
components
:{
mounted
()
{
vueAddress
},
mounted
(){
console
.
log
(
this
.
dialogObj
)
console
.
log
(
this
.
dialogObj
)
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
.dialog-footer{
display: block;
text-align: center;
}
</
style
>
src/components/disposable/index.vue
View file @
dd43036e
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<div
class=
"search-btn-wrapper"
>
<div
class=
"search-btn-wrapper"
>
<el-button
type=
"primary"
plain
@
click=
"getList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"getList"
>
搜索
</el-button>
<!--
<el-button
v-if=
"!$store.state.readonly"
type=
"primary"
plain
@
click=
"downLoad()"
>
excel模板下载
</el-button>
-->
<!--
<el-button
v-if=
"!$store.state.readonly"
type=
"primary"
plain
@
click=
"downLoad()"
>
excel模板下载
</el-button>
-->
<el-button
type=
"
primary
"
plain
@
click=
"exportTable"
v-if=
"$store.state.export"
>
导出
</el-button>
<el-button
type=
"
success
"
plain
@
click=
"exportTable"
v-if=
"$store.state.export"
>
导出
</el-button>
<el-upload
<el-upload
style=
"margin-left: 10px;"
style=
"margin-left: 10px;"
v-if=
"$store.state.import"
v-if=
"$store.state.import"
...
@@ -73,9 +73,10 @@
...
@@ -73,9 +73,10 @@
<el-table-column
prop=
"status"
label=
"物流状态"
>
<el-table-column
prop=
"status"
label=
"物流状态"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
status
|
LogisticsStatusFil
}}
<br/>
{{
scope
.
row
.
status
|
LogisticsStatusFil
}}
<br/>
<template
v-if=
"scope.row.status == 1 && scope.row.express_no"
>
<!--
<template
v-if=
"scope.row.status == 1"
>
-->
{{
scope
.
row
.
express_name
}}
:
<a
:href=
"`https://m.baidu.com/from=1013755s/s?word=$
{scope.row.express_no}
&
sa=tb
&
ts=2790568
&
t_kt=0
&
ie=utf-8
&
rsv_t=cbe2F%252FT5T3MIzkRl%252Fg8ZUw%252FEPHZmn2wHIrB8cLvgNlEKyyDqUNPrTyDEEDjkAb8
&
rsv_pq=11793168499026332712
&
ss=110000000001
&
tj=1
&
rqlang=zh
&
rsv_sug4=4111
&
inputT=3178
&
oq=快递单号查询`" target="_blank">
{{
scope
.
row
.
express_no
}}
</a>
<template
v-if=
"scope.row.express_name"
>
{{
scope
.
row
.
express_name
}}
:
</
template
>
</
template
>
<a
v-if=
"scope.row.express_no"
:href=
"`https://m.baidu.com/from=1013755s/s?word=${scope.row.express_no}&sa=tb&ts=2790568&t_kt=0&ie=utf-8&rsv_t=cbe2F%252FT5T3MIzkRl%252Fg8ZUw%252FEPHZmn2wHIrB8cLvgNlEKyyDqUNPrTyDEEDjkAb8&rsv_pq=11793168499026332712&ss=110000000001&tj=1&rqlang=zh&rsv_sug4=4111&inputT=3178&oq=快递单号查询`"
target=
"_blank"
>
{{scope.row.express_no}}
</a>
<!--</template>-->
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
width=
"80"
label=
"操作"
v-if=
"!$store.state.readonly"
fixed=
"right"
>
<el-table-column
width=
"80"
label=
"操作"
v-if=
"!$store.state.readonly"
fixed=
"right"
>
...
@@ -86,12 +87,6 @@
...
@@ -86,12 +87,6 @@
</el-table>
</el-table>
<page
:nowPage=
"nowPage"
:total=
"total"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<page
:nowPage=
"nowPage"
:total=
"total"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<address-dialog
:dialogObj=
"dialogObj"
@
reflash=
"onUpdateAddress"
></address-dialog>
<address-dialog
:dialogObj=
"dialogObj"
@
reflash=
"onUpdateAddress"
></address-dialog>
<receiveInfoDialog
:goodsList=
"goodsList"
:showFlag=
"showFlag"
:cancelEvent=
"cancelEvent"
:sureEvent=
"sureEvent"
/>
</div>
</div>
</template>
</template>
...
@@ -102,16 +97,7 @@
...
@@ -102,16 +97,7 @@
import
receiveInfoDialog
from
"./receiveInfoDialog"
;
import
receiveInfoDialog
from
"./receiveInfoDialog"
;
import
Cookie
from
'../../util/cookie'
import
Cookie
from
'../../util/cookie'
import
CommonJs
from
'../../util/common'
;
import
CommonJs
from
'../../util/common'
;
import
{
import
{
getDisposableApi
,
putDisposableApi
}
from
"../../service/api"
;
getDisposableApi
,
putDisposableApi
,
getDeliverListApi
,
getPeriodsApi
,
getGoodsListApi
,
getDefaultPeriodsApi
,
exportExcelApi
,
getThemeListApi
}
from
"../../service/api"
;
import
{
LogisticsStatus
,
GOODSTYPE
}
from
"../../util/wordbook"
;
import
{
LogisticsStatus
,
GOODSTYPE
}
from
"../../util/wordbook"
;
export
default
{
export
default
{
...
@@ -178,21 +164,13 @@
...
@@ -178,21 +164,13 @@
editAddress
(
row
)
{
editAddress
(
row
)
{
// this.dialogObj={show:true}
// this.dialogObj={show:true}
console
.
log
(
row
);
console
.
log
(
row
);
// if (!row || !row.province_name) {
//if (row.status == 1) {
// this.dialogObj.province = "";
this
.
dialogObj
.
express_no
=
row
.
express_no
||
''
;
// this.dialogObj.city = "";
this
.
dialogObj
.
express_name
=
row
.
express_name
||
''
;
// this.dialogObj.district = "";
//}
// } else {
this
.
dialogObj
.
receive_address
=
row
.
receive_address
||
''
;
// this.dialogObj.province = "";
this
.
dialogObj
.
receive_mobile
=
row
.
receive_mobile
||
''
;
// this.dialogObj.district = "";
this
.
dialogObj
.
receive_name
=
row
.
receive_name
||
''
;
// this.dialogObj.city = "";
// }
this
.
dialogObj
.
detail
=
row
.
address
;
this
.
dialogObj
.
receive_mobile
=
row
.
receive_mobile
;
this
.
dialogObj
.
receive_name
=
row
.
receive_name
;
this
.
dialogObj
.
province_name
=
""
;
this
.
dialogObj
.
city_name
=
""
;
this
.
dialogObj
.
district_name
=
""
;
this
.
dialogObj
.
id
=
row
.
id
;
this
.
dialogObj
.
id
=
row
.
id
;
this
.
dialogObj
.
show
=
true
;
this
.
dialogObj
.
show
=
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