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
mes
mes-ui
Commits
a3494bfd
Commit
a3494bfd
authored
Mar 04, 2024
by
528360026@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加编排单
parent
e4199cbd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1472 additions
and
22 deletions
+1472
-22
arrange.js
src/api/mes/pro/arrange.js
+61
-0
chooseWorkorderForArrange.vue
src/views/mes/pro/arrange/chooseWorkorderForArrange.vue
+686
-0
index.vue
src/views/mes/pro/arrange/index.vue
+319
-0
info.vue
src/views/mes/pro/arrange/info.vue
+343
-0
chooseWorkorderForComb.vue
src/views/mes/pro/combination/chooseWorkorderForComb.vue
+10
-17
index.vue
src/views/mes/pro/combination/index.vue
+4
-3
info.vue
src/views/mes/pro/combination/info.vue
+10
-1
indexApply.vue
src/views/mes/pro/workorder/indexApply.vue
+39
-1
No files found.
src/api/mes/pro/arrange.js
0 → 100644
View file @
a3494bfd
import
request
from
'@/utils/request'
// 查询生产编排单列表
export
function
listArrange
(
query
)
{
return
request
({
url
:
'/pro/arrange/list'
,
method
:
'get'
,
params
:
query
})
}
export
function
listGroupArrange
(
query
)
{
return
request
({
url
:
'/pro/arrange/groupList'
,
method
:
'get'
,
params
:
query
})
}
// 查询生产编排单详细
export
function
getArrange
(
arrangeId
)
{
return
request
({
url
:
'/pro/arrange/'
+
arrangeId
,
method
:
'get'
})
}
// 新增生产编排单
export
function
batchAddArrange
(
data
)
{
return
request
({
url
:
'/pro/arrange/batchAdd'
,
method
:
'post'
,
data
:
data
})
}
// 新增生产编排单
export
function
addArrange
(
data
)
{
return
request
({
url
:
'/pro/arrange'
,
method
:
'post'
,
data
:
data
})
}
// 修改生产编排单
export
function
updateArrange
(
data
)
{
return
request
({
url
:
'/pro/arrange'
,
method
:
'put'
,
data
:
data
})
}
// 删除生产编排单
export
function
delArrange
(
arrangeId
)
{
return
request
({
url
:
'/pro/arrange/'
+
arrangeId
,
method
:
'delete'
})
}
src/views/mes/pro/arrange/chooseWorkorderForArrange.vue
0 → 100644
View file @
a3494bfd
<
template
>
<div
class=
"app-container"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-plus"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleCombination"
v-hasPermi=
"['pro:combination:add']"
>
追加到编排单
</el-button>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
:data=
"workorderList"
row-key=
"workorderId"
default-expand-all
@
selection-change=
"handleSelectionChange"
:tree-props=
"
{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"工单编码"
width=
"180"
prop=
"workorderCode"
/>
<el-table-column
label=
"编排单号"
width=
"180"
align=
"center"
prop=
"arrangeCode"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"工单名称"
width=
"200"
align=
"center"
prop=
"workorderName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"工单来源"
align=
"center"
prop=
"orderSource"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_workorder_sourcetype"
:value=
"scope.row.orderSource"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"工艺名称"
width=
"160"
align=
"center"
prop=
"routeName"
show-overflow-tooltip
/>
<el-table-column
label=
"订单编号"
width=
"140"
align=
"center"
prop=
"sourceCode"
/>
<el-table-column
label=
"产品编号"
width=
"120"
align=
"center"
prop=
"productCode"
/>
<el-table-column
label=
"产品名称"
width=
"200"
align=
"center"
prop=
"productName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"规格型号"
align=
"center"
prop=
"productSpc"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"单位"
align=
"center"
prop=
"unitOfMeasure"
/>
<el-table-column
label=
"工单数量"
align=
"center"
prop=
"quantity"
/>
<el-table-column
label=
"调整数量"
align=
"center"
prop=
"quantityChanged"
/>
<el-table-column
label=
"已生产数量"
align=
"center"
width=
"100px"
prop=
"quantityProduced"
/>
<el-table-column
label=
"批次号"
align=
"center"
width=
"100px"
prop=
"batchCode"
/>
<el-table-column
label=
"编排单号"
align=
"center"
width=
"100px"
prop=
"arrangeCode"
/>
<el-table-column
label=
"客户编码"
align=
"center"
prop=
"clientCode"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"clientName"
:show-overflow-tooltip=
"true"
/>
<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
=
"status"
>
<
template
slot
-
scope
=
"scope"
>
<
dict
-
tag
:
options
=
"dict.type.mes_workorder_status"
:
value
=
"scope.row.status"
/>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total > 0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<
/div
>
<
/template
>
<
script
>
import
{
listWorkorder
,
getWorkorder
,
delWorkorder
,
addWorkorder
,
updateWorkorder
,
dofinish
,
doCheckToolNum
}
from
"@/api/mes/pro/workorder"
;
import
{
addProtaskList
}
from
"@/api/mes/pro/protask"
;
import
ItemSelect
from
"@/components/itemSelect/single.vue"
;
import
ClientSelect
from
"@/components/clientSelect/single.vue"
;
import
VendorSelect
from
"@/components/vendorSelect/single.vue"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
batchAddCombination
}
from
"@/api/mes/pro/combination"
;
import
{
batchAddArrange
}
from
"@/api/mes/pro/arrange"
;
export
default
{
name
:
"chooseWorkorderForArrange"
,
dicts
:
[
"mes_workorder_status"
,
"mes_workorder_sourcetype"
,
"mes_workorder_type"
,
],
props
:
{
arrangeCode
:
{
type
:
String
,
default
:
null
}
}
,
components
:
{
ItemSelect
,
ClientSelect
,
VendorSelect
,
}
,
data
()
{
return
{
//自动生成编码
autoGenFlag
:
false
,
optType
:
undefined
,
// 遮罩层
loading
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 非单个禁用
single
:
true
,
// 总条数
total
:
0
,
// 非多个禁用
multiple
:
true
,
// 生产工单表格数据
workorderList
:
[],
// 生产工单树选项
workorderOptions
:
[],
selectedRows
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
upload
:
{
// 是否显示弹出层(用户导入)
open
:
false
,
// 弹出层标题(用户导入)
title
:
""
,
// 是否禁用上传
isUploading
:
false
,
// 是否更新已经存在的用户数据
updateSupport
:
0
,
// 设置上传的请求头部
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
}
,
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/mes/pro/workorder/importData"
,
}
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
workorderCode
:
null
,
workorderName
:
null
,
orderSource
:
null
,
sourceCode
:
null
,
productId
:
null
,
productCode
:
null
,
productName
:
null
,
productSpc
:
null
,
routeName
:
null
,
unitOfMeasure
:
null
,
quantity
:
null
,
quantityProduced
:
null
,
quantityChanged
:
null
,
quantityScheduled
:
null
,
clientId
:
null
,
clientCode
:
null
,
clientName
:
null
,
requestDate
:
null
,
parentId
:
null
,
ancestors
:
null
,
statusArr
:
[
"PREPARE"
,
"PUBLISHED"
],
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
workorderCode
:
[
{
required
:
true
,
message
:
"工单编码不能为空"
,
trigger
:
"blur"
}
,
],
workorderName
:
[
{
required
:
true
,
message
:
"工单名称不能为空"
,
trigger
:
"blur"
}
,
],
workorderType
:
[
{
required
:
true
,
message
:
"请选择生产工单类型"
,
trigger
:
"blur"
}
,
],
orderSource
:
[
{
required
:
true
,
message
:
"来源类型不能为空"
,
trigger
:
"blur"
}
,
],
productId
:
[
{
required
:
true
,
message
:
"产品不能为空"
,
trigger
:
"blur"
}
,
],
productCode
:
[
{
required
:
true
,
message
:
"产品编号不能为空"
,
trigger
:
"blur"
}
,
],
productName
:
[
{
required
:
true
,
message
:
"产品名称不能为空"
,
trigger
:
"blur"
}
,
],
quantity
:
[
{
required
:
true
,
message
:
"生产数量不能为空"
,
trigger
:
"blur"
}
,
],
requestDate
:
[
{
required
:
true
,
message
:
"需求日期不能为空"
,
trigger
:
"blur"
}
,
],
}
,
}
;
}
,
created
()
{
this
.
getList
();
}
,
methods
:
{
async
handleCombination
()
{
let
params
=
[]
let
shouldExit
=
false
;
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
arrangeCode
!=
''
&&
item
.
arrangeCode
!=
null
)
{
this
.
$modal
.
msgWarning
(
`${item.workorderCode
}
生产单已绑定编排单,不能再绑定!`
);
shouldExit
=
true
;
}
params
.
push
({
arrangeSort
:
index
,
workorderId
:
item
.
workorderId
,
workorderCode
:
item
.
workorderCode
,
arrangeCode
:
this
.
arrangeCode
}
)
}
);
if
(
!
shouldExit
)
{
batchAddArrange
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"追加编排单成功"
);
this
.
getList
();
}
);
}
}
,
/** 查询生产工单列表 */
getList
()
{
this
.
loading
=
true
;
listWorkorder
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
workorderList
=
this
.
handleTree
(
response
.
rows
,
"workorderId"
,
"parentId"
);
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
importTemplate
()
{
this
.
download
(
"mes/pro/workorder/importTemplate"
,
{
}
,
`work_order_template_${new Date().getTime()
}
.xlsx`
);
}
,
/** 导入按钮操作 */
handleImport
()
{
this
.
upload
.
open
=
true
;
}
,
// 文件上传中处理
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
upload
.
isUploading
=
true
;
}
,
// 文件上传成功处理
handleFileSuccess
(
response
,
file
,
fileList
)
{
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
response
.
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
}
);
this
.
getList
();
}
,
// 提交上传文件
submitFileForm
()
{
this
.
$refs
.
upload
.
submit
();
}
,
/** 转换生产工单数据结构 */
normalizer
(
node
)
{
if
(
node
.
children
&&
!
node
.
children
.
length
)
{
delete
node
.
children
;
}
return
{
id
:
node
.
workorderId
,
label
:
node
.
workorderName
,
children
:
node
.
children
,
}
;
}
,
/** 查询生产工单下拉树结构 */
getTreeselect
()
{
listWorkorder
().
then
((
response
)
=>
{
this
.
workorderOptions
=
[];
const
data
=
{
workorderId
:
0
,
workorderName
:
"顶级节点"
,
children
:
[],
}
;
data
.
children
=
this
.
handleTree
(
response
.
data
,
"workorderId"
,
"parentId"
);
this
.
workorderOptions
.
push
(
data
);
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
workorderId
:
null
,
workorderCode
:
null
,
workorderName
:
null
,
workorderType
:
"SELF"
,
orderSource
:
null
,
sourceCode
:
null
,
productId
:
null
,
productCode
:
null
,
productName
:
null
,
productSpc
:
null
,
routeName
:
null
,
unitOfMeasure
:
null
,
quantity
:
null
,
quantityProduced
:
null
,
quantityChanged
:
null
,
quantityScheduled
:
null
,
clientId
:
null
,
clientCode
:
null
,
clientName
:
null
,
vendorId
:
null
,
vendorCode
:
null
,
vendorName
:
null
,
requestDate
:
null
,
parentId
:
null
,
status
:
"PREPARE"
,
remark
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
}
;
this
.
autoGenFlag
=
false
;
this
.
resetForm
(
"form"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
}
,
//从BOM行中直接新增
handleSubAdd
(
row
)
{
this
.
open
=
false
;
this
.
reset
();
this
.
getTreeselect
();
if
(
row
!=
null
&&
row
.
workorderId
)
{
this
.
form
=
row
;
this
.
form
.
parentId
=
row
.
workorderId
;
this
.
form
.
workorderId
=
null
;
this
.
form
.
workorderCode
=
null
;
}
else
{
this
.
form
.
parentId
=
0
;
}
this
.
open
=
true
;
this
.
title
=
"添加生产工单"
;
this
.
optType
=
"add"
;
}
,
/** 新增按钮操作 */
handleAdd
(
row
)
{
this
.
getTreeselect
();
// 跳转到申请单界
this
.
$router
.
push
(
"/mes/pro/workorder/apply"
);
return
;
// this.reset();
// this.getTreeselect();
// if (row != null && row.workorderId)
{
// this.form.parentId = row.workorderId;
// this.form.orderSource = row.orderSource;
// this.form.sourceCode = row.sourceCode;
// this.form.clientId = row.clientId;
// this.form.clientCode = row.clientCode;
// this.form.clientName = row.clientName;
//
}
else
{
// this.form.parentId = 0;
//
}
// this.open = true;
// this.title = "添加生产工单";
// this.optType="add";
}
,
// 查询明细按钮操作
handleView
(
row
)
{
handleView
this
.
reset
();
this
.
getTreeselect
();
const
workorderId
=
row
.
workorderId
||
this
.
ids
;
this
.
$router
.
push
(
"/mes/pro/workorder/info?workorderId="
+
workorderId
);
// this.reset();
// this.getTreeselect();
// const workorderId = row.workorderId || this.ids;
// getWorkorder(workorderId).then(response =>
{
// this.form = response.data;
// this.open = true;
// this.title = "查看工单信息";
// this.optType = "view";
//
}
);
}
,
handleSelectionChange
(
selection
)
{
// this.selectedRows = val;
this
.
selectedRows
=
selection
;
this
.
ids
=
selection
.
map
(
item
=>
item
.
toolId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
// // 多选框选中数据
// handleSelectionChange(selection)
{
// this.ids = selection.map(item => item.toolId)
// this.single = selection.length!==1
// this.multiple = !selection.length
//
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
workorderId
=
row
.
workorderId
||
this
.
ids
;
this
.
$router
.
push
(
"/mes/pro/workorder/edit?workorderId="
+
workorderId
);
// this.reset();
// this.getTreeselect();
// if (row != null)
{
// this.form.parentId = row.workorderId;
//
}
// getWorkorder(row.workorderId).then(response =>
{
// this.form = response.data;
// this.open = true;
// this.title = "修改生产工单";
// this.optType="edit";
//
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
workorderId
!=
null
)
{
updateWorkorder
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
//this.open = false;
this
.
$refs
[
"bomlist"
].
getList
();
this
.
getList
();
}
);
}
else
{
addWorkorder
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
//this.open = false;
this
.
form
.
workorderId
=
response
.
data
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
'是否确认删除生产工单编号为"'
+
row
.
workorderId
+
'"的数据项?'
)
.
then
(
function
()
{
return
delWorkorder
(
row
.
workorderId
);
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}
)
.
catch
(()
=>
{
}
);
}
,
/** 生产任务单操作 */
handleDofinish
()
{
this
.
$modal
.
confirm
(
"是否生成选中的任务单?"
)
.
then
(()
=>
{
const
ids
=
this
.
selectedRows
.
map
((
v
)
=>
v
.
workorderId
);
console
.
log
(
"00000"
,
ids
);
return
addProtaskList
(
ids
);
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"生成成功"
);
}
)
.
catch
(()
=>
{
}
);
}
,
handleToolNumCheck
()
{
this
.
$modal
.
confirm
(
"是否检查刀具模版齐套?"
)
.
then
(()
=>
{
const
ids
=
this
.
selectedRows
.
map
((
v
)
=>
v
.
workorderId
);
return
doCheckToolNum
(
ids
);
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"已齐套"
);
}
)
.
catch
(()
=>
{
}
);
}
,
handleSelectProduct
()
{
this
.
$refs
.
itemSelect
.
showFlag
=
true
;
}
,
handleSelectClient
()
{
this
.
$refs
.
clientSelect
.
showFlag
=
true
;
}
,
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
"mes/pro/workorder/export"
,
{
...
this
.
queryParams
,
}
,
`workorder_${new Date().getTime()
}
.xlsx`
);
}
,
handleConfirm
()
{
let
that
=
this
;
this
.
$modal
.
confirm
(
"是确认完成工单编制?【确认后将不能更改】"
)
.
then
(
function
()
{
that
.
form
.
status
=
"CONFIRMED"
;
that
.
submitForm
();
}
);
}
,
handleFinish
(
row
)
{
const
workorderIds
=
row
.
workorderId
||
this
.
ids
;
this
.
$modal
.
confirm
(
"确认完成工单?一旦完成,此工单将无法继续报工"
)
.
then
(
function
()
{
return
dofinish
(
workorderIds
);
//完成工单
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"更改成功"
);
}
)
.
catch
(()
=>
{
}
);
}
,
// //物料选择弹出框
// onItemSelected(obj)
{
// if(obj != undefined && obj != null)
{
// this.form.productId = obj.itemId;
// this.form.productCode = obj.itemCode;
// this.form.productName = obj.itemName;
// this.form.productSpc = obj.specification;
// this.form.unitOfMeasure = obj.unitOfMeasure;
//
}
//
}
,
//客户选择弹出框
onClientSelected
(
obj
)
{
if
(
obj
!=
undefined
&&
obj
!=
null
)
{
this
.
form
.
clientId
=
obj
.
clientId
;
this
.
form
.
clientCode
=
obj
.
clientCode
;
this
.
form
.
clientName
=
obj
.
clientName
;
}
}
,
//供应商选择
handleSelectVendor
()
{
this
.
$refs
.
vendorSelect
.
showFlag
=
true
;
}
,
//供应商选择弹出框
onVendorSelected
(
obj
)
{
debugger
;
if
(
obj
!=
undefined
&&
obj
!=
null
)
{
this
.
form
.
vendorId
=
obj
.
vendorId
;
this
.
form
.
vendorCode
=
obj
.
vendorCode
;
this
.
form
.
vendorName
=
obj
.
vendorName
;
}
}
,
/** 完成任务单操作 */
confirmWorkorder
(
row
)
{
this
.
$modal
.
confirm
(
'是否将工单编号"'
+
row
.
workorderCode
+
'"的草稿数据项改为已确认?'
)
.
then
(
function
()
{
return
confirmedWorkorder
(
row
.
workorderId
);
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"已确认成功"
);
}
)
.
catch
(()
=>
{
}
);
}
,
//自动生成编码
handleAutoGenChange
(
autoGenFlag
)
{
if
(
autoGenFlag
)
{
genCode
(
"WORKORDER_CODE"
).
then
((
response
)
=>
{
this
.
form
.
workorderCode
=
response
;
}
);
}
else
{
this
.
form
.
workorderCode
=
null
;
}
}
,
}
,
}
;
<
/script
>
src/views/mes/pro/arrange/index.vue
0 → 100644
View file @
a3494bfd
<
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=
"arrangeCode"
>
<el-input
v-model=
"queryParams.arrangeCode"
placeholder=
"请输入组合单号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"序号"
prop=
"arrangeSort"
>
<el-input
v-model=
"queryParams.arrangeSort"
placeholder=
"请输入序号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"生产工单号"
prop=
"workorderId"
>
<el-input
v-model=
"queryParams.workorderId"
placeholder=
"请输入生产工单号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"生产工单编号"
prop=
"workorderCode"
>
<el-input
v-model=
"queryParams.workorderCode"
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=
"['pro:arrange: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=
"['pro:arrange: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=
"['pro:arrange: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=
"['pro:arrange:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"arrangeList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"编号"
align=
"center"
prop=
"arrangeId"
/>
<el-table-column
label=
"编排单号"
align=
"center"
prop=
"arrangeCode"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleView(scope.row)"
>
{{
scope
.
row
.
arrangeCode
}}
</el-button
>
</
template
>
</el-table-column>
<!-- <el-table-column label="序号" align="center" prop="arrangeSort"/>-->
<!-- <el-table-column label="生产工单号" align="center" prop="workorderId"/>-->
<!-- <el-table-column label="生产工单编号" align="center" prop="workorderCode"/>-->
<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=
"['pro:arrange:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['pro:arrange: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=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"组合单号"
prop=
"arrangeCode"
>
<el-input
v-model=
"form.arrangeCode"
placeholder=
"请输入组合单号"
/>
</el-form-item>
<el-form-item
label=
"序号"
prop=
"arrangeSort"
>
<el-input
v-model=
"form.arrangeSort"
placeholder=
"请输入序号"
/>
</el-form-item>
<el-form-item
label=
"生产工单号"
prop=
"workorderId"
>
<el-input
v-model=
"form.workorderId"
placeholder=
"请输入生产工单号"
/>
</el-form-item>
<el-form-item
label=
"生产工单编号"
prop=
"workorderCode"
>
<el-input
v-model=
"form.workorderCode"
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>
<el-dialog
title=
"组合单明细"
:visible
.
sync=
"arrangeOpen"
width=
"800px"
append-to-body
@
close=
"getList"
>
<ArrangeInfo
:arrangeCode=
"arrangeCode"
></ArrangeInfo>
</el-dialog>
</div>
</template>
<
script
>
import
{
listArrange
,
getArrange
,
delArrange
,
addArrange
,
updateArrange
,
listGroupArrange
}
from
"@/api/mes/pro/arrange"
;
import
ArrangeInfo
from
"@/views/mes/pro/arrange/info.vue"
;
export
default
{
name
:
"Arrange"
,
components
:
{
ArrangeInfo
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
arrangeOpen
:
false
,
arrangeCode
:
''
,
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 生产编排单表格数据
arrangeList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
arrangeCode
:
null
,
arrangeSort
:
null
,
workorderId
:
null
,
workorderCode
:
null
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
arrangeCode
:
[
{
required
:
true
,
message
:
"组合单号不能为空"
,
trigger
:
"blur"
}
],
arrangeSort
:
[
{
required
:
true
,
message
:
"序号不能为空"
,
trigger
:
"blur"
}
],
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
handleView
(
row
)
{
this
.
arrangeOpen
=
true
;
this
.
arrangeCode
=
row
.
arrangeCode
;
},
/** 查询生产编排单列表 */
getList
()
{
this
.
loading
=
true
;
listGroupArrange
(
this
.
queryParams
).
then
(
response
=>
{
this
.
arrangeList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
arrangeId
:
null
,
arrangeCode
:
null
,
arrangeSort
:
null
,
workorderId
:
null
,
workorderCode
:
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
.
arrangeId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加生产编排单"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
arrangeId
=
row
.
arrangeId
||
this
.
ids
getArrange
(
arrangeId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改生产编排单"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
arrangeId
!=
null
)
{
updateArrange
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addArrange
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
arrangeIds
=
row
.
arrangeId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除生产编排单编号为"'
+
arrangeIds
+
'"的数据项?'
).
then
(
function
()
{
return
delArrange
(
arrangeIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'pro/arrange/export'
,
{
...
this
.
queryParams
},
`arrange_
${
new
Date
().
getTime
()}
.xlsx`
)
}
}
};
</
script
>
src/views/mes/pro/arrange/info.vue
0 → 100644
View file @
a3494bfd
<
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=
"arrangeCode"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.arrangeCode"-->
<!-- placeholder="请输入组合单号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"序号"
prop=
"arrangeSort"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.arrangeSort"-->
<!-- placeholder="请输入序号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"生产工单号"
prop=
"workorderId"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.workorderId"-->
<!-- placeholder="请输入生产工单号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"生产工单编号"
prop=
"workorderCode"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.workorderCode"-->
<!-- 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=
"warning"
plain
icon=
"el-icon-plus"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleCombination"
v-hasPermi=
"['pro:combination:add']"
>
拆分为新编排单
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['pro:arrange: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=
"['pro:arrange: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=
"['pro:arrange: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=
"['pro:arrange:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"arrangeList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"生产工单编号"
align=
"center"
prop=
"arrangeId"
/>
<el-table-column
label=
"组合单号"
align=
"center"
prop=
"arrangeCode"
/>
<el-table-column
label=
"序号"
align=
"center"
prop=
"arrangeSort"
>
<template
slot-scope=
"scope"
>
<el-input-number
v-model=
"scope.row.arrangeSort"
@
change=
"handleChangeSort(scope.row)"
:min=
"0"
style=
"width: 140px"
label=
"序号"
></el-input-number>
</
template
>
</el-table-column>
<el-table-column
label=
"生产工单号"
align=
"center"
prop=
"workorderId"
/>
<el-table-column
label=
"生产工单编号"
align=
"center"
prop=
"workorderCode"
/>
<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=
"['pro:arrange:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['pro:arrange: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=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"组合单号"
prop=
"arrangeCode"
>
<el-input
v-model=
"form.arrangeCode"
placeholder=
"请输入组合单号"
/>
</el-form-item>
<el-form-item
label=
"序号"
prop=
"arrangeSort"
>
<el-input
v-model=
"form.arrangeSort"
placeholder=
"请输入序号"
/>
</el-form-item>
<el-form-item
label=
"生产工单号"
prop=
"workorderId"
>
<el-input
v-model=
"form.workorderId"
placeholder=
"请输入生产工单号"
/>
</el-form-item>
<el-form-item
label=
"生产工单编号"
prop=
"workorderCode"
>
<el-input
v-model=
"form.workorderCode"
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>
<el-dialog
title=
"追加编排单"
:visible
.
sync=
"arrangeOpen"
width=
"800px"
append-to-body
@
close=
"getList"
>
<choose-workorder-for-arrange
:arrangeCode=
"arrangeCode"
></choose-workorder-for-arrange>
</el-dialog>
</div>
</template>
<
script
>
import
{
listArrange
,
getArrange
,
delArrange
,
addArrange
,
updateArrange
}
from
"@/api/mes/pro/arrange"
;
import
{
updateCombination
}
from
"@/api/mes/pro/combination"
;
import
ChooseWorkorderForArrange
from
"@/views/mes/pro/arrange/chooseWorkorderForArrange.vue"
;
export
default
{
name
:
"ArrangeInfo"
,
components
:
{
ChooseWorkorderForArrange
},
props
:
{
arrangeCode
:
{
type
:
String
,
default
:
null
}
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
arrangeOpen
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 生产编排单表格数据
arrangeList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
arrangeCode
:
null
,
arrangeSort
:
null
,
workorderId
:
null
,
workorderCode
:
null
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
arrangeCode
:
[
{
required
:
true
,
message
:
"组合单号不能为空"
,
trigger
:
"blur"
}
],
arrangeSort
:
[
{
required
:
true
,
message
:
"序号不能为空"
,
trigger
:
"blur"
}
],
}
};
},
created
()
{
// this.getList();
},
watch
:
{
arrangeCode
:
{
handler
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
this
.
queryParams
.
arrangeCode
=
newVal
;
this
.
getList
();
}
},
immediate
:
true
}
},
methods
:
{
handleChangeSort
(
item
)
{
updateCombination
({...
item
}).
then
(
response
=>
{
});
},
/** 查询生产编排单列表 */
getList
()
{
this
.
loading
=
true
;
listArrange
(
this
.
queryParams
).
then
(
response
=>
{
this
.
arrangeList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
arrangeId
:
null
,
arrangeCode
:
null
,
arrangeSort
:
null
,
workorderId
:
null
,
workorderCode
:
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
.
arrangeId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
arrangeOpen
=
true
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
arrangeId
=
row
.
arrangeId
||
this
.
ids
getArrange
(
arrangeId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改生产编排单"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
arrangeId
!=
null
)
{
updateArrange
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addArrange
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
arrangeIds
=
row
.
arrangeId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除生产编排单编号为"'
+
arrangeIds
+
'"的数据项?'
).
then
(
function
()
{
return
delArrange
(
arrangeIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'pro/arrange/export'
,
{
...
this
.
queryParams
},
`arrange_
${
new
Date
().
getTime
()}
.xlsx`
)
}
}
};
</
script
>
src/views/mes/pro/combination/chooseWorkorderForComb.vue
View file @
a3494bfd
...
@@ -155,7 +155,7 @@ import VendorSelect from "@/components/vendorSelect/single.vue";
...
@@ -155,7 +155,7 @@ import VendorSelect from "@/components/vendorSelect/single.vue";
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
batchAddCombination
}
from
"@/api/mes/pro/combination"
;
import
{
batchAddCombination
}
from
"@/api/mes/pro/combination"
;
export
default
{
export
default
{
name
:
"chooseWorkorderForComb"
,
name
:
"chooseWorkorderForComb"
,
...
@@ -279,14 +279,12 @@ export default {
...
@@ -279,14 +279,12 @@ export default {
methods
:
{
methods
:
{
async
handleCombination
()
{
async
handleCombination
()
{
let
params
=
[]
let
params
=
[]
let
shouldExit
=
false
;
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
combinationCode
!=
''
)
{
if
(
item
.
combinationCode
!=
''
&&
item
.
combinationCode
!=
null
)
{
this
.
$modal
.
msgWarning
(
`${item.workorderCode
}
生产单已绑定组合单,不能再绑定!`
);
this
.
$modal
.
msgWarning
(
`${item.workorderCode
}
生产单已绑定组合单,不能再绑定!`
);
return
shouldExit
=
true
}
}
}
);
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
params
.
push
({
params
.
push
({
combinationSort
:
index
,
combinationSort
:
index
,
workorderId
:
item
.
workorderId
,
workorderId
:
item
.
workorderId
,
...
@@ -295,18 +293,13 @@ export default {
...
@@ -295,18 +293,13 @@ export default {
combinationCode
:
this
.
combinationCode
combinationCode
:
this
.
combinationCode
}
)
}
)
}
);
}
);
if
(
!
shouldExit
)
{
batchAddCombination
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"追加组合单成功"
);
this
.
getList
();
}
);
}
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
combinationCode
!=
''
)
{
this
.
$modal
.
msgWarning
(
`${item.workorderCode
}
生产单已绑定组合单,不能再绑定!`
);
return
}
}
);
return
batchAddCombination
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"追加组合单成功"
);
this
.
getList
();
}
);
}
,
}
,
/** 查询生产工单列表 */
/** 查询生产工单列表 */
getList
()
{
getList
()
{
...
...
src/views/mes/pro/combination/index.vue
View file @
a3494bfd
...
@@ -90,7 +90,8 @@
...
@@ -90,7 +90,8 @@
</el-row>
</el-row>
<el-table
v-loading=
"loading"
:data=
"combinationList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"combinationList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"combinationId"
width=
"55"
align=
"center"
/>
<!--
<el-table-column
label=
"销售订单号"
align=
"center"
prop=
"combinationId"
/>
-->
<!--
<el-table-column
label=
"销售订单号"
align=
"center"
prop=
"combinationId"
/>
-->
<!--
<el-table-column
label=
"组合单号"
align=
"center"
prop=
"combinationCode"
/>
-->
<!--
<el-table-column
label=
"组合单号"
align=
"center"
prop=
"combinationCode"
/>
-->
<el-table-column
label=
"组合编码"
width
prop=
"combinationCode"
>
<el-table-column
label=
"组合编码"
width
prop=
"combinationCode"
>
...
@@ -105,7 +106,7 @@
...
@@ -105,7 +106,7 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<!-- <el-table-column label="序号" align="center" prop="combinationSort"/>-->
<!-- <el-table-column label="序号" align="center" prop="combinationSort"/>-->
<!-- <el-table-column label="生产工单号" align="center" prop="workorderCode"/>-->
<!-- <el-table-column label="生产工单号" align="center" prop="workorderCode"/>-->
<!-- <el-table-column label="销售订单号" align="center" prop="salesOrderNumber"/>-->
<!-- <el-table-column label="销售订单号" align="center" prop="salesOrderNumber"/>-->
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -160,7 +161,7 @@
...
@@ -160,7 +161,7 @@
</el-dialog>
</el-dialog>
<el-dialog
title=
"组合单明细"
:visible
.
sync=
"combOpen"
width=
"800px"
append-to-body
@
close=
"getList"
>
<el-dialog
title=
"组合单明细"
:visible
.
sync=
"combOpen"
width=
"800px"
append-to-body
@
close=
"getList"
>
<CombinationInfo
:combinationCode=
"combinationCode"
></CombinationInfo>
<CombinationInfo
:combinationCode=
"combinationCode"
></CombinationInfo>
</el-dialog>
</el-dialog>
</div>
</div>
...
...
src/views/mes/pro/combination/info.vue
View file @
a3494bfd
...
@@ -97,7 +97,12 @@
...
@@ -97,7 +97,12 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"组合单号"
align=
"center"
prop=
"combinationCode"
/>
<el-table-column
label=
"组合单号"
align=
"center"
prop=
"combinationCode"
/>
<el-table-column
label=
"序号"
align=
"center"
prop=
"combinationSort"
/>
<el-table-column
label=
"序号"
align=
"center"
width
prop=
"combinationSort"
>
<template
slot-scope=
"scope"
>
<el-input-number
v-model=
"scope.row.combinationSort"
@
change=
"handleChangeSort(scope.row)"
:min=
"0"
style=
"width: 140px"
label=
"序号"
></el-input-number>
</
template
>
</el-table-column>
<el-table-column
label=
"生产工单号"
align=
"center"
prop=
"workorderCode"
/>
<el-table-column
label=
"生产工单号"
align=
"center"
prop=
"workorderCode"
/>
<!-- <el-table-column label="销售订单号" align="center" prop="salesOrderId"/>-->
<!-- <el-table-column label="销售订单号" align="center" prop="salesOrderId"/>-->
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
@@ -236,6 +241,10 @@ export default {
...
@@ -236,6 +241,10 @@ export default {
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
handleChangeSort
(
item
)
{
updateCombination
({...
item
}).
then
(
response
=>
{
});
},
async
handleCombination
()
{
async
handleCombination
()
{
let
params
=
[]
let
params
=
[]
...
...
src/views/mes/pro/workorder/indexApply.vue
View file @
a3494bfd
...
@@ -192,6 +192,20 @@
...
@@ -192,6 +192,20 @@
</el-button
</el-button
>
>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-plus"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleArrange"
v-hasPermi=
"['mes:pro:workorder:dofinish']"
>
生成编排单
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"warning"
type=
"warning"
...
@@ -771,6 +785,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
...
@@ -771,6 +785,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import
{
getToken
}
from
"@/utils/auth"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
addCombination
,
batchAddCombination
}
from
"@/api/mes/pro/combination"
;
import
{
addCombination
,
batchAddCombination
}
from
"@/api/mes/pro/combination"
;
import
CombinationInfo
from
"@/views/mes/pro/combination/info.vue"
;
import
CombinationInfo
from
"@/views/mes/pro/combination/info.vue"
;
import
{
batchAddArrange
}
from
"@/api/mes/pro/arrange"
;
export
default
{
export
default
{
name
:
"Workorder"
,
name
:
"Workorder"
,
...
@@ -896,6 +911,29 @@ export default {
...
@@ -896,6 +911,29 @@ export default {
this
.
combOpen
=
true
;
this
.
combOpen
=
true
;
this
.
combinationCode
=
combinationCode
;
this
.
combinationCode
=
combinationCode
;
}
,
}
,
async
handleArrange
()
{
let
params
=
[]
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
arrangeCode
!=
''
&&
item
.
arrangeCode
!=
null
)
{
this
.
$modal
.
msgWarning
(
`${item.workorderCode
}
生产单已绑定编排单,不能再绑定!`
);
return
}
}
);
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
params
.
push
({
arrangeSort
:
index
+
1
,
workorderId
:
item
.
workorderId
,
workorderCode
:
item
.
workorderCode
,
arrangeCode
:
null
}
)
}
);
batchAddArrange
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增编排单成功"
);
this
.
getList
();
}
);
}
,
async
handleCombination
()
{
async
handleCombination
()
{
let
params
=
[]
let
params
=
[]
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
...
@@ -906,7 +944,7 @@ export default {
...
@@ -906,7 +944,7 @@ export default {
}
);
}
);
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
params
.
push
({
params
.
push
({
combinationSort
:
index
,
combinationSort
:
index
+
1
,
workorderId
:
item
.
workorderId
,
workorderId
:
item
.
workorderId
,
workorderCode
:
item
.
workorderCode
,
workorderCode
:
item
.
workorderCode
,
salesOrderId
:
0
,
salesOrderId
:
0
,
...
...
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