Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周远喜
mes-ui
Commits
fbe41166
Commit
fbe41166
authored
Apr 03, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
order
parent
ea431ce7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
126 additions
and
104 deletions
+126
-104
order.js
api/order.js
+3
-0
orderManager.vue
pages/order/orderManager.vue
+123
-104
No files found.
api/order.js
View file @
fbe41166
...
...
@@ -99,6 +99,9 @@ export default {
SimpleSearch
:
typeof
(
params
)
==
'string'
?
params
:
params
.
simpleSearch
,
//快速搜索
SkipCount
:
params
.
SkipCount
?
params
.
SkipCount
:
0
,
MaxResultCount
:
params
.
MaxResultCount
?
params
.
MaxResultCount
:
20
,
projectNumber
:
params
.
projectNumber
,
//项目号
batchNumber
:
params
.
batchNumber
,
//批次号
urgencyLevel
:
params
.
urgencyLevel
,
//紧急程度
};
return
Api
.
get
(
`
${
PlanUrl
}
/mesorder/getpagedmesorders`
,
model
);
},
...
...
pages/order/orderManager.vue
View file @
fbe41166
<
template
>
<Layout
class=
"full"
>
<Sider
hide-trigger
:style=
"
{background: '#fff'}" width="260"
>
<Sider
hide-trigger
:style=
"
{background: '#fff'}" width="260">
<div
class=
"zh-tree"
:style=
"
{height:treeHeight+'px'}">
<h3
class=
"zh-title"
>
产品结构
</h3>
<div
class=
"zh-box"
>
<div
class=
"zh-box"
>
<Input
search
placeholder=
"请输入查询条件"
v-model=
"treeInputSearch"
/>
<Tree
:data=
"searchList"
:style=
"
{height:(treeHeight-115)+'px'}" style="overflow:auto;width:215px;" @on-select-change="selectTreeNode">
</Tree>
<Tree
:data=
"searchList"
:style=
"
{height:(treeHeight-115)+'px'}"
style="overflow:auto;width:215px;"
@on-select-change="selectTreeNode"
>
</Tree>
</div>
</div>
</Sider>
...
...
@@ -43,6 +48,28 @@
</Col>
</Row>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"项目号"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.projectNumber"
placeholder
style=
"width:240px"
/>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"批次号"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.batchNumber"
placeholder
style=
"width:240px"
/>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"紧急程度"
style=
"width:100%"
>
<dictionary
code=
"plan.order.urgencyLevel"
v-model=
"orderSearchForm.urgencyLevel"
style=
"width:240px"
></dictionary>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"任务类型"
style=
"width:100%"
>
<dictionary
...
...
@@ -52,6 +79,8 @@
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"阶段"
style=
"width:100%"
>
<dictionary
...
...
@@ -61,8 +90,6 @@
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"材料"
style=
"width:100%"
>
<dictionary
...
...
@@ -72,13 +99,13 @@
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"数量"
style=
"width:100%"
>
<InputNumber
:min=
"0"
v-model=
"orderSearchForm.quantity"
style=
"width:240px"
></InputNumber>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"甲方客户"
style=
"width:100%"
>
<dictionary
...
...
@@ -88,15 +115,6 @@
></dictionary>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"3D打印承制单位"
style=
"width:100%"
>
<dictionary
code=
"plan.order.printSupply"
v-model=
"orderSearchForm.printSupply"
style=
"width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"12"
>
...
...
@@ -161,42 +179,45 @@
</template>
<
script
>
import
CustomTable
from
'@/components/customTable/customTable.vue'
import
CustomTable
from
"@/components/customTable/customTable.vue"
;
export
default
{
components
:
{
CustomTable
},
data
()
{
return
{
treeData
:
[],
treeInputSearch
:
''
,
treeInputSearch
:
""
,
ocolumn
:
[],
treeHeight
:
''
,
tableHeight
:
''
,
treeHeight
:
""
,
tableHeight
:
""
,
ids
:
[],
orderSearchForm
:
{
productId
:
''
,
//产品id
productName
:
''
,
//产品名称
taskType
:
''
,
//任务类型
stage
:
''
,
//阶段
materialId
:
''
,
//材料
productId
:
""
,
//产品id
productName
:
""
,
//产品名称
taskType
:
""
,
//任务类型
stage
:
""
,
//阶段
materialId
:
""
,
//材料
quantity
:
null
,
//数量
guestName
:
''
,
//甲方客户
printSupply
:
''
,
//3D打印承制单位
functionaryOffice
:
''
,
//厂内责任机关
mainDepartmentId
:
''
,
//厂内责任主体部门ID
taskRequire
:
''
,
//任务接点要求
putintDocmentCode
:
''
,
//甲方投产输入文件编号
technologyDocmentCode
:
''
,
//甲方技术输入文件编号
outerDrawnNumber
:
''
,
//外部图号/模型号
modelVersion
:
''
,
//模型版本
taskCode
:
''
,
//甲方任务号
designer
:
''
,
//甲方设计人员
officeFunctionary
:
''
,
//厂内机关负责人
mainRoutingPeople
:
''
,
//厂内主工艺人员
routing_Method
:
''
,
//工艺方法
outer_Envelope_Size
:
''
,
//包装尺寸
demandStartDate
:
''
,
//开始时间
demandFinishDate
:
''
,
//完成时间
remark
:
''
//备注
guestName
:
""
,
//甲方客户
printSupply
:
""
,
//3D打印承制单位
functionaryOffice
:
""
,
//厂内责任机关
mainDepartmentId
:
""
,
//厂内责任主体部门ID
taskRequire
:
""
,
//任务接点要求
putintDocmentCode
:
""
,
//甲方投产输入文件编号
technologyDocmentCode
:
""
,
//甲方技术输入文件编号
outerDrawnNumber
:
""
,
//外部图号/模型号
modelVersion
:
""
,
//模型版本
taskCode
:
""
,
//甲方任务号
designer
:
""
,
//甲方设计人员
officeFunctionary
:
""
,
//厂内机关负责人
mainRoutingPeople
:
""
,
//厂内主工艺人员
routing_Method
:
""
,
//工艺方法
outer_Envelope_Size
:
""
,
//包装尺寸
demandStartDate
:
""
,
//开始时间
demandFinishDate
:
""
,
//完成时间
remark
:
""
,
//备注
projectNumber
:
""
,
//项目号
batchNumber
:
""
,
//批次号
urgencyLevel
:
null
//紧急程度
},
list
:
[],
data1
:
[],
...
...
@@ -214,139 +235,137 @@ export default {
mainDeptList
:
[],
//厂内主体部门下拉
taskTypeList
:
[],
//任务类型
statusList
:
[]
//状态类型
}
}
;
},
created
()
{
this
.
treeHeight
=
window
.
innerHeight
-
150
this
.
treeHeight
=
window
.
innerHeight
-
150
;
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{
this
.
initTree
()
this
.
tableHeight
=
window
.
innerHeight
-
220
this
.
$refs
.
CustomTable
.
getTableHeight
(
this
.
tableHeight
)
this
.
initTree
()
;
this
.
tableHeight
=
window
.
innerHeight
-
220
;
this
.
$refs
.
CustomTable
.
getTableHeight
(
this
.
tableHeight
)
;
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
treeHeight
=
window
.
screenHeight
-
150
this
.
tableHeight
=
window
.
screenHeight
-
220
this
.
$refs
.
CustomTable
.
getTableHeight
(
this
.
tableHeight
)
})()
}
window
.
screenHeight
=
window
.
innerHeight
;
this
.
treeHeight
=
window
.
screenHeight
-
150
;
this
.
tableHeight
=
window
.
screenHeight
-
220
;
this
.
$refs
.
CustomTable
.
getTableHeight
(
this
.
tableHeight
)
;
})()
;
}
;
//dev状态下使用静态数据
},
computed
:
{
searchList
()
{
let
nodeList
=
this
.
treeData
var
text
=
this
.
treeInputSearch
var
newNodeList
=
[]
let
nodeList
=
this
.
treeData
;
var
text
=
this
.
treeInputSearch
;
var
newNodeList
=
[]
;
function
searchTree
(
nodeLists
,
value
)
{
for
(
let
i
=
0
;
i
<
nodeLists
.
length
;
i
++
)
{
if
(
nodeLists
[
i
].
title
.
indexOf
(
value
)
!=
-
1
)
{
newNodeList
.
push
(
nodeLists
[
i
])
newNodeList
.
push
(
nodeLists
[
i
])
;
}
else
if
(
nodeLists
[
i
].
children
.
length
>
0
)
{
searchTree
(
nodeLists
[
i
].
children
,
value
)
searchTree
(
nodeLists
[
i
].
children
,
value
)
;
}
}
}
if
(
text
!=
''
)
{
searchTree
(
nodeList
,
text
)
if
(
text
!=
""
)
{
searchTree
(
nodeList
,
text
)
;
}
else
{
return
nodeList
return
nodeList
;
}
return
newNodeList
return
newNodeList
;
}
},
methods
:
{
initTree
()
{
var
sumData
=
[]
this
.
$http
.
order
.
getallselecttree
().
then
(
(
res
)
=>
{
var
sumData
=
[]
;
this
.
$http
.
order
.
getallselecttree
().
then
(
res
=>
{
if
(
res
.
result
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
sumData
=
sumData
.
concat
(
res
.
result
[
i
])
sumData
=
sumData
.
concat
(
res
.
result
[
i
])
;
}
this
.
treeData
=
sumData
this
.
data1
=
JSON
.
parse
(
JSON
.
stringify
(
sumData
))
this
.
treeData
=
sumData
;
this
.
data1
=
JSON
.
parse
(
JSON
.
stringify
(
sumData
))
;
}
else
{
this
.
$Message
.
error
(
'加载产品树失败!'
)
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
})
})
;
},
selectTreeNode
(
value
)
{
if
(
value
.
length
>
0
)
{
this
.
ids
=
[]
this
.
getAllIds
(
value
)
this
.
ids
=
[]
;
this
.
getAllIds
(
value
)
;
if
(
this
.
ids
.
length
>
0
)
{
this
.
orderSearchForm
.
productId
=
this
.
ids
.
join
(
','
)
this
.
orderSearchForm
.
productId
=
this
.
ids
.
join
(
","
);
}
else
{
this
.
orderSearchForm
.
productId
=
'-1'
this
.
orderSearchForm
.
productName
=
''
this
.
orderSearchForm
.
productId
=
"-1"
;
this
.
orderSearchForm
.
productName
=
""
;
}
this
.
$refs
.
CustomTable
.
easySearch
(
this
.
orderSearchForm
)
this
.
$refs
.
CustomTable
.
easySearch
(
this
.
orderSearchForm
)
;
}
},
//得到此树节点下所有是产品的productId
getAllIds
(
trees
)
{
trees
.
forEach
((
data
,
index
)
=>
{
var
that
=
this
var
that
=
this
;
if
(
data
.
isProduct
)
{
this
.
ids
.
push
(
data
.
productId
)
this
.
ids
.
push
(
data
.
productId
)
;
}
if
(
data
.
children
.
length
>
0
)
{
this
.
getAllIds
(
data
.
children
)
this
.
getAllIds
(
data
.
children
)
;
}
})
})
;
},
handleSelect
(
data
)
{
if
(
data
.
length
>
0
)
{
this
.
selectdata
=
[]
this
.
selectdata
=
data
this
.
list
=
[]
this
.
list
.
push
({
label
:
data
[
0
].
title
,
value
:
data
[
0
].
id
})
this
.
selectdata
=
[]
;
this
.
selectdata
=
data
;
this
.
list
=
[]
;
this
.
list
.
push
({
label
:
data
[
0
].
title
,
value
:
data
[
0
].
id
})
;
//this.formValidate.classType=data[0].id;
if
(
data
[
0
].
isProduct
==
'1'
)
{
this
.
orderSearchForm
.
productName
=
data
[
0
].
id
this
.
orderSearchForm
.
productId
=
data
[
0
].
productId
if
(
data
[
0
].
isProduct
==
"1"
)
{
this
.
orderSearchForm
.
productName
=
data
[
0
].
id
;
this
.
orderSearchForm
.
productId
=
data
[
0
].
productId
;
}
else
{
this
.
$Message
.
error
(
'此节点不是产品,请选择产品节点!'
)
this
.
$Message
.
error
(
"此节点不是产品,请选择产品节点!"
);
}
}
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
//渲染树的样式
return
h
(
'span'
,
"span"
,
{
style
:
{
color
:
data
.
isProduct
!=
'1'
?
'#249E91'
:
'#333'
,
//根据选中状态设置样式
cursor
:
'pointer'
color
:
data
.
isProduct
!=
"1"
?
"#249E91"
:
"#333"
,
//根据选中状态设置样式
cursor
:
"pointer"
},
on
:
{
click
:
()
=>
{
let
arrTree
=
[]
arrTree
.
push
(
data
)
this
.
handleSelect
(
arrTree
)
//手动选择树节点
let
arrTree
=
[]
;
arrTree
.
push
(
data
)
;
this
.
handleSelect
(
arrTree
)
;
//手动选择树节点
}
}
},
data
.
title
)
)
;
},
formReset
(
ttt
)
{
// alert("555")
//this.orderSearchForm=this.orderSearchForm;
}
}
}
}
;
</
script
>
<
style
lang=
"less"
scoped
>
.full
{
.full {
margin-top: 0;
.content
{
.content {
margin-top: 10px;
}
}
...
...
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