Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
welfare
Overview
Overview
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
达摩4.0重构
welfare
Commits
13b6e221
Commit
13b6e221
authored
Jun 11, 2021
by
黑潮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 更新物流公司
parent
6b8616ae
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
15 deletions
+25
-15
App.vue
src/App.vue
+9
-0
performance.js
src/api/performance.js
+2
-1
index.js
src/store/index.js
+4
-0
logistics-delivery-dialog.vue
...rformance-manage/components/logistics-delivery-dialog.vue
+5
-7
logistics-info-dialog.vue
...s/performance-manage/components/logistics-info-dialog.vue
+5
-7
No files found.
src/App.vue
View file @
13b6e221
...
...
@@ -5,6 +5,8 @@
</
template
>
<
script
>
import
fetch
from
'@/api/performance.js'
;
const
{
getLogisticsCompany
}
=
fetch
;
export
default
{
name
:
'App'
,
data
()
{
...
...
@@ -13,8 +15,15 @@ export default {
};
},
mounted
()
{
this
.
getLogisticsCompany
();
this
.
$store
.
commit
(
'updateMainHeight'
,
document
.
body
.
offsetHeight
-
180
);
},
methods
:
{
async
getLogisticsCompany
()
{
let
{
result
}
=
await
getLogisticsCompany
();
this
.
$store
.
commit
(
'setLogisticsCompany'
,
result
||
[]);
}
},
watch
:
{
'$route'
:
{
handler
(
val
){
...
...
src/api/performance.js
View file @
13b6e221
...
...
@@ -54,7 +54,8 @@ let performance = {
url
:
'/delivery-order/close'
,
method
:
'post'
,
useFormData
:
true
}
},
getLogisticsCompany
:
'/logistics/get-company'
};
performance
=
getFetch
(
performance
,
welfarePrefix
);
...
...
src/store/index.js
View file @
13b6e221
...
...
@@ -7,6 +7,7 @@ Vue.use(Vuex);
export
default
new
Vuex
.
Store
({
state
:
{
logisticsCompany
:
[],
lock
:
false
,
// 当没有权限或者过期限制时锁住所有操作 -- 暂不使用该属性
loading
:
false
,
// 全局loading
defaultAreaId
:
''
,
// 默认的子应用id
...
...
@@ -23,6 +24,9 @@ export default new Vuex.Store({
showCornerCanUseApp
:
false
// 右下角弹出可用app列表
},
mutations
:
{
setLogisticsCompany
(
state
,
val
)
{
state
.
logisticsCompany
=
val
;
},
updateShowCornerCanUseApp
(
state
,
showCornerCanUseApp
)
{
state
.
showCornerCanUseApp
=
showCornerCanUseApp
;
},
...
...
src/views/performance-manage/components/logistics-delivery-dialog.vue
View file @
13b6e221
...
...
@@ -7,8 +7,9 @@
</el-form-item>
<el-form-item
label=
"物流公司"
prop=
"logisticsCompanyCode"
>
<el-select
style=
"width:100%"
placeholder=
"请选择"
v-model=
"form.logisticsCompanyCode"
>
<el-option
label=
"顺丰速递"
value=
"SF"
></el-option>
<el-option
label=
"中通快递"
value=
"STO"
></el-option>
<!--
<el-option
label=
"顺丰速递"
value=
"SF"
></el-option>
<el-option
label=
"中通快递"
value=
"STO"
></el-option>
-->
<el-option
v-for=
"item in $store.state.logisticsCompany"
:key=
"item.companyId"
:label=
"item.companyName"
:value=
"item.companyCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"物流单号"
prop=
"logisticCode"
>
...
...
@@ -53,13 +54,10 @@ export default {
async
handleConfirm
()
{
let
valid
=
await
this
.
$refs
.
form
.
validate
();
if
(
valid
)
{
let
logisticsCompany
=
{
'SF'
:
'顺丰速递'
,
'STO'
:
'中通快递'
};
const
item
=
this
.
$store
.
state
.
logisticsCompany
.
find
(
item
=>
item
.
companyCode
==
this
.
form
.
logisticsCompanyCode
)
||
{};
this
.
loading
=
true
;
await
delivering
({
companyName
:
logisticsCompany
[
this
.
form
.
logisticsCompanyCode
]
,
companyName
:
item
.
companyName
,
companyCode
:
this
.
form
.
logisticsCompanyCode
,
logisticsNo
:
this
.
form
.
logisticCode
,
deliveryId
:
this
.
data
.
deliveryId
,
...
...
src/views/performance-manage/components/logistics-info-dialog.vue
View file @
13b6e221
...
...
@@ -7,8 +7,9 @@
物流公司:
<span
v-if=
"!isEditing"
>
{{
data
.
logisticsCompanyName
}}
</span>
<el-select
class=
"w160"
v-else
placeholder=
"请选择"
v-model=
"logisticsCompanyCode"
>
<el-option
label=
"顺丰速递"
value=
"SF"
></el-option>
<el-option
label=
"中通快递"
value=
"STO"
></el-option>
<!--
<el-option
label=
"顺丰速递"
value=
"SF"
></el-option>
<el-option
label=
"中通快递"
value=
"STO"
></el-option>
-->
<el-option
v-for=
"item in $store.state.logisticsCompany"
:key=
"item.companyId"
:label=
"item.companyName"
:value=
"item.companyCode"
></el-option>
</el-select>
</span>
<span
class=
"ml120"
>
...
...
@@ -76,13 +77,10 @@ export default {
},
methods
:
{
async
handleConfirm
()
{
let
logisticsCompany
=
{
'SF'
:
'顺丰速递'
,
'STO'
:
'中通快递'
};
const
item
=
this
.
$store
.
state
.
logisticsCompany
.
find
(
item
=>
item
.
companyCode
==
this
.
logisticsCompanyCode
)
||
{};
this
.
loading
=
true
;
await
delivering
({
companyName
:
logisticsCompany
[
this
.
logisticsCompanyCode
]
,
companyName
:
item
.
companyName
,
companyCode
:
this
.
logisticsCompanyCode
,
logisticsNo
:
this
.
logisticsNo
,
deliveryId
:
this
.
data
.
deliveryId
,
...
...
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