Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
tFIMS
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 150db94d
authored
Sep 12, 2019
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
6f85768f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
16 deletions
src/api/materiaOrderManagement.js
src/api/trafficManagement.js
src/views/materiaOrderManagement/index.vue
src/views/subSysManagement/editDialog.vue
src/views/trafficManagement/editDialog.vue
src/views/trafficManagement/index.vue
src/api/materiaOrderManagement.js
View file @
150db94
...
...
@@ -18,19 +18,18 @@ function removeApi(data) {
}
function
exportApi
(
data
)
{
data
.
method
=
`
${
path
}
export`
data
.
method
=
`
${
path
}
export
Pdf
`
return
request
(
data
)
}
function
downloadApi
(
data
)
{
data
.
method
=
`
${
path
}
download`
return
request
(
data
)
}
//
function downloadApi(data) {
//
data.method = `${path}download`
//
return request(data)
//
}
export
{
getListApi
,
detailApi
,
removeApi
,
exportApi
,
downloadApi
exportApi
}
src/api/trafficManagement.js
View file @
150db94
...
...
@@ -21,7 +21,7 @@ function removeApi(data) {
return
request
(
data
)
}
function
isExistApi
(
data
)
{
function
is
Traffic
ExistApi
(
data
)
{
data
.
method
=
`
${
path
}
detail`
return
request
(
data
)
}
...
...
@@ -31,5 +31,5 @@ export {
methods
,
editApi
,
removeApi
,
isExistApi
is
Traffic
ExistApi
}
src/views/materiaOrderManagement/index.vue
View file @
150db94
...
...
@@ -114,7 +114,7 @@
<
script
>
import
DetailDialog
from
'./detailDialog'
import
{
getListApi
,
removeApi
,
exportApi
,
download
Api
}
from
'@api/materiaOrderManagement'
import
{
getListApi
,
detailApi
,
removeApi
,
export
Api
}
from
'@api/materiaOrderManagement'
import
notice
from
'@/common/notice'
export
default
{
name
:
'fimsMateriaOrderManagement'
,
...
...
@@ -264,7 +264,7 @@ export default {
// 表格-查看详情
handleDetail
(
row
)
{
d
ownload
Api
({
d
etail
Api
({
orderCode
:
row
.
orderCode
}).
then
(
res
=>
{
this
.
dialogTitle
=
row
.
orderType
===
1
?
'物料申请'
:
'物料报废'
...
...
src/views/subSysManagement/editDialog.vue
View file @
150db94
<!-- 新增/编辑车辆弹窗 -->
import { constants } from 'fs';
<
template
>
<div>
<el-dialog
...
...
@@ -19,7 +18,9 @@ import { constants } from 'fs';
<el-input
:disabled=
"disabled"
v-model=
"editForm.subsystemCode"
maxlength=
"14"
placeholder=
"请输入子系统编号"
clearable
></el-input>
</el-form-item>
<el-form-item
...
...
@@ -28,8 +29,10 @@ import { constants } from 'fs';
<el-input
:disabled=
"disabled"
v-model=
"editForm.trafficCode"
maxlength=
"4"
placeholder=
"请输入车辆编号"
@
change=
"validateCode"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"类型"
prop=
"subsystemTypeCode"
>
...
...
@@ -72,6 +75,7 @@ import { constants } from 'fs';
<
script
>
import
{
isExistApi
}
from
'@api/subSysManagement'
import
{
isTrafficExistApi
}
from
'@api/trafficManagement'
export
default
{
name
:
'EditDialog'
,
data
()
{
...
...
@@ -81,10 +85,13 @@ export default {
rules
:
{
subsystemCode
:
[
{
required
:
true
,
message
:
'请输入子系统编号'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'子系统编号需输入14位数字或大写字母'
,
trigger
:
'change'
,
validator
:
this
.
isNumOrString
},
{
required
:
true
,
message
:
'子系统编号已存在'
,
trigger
:
'blur'
,
validator
:
this
.
isCodeExist
}
],
trafficCode
:
[
{
required
:
true
,
message
:
'请输入车辆编号'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入车辆编号'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'车辆编号需输入4位数字'
,
trigger
:
'change'
,
validator
:
this
.
isNum
},
{
required
:
true
,
message
:
'该车辆编号不存在'
,
trigger
:
'blur'
,
validator
:
this
.
isTrafficCodeExist
}
],
subsystemTypeCode
:
[
{
required
:
true
,
message
:
'请选择类型'
,
trigger
:
'change'
}
...
...
@@ -132,6 +139,24 @@ export default {
}
},
async
isTrafficCodeExist
(
rule
,
value
,
callback
)
{
console
.
log
(
value
)
if
(
!
this
.
editForm
.
id
)
{
const
res
=
await
isTrafficExistApi
({
trafficCode
:
value
})
res
.
trafficCode
?
callback
()
:
callback
(
new
Error
(
rule
.
message
))
}
},
isNum
(
rule
,
value
,
callback
)
{
const
regNum
=
/^
[\d]{4,4}
$/
regNum
.
test
(
value
)
?
callback
()
:
callback
(
new
Error
(
rule
.
message
))
},
isNumOrString
(
rule
,
value
,
callback
)
{
const
regNum
=
/^
[
A-Z
\d]{14,14}
$/
regNum
.
test
(
value
)
?
callback
()
:
callback
(
new
Error
(
rule
.
message
))
},
validateCode
(
value
)
{
this
.
$refs
.
editRuleForm
.
validateField
(
'subsystemCode'
)
},
...
...
src/views/trafficManagement/editDialog.vue
View file @
150db94
...
...
@@ -54,7 +54,7 @@
</
template
>
<
script
>
import
{
isExistApi
}
from
'@api/trafficManagement'
import
{
is
Traffic
ExistApi
}
from
'@api/trafficManagement'
export
default
{
name
:
'EditDialog'
,
data
()
{
...
...
@@ -102,7 +102,7 @@ export default {
methods
:
{
async
isCodeExist
(
rule
,
value
,
callback
)
{
if
(
!
this
.
editForm
.
id
)
{
const
res
=
await
isExistApi
({
trafficCode
:
value
})
const
res
=
await
is
Traffic
ExistApi
({
trafficCode
:
value
})
res
.
trafficCode
?
callback
(
new
Error
(
rule
.
message
))
:
callback
()
}
},
...
...
src/views/trafficManagement/index.vue
View file @
150db94
...
...
@@ -70,6 +70,7 @@
<el-table-column
align=
"center"
label=
"操作"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<auth-button
:data=
"scope.row"
></auth-button>
...
...
@@ -139,7 +140,8 @@ export default {
tableData
:
[],
tableColumns
:
[{
label
:
'车辆编号'
,
prop
:
'trafficCode'
prop
:
'trafficCode'
,
width
:
'120px'
},
{
label
:
'归属车辆段'
,
prop
:
'stationName'
...
...
@@ -149,6 +151,7 @@ export default {
},
{
label
:
'接口开放'
,
prop
:
'openType'
,
width
:
'80px'
,
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
.
openType
)
{
return
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment