Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhongtong-avi-web
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
中通客车项目
zhongtong-avi-web
Commits
7a6c0f56
Commit
7a6c0f56
authored
Mar 09, 2020
by
李志鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fea(报工点查询): 功能联调(40%)
parent
b8174d29
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
286 additions
and
2 deletions
+286
-2
DutyStationMakeUpDialog.vue
src/views/DutyStation/components/DutyStationMakeUpDialog.vue
+244
-0
list.vue
src/views/DutyStation/list.vue
+42
-2
No files found.
src/views/DutyStation/components/DutyStationMakeUpDialog.vue
0 → 100644
View file @
7a6c0f56
<
template
>
<el-dialog
title=
"报工点补扫"
:show-close=
"false"
:close-on-press-escape=
"false"
:close-on-click-modal=
"false"
:visible
.
sync=
"dialogToggle"
width=
"400px"
>
<el-form
label-width=
"100px"
label-position=
"top"
ref=
"form"
:model=
"formData"
:rules=
"formRules"
>
<el-row
:gutter=
"30"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"工单号"
prop=
"vin"
required
>
<el-input
maxlength=
"50"
v-model=
"formData.vin"
size=
"small"
style=
"width: 100%;"
placeholder=
"自动带出"
disabled
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"30"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"报工点"
prop=
"stationName"
required
>
<el-input
maxlength=
"50"
v-model=
"formData.stationName"
size=
"small"
style=
"width: 100%;"
placeholder=
"自动带出"
disabled
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"30"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"工位编码"
prop=
"stationNo"
required
>
<el-select
v-model=
"formData.stationNo"
size=
"small"
style=
"width: 100%;"
placeholder=
"请选择工位编码"
>
<el-option
v-for=
"(item, index) in stationNoList"
:key=
"index"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"30"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"过站时间"
prop=
"createTime"
required
>
<el-date-picker
v-model=
"formData.createTime"
size=
"small"
type=
"datetime"
style=
"width: 100%;"
placeholder=
"请选择过站时间"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
:loading=
"loadingToggle"
size=
"small"
type=
"primary"
icon=
"el-icon-check"
@
click=
"doConfirmClick('form')"
>
确认
</el-button>
<el-button
size=
"small"
icon=
"el-icon-close"
@
click=
"doCancelClick('form')"
>
取消
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
export
default
{
name
:
'DutyStationMakeUpDialog'
,
props
:
{
vin
:
{
type
:
String
,
default
:
()
=>
{
return
{}
}
},
stationName
:
{
type
:
String
,
default
:
()
=>
{
return
{}
}
}
},
watch
:
{
dialogToggle
(
newVal
,
oldVal
)
{
if
(
this
.
dialogToggle
)
{
this
.
formData
.
vin
=
this
.
vin
;
this
.
formData
.
stationName
=
this
.
stationName
;
// 根据报工点查询工位编号
this
.
getStationNoByStationName
();
}
}
},
data
()
{
return
{
// 工位编码列表
stationNoList
:
[],
// 数据提交开关
loadingToggle
:
false
,
// 弹窗开关
dialogToggle
:
false
,
// 表单数据
formData
:
{
vin
:
''
,
stationName
:
''
,
stationNo
:
''
,
createTime
:
''
},
// 表单校验规则
formRules
:
{
// 工单号
vin
:
[
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
_
.
trim
(
value
)
===
''
)
{
callback
(
new
Error
(
'请输入工单号'
))
}
callback
()
},
trigger
:
[
'change'
,
'blur'
]
}
],
// 报工点
stationName
:
[
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
_
.
trim
(
value
)
===
''
)
{
callback
(
new
Error
(
'请输入报工点'
))
}
callback
()
},
trigger
:
[
'change'
,
'blur'
]
}
],
// 工位编码
stationNo
:
[
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
_
.
trim
(
value
)
===
''
)
{
callback
(
new
Error
(
'请输入工位编码'
))
}
callback
()
},
trigger
:
[
'change'
,
'blur'
]
}
],
// 过站时间
createTime
:
[
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
_
.
trim
(
value
)
===
''
)
{
callback
(
new
Error
(
'请选择过站时间'
))
}
callback
()
},
trigger
:
[
'change'
,
'blur'
]
}
]
}
}
},
methods
:
{
// 根据报工点查询工位编号
async
getStationNoByStationName
()
{
try
{
let
response
=
await
this
.
$service
(
'GET'
,
'/pass/getStationNo/{stationName}'
,
{
stationName
:
this
.
stationName
});
this
.
stationNoList
=
_
.
cloneDeep
(
response
);
}
catch
(
error
)
{
throw
error
;
}
},
// 点击确认按钮
doConfirmClick
(
formName
)
{
this
.
$refs
[
formName
].
validate
(
vaild
=>
{
if
(
vaild
)
{
// 保存缺失的过站信息
this
.
saveDutyStationInfo
(
formName
);
}
})
},
// 保存缺失的过站信息
async
saveDutyStationInfo
(
formName
)
{
try
{
this
.
loadingToggle
=
true
;
let
params
=
{
...
this
.
formData
};
let
response
=
await
this
.
$service
(
'POST'
,
'/pass/savePassInfo'
,
params
);
if
(
Array
.
isArray
(
response
))
{
this
.
loadingToggle
=
false
;
this
.
$message
.
success
(
'报工点补扫成功'
);
this
.
dialogToggle
=
false
;
this
.
$refs
[
formName
].
resetFields
();
this
.
$emit
(
'doDutyStationMakeUpConfirmClick'
);
for
(
let
key
in
this
.
formData
)
{
this
.
formData
[
key
]
=
''
;
}
}
}
catch
(
error
)
{
this
.
loadingToggle
=
false
;
throw
error
;
}
},
// 点击取消按钮
doCancelClick
(
formName
)
{
this
.
dialogToggle
=
false
;
this
.
$refs
[
formName
].
resetFields
();
this
.
$emit
(
'doCancelClick'
);
for
(
let
key
in
this
.
formData
)
{
this
.
formData
[
key
]
=
''
;
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
\ No newline at end of file
src/views/DutyStation/list.vue
View file @
7a6c0f56
...
...
@@ -52,9 +52,31 @@
</
template
>
</el-table-column>
</template>
<
template
slot=
"operationColumn"
>
<el-table-column
fixed=
"right"
width=
"55"
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"doEditClick(scope.row)"
>
编辑
</el-button>
</
template
>
</el-table-column>
</template>
</Table>
</div>
</div>
<!-- 报工点补扫弹窗 -->
<DutyStationMakeUpDialog
ref=
"DutyStationMakeUpDialog"
:vin=
"vin"
:stationName=
"stationName"
@
doDutyStationMakeUpConfirmClick=
"doDutyStationMakeUpConfirmClick"
>
</DutyStationMakeUpDialog>
</div>
</template>
...
...
@@ -63,11 +85,14 @@
import
Table
from
'@/components/Table/index.vue'
;
import
Search
from
'@/components/Search'
;
import
DutyStationMakeUpDialog
from
'./components/DutyStationMakeUpDialog'
;
export
default
{
name
:
'DutyStationIndex'
,
components
:
{
Search
,
Table
Table
,
DutyStationMakeUpDialog
},
data
()
{
return
{
...
...
@@ -90,7 +115,11 @@
currentPage
:
1
,
pageSize
:
20
}
}
},
// 工单号
vin
:
''
,
// 报工点
stationName
:
''
}
},
methods
:
{
...
...
@@ -136,6 +165,17 @@
}
catch
(
error
)
{
throw
error
;
}
},
// 点击编辑按钮
doEditClick
(
dutyStation
)
{
this
.
$refs
.
DutyStationMakeUpDialog
.
dialogToggle
=
true
;
this
.
vin
=
dutyStation
.
vin
;
this
.
stationName
=
dutyStation
.
stationName
;
},
// 点击报工点补扫弹窗确认按钮
doDutyStationMakeUpConfirmClick
()
{
// 获取报工点记录
this
.
getDutyStationResult
();
}
},
mounted
()
{
...
...
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