Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
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
ximai
mes-ui
Commits
98cfaf11
Commit
98cfaf11
authored
Feb 05, 2024
by
chenzj
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.local.topsunit.com/mes/mes-ui
into dev
parents
83a01479
67935d71
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1659 additions
and
107 deletions
+1659
-107
tmToolRequest.js
src/api/mes/tm/tmToolRequest.js
+44
-0
tmToolRequestItem.js
src/api/mes/tm/tmToolRequestItem.js
+44
-0
tmToolRequestUse.js
src/api/mes/tm/tmToolRequestUse.js
+44
-0
tmToolRequestUseItem.js
src/api/mes/tm/tmToolRequestUseItem.js
+44
-0
single.vue
src/components/toolRequest/single.vue
+265
-0
Account.vue
src/views/mes/md/client/components/Account.vue
+8
-8
ClientContact.vue
src/views/mes/md/client/components/ClientContact.vue
+7
-7
PaymentRelation.vue
src/views/mes/md/client/components/PaymentRelation.vue
+9
-9
UrgeEmail.vue
src/views/mes/md/client/components/UrgeEmail.vue
+7
-7
index.vue
src/views/mes/md/client/index.vue
+86
-76
index.vue
src/views/mes/tm/toolrequest/index.vue
+441
-0
itemIndex.vue
src/views/mes/tm/toolrequest/itemIndex.vue
+175
-0
index.vue
src/views/mes/tm/toolrequestuse/index.vue
+485
-0
No files found.
src/api/mes/tm/tmToolRequest.js
0 → 100644
View file @
98cfaf11
import
request
from
'@/utils/request'
// 查询刀模板申请单列表
export
function
listTmToolRequest
(
query
)
{
return
request
({
url
:
'/tm/tmToolRequest/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询刀模板申请单详细
export
function
getTmToolRequest
(
toolRequestId
)
{
return
request
({
url
:
'/tm/tmToolRequest/'
+
toolRequestId
,
method
:
'get'
})
}
// 新增刀模板申请单
export
function
addTmToolRequest
(
data
)
{
return
request
({
url
:
'/tm/tmToolRequest'
,
method
:
'post'
,
data
:
data
})
}
// 修改刀模板申请单
export
function
updateTmToolRequest
(
data
)
{
return
request
({
url
:
'/tm/tmToolRequest'
,
method
:
'put'
,
data
:
data
})
}
// 删除刀模板申请单
export
function
delTmToolRequest
(
toolRequestId
)
{
return
request
({
url
:
'/tm/tmToolRequest/'
+
toolRequestId
,
method
:
'delete'
})
}
src/api/mes/tm/tmToolRequestItem.js
0 → 100644
View file @
98cfaf11
import
request
from
'@/utils/request'
// 查询刀模板物料申请单列表
export
function
listTmToolRequestItem
(
query
)
{
return
request
({
url
:
'/tm/tmToolRequestItem/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询刀模板物料申请单详细
export
function
getTmToolRequestItem
(
toolRequestItemId
)
{
return
request
({
url
:
'/tm/tmToolRequestItem/'
+
toolRequestItemId
,
method
:
'get'
})
}
// 新增刀模板物料申请单
export
function
addTmToolRequestItem
(
data
)
{
return
request
({
url
:
'/tm/tmToolRequestItem'
,
method
:
'post'
,
data
:
data
})
}
// 修改刀模板物料申请单
export
function
updateTmToolRequestItem
(
data
)
{
return
request
({
url
:
'/tm/tmToolRequestItem'
,
method
:
'put'
,
data
:
data
})
}
// 删除刀模板物料申请单
export
function
delTmToolRequestItem
(
toolRequestItemId
)
{
return
request
({
url
:
'/tm/tmToolRequestItem/'
+
toolRequestItemId
,
method
:
'delete'
})
}
src/api/mes/tm/tmToolRequestUse.js
0 → 100644
View file @
98cfaf11
import
request
from
'@/utils/request'
// 查询刀模板领用单列表
export
function
listTmToolRequestUse
(
query
)
{
return
request
({
url
:
'/tm/tmToolRequestUse/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询刀模板领用单详细
export
function
getTmToolRequestUse
(
toolRequestUseId
)
{
return
request
({
url
:
'/tm/tmToolRequestUse/'
+
toolRequestUseId
,
method
:
'get'
})
}
// 新增刀模板领用单
export
function
addTmToolRequestUse
(
data
)
{
return
request
({
url
:
'/tm/tmToolRequestUse'
,
method
:
'post'
,
data
:
data
})
}
// 修改刀模板领用单
export
function
updateTmToolRequestUse
(
data
)
{
return
request
({
url
:
'/tm/tmToolRequestUse'
,
method
:
'put'
,
data
:
data
})
}
// 删除刀模板领用单
export
function
delTmToolRequestUse
(
toolRequestUseId
)
{
return
request
({
url
:
'/tm/tmToolRequestUse/'
+
toolRequestUseId
,
method
:
'delete'
})
}
src/api/mes/tm/tmToolRequestUseItem.js
0 → 100644
View file @
98cfaf11
import
request
from
'@/utils/request'
// 查询刀模板物料领用单列表
export
function
listTmToolRequestUseItem
(
query
)
{
return
request
({
url
:
'/tm/tmToolRequestUseItem/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询刀模板物料领用单详细
export
function
getTmToolRequestUseItem
(
toolRequestUseItemId
)
{
return
request
({
url
:
'/tm/tmToolRequestUseItem/'
+
toolRequestUseItemId
,
method
:
'get'
})
}
// 新增刀模板物料领用单
export
function
addTmToolRequestUseItem
(
data
)
{
return
request
({
url
:
'/tm/tmToolRequestUseItem'
,
method
:
'post'
,
data
:
data
})
}
// 修改刀模板物料领用单
export
function
updateTmToolRequestUseItem
(
data
)
{
return
request
({
url
:
'/tm/tmToolRequestUseItem'
,
method
:
'put'
,
data
:
data
})
}
// 删除刀模板物料领用单
export
function
delTmToolRequestUseItem
(
toolRequestUseItemId
)
{
return
request
({
url
:
'/tm/tmToolRequestUseItem/'
+
toolRequestUseItemId
,
method
:
'delete'
})
}
src/components/toolRequest/single.vue
0 → 100644
View file @
98cfaf11
<
template
>
<el-dialog
title=
"刀模板申请单选择"
v-if=
"showFlag"
:visible
.
sync=
"showFlag"
:modal=
"false"
width=
"80%"
center
>
<el-row
:gutter=
"20"
>
<!--刀模板申请数据-->
<el-col
:span=
"20"
:xs=
"20"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"作业单元"
prop=
"workunitName"
>
<el-input
v-model=
"queryParams.workunitName"
placeholder=
"请输入作业单元"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"申请时间"
prop=
"requestDate"
>
<el-date-picker
clearable
v-model=
"queryParams.requestDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择申请时间"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"toolRequestList"
@
current-change=
"handleCurrent"
@
row-dblclick=
"handleRowDbClick"
>
<el-table-column
width=
"50"
align=
"center"
>
<template
v-slot=
"scope"
>
<el-radio
v-model=
"selectedToolRequestId"
:label=
"scope.row.toolRequestId"
@
change=
"handleRowChange(scope.row)"
>
{{
""
}}
</el-radio
>
</
template
>
</el-table-column>
<el-table-column
label=
"申请单编码"
width=
"120"
align=
"center"
key=
"toolRequestCode"
prop=
"toolRequestCode"
v-if=
"columns[0].visible"
>
</el-table-column>
<el-table-column
label=
"工序"
min-width=
"120"
align=
"center"
key=
"processName"
prop=
"processName"
v-if=
"columns[1].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"作业单元"
width=
"120"
align=
"center"
key=
"workunitName"
prop=
"workunitName"
v-if=
"columns[2].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"申请时间"
align=
"center"
key=
"requestDate"
prop=
"requestDate"
v-if=
"columns[3].visible"
:show-overflow-tooltip=
"true"
>
</el-table-column>
<el-table-column
label=
"预计开始时间"
align=
"center"
key=
"startTime"
prop=
"startTime"
v-if=
"columns[4].visible"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"预计结束时间"
align=
"center"
key=
"endTime"
prop=
"endTime"
v-if=
"columns[5].visible"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"申请数量"
align=
"center"
key=
"requestNum"
prop=
"requestNum"
v-if=
"columns[6].visible"
:show-overflow-tooltip=
"true"
></el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-col>
</el-row>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"confirmSelect"
>
确 定
</el-button>
<el-button
@
click=
"showFlag = false"
>
取 消
</el-button>
</div>
</el-dialog>
</template>
<
script
>
import
{
listTmToolRequestUse
}
from
"@/api/mes/tm/tmToolRequestUse"
;
export
default
{
name
:
"TmRequestSelectSingle"
,
components
:
{},
data
()
{
return
{
showFlag
:
false
,
// 选中数组
selectedBrandId
:
undefined
,
selectedRows
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
//申请表格数据
toolRequestList
:
[],
// // 品牌名称
// brandName: undefined,
defaultProps
:
{
children
:
"children"
,
label
:
"label"
,
},
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
brandCode
:
null
,
brandName
:
null
,
brandId
:
null
,
},
// 列信息
columns
:
[
{
key
:
0
,
label
:
`申请单编码`
,
visible
:
true
},
{
key
:
1
,
label
:
`工序`
,
visible
:
true
},
{
key
:
2
,
label
:
`作业单元`
,
visible
:
true
},
{
key
:
3
,
label
:
`申请时间`
,
visible
:
true
},
{
key
:
4
,
label
:
`预计开始时间`
,
visible
:
true
},
{
key
:
5
,
label
:
`预计结束时间`
,
visible
:
true
},
{
key
:
6
,
label
:
`申请数量`
,
visible
:
true
},
],
};
},
// watch: {
// // 根据名称筛选分类树
// itemTypeName(val) {
// this.$refs.tree.filter(val);
// },
// },
created
()
{
console
.
log
(
"日志:已进入brandSingle页面的列表查询方法"
);
// 在created钩子函数中输出日志
this
.
getList
();
},
methods
:
{
// /** 查询物料编码列表 */
// getList() {
// this.loading = true;
// listMdItem(this.queryParams).then((response) => {
// this.itemList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
// },
/** 查询品牌列表 */
getList
()
{
this
.
loading
=
true
;
listTmToolRequestUse
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
toolRequestList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
handleCurrent
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
// 单选选中数据
handleRowChange
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
//双击选中
handleRowDbClick
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
this
.
$emit
(
"onSelected"
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
},
//确定选中
confirmSelect
()
{
if
(
this
.
selectedToolRequestId
==
null
||
this
.
selectedToolRequestId
==
0
)
{
this
.
$notify
({
title
:
"提示"
,
type
:
"warning"
,
message
:
"请至少选择一条数据!"
,
});
return
;
}
this
.
$emit
(
"onSelected"
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
},
},
};
</
script
>
src/views/mes/md/client/components/Account.vue
View file @
98cfaf11
...
...
@@ -133,7 +133,7 @@ export default {
name
:
'Account'
,
dicts
:
[
'sys_yes_no'
],
props
:
{
client
Id
:
{
type
:
Number
|
undefined
,
default
:
undefined
},
client
Code
:
{
type
:
String
|
undefined
,
default
:
undefined
},
},
data
()
{
return
{
...
...
@@ -159,7 +159,7 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
client
Id
:
this
.
clientId
,
bank
:
null
,
bankAccount
:
null
,
accountName
:
null
,
enableFlag
:
null
client
Code
:
this
.
clientCode
,
bank
:
null
,
bankAccount
:
null
,
accountName
:
null
,
enableFlag
:
null
},
// 表单参数
form
:
{},
...
...
@@ -172,7 +172,7 @@ export default {
getList
()
{
this
.
accountList
=
[]
this
.
total
=
0
if
(
!
this
.
queryParams
.
client
Id
)
return
if
(
!
this
.
queryParams
.
client
Code
)
return
this
.
loading
=
true
pageAccount
(
this
.
queryParams
).
then
(
response
=>
{
this
.
accountList
=
response
.
data
.
records
...
...
@@ -189,7 +189,7 @@ export default {
reset
()
{
this
.
form
=
{
id
:
null
,
client
Id
:
this
.
clientId
,
client
Code
:
this
.
clientCode
,
bank
:
null
,
bankAccount
:
null
,
accountName
:
null
,
...
...
@@ -235,7 +235,7 @@ export default {
},
/** 提交按钮 */
submitForm
()
{
if
(
!
this
.
form
.
client
Id
)
return
this
.
$message
.
error
(
"请先创建客户"
)
if
(
!
this
.
form
.
client
Code
)
return
this
.
$message
.
error
(
"请先创建客户"
)
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
...
...
@@ -246,7 +246,7 @@ export default {
})
}
else
{
addAccount
(
this
.
form
).
then
(
response
=>
{
this
.
form
.
client
Id
=
this
.
clientId
this
.
form
.
client
Code
=
this
.
clientCode
this
.
$modal
.
msgSuccess
(
'新增成功'
)
this
.
open
=
false
this
.
getList
()
...
...
@@ -273,8 +273,8 @@ export default {
},
`account_
${
new
Date
().
getTime
()}
.xlsx`
)
},
init
(
form
)
{
if
(
!
form
.
client
Id
)
return
this
.
queryParams
.
client
Id
=
form
.
clientId
if
(
!
form
.
client
Code
)
return
this
.
queryParams
.
client
Code
=
form
.
clientCode
this
.
getList
()
}
}
...
...
src/views/mes/md/client/components/ClientContact.vue
View file @
98cfaf11
...
...
@@ -137,7 +137,7 @@ import {listBrandByCondition} from '@/api/mes/md/brand'
export
default
{
props
:
{
client
Id
:
{
type
:
Number
|
undefined
,
default
:
undefined
},
client
Code
:
{
type
:
String
|
undefined
,
default
:
undefined
},
},
data
()
{
return
{
...
...
@@ -174,7 +174,7 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
client
Id
:
null
,
client
Code
:
null
,
},
// 表单参数
form
:
{},
...
...
@@ -203,7 +203,7 @@ export default {
/** 查询客户联系人列表 */
getList
()
{
this
.
loading
=
true
this
.
queryParams
.
client
Id
=
this
.
clientId
this
.
queryParams
.
client
Code
=
this
.
clientCode
listContact
(
this
.
queryParams
).
then
(
response
=>
{
console
.
log
(
response
,
111
)
this
.
contactList
=
response
.
rows
...
...
@@ -219,7 +219,7 @@ export default {
reset
()
{
this
.
form
=
{
id
:
null
,
client
Id
:
this
.
clientId
,
client
Code
:
this
.
clientCode
,
brandName
:
null
,
position
:
null
,
...
...
@@ -279,7 +279,7 @@ export default {
this
.
getList
()
})
}
else
{
this
.
form
.
client
Id
=
this
.
clientId
this
.
form
.
client
Code
=
this
.
clientCode
addContact
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'新增成功'
)
this
.
open
=
false
...
...
@@ -307,8 +307,8 @@ export default {
},
`contact_
${
new
Date
().
getTime
()}
.xlsx`
)
},
init
(
form
)
{
if
(
!
form
.
client
Id
)
return
this
.
queryParams
.
client
Id
=
form
.
clientId
if
(
!
form
.
client
Code
)
return
this
.
queryParams
.
client
Code
=
form
.
clientCode
this
.
getList
()
},
/** 远程搜索 */
...
...
src/views/mes/md/client/components/PaymentRelation.vue
View file @
98cfaf11
...
...
@@ -92,7 +92,7 @@ import { listClient } from '@/api/mes/md/client'
export
default
{
name
:
"Relation"
,
props
:
{
client
Id
:
{
type
:
Number
|
undefined
,
default
:
undefined
},
client
Code
:
{
type
:
String
|
undefined
,
default
:
undefined
},
},
data
()
{
return
{
...
...
@@ -118,8 +118,8 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
client
Id
:
null
,
relatedClient
Id
:
null
,
client
Code
:
null
,
relatedClient
Code
:
null
,
},
// 表单参数
form
:
{},
...
...
@@ -136,7 +136,7 @@ export default {
/** 查询客户付款信息关联列表 */
getList
()
{
this
.
loading
=
true
;
this
.
queryParams
.
client
Id
=
this
.
clientId
this
.
queryParams
.
client
Code
=
this
.
clientCode
listRelation
(
this
.
queryParams
).
then
(
response
=>
{
this
.
relationList
=
response
.
rows
;
this
.
total
=
response
.
total
;
...
...
@@ -152,8 +152,8 @@ export default {
reset
()
{
this
.
form
=
{
id
:
null
,
client
Id
:
this
.
clientId
,
relatedClient
Id
:
null
,
client
Code
:
this
.
clientCode
,
relatedClient
Code
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
...
...
@@ -204,7 +204,7 @@ export default {
this
.
getList
();
});
}
else
{
this
.
form
.
client
Id
=
this
.
clientId
this
.
form
.
client
Code
=
this
.
clientCode
addRelation
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
...
...
@@ -236,8 +236,8 @@ export default {
listClient
({
clientName
:
key
,
pageNum
:
1
,
pageSize
:
100
}).
then
(
res
=>
this
.
clientList
=
res
.
rows
)
},
init
(
form
)
{
if
(
!
form
.
client
Id
)
return
this
.
queryParams
.
client
Id
=
form
.
clientId
if
(
!
form
.
client
Code
)
return
this
.
queryParams
.
client
Code
=
form
.
clientCode
this
.
getList
()
}
}
...
...
src/views/mes/md/client/components/UrgeEmail.vue
View file @
98cfaf11
...
...
@@ -108,7 +108,7 @@ export default {
name
:
'Email'
,
dicts
:
[
'sys_yes_no'
],
props
:
{
client
Id
:
{
type
:
Number
|
undefined
,
default
:
undefined
},
client
Code
:
{
type
:
String
|
undefined
,
default
:
undefined
},
},
data
()
{
return
{
...
...
@@ -134,7 +134,7 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
client
Id
:
null
,
client
Code
:
null
,
email
:
null
,
contact
:
null
,
enableFlag
:
null
},
// 表单参数
...
...
@@ -157,7 +157,7 @@ export default {
/** 查询催货款通知邮箱列表 */
getList
()
{
this
.
loading
=
true
this
.
queryParams
.
client
Id
=
this
.
clientId
this
.
queryParams
.
client
Code
=
this
.
clientCode
listEmail
(
this
.
queryParams
).
then
(
response
=>
{
this
.
emailList
=
response
.
rows
this
.
total
=
response
.
total
...
...
@@ -173,7 +173,7 @@ export default {
reset
()
{
this
.
form
=
{
id
:
null
,
client
Id
:
this
.
clientId
,
client
Code
:
this
.
clientCode
,
email
:
null
,
contact
:
null
,
enableFlag
:
null
,
...
...
@@ -227,7 +227,7 @@ export default {
this
.
getList
()
})
}
else
{
this
.
form
.
client
Id
=
this
.
clientId
this
.
form
.
client
Code
=
this
.
clientCode
addEmail
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'新增成功'
)
this
.
open
=
false
...
...
@@ -255,8 +255,8 @@ export default {
},
`email_
${
new
Date
().
getTime
()}
.xlsx`
)
},
init
(
form
)
{
if
(
!
form
.
client
Id
)
return
this
.
queryParams
.
client
Id
=
form
.
clientId
if
(
!
form
.
client
Code
)
return
this
.
queryParams
.
client
Code
=
form
.
clientCode
this
.
getList
()
}
}
...
...
src/views/mes/md/client/index.vue
View file @
98cfaf11
...
...
@@ -35,7 +35,7 @@
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"客户英文名称"
prop=
"clientEn"
>
<el-form-item
label=
"客户英文名称"
prop=
"clientEn"
>
<el-input
v-model=
"queryParams.clientEn"
placeholder=
"请输入客户英文名称"
...
...
@@ -79,7 +79,8 @@
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['mes:md:client:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -90,7 +91,8 @@
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['mes:md:client:edit']"
>
修改
</el-button>
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -101,7 +103,8 @@
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['mes:md:client:remove']"
>
删除
</el-button>
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -111,33 +114,35 @@
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['mes:md:client:export']"
>
导出
</el-button>
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"clientList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"客户编码"
align=
"center"
prop=
"clientCode"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['mes:md:client:query']"
>
{{
scope
.
row
.
clientCode
}}
</el-button>
</
template
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"客户编码"
align=
"center"
prop=
"clientCode"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['mes:md:client:query']"
>
{{
scope
.
row
.
clientCode
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"客户名称"
width=
"150px"
align=
"center"
prop=
"clientName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"客户简称"
align=
"center"
prop=
"clientNick"
/>
<el-table-column
label=
"客户类型"
align=
"center"
prop=
"clientType"
>
<el-table-column
label=
"客户简称"
align=
"center"
prop=
"clientNick"
/>
<el-table-column
label=
"客户类型"
align=
"center"
prop=
"clientType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_client_type"
:value=
"scope.row.clientType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"客户电话"
align=
"center"
prop=
"tel"
/>
<el-table-column
label=
"联系人"
align=
"center"
prop=
"contact1"
/>
<el-table-column
label=
"联系人-电话"
align=
"center"
prop=
"contact1Tel"
/>
<el-table-column
label=
"是否启用"
align=
"center"
prop=
"enableFlag"
>
<el-table-column
label=
"客户电话"
align=
"center"
prop=
"tel"
/>
<el-table-column
label=
"联系人"
align=
"center"
prop=
"contact1"
/>
<el-table-column
label=
"联系人-电话"
align=
"center"
prop=
"contact1Tel"
/>
<el-table-column
label=
"是否启用"
align=
"center"
prop=
"enableFlag"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_yes_no"
:value=
"scope.row.enableFlag"
/>
</
template
>
...
...
@@ -150,14 +155,16 @@
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['mes:md:client:edit']"
>
详情
</el-button>
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['mes:md:client:remove']"
>
删除
</el-button>
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -171,36 +178,27 @@
/>
<!-- 添加或修改客户对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
950px
"
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
1200px"
:before-close=
"handleClose
"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
12
"
>
<el-form-item
label=
"客户编码"
prop=
"clientCode"
>
<el-input
v-model=
"form.clientCode"
placeholder=
"请输入客户编码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label-width=
"80"
>
<el-switch
v-model=
"autoGenFlag"
active-color=
"#13ce66"
active-text=
"自动生成"
@
change=
"handleAutoGenChange(autoGenFlag)"
v-if=
"optType != 'view'"
>
</el-switch>
<el-input
v-model=
"form.clientCode"
readonly=
"readonly"
maxlength=
"64"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户名称"
prop=
"clientName"
>
<el-input
v-model=
"form.clientName"
placeholder=
"请输入客户名称"
/>
<el-input
v-model=
"form.clientName"
placeholder=
"请输入客户名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户简称"
prop=
"clientNick"
>
<el-input
v-model=
"form.clientNick"
placeholder=
"请输入客户简称"
/>
<el-input
v-model=
"form.clientNick"
placeholder=
"请输入客户简称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户英文名称"
prop=
"clientEn"
>
<el-input
v-model=
"form.clientEn"
placeholder=
"请输入客户英文名称"
/>
<el-input
v-model=
"form.clientEn"
placeholder=
"请输入客户英文名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -210,21 +208,23 @@
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
>
{{ dict.label }}
</el-radio>
</el-radio-group>
<el-radio-group
v-model=
"form.enableFlag"
v-else
>
<el-radio
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
readonly
v-if=
"optType=='view'"
/>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
v-else
/>
<el-input
v-model=
"form.remark"
type=
"textarea"
readonly
v-if=
"optType=='view'"
/>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
v-else
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -233,29 +233,29 @@
<el-tab-pane
label=
"客户基本信息"
name=
"BaseInfo"
>
<BaseInfo
ref=
"BaseInfo"
:form=
"form"
/>
</el-tab-pane>
<!-- <el-tab-pane label="地址信息" name="AddrInfo">
<AddrInfo ref="AddrInfo" :form="form"/>
</el-tab-pane>
<el-tab-pane label="交货信息" name="DeliveryInfo">
<DeliveryInfo ref="DeliveryInfo" :form="form"/>
</el-tab-pane>
<el-tab-pane label="财务信息" name="FinanceInfo">
<FinanceInfo ref="FinanceInfo" :form="form"/>
</el-tab-pane>-->
<!-- <el-tab-pane label="地址信息" name="AddrInfo">
<AddrInfo ref="AddrInfo" :form="form"/>
</el-tab-pane>
<el-tab-pane label="交货信息" name="DeliveryInfo">
<DeliveryInfo ref="DeliveryInfo" :form="form"/>
</el-tab-pane>
<el-tab-pane label="财务信息" name="FinanceInfo">
<FinanceInfo ref="FinanceInfo" :form="form"/>
</el-tab-pane>-->
<el-tab-pane
label=
"客户联系人"
name=
"ClientContact"
>
<ClientContact
ref=
"ClientContact"
:client
Id=
"form.clientId
"
/>
<ClientContact
ref=
"ClientContact"
:client
Code=
"form.clientCode
"
/>
</el-tab-pane>
<el-tab-pane
label=
"银行账号"
name=
"Account"
>
<Account
ref=
"Account"
:client
Id=
"form.clientId
"
/>
<Account
ref=
"Account"
:client
Code=
"form.clientCode
"
/>
</el-tab-pane>
<el-tab-pane
label=
"产品对照"
name=
"ClientItem"
>
<ClientItem
ref=
"ClientItem"
/>
</el-tab-pane>
<el-tab-pane
label=
"催货款通知邮箱"
name=
"UrgeEmail"
>
<UrgeEmail
ref=
"UrgeEmail"
:client
Id=
"form.clientId
"
/>
<UrgeEmail
ref=
"UrgeEmail"
:client
Code=
"form.clientCode
"
/>
</el-tab-pane>
<el-tab-pane
label=
"客户关联关系"
name=
"PaymentRelation"
>
<PaymentRelation
ref=
"PaymentRelation"
:client
Id=
"form.clientId
"
/>
<PaymentRelation
ref=
"PaymentRelation"
:client
Code=
"form.clientCode
"
/>
</el-tab-pane>
<el-tab-pane
label=
"SAP特性"
name=
"SapProperty"
>
<SapPropertyData
ref=
"SapProperty"
/>
...
...
@@ -264,8 +264,8 @@
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"cancel"
v-if=
"optType =='view'"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
v-else
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"cancel"
v-if=
"optType =='view'"
>
返
回
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
v-else
>
保 存
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
...
...
@@ -273,7 +273,7 @@
</template>
<
script
>
import
{
listClient
,
getClient
,
delClient
,
addClient
,
updateClient
}
from
"@/api/mes/md/client"
;
import
{
listClient
,
getClient
,
delClient
,
addClient
,
updateClient
}
from
"@/api/mes/md/client"
;
import
BaseInfo
from
'@/views/mes/md/client/components/BaseInfo'
import
UrgeEmail
from
'@/views/mes/md/client/components/UrgeEmail'
import
AddrInfo
from
'@/views/mes/md/client/components/AddrInfo'
...
...
@@ -285,9 +285,10 @@ import FinanceInfo from '@/views/mes/md/client/components/FinanceInfo'
import
PaymentRelation
from
'@/views/mes/md/client/components/PaymentRelation'
import
{
genCode
}
from
"@/api/system/autocode/rule"
export
default
{
name
:
"Client"
,
dicts
:
[
'mes_client_type'
,
'sys_yes_no'
],
dicts
:
[
'mes_client_type'
,
'sys_yes_no'
],
components
:
{
AddrInfo
,
BaseInfo
,
DeliveryInfo
,
FinanceInfo
,
UrgeEmail
,
PaymentRelation
,
ClientContact
,
Account
,
ClientItem
},
...
...
@@ -295,7 +296,7 @@ export default {
return
{
//自动生成编码
activeName
:
'BaseInfo'
,
autoGenFlag
:
fals
e
,
autoGenFlag
:
tru
e
,
optType
:
undefined
,
// 遮罩层
loading
:
true
,
...
...
@@ -389,26 +390,26 @@ export default {
// 表单校验
rules
:
{
clientCode
:
[
{
required
:
true
,
message
:
"客户编码不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"客户编码不能为空"
,
trigger
:
"blur"
}
],
clientName
:
[
{
required
:
true
,
message
:
"客户名称不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"客户名称不能为空"
,
trigger
:
"blur"
}
],
email
:[
email
:
[
{
type
:
"email"
,
message
:
"请输入正确的邮箱地址"
,
trigger
:
[
"blur"
,
"change"
]
}
],
contact1Email
:[
contact1Email
:
[
{
type
:
"email"
,
message
:
"请输入正确的邮箱地址"
,
trigger
:
[
"blur"
,
"change"
]
}
],
contact2Email
:[
contact2Email
:
[
{
type
:
"email"
,
message
:
"请输入正确的邮箱地址"
,
...
...
@@ -416,7 +417,7 @@ export default {
}
],
enableFlag
:
[
{
required
:
true
,
message
:
"是否启用不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"是否启用不能为空"
,
trigger
:
"blur"
}
],
}
};
...
...
@@ -449,7 +450,7 @@ export default {
licenseNo
:
null
,
taxNo
:
null
,
};
this
.
autoGenFlag
=
fals
e
;
this
.
autoGenFlag
=
tru
e
;
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
...
...
@@ -465,19 +466,20 @@ export default {
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
clientId
)
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
handleAutoGenChange
(
true
);
this
.
open
=
true
;
this
.
activeName
=
'BaseInfo'
this
.
title
=
"添加客户"
;
this
.
optType
=
"add"
;
},
// 查询明细按钮操作
handleView
(
row
){
handleView
(
row
)
{
this
.
reset
();
const
clientId
=
row
.
clientId
||
this
.
ids
getClient
(
clientId
).
then
(
response
=>
{
...
...
@@ -522,12 +524,13 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
clientIds
=
row
.
clientId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除客户编号为"'
+
clientIds
+
'"的数据项?'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'是否确认删除客户编号为"'
+
clientIds
+
'"的数据项?'
).
then
(
function
()
{
return
delClient
(
clientIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
...
...
@@ -536,23 +539,30 @@ export default {
},
`client_
${
new
Date
().
getTime
()}
.xlsx`
)
},
//自动生成编码
handleAutoGenChange
(
autoGenFlag
){
if
(
autoGenFlag
)
{
genCode
(
'CLIENT_CODE'
).
then
(
response
=>
{
handleAutoGenChange
(
autoGenFlag
)
{
if
(
autoGenFlag
)
{
genCode
(
'CLIENT_CODE'
).
then
(
response
=>
{
this
.
form
.
clientCode
=
response
;
this
.
$forceUpdate
()
});
}
else
{
}
else
{
this
.
form
.
clientCode
=
null
;
}
},
onTabClick
()
{
if
(
this
.
activeName
===
'SapProperty'
)
{
this
.
$refs
.
SapProperty
.
init
(
1
,
null
,
this
.
form
.
clientId
,
this
.
form
)
}
else
{
}
else
{
this
.
$refs
[
this
.
activeName
].
init
&&
this
.
$refs
[
this
.
activeName
].
init
(
this
.
form
)
}
},
handleClose
(
done
)
{
this
.
$confirm
(
'客户信息如已修改还未保存,确认关闭?'
)
.
then
(
_
=>
{
done
();
})
.
catch
(
_
=>
{
});
}
}
};
...
...
src/views/mes/tm/toolrequest/index.vue
0 → 100644
View file @
98cfaf11
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<!--
<el-form-item
label=
"申请单编码"
prop=
"toolRequestCode"
>
<el-input
v-model=
"queryParams.toolRequestCode"
placeholder=
"请输入申请单编码"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"工序id"
prop=
"processId"
>
<el-input
v-model=
"queryParams.processId"
placeholder=
"请输入工序id"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"作业单元"
prop=
"workunitName"
>
<el-input
v-model=
"queryParams.workunitName"
placeholder=
"请输入作业单元名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"申请时间"
prop=
"requestDate"
>
<el-date-picker
clearable
v-model=
"queryParams.requestDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择申请时间"
>
</el-date-picker>
</el-form-item>
<!--
<el-form-item
label=
"预计开始时间"
prop=
"startTime"
>
<el-date-picker
clearable
v-model=
"queryParams.startTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择预计开始时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"预计结束时间"
prop=
"endTime"
>
<el-date-picker
clearable
v-model=
"queryParams.endTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择预计结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"申请数量"
prop=
"requestNum"
>
<el-input
v-model=
"queryParams.requestNum"
placeholder=
"请输入申请数量"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"编排单号"
prop=
"arrangeCode"
>
<el-input
v-model=
"queryParams.arrangeCode"
placeholder=
"请输入编排单号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
-->
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!--
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['tm:tmToolRequest:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['tm:tmToolRequest:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['tm:tmToolRequest:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['tm:tmToolRequest:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
-->
<el-table
v-loading=
"loading"
:data=
"tmToolRequestList"
row-key=
"productionMakeId"
default-expand-all
>
<!-- @selection-change="handleSelectionChange" 勾选框中的属性-->
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<!--
<el-table-column
label=
"主键id"
align=
"center"
prop=
"toolRequestId"
/>
-->
<el-table-column
label=
"申请单编码"
align=
"center"
prop=
"toolRequestCode"
/>
</el-table-column>
<el-table-column
label=
"工序"
align=
"center"
prop=
"processName"
/>
<el-table-column
label=
"作业单元"
align=
"center"
prop=
"workunitName"
/>
<el-table-column
label=
"申请时间"
align=
"center"
prop=
"requestDate"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
requestDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"预计开始时间"
align
=
"center"
prop
=
"startTime"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
startTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"预计结束时间"
align
=
"center"
prop
=
"endTime"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
endTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"申请数量"
align
=
"center"
prop
=
"requestNum"
/>
<!--
<
el
-
table
-
column
label
=
"编排单号"
align
=
"center"
prop
=
"arrangeCode"
/>
-->
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"handleView(scope.row)"
v
-
hasPermi
=
"['tm:tmToolRequest:query']"
>
查看
<
/el-button
>
<!--
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
size
=
"mini"
type
=
"text"
@
click
=
"handleView(scope.row)"
v
-
hasPermi
=
"['tm:tmToolRequest:query']"
>
{{
scope
.
row
.
toolRequestCode
}}
<
/el-butto
n
>
<
/template> --
>
<!--
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
v
-
hasPermi
=
"['tm:tmToolRequest:remove']"
>
删除
<
/el-button> --
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<!--
添加或修改刀模板申请单对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"960px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"100px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"申请单编码"
prop
=
"toolRequestCode"
>
<
el
-
input
v
-
model
=
"form.toolRequestCode"
placeholder
=
"请输入申请单编码"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"作业单元"
prop
=
"workunitName"
>
<
el
-
input
v
-
model
=
"form.workunitName"
placeholder
=
"请输入作业单元"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"申请时间"
prop
=
"requestDate"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.requestDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择申请时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"预计开始时间"
prop
=
"startTime"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.startTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择预计开始时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"预计结束时间"
prop
=
"endTime"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.endTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择预计结束时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"申请数量"
prop
=
"requestNum"
>
<
el
-
input
v
-
model
=
"form.requestNum"
placeholder
=
"请输入申请数量"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<!--
<
el
-
form
-
item
label
=
"编排单号"
prop
=
"arrangeCode"
>
<
el
-
input
v
-
model
=
"form.arrangeCode"
placeholder
=
"请输入编排单号"
/>
<
/el-form-item> --
>
<
/el-form
>
<
el
-
divider
v
-
if
=
"form.toolRequestId !=null"
content
-
position
=
"center"
>
刀模板申请详细
<
/el-divider>
<
el
-
card
shadow
=
"always"
v
-
if
=
"form.toolRequestId !=null"
class
=
"box-card"
>
<
itemline
ref
=
"line"
:
toolRequestId
=
"form.toolRequestId"
:
optType
=
"optType"
><
/itemline>
<
/el-card
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<!--
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button> --
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
listTmToolRequest
,
getTmToolRequest
,
delTmToolRequest
,
addTmToolRequest
,
updateTmToolRequest
}
from
"@/api/mes/tm/tmToolRequest"
;
import
itemline
from
"./itemIndex.vue"
;
export
default
{
name
:
"TmToolRequest"
,
components
:
{
itemline
}
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 刀模板申请单表格数据
tmToolRequestList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
toolRequestId
:
null
,
toolRequestCode
:
null
,
processId
:
null
,
workunitId
:
null
,
requestDate
:
null
,
startTime
:
null
,
endTime
:
null
,
requestNum
:
null
,
arrangeCode
:
null
,
workunitName
:
null
,
}
,
// 表单参数
form
:
{
// toolRequestId: null,
// toolRequestCode: null,
// processId: null,
// workunitId: null,
// requestDate: null,
// startTime: null,
// endTime: null,
// requestNum: null,
// arrangeCode: null,
// workunitName: null,
}
,
// 表单校验
rules
:
{
}
}
;
}
,
created
()
{
this
.
getList
();
}
,
methods
:
{
/** 查询刀模板申请单列表 */
getList
()
{
this
.
loading
=
true
;
listTmToolRequest
(
this
.
queryParams
).
then
(
response
=>
{
this
.
tmToolRequestList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 查询明细按钮操作
// handleView(row)
{
// this.reset();
// const toolRequestId = row.toolRequestId || this.ids;
// this.$router.push(
// "/mes/tm/toolrequest/info?toolRequestId=" +
// toolRequestId
// );
//
}
,
handleView
(
row
){
this
.
reset
();
const
toolRequestIds
=
row
.
toolRequestId
getTmToolRequest
(
toolRequestIds
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"查看申请单详细信息"
;
this
.
optType
=
"view"
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
toolRequestId
:
null
,
toolRequestCode
:
null
,
processId
:
null
,
workunitId
:
null
,
requestDate
:
null
,
startTime
:
null
,
endTime
:
null
,
requestNum
:
null
,
arrangeCode
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
}
;
this
.
resetForm
(
"form"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
}
,
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
toolRequestId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加刀模板申请单"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
toolRequestId
=
row
.
toolRequestId
||
this
.
ids
getTmToolRequest
(
toolRequestId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改刀模板申请单"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
toolRequestId
!=
null
)
{
updateTmToolRequest
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
addTmToolRequest
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
toolRequestIds
=
row
.
toolRequestId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除刀模板申请单编号为"'
+
toolRequestIds
+
'"的数据项?'
).
then
(
function
()
{
return
delTmToolRequest
(
toolRequestIds
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'tm/tmToolRequest/export'
,
{
...
this
.
queryParams
}
,
`tmToolRequest_${new Date().getTime()
}
.xlsx`
)
}
}
}
;
<
/script
>
src/views/mes/tm/toolrequest/itemIndex.vue
0 → 100644
View file @
98cfaf11
<
template
>
<div
class=
"app-container"
>
<el-table
v-loading=
"loading"
:data=
"tmToolRequestItemList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<!--
<el-table-column
label=
"主键id"
align=
"center"
prop=
"toolRequestItemId"
/>
<el-table-column
label=
"刀模板申请单id"
align=
"center"
prop=
"toolRequestId"
/>
-->
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"itemName"
/>
<el-table-column
label=
"总数量"
align=
"center"
prop=
"allQuantity"
/>
<el-table-column
label=
"预计使用寿命"
align=
"center"
prop=
"nextMaintenPeriod"
/>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改刀模板物料申请单对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"刀模板申请单id"
prop=
"toolRequestId"
>
<el-input
v-model=
"form.toolRequestId"
placeholder=
"请输入刀模板申请单id"
/>
</el-form-item>
<el-form-item
label=
"物料id"
prop=
"itemId"
>
<el-input
v-model=
"form.itemId"
placeholder=
"请输入物料id"
/>
</el-form-item>
<el-form-item
label=
"总数量"
prop=
"allQuantity"
>
<el-input
v-model=
"form.allQuantity"
placeholder=
"请输入总数量"
/>
</el-form-item>
<el-form-item
label=
"预计使用寿命"
prop=
"nextMaintenPeriod"
>
<el-input
v-model=
"form.nextMaintenPeriod"
placeholder=
"请输入预计使用寿命"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
listTmToolRequestItem
,
getTmToolRequestItem
,
delTmToolRequestItem
,
addTmToolRequestItem
,
updateTmToolRequestItem
}
from
"@/api/mes/tm/tmToolRequestItem"
;
export
default
{
name
:
"TmToolRequestItem"
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 刀模板物料申请单表格数据
tmToolRequestItemList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
toolRequestId
:
null
,
itemId
:
null
,
allQuantity
:
null
,
nextMaintenPeriod
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询刀模板物料申请单列表 */
getList
()
{
this
.
loading
=
true
;
listTmToolRequestItem
(
this
.
queryParams
).
then
(
response
=>
{
this
.
tmToolRequestItemList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
toolRequestItemId
:
null
,
toolRequestId
:
null
,
itemId
:
null
,
allQuantity
:
null
,
nextMaintenPeriod
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
toolRequestItemId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加刀模板物料申请单"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
toolRequestItemId
=
row
.
toolRequestItemId
||
this
.
ids
getTmToolRequestItem
(
toolRequestItemId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改刀模板物料申请单"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
toolRequestItemId
!=
null
)
{
updateTmToolRequestItem
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addTmToolRequestItem
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
toolRequestItemIds
=
row
.
toolRequestItemId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除刀模板物料申请单编号为"'
+
toolRequestItemIds
+
'"的数据项?'
).
then
(
function
()
{
return
delTmToolRequestItem
(
toolRequestItemIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'tm/tmToolRequestItem/export'
,
{
...
this
.
queryParams
},
`tmToolRequestItem_
${
new
Date
().
getTime
()}
.xlsx`
)
}
}
};
</
script
>
src/views/mes/tm/toolrequestuse/index.vue
0 → 100644
View file @
98cfaf11
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<!--
<el-form-item
label=
"领用单编码"
prop=
"toolRequestUseCode"
>
<el-input
v-model=
"queryParams.toolRequestUseCode"
placeholder=
"请输入领用单编码"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"申请单id"
prop=
"toolRequestId"
>
<el-input
v-model=
"queryParams.toolRequestId"
placeholder=
"请输入申请单id"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"工序id"
prop=
"processId"
>
<el-input
v-model=
"queryParams.processId"
placeholder=
"请输入工序id"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"作业单元"
prop=
"workunitName"
>
<el-input
v-model=
"queryParams.workunitName"
placeholder=
"请输入作业单元"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"申请时间"
prop=
"requestDate"
>
<el-date-picker
clearable
v-model=
"queryParams.requestDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择申请时间"
>
</el-date-picker>
</el-form-item>
<!--
<el-form-item
label=
"预计开始时间"
prop=
"startTime"
>
<el-date-picker
clearable
v-model=
"queryParams.startTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择预计开始时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"预计结束时间"
prop=
"endTime"
>
<el-date-picker
clearable
v-model=
"queryParams.endTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择预计结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"申请数量"
prop=
"requestNum"
>
<el-input
v-model=
"queryParams.requestNum"
placeholder=
"请输入申请数量"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"物品存放位置"
prop=
"location"
>
<el-input
v-model=
"queryParams.location"
placeholder=
"请输入物品存放位置"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"编排单号"
prop=
"arrangeCode"
>
<el-input
v-model=
"queryParams.arrangeCode"
placeholder=
"请输入编排单号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
-->
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['tm:tmToolRequestUse:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['tm:tmToolRequestUse:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['tm:tmToolRequestUse:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['tm:tmToolRequestUse:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"tmToolRequestUseList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"领用单编码"
align=
"center"
prop=
"toolRequestUseCode"
/>
<el-table-column
label=
"申请单编码"
align=
"center"
prop=
"toolRequestCode"
/>
<el-table-column
label=
"工序"
align=
"center"
prop=
"processName"
/>
<el-table-column
label=
"作业单元"
align=
"center"
prop=
"workunitName"
/>
<el-table-column
label=
"申请时间"
align=
"center"
prop=
"requestDate"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
requestDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"预计开始时间"
align
=
"center"
prop
=
"startTime"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
startTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"预计结束时间"
align
=
"center"
prop
=
"endTime"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
endTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"申请数量"
align
=
"center"
prop
=
"requestNum"
/>
<!--
<
el
-
table
-
column
label
=
"编排单号"
align
=
"center"
prop
=
"arrangeCode"
/>
-->
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['tm:tmToolRequestUse:edit']"
>
修改
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
v
-
hasPermi
=
"['tm:tmToolRequestUse:remove']"
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<!--
添加或修改刀模板领用单对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"1080px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"100px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"领用单编码"
prop
=
"toolRequestUseCode"
>
<
el
-
input
v
-
model
=
"form.toolRequestUseCode"
placeholder
=
"请输入领用单编码"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"4"
>
<
el
-
form
-
item
label
-
width
=
"80"
>
<
el
-
switch
v
-
model
=
"autoGenFlag"
active
-
color
=
"#13ce66"
active
-
text
=
"自动生成"
@
change
=
"handleAutoGenChange(autoGenFlag)"
>
<
/el-switch
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"申请单"
prop
=
"toolRequestId"
>
<
el
-
input
v
-
model
=
"form.toolRequestCode"
readonly
=
"readonly"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
@
click
=
"handleToolRequestSelect"
><
/el-button
>
<
/el-input
>
<
/el-form-item
>
<
ToolRequestSelect
ref
=
"trSelect"
@
onSelected
=
"onToolRequestSelected"
><
/ToolRequestSelect
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"工序"
prop
=
"processId"
>
<
el
-
input
v
-
model
=
"form.processId"
placeholder
=
"请输入工序"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"作业单元"
prop
=
"workunitId"
>
<
el
-
input
v
-
model
=
"form.workunitId"
placeholder
=
"作业单元"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"申请时间"
prop
=
"requestDate"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.requestDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择申请时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"预计开始时间"
prop
=
"startTime"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.startTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择预计开始时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"预计结束时间"
prop
=
"endTime"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.endTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择预计结束时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"申请数量"
prop
=
"requestNum"
>
<
el
-
input
v
-
model
=
"form.requestNum"
placeholder
=
"请输入申请数量"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"编排单号"
prop
=
"arrangeCode"
>
<
el
-
input
v
-
model
=
"form.arrangeCode"
placeholder
=
"请输入编排单号"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
listTmToolRequestUse
,
getTmToolRequestUse
,
delTmToolRequestUse
,
addTmToolRequestUse
,
updateTmToolRequestUse
}
from
"@/api/mes/tm/tmToolRequestUse"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
ToolRequestSelect
from
"@/components/toolRequest/single.vue"
;
export
default
{
name
:
"TmToolRequestUse"
,
data
()
{
return
{
autoGenFlag
:
false
,
components
:
{
ToolRequestSelect
}
,
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 刀模板领用单表格数据
tmToolRequestUseList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
toolRequestUseCode
:
null
,
toolRequestId
:
null
,
processId
:
null
,
workunitId
:
null
,
requestDate
:
null
,
startTime
:
null
,
endTime
:
null
,
requestNum
:
null
,
location
:
null
,
arrangeCode
:
null
,
toolRequestCode
:
null
,
processName
:
null
,
workunitName
:
null
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
}
}
;
}
,
created
()
{
this
.
getList
();
}
,
methods
:
{
/** 查询刀模板领用单列表 */
getList
()
{
this
.
loading
=
true
;
listTmToolRequestUse
(
this
.
queryParams
).
then
(
response
=>
{
this
.
tmToolRequestUseList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
toolRequestUseId
:
null
,
toolRequestUseCode
:
null
,
toolRequestId
:
null
,
processId
:
null
,
workunitId
:
null
,
requestDate
:
null
,
startTime
:
null
,
endTime
:
null
,
requestNum
:
null
,
location
:
null
,
arrangeCode
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
toolRequestCode
:
null
,
processName
:
null
,
workunitName
:
null
}
;
this
.
resetForm
(
"form"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
}
,
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
toolRequestUseId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加刀模板领用单"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
toolRequestUseId
=
row
.
toolRequestUseId
||
this
.
ids
getTmToolRequestUse
(
toolRequestUseId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改刀模板领用单"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
toolRequestUseId
!=
null
)
{
updateTmToolRequestUse
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
addTmToolRequestUse
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
toolRequestUseIds
=
row
.
toolRequestUseId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除刀模板领用单编号为"'
+
toolRequestUseIds
+
'"的数据项?'
).
then
(
function
()
{
return
delTmToolRequestUse
(
toolRequestUseIds
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'tm/tmToolRequestUse/export'
,
{
...
this
.
queryParams
}
,
`tmToolRequestUse_${new Date().getTime()
}
.xlsx`
)
}
,
//自动生成编码
handleAutoGenChange
(
autoGenFlag
){
if
(
autoGenFlag
){
genCode
(
'TOOL_REQUEST_USE_CODE'
).
then
(
response
=>
{
this
.
form
.
toolRequestUseCode
=
response
;
}
);
}
else
{
this
.
form
.
toolRequestUseCode
=
null
;
}
}
,
//选择申请单
handleToolRequestSelect
()
{
this
.
$refs
.
trSelect
.
showFlag
=
true
;
}
,
onToolRequestSelected
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
toolRequestId
=
row
.
toolRequestId
;
this
.
form
.
toolRequestCode
=
row
.
toolRequestCode
;
this
.
form
.
processName
=
row
.
processName
;
this
.
form
.
workunitName
=
row
.
workunitName
;
this
.
form
.
requestDate
=
row
.
requestDate
;
this
.
form
.
startTime
=
row
.
startTime
;
this
.
form
.
endTime
=
row
.
endTime
;
this
.
form
.
requestNum
=
row
.
requestNum
;
this
.
form
.
scope
=
row
.
scope
;
}
}
,
}
}
;
<
/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