Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangweidong
patzn-cloud-web-back-soil
Commits
82b907f4
Commit
82b907f4
authored
Jun 30, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计查询修改
parent
cde7638f
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
977 additions
and
96 deletions
+977
-96
meter-entrust.js
api/meter/meter-entrust.js
+9
-0
meter-sample.js
api/meter/meter-sample.js
+2
-0
MeterGoOutEntrust.vue
pages/meter-entrust/go-out-test/MeterGoOutEntrust.vue
+1
-1
MeterSendEntrust.vue
pages/meter-entrust/send-test/MeterSendEntrust.vue
+37
-4
MeterSampleProgress.vue
pages/meter-progress/progress-sample/MeterSampleProgress.vue
+20
-6
MeterEntrustReceiveIndex.vue
pages/meter-send/receive-sample/MeterEntrustReceiveIndex.vue
+18
-2
MeterReceiveEntrust.vue
pages/meter-send/receive-sample/MeterReceiveEntrust.vue
+14
-11
MeterReceiveEntrustHis.vue
pages/meter-send/receive-sample/MeterReceiveEntrustHis.vue
+104
-36
MeterSampleManage.vue
pages/meter-send/receive-sample/MeterSampleManage.vue
+12
-9
MeterSampleReceiveHis.vue
pages/meter-send/receive-sample/MeterSampleReceiveHis.vue
+440
-0
MeterTaskDistributeHis.vue
pages/meter-send/task-distribute/MeterTaskDistributeHis.vue
+40
-24
MeterTaskDistributeIndex.vue
...s/meter-send/task-distribute/MeterTaskDistributeIndex.vue
+19
-3
MeterAnnualEntrust.vue
pages/meter-statistics/annual-entrust/MeterAnnualEntrust.vue
+255
-0
meter-routes.js
router/meter-routes.js
+6
-0
No files found.
api/meter/meter-entrust.js
View file @
82b907f4
...
@@ -48,6 +48,11 @@ export default {
...
@@ -48,6 +48,11 @@ export default {
http
http
.
post
(
'meter/v1/entrust/page_sample_receive_entrust'
,
data
)
.
post
(
'meter/v1/entrust/page_sample_receive_entrust'
,
data
)
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
pageEntrustReceiveHis
:
data
=>
http
.
post
(
'meter/v1/entrust/page_sample_receive_entrust_his'
,
data
)
.
then
(
res
=>
res
),
pageSubpackageEntrust
:
data
=>
pageSubpackageEntrust
:
data
=>
http
http
.
post
(
'meter/v1/entrust/page_subpackage_entrust'
,
data
)
.
post
(
'meter/v1/entrust/page_subpackage_entrust'
,
data
)
...
@@ -95,6 +100,10 @@ export default {
...
@@ -95,6 +100,10 @@ export default {
https
https
.
post
(
'meter/v1/entrust/submit_to_review?ids='
+
data
)
.
post
(
'meter/v1/entrust/submit_to_review?ids='
+
data
)
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
submitSkipReview
:
data
=>
https
.
post
(
'meter/v1/entrust/submit_to_skip_review?ids='
+
data
)
.
then
(
res
=>
res
),
submitToEntrustRegister
:
data
=>
submitToEntrustRegister
:
data
=>
https
https
.
post
(
'meter/v1/entrust/submit_to_entrust_register?ids='
+
data
)
.
post
(
'meter/v1/entrust/submit_to_entrust_register?ids='
+
data
)
...
...
api/meter/meter-sample.js
View file @
82b907f4
...
@@ -13,6 +13,8 @@ export default {
...
@@ -13,6 +13,8 @@ export default {
pageSampleReceive
:
data
=>
pageSampleReceive
:
data
=>
http
.
post
(
'meter/v1/sample/page_sample_receive'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'meter/v1/sample/page_sample_receive'
,
data
).
then
(
res
=>
res
),
pageSampleReceiveHis
:
data
=>
http
.
post
(
'meter/v1/sample/page_sample_receive_his'
,
data
).
then
(
res
=>
res
),
pageSampleDistribute
:
data
=>
pageSampleDistribute
:
data
=>
http
.
post
(
'meter/v1/sample/page_sample_distribute'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'meter/v1/sample/page_sample_distribute'
,
data
).
then
(
res
=>
res
),
...
...
pages/meter-entrust/go-out-test/MeterGoOutEntrust.vue
View file @
82b907f4
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</div>
</div>
<FileManage
ref=
"FileManage"
></FileManage>
<FileManage
ref=
"FileManage"
></FileManage>
<MeterSubcontractorEdit
ref=
"editSubcontractorModal"
@
on-result-change=
"_formSearch"
></MeterSubcontractorEdit>
<MeterSubcontractorEdit
ref=
"editSubcontractorModal"
@
on-result-change=
"_formSearch"
></MeterSubcontractorEdit>
<operationModal
ref=
"operationModal"
></operationModal>
<operationModal
ref=
"operationModal"
@
on-result-change=
"_page"
></operationModal>
<MeterSampleManage
ref=
"meterSampleManageModal"
@
on-result-change=
"_page"
></MeterSampleManage>
<MeterSampleManage
ref=
"meterSampleManageModal"
@
on-result-change=
"_page"
></MeterSampleManage>
</div>
</div>
...
...
pages/meter-entrust/send-test/MeterSendEntrust.vue
View file @
82b907f4
...
@@ -70,6 +70,11 @@ export default {
...
@@ -70,6 +70,11 @@ export default {
{
{
type
:
'success'
,
type
:
'success'
,
id
:
''
,
id
:
''
,
name
:
'提交至评审'
},
{
type
:
'success'
,
id
:
''
,
name
:
'提交'
name
:
'提交'
}
}
],
],
...
@@ -134,9 +139,12 @@ export default {
...
@@ -134,9 +139,12 @@ export default {
case
'添加'
:
case
'添加'
:
this
.
_editModal
(
false
)
this
.
_editModal
(
false
)
break
break
case
'提交'
:
case
'提交
至评审
'
:
this
.
_submitToReview
()
this
.
_submitToReview
()
break
break
case
'提交'
:
this
.
_submitToSkipReview
()
break
case
'search'
:
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
this
.
searchOpen
=
!
this
.
searchOpen
break
break
...
@@ -173,6 +181,21 @@ export default {
...
@@ -173,6 +181,21 @@ export default {
_submitToReview
()
{
_submitToReview
()
{
this
.
_submitByContractIds
(
'委托评审'
)
this
.
_submitByContractIds
(
'委托评审'
)
},
},
_submitToSkipReview
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要提交 '
+
ids
.
length
+
' 条记录?'
,
onOk
:
()
=>
{
this
.
_subToSkipRe
(
ids
)
}
})
}
},
_submitByContractIds
(
cont
)
{
_submitByContractIds
(
cont
)
{
const
ids
=
this
.
selectIds
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
if
(
ids
.
length
===
0
)
{
...
@@ -182,12 +205,22 @@ export default {
...
@@ -182,12 +205,22 @@ export default {
title
:
'提示'
,
title
:
'提示'
,
content
:
'确定要把这 '
+
ids
.
length
+
' 条记录提交到'
+
cont
+
'?'
,
content
:
'确定要把这 '
+
ids
.
length
+
' 条记录提交到'
+
cont
+
'?'
,
onOk
:
()
=>
{
onOk
:
()
=>
{
const
result
=
meterEntrust
.
submit
(
ids
)
this
.
_subToRe
(
ids
)
}
})
}
},
_subToRe
:
async
function
(
ids
)
{
const
result
=
await
meterEntrust
.
submit
(
ids
)
if
(
result
)
{
if
(
result
)
{
this
.
_resultChange
(
'提交成功'
)
this
.
_resultChange
(
'提交成功'
)
}
}
}
},
})
_subToSkipRe
:
async
function
(
ids
)
{
const
result
=
await
meterEntrust
.
submitSkipReview
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功'
)
}
}
},
},
_resultChange
(
msg
)
{
_resultChange
(
msg
)
{
...
...
pages/meter-progress/progress-sample/MeterSampleProgress.vue
View file @
82b907f4
...
@@ -56,6 +56,9 @@
...
@@ -56,6 +56,9 @@
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</span>
<span
v-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</span>
<span
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else-if=
"item.type"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'出检'
:
'送检'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</
template
>
</vxe-table-column>
</vxe-table-column>
...
@@ -79,12 +82,23 @@ export default {
...
@@ -79,12 +82,23 @@ export default {
return
{
return
{
formId
:
'meterAptitudeFormId'
,
formId
:
'meterAptitudeFormId'
,
pageColumns
:
[
pageColumns
:
[
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
160
},
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
140
},
{
title
:
'委托单号'
,
key
:
'entrustCode'
},
{
title
:
'委托单号'
,
key
:
'entrustCode'
,
width
:
130
},
{
title
:
'样品名称'
,
key
:
'name'
},
{
title
:
'委托类型'
,
key
:
'type'
,
width
:
110
,
type
:
true
},
{
title
:
'样品编号'
,
key
:
'code'
},
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
140
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
},
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
130
},
{
title
:
'处理进度'
,
key
:
'status'
,
status
:
true
}
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
,
width
:
130
},
{
title
:
'处理进度'
,
key
:
'status'
,
status
:
true
,
width
:
120
},
{
title
:
'收样人'
,
key
:
'receiver'
,
width
:
120
},
{
title
:
'收样人时间'
,
key
:
'receiveTime'
,
width
:
120
},
{
title
:
'任务分配人'
,
key
:
'assignor'
,
width
:
120
},
{
title
:
'任务分配时间'
,
key
:
'allocateTime'
,
width
:
120
},
{
title
:
'领用人'
,
key
:
'flower'
,
width
:
120
},
{
title
:
'领用时间'
,
key
:
'flowTime'
,
width
:
120
},
{
title
:
'入库人'
,
key
:
'sampleInner'
,
width
:
120
},
{
title
:
'入库时间'
,
key
:
'sampleInnerTime'
,
width
:
120
},
{
title
:
'出库人'
,
key
:
'sampleOuter'
,
width
:
120
},
{
title
:
'出库时间'
,
key
:
'outTime'
,
width
:
120
}
],
],
btn
:
[],
btn
:
[],
iconMsg
:
[
iconMsg
:
[
...
...
pages/meter-send/receive-sample/MeterEntrustReceiveIndex.vue
View file @
82b907f4
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
<div>
<div>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<div
class=
"layout-content-main"
>
<el-tabs
v-model=
"activeName"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
<el-tab-pane
label=
"待完成"
name=
"wait"
>
<el-tab-pane
label=
"待完成"
name=
"wait"
>
<MeterReviewEntrust
ref=
"waitTabs"
></MeterReviewEntrust>
<MeterReviewEntrust
ref=
"waitTabs"
></MeterReviewEntrust>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"
历史评审
"
name=
"his"
>
<el-tab-pane
label=
"
收样历史
"
name=
"his"
>
<MeterReviewEntrustHis
ref=
"hisTabs"
></MeterReviewEntrustHis>
<MeterReviewEntrustHis
ref=
"hisTabs"
></MeterReviewEntrustHis>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
...
@@ -28,6 +28,22 @@ export default {
...
@@ -28,6 +28,22 @@ export default {
return
{
return
{
activeName
:
'wait'
activeName
:
'wait'
}
}
},
mounted
()
{
this
.
activeName
=
'wait'
this
.
_page
()
},
methods
:
{
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'wait'
)
{
this
.
_page
()
}
else
{
this
.
$refs
.
hisTabs
.
_page
()
}
},
_page
()
{
this
.
$refs
.
waitTabs
.
_page
()
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/meter-send/receive-sample/MeterReceiveEntrust.vue
View file @
82b907f4
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
id=
"formId"
v-show=
"searchOpen"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<Form
id=
"formId"
v-show=
"searchOpen"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"
实验室名称
:"
>
<Form-item
class=
"search-item"
label=
"
委托单位
:"
>
<Input
v-model=
"formObj.
name"
@
on-enter=
"_formSearch"
name=
"name"
placeholder=
"请输入实验室名称
"
clearable
/>
<Input
v-model=
"formObj.
client"
@
on-enter=
"_formSearch"
name=
"client"
placeholder=
"请输入委托单位
"
clearable
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-item"
label=
"
资质
:"
>
<Form-item
class=
"search-item"
label=
"
委托编号
:"
>
<Input
v-model=
"formObj.
aptitude"
@
on-enter=
"_formSearch"
name=
"aptitude"
placeholder=
"请输入资质
"
clearable
/>
<Input
v-model=
"formObj.
entrustCode"
@
on-enter=
"_formSearch"
name=
"entrustCode"
placeholder=
"请输入委托编号
"
clearable
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-btn"
>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
...
@@ -46,21 +46,23 @@
...
@@ -46,21 +46,23 @@
</div>
</div>
</div>
</div>
<MeterSampleManage
ref=
"meterSampleManageModal"
@
on-result-change=
"_page"
></MeterSampleManage>
<MeterSampleManage
ref=
"meterSampleManageModal"
@
on-result-change=
"_page"
></MeterSampleManage>
<MeterEntrustDetail
ref=
"meterSampleEdit"
@
on-result-change=
"_componentResult"
></MeterEntrustDetail>
<MeterEntrustDetail
ref=
"meterSampleEdit"
@
on-result-change=
"_page"
></MeterEntrustDetail>
<FileManage
ref=
"FileManage"
></FileManage>
<FileManage
ref=
"FileManage"
@
on-result-change=
"_page"
></FileManage>
<MeterEntrustRecord
ref=
"meterEntrustRecordModal"
@
on-result-change=
"_page"
></MeterEntrustRecord>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
meterEntrust
,
meterSubcontractor
}
from
'../../../api'
import
{
meterEntrust
,
meterSubcontractor
}
from
'../../../api'
import
MeterEntrustRecord
from
'../../../components/operation/Operation'
import
MeterSampleManage
from
'./MeterSampleManage'
import
MeterSampleManage
from
'./MeterSampleManage'
import
MeterEntrustDetail
from
'./MeterEntrustDetail'
import
MeterEntrustDetail
from
'./MeterEntrustDetail'
export
default
{
export
default
{
components
:
{
MeterSampleManage
,
MeterEntrustDetail
},
components
:
{
MeterSampleManage
,
MeterEntrustDetail
,
MeterEntrustRecord
},
data
()
{
data
()
{
return
{
return
{
currentComponent
:
'FoodSampleGovern'
,
currentComponent
:
'FoodSampleGovern'
,
formId
:
'meterReviewEntrustFormId'
,
formId
:
'meterReviewEntrustFormId'
,
searchOpen
:
fals
e
,
searchOpen
:
tru
e
,
btn
:
[
btn
:
[
// {
// {
// // meter-review-entrust-pass-btn
// // meter-review-entrust-pass-btn
...
@@ -94,13 +96,14 @@ export default {
...
@@ -94,13 +96,14 @@ export default {
}
}
],
],
formObj
:
{
formObj
:
{
name
:
undefined
,
client
:
undefined
,
aptitu
de
:
undefined
entrustCo
de
:
undefined
},
},
selectIds
:
[],
selectIds
:
[],
getPage
:
{},
getPage
:
{},
pageColumns
:
[
pageColumns
:
[
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
200
},
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
200
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
130
},
{
title
:
'联系人'
,
key
:
'person'
,
width
:
120
},
{
title
:
'联系人'
,
key
:
'person'
,
width
:
120
},
{
title
:
'联系电话'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'联系电话'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'传真'
,
key
:
'fax'
,
width
:
120
},
{
title
:
'传真'
,
key
:
'fax'
,
width
:
120
},
...
@@ -195,7 +198,7 @@ export default {
...
@@ -195,7 +198,7 @@ export default {
}
}
},
},
_record
(
id
)
{
_record
(
id
)
{
this
.
$refs
.
ref
Modal
.
_open
(
id
)
this
.
$refs
.
meterEntrustRecord
Modal
.
_open
(
id
)
},
},
_tableResultChange
(
msg
,
data
)
{
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
switch
(
msg
)
{
...
...
pages/meter-send/receive-sample/MeterReceiveEntrustHis.vue
View file @
82b907f4
...
@@ -6,29 +6,29 @@
...
@@ -6,29 +6,29 @@
<Row>
<Row>
<!--查询-->
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
id=
"formId"
v-show=
"searchOpen
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<Form
v-show=
"searchOpen"
id=
"formId
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"
实验室名称
:"
>
<Form-item
class=
"search-item"
label=
"
委托单位
:"
>
<Input
v-model=
"formObj.
name"
@
on-enter=
"_formSearch"
name=
"name"
placeholder=
"请输入实验室名称"
clearable
/>
<Input
v-model=
"formObj.
client"
name=
"client"
placeholder=
"请输入委托单位"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-item"
label=
"
资质
:"
>
<Form-item
class=
"search-item"
label=
"
委托编号
:"
>
<Input
v-model=
"formObj.
aptitude"
@
on-enter=
"_formSearch"
name=
"aptitude"
placeholder=
"请输入资质"
clearable
/>
<Input
v-model=
"formObj.
entrustCode"
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-btn"
>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
</Form-item>
</Form-item>
</Form>
</Form>
</Col>
</Col>
<!--操作-->
<!--操作-->
<Col
span=
"24"
>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick
"
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide
"
class=
"contHide
"
></btn-list>
@
on-result-change=
"_btnClick
"
></btn-list>
</Col>
</Col>
<!--表格-->
<!--表格-->
<Col
span=
"24"
>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
hide-checkbox
>
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
<vxe-table-column
v-for=
"item in pageColumns"
v-for=
"item in pageColumns"
:key=
"item.key"
:key=
"item.key"
...
@@ -45,37 +45,50 @@
...
@@ -45,37 +45,50 @@
</Row>
</Row>
</div>
</div>
</div>
</div>
<MeterSampleManage
ref=
"meterSampleManageModal"
@
on-result-change=
"_page"
></MeterSampleManage>
<MeterEntrustDetail
ref=
"meterSampleEdit"
@
on-result-change=
"_page"
></MeterEntrustDetail>
<FileManage
ref=
"FileManage"
@
on-result-change=
"_page"
></FileManage>
<MeterEntrustRecord
ref=
"meterEntrustRecordModal"
@
on-result-change=
"_page"
></MeterEntrustRecord>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
meterEntrust
,
meterSubcontractor
}
from
'../../../api'
import
{
meterEntrust
,
meterSubcontractor
}
from
'../../../api'
import
MeterEntrustRecord
from
'../../../components/operation/Operation'
import
MeterSampleManage
from
'./MeterSampleReceiveHis'
import
MeterEntrustDetail
from
'./MeterEntrustDetail'
export
default
{
export
default
{
components
:
{},
components
:
{
MeterSampleManage
,
MeterEntrustDetail
,
MeterEntrustRecord
},
data
()
{
data
()
{
return
{
return
{
currentComponent
:
''
,
currentComponent
:
'
FoodSampleGovern
'
,
formId
:
'meter
Subcontractor
FormId'
,
formId
:
'meter
ReviewEntrust
FormId'
,
searchOpen
:
fals
e
,
searchOpen
:
tru
e
,
btn
:
[
btn
:
[
{
// {
type
:
'success'
,
// // meter-review-entrust-pass-btn
id
:
'meter-subcontractor-add-btn'
,
// type: 'success',
name
:
'添加'
// id: '',
}
// name: '通过'
// },
// // meter-review-entrust-back-btn
// {
// type: 'success',
// id: '',
// name: '驳回'
// }
],
],
iconMsg
:
[
iconMsg
:
[
{
{
type
:
'
ios-clock
'
,
type
:
'
md-paper
'
,
id
:
''
,
id
:
''
,
name
:
'
编辑
'
name
:
'
详情
'
},
},
{
{
type
:
'ios-
clock
'
,
type
:
'ios-
beaker
'
,
id
:
''
,
id
:
''
,
name
:
'
资质项目
'
name
:
'
样品管理
'
},
},
{
type
:
'ios-clock'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'ios-clock'
,
id
:
''
,
name
:
'删除'
},
{
{
type
:
'ios-clock'
,
type
:
'ios-clock'
,
id
:
''
,
id
:
''
,
...
@@ -83,13 +96,14 @@ export default {
...
@@ -83,13 +96,14 @@ export default {
}
}
],
],
formObj
:
{
formObj
:
{
name
:
undefined
,
client
:
undefined
,
aptitu
de
:
undefined
entrustCo
de
:
undefined
},
},
selectIds
:
[],
selectIds
:
[],
getPage
:
{},
getPage
:
{},
pageColumns
:
[
pageColumns
:
[
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
200
},
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
200
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
130
},
{
title
:
'联系人'
,
key
:
'person'
,
width
:
120
},
{
title
:
'联系人'
,
key
:
'person'
,
width
:
120
},
{
title
:
'联系电话'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'联系电话'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'传真'
,
key
:
'fax'
,
width
:
120
},
{
title
:
'传真'
,
key
:
'fax'
,
width
:
120
},
...
@@ -116,6 +130,10 @@ export default {
...
@@ -116,6 +130,10 @@ export default {
this
.
_page
()
this
.
_page
()
},
},
methods
:
{
methods
:
{
_detailModal
(
data
)
{
console
.
log
(
data
)
this
.
$refs
.
meterSampleEdit
.
_open
(
data
)
},
_btnClick
(
msg
,
componentName
)
{
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
...
@@ -123,16 +141,24 @@ export default {
...
@@ -123,16 +141,24 @@ export default {
case
'添加'
:
case
'添加'
:
this
.
_editModal
(
false
)
this
.
_editModal
(
false
)
break
break
case
'通过'
:
this
.
_passReview
()
break
case
'search'
:
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
this
.
searchOpen
=
!
this
.
searchOpen
break
break
}
}
})
})
},
},
_iconClick
(
res
,
data
,
componentName
)
{
_iconClick
(
res
,
data
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
switch
(
res
)
{
case
'样品管理'
:
this
.
_manageSample
(
data
.
id
)
break
case
'详情'
:
this
.
_detailModal
(
data
)
break
case
'编辑'
:
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
this
.
_editModal
(
true
,
data
.
id
)
break
break
...
@@ -151,26 +177,45 @@ export default {
...
@@ -151,26 +177,45 @@ export default {
}
}
})
})
},
},
_manageSample
(
data
)
{
// 管理样品
this
.
$refs
.
meterSampleManageModal
.
_open
(
data
)
},
_componentResult
(
data
,
msg
)
{
switch
(
this
.
currentComponent
)
{
case
'FoodContractCompanyEdit'
:
this
.
_page
()
break
case
'FoodContractGovernEdit'
:
this
.
_page
()
break
case
'FoodContractCompanyEditByDLTB'
:
this
.
_page
()
break
case
'FoodContractCompanyEditByHES'
:
this
.
_page
()
break
}
},
_record
(
id
)
{
_record
(
id
)
{
this
.
$refs
.
ref
Modal
.
_open
(
id
)
this
.
$refs
.
meterEntrustRecord
Modal
.
_open
(
id
)
},
},
_tableResultChange
(
msg
,
data
)
{
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodSubcontracter
.
page
break
case
'iconClick'
:
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
break
case
'changeSize'
:
case
'changeSize'
:
this
.
_page
()
this
.
_page
()
break
break
case
'selectIds'
:
this
.
selectIds
=
data
break
}
}
},
},
_page
:
async
function
()
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterEntrust
.
pageEntrustReceiveHis
(
this
.
formObj
)
const
result
=
await
meterEntrust
.
pageSendEntrust
(
this
.
formObj
)
if
(
result
)
{
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
this
.
getPage
=
result
...
@@ -200,6 +245,29 @@ export default {
...
@@ -200,6 +245,29 @@ export default {
this
.
$refs
.
editSubcontractorModal
.
_open
()
this
.
$refs
.
editSubcontractorModal
.
_open
()
}
}
},
},
_passReview
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择要通过评审的委托单!'
)
return
false
}
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定通过该委托单?'
,
onOk
:
()
=>
{
this
.
_passEntrustReview
(
this
.
selectIds
)
}
})
},
_passEntrustReview
:
async
function
(
ids
)
{
const
result
=
await
meterEntrust
.
passReview
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'提交成功!'
)
await
this
.
_page
()
}
},
// 追加项目
// 追加项目
_itemModal
(
data
)
{
_itemModal
(
data
)
{
this
.
$refs
.
refModal
.
_open
(
data
)
this
.
$refs
.
refModal
.
_open
(
data
)
...
@@ -207,7 +275,7 @@ export default {
...
@@ -207,7 +275,7 @@ export default {
_upload
(
id
)
{
_upload
(
id
)
{
// 上传文件
// 上传文件
this
.
$refs
.
refModal
.
_open
(
id
,
'subcontractorId'
)
this
.
$refs
.
FileManage
.
_open
(
id
,
'subcontractorId'
)
},
},
_getById
:
async
function
(
id
)
{
_getById
:
async
function
(
id
)
{
const
result
=
await
meterSubcontractor
.
getById
(
id
)
const
result
=
await
meterSubcontractor
.
getById
(
id
)
...
...
pages/meter-send/receive-sample/MeterSampleManage.vue
View file @
82b907f4
...
@@ -43,11 +43,15 @@
...
@@ -43,11 +43,15 @@
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
</div>
</div>
<div
v-else-if=
"item.key==='type'"
>
<div
v-else-if=
"item.key==='type'"
>
<Select
v-model=
"scope.row.type"
>
<span
v-if=
"scope.row[item.key]===0"
>
<Option
v-for=
"(item,index) in options"
:key=
"item.name"
:value=
"index"
>
检定
{{
item
.
name
}}
</span>
</Option>
<span
v-if=
"scope.row[item.key]===1"
>
</Select>
校准
</span>
<span
v-if=
"scope.row[item.key]===2"
>
外观检查
</span>
</div>
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</
template
>
...
@@ -83,9 +87,9 @@ export default {
...
@@ -83,9 +87,9 @@ export default {
// {id: '', name: '删除'},
// {id: '', name: '删除'},
// ],
// ],
iconMsg
:
[
iconMsg
:
[
{
type
:
'compose'
,
id
:
''
,
name
:
'编辑'
},
//
{ type: 'compose', id: '', name: '编辑' },
{
type
:
'ios-copy'
,
id
:
''
,
name
:
'复制'
,
componentName
:
'CopyModal'
},
//
{ type: 'ios-copy', id: '', name: '复制', componentName: 'CopyModal' },
{
type
:
'trash-a'
,
id
:
''
,
name
:
'删除'
}
//
{ type: 'trash-a', id: '', name: '删除' }
],
],
footerList
:
[
footerList
:
[
...
@@ -234,7 +238,6 @@ export default {
...
@@ -234,7 +238,6 @@ export default {
},
},
_page
:
async
function
()
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterSample
.
pageSampleReceive
(
this
.
formObj
)
const
result
=
await
meterSample
.
pageSampleReceive
(
this
.
formObj
)
if
(
result
)
{
if
(
result
)
{
this
.
getPage
=
result
this
.
getPage
=
result
...
...
pages/meter-send/receive-sample/MeterSampleReceiveHis.vue
0 → 100644
View file @
82b907f4
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"1200"
class=
"modal-footer-none"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"formId"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"样品名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
placeholder=
"请输入样品名称"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
label=
"样品编号:"
class=
"search-item"
>
<Input
v-model=
"formObj.code"
placeholder=
"请输入样品编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
style=
"margin-left: -10px"
>
<Button
type=
"primary"
@
click=
"_formSearch"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide"
@
on-result-change=
"_btnClick"
></btn-list>
</Col>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
select-data
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.detail"
><a
@
click
.
stop=
"_detailModal(scope.row.id)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a></div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</div>
<div
v-else-if=
"item.key==='jobOut'"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
</div>
<div
v-else-if=
"item.key==='type'"
>
<span
v-if=
"scope.row[item.key]===0"
>
检定
</span>
<span
v-if=
"scope.row[item.key]===1"
>
校准
</span>
<span
v-if=
"scope.row[item.key]===2"
>
外观检查
</span>
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
</div>
</template>
<
script
>
import
{
meterSample
}
from
'../../../api'
export
default
{
components
:
{
// FoodSampleGovernDetail,
// CopyModal,
// FoodSampleGovernLYEdits
},
data
()
{
return
{
currentComponent
:
''
,
// btn: [
// {type: 'success', id: '', name: '添加', componentName: 'FoodSampleGovernEdit'},
// {id: 'food-gov-sample-batch-add', name: '批量添加', componentName: 'FoodSampleGovernBatchAdd'},
// {id: '', name: '导入样品', componentName: 'FoodImportSample'},
// {id: '', name: '导入检测项目', componentName: 'RelItem'},
// {id: '', name: '导入检测项目包', componentName: 'RelItemPackage'},
// {id: '', name: '复制历史样品检测项目', componentName: 'CopyHisItem'},
// {id: '', name: '删除'},
// ],
iconMsg
:
[
// { type: 'compose', id: '', name: '编辑' },
// { type: 'ios-copy', id: '', name: '复制', componentName: 'CopyModal' },
// { type: 'trash-a', id: '', name: '删除' }
],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'确定'
,
type
:
'primary'
}
],
btn
:
[
// {
// // meter-review-entrust-pass-btn
// type: 'success',
// id: '',
// name: '收样'
// }
],
options
:
[
{
name
:
'检定'
},
{
name
:
'校准'
},
{
name
:
'外观检查'
}
],
formId
:
'meterReviewSampleManageFormId'
,
showModal
:
false
,
modalTitle
:
'收样历史'
,
selectIds
:
[],
selectData
:
[],
getPage
:
{},
pageColumns
:
[
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
120
},
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
140
},
{
title
:
'检测项目'
,
key
:
'itemNames'
,
width
:
140
},
{
title
:
'型号规格'
,
key
:
'spec'
,
width
:
140
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
,
width
:
140
},
{
title
:
'检测类型'
,
key
:
'type'
,
width
:
140
},
{
title
:
'收样人'
,
key
:
'receiver'
,
width
:
140
},
{
title
:
'收样时间'
,
key
:
'receiveTime'
,
width
:
140
,
dateTime
:
true
},
{
title
:
'数量'
,
key
:
'quantity'
,
width
:
140
}
],
dateList
:
[],
formObj
:
{
entrustId
:
undefined
,
name
:
undefined
,
code
:
undefined
,
type
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
methods
:
{
_cancel
()
{
this
.
showModal
=
false
this
.
$emit
(
'on-result-change'
)
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'确定'
:
this
.
_cancel
()
break
}
},
_dateChange
(
data
)
{
this
.
formObj
.
ctimeBegin
=
data
[
0
]
this
.
formObj
.
ctimeEnd
=
data
[
1
]
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'收样'
:
this
.
_receiveSample
()
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
}
})
},
_iconClick
(
res
,
data
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'编辑'
:
localStorage
.
setItem
(
'type'
,
data
.
type
)
if
(
data
.
type
===
2
)
{
this
.
_editLY
(
data
.
id
)
// 粮油的编辑页
}
else
{
this
.
_editModal
(
true
,
data
.
id
)
}
break
case
'复制'
:
this
.
_copy
(
data
.
id
,
data
.
type
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
case
'检测项目'
:
this
.
_itemDetail
(
data
.
id
)
break
}
})
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'selectData'
:
const
selectIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
this
.
selectData
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_open
(
id
)
{
this
.
formObj
.
entrustId
=
id
this
.
showModal
=
true
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterSample
.
pageSampleReceiveHis
(
this
.
formObj
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/deleteByIds'
,
ids
).
then
(()
=>
{
this
.
_resultChange
(
'删除成功!'
)
})
}
})
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_detailModal
(
id
)
{
this
.
currentComponent
=
'FoodSampleGovernDetail'
this
.
$nextTick
(
function
()
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
id
).
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
},
_editModal
(
edit
,
id
)
{
this
.
currentComponent
=
'FoodSampleGovernEdit'
this
.
$nextTick
(
function
()
{
if
(
edit
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
id
).
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
this
.
contractId
)
})
}
else
{
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
contractId
)
}
})
},
_editLY
(
id
)
{
// 粮油的编辑
this
.
currentComponent
=
'FoodSampleGovernLYEdit'
this
.
$nextTick
(
function
()
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
id
).
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
this
.
contractId
)
})
})
},
_search
()
{
this
.
_page
()
},
_searchParams
()
{
const
data
=
this
.
$serialize
(
'search-sample-govern'
)
return
this
.
$extend
(
data
,
this
.
pageParams
)
},
_resultChange
(
msg
)
{
if
(
this
.
$store
.
state
.
FoodSample
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
}
},
_copy
(
sampleId
,
type
)
{
this
.
$refs
.
refModal
.
_open
(
sampleId
,
type
)
},
// 复制样品
_copySample
(
data
)
{
if
(
data
.
type
===
2
)
{
// 粮油的编辑页
this
.
currentComponent
=
'FoodSampleGovernLYEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopySample
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
}
else
{
this
.
currentComponent
=
'FoodSampleGovernEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopySample
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
}
},
_copyAll
(
data
)
{
if
(
data
.
type
===
2
)
{
// 粮油的编辑页
this
.
currentComponent
=
'FoodSampleGovernLYEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopyAll
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
}
else
{
this
.
currentComponent
=
'FoodSampleGovernEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopyAll
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
}
},
// 导入样品
_importSample
()
{
const
data
=
{
importUrl
:
'/food/v1/sample/government/import_'
+
this
.
contractId
,
downloadUrl
:
'/food/v1/excel/template/FoodSampleGovernment'
,
title
:
'导入'
}
this
.
$refs
.
refModal
.
_open
(
data
)
},
// 导入检测项目
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
,
this
.
selectData
[
0
])
}
},
_receiveSample
()
{
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品进行接收!'
)
return
false
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定接收'
+
this
.
selectIds
.
length
+
'条记录?'
,
onOk
:
()
=>
{
this
.
_receive
(
this
.
selectIds
)
}
})
}
},
_receive
:
async
function
(
ids
)
{
const
result
=
await
meterSample
.
submitReceive
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'接收成功!'
)
await
this
.
_page
()
}
},
_importItemPackage
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
,
'batch-rel-package-item'
)
}
},
_copyHisItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
}
},
_itemDetail
(
id
)
{
this
.
$refs
.
foodItem
.
_open
(
id
)
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
</
script
>
pages/meter-send/task-distribute/MeterTaskDistributeHis.vue
View file @
82b907f4
...
@@ -6,24 +6,24 @@
...
@@ -6,24 +6,24 @@
<Row>
<Row>
<!--查询-->
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
id=
"formId"
v-show=
"searchOpen
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<Form
v-show=
"searchOpen"
id=
"formId
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"
实验室名称
:"
>
<Form-item
class=
"search-item"
label=
"
委托单位
:"
>
<Input
v-model=
"formObj.
name"
@
on-enter=
"_formSearch"
name=
"name"
placeholder=
"请输入实验室名称"
clearable
/>
<Input
v-model=
"formObj.
client"
name=
"client"
placeholder=
"请输入委托单位"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-item"
label=
"
资质
:"
>
<Form-item
class=
"search-item"
label=
"
委托编号
:"
>
<Input
v-model=
"formObj.
aptitude"
@
on-enter=
"_formSearch"
name=
"aptitude"
placeholder=
"请输入资质"
clearable
/>
<Input
v-model=
"formObj.
entrustCode"
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-btn"
>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
</Form-item>
</Form-item>
</Form>
</Form>
</Col>
</Col>
<!--操作-->
<!--操作-->
<Col
span=
"24"
>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick
"
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide
"
class=
"contHide
"
></btn-list>
@
on-result-change=
"_btnClick
"
></btn-list>
</Col>
</Col>
<!--表格-->
<!--表格-->
<Col
span=
"24"
>
<Col
span=
"24"
>
...
@@ -45,15 +45,23 @@
...
@@ -45,15 +45,23 @@
</Row>
</Row>
</div>
</div>
</div>
</div>
<FileManage
ref=
"FileManage"
></FileManage>
<MeterOutTaskAlloca
ref=
"taskAllocaModal"
@
on-result-change=
"_page"
></MeterOutTaskAlloca>
<MeterSubcontractorEdit
ref=
"editSubcontractorModal"
@
on-result-change=
"_formSearch"
></MeterSubcontractorEdit>
<MeterSubcontractorEdit
ref=
"editSubcontractorModal"
@
on-result-change=
"_formSearch"
></MeterSubcontractorEdit>
<MeterOutTaskOperation
ref=
"operationModal"
></MeterOutTaskOperation>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
meterEntrust
}
from
'../../../api'
import
{
meterEntrust
}
from
'../../../api'
import
MeterSubcontractorEdit
from
'./MeterTestEdit'
import
MeterSubcontractorEdit
from
'./MeterTestEdit'
import
MeterOutTaskAlloca
from
'./MeterTaskAlloca'
import
MeterOutTaskOperation
from
'./MeterTaskOperation'
export
default
{
export
default
{
components
:
{
MeterSubcontractorEdit
},
components
:
{
MeterSubcontractorEdit
,
MeterOutTaskAlloca
,
MeterOutTaskOperation
},
data
()
{
data
()
{
return
{
return
{
currentComponent
:
''
,
currentComponent
:
''
,
...
@@ -72,18 +80,18 @@ export default {
...
@@ -72,18 +80,18 @@ export default {
}
}
],
],
iconMsg
:
[
iconMsg
:
[
// {
// type: 'md-create',
// id: '',
// name: '编辑'
// },
{
{
type
:
'
md-create
'
,
type
:
'
ios-contact
'
,
id
:
''
,
id
:
''
,
name
:
'编辑'
name
:
'任务分配'
},
{
type
:
'ios-beaker'
,
id
:
''
,
name
:
'管理样品'
},
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
},
//
{ type: 'md-remove-circle', id: '', name: '删除' },
{
{
type
:
'ios-clock'
,
type
:
'ios-clock'
,
id
:
''
,
id
:
''
,
...
@@ -91,13 +99,14 @@ export default {
...
@@ -91,13 +99,14 @@ export default {
}
}
],
],
formObj
:
{
formObj
:
{
name
:
undefined
,
client
:
undefined
,
aptitu
de
:
undefined
entrustCo
de
:
undefined
},
},
selectIds
:
[],
selectIds
:
[],
getPage
:
{},
getPage
:
{},
pageColumns
:
[
pageColumns
:
[
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
200
},
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
180
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
120
},
{
title
:
'联系人'
,
key
:
'person'
,
width
:
120
},
{
title
:
'联系人'
,
key
:
'person'
,
width
:
120
},
{
title
:
'联系电话'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'联系电话'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'传真'
,
key
:
'fax'
,
width
:
120
},
{
title
:
'传真'
,
key
:
'fax'
,
width
:
120
},
...
@@ -164,6 +173,9 @@ export default {
...
@@ -164,6 +173,9 @@ export default {
this
.
currentComponent
=
componentName
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
switch
(
res
)
{
case
'任务分配'
:
this
.
_taskAllocaModal
(
data
)
break
case
'编辑'
:
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
this
.
_editModal
(
true
,
data
.
id
)
break
break
...
@@ -182,8 +194,12 @@ export default {
...
@@ -182,8 +194,12 @@ export default {
}
}
})
})
},
},
_taskAllocaModal
(
data
)
{
// 管理样品
this
.
$refs
.
taskAllocaModal
.
_open
(
data
.
id
)
},
_record
(
id
)
{
_record
(
id
)
{
this
.
$refs
.
ref
Modal
.
_open
(
id
)
this
.
$refs
.
operation
Modal
.
_open
(
id
)
},
},
_tableResultChange
(
msg
,
data
)
{
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
switch
(
msg
)
{
...
@@ -204,7 +220,7 @@ export default {
...
@@ -204,7 +220,7 @@ export default {
_page
:
async
function
()
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterEntrust
.
page
GoOut
Entrust
(
this
.
formObj
)
const
result
=
await
meterEntrust
.
page
Distribute
Entrust
(
this
.
formObj
)
if
(
result
)
{
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
this
.
getPage
=
result
...
@@ -240,7 +256,7 @@ export default {
...
@@ -240,7 +256,7 @@ export default {
_upload
(
id
)
{
_upload
(
id
)
{
// 上传文件
// 上传文件
this
.
$refs
.
refModal
.
_open
(
id
,
'subcontractorId'
)
this
.
$refs
.
FileManage
.
_open
(
id
,
'subcontractorId'
)
},
},
_getById
:
async
function
(
id
)
{
_getById
:
async
function
(
id
)
{
const
result
=
await
meterEntrust
.
getVOById
(
id
)
const
result
=
await
meterEntrust
.
getVOById
(
id
)
...
...
pages/meter-send/task-distribute/MeterTaskDistributeIndex.vue
View file @
82b907f4
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
<div>
<div>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<div
class=
"layout-content-main"
>
<el-tabs
v-model=
"activeName"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
<el-tab-pane
label=
"
待完成
"
name=
"wait"
>
<el-tab-pane
label=
"
任务分配
"
name=
"wait"
>
<MeterGoOutEntrust
ref=
"waitTabs"
></MeterGoOutEntrust>
<MeterGoOutEntrust
ref=
"waitTabs"
></MeterGoOutEntrust>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"历史记录"
name=
"his"
>
<el-tab-pane
label=
"
任务分配
历史记录"
name=
"his"
>
<MeterGoOutEntrustHis
ref=
"hisTabs"
></MeterGoOutEntrustHis>
<MeterGoOutEntrustHis
ref=
"hisTabs"
></MeterGoOutEntrustHis>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
...
@@ -28,6 +28,22 @@ export default {
...
@@ -28,6 +28,22 @@ export default {
return
{
return
{
activeName
:
'wait'
activeName
:
'wait'
}
}
},
mounted
()
{
this
.
activeName
=
'wait'
this
.
_page
()
},
methods
:
{
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'wait'
)
{
this
.
_page
()
}
else
{
this
.
$refs
.
hisTabs
.
_page
()
}
},
_page
()
{
this
.
$refs
.
waitTabs
.
_page
()
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/meter-statistics/annual-entrust/MeterAnnualEntrust.vue
0 → 100644
View file @
82b907f4
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
style=
"margin-top:10px"
>
<Form
:d=
"formId"
:label-width=
"90"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"检定依据:"
style=
"margin-left: -20px"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.code"
name=
"judgeBasis"
placeholder=
"请输入判定依据"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"检定依据名称:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.name"
name=
"judgeBasisName"
placeholder=
"请输入判定依据名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:form-id=
"formId"
:tableHeight=
"tableHeight"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<
script
>
import
{
meterAptitude
}
from
'../../../api'
export
default
{
name
:
'MeterAptitudeStandard'
,
components
:
{},
data
()
{
return
{
formId
:
'meterAptitudeFormId'
,
pageColumns
:
[
{
title
:
'检定依据'
,
key
:
'code'
,
width
:
160
},
{
title
:
'检定依据名称'
,
key
:
'name'
},
{
title
:
'登记时间'
,
key
:
'ctime'
,
date
:
true
,
width
:
140
},
{
title
:
'备注'
,
key
:
'remark'
}
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
formObj
:
{
name
:
undefined
,
code
:
undefined
},
searchOpen
:
true
,
selectIds
:
[],
getPage
:
{},
typeData
:
[]
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导入'
:
this
.
_import
()
break
case
'导出'
:
this
.
_export
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
}
},
_page
:
async
function
()
{
console
.
log
(
9522123
)
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterAptitude
.
page
(
this
.
formObj
)
if
(
result
)
{
console
.
log
(
55555
)
console
.
log
(
result
)
this
.
getPage
=
result
console
.
log
(
123456789
)
console
.
log
(
this
.
getPage
)
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodJudgeBasis
.
page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
// 删除
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
)
}
})
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
meterAptitude
.
deleteById
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除这 '
+
ids
.
length
+
' 条记录?'
)
}
},
// 编辑&添加
_editModal
(
edit
,
id
)
{
if
(
edit
)
{
this
.
_getById
(
id
)
// 编辑
// this.$store.dispatch('FoodJudgeBasis/getById', id).then(() => {
// this.$refs.editModal._open(this.$store.state.FoodJudgeBasis.model)
// })
}
else
{
// 添加
this
.
$refs
.
editModal
.
_open
()
}
},
_getById
:
async
function
(
id
)
{
const
result
=
await
meterAptitude
.
getById
(
id
)
if
(
result
)
{
this
.
$refs
.
editModal
.
_open
(
result
)
}
},
// 导入
_import
()
{
const
data
=
{
importUrl
:
'/food/v1/food_aptitude_judge_basis/food_aptitude_judge_import'
,
downloadUrl
:
'/food/v1/excel/template/FoodAptitudeJudgeBasis'
,
title
:
'导入检验方法管理'
}
this
.
$refs
.
sampleModal
.
_open
(
data
)
},
// 导出
_export
()
{
console
.
log
(
'.this.selectIds'
,
this
.
selectIds
)
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择需要导出的数据'
)
}
else
{
const
content
=
'确定导出 '
+
this
.
selectIds
.
length
+
' 条记录?'
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
,
onOk
:
()
=>
{
// eslint-disable-next-line no-undef
http
.
open
(
'/food/v1/food_aptitude_judge_basis/food_aptitude_judge_export?ids='
+
this
.
selectIds
)
}
})
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
router/meter-routes.js
View file @
82b907f4
...
@@ -39,6 +39,7 @@ import MeterMeterWarehouseOutIndex from '../pages/meter-warehouse/warehouse-out/
...
@@ -39,6 +39,7 @@ import MeterMeterWarehouseOutIndex from '../pages/meter-warehouse/warehouse-out/
import
MeterCertificatePrintIndex
from
'../pages/meter-certificate/print/MeterCertificatePrintIndex'
import
MeterCertificatePrintIndex
from
'../pages/meter-certificate/print/MeterCertificatePrintIndex'
import
MeterCannotSubIndex
from
'../pages/meter-subcontract/cannot-sub/MeterCannotSubIndex'
import
MeterCannotSubIndex
from
'../pages/meter-subcontract/cannot-sub/MeterCannotSubIndex'
import
MeterPersonalTask
from
'../pages/meter-statistics/personal-task/MeterPersonalTask'
import
MeterPersonalTask
from
'../pages/meter-statistics/personal-task/MeterPersonalTask'
import
MeterAnnualEntrust
from
'../pages/meter-statistics/annual-entrust/MeterAnnualEntrust'
import
Blank
from
'~/pages/blank'
import
Blank
from
'~/pages/blank'
export
default
[
export
default
[
{
{
...
@@ -263,6 +264,11 @@ export default [
...
@@ -263,6 +264,11 @@ export default [
path
:
'personal_task'
,
path
:
'personal_task'
,
component
:
MeterPersonalTask
,
component
:
MeterPersonalTask
,
meta
:
{
title
:
'个人检测量统计'
}
meta
:
{
title
:
'个人检测量统计'
}
},
{
path
:
'annual_entrust'
,
component
:
MeterAnnualEntrust
,
meta
:
{
title
:
'年度委托量统计'
}
}
}
]
]
}
}
...
...
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