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
0601ef31
Commit
0601ef31
authored
Apr 04, 2020
by
佟礼
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of 39.98.128.195:zhouyx/mes-ui into product
parents
da86cb88
2f4b52fd
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
361 additions
and
361 deletions
+361
-361
order.js
api/order.js
+3
-0
storeHouseLeft.vue
components/modalTree/storeHouseLeft.vue
+2
-2
zh-CN.js
i18n/locale/zh-CN.js
+1
-1
product.vue
layouts/basic-layout/product.vue
+13
-0
add.vue
pages/aps/aps/add.vue
+205
-248
edit.vue
pages/aps/aps/components/edit.vue
+7
-2
index.vue
pages/mordent/Sluggish/placode/index.vue
+3
-2
index.vue
pages/mordent/Sluggish/powder/index.vue
+4
-2
orderManager.vue
pages/order/orderManager.vue
+123
-104
No files found.
api/order.js
View file @
0601ef31
...
...
@@ -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
);
},
...
...
components/modalTree/storeHouseLeft.vue
View file @
0601ef31
...
...
@@ -48,13 +48,13 @@ export default {
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
divHeight
=
window
.
innerHeight
-
18
0
+
"px"
;
this
.
divHeight
=
window
.
innerHeight
-
26
0
+
"px"
;
})();
};
},
created
()
{
this
.
loadTree
()
var
theight
=
window
.
innerHeight
-
18
0
+
'px'
var
theight
=
window
.
innerHeight
-
26
0
+
'px'
this
.
divHeight
=
theight
},
methods
:
{
...
...
i18n/locale/zh-CN.js
View file @
0601ef31
...
...
@@ -1045,7 +1045,7 @@ export default {
insert_flag
:
'插单'
,
important_flag
:
"插单"
,
outside_time
:
'外协时间'
,
discrete_percent
:
'离散
百分比%
'
,
discrete_percent
:
'离散
度
'
,
taskseq_des
:
''
,
workshopcode
:
''
,
routing_detail_id
:
''
,
...
...
layouts/basic-layout/product.vue
View file @
0601ef31
...
...
@@ -7,6 +7,13 @@
<Icon
type=
"ios-keypad"
/>
<div
class=
"top_menu_box"
>
<table
class=
"t_table_box"
>
<tr>
<td
class=
"t_title"
>
<a
class=
"a_goIndex"
@
click=
"goIndex"
>
<b
class=
"title"
>
首页
</b>
</a>
</td>
</tr>
<tr
v-for=
"(item,i) in filterSider"
>
<td
class=
"t_title"
>
<b
class=
"title"
...
...
@@ -277,6 +284,9 @@ export default {
this
.
$router
.
push
(
u
.
path
)
this
.
isActive
=
u
.
id
},
goIndex
(){
this
.
$router
.
push
(
"/"
)
},
},
mounted
()
{
document
.
addEventListener
(
"scroll"
,
this
.
handleScroll
,
{
passive
:
true
});
...
...
@@ -382,6 +392,9 @@ export default {
.t_title{
min-width: 120px;
background: #515a6e;
.a_goIndex{
color: #fff;
}
.title{
padding: 5px 10px;
}
...
...
pages/aps/aps/add.vue
View file @
0601ef31
...
...
@@ -3,54 +3,28 @@
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
:gutter=
"20"
>
<Col
span=
"12"
>
<div
class=
"left-up"
>
<p
class=
"title-c"
>
参数设置
</p>
<FormItem
:label=
"l('plan_method')"
prop=
"plan_method"
>
<i-switch
v-model=
"entity.plan_method"
size=
"large"
>
<span
slot=
"open"
>
On
</span>
<span
slot=
"close"
>
Off
</span>
</i-switch>
</FormItem>
<FormItem
:label=
"l('calId')"
prop=
"calId"
>
<Select
v-model=
"entity.calId"
style=
"width:150px"
>
<Option
v-for=
"(item,index) in listCal"
:key=
"index"
:value=
"item.calid"
:label=
"item.calname"
></Option>
</Select>
</FormItem>
<FormItem
:label=
"l('overTime')"
prop=
"overTime"
>
<i-switch
v-model=
"entity.overTime"
size=
"large"
>
<span
slot=
"open"
>
On
</span>
<span
slot=
"close"
>
Off
</span>
<div
class=
"filedset"
style=
"height:238px"
>
<p
class=
"title"
>
多台分配设置
</p>
<div
class=
"duo"
>
<FormItem
:label=
"l('multi_machine')"
prop=
"multiple"
>
<i-switch
v-model=
"entity.multiple"
size=
"large"
>
<span
slot=
"open"
>
是
</span>
<span
slot=
"close"
>
否
</span>
</i-switch>
</FormItem>
<FormItem
:label=
"l('efficiencyValue')"
prop=
"efficiencyValue"
>
<Input
v-model=
"entity.efficiencyValue"
style=
"width:150px"
></Input>
</FormItem>
<FormItem
:label=
"l('run_time')"
prop=
"run_time"
>
<InputNumber
v-model=
"entity.run_time"
></InputNumber>
<FormItem
label=
"多台数量"
prop=
"multipleCount"
>
<InputNumber
v-model=
"entity.multipleCount"
></InputNumber>
</FormItem>
<FormItem
:label=
"l('isDiscrete')"
prop=
"isDiscrete"
>
<i-switch
v-model=
"entity.isDiscrete"
size=
"large"
>
<span
slot=
"open"
>
On
</span>
<span
slot=
"close"
>
Off
</span>
</i-switch>
</FormItem>
<FormItem
:label=
"l('discrete')"
prop=
"discrete"
>
<InputNumber
v-model=
"entity.discrete"
></InputNumber>
</FormItem>
<FormItem
:label=
"l('discrete_percent')"
prop=
"discrete_percent"
>
<InputNumber
v-model=
"entity.discrete_percent"
></InputNumber>
<FormItem
label=
"生产设备"
>
<EquipSelect
v-model=
"entity.multipleEquipPks"
multiple
></EquipSelect>
</FormItem>
</div>
<div
class=
"left-donw"
>
<p
class=
"title-c"
>
参数级别
</p>
</div>
<div
class=
"filedset"
>
<p
class=
"title"
>
快速设置
</p>
<div
class=
"icon"
>
<Dropdown
trigger=
"
custom"
:visible=
"visible"
style=
"width:150px
"
>
<a
href=
"javascript:void(0)"
@
click=
"handleOpen"
>
<Dropdown
trigger=
"
hover
"
>
<a
href=
"javascript:void(0)"
>
<Icon
type=
"md-git-compare"
/>
</a>
<DropdownMenu
slot=
"list"
style=
"text-align: center;"
>
...
...
@@ -78,74 +52,75 @@
</a>
<span>
是否离散
</span>
</DropdownItem>
<div
style=
"margin:10px;"
>
<Button
type=
"primary"
@
click=
"handleOk"
>
确定
</Button>
<Button
type=
"primary"
@
click=
"handle"
>
关闭
</Button>
</div>
<!--
<div>
<Button
type=
"text"
class=
"ib"
@
click=
"handleOk"
>
确定
</Button><Button
type=
"text"
class=
"ib"
@
click=
"handle"
>
关闭
</Button>
</div>
-->
</DropdownMenu>
</Dropdown>
</div>
<div
class=
"slider"
>
<Slider
v-model=
"entity.level"
:step=
"20"
show-stops
></Slider>
<div
class=
"slow"
>
慢
</div>
<div
class=
"fast"
>
快
</div>
<h3
v-text=
"entity.level"
></h3>
<Slider
v-model=
"entity.level"
:step=
"1"
:min=
"0"
:max=
"levelRules.length-1"
:marks=
"levelMarks"
show-stops
@
on-change=
"setParameter"
></Slider>
</div>
</div>
<div
class=
"filedset"
>
<p
class=
"title"
>
应用范围
</p>
<div
class=
"slider"
>
<Slider
v-model=
"entity.flog"
:step=
"1"
:min=
"0"
:max=
"5"
:marks=
"marks"
size=
"large"
></Slider>
</div>
</div>
</Col>
<Col
span=
"12"
>
<div
class=
"right-up"
>
<p
class=
"title-d"
>
多台分配设置
</p>
<div
class=
"duo"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('multi_machine')"
prop=
"multi_machine"
>
<i-switch
v-model=
"entity.switch4"
size=
"large"
>
<span
slot=
"open"
>
On
</span>
<span
slot=
"close"
>
Off
</span>
<div
class=
"filedset"
>
<p
class=
"title"
>
参数设置
</p>
<FormItem
:label=
"l('plan_method')"
prop=
"planState"
>
<i-switch
v-model=
"entity.planState"
size=
"large"
>
<span
slot=
"open"
>
平行
</span>
<span
slot=
"close"
>
重叠
</span>
</i-switch>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"多台数量"
prop=
"abbre"
>
<InputNumber
v-model=
"entity.abbre"
></InputNumber>
</FormItem>
</Col>
</Row>
<FormItem
label=
"班组结构"
>
<Select
v-model=
"entity.shopId"
placeholder=
"请选择"
style=
"width:150px"
prop=
"shopId"
>
<FormItem
:label=
"l('calId')"
prop=
"calId"
>
<Select
v-model=
"entity.calId"
>
<Option
v-for=
"(item,index) in list
"
v-for=
"(item,index) in listCal
"
:key=
"index"
:value=
"item.value"
:label=
"item.title"
style=
"display:none"
:value=
"item.id"
:label=
"item.calname"
></Option>
<Tree
key=
"mytree"
:data=
"data1"
ref=
"mytree"
:render=
"renderContent"
></Tree>
</Select>
</FormItem>
<div
class=
"check-box"
>
<CheckboxGroup
v-model=
"entity.fruit
"
>
<Checkbox
label=
"10985553333(数控车床 车工班)"
></Checkbox
>
<br
/
>
<Checkbox
label=
"10985553333(数控车床 车工班)"
></Checkbox
>
<br
/
>
<Checkbox
label=
"10985553333(数控车床 车工班)"
></Checkbox
>
<br
/
>
<Checkbox
label=
"10985553333(数控车床 车工班)"
></Checkbox
>
<br
/
>
</CheckboxGroup
>
</div
>
</div
>
</div
>
<div
class=
"left-donw right-down"
>
<p
class=
"title-c"
>
参数应用
</p
>
<
div
class=
"slider"
>
<Slider
v-model=
"entity.value2"
:step=
"33.3"
show-stops
></Slider
>
<
div
class=
"slow"
>
工序
</div
>
<div
class=
"ding"
>
订单
</div
>
<div
class=
"ling"
>
零件
</div
>
<
div
class=
"fast"
>
所有
</div
>
</
div
>
<Divider
/
>
<FormItem
:label=
"l('overTime')"
prop=
"over
"
>
<i-switch
v-model=
"entity.over"
size=
"large"
>
<span
slot=
"open"
>
加班
</span
>
<span
slot=
"close"
>
不加班
</span
>
</i-switch
>
</FormItem
>
<FormItem
:label=
"l('efficiencyValue')"
prop=
"efficiencyValue"
>
<InputNumber
v-model=
"entity.efficiencyValue"
:step=
"0.1"
></InputNumber
>
</FormItem
>
<Divider
/
>
<FormItem
:label=
"l('isDiscrete')"
prop=
"lisan"
>
<i-switch
v-model=
"entity.lisan"
size=
"large"
>
<span
slot=
"open"
>
是
</span
>
<span
slot=
"close"
>
否
</span
>
</i-switch
>
<
/FormItem
>
<FormItem
:label=
"l('discrete')"
prop=
"discrete"
>
<
InputNumber
v-model=
"entity.discrete"
></InputNumber
>
</FormItem
>
<FormItem
:label=
"l('discrete_percent')"
prop=
"discrete_percent"
>
<
InputNumber
v-model=
"entity.discrete_percent"
></InputNumber
>
</
FormItem
>
</div>
</Col>
</Row>
...
...
@@ -162,29 +137,82 @@ export default {
data
()
{
return
{
entity
:
{
flog
:
0
,
//参数应用
planMethod
:
"转序规则"
,
// 平行 重叠
partTaskPk
:
0
,
opTaskPk
:
0
,
taskSeq
:
""
,
flog
:
0
,
//参数应用范围
level
:
0
,
//参数规则ID
calId
:
null
,
planState
:
true
,
planMethod
:
"重叠"
,
// 平行 重叠
over
:
false
,
overTime
:
"不加班"
,
//"六日加班", 不加班 加班
efficiencyValue
:
11
,
// 效率系数, 必须大于 0
shopId
:
null
,
level
:
100
,
value2
:
100
,
fruit
:
[]
lisan
:
true
,
isDiscrete
:
"否"
,
discrete
:
1
,
//离散数值 必须大于 1
multiple
:
true
,
multipleEquip
:
"是"
,
//"是否多台安排设备", 否 是
multipleCount
:
1
,
//多台数量
multipleEquipPks
:
[],
multipleEquipIds
:
""
//"设备id", 用英文逗号分隔
},
levelRules
:[],
levelMarks
:
{
0
:
"慢"
,
5
:
"快"
},
rules
:
{
// calId: [
// { required: true, message: "必填", type: "number", trigger: "change" }
// ]
},
list
:
[],
data1
:
[],
marks
:
{
0
:
"工序"
,
1
:
"计划"
,
2
:
"产品"
,
3
:
"项目"
,
4
:
"批次"
,
5
:
"所有"
},
listCal
:
[],
visible
:
false
,
rules
:
{
businessName
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
businessCode
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
visible
:
false
//
rules: {
//
businessName: [{ required: true, message: "必填", trigger: "blur" }],
//
businessCode: [{ required: true, message: "必填", trigger: "blur" }]
//
}
};
},
mounted
()
{
props
:
{
opTaskPk
:
{
//工单ID
type
:
Number
,
default
:
0
},
partTaskPk
:
{
//生产计划ID
type
:
Number
,
default
:
0
},
taskSeq
:
{
//工序编号
type
:
String
,
default
:
""
},
count
:
{
//生产计划数量
type
:
Number
,
default
:
0
}
},
created
()
{
this
.
getCal
();
//获取连班策略
this
.
apsGet
();
//获取参数级别和转序等的关系
this
.
initTree
();
//获取当前登录人所在车间下的所有部门
},
mounted
()
{},
methods
:
{
getCal
()
{
Api
.
getallcal
().
then
(
res
=>
{
...
...
@@ -195,75 +223,61 @@ export default {
},
apsGet
()
{
Api
.
apsGetall
().
then
(
res
=>
{
// if (res.success) {
// }
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
Api
.
apsschedulupdateparameter
(
this
.
entity
).
then
(
res
=>
{
if
(
res
.
success
)
{
console
.
log
(
res
.
result
)
this
.
levelRules
=
res
.
result
;
let
max
=
this
.
levelRules
.
length
-
1
;
// let marks = `{0:"慢", ${max}:"快"}`;
// marks = marks.replace(/(\d+):/g,"\"$1\":");
// this.levelMarks = JSON.parse(marks);
// this.entity.level=0;
}
});
}
else
{
this
.
$Message
.
error
(
"Fail!"
);
},
setParameter
(
v
)
{
// alert(v)
let
parameters
=
this
.
levelRules
[
v
].
prams
;
parameters
.
map
(
u
=>
{
if
(
u
.
parametersCode
==
"PlanMethod"
)
{
this
.
entity
.
planState
=
u
.
parameterValue
==
"平行"
;
this
.
entity
.
planMethod
=
u
.
parameterValue
;
}
else
if
(
u
.
parametersCode
==
"OverTime"
)
{
this
.
entity
.
over
=
u
.
OverTime
==
"不加班"
;
this
.
entity
.
overTime
=
u
.
parameterValue
;
}
else
if
(
u
.
parametersCode
==
"Discrete"
)
{
this
.
entity
.
lisan
=
u
.
parameterValue
==
"是"
;
this
.
entity
.
isDiscrete
=
u
.
parameterValue
;
}
console
.
log
(
u
);
});
},
initTree
()
{
var
sumData
=
[];
Api
.
userdepartmentsofworkshop
()
.
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
data1
=
r
.
result
;
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
entity
.
multipleEquipIds
=
this
.
entity
.
multipleEquipPks
.
join
();
this
.
entity
.
planMethod
=
this
.
entity
.
planState
?
"重叠"
:
"平行"
;
this
.
entity
.
overTime
=
this
.
entity
.
over
?
"不加班"
:
"加班"
;
this
.
entity
.
isDiscrete
=
this
.
entity
.
lisan
?
"是"
:
"否"
;
this
.
entity
.
multipleEquip
=
this
.
entity
.
multiple
?
"是"
:
"否"
;
Api
.
apsschedulupdateparameter
(
this
.
entity
)
.
then
(
res
=>
{
if
(
res
.
result
.
state
)
{
this
.
$Message
.
success
(
res
.
result
.
msg
);
this
.
$emit
(
"on-parameter-ok"
);
}
else
{
this
.
$Message
.
error
(
"加载部门失败!"
);
this
.
$Message
.
error
(
res
.
result
.
msg
);
}
})
.
catch
(
err
=>
{});
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
//渲染树的样式
return
h
(
"span"
,
{
style
:
{
cursor
:
"pointer"
},
on
:
{
click
:
()
=>
{
this
.
handleSelect
(
data
);
//手动选择树节点
}
.
catch
(
e
=>
{
this
.
$Message
.
error
(
"数据异常!"
);
});
}
},
data
.
title
);
},
handleSelect
(
data
)
{
let
obj
=
{
label
:
data
.
title
,
value
:
data
.
value
};
this
.
list
=
[];
this
.
list
.
push
(
obj
);
alert
(
this
.
list
[
0
].
value
)
this
.
entity
.
shopId
=
this
.
list
[
0
].
value
;
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
handleOpen
()
{
this
.
visible
=
true
;
},
handle
()
{
this
.
visible
=
false
;
},
handleOk
()
{},
l
(
key
)
{
let
vkey
=
"mes_op_task_plan_simulate"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
...
...
@@ -271,31 +285,16 @@ export default {
}
};
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
>
.parameter {
margin: 10px;
.left-up {
position: relative;
border: 1px solid #e0e0e0;
padding: 25px 0;
.title-c {
width: 68px;
padding-left: 5px;
background: #fff;
position: absolute;
top: -9px;
left: 25px;
color: #2680eb;
}
}
.left-donw {
margin-top: 15px;
.filedset {
position: relative;
border: 1px solid #e0e0e0;
padding: 25px
0
;
.title
-c
{
width: 68px
;
padding: 25px
10px 0 10px
;
margin-bottom: 20px;
.title {
display: inline-block
;
padding-left: 5px;
background: #fff;
position: absolute;
...
...
@@ -303,61 +302,19 @@ export default {
left: 25px;
color: #2680eb;
}
.slider {
margin: 0 50px 0 50px;
position: relative;
.slow {
position: absolute;
top: 7px;
left: -5px;
}
.fast {
position: absolute;
top: 7px;
right: -10px;
}
.ding {
position: absolute;
top: 7px;
left: 30%;
}
.ling {
position: absolute;
top: 7px;
right: 30%;
}
}
.icon {
text-align: right;
padding-right: 15px;
margin-top: -15px;
}
}
.right-up {
position: relative;
border: 1px solid #e0e0e0;
padding: 25px 0;
.title-d {
width: 95px;
padding-left: 5px;
margin-left: 10px;
background: #fff;
position: absolute;
top: -9px;
left: 25px;
color: #2680eb;
right: 10px;
top: 10px;
}
.check-box {
height: 348px;
border-top: 1px solid #e0e0e0;
padding: 15px;
padding-left: 0;
margin-left: 25px;
overflow: auto;
.slider {
padding: 20px 20px;
.ivu-slider-marks-item {
width: 60px;
text-align: center;
// margin-right: -20px;
}
}
.right-down {
height: 92px;
}
.click-btn {
text-align: right;
...
...
pages/aps/aps/components/edit.vue
View file @
0601ef31
...
...
@@ -66,7 +66,12 @@ export default {
}
},
props
:
{
eid
:
Number
row
:
{
type
:
Object
,
default
:()
=>
{
return
null
}
}
},
methods
:
{
load
(
v
)
{
...
...
@@ -84,7 +89,7 @@ export default {
this
.
disabled
=
false
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
'on-o
ption-o
k'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
}
...
...
pages/mordent/Sluggish/placode/index.vue
View file @
0601ef31
...
...
@@ -4,7 +4,7 @@
<StoreHouseLeft
@
storeIds=
"storeIds"
:type=
'2'
></StoreHouseLeft>
</Sider>
<Content
class=
"content"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:height=
"tdHeight"
>
<template
slot=
"searchForm"
>
<Search
/>
</
template
>
...
...
@@ -82,6 +82,7 @@ export default {
deletelModal
:
false
,
setNumModal
:
false
,
inventoryModal
:
false
,
tdHeight
:
0
,
curId
:
0
,
easySearch
:
{
keys
:
{
op
:
'code,name'
,
value
:
''
,
default
:
true
},
...
...
@@ -256,7 +257,7 @@ export default {
},
mounted
()
{},
created
()
{
this
.
tdHeight
=
window
.
innerHeight
-
260
},
methods
:
{
addOk
()
{
...
...
pages/mordent/Sluggish/powder/index.vue
View file @
0601ef31
...
...
@@ -15,7 +15,8 @@
ref=
"grid"
:conditions=
"easySearch"
:datalist=
"dataList"
:total=
"ptotal"
placeholder=
"请输入查询条件"
:high=
"true"
>
:high=
"true"
:height=
"tdHeight"
>
<template
slot=
"searchForm"
>
<Search
/>
</
template
>
...
...
@@ -103,6 +104,7 @@ export default {
deletelModal
:
false
,
setNumModal
:
false
,
inventoryModal
:
false
,
tdHeight
:
0
,
curId
:
0
,
easySearch
:
{
keys
:
{
op
:
'code,name'
,
value
:
''
,
default
:
true
},
...
...
@@ -165,7 +167,7 @@ export default {
}
},
mounted
()
{},
created
()
{},
created
()
{
this
.
tdHeight
=
window
.
innerHeight
-
260
},
methods
:
{
addOk
()
{
this
.
addModal
=
false
...
...
pages/order/orderManager.vue
View file @
0601ef31
<
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