Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pda-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
pda
pda-ui
Commits
dc9b3799
Commit
dc9b3799
authored
Mar 08, 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
84e3c8f0
66dc3921
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
727 additions
and
9 deletions
+727
-9
warehouse.js
src/api/mes/tm/warehouse.js
+28
-0
index.vue
src/views/mes/tm/toolmachinesrecord/index.vue
+8
-8
index.vue
src/views/mes/tm/toolrequest/index.vue
+1
-1
index.vue
src/views/mes/tm/warehouse/index.vue
+338
-0
itemIndex.vue
src/views/mes/tm/warehouse/itemIndex.vue
+198
-0
selectmachinesrecord.vue
src/views/mes/tm/warehouse/selectmachinesrecord.vue
+154
-0
No files found.
src/api/mes/tm/warehouse.js
0 → 100644
View file @
dc9b3799
import
request
from
'@/utils/request'
// 查询刀模版入库列表
export
function
lisWoreHouse
(
query
)
{
return
request
({
url
:
"/md/warehouse/list"
,
method
:
"get"
,
params
:
query
,
});
}
// 查询刀模版入库详情列表
export
function
lisWoreHouseDetail
(
query
)
{
return
request
({
url
:
`/md/warehouse/
${
query
.
toolWarehouseid
}
`
,
method
:
"get"
});
}
// 新增刀模版入库
export
function
addWoreHouse
(
data
)
{
return
request
({
url
:
"/md/warehouse"
,
method
:
"post"
,
data
:
data
,
});
}
src/views/mes/tm/toolmachinesrecord/index.vue
View file @
dc9b3799
...
...
@@ -138,7 +138,7 @@
<span>
{{
scope
.
row
.
warehouse
==
'2'
?
'是'
:
'否'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"入库
原因
"
align=
"center"
prop=
"warehouseDesc"
width=
"120"
/>
<el-table-column
label=
"入库
方式
"
align=
"center"
prop=
"warehouseDesc"
width=
"120"
/>
<el-table-column
label=
"上机时间"
width=
"120"
align=
"center"
prop=
"upDate"
/>
<el-table-column
label=
"下机时间"
width=
"120"
align=
"center"
prop=
"downDate"
/>
<el-table-column
label=
"物料名称"
width=
"150"
align=
"center"
prop=
"itemName"
/>
...
...
@@ -182,12 +182,12 @@
<!-- 入库对话框 -->
<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=
"warehouseDesc"
>
<el-select
value=
"['','']"
v-model=
"form.warehouseDesc"
clearable
style=
"width:100%;"
placeholder=
"请选择入库原因
"
<el-form-item
label=
"入库
方式
"
prop=
"warehouseDesc"
>
<el-select
v-model=
"form.warehouseDesc"
clearable
style=
"width:100%;"
placeholder=
"请选择入库方式
"
>
<el-option
v-for=
"dict in dict.type.warehouse_desc"
...
...
@@ -254,7 +254,7 @@ export default {
// 表单校验
rules
:
{
warehouseDesc
:[
{
required
:
true
,
message
:
'请选择入库
原因
'
,
trigger
:
'change'
}
{
required
:
true
,
message
:
'请选择入库
方式
'
,
trigger
:
'change'
}
]
}
};
...
...
src/views/mes/tm/toolrequest/index.vue
View file @
dc9b3799
...
...
@@ -520,7 +520,7 @@ export default {
}
}
)
console
.
log
(
datas
,
'datas'
)
addTmToolRequest
(
this
.
form
).
then
(
response
=>
{
addTmToolRequest
(
datas
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
...
...
src/views/mes/tm/warehouse/index.vue
0 → 100644
View file @
dc9b3799
This diff is collapsed.
Click to expand it.
src/views/mes/tm/warehouse/itemIndex.vue
0 → 100644
View file @
dc9b3799
<
template
>
<div
class=
"app-container"
>
<el-button
v-if=
"$attrs.optType === 'add'"
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"$refs['ItemSelectRef'].showFlag = true"
>
新增
</el-button>
<ItemSelect
ref=
"ItemSelectRef"
@
onSelected=
"onItemSelect"
/>
<el-table
v-loading=
"loading"
:data=
"tmToolRequestItemList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
type=
"index"
width=
"50"
/>
<el-table-column
label=
"物料编码"
align=
"center"
prop=
"itemCode"
/>
<el-table-column
width=
"100px"
label=
"物料名称"
align=
"center"
prop=
"itemName"
/>
<el-table-column
width=
"100px"
label=
"SN号"
align=
"center"
prop=
"toolCode"
/>
<el-table-column
width=
"120px"
v-if=
"$attrs.optType === 'add'"
label=
"入库位置"
align=
"center"
prop=
"local"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.local"
@
blur=
"$emit('sum')"
placeholder=
"请输入入库位置"
/>
</
template
>
</el-table-column>
<el-table-column
width=
"120px"
v-else
label=
"入库位置"
align=
"center"
prop=
"local"
/>
<el-table-column
width=
"240px"
v-if=
"$attrs.optType === 'add'"
label=
"入库方式"
align=
"center"
prop=
"warehouseDesc"
>
<
template
slot-scope=
"scope"
>
<el-radio-group
v-model=
"scope.row.warehouseDesc"
>
<el-radio
v-for=
"dict in dict.type.warehouse_desc"
:key=
"dict.value"
:label=
"dict.label"
>
{{
dict
.
label
}}
</el-radio>
</el-radio-group>
</
template
>
</el-table-column>
<el-table-column
width=
"120px"
v-else
label=
"入库方式"
align=
"center"
prop=
"warehouseDesc"
/>
<el-table-column
width=
"100px"
v-if=
"$attrs.optType === 'add'"
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleRemove(scope.row, scope.$index)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0&&$attrs.optType !== 'add'"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
import
{
lisWoreHouseDetail
,
getTmToolRequestItem
,
delTmToolRequestItem
,
addTmToolRequestItem
,
updateTmToolRequestItem
}
from
"@/api/mes/tm/tmToolRequestItem"
;
import
{
getTaskIdMaxProcessTool
}
from
"@/api/mes/pro/protask"
;
import
ItemSelect
from
"./selectmachinesrecord.vue"
;
export
default
{
name
:
"TmToolRequestItem"
,
dicts
:
[
"warehouse_desc"
],
components
:
{
ItemSelect
},
props
:{
toolRequestId
:{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
// 遮罩层
loading
:
false
,
// 选中数组
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
:
{
}
};
},
watch
:
{
'$attrs.taskId'
(
newVal
,
oldVal
){
if
(
this
.
$attrs
.
optType
===
'add'
)
{
this
.
getTaskList
()
}
}
},
created
()
{
if
(
this
.
$attrs
.
optType
!==
'add'
)
{
this
.
getList
();
}
},
methods
:
{
onItemSelect
(
list
){
// console.log(list, 'list')
const
datas
=
list
.
map
(
item
=>
{
return
{
toolWarehouseId
:
item
.
toolWarehouseId
,
toolMachinesId
:
item
.
toolMachinesId
,
type
:
item
.
type
,
toolCode
:
item
.
toolCode
,
toolName
:
item
.
toolName
,
itemCode
:
item
.
itemCode
,
itemName
:
item
.
itemName
,
local
:
item
.
local
,
processId
:
Number
(
item
.
processId
),
processName
:
item
.
processName
,
warehouse
:
item
.
warehouse
,
warehouseDesc
:
item
.
warehouseDesc
,
}
})
this
.
tmToolRequestItemList
=
this
.
tmToolRequestItemList
.
concat
(
datas
)
this
.
$emit
(
'sum'
)
},
/** 查询刀模板物料申请单列表 */
getList
()
{
this
.
loading
=
true
;
this
.
queryParams
.
toolWarehouseid
=
this
.
toolRequestId
;
lisWoreHouseDetail
(
this
.
queryParams
).
then
(
response
=>
{
this
.
tmToolRequestItemList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
/** 查询任务刀模板申请单列表 */
getTaskList
()
{
this
.
loading
=
true
;
this
.
queryParams
.
taskId
=
this
.
$attrs
.
taskId
;
this
.
queryParams
.
pageSize
=
10000
;
getTaskIdMaxProcessTool
(
this
.
queryParams
).
then
(
response
=>
{
const
datas
=
response
.
data
.
map
(
item
=>
{
return
{
...
item
,
allQuantity
:
item
.
AllQuantity
}
});
this
.
tmToolRequestItemList
=
this
.
tmToolRequestItemList
.
concat
(
datas
)
// this.total = response.total;
this
.
loading
=
false
;
this
.
$emit
(
'sum'
)
});
},
handleRemove
(
row
,
index
)
{
console
.
log
(
row
,
index
)
// this.tags.splice(this.tags.indexOf(tag), 1)
this
.
tmToolRequestItemList
.
splice
(
this
.
tmToolRequestItemList
.
indexOf
(
row
),
1
)
this
.
$emit
(
'sum'
)
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 搜索按钮操作 */
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
}
}
};
</
script
>
src/views/mes/tm/warehouse/selectmachinesrecord.vue
0 → 100644
View file @
dc9b3799
<
template
>
<el-dialog
title=
"请选择刀模版入库申请单"
v-if=
"showFlag"
:visible
.
sync=
"showFlag"
:modal=
"true"
width=
"80%"
append-to-body
:destroy-on-close=
"true"
:close-on-click-modal=
"false"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"工作单元名称"
prop=
"workunitName"
>
<el-input
v-model=
"queryParams.taskid"
placeholder=
"请输入工作单元名称"
style=
"width:220px;"
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-table
v-loading=
"loading"
:data=
"itemList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"物料编码"
align=
"center"
prop=
"itemCode"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"itemName"
/>
<el-table-column
label=
"SN号"
align=
"center"
prop=
"toolCode"
/>
<el-table-column
label=
"工序"
align=
"center"
prop=
"processId"
/>
<el-table-column
label=
"工作单元名称"
align=
"center"
prop=
"workunitName"
/>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<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
{
listRecord
}
from
"@/api/mes/tm/toolmachinesrecord"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
treeselect
}
from
"@/api/mes/md/itemtype"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
export
default
{
name
:
"MdItemSingle"
,
dicts
:
[
"sys_yes_no"
,
"mes_item_product"
],
components
:
{
Treeselect
},
data
()
{
return
{
showFlag
:
false
,
// 选中数组
ids
:
[],
selectedRows
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 物料产品表格数据
itemList
:
null
,
// 部门树选项
itemTypeOptions
:
undefined
,
// 部门名称
itemTypeName
:
undefined
,
defaultProps
:
{
children
:
"children"
,
label
:
"label"
,
},
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
// typeStr: '2',
// warehouseStr: '1'
},
};
},
watch
:
{
// 根据名称筛选分类树
itemTypeName
(
val
)
{
this
.
$refs
.
tree
.
filter
(
val
);
},
},
created
()
{
},
mounted
()
{
this
.
getList
();
},
methods
:
{
/** 查询物料编码列表 */
getList
()
{
this
.
loading
=
true
;
listRecord
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
itemList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
itemId
);
this
.
single
=
selection
.
length
!=
1
;
this
.
multiple
=
!
selection
.
length
;
this
.
selectedRows
=
selection
;
},
//确定选中
confirmSelect
(){
if
(
this
.
ids
.
length
==
0
)
{
this
.
$notify
({
title
:
'提示'
,
type
:
'warning'
,
message
:
'请至少选择一条数据!'
});
return
;
}
console
.
log
(
this
.
selectedRows
)
this
.
$emit
(
'onSelected'
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
},
};
</
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