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
8ec6fa8a
Commit
8ec6fa8a
authored
Sep 01, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
05a177e5
31282b72
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1600 additions
and
1445 deletions
+1600
-1445
base.less
assets/css/base.less
+3
-0
zh-CN.js
i18n/locale/zh-CN.js
+5
-2
addAccessory.vue
pages/aps/plan/addAccessory.vue
+301
-317
api.js
pages/aps/plan/api.js
+4
-0
editAccessory.vue
pages/aps/plan/editAccessory.vue
+436
-485
index.vue
pages/produce/execute/MaterialCollec/index.vue
+244
-18
orderlist.vue
pages/produce/execute/components/orderlist.vue
+92
-96
execute.less
pages/produce/execute/execute.less
+1
-2
index.vue
pages/produce/execute/index.vue
+149
-145
orderlist.vue
pages/produce/orderlist.vue
+355
-373
base.css
src/assets/css/base.css
+3
-0
execute.css
src/assets/css/execute.css
+7
-7
No files found.
assets/css/base.less
View file @
8ec6fa8a
...
...
@@ -297,6 +297,9 @@ div::-webkit-scrollbar-corner {
.mr30 {
margin-right: 30px;
}
.mr40 {
margin-right: 40px;
}
.mtb10 {
margin: 10px 0;
...
...
i18n/locale/zh-CN.js
View file @
8ec6fa8a
...
...
@@ -1664,7 +1664,7 @@ export default {
nameMaterial
:
'物料名称'
,
materialNumber
:
'物料编号'
,
needCount
:
'需要数量'
,
totalCount
:
'需
要
数量'
,
totalCount
:
'需
求
数量'
,
outStockNumber
:
'出库数量'
,
orderId
:
''
,
remark
:
'备注'
,
...
...
@@ -1672,7 +1672,10 @@ export default {
storeTitle
:
'库位名称'
,
stockCode
:
'物料序号'
,
count1
:
"可申请数"
,
count2
:
"申请数"
count2
:
"申请数"
,
count3
:
"已领用数/出库数"
,
count4
:
"领用"
,
applicationNumber
:
"申请数"
},
//导入中心
import_center
:{
...
...
pages/aps/plan/addAccessory.vue
View file @
8ec6fa8a
<
template
>
<div
class=
"h100 table-content
"
>
<div
class=
"h100 table-content1
"
>
<p
class=
"mb10"
>
订单编号:
{{
mesCodes
}}
<span
class=
"ml20"
>
产品名称:
{{
productNames
}}
</span>
<span
class=
"ml20"
>
生产数量:
{{
counts
}}
</span>
订单编号:
{{
mesCodes
}}
<span
class=
"ml20"
>
产品名称:
{{
productNames
}}
</span>
<span
class=
"ml20"
>
生产数量:
{{
counts
}}
</span>
</p>
<div
class=
"mb20"
v-for=
"(item,i) in datas"
:key=
"i"
>
<p
class=
"fwBold"
>
{{
item
.
routingHeader
}}
------
{{
item
.
routingHeaderCode
}}
</p>
<Table
border
:columns=
"cols"
:data=
"item.suport"
:ref=
"'table'+item.routingHeaderId"
class=
"tableCommon"
@
on-selection-change=
"selectionChange(i)"
@
on-select-cancel=
"selectListCancel"
@
on-select-all-cancel=
"selectAllCancel"
@
on-select=
"selectList"
@
on-select-all=
"selectListAll"
>
<template
slot-scope=
"
{ row, index }" slot="counts">
<InputNumber
:max=
"row.totalCount"
:min=
"0"
v-model=
"row.count"
@
on-change=
"inputChange1(i,row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"remarks"
>
<Input
type=
"text"
v-model=
"row.remark"
@
on-change=
"inputChange1(i,row,index)"
/>
</
template
>
</Table>
<div
class=
"mb70"
v-for=
"(item,i) in datas"
:key=
"i"
>
<p
class=
"fwBold"
>
{{
item
.
routingHeader
}}
------
{{
item
.
routingHeaderCode
}}
</p>
<Table
border
:columns=
"cols"
:data=
"item.suport"
:ref=
"'table'+item.routingHeaderId"
class=
"tableCommon"
@
on-selection-change=
"selectionChange(i)"
@
on-select-cancel=
"selectListCancel"
@
on-select-all-cancel=
"selectAllCancel"
@
on-select=
"selectList"
@
on-select-all=
"selectListAll"
>
<template
slot-scope=
"
{ row, index }" slot="counts">
<InputNumber
:max=
"row.totalCount"
:min=
"0"
v-model=
"row.count"
@
on-change=
"inputChange1(i,row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"remarks"
>
<Input
type=
"text"
v-model=
"row.remark"
@
on-change=
"inputChange1(i,row,index)"
/>
</
template
>
</Table>
</div>
<FooterToolbar
v-show=
"footerToolbar"
class=
"ftball"
>
<!--<div class="tip">已选{{selectItems.length}}项</div>-->
<Form
:model=
"orderForm"
:label-width=
"110"
ref=
"formValidate"
:rules=
"ruleValidate"
>
<FormItem
label=
" "
prop=
"QuotationFinishDate"
>
<DatePicker
v-model=
"orderForm.QuotationFinishDate"
type=
"date"
style=
"color:black"
placeholder=
"请选择齐套日期"
@
on-change=
"getTimeQuotationFD"
></DatePicker>
</FormItem>
</Form>
<Button
type=
"primary"
class=
"mr10 ml10"
@
click=
"application"
>
申请配套
</Button>
<Button
@
click=
"cancelBatch"
v-show=
"false"
>
取消
</Button>
<FooterToolbar
v-show=
"footerToolbar"
class=
"ftball pt10"
>
<!--<div class="tip">已选{{selectItems.length}}项</div>-->
<Form
:model=
"orderForm"
:inline=
"true"
:label-width=
"0"
ref=
"formValidate"
:rules=
"ruleValidate"
>
<FormItem
prop=
"QuotationFinishDate"
>
<DatePicker
v-model=
"orderForm.QuotationFinishDate"
type=
"date"
style=
"color:black"
placeholder=
"请选择齐套日期"
@
on-change=
"getTimeQuotationFD"
></DatePicker>
</FormItem>
<FormItem>
<Button
type=
"primary"
class=
"mr10 ml10"
@
click=
"application"
>
申请配套
</Button>
</FormItem>
<FormItem>
<Button
@
click=
"cancelBatch"
v-show=
"false"
>
取消
</Button>
</FormItem>
</Form>
</FooterToolbar>
</div>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"addAccessory"
,
data
()
{
return
{
disabled
:
false
,
deletelModal
:
false
,
curId
:
0
,
editIndex
:
-
1
,
editNum
:
""
,
cols
:
[
{
type
:
"selection"
,
width
:
70
,
align
:
"center"
,
name
:
"addAccessory"
,
data
()
{
return
{
disabled
:
false
,
deletelModal
:
false
,
curId
:
0
,
editIndex
:
-
1
,
editNum
:
""
,
cols
:
[{
type
:
"selection"
,
width
:
70
,
align
:
"center"
,
},
{
key
:
"routingDetailNo"
,
title
:
this
.
l
(
"routingDetailNo"
),
align
:
"left"
,
},
{
key
:
"routingDetailName"
,
title
:
this
.
l
(
"routingDetailName"
),
align
:
"left"
,
},
{
key
:
"nameMaterial"
,
title
:
this
.
l
(
"nameMaterial"
),
align
:
"left"
,
},
{
key
:
"materialNumber"
,
title
:
this
.
l
(
"materialNumber"
),
align
:
"left"
,
},
{
key
:
"totalCount"
,
title
:
this
.
l
(
"totalCount"
),
align
:
"left"
,
},
{
key
:
"count"
,
title
:
this
.
l
(
"count"
),
align
:
"right"
,
slot
:
"counts"
,
width
:
120
,
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
slot
:
"remarks"
,
},
],
orderForm
:
{
QuotationFinishDate
:
""
,
},
datas
:
[],
selectItems
:
[],
footerToolbar
:
true
,
orderId
:
this
.
eid
,
mesCodes
:
this
.
mesCode
,
productNames
:
this
.
productName
,
drawnNumbers
:
this
.
drawnNumber
,
counts
:
this
.
count
,
curArr
:
0
,
//标记当前操作工艺规程列表是否为空
ruleValidate
:
{
QuotationFinishDate
:
[{
required
:
true
,
message
:
"_"
,
trigger
:
"change"
,
},
],
},
tempList
:
[],
cRow
:
null
,
cArr
:
[],
};
},
props
:
{
eid
:
Number
,
mesCode
:
String
,
productName
:
String
,
drawnNumber
:
String
,
count
:
Number
,
},
mounted
()
{
this
.
load
(
this
.
eid
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
load
(
v
)
{
Api
.
matchlist
({
id
:
v
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
r
.
result
.
forEach
((
e
)
=>
{
let
i
=
0
;
e
.
suport
.
forEach
((
el
)
=>
{
el
.
count
=
el
.
totalCount
;
el
.
_checked
=
true
;
el
.
_index
=
i
++
;
});
});
this
.
datas
=
r
.
result
;
//----测试多个工艺start----
// let temre = this.$u.clone(r.result);
// temre.forEach((ele) => {
// ele.routingHeaderId = 281;
// ele.suport.forEach((eles) => {
// eles.routingHeaderId = 281;
// eles.id = eles.id + 20;
// eles.nameMaterial = eles.nameMaterial + "tttt";
// });
// });
// this.datas = r.result.concat(temre);
//----测试多个工艺end----
}
});
},
{
key
:
"routingDetailNo"
,
title
:
this
.
l
(
"routingDetailNo"
),
align
:
"left"
,
getTimeQuotationFD
(
value
)
{
this
.
orderForm
.
QuotationFinishDate
=
value
!=
""
?
this
.
getFormatDateEnd
(
value
)
:
value
;
},
{
key
:
"routingDetailName"
,
title
:
this
.
l
(
"routingDetailName"
),
align
:
"left"
,
getFormatDateEnd
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 23:59:59"
;
return
resDate
;
},
{
key
:
"nameMaterial"
,
title
:
this
.
l
(
"nameMaterial"
),
align
:
"left"
,
p
(
s
)
{
return
s
<
10
?
"0"
+
s
:
s
;
},
{
key
:
"materialNumber"
,
title
:
this
.
l
(
"materialNumber"
),
align
:
"left"
,
selectionChange
(
v
)
{
if
(
this
.
curArr
==
3
)
{
//单条取消选择
this
.
cRow
.
_checked
=
false
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
this
.
cRow
.
_index
,
this
.
cRow
);
}
else
if
(
this
.
curArr
==
1
)
{
//单条选择
this
.
cRow
.
_checked
=
true
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
this
.
cRow
.
_index
,
this
.
cRow
);
}
else
if
(
this
.
curArr
==
2
)
{
//多条选择
this
.
datas
[
v
].
suport
.
forEach
((
ele
,
index
,
array
)
=>
{
ele
.
_checked
=
true
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
index
,
ele
);
});
}
else
if
(
this
.
curArr
==
4
)
{
//多条取消
this
.
datas
[
v
].
suport
.
forEach
((
ele
,
index
,
array
)
=>
{
ele
.
_checked
=
false
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
index
,
ele
);
});
}
},
{
key
:
"totalCount"
,
title
:
this
.
l
(
"totalCount"
),
align
:
"left"
,
selectList
(
items
,
row
)
{
this
.
curArr
=
1
;
this
.
cRow
=
row
;
},
{
key
:
"count"
,
title
:
this
.
l
(
"count"
),
align
:
"right"
,
slot
:
"counts"
,
width
:
120
,
selectListAll
(
items
)
{
this
.
curArr
=
2
;
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
slot
:
"remarks"
,
selectListCancel
(
items
,
row
)
{
this
.
curArr
=
3
;
this
.
cRow
=
row
;
},
],
orderForm
:
{
QuotationFinishDate
:
""
,
},
datas
:
[],
selectItems
:
[],
footerToolbar
:
true
,
orderId
:
this
.
eid
,
mesCodes
:
this
.
mesCode
,
productNames
:
this
.
productName
,
drawnNumbers
:
this
.
drawnNumber
,
counts
:
this
.
count
,
curArr
:
0
,
//标记当前操作工艺规程列表是否为空
ruleValidate
:
{
QuotationFinishDate
:
[
{
required
:
true
,
message
:
"_"
,
trigger
:
"change"
,
},
],
},
tempList
:
[],
cRow
:
null
,
cArr
:
[],
};
},
props
:
{
eid
:
Number
,
mesCode
:
String
,
productName
:
String
,
drawnNumber
:
String
,
count
:
Number
,
},
mounted
()
{
this
.
load
(
this
.
eid
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
load
(
v
)
{
Api
.
matchlist
({
id
:
v
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
r
.
result
.
forEach
((
e
)
=>
{
let
i
=
0
;
e
.
suport
.
forEach
((
el
)
=>
{
el
.
count
=
el
.
totalCount
;
el
.
_checked
=
true
;
el
.
_index
=
i
++
;
selectAllCancel
(
items
)
{
this
.
curArr
=
4
;
},
delById
(
arr
,
id
)
{
//取消删除某行数据
arr
.
forEach
((
element
)
=>
{
if
(
element
.
id
==
id
)
{
if
(
arr
.
indexOf
(
element
)
>
-
1
)
{
var
i
=
arr
.
indexOf
(
element
);
arr
.
splice
(
i
,
1
);
}
}
});
});
this
.
datas
=
r
.
result
;
//----测试多个工艺start----
// let temre = this.$u.clone(r.result);
// temre.forEach((ele) => {
// ele.routingHeaderId = 281;
// ele.suport.forEach((eles) => {
// eles.routingHeaderId = 281;
// eles.id = eles.id + 20;
// eles.nameMaterial = eles.nameMaterial + "tttt";
// });
// });
// this.datas = r.result.concat(temre);
//----测试多个工艺end----
}
});
},
getTimeQuotationFD
(
value
)
{
this
.
orderForm
.
QuotationFinishDate
=
value
!=
""
?
this
.
getFormatDateEnd
(
value
)
:
value
;
},
getFormatDateEnd
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 23:59:59"
;
return
resDate
;
},
p
(
s
)
{
return
s
<
10
?
"0"
+
s
:
s
;
},
selectionChange
(
v
)
{
if
(
this
.
curArr
==
3
)
{
//单条取消选择
this
.
cRow
.
_checked
=
false
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
this
.
cRow
.
_index
,
this
.
cRow
);
}
else
if
(
this
.
curArr
==
1
)
{
//单条选择
this
.
cRow
.
_checked
=
true
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
this
.
cRow
.
_index
,
this
.
cRow
);
}
else
if
(
this
.
curArr
==
2
)
{
//多条选择
this
.
datas
[
v
].
suport
.
forEach
((
ele
,
index
,
array
)
=>
{
ele
.
_checked
=
true
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
index
,
ele
);
});
}
else
if
(
this
.
curArr
==
4
)
{
//多条取消
this
.
datas
[
v
].
suport
.
forEach
((
ele
,
index
,
array
)
=>
{
ele
.
_checked
=
false
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
index
,
ele
);
});
}
},
selectList
(
items
,
row
)
{
this
.
curArr
=
1
;
this
.
cRow
=
row
;
},
selectListAll
(
items
)
{
this
.
curArr
=
2
;
},
selectListCancel
(
items
,
row
)
{
this
.
curArr
=
3
;
this
.
cRow
=
row
;
},
selectAllCancel
(
items
)
{
this
.
curArr
=
4
;
},
delById
(
arr
,
id
)
{
//取消删除某行数据
arr
.
forEach
((
element
)
=>
{
if
(
element
.
id
==
id
)
{
if
(
arr
.
indexOf
(
element
)
>
-
1
)
{
var
i
=
arr
.
indexOf
(
element
);
arr
.
splice
(
i
,
1
);
}
}
});
return
arr
;
},
delSame
(
arr
)
{
//数组根据id去重复
var
newArr
=
[];
var
arrId
=
[];
for
(
var
item
of
arr
)
{
if
(
arrId
.
indexOf
(
item
[
"id"
])
==
-
1
)
{
arrId
.
push
(
item
[
"id"
]);
newArr
.
push
(
item
);
}
}
return
newArr
;
},
delByHeadId
(
arr
,
id
)
{
//根据工艺规程id进行去除过滤
let
arrs
=
arr
.
filter
((
item
,
i
)
=>
{
return
item
.
routingHeaderId
!=
id
;
});
return
arrs
;
},
inputChange1
(
i
,
row
,
index
)
{
//输入数量
this
.
$set
(
this
.
datas
[
i
].
suport
,
index
,
row
);
},
application
()
{
//申请配套操作
this
.
$refs
[
"formValidate"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
temItems
=
[];
let
temSelectItems
=
this
.
$u
.
clone
(
this
.
datas
);
temSelectItems
.
forEach
((
e
)
=>
{
e
.
suport
.
forEach
((
ele
)
=>
{
if
(
ele
.
_checked
&&
ele
.
count
>
0
)
{
let
temObj
=
{
routingHeaderId
:
ele
.
routingHeaderId
,
routingDeatilId
:
ele
.
routingDetailId
,
routingDetailName
:
ele
.
routingDetailName
,
routingDetailSeq
:
ele
.
routingDetailNo
,
materialId
:
ele
.
materialId
,
materialName
:
ele
.
nameMaterial
,
materialNumber
:
ele
.
materialNumber
,
needCount
:
ele
.
totalCount
,
count
:
ele
.
count
,
//
remark
:
ele
.
remark
?
ele
.
remark
:
""
,
};
temItems
.
push
(
temObj
);
}
return
arr
;
},
delSame
(
arr
)
{
//数组根据id去重复
var
newArr
=
[];
var
arrId
=
[];
for
(
var
item
of
arr
)
{
if
(
arrId
.
indexOf
(
item
[
"id"
])
==
-
1
)
{
arrId
.
push
(
item
[
"id"
]);
newArr
.
push
(
item
);
}
}
return
newArr
;
},
delByHeadId
(
arr
,
id
)
{
//根据工艺规程id进行去除过滤
let
arrs
=
arr
.
filter
((
item
,
i
)
=>
{
return
item
.
routingHeaderId
!=
id
;
});
});
let
parms
=
{
main
:
{
orderId
:
this
.
orderId
,
orderCode
:
this
.
mesCode
,
productName
:
this
.
productNames
,
drawnNumber
:
this
.
drawnNumbers
,
count
:
this
.
counts
,
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
finishDate
:
this
.
orderForm
.
QuotationFinishDate
,
},
items
:
temItems
,
};
if
(
parms
.
items
.
length
==
0
)
{
this
.
$Message
.
error
(
"请输入申请数量"
);
}
else
{
Api
.
supportmainCreate
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"申请成功"
);
//this.$emit("cancel");
this
.
$emit
(
"on-ok"
);
}
return
arrs
;
},
inputChange1
(
i
,
row
,
index
)
{
//输入数量
this
.
$set
(
this
.
datas
[
i
].
suport
,
index
,
row
);
},
application
()
{
//申请配套操作
this
.
$refs
[
"formValidate"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
temItems
=
[];
let
temSelectItems
=
this
.
$u
.
clone
(
this
.
datas
);
temSelectItems
.
forEach
((
e
)
=>
{
e
.
suport
.
forEach
((
ele
)
=>
{
if
(
ele
.
_checked
&&
ele
.
count
>
0
)
{
let
temObj
=
{
routingHeaderId
:
ele
.
routingHeaderId
,
routingDeatilId
:
ele
.
routingDetailId
,
routingDetailName
:
ele
.
routingDetailName
,
routingDetailSeq
:
ele
.
routingDetailNo
,
materialId
:
ele
.
materialId
,
materialName
:
ele
.
nameMaterial
,
materialNumber
:
ele
.
materialNumber
,
needCount
:
ele
.
totalCount
,
count
:
ele
.
count
,
//
remark
:
ele
.
remark
?
ele
.
remark
:
""
,
};
temItems
.
push
(
temObj
);
}
});
});
let
parms
=
{
main
:
{
orderId
:
this
.
orderId
,
orderCode
:
this
.
mesCode
,
productName
:
this
.
productNames
,
drawnNumber
:
this
.
drawnNumbers
,
count
:
this
.
counts
,
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
finishDate
:
this
.
orderForm
.
QuotationFinishDate
,
},
items
:
temItems
,
};
if
(
parms
.
items
.
length
==
0
)
{
this
.
$Message
.
error
(
"请输入申请数量"
);
}
else
{
Api
.
supportmainCreate
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"申请成功"
);
//this.$emit("cancel");
this
.
$emit
(
"on-ok"
);
}
});
}
}
});
}
}
});
},
cancelBatch
()
{
//取消选择
this
.
selectItems
=
[];
let
temd
=
this
.
$u
.
clone
(
this
.
datas
);
temd
.
forEach
((
res
)
=>
{
this
.
$refs
[
"table"
+
res
.
routingHeaderId
][
0
].
selectAll
(
false
);
});
this
.
footerToolbar
=
false
;
},
l
(
key
)
{
let
vkey
=
"support_item"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
cancelBatch
()
{
//取消选择
this
.
selectItems
=
[];
let
temd
=
this
.
$u
.
clone
(
this
.
datas
);
temd
.
forEach
((
res
)
=>
{
this
.
$refs
[
"table"
+
res
.
routingHeaderId
][
0
].
selectAll
(
false
);
});
this
.
footerToolbar
=
false
;
},
l
(
key
)
{
let
vkey
=
"support_item"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
},
},
},
};
</
script
>
pages/aps/plan/api.js
View file @
8ec6fa8a
...
...
@@ -56,6 +56,10 @@ export default {
matchdetaillist
(
params
){
//配套审核单列表
return
Api
.
get
(
`
${
technologyUrl
}
materiallist/matchdetaillist`
,
params
);
},
//物料领用
materialreceiveCreate
(
params
){
//配套审核单列表
return
Api
.
post
(
`
${
technologyUrl
}
materialreceive/create`
,
params
);
},
}
\ No newline at end of file
pages/aps/plan/editAccessory.vue
View file @
8ec6fa8a
<
template
>
<div
class=
"h100 table-content
"
>
<div
class=
"h100 table-content1
"
>
<p
class=
"mb10"
>
订单编号:
{{
mesCodes
}}
<span
class=
"ml20"
>
产品名称:
{{
productNames
}}
</span>
<span
class=
"ml20"
>
生产数量:
{{
counts
}}
</span>
<span
class=
"fr mr20"
v-if=
"false"
>
<a
href=
"javascript:;"
>
出库单
</a>
</span>
<span
class=
"fr mr20"
>
<a
href=
"javascript:;"
@
click=
"openAcc"
>
申请单
</a>
</span>
订单编号:
{{
mesCodes
}}
<span
class=
"ml20"
>
产品名称:
{{
productNames
}}
</span>
<span
class=
"ml20"
>
生产数量:
{{
counts
}}
</span>
<span
class=
"fr mr20"
v-if=
"false"
>
<a
href=
"javascript:;"
>
出库单
</a>
</span>
<span
class=
"fr mr20"
>
<a
href=
"javascript:;"
@
click=
"openAcc"
>
申请单
</a>
</span>
</p>
<div
class=
"mb20"
v-for=
"(item,i) in datas"
:key=
"i"
>
<p
class=
"fwBold"
>
{{
item
.
routingHeader
}}
------
{{
item
.
routingHeaderCode
}}
</p>
<Table
border
:columns=
"cols"
:data=
"item.suport"
:ref=
"'table'+item.routingHeaderId"
class=
"tableCommon"
@
on-selection-change=
"selectionChange(i)"
@
on-select-cancel=
"selectListCancel"
@
on-select-all-cancel=
"selectAllCancel"
@
on-select=
"selectList"
@
on-select-all=
"selectListAll"
>
<template
slot-scope=
"
{ row, index }" slot="counts">
<InputNumber
:max=
"row.totalCount-row.applicationNumber"
:min=
"0"
v-model=
"row.count"
@
on-change=
"inputChange1(i,row,index)"
:disabled=
"row._disabled"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"remarks"
>
<Input
type=
"text"
v-model=
"row.remark"
@
on-change=
"inputChange1(i,row,index)"
:disabled=
"row._disabled"
/>
</
template
>
</Table>
<div
class=
"mb70"
v-for=
"(item,i) in datas"
:key=
"i"
>
<p
class=
"fwBold"
>
{{
item
.
routingHeader
}}
------
{{
item
.
routingHeaderCode
}}
</p>
<Table
border
:columns=
"cols"
:data=
"item.suport"
:ref=
"'table'+item.routingHeaderId"
class=
"tableCommon"
@
on-selection-change=
"selectionChange(i)"
@
on-select-cancel=
"selectListCancel"
@
on-select-all-cancel=
"selectAllCancel"
@
on-select=
"selectList"
@
on-select-all=
"selectListAll"
>
<template
slot-scope=
"
{ row, index }" slot="counts">
<InputNumber
:max=
"row.totalCount-row.applicationNumber"
:min=
"0"
v-model=
"row.count"
@
on-change=
"inputChange1(i,row,index)"
:disabled=
"row._disabled"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"remarks"
>
<Input
type=
"text"
v-model=
"row.remark"
@
on-change=
"inputChange1(i,row,index)"
:disabled=
"row._disabled"
/>
</
template
>
</Table>
</div>
<FooterToolbar
v-show=
"footerToolbar"
class=
"ftball"
>
<!--<div class="tip">已选{{selectItems.length}}项</div>-->
<Form
:model=
"orderForm"
:label-width=
"110"
ref=
"formValidate"
:rules=
"ruleValidate"
>
<FormItem
label=
" "
prop=
"QuotationFinishDate"
>
<DatePicker
v-model=
"orderForm.QuotationFinishDate"
type=
"date"
style=
"color:black"
placeholder=
"请选择齐套日期"
@
on-change=
"getTimeQuotationFD"
></DatePicker>
</FormItem>
</Form>
<Button
type=
"primary"
class=
"mr10 ml10"
@
click=
"application"
>
申请配套
</Button>
<FooterToolbar
v-show=
"footerToolbar"
class=
"ftball pt10"
>
<!--<div class="tip">已选{{selectItems.length}}项</div>-->
<Form
:model=
"orderForm"
:inline=
"true"
:label-width=
"0"
ref=
"formValidate"
:rules=
"ruleValidate"
>
<FormItem
prop=
"QuotationFinishDate"
>
<DatePicker
v-model=
"orderForm.QuotationFinishDate"
type=
"date"
style=
"color:black"
placeholder=
"请选择齐套日期"
@
on-change=
"getTimeQuotationFD"
></DatePicker>
</FormItem>
<FormItem
l
><Button
type=
"primary"
class=
"mr10 ml10"
@
click=
"application"
>
申请配套
</Button></FormItem>
</Form>
</FooterToolbar>
<Modal
v-model=
"modalAccessoryList"
:title=
"title"
fullscreen
footer-hide
>
<component
:is=
"detailAcc"
:eid=
"orderId"
:mesCode=
"mesCodes"
:productName=
"productNames"
:drawnNumber=
"drawnNumber"
:count=
"counts"
@
on-close=
"cancel"
@
on-ok=
"onOk"
/>
<component
:is=
"detailAcc"
:eid=
"orderId"
:mesCode=
"mesCodes"
:productName=
"productNames"
:drawnNumber=
"drawnNumber"
:count=
"counts"
@
on-close=
"cancel"
@
on-ok=
"onOk"
/>
</Modal>
<Modal
v-model=
"modalAccSet"
title=
"临时设置"
footer-hide
width=
"800"
>
<Form
:model=
"entity"
:label-width=
"110"
ref=
"formValidateSet"
:rules=
"ruleValidate"
>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"工序"
>
{{entity.routingDetailName}}
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"物料名"
>
{{entity.materialName}}
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"物料编号"
>
{{entity.materialNumber}}
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"需求数量"
>
{{entity.needCount}}
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"已申请"
>
{{entity.applicationNumber}}
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"可再申请"
prop=
"count"
>
<InputNumber
:max=
"entity.needCount-entity.applicationNumber"
:min=
"0"
v-model=
"entity.count"
/>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"齐套日期"
prop=
"finishDate"
>
<DatePicker
v-model=
"entity.finishDate"
type=
"date"
placeholder=
"请选择齐套日期"
@
on-change=
"getTimeFinish"
></DatePicker>
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
label=
"备注"
>
<Input
type=
"text"
v-model=
"entity.remark"
/>
</FormItem>
</Col>
<Col
span=
"24"
>
<p
class=
"fr"
>
<Button
type=
"primary"
class=
"mr10 ml10"
@
click=
"application1"
>
申请配套
</Button>
<Button
@
click=
"canelSet"
>
取消
</Button>
</p>
</Col>
</Row>
</Form>
<Form
:model=
"entity"
:label-width=
"110"
ref=
"formValidateSet"
:rules=
"ruleValidate"
>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"工序"
>
{{entity.routingDetailName}}
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"物料名"
>
{{entity.materialName}}
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"物料编号"
>
{{entity.materialNumber}}
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"需求数量"
>
{{entity.needCount}}
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"已申请"
>
{{entity.applicationNumber}}
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"可再申请"
prop=
"count"
>
<InputNumber
:max=
"entity.needCount-entity.applicationNumber"
:min=
"0"
v-model=
"entity.count"
/>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"齐套日期"
prop=
"finishDate"
>
<DatePicker
v-model=
"entity.finishDate"
type=
"date"
placeholder=
"请选择齐套日期"
@
on-change=
"getTimeFinish"
></DatePicker>
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
label=
"备注"
>
<Input
type=
"text"
v-model=
"entity.remark"
/>
</FormItem>
</Col>
<Col
span=
"24"
>
<p
class=
"fr"
>
<Button
type=
"primary"
class=
"mr10 ml10"
@
click=
"application1"
>
申请配套
</Button>
<Button
@
click=
"canelSet"
>
取消
</Button>
</p>
</Col>
</Row>
</Form>
</Modal>
</div>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"addAccessory"
,
data
()
{
return
{
title
:
""
,
detailAcc
:
null
,
modalAccessoryList
:
false
,
modalAccSet
:
false
,
disabled
:
false
,
deletelModal
:
false
,
curId
:
0
,
editIndex
:
-
1
,
editNum
:
""
,
cols
:
[
{
type
:
"selection"
,
width
:
70
,
align
:
"center"
,
name
:
"addAccessory"
,
data
()
{
return
{
title
:
""
,
detailAcc
:
null
,
modalAccessoryList
:
false
,
modalAccSet
:
false
,
disabled
:
false
,
deletelModal
:
false
,
curId
:
0
,
editIndex
:
-
1
,
editNum
:
""
,
cols
:
[{
type
:
"selection"
,
width
:
70
,
align
:
"center"
,
},
{
key
:
"routingDetailNo"
,
title
:
this
.
l
(
"routingDetailNo"
),
align
:
"left"
,
},
{
key
:
"routingDetailName"
,
title
:
this
.
l
(
"routingDetailName"
),
align
:
"left"
,
},
{
key
:
"nameMaterial"
,
title
:
this
.
l
(
"nameMaterial"
),
align
:
"left"
,
},
{
key
:
"materialNumber"
,
title
:
this
.
l
(
"materialNumber"
),
align
:
"left"
,
},
{
key
:
"totalCount"
,
title
:
this
.
l
(
"totalCount"
),
align
:
"left"
,
},
{
key
:
"count"
,
title
:
this
.
l
(
"count1"
),
align
:
"right"
,
slot
:
"counts"
,
width
:
120
,
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
slot
:
"remarks"
,
},
{
key
:
"action"
,
title
:
"操作"
,
align
:
"center"
,
width
:
"120"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
setAcc
(
params
.
row
),
},
},
params
.
row
.
_disabled
&&
params
.
row
.
totalCount
-
params
.
row
.
applicationNumber
>
0
?
"临时申请"
:
""
);
},
},
],
orderForm
:
{
QuotationFinishDate
:
""
,
},
datas
:
[],
selectItems
:
[],
footerToolbar
:
true
,
orderId
:
this
.
eid
,
mesCodes
:
this
.
mesCode
,
productNames
:
this
.
productName
,
drawnNumbers
:
this
.
drawnNumber
,
counts
:
this
.
count
,
curArr
:
0
,
//标记当前操作工艺规程列表是否为空
ruleValidate
:
{
QuotationFinishDate
:
[{
required
:
true
,
message
:
"_"
,
trigger
:
"change"
,
},
],
finishDate
:
[{
required
:
true
,
message
:
"请选择齐套日期"
,
trigger
:
"change"
,
},
],
count
:
[{
required
:
true
,
message
:
"请输入申请数量"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
},
tempList
:
[],
cRow
:
null
,
cArr
:
[],
entity
:
{
routingHeaderId
:
null
,
routingDeatilId
:
null
,
routingDetailName
:
""
,
routingDetailSeq
:
null
,
materialId
:
null
,
materialName
:
""
,
materialNumber
:
""
,
needCount
:
0
,
applicationNumber
:
0
,
count
:
0
,
remark
:
""
,
finishDate
:
""
,
},
};
},
props
:
{
eid
:
Number
,
mesCode
:
String
,
productName
:
String
,
drawnNumber
:
String
,
count
:
Number
,
},
mounted
()
{
this
.
load
(
this
.
eid
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
load
(
v
)
{
Api
.
matchdetaillist
({
id
:
v
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
r
.
result
.
forEach
((
e
)
=>
{
let
i
=
0
;
e
.
suport
.
forEach
((
el
)
=>
{
el
.
count
=
el
.
totalCount
-
el
.
applicationNumber
;
if
(
el
.
applicationNumber
>
0
)
{
el
.
_checked
=
false
;
el
.
_disabled
=
true
;
}
else
{
el
.
_checked
=
true
;
el
.
_disabled
=
false
;
}
el
.
_index
=
i
++
;
});
});
this
.
datas
=
r
.
result
;
//----测试多个工艺start
// let temre = this.$u.clone(r.result);
// temre.forEach((ele) => {
// ele.routingHeaderId = 281;
// ele.suport.forEach((eles) => {
// eles.routingHeaderId = 281;
// eles.id = eles.id + 20;
// eles.nameMaterial = eles.nameMaterial + "tttt";
// });
// });
// this.datas = r.result.concat(temre);
//----测试多个工艺end
}
});
},
{
key
:
"routingDetailNo"
,
title
:
this
.
l
(
"routingDetailNo"
),
align
:
"left"
,
getTimeQuotationFD
(
value
)
{
this
.
orderForm
.
QuotationFinishDate
=
value
!=
""
?
this
.
getFormatDateEnd
(
value
)
:
value
;
},
{
key
:
"routingDetailName"
,
title
:
this
.
l
(
"routingDetailName"
),
align
:
"left"
,
getTimeFinish
(
value
)
{
this
.
entity
.
finishDate
=
value
!=
""
?
this
.
getFormatDateEnd
(
value
)
:
value
;
},
{
key
:
"nameMaterial"
,
title
:
this
.
l
(
"nameMaterial"
),
align
:
"left"
,
getFormatDateEnd
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 23:59:59"
;
return
resDate
;
},
{
key
:
"materialNumber"
,
title
:
this
.
l
(
"materialNumber"
),
align
:
"left"
,
p
(
s
)
{
return
s
<
10
?
"0"
+
s
:
s
;
},
{
key
:
"totalCount"
,
title
:
this
.
l
(
"totalCount"
),
align
:
"left"
,
selectionChange
(
v
)
{
//根据状态修改this.datas数组数据
if
(
this
.
curArr
==
3
)
{
//单条取消选择
this
.
cRow
.
_checked
=
false
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
this
.
cRow
.
_index
,
this
.
cRow
);
}
else
if
(
this
.
curArr
==
1
)
{
//单条选择
this
.
cRow
.
_checked
=
true
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
this
.
cRow
.
_index
,
this
.
cRow
);
}
else
if
(
this
.
curArr
==
2
)
{
//多条选择
this
.
datas
[
v
].
suport
.
forEach
((
ele
,
index
,
array
)
=>
{
if
(
ele
.
_disabled
)
{
ele
.
_checked
=
false
;
}
else
{
ele
.
_checked
=
true
;
}
this
.
$set
(
this
.
datas
[
v
].
suport
,
index
,
ele
);
});
}
else
if
(
this
.
curArr
==
4
)
{
//多条取消
this
.
datas
[
v
].
suport
.
forEach
((
ele
,
index
,
array
)
=>
{
ele
.
_checked
=
false
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
index
,
ele
);
});
}
},
{
key
:
"count"
,
title
:
this
.
l
(
"count1"
),
align
:
"right"
,
slot
:
"counts"
,
width
:
120
,
selectList
(
items
,
row
)
{
this
.
curArr
=
1
;
this
.
cRow
=
row
;
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
slot
:
"remarks"
,
selectListAll
(
items
)
{
this
.
curArr
=
2
;
},
{
key
:
"action"
,
title
:
"操作"
,
align
:
"center"
,
width
:
"120"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
setAcc
(
params
.
row
),
},
},
params
.
row
.
_disabled
&&
params
.
row
.
totalCount
-
params
.
row
.
applicationNumber
>
0
?
"临时申请"
:
""
);
},
selectListCancel
(
items
,
row
)
{
this
.
curArr
=
3
;
this
.
cRow
=
row
;
},
],
orderForm
:
{
QuotationFinishDate
:
""
,
},
datas
:
[],
selectItems
:
[],
footerToolbar
:
true
,
orderId
:
this
.
eid
,
mesCodes
:
this
.
mesCode
,
productNames
:
this
.
productName
,
drawnNumbers
:
this
.
drawnNumber
,
counts
:
this
.
count
,
curArr
:
0
,
//标记当前操作工艺规程列表是否为空
ruleValidate
:
{
QuotationFinishDate
:
[
{
required
:
true
,
message
:
"_"
,
trigger
:
"change"
,
},
],
finishDate
:
[
{
required
:
true
,
message
:
"请选择齐套日期"
,
trigger
:
"change"
,
},
],
count
:
[
{
required
:
true
,
message
:
"请输入申请数量"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
},
tempList
:
[],
cRow
:
null
,
cArr
:
[],
entity
:
{
routingHeaderId
:
null
,
routingDeatilId
:
null
,
routingDetailName
:
""
,
routingDetailSeq
:
null
,
materialId
:
null
,
materialName
:
""
,
materialNumber
:
""
,
needCount
:
0
,
applicationNumber
:
0
,
count
:
0
,
remark
:
""
,
finishDate
:
""
,
},
};
},
props
:
{
eid
:
Number
,
mesCode
:
String
,
productName
:
String
,
drawnNumber
:
String
,
count
:
Number
,
},
mounted
()
{
this
.
load
(
this
.
eid
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
load
(
v
)
{
Api
.
matchdetaillist
({
id
:
v
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
r
.
result
.
forEach
((
e
)
=>
{
let
i
=
0
;
e
.
suport
.
forEach
((
el
)
=>
{
el
.
count
=
el
.
totalCount
-
el
.
applicationNumber
;
if
(
el
.
applicationNumber
>
0
)
{
el
.
_checked
=
false
;
el
.
_disabled
=
true
;
}
else
{
el
.
_checked
=
true
;
el
.
_disabled
=
false
;
}
el
.
_index
=
i
++
;
});
});
this
.
datas
=
r
.
result
;
//----测试多个工艺start
// let temre = this.$u.clone(r.result);
// temre.forEach((ele) => {
// ele.routingHeaderId = 281;
// ele.suport.forEach((eles) => {
// eles.routingHeaderId = 281;
// eles.id = eles.id + 20;
// eles.nameMaterial = eles.nameMaterial + "tttt";
// });
// });
// this.datas = r.result.concat(temre);
//----测试多个工艺end
}
});
},
getTimeQuotationFD
(
value
)
{
this
.
orderForm
.
QuotationFinishDate
=
value
!=
""
?
this
.
getFormatDateEnd
(
value
)
:
value
;
},
getTimeFinish
(
value
)
{
this
.
entity
.
finishDate
=
value
!=
""
?
this
.
getFormatDateEnd
(
value
)
:
value
;
},
getFormatDateEnd
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 23:59:59"
;
return
resDate
;
},
p
(
s
)
{
return
s
<
10
?
"0"
+
s
:
s
;
},
selectionChange
(
v
)
{
//根据状态修改this.datas数组数据
if
(
this
.
curArr
==
3
)
{
//单条取消选择
this
.
cRow
.
_checked
=
false
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
this
.
cRow
.
_index
,
this
.
cRow
);
}
else
if
(
this
.
curArr
==
1
)
{
//单条选择
this
.
cRow
.
_checked
=
true
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
this
.
cRow
.
_index
,
this
.
cRow
);
}
else
if
(
this
.
curArr
==
2
)
{
//多条选择
this
.
datas
[
v
].
suport
.
forEach
((
ele
,
index
,
array
)
=>
{
if
(
ele
.
_disabled
)
{
ele
.
_checked
=
false
;
}
else
{
ele
.
_checked
=
true
;
}
this
.
$set
(
this
.
datas
[
v
].
suport
,
index
,
ele
);
});
}
else
if
(
this
.
curArr
==
4
)
{
//多条取消
this
.
datas
[
v
].
suport
.
forEach
((
ele
,
index
,
array
)
=>
{
ele
.
_checked
=
false
;
this
.
$set
(
this
.
datas
[
v
].
suport
,
index
,
ele
);
});
}
},
selectList
(
items
,
row
)
{
this
.
curArr
=
1
;
this
.
cRow
=
row
;
},
selectListAll
(
items
)
{
this
.
curArr
=
2
;
},
selectListCancel
(
items
,
row
)
{
this
.
curArr
=
3
;
this
.
cRow
=
row
;
},
selectAllCancel
(
items
)
{
this
.
curArr
=
4
;
},
inputChange1
(
i
,
row
,
index
)
{
//输入数量
this
.
$set
(
this
.
datas
[
i
].
suport
,
index
,
row
);
},
application
()
{
//申请配套操作
this
.
$refs
[
"formValidate"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
temItems
=
[];
let
temSelectItems
=
this
.
$u
.
clone
(
this
.
datas
);
temSelectItems
.
forEach
((
e
)
=>
{
e
.
suport
.
forEach
((
ele
)
=>
{
if
(
ele
.
_checked
&&
ele
.
count
>
0
)
{
let
temObj
=
{
routingHeaderId
:
ele
.
routingHeaderId
,
routingDeatilId
:
ele
.
routingDetailId
,
routingDetailName
:
ele
.
routingDetailName
,
routingDetailSeq
:
ele
.
routingDetailNo
,
materialId
:
ele
.
materialId
,
materialName
:
ele
.
nameMaterial
,
materialNumber
:
ele
.
materialNumber
,
needCount
:
ele
.
totalCount
,
count
:
ele
.
count
,
//
remark
:
ele
.
remark
?
ele
.
remark
:
""
,
};
temItems
.
push
(
temObj
);
}
selectAllCancel
(
items
)
{
this
.
curArr
=
4
;
},
inputChange1
(
i
,
row
,
index
)
{
//输入数量
this
.
$set
(
this
.
datas
[
i
].
suport
,
index
,
row
);
},
application
()
{
//申请配套操作
this
.
$refs
[
"formValidate"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
temItems
=
[];
let
temSelectItems
=
this
.
$u
.
clone
(
this
.
datas
);
temSelectItems
.
forEach
((
e
)
=>
{
e
.
suport
.
forEach
((
ele
)
=>
{
if
(
ele
.
_checked
&&
ele
.
count
>
0
)
{
let
temObj
=
{
routingHeaderId
:
ele
.
routingHeaderId
,
routingDeatilId
:
ele
.
routingDetailId
,
routingDetailName
:
ele
.
routingDetailName
,
routingDetailSeq
:
ele
.
routingDetailNo
,
materialId
:
ele
.
materialId
,
materialName
:
ele
.
nameMaterial
,
materialNumber
:
ele
.
materialNumber
,
needCount
:
ele
.
totalCount
,
count
:
ele
.
count
,
//
remark
:
ele
.
remark
?
ele
.
remark
:
""
,
};
temItems
.
push
(
temObj
);
}
});
});
let
parms
=
{
main
:
{
orderId
:
this
.
orderId
,
productName
:
this
.
productNames
,
drawnNumber
:
this
.
drawnNumbers
,
count
:
this
.
counts
,
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
finishDate
:
this
.
orderForm
.
QuotationFinishDate
,
orderCode
:
this
.
mesCode
,
},
items
:
temItems
,
};
//alert(JSON.stringify(parms.items));
if
(
parms
.
items
.
length
==
0
)
{
this
.
$Message
.
error
(
"请输入申请数量"
);
}
else
{
Api
.
supportmainCreate
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"申请成功"
);
this
.
$emit
(
"on-ok"
);
}
});
}
}
});
});
let
parms
=
{
main
:
{
orderId
:
this
.
orderId
,
productName
:
this
.
productNames
,
drawnNumber
:
this
.
drawnNumbers
,
count
:
this
.
counts
,
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
finishDate
:
this
.
orderForm
.
QuotationFinishDate
,
orderCode
:
this
.
mesCode
,
},
items
:
temItems
,
};
//alert(JSON.stringify(parms.items));
if
(
parms
.
items
.
length
==
0
)
{
this
.
$Message
.
error
(
"请输入申请数量"
);
}
else
{
Api
.
supportmainCreate
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"申请成功"
);
this
.
$emit
(
"on-ok"
);
}
},
application1
()
{
//临时申请配套操作
this
.
$refs
[
"formValidateSet"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
temItems
=
[];
let
temObj
=
{
routingHeaderId
:
this
.
entity
.
routingHeaderId
,
routingDeatilId
:
this
.
entity
.
routingDeatilId
,
routingDetailName
:
this
.
entity
.
routingDetailName
,
routingDetailSeq
:
this
.
entity
.
routingDetailSeq
,
materialId
:
this
.
entity
.
materialId
,
materialName
:
this
.
entity
.
materialName
,
materialNumber
:
this
.
entity
.
materialNumber
,
needCount
:
this
.
entity
.
needCount
,
count
:
this
.
entity
.
count
,
remark
:
this
.
entity
.
remark
,
};
temItems
.
push
(
temObj
);
let
parms
=
{
main
:
{
orderId
:
this
.
orderId
,
productName
:
this
.
productNames
,
drawnNumber
:
this
.
drawnNumbers
,
count
:
this
.
counts
,
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
finishDate
:
this
.
entity
.
finishDate
,
orderCode
:
this
.
mesCode
,
},
items
:
temItems
,
};
//alert(JSON.stringify(parms));
Api
.
supportmainCreate
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"申请成功"
);
this
.
canelSet
();
this
.
load
(
this
.
eid
);
}
});
}
});
}
}
});
},
setAcc
(
row
)
{
//临时设置
row
.
materialName
=
row
.
nameMaterial
;
row
.
needCount
=
row
.
totalCount
;
row
.
routingDetailSeq
=
row
.
routingDetailNo
;
row
.
routingDeatilId
=
row
.
routingDetailId
;
this
.
entity
=
row
;
this
.
modalAccSet
=
true
;
},
openAcc
()
{
//打开申请单页面
this
.
title
=
"申请单"
;
this
.
detailAcc
=
()
=>
import
(
"./detailAccessory"
);
this
.
modalAccessoryList
=
true
;
},
cancel
()
{
this
.
modalAccessoryList
=
false
;
},
canelSet
()
{
//临时设置取消
this
.
modalAccSet
=
false
;
},
onOk
()
{
//重新加载页面数据
this
.
load
(
this
.
eid
);
},
l
(
key
)
{
let
vkey
=
"support_item"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
application1
()
{
//临时申请配套操作
this
.
$refs
[
"formValidateSet"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
temItems
=
[];
let
temObj
=
{
routingHeaderId
:
this
.
entity
.
routingHeaderId
,
routingDeatilId
:
this
.
entity
.
routingDeatilId
,
routingDetailName
:
this
.
entity
.
routingDetailName
,
routingDetailSeq
:
this
.
entity
.
routingDetailSeq
,
materialId
:
this
.
entity
.
materialId
,
materialName
:
this
.
entity
.
materialName
,
materialNumber
:
this
.
entity
.
materialNumber
,
needCount
:
this
.
entity
.
needCount
,
count
:
this
.
entity
.
count
,
remark
:
this
.
entity
.
remark
,
};
temItems
.
push
(
temObj
);
let
parms
=
{
main
:
{
orderId
:
this
.
orderId
,
productName
:
this
.
productNames
,
drawnNumber
:
this
.
drawnNumbers
,
count
:
this
.
counts
,
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
finishDate
:
this
.
entity
.
finishDate
,
orderCode
:
this
.
mesCode
,
},
items
:
temItems
,
};
//alert(JSON.stringify(parms));
Api
.
supportmainCreate
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"申请成功"
);
this
.
canelSet
();
this
.
load
(
this
.
eid
);
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
});
}
});
},
setAcc
(
row
)
{
//临时设置
row
.
materialName
=
row
.
nameMaterial
;
row
.
needCount
=
row
.
totalCount
;
row
.
routingDetailSeq
=
row
.
routingDetailNo
;
row
.
routingDeatilId
=
row
.
routingDetailId
;
this
.
entity
=
row
;
this
.
modalAccSet
=
true
;
},
openAcc
()
{
//打开申请单页面
this
.
title
=
"申请单"
;
this
.
detailAcc
=
()
=>
import
(
"./detailAccessory"
);
this
.
modalAccessoryList
=
true
;
},
cancel
()
{
this
.
modalAccessoryList
=
false
;
},
canelSet
()
{
//临时设置取消
this
.
modalAccSet
=
false
;
},
onOk
()
{
//重新加载页面数据
this
.
load
(
this
.
eid
);
},
l
(
key
)
{
let
vkey
=
"support_item"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
},
},
},
};
</
script
>
pages/produce/execute/MaterialCollec/index.vue
View file @
8ec6fa8a
<
template
>
<div
class=
"wu_bg"
>
<div
class=
"star"
v-if=
"!starmodal"
>
<a
class=
"start"
@
click=
"starFun"
>
物料领用
</a>
</div>
<div
class=
"h100 table-content1"
>
<p
class=
"mb10 ml40 mr40"
>
订单编号:
{{
entity
.
mesCode
}}
<span
class=
"ml20"
>
产品名称:
{{
entity
.
productName
}}
</span>
<span
class=
"ml20"
>
生产数量:
{{
entity
.
count
}}
</span>
<span
class=
"ml20"
v-show=
"false"
>
物料状态:
</span>
</p>
<div
class=
"mb70"
>
<div
class=
"mb20 ml40 mr40"
v-for=
"(item,i) in datas"
:key=
"i"
>
<p
class=
"fwBold"
>
{{
item
.
routingHeader
}}
------
{{
item
.
routingHeaderCode
}}
</p>
<Table
border
:columns=
"cols"
:data=
"item.suport"
:ref=
"'table'+item.routingHeaderId"
class=
"tableCommon"
>
<template
slot-scope=
"
{ row, index }" slot="counts4">
<InputNumber
:max=
"row.outStockNumber-row.receiveNumber"
:min=
"0"
v-model=
"row.count4"
@
on-change=
"inputChange1(i,row,index)"
:disabled=
"row._disabled"
/>
</
template
>
</Table>
</div>
</div>
<FooterToolbar
v-show=
"footerToolbar"
>
<Button
type=
"primary"
class=
"mr10"
@
click=
"materialCreate"
>
物料领用
</Button>
</FooterToolbar>
</div>
</template>
<
script
>
import
Api
from
"../../../aps/plan/api"
;
export
default
{
name
:
'starOrder'
,
data
(){
return
{
starmodal
:
false
,
}
name
:
'starOrder'
,
data
()
{
return
{
entity
:
{},
title
:
""
,
detailAcc
:
null
,
modalAccessoryList
:
false
,
modalAccSet
:
false
,
disabled
:
false
,
deletelModal
:
false
,
curId
:
0
,
editIndex
:
-
1
,
editNum
:
""
,
cols
:
[{
key
:
"routingDetailNo"
,
title
:
this
.
l
(
"routingDetailNo"
),
align
:
"left"
,
width
:
100
},
{
key
:
"routingDetailName"
,
title
:
this
.
l
(
"routingDetailName"
),
align
:
"left"
,
},
{
key
:
"nameMaterial"
,
title
:
this
.
l
(
"nameMaterial"
),
align
:
"left"
,
},
{
key
:
"materialNumber"
,
title
:
this
.
l
(
"materialNumber"
),
align
:
"left"
,
},
{
key
:
"totalCount"
,
title
:
this
.
l
(
"totalCount"
),
align
:
"left"
,
width
:
150
,
},
{
key
:
"applicationNumber"
,
title
:
this
.
l
(
"applicationNumber"
),
align
:
"right"
,
width
:
120
,
},
{
key
:
""
,
title
:
this
.
l
(
"count3"
),
align
:
"right"
,
slot
:
"counts"
,
width
:
150
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{},
params
.
row
.
receiveNumber
+
"/"
+
params
.
row
.
outStockNumber
)
}
},
{
key
:
"count4"
,
title
:
this
.
l
(
"count4"
),
align
:
"center"
,
width
:
150
,
slot
:
"counts4"
,
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
}
],
orderForm
:
{
QuotationFinishDate
:
""
,
},
datas
:
[],
selectItems
:
[],
footerToolbar
:
true
,
orderId
:
null
,
mesCode
:
""
,
productName
:
""
,
drawnNumber
:
""
,
count
:
null
,
curArr
:
0
,
//标记当前操作工艺规程列表是否为空
ruleValidate
:
{
QuotationFinishDate
:
[{
required
:
true
,
message
:
"_"
,
trigger
:
"change"
,
},
],
finishDate
:
[{
required
:
true
,
message
:
"请选择齐套日期"
,
trigger
:
"change"
,
},
],
count
:
[{
required
:
true
,
message
:
"请输入申请数量"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
},
tempList
:
[],
cRow
:
null
,
cArr
:
[],
};
},
props
:
{
row
:
Object
,
gdid
:
Number
,
},
created
()
{
// this.treeHeight = window.innerHeight - 120;
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{
this
.
loadInfo
()
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
this
.
treeHeight
=
window
.
innerHeight
-
120
;
})();
///浏览器窗口大小变化
return
(()
=>
{
this
.
treeHeight
=
window
.
innerHeight
-
120
;
})();
};
},
methods
:
{
starFun
(){
this
.
$Message
.
success
(
"开工..."
)
loadInfo
()
{
this
.
entity
=
this
.
row
let
v
=
this
.
entity
.
orderId
Api
.
matchdetaillist
({
id
:
v
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
r
.
result
.
forEach
((
e
)
=>
{
let
i
=
0
;
e
.
suport
.
forEach
((
el
)
=>
{
el
.
count
=
el
.
totalCount
-
el
.
applicationNumber
;
if
(
el
.
outStockNumber
-
el
.
receiveNumber
>
0
)
{
el
.
count4
=
el
.
outStockNumber
-
el
.
receiveNumber
el
.
_disabled
=
false
;
}
else
{
el
.
count4
=
0
;
el
.
_disabled
=
true
;
}
el
.
_index
=
i
++
;
});
});
this
.
datas
=
r
.
result
;
}
});
},
inputChange1
(
i
,
row
,
index
)
{
//输入数量
this
.
$set
(
this
.
datas
[
i
].
suport
,
index
,
row
);
},
//物料领用
materialCreate
()
{
let
temDataOld
=
this
.
$u
.
clone
(
this
.
datas
)
let
temData
=
[]
temDataOld
.
forEach
(
ele
=>
{
temData
=
temData
.
concat
(
ele
.
suport
)
})
// alert(JSON.stringify(temData))
let
datas
=
[]
temData
.
forEach
(
el
=>
{
if
(
el
.
count4
&&
el
.
count4
>
0
&&
el
.
count4
!=
""
)
{
let
temObj
=
{
routingHeaderId
:
el
.
routingHeaderId
,
routingDeatilId
:
el
.
routingDetailId
,
routingDetailName
:
el
.
routingDetailName
,
routingDetailSeq
:
el
.
routingDetailNo
,
count
:
el
.
count4
,
materialId
:
el
.
materialId
,
materialName
:
el
.
nameMaterial
,
materialNumber
:
el
.
materialNumber
,
supportMainId
:
0
,
}
datas
.
push
(
temObj
)
}
})
if
(
datas
.
length
>
0
)
{
let
params
=
{
items
:
datas
,
orderId
:
this
.
entity
.
orderId
,
dispatchId
:
this
.
entity
.
id
,
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
status
:
0
}
Api
.
materialreceiveCreate
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"物料领用成功"
);
this
.
loadInfo
();
}
});
}
else
{
this
.
$Message
.
error
(
"请输入领用物料数量!"
);
}
},
l
(
key
)
{
let
vkey
=
"support_item"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
watch
:
{
"row"
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
row
);
},
gdid
(
v
)
{
if
(
v
>
0
)
{
// this.load(v);
}
},
},
}
</
script
>
<
style
lang=
"less"
>
.table-content1 {
.table-footer {
line-height: 45px;
text-align: right;
}
.ivu-footer-toolbar {
text-align: right;
background: rgba(0, 0, 0, 0.7);
color: #fff;
}
.ivu-footer-toolbar-right {
float: right;
}
}
</
style
>
pages/produce/execute/components/orderlist.vue
View file @
8ec6fa8a
<
template
>
<div
class=
"order_list"
>
<div
class=
"order_list"
>
<div
class=
"card_box"
>
<Card
class=
"card_order"
v-for=
"(item,index) in listTasks"
:style=
"order==item.id?'box-shadow: 0px 0px 15px #333;':''"
@
click
.
native=
"goPage(item)"
:key=
"index"
:class=
"item.status==12 ? 'card_border1' : (item.status==14 ? 'card_border2': (item.status==5 ?'card_border3':
(item.status==7?'card_border4':(item.status==-1?'card_border5':''))))"
>
<!-- :class="item.status=='未开工'? 'card_border1' : (item.status=='执行中' ? 'card_border2': (item.status=='暂停中' ?'card_border3':
<Card
class=
"card_order"
v-for=
"(item,index) in listTasks"
:style=
"order==item.id?'box-shadow: 0px 0px 15px #333;':''"
@
click
.
native=
"goPage(item)"
:key=
"index"
:class=
"item.status==12 ? 'card_border1' : (item.status==14 ? 'card_border2': (item.status==5 ?'card_border3':
(item.status==7?'card_border4':(item.status==-1?'card_border5':''))))"
>
<!-- :class="item.status=='未开工'? 'card_border1' : (item.status=='执行中' ? 'card_border2': (item.status=='暂停中' ?'card_border3':
(item.status=='交检中'?'card_border4':(item.status=='交接中'?'card_border5':''))))"-->
<p
slot=
"title"
>
{{
item
.
mesCode
}}
<state
code=
"taskList.status"
ref=
"state"
class=
"fr"
:value=
"item.status"
type=
"text"
></state>
<!--
<span
>
{{
item
.
status
}}
</span>
-->
</p>
<p
class=
"order_tit"
>
{{
item
.
productName
}}
</p>
<p>
<Icon
type=
"ios-pricetags"
/>
{{
item
.
taskName
}}
</p>
<p>
{{
item
.
beginTime
}}
~
{{
item
.
endTime
}}
</p>
</Card>
<p>
共
{{
listTasks
.
length
}}
个工单
</p>
<p
slot=
"title"
>
{{
item
.
mesCode
}}
<state
code=
"taskList.status"
ref=
"state"
class=
"fr"
:value=
"item.status"
type=
"text"
></state>
<!--
<span
>
{{
item
.
status
}}
</span>
-->
</p>
<p
class=
"order_tit"
>
{{
item
.
productName
}}
</p>
<p>
<Icon
type=
"ios-pricetags"
/>
{{
item
.
taskName
}}
</p>
<p>
{{
item
.
beginTime
}}
~
{{
item
.
endTime
}}
</p>
</Card>
<p>
共
{{
listTasks
.
length
}}
个工单
</p>
</div>
</div>
</div>
</
template
>
<
script
>
import
Api
from
"../../api"
;
export
default
{
name
:
"orderlist"
,
data
()
{
return
{
gnFlag
:
0
,
listTasks
:
[],
dataLength
:
0
};
},
props
:
{
order
:
{
type
:
[
String
,
Number
]
},
asc
:
{
type
:
Boolean
,
default
:
true
name
:
"orderlist"
,
data
()
{
return
{
gnFlag
:
0
,
listTasks
:
[],
dataLength
:
0
};
},
statu
:
{
type
:
Number
,
default
:
-
9
},
refresh
:
{
type
:
Boolean
,
default
:
true
}
},
created
()
{
this
.
loadTree
();
},
methods
:
{
loadTree
()
{
let
parmse
=
{
status
:
this
.
statu
,
isAsc
:
this
.
asc
};
Api
.
getCardList
(
parmse
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
listTasks
=
res
.
result
;
this
.
dataLength
=
res
.
result
.
length
;
props
:
{
order
:
{
type
:
[
String
,
Number
]
},
asc
:
{
type
:
Boolean
,
default
:
true
},
statu
:
{
type
:
Number
,
default
:
-
9
},
refresh
:
{
type
:
Boolean
,
default
:
true
}
});
},
gnFunto
(
number
,
type
)
{
this
.
gnFlag
=
number
;
created
(
)
{
this
.
loadTree
()
;
},
goPage
(
item
)
{
this
.
$router
.
push
({
path
:
"/produce/execute"
,
query
:
{
id
:
item
.
id
,
orderId
:
item
.
orderId
,
executeId
:
item
.
executeId
,
headid
:
item
.
routingHeaderId
,
routid
:
item
.
routingDetailId
,
//工序ID
quantity
:
item
.
quantity
,
//派工数量
dispatchStatus
:
item
.
status
methods
:
{
loadTree
()
{
let
parmse
=
{
status
:
this
.
statu
,
isAsc
:
this
.
asc
};
Api
.
getCardList
(
parmse
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
listTasks
=
res
.
result
;
this
.
dataLength
=
res
.
result
.
length
;
}
});
},
gnFunto
(
number
,
type
)
{
this
.
gnFlag
=
number
;
},
goPage
(
item
)
{
this
.
$router
.
push
({
path
:
"/produce/execute"
,
query
:
{
id
:
item
.
id
,
orderId
:
item
.
orderId
,
executeId
:
item
.
executeId
,
headid
:
item
.
routingHeaderId
,
routid
:
item
.
routingDetailId
,
//工序ID
quantity
:
item
.
quantity
,
//派工数量
dispatchStatus
:
item
.
status
,
mesCode
:
item
.
mesCode
,
productName
:
item
.
productName
,
drawnNumber
:
item
.
drawnNumber
,
}
});
}
});
}
},
watch
:
{
order
(
v
)
{
//alert(v)
},
asc
(
v
)
{
this
.
asc
=
v
;
this
.
loadTree
();
},
statu
(
v
)
{
this
.
statu
=
v
;
this
.
loadTree
();
},
refresh
(
v
)
{
this
.
refresh
=
v
;
this
.
loadTree
();
watch
:
{
order
(
v
)
{
//alert(v)
},
asc
(
v
)
{
this
.
asc
=
v
;
this
.
loadTree
();
},
statu
(
v
)
{
this
.
statu
=
v
;
this
.
loadTree
();
},
refresh
(
v
)
{
this
.
refresh
=
v
;
this
.
loadTree
();
}
}
}
};
</
script
>
\ No newline at end of file
</
script
>
pages/produce/execute/execute.less
View file @
8ec6fa8a
...
...
@@ -748,6 +748,5 @@
.zhuanx{
text-align: center;
line-height: 60px;
.line_p input{
}
}
\ No newline at end of file
pages/produce/execute/index.vue
View file @
8ec6fa8a
...
...
@@ -2,7 +2,7 @@
@import "./execute.less";
</
style
>
<
template
>
<div
class=
"execute_box"
>
<div
class=
"execute_box"
>
<!--
<div
class=
"top_title"
>
<span
class=
"fl"
>
{{
orderTitle
}}
</span>
<div>
工单编号: 12001011
</div>
...
...
@@ -11,164 +11,168 @@
<a
class=
"gd_list"
@
click=
"changeFresh"
>
工单列表
</a>
<a
class=
"gn_area"
@
click=
"functionalMode = true"
>
功能区
</a>
<!-- 工单列表 -->
<Drawer
placement=
"left"
class=
"gd_box"
:closable=
"false"
:inner=
"true"
:transfer=
"false"
v-model=
"orderlistMode"
>
<div
slot=
"header"
>
<div
class=
"header"
>
<a
class=
"gd_tt"
@
click=
"goToOrder"
>
<Icon
type=
"ios-undo-outline"
/>
工单列表
</a>
<Dictionary
code=
"taskList.status"
class=
"select_star fr"
v-model=
"odermodel"
@
on-change=
"searchOrder"
></Dictionary>
<Drawer
placement=
"left"
class=
"gd_box"
:closable=
"false"
:inner=
"true"
:transfer=
"false"
v-model=
"orderlistMode"
>
<div
slot=
"header"
>
<div
class=
"header"
>
<a
class=
"gd_tt"
@
click=
"goToOrder"
>
<Icon
type=
"ios-undo-outline"
/>
工单列表
</a>
<Dictionary
code=
"taskList.status"
class=
"select_star fr"
v-model=
"odermodel"
@
on-change=
"searchOrder"
></Dictionary>
</div>
<div
class=
"select_t"
style=
"height:40px"
>
<Button
@
click=
"changeAsc"
class=
"fr"
shape=
"circle"
icon=
"md-calendar"
>
{{
ascTitle
}}
</Button>
</div>
</div>
<div
class=
"select_t"
style=
"height:40px"
>
<Button
@
click=
"changeAsc"
class=
"fr"
shape=
"circle"
icon=
"md-calendar"
>
{{
ascTitle
}}
</Button>
</div>
</div>
<!-- 列表卡片主内容 -->
<orderlist
ref=
"orderlistref"
:asc=
"asc"
:statu=
"statu"
:refresh=
"refresh"
:order=
"inputId"
/>
<!-- 列表卡片主内容 -->
<orderlist
ref=
"orderlistref"
:asc=
"asc"
:statu=
"statu"
:refresh=
"refresh"
:order=
"inputId"
/>
</Drawer>
<!-- 功能区 -->
<Drawer
class=
"gn_box"
:closable=
"false"
:inner=
"true"
:transfer=
"false"
v-model=
"functionalMode"
>
<functional
@
changeTitle=
"changeTitle"
ref=
"functional"
/>
<Drawer
class=
"gn_box"
:closable=
"false"
:inner=
"true"
:transfer=
"false"
v-model=
"functionalMode"
>
<functional
@
changeTitle=
"changeTitle"
ref=
"functional"
/>
</Drawer>
</div>
</div>
</
template
>
<
script
>
import
functional
from
"./components/functional"
;
import
orderlist
from
"./components/orderlist"
;
export
default
{
components
:
{
functional
,
orderlist
},
data
()
{
return
{
orderTitle
:
"进度汇报"
,
orderindex
:
0
,
listLength
:
0
,
//工单数量
starmodal
:
true
,
orderlistMode
:
false
,
functionalMode
:
false
,
gdId
:
0
,
detail
:
null
,
row
:
{},
odermodel
:
-
9
,
orderId
:
this
.
$route
.
query
.
id
,
condition
:
[],
inputId
:
null
,
asc
:
true
,
ascTitle
:
"时间正序排序"
,
statu
:
-
9
,
refresh
:
true
};
},
created
()
{
let
row
=
{};
row
.
id
=
this
.
$route
.
query
.
id
;
row
.
orderId
=
this
.
$route
.
query
.
orderId
;
row
.
executeId
=
this
.
$route
.
query
.
executeId
;
row
.
headid
=
this
.
$route
.
query
.
headid
;
row
.
routingdetailId
=
this
.
$route
.
query
.
routid
;
this
.
row
=
row
;
this
.
inputId
=
this
.
$route
.
query
.
id
;
this
.
detail
=
()
=>
import
(
"./starOrder/index"
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{},
comments
:
{},
methods
:
{
// getListLength(len){ this.listLength = len },
// 返回工单列表
goToOrder
()
{
this
.
$router
.
push
(
"/produce/orderlist"
);
components
:
{
functional
,
orderlist
},
searchOrder
(
value
)
{
if
(
value
==
null
||
typeof
value
==
"undefined"
)
{
value
=
-
9
;
}
this
.
statu
=
value
;
// this.$refs.orderlistref.loadTree(value);
data
()
{
return
{
orderTitle
:
"进度汇报"
,
orderindex
:
0
,
listLength
:
0
,
//工单数量
starmodal
:
true
,
orderlistMode
:
false
,
functionalMode
:
false
,
gdId
:
0
,
detail
:
null
,
row
:
{},
odermodel
:
-
9
,
orderId
:
this
.
$route
.
query
.
id
,
condition
:
[],
inputId
:
null
,
asc
:
true
,
ascTitle
:
"时间正序排序"
,
statu
:
-
9
,
refresh
:
true
};
},
changeTitle
(
number
,
type
)
{
this
.
orderTitle
=
type
;
this
.
orderindex
=
number
;
if
(
number
==
0
)
{
created
()
{
let
row
=
{};
row
.
id
=
this
.
$route
.
query
.
id
;
row
.
orderId
=
this
.
$route
.
query
.
orderId
;
row
.
executeId
=
this
.
$route
.
query
.
executeId
;
row
.
headid
=
this
.
$route
.
query
.
headid
;
row
.
routingdetailId
=
this
.
$route
.
query
.
routid
;
row
.
mesCode
=
this
.
$route
.
query
.
mesCode
;
row
.
productName
=
this
.
$route
.
query
.
productName
;
row
.
drawnNumber
=
this
.
$route
.
query
.
drawnNumber
;
row
.
count
=
this
.
$route
.
query
.
quantity
;
this
.
row
=
row
;
this
.
inputId
=
this
.
$route
.
query
.
id
;
this
.
detail
=
()
=>
import
(
"./starOrder/index"
);
}
//进度汇报
if
(
number
==
1
)
{
this
.
$Message
.
info
(
"尊敬的用户,您没有该权限!"
);
// this.detail = () => import("./MaterialCollec/index");
}
//物料领用
if
(
number
==
2
)
{
// this.detail = () => import("./productSet/index");
this
.
$Message
.
info
(
"尊敬的用户,您没有该权限!"
);
}
//产品装配
if
(
number
==
3
)
{
this
.
detail
=
()
=>
import
(
"./taskTime/index"
);
}
//工时分配
if
(
number
==
4
)
{
this
.
$Message
.
info
(
"尊敬的用户,您没有该权限!"
);
// this.detail = () => import("./preparation/index");
}
//生产准备
if
(
number
==
5
)
{
this
.
detail
=
()
=>
import
(
"./ProcessCheck/index"
);
}
//工艺查看
if
(
number
==
6
)
{
this
.
detail
=
()
=>
import
(
"./ProcessCase/index"
);
}
//工艺案例
if
(
number
==
7
)
{
this
.
detail
=
()
=>
import
(
"./judgment/index"
);
}
//质量判定
if
(
number
==
8
)
{
this
.
detail
=
()
=>
import
(
"./datafilling/index"
);
}
//数据填报
if
(
number
==
10
)
{
this
.
detail
=
()
=>
import
(
"./datafilling/check"
);
}
//质量检验
if
(
number
==
9
)
{
// this.$Message.info("尊敬的用户,您没有该权限!");
// this.detail = () => import("./testdata/index");
}
//测试数据
},
//按时间排序按钮
changeAsc
()
{
this
.
asc
=
!
this
.
asc
;
if
(
this
.
asc
)
{
this
.
ascTitle
=
"时间正序排序"
;
}
else
{
this
.
ascTitle
=
"时间倒序排序"
;
}
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
//刷新orderlist列表
changeFresh
()
{
this
.
refresh
=
!
this
.
refresh
;
this
.
orderlistMode
=
true
;
}
},
watch
:
{
"$route.query.id"
(
v
)
{
this
.
row
.
id
=
v
;
this
.
inputId
=
v
;
this
.
detail
=
()
=>
import
(
"./starOrder/index"
);
mounted
()
{},
comments
:
{},
methods
:
{
// getListLength(len){ this.listLength = len },
// 返回工单列表
goToOrder
()
{
this
.
$router
.
push
(
"/produce/orderlist"
);
},
searchOrder
(
value
)
{
if
(
value
==
null
||
typeof
value
==
"undefined"
)
{
value
=
-
9
;
}
this
.
statu
=
value
;
// this.$refs.orderlistref.loadTree(value);
},
changeTitle
(
number
,
type
)
{
this
.
orderTitle
=
type
;
this
.
orderindex
=
number
;
let
row
=
{
id
:
this
.
$route
.
query
.
id
,
orderId
:
this
.
$route
.
query
.
orderId
,
executeId
:
this
.
$route
.
query
.
executeId
,
headid
:
this
.
$route
.
query
.
headid
,
routingdetailId
:
this
.
$route
.
query
.
routid
,
mesCode
:
this
.
$route
.
query
.
mesCode
,
productName
:
this
.
$route
.
query
.
productName
,
drawnNumber
:
this
.
$route
.
query
.
drawnNumber
,
count
:
this
.
$route
.
query
.
quantity
,
};
this
.
row
=
row
;
this
.
inputId
=
this
.
$route
.
query
.
id
;
if
(
number
==
0
)
{
this
.
detail
=
()
=>
import
(
"./starOrder/index"
);
}
//进度汇报
if
(
number
==
1
)
{
this
.
detail
=
()
=>
import
(
"./MaterialCollec/index"
);
}
//物料领用
if
(
number
==
2
)
{
// this.detail = () => import("./productSet/index");
this
.
$Message
.
info
(
"尊敬的用户,您没有该权限!"
);
}
//产品装配
if
(
number
==
3
)
{
this
.
detail
=
()
=>
import
(
"./taskTime/index"
);
}
//工时分配
if
(
number
==
4
)
{
this
.
$Message
.
info
(
"尊敬的用户,您没有该权限!"
);
// this.detail = () => import("./preparation/index");
}
//生产准备
if
(
number
==
5
)
{
this
.
detail
=
()
=>
import
(
"./ProcessCheck/index"
);
}
//工艺查看
if
(
number
==
6
)
{
this
.
detail
=
()
=>
import
(
"./ProcessCase/index"
);
}
//工艺案例
if
(
number
==
7
)
{
this
.
detail
=
()
=>
import
(
"./judgment/index"
);
}
//质量判定
if
(
number
==
8
)
{
this
.
detail
=
()
=>
import
(
"./datafilling/index"
);
}
//数据填报
if
(
number
==
10
)
{
this
.
detail
=
()
=>
import
(
"./datafilling/check"
);
}
//质量检验
if
(
number
==
9
)
{
// this.$Message.info("尊敬的用户,您没有该权限!");
// this.detail = () => import("./testdata/index");
}
//测试数据
},
//按时间排序按钮
changeAsc
()
{
this
.
asc
=
!
this
.
asc
;
if
(
this
.
asc
)
{
this
.
ascTitle
=
"时间正序排序"
;
}
else
{
this
.
ascTitle
=
"时间倒序排序"
;
}
},
//刷新orderlist列表
changeFresh
()
{
this
.
refresh
=
!
this
.
refresh
;
this
.
orderlistMode
=
true
;
}
},
watch
:
{
"$route.query.id"
(
v
)
{
this
.
row
.
id
=
v
;
this
.
inputId
=
v
;
this
.
detail
=
()
=>
import
(
"./starOrder/index"
);
}
}
}
};
</
script
>
pages/produce/orderlist.vue
View file @
8ec6fa8a
<
template
>
<div
class=
"aps-r"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:batch=
"false"
:type=
"typeInfo"
:span=
"6"
:lazy=
"true"
:conditions=
"easySearch"
:action=
"action"
:gutter=
"40"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入订单编号/产品名称/图号"
v-model=
"easySearch.keys.value"
v-width=
"260"
clearable
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
:icon=
"iconInfo"
shape=
"circle"
:title=
"titleInfo"
@
click=
"changeShwo"
></Button>
</
template
>
<
template
slot=
"card"
slot-scope=
"{row}"
>
<div
class=
"body"
@
click=
"toExecute(row.id,row.orderId,row.executeId,row.routingHeaderId,row.routingDetailId,row.quantity,row.status)"
>
<Row
class=
"title-i"
>
<Col
:span=
"10"
class=
"order-code"
>
<Ellipsis
:text=
"row.productName"
:lines=
"1"
tooltip
transfer
/>
</Col>
<Col
:span=
"10"
class=
"order-code"
>
<Ellipsis
:text=
"row.mesCode"
:lines=
"1"
tooltip
transfer
/>
</Col>
<Col
:span=
"4"
>
<div
class=
"statuBg"
:style=
"tdStyle(row.status)"
></div>
<div
class=
"boxTitle"
>
<div
class=
"text"
>
<state
code=
"taskList.status"
ref=
"state"
:value=
"row.status"
type=
"text"
:color=
"false"
></state>
<div
class=
"aps-r"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:batch=
"false"
:type=
"typeInfo"
:span=
"6"
:lazy=
"true"
:conditions=
"easySearch"
:action=
"action"
:gutter=
"40"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入订单编号/产品名称/图号"
v-model=
"easySearch.keys.value"
v-width=
"260"
clearable
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
:icon=
"iconInfo"
shape=
"circle"
:title=
"titleInfo"
@
click=
"changeShwo"
></Button>
</
template
>
<
template
slot=
"card"
slot-scope=
"{row}"
>
<div
class=
"body"
@
click=
"toExecute(row.id,row.orderId,row.executeId,row.routingHeaderId,row.routingDetailId,row.quantity,row.status,row.mesCode,row.productName,row.drawnNumber)"
>
<Row
class=
"title-i"
>
<Col
:span=
"10"
class=
"order-code"
>
<Ellipsis
:text=
"row.productName"
:lines=
"1"
tooltip
transfer
/>
</Col>
<Col
:span=
"10"
class=
"order-code"
>
<Ellipsis
:text=
"row.mesCode"
:lines=
"1"
tooltip
transfer
/>
</Col>
<Col
:span=
"4"
>
<div
class=
"statuBg"
:style=
"tdStyle(row.status)"
></div>
<div
class=
"boxTitle"
>
<div
class=
"text"
>
<state
code=
"taskList.status"
ref=
"state"
:value=
"row.status"
type=
"text"
:color=
"false"
></state>
</div>
</div>
</Col>
</Row>
<div
class=
"panel-text"
>
<Row>
<Col
span=
"8"
>
<img
:src=
"getUrl(row.productUrl)"
width=
"120"
height=
"120"
:title=
"row.productUrl"
style=
"border:#cacbd0 dashed 1px"
onerror=
"this.src='/imgicon/noPic_product.png';"
/>
</Col>
<Col
span=
"16"
class=
"row"
>
<p>
{{
l
(
"beginTime"
)
}}
:
{{
row
.
beginTime
}}
</p>
<p>
<span
v-if=
"getStatus(row.status)"
>
{{
l
(
"planEndTime"
)
}}
:
</span>
<span
v-else
>
{{
l
(
"endTime"
)
}}
:
</span>
{{
row
.
endTime
}}
</p>
<p
v-if=
"getStatus(row.status)&&getTimes(row.endTime)>0"
>
剩余时间:
<OutputTime
:value=
"getTimes(row.endTime)"
style=
"display:inline"
></OutputTime>
</p>
<p>
{{
l
(
"quantity"
)
}}
:
{{
row
.
quantity
}}
</p>
</Col>
</Row>
<Row
class=
"rowBottom"
>
<Col
span=
"14"
>
{{
l
(
"drawnNumber"
)
}}
:
{{
row
.
drawnNumber
}}
</Col>
<Col
span=
"10"
class=
"tr"
>
<Icon
type=
"md-alert"
size=
"18"
color=
"#FFA000"
v-if=
"getStatus(row.status)&&getTimes(row.endTime)
<86400
&&
getTimes
(
row
.
endTime
)
>
0" />
<span
style=
"color:#FFA000"
v-if=
"getStatus(row.status)&&getTimes(row.endTime)
<86400
&&
getTimes
(
row
.
endTime
)
>
0">预警
</span>
<Icon
type=
"md-timer"
size=
"18"
color=
"#FE7777"
v-if=
"getStatus(row.status)&&compareTime(row.endTime)"
/>
<span
style=
"color:#FE7777"
v-if=
"getStatus(row.status)&&compareTime(row.endTime)"
>
超期
</span>
</Col>
</Row>
</div>
</div>
</Col>
</Row>
<div
class=
"panel-text"
>
<Row>
<Col
span=
"8"
>
<img
:src=
"getUrl(row.productUrl)"
width=
"120"
height=
"120"
:title=
"row.productUrl"
style=
"border:#cacbd0 dashed 1px"
onerror=
"this.src='/imgicon/noPic_product.png';"
/>
</Col>
<Col
span=
"16"
class=
"row"
>
<p>
{{
l
(
"beginTime"
)
}}
:
{{
row
.
beginTime
}}
</p>
<p>
<span
v-if=
"getStatus(row.status)"
>
{{
l
(
"planEndTime"
)
}}
:
</span>
<span
v-else
>
{{
l
(
"endTime"
)
}}
:
</span>
{{
row
.
endTime
}}
</p>
<p
v-if=
"getStatus(row.status)&&getTimes(row.endTime)>0"
>
剩余时间:
<OutputTime
:value=
"getTimes(row.endTime)"
style=
"display:inline"
></OutputTime>
</p>
<p>
{{
l
(
"quantity"
)
}}
:
{{
row
.
quantity
}}
</p>
</Col>
</Row>
<Row
class=
"rowBottom"
>
<Col
span=
"14"
>
{{
l
(
"drawnNumber"
)
}}
:
{{
row
.
drawnNumber
}}
</Col>
<Col
span=
"10"
class=
"tr"
>
<Icon
type=
"md-alert"
size=
"18"
color=
"#FFA000"
v-if=
"getStatus(row.status)&&getTimes(row.endTime)
<86400
&&
getTimes
(
row
.
endTime
)
>
0"
/>
<span
style=
"color:#FFA000"
v-if=
"getStatus(row.status)&&getTimes(row.endTime)
<86400
&&
getTimes
(
row
.
endTime
)
>
0"
>预警
</span>
<Icon
type=
"md-timer"
size=
"18"
color=
"#FE7777"
v-if=
"getStatus(row.status)&&compareTime(row.endTime)"
/>
<span
style=
"color:#FE7777"
v-if=
"getStatus(row.status)&&compareTime(row.endTime)"
>
超期
</span>
</Col>
</Row>
</div>
</div>
</
template
>
</div>
</
template
>
</DataGrid>
</div>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
import
Search
from
"./search"
;
export
default
{
name
:
"starOrder"
,
components
:
{
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"mesCode,productName,drawnNumber"
,
value
:
null
}
//status: { op: "Equal", value: 0 }
},
downUrl
:
fileUrlDown
,
columns
:
[
{
title
:
this
.
l
(
"mesCode"
),
key
:
"mesCode"
,
width
:
240
,
align
:
"left"
name
:
"starOrder"
,
components
:
{
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"mesCode,productName,drawnNumber"
,
value
:
null
}
},
downUrl
:
fileUrlDown
,
columns
:
[{
title
:
this
.
l
(
"mesCode"
),
key
:
"mesCode"
,
width
:
240
,
align
:
"left"
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
high
:
true
,
code
:
"taskList.status"
,
width
:
120
},
{
key
:
"productName"
,
title
:
this
.
l
(
"productName"
),
align
:
"left"
,
high
:
true
},
{
key
:
"drawnNumber"
,
title
:
this
.
l
(
"drawnNumber"
),
align
:
"left"
,
high
:
true
},
{
key
:
"quantity"
,
title
:
this
.
l
(
"quantity"
),
align
:
"right"
,
width
:
120
,
high
:
true
},
{
key
:
"beginTime"
,
title
:
this
.
l
(
"beginTime"
),
align
:
"center"
,
width
:
180
,
high
:
true
},
{
key
:
"endTime"
,
title
:
this
.
l
(
"endTime"
),
align
:
"center"
,
width
:
180
,
high
:
true
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
toExecute
(
params
.
row
.
id
,
params
.
row
.
orderId
,
params
.
row
.
executeId
,
params
.
row
.
routingHeaderId
,
params
.
row
.
routingDetailId
,
params
.
row
.
quantity
,
params
.
row
.
status
,
params
.
row
.
mesCode
,
params
.
row
.
productName
,
params
.
row
.
drawnNumber
)
}
},
"查看"
)
]);
}
}
],
typeInfo
:
"card"
,
iconInfo
:
"md-apps"
,
titleInfo
:
"卡片模式"
,
nowTime
:
new
Date
().
getTime
()
//页面当前打开时间
};
},
created
()
{
let
oldStr
=
localStorage
.
getItem
(
"admin"
);
let
userlist
=
this
.
$store
.
getters
.
getUser
(
2
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{
this
.
search
();
},
methods
:
{
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
high
:
true
,
code
:
"taskList.status"
,
width
:
120
toExecute
(
id
,
orderId
,
executeId
,
headid
,
routingDetailId
,
quantity
,
status
,
mesCode
,
productName
,
drawnNumber
)
{
//跳转到对应操作页面 获取id:this.$route.query.id
this
.
$router
.
push
({
path
:
"/produce/execute"
,
query
:
{
id
:
id
,
//工单ID
orderId
:
orderId
,
//订单id
executeId
:
executeId
,
//订单执行表id
headid
:
headid
,
//工艺规程id
routid
:
routingDetailId
,
//工序ID
quantity
:
quantity
,
//派工数量
dispatchStatus
:
status
,
mesCode
:
mesCode
,
productName
:
productName
,
drawnNumber
:
drawnNumber
}
});
},
{
key
:
"productName"
,
title
:
this
.
l
(
"productName"
),
align
:
"left"
,
high
:
true
tdStyle
(
val
)
{
//动态根据状态值加载状态值对应的颜色
let
temDic
=
this
.
$store
.
getters
.
dictionaryByKey
(
"taskList.status"
);
let
temColor
=
"#666"
;
temDic
.
forEach
(
data
=>
{
if
(
Number
(
data
.
code
)
==
val
)
{
temColor
=
data
.
color
;
}
});
var
style
=
{};
style
[
"border-top"
]
=
" solid 38px "
+
temColor
;
return
style
;
},
{
key
:
"drawnNumber"
,
title
:
this
.
l
(
"drawnNumber"
),
align
:
"left"
,
high
:
true
changeShwo
()
{
//显示模式切换
if
(
this
.
typeInfo
==
"card"
)
{
this
.
typeInfo
=
"table"
;
this
.
iconInfo
=
"md-list"
;
this
.
titleInfo
=
"列表模式"
;
}
else
{
this
.
typeInfo
=
"card"
;
this
.
iconInfo
=
"md-apps"
;
this
.
titleInfo
=
"卡片模式"
;
}
},
{
key
:
"quantity"
,
title
:
this
.
l
(
"quantity"
),
align
:
"right"
,
width
:
120
,
high
:
true
compareTime
(
dateStart
)
{
//比较当前时间和计划完成时间
let
planEndTime
=
new
Date
(
dateStart
).
getTime
();
let
res
=
true
;
if
(
this
.
nowTime
-
planEndTime
>
0
)
{
res
=
true
;
}
else
{
res
=
false
;
}
return
res
;
},
{
key
:
"beginTime"
,
title
:
this
.
l
(
"beginTime"
),
align
:
"center"
,
width
:
180
,
high
:
true
getTimes
(
dateStart
)
{
//返回计划完成时间和当前时间的差值
let
planEndTime
=
new
Date
(
dateStart
).
getTime
();
let
res
=
0
;
if
(
this
.
nowTime
-
planEndTime
>
0
)
{
res
=
0
;
}
else
{
res
=
(
this
.
nowTime
-
planEndTime
)
/
1000
;
}
return
res
;
},
{
key
:
"endTime"
,
title
:
this
.
l
(
"endTime"
),
align
:
"center"
,
width
:
180
,
high
:
true
getStatus
(
status
)
{
//根据状态返回未开工、执行中、暂停状态的bool值
let
res
=
true
;
if
(
status
==
12
||
status
==
14
||
status
==
5
)
{
res
=
true
;
}
else
{
res
=
false
;
}
return
res
;
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
toExecute
(
params
.
row
.
id
,
params
.
row
.
orderId
,
params
.
row
.
executeId
,
params
.
row
.
routingHeaderId
,
params
.
row
.
routingDetailId
,
params
.
row
.
quantity
,
params
.
row
.
status
)
}
},
"查看"
)
]);
}
}
],
typeInfo
:
"card"
,
iconInfo
:
"md-apps"
,
titleInfo
:
"卡片模式"
,
nowTime
:
new
Date
().
getTime
()
//页面当前打开时间
};
},
created
()
{
let
oldStr
=
localStorage
.
getItem
(
"admin"
);
let
userlist
=
this
.
$store
.
getters
.
getUser
(
2
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{
this
.
search
();
},
methods
:
{
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
toExecute
(
id
,
orderId
,
executeId
,
headid
,
routingDetailId
,
quantity
,
status
)
{
//跳转到对应操作页面 获取id:this.$route.query.id
this
.
$router
.
push
({
path
:
"/produce/execute"
,
query
:
{
id
:
id
,
//工单ID
orderId
:
orderId
,
//订单id
executeId
:
executeId
,
//订单执行表id
headid
:
headid
,
//工艺规程id
routid
:
routingDetailId
,
//工序ID
quantity
:
quantity
,
//派工数量
dispatchStatus
:
status
}
});
},
tdStyle
(
val
)
{
//动态根据状态值加载状态值对应的颜色
let
temDic
=
this
.
$store
.
getters
.
dictionaryByKey
(
"taskList.status"
);
let
temColor
=
"#666"
;
temDic
.
forEach
(
data
=>
{
if
(
Number
(
data
.
code
)
==
val
)
{
temColor
=
data
.
color
;
getUrl
(
url
)
{
//返回img需要显示的src值
let
tempUrl
=
""
;
if
(
url
&&
url
.
length
>
0
)
{
tempUrl
=
this
.
downUrl
+
url
;
}
else
{
tempUrl
=
iconImg
+
"noPic_product.png"
;
}
return
tempUrl
;
},
l
(
key
)
{
let
vkey
=
"order_list"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
});
var
style
=
{};
style
[
"border-top"
]
=
" solid 38px "
+
temColor
;
return
style
;
},
changeShwo
()
{
//显示模式切换
if
(
this
.
typeInfo
==
"card"
)
{
this
.
typeInfo
=
"table"
;
this
.
iconInfo
=
"md-list"
;
this
.
titleInfo
=
"列表模式"
;
}
else
{
this
.
typeInfo
=
"card"
;
this
.
iconInfo
=
"md-apps"
;
this
.
titleInfo
=
"卡片模式"
;
}
},
compareTime
(
dateStart
)
{
//比较当前时间和计划完成时间
let
planEndTime
=
new
Date
(
dateStart
).
getTime
();
let
res
=
true
;
if
(
this
.
nowTime
-
planEndTime
>
0
)
{
res
=
true
;
}
else
{
res
=
false
;
}
return
res
;
},
getTimes
(
dateStart
)
{
//返回计划完成时间和当前时间的差值
let
planEndTime
=
new
Date
(
dateStart
).
getTime
();
let
res
=
0
;
if
(
this
.
nowTime
-
planEndTime
>
0
)
{
res
=
0
;
}
else
{
res
=
(
this
.
nowTime
-
planEndTime
)
/
1000
;
}
return
res
;
},
getStatus
(
status
)
{
//根据状态返回未开工、执行中、暂停状态的bool值
let
res
=
true
;
if
(
status
==
12
||
status
==
14
||
status
==
5
)
{
res
=
true
;
}
else
{
res
=
false
;
}
return
res
;
},
getUrl
(
url
)
{
//返回img需要显示的src值
let
tempUrl
=
""
;
if
(
url
&&
url
.
length
>
0
)
{
tempUrl
=
this
.
downUrl
+
url
;
}
else
{
tempUrl
=
iconImg
+
"noPic_product.png"
;
}
return
tempUrl
;
},
l
(
key
)
{
let
vkey
=
"order_list"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
}
};
</
script
>
<
style
lang=
"less"
>
.aps-r {
// width: 100%;
// height: 100%;
// overflow: auto;
// padding: 15px 0 15px 15px;
height: calc(100vh - 110px);
.body {
background: white;
border-radius: 4px 0 4px 4px;
border: #cacbd0 solid 1px;
margin-bottom: 30px;
.title-i {
padding: 0 0 0 8px;
height: 38px;
line-height: 38px;
color: #2680eb;
font-size: 14px;
font-weight: bold;
border-bottom: #cacbd0 dotted 1px;
.btn-click {
text-align: right;
a {
color: #fff;
// width: 100%;
// height: 100%;
// overflow: auto;
// padding: 15px 0 15px 15px;
height: calc(100vh - 110px);
.body {
background: white;
border-radius: 4px 0 4px 4px;
border: #cacbd0 solid 1px;
margin-bottom: 30px;
.title-i {
padding: 0 0 0 8px;
height: 38px;
line-height: 38px;
color: #2680eb;
font-size: 14px;
font-weight: bold;
border-bottom: #cacbd0 dotted 1px;
.btn-click {
text-align: right;
a {
color: #fff;
}
a:hover {
color: #249e91;
}
}
}
a:hover {
color: #249e91;
.panel-text {
padding: 5px 8px;
.row {
color: #666666;
padding-left: 10px;
p {
line-height: 30px;
}
}
}
}
}
.panel-text {
padding: 5px 8px;
.row {
color: #666666;
padding-left: 10px;
p {
line-height: 30px;
}
}
.body:hover {
cursor: pointer;
box-shadow: 0 0 10px #888888;
}
}
.body:hover {
cursor: pointer;
box-shadow: 0 0 10px #888888;
}
}
.statuBg {
height: 0px;
width: 0;
border-left: solid 50px transparent;
float: right;
margin-right: -1px;
height: 0px;
width: 0;
border-left: solid 50px transparent;
float: right;
margin-right: -1px;
}
.boxTitle {
color: white;
float: right;
margin-top: -42px;
/* Rotate div */
transform: rotate(37deg);
-ms-transform: rotate(37deg); /* Internet Explorer */
-moz-transform: rotate(37deg); /* Firefox */
-webkit-transform: rotate(37deg); /* Safari 和 Chrome */
-o-transform: rotate(37deg); /* Opera */
.text {
font-size: 8px;
font-weight: normal;
}
color: white;
float: right;
margin-top: -42px;
/* Rotate div */
transform: rotate(37deg);
-ms-transform: rotate(37deg);
/* Internet Explorer */
-moz-transform: rotate(37deg);
/* Firefox */
-webkit-transform: rotate(37deg);
/* Safari 和 Chrome */
-o-transform: rotate(37deg);
/* Opera */
.text {
font-size: 8px;
font-weight: normal;
}
}
.rowBottom .ivu-col-span-10 {
height: 24px;
padding-right: 10px;
height: 24px;
padding-right: 10px;
}
</
style
>
src/assets/css/base.css
View file @
8ec6fa8a
...
...
@@ -232,6 +232,9 @@ div::-webkit-scrollbar-corner {
.mr30
{
margin-right
:
30px
;
}
.mr40
{
margin-right
:
40px
;
}
.mtb10
{
margin
:
10px
0
;
}
...
...
src/assets/css/execute.css
View file @
8ec6fa8a
...
...
@@ -271,7 +271,7 @@
float
:
left
;
margin
:
20px
72px
;
width
:
300px
;
height
:
24
0px
;
height
:
18
0px
;
border-color
:
#2680EB
;
}
.gs_set
.gs_card_box
.gs_card
.ivu-card-head
{
...
...
@@ -285,10 +285,13 @@
.gs_set
.gs_card_box
.gs_card
.gs_p
{
height
:
32px
;
line-height
:
32px
;
font-size
:
20px
;
text-align
:
center
;
}
.gs_set
.gs_card_box
.gs_card
.gs_time
{
text-align
:
center
;
color
:
#2680EB
;
line-height
:
46px
;
}
.gs_set
.gs_card_box
.gs_card
.gs_time
.b_size
{
font-size
:
32px
;
...
...
@@ -297,9 +300,6 @@
background
:
#d3e6fb
;
margin
:
0
-16px
;
height
:
59px
;
border-bottom-left-radius
:
4px
;
border-bottom-right-radius
:
4px
;
border-top
:
1px
solid
#2680eb
;
}
.gs_set
.gs_card_box
.gs_card
.gs_footer
a
{
display
:
inline-block
;
...
...
@@ -311,7 +311,6 @@
.gs_set
.gs_card_box
.gs_card
.gs_footer
.gs_del
{
background
:
#2680EB
;
color
:
#fff
;
border-bottom-right-radius
:
4px
;
}
.gs_set
.gs_card_box
.gs_card
:hover
{
border-color
:
#2680EB
;
...
...
@@ -321,7 +320,7 @@
border
:
1px
dashed
#2680EB
;
color
:
#2680EB
;
text-align
:
center
;
line-height
:
2
75
px
;
line-height
:
2
20
px
;
border-radius
:
4px
;
}
.gs_set
.gs_card_box
.gs_add
i
{
...
...
@@ -340,7 +339,7 @@
height
:
56px
;
border-radius
:
28px
4px
4px
28px
;
border
:
1px
solid
#2d8cf0
;
margin
:
15px
23
px
;
margin
:
15px
14
px
;
}
.add_user
.gd_userB
.user_item
i
{
font-size
:
56px
;
...
...
@@ -348,6 +347,7 @@
color
:
#2680EB
;
}
.add_user
.gd_userB
.user_item
.gd_user
{
line-height
:
22px
;
padding
:
6px
;
color
:
#707070
;
}
...
...
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