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
559b27b0
Commit
559b27b0
authored
Oct 12, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
a1d72560
a05d6042
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1675 additions
and
20 deletions
+1675
-20
soil-statistics.js
api/soil/soil-statistics.js
+9
-1
FileManageCont.vue
components/file/file-manage/FileManageCont.vue
+5
-5
SampleDisposeIndex.vue
.../soil-sample-manage/sample-dispose/SampleDisposeIndex.vue
+48
-0
SampleDisposeManage.vue
...-sample-manage/sample-dispose/tab/SampleDisposeManage.vue
+675
-0
SampleDisposeQuery.vue
...l-sample-manage/sample-dispose/tab/SampleDisposeQuery.vue
+298
-0
TakeByEntrust.vue
pages/soil-sample-manage/sample-take/TakeByEntrust.vue
+3
-4
TakeSampleManage.vue
pages/soil-sample-manage/sample-take/TakeSampleManage.vue
+627
-0
MeterAnnualEntrust.vue
pages/soil-statistics/annual-entrust/MeterAnnualEntrust.vue
+2
-4
MeterCustomerEntrust.vue
...soil-statistics/customer-entrust/MeterCustomerEntrust.vue
+2
-6
soil-routes.js
router/soil-routes.js
+6
-0
No files found.
api/soil/soil-statistics.js
View file @
559b27b0
...
...
@@ -12,5 +12,13 @@ export default {
pageReportCheck
:
data
=>
http
.
post
(
'soil/v1/entrust/page_report_check'
,
data
).
then
(
res
=>
res
),
pageReportIssue
:
data
=>
http
.
post
(
'soil/v1/entrust/page_report_issue'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/entrust/page_report_issue'
,
data
).
then
(
res
=>
res
),
pageAnnual
:
data
=>
http
.
post
(
'soil/v1/statistics/page_annual_entrust_statistics'
,
data
)
.
then
(
res
=>
res
),
pageCustomer
:
data
=>
http
.
post
(
'soil/v1/statistics/page_customer_entrust_statistics'
,
data
)
.
then
(
res
=>
res
)
}
components/file/file-manage/FileManageCont.vue
View file @
559b27b0
...
...
@@ -102,13 +102,13 @@ export default {
this
.
entrustId
=
id
this
.
urlData
=
{
msg
:
'FoodContractAttachment'
,
pageUrl
:
'/soil/v1/s
ample_photo
/page'
,
deleteUrl
:
'/
meter/v1/entrust_attachment
/?ids='
,
uploadFileUrl
:
'/soil/v1/s
ample_photo
/upload/'
,
downloadFileUrl
:
'/
meter/v1/entrust_attachment
/download/'
,
pageUrl
:
'/soil/v1/s
tandard_annex
/page'
,
deleteUrl
:
'/
soil/v1/standard_annex
/?ids='
,
uploadFileUrl
:
'/soil/v1/s
tandard_annex
/upload/'
,
downloadFileUrl
:
'/
soil/v1/standard_annex
/download/'
,
downloadBatch
:
'/food/v1/contract_attachment/download_batch'
,
uri
:
'FoodContractAttachment/getByContractId'
,
viewUri
:
'/
meter/v1/entrust_attachment
/preview/'
viewUri
:
'/
soil/v1/standard_annex
/preview/'
}
break
case
'sampleId'
:
...
...
pages/soil-sample-manage/sample-dispose/SampleDisposeIndex.vue
0 → 100644
View file @
559b27b0
<
template
>
<div>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
<el-tab-pane
label=
"待处理"
name=
"wait"
>
<SampleBackupsManage
ref=
"waitTabs"
></SampleBackupsManage>
</el-tab-pane>
<el-tab-pane
label=
"已处理"
name=
"query"
>
<SampleBackupsQuery
ref=
"queryTabs"
></SampleBackupsQuery>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</
template
>
<
script
>
import
SampleBackupsManage
from
'./tab/SampleDisposeManage'
import
SampleBackupsQuery
from
'./tab/SampleDisposeQuery'
export
default
{
components
:
{
SampleBackupsManage
,
SampleBackupsQuery
},
data
()
{
return
{
activeName
:
'wait'
}
},
mounted
()
{
this
.
activeName
=
'wait'
this
.
$refs
.
waitTabs
.
_page
()
},
methods
:
{
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'wait'
)
{
this
.
$refs
.
waitTabs
.
_page
()
}
else
if
(
tab
.
name
===
'applyRecord'
)
{
// this.$refs.applyRecordTabs._page()
}
else
{
this
.
$refs
.
queryTabs
.
_page
()
}
}
}
}
</
script
>
pages/soil-sample-manage/sample-dispose/tab/SampleDisposeManage.vue
0 → 100644
View file @
559b27b0
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-form"
:label-width=
"80"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"样品编号:"
>
<Input
@
on-enter=
"_formSearch"
name=
"sampleSn"
placeholder=
"请输入样品编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"样品名称:"
>
<Input
@
on-enter=
"_formSearch"
name=
"sampleName"
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"
@
on-result-change=
"_btnClick"
:showSearchBtn=
"true"
class=
"contHide"
>
</btn-list>
</Col>
<!--样品数量-->
<Col
span=
"24"
>
<div
style=
"display: flex;padding-bottom: 10px;"
>
<div
v-for=
"(item,index) in contList"
:key=
"index"
class=
"reimbursement-item"
>
<p
:class=
"item.color?item.color:''"
>
{{
item
.
value
}}
</p>
<p>
{{
item
.
name
}}
</p>
</div>
</div>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
id=
"samplePreManage"
ref=
"pageTable"
:tableHeight=
"tableHeight"
:getPage=
"getPage"
@
on-result-change=
"_tableResultChange"
select-data
>
<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"
>
<div
v-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
<a
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<a
v-else-if=
"item.key==='sampleSn'"
@
click
.
stop=
"_sampleDetailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<div
v-else-if=
"item.key==='backupPlace'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
<AutoCompletes
:value=
"scope.row.backupPlace"
:downData=
"locList"
@
on-result-change=
"_locChange"
name=
"backupPlace"
placeholder=
"请输入或选择存储位置"
focus
show-key=
"backupPlace"
></AutoCompletes>
</div>
</div>
<div
v-else-if=
"item.key==='storageCondition'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
<el-select
v-model=
"scope.row.storageCondition"
clearable
style=
"width:100%"
size=
"small"
>
<el-option
v-for=
"item in conditionList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
</el-option>
</el-select>
</div>
</div>
<div
v-else-if=
"item.key==='handleQuantity'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}{{
scope
.
row
[
'sampleUnit'
]
&&
scope
.
row
[
'handleQuantity'
]?
scope
.
row
[
'sampleUnit'
]:
''
}}
</div>
<div
v-else
>
<Row>
<Col
span=
"18"
>
<el-input
v-model=
"scope.row.handleQuantity"
placeholder=
"处理数量"
clearable
size=
"small"
/>
</Col>
<Col
span=
"6"
>
<div
style=
"line-height: 32px"
>
{{
scope
.
row
[
'sampleUnit'
]?
scope
.
row
[
'sampleUnit'
]:
''
}}
</div>
</Col>
</Row>
</div>
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
<
template
slot=
"col"
>
<vxe-table-column
:width=
"80"
title=
"操作"
align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<VXEIconList
:msg=
"editIndex===scope.rowIndex?iconMsgSave:iconMsg"
@
on-result-change=
"_iconClick"
:rowData=
"scope.row"
:rowIndex=
"scope.rowIndex"
></VXEIconList>
</
template
>
</vxe-table-column>
</template>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<
script
>
import
AutoCompletes
from
'../../../../components/base/AutoCompletes'
// eslint-disable-next-line no-unused-vars
import
http
from
'../../../../api/http'
import
{
soilEntrust
}
from
'../../../../api'
export
default
{
components
:
{
AutoCompletes
},
data
()
{
return
{
currentComponent
:
''
,
searchOpen
:
false
,
formObj
:
{},
selectData
:
[],
selectIds
:
[],
selectSampleIds
:
[],
getPage
:
{},
btn
:
[
{
type
:
'primary'
,
id
:
'food-sample-preparation-his-all'
,
name
:
'制备'
},
{
type
:
'primary'
,
id
:
'food-sample-preparation-his-no-pre'
,
name
:
'无需制备'
},
{
type
:
'primary'
,
id
:
'food-sample-preparation-his-scan-pre'
,
name
:
'扫码制备'
},
// { type: '', id: '', name: '填写存放信息' },
// { type: '', id: '', name: '申请处理' },
// { type: '', id: '', name: '导出' },
{
type
:
''
,
id
:
'food-sample-prepare-record-export'
,
name
:
'导出备样记录'
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
}
// food-sample-prepare-edit
],
iconMsgSave
:
[{
type
:
'ios-checkmark'
,
id
:
''
,
name
:
'保存'
}],
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
180
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
180
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
180
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
180
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
180
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
180
},
{
title
:
'存储条件'
,
key
:
'conditions'
,
width
:
180
},
{
title
:
'备样位置'
,
key
:
'backupLocation'
,
width
:
180
},
{
title
:
'备样数量'
,
key
:
'quantity'
,
width
:
180
},
{
title
:
'备样人'
,
key
:
'backupUser'
,
width
:
140
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
110
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
160
},
{
title
:
'水深(米)'
,
key
:
'waterDepth'
,
width
:
160
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
160
}
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
],
conditionList
:
[],
locList
:
[],
currentIndex
:
-
1
,
editIndex
:
-
1
,
endDateBegin
:
''
,
endDateEnd
:
''
,
contList
:
[
{
key
:
'backupCount'
,
name
:
'今日新增数量'
,
value
:
0
},
{
key
:
'backupCountOver'
,
name
:
'超期数量'
,
value
:
0
,
color
:
'red-color'
},
{
key
:
'backupCountWarn'
,
name
:
'预警数量'
,
value
:
0
,
color
:
'warning-color'
}
],
// 只看预警和超期样品
warnAndOver
:
0
,
sampleHandleValue
:
''
,
issueDateBegin
:
''
,
issueDateEnd
:
''
,
isEligible
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
''
,
385
)
}
else
{
return
this
.
$tableHeight
(
''
,
300
)
}
},
colorComputed
()
{
return
function
(
date
)
{
if
(
this
.
$warningValue
(
date
)
<
0
)
{
return
'#eb6877'
// 红色
}
else
if
(
this
.
$warningValue
(
date
)
>=
0
&&
this
.
$warningValue
(
date
)
<=
this
.
sampleHandleValue
)
{
return
'#f90'
// 橙色
}
}
}
},
mounted
()
{
// 样品存储期限预警
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this._getLocList()
// this._getConditionList()
// this._getBackUpCount()
},
methods
:
{
// 签发日期
_issueDateChange
(
date
)
{
this
.
issueDateBegin
=
date
[
0
]
this
.
issueDateEnd
=
date
[
1
]
},
// 重新请求page以及备样数量
_relPage
()
{
this
.
_page
()
// this._getBackUpCount()
},
// 查询卡片备样数量
_getBackUpCount
()
{
this
.
$store
.
dispatch
(
'FoodSampleBackup/backUpCount'
).
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSampleBackup
.
model
const
length
=
this
.
contList
.
length
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
this
.
$set
(
this
.
contList
[
i
],
'value'
,
result
[
this
.
contList
[
i
].
key
])
}
})
},
// 选择时间
_endDateChange
(
data
)
{
this
.
getPage
.
records
[
this
.
currentIndex
].
endDate
=
data
},
// 查询-接收日期
_dateChange
(
data
)
{
this
.
endDateBegin
=
data
[
0
]
this
.
endDateEnd
=
data
[
1
]
},
_save
()
{
this
.
$nextTick
(
function
()
{
const
data
=
{
ids
:
this
.
getPage
.
records
[
this
.
currentIndex
].
id
,
backupPlace
:
this
.
getPage
.
records
[
this
.
currentIndex
].
backupPlace
,
storageCondition
:
this
.
getPage
.
records
[
this
.
currentIndex
]
.
storageCondition
,
endDate
:
this
.
getPage
.
records
[
this
.
currentIndex
].
endDate
,
handleQuantity
:
this
.
getPage
.
records
[
this
.
currentIndex
].
handleQuantity
}
this
.
$store
.
dispatch
(
'FoodSampleBackup/batchEdit'
,
data
).
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSampleBackup
.
success
)
{
}
else
{
this
.
$msgTip
(
'error'
,
'保存失败!'
)
}
this
.
_relPage
()
})
})
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentIndex
=
index
switch
(
res
)
{
case
'编辑'
:
this
.
editIndex
=
index
break
case
'保存'
:
console
.
log
(
'保存'
)
// if (data.endDate !== '') {
// // 非空情况下格式化赋值,如果不判断会格式化为当天的日期
// this._endDateChange(this.$dateformat(data.endDate, 'yyyy-mm-dd'))
// }
// this._save()
this
.
editIndex
=
-
1
break
}
},
_locChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
getPage
.
records
[
this
.
currentIndex
].
backupPlace
=
data
.
backupPlace
break
case
'query'
:
this
.
getPage
.
records
[
this
.
currentIndex
].
backupPlace
=
data
.
backupPlace
this
.
_getLocList
(
data
.
backupPlace
)
break
case
'focus'
:
this
.
_getLocList
()
break
}
},
_getLocList
(
data
)
{
const
obj
=
{}
if
(
data
)
{
obj
.
backupPlace
=
data
}
this
.
$store
.
dispatch
(
'FoodSampleBackup/getPositionList'
,
obj
).
then
(()
=>
{
this
.
locList
=
this
.
$store
.
state
.
FoodSampleBackup
.
list
})
},
_getConditionList
()
{
this
.
$store
.
dispatch
(
'LmsBaseDict/getItem'
,
'保存方式'
).
then
(()
=>
{
this
.
conditionList
=
this
.
$store
.
state
.
LmsBaseDict
.
item
})
},
_exportReceiveRecord
()
{
// 导出备样记录
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条数据!'
)
}
else
{
const
obj
=
{
param
:
'ids'
,
ids
:
this
.
selectIds
,
url
:
''
}
this
.
$store
.
dispatch
(
'ReportExport/getById'
,
'food-sample-prepare-record-export'
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
ReportExport
.
model
obj
.
url
=
result
this
.
$exportByQuery
(
obj
)
})
}
},
// 操作的序号
_handleIndex
(
data
)
{
this
.
currentIndex
=
data
.
rowIndex
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'制备'
:
this
.
_preMethod
()
break
case
'无需制备'
:
this
.
_noPreMethod
()
break
case
'扫码制备'
:
this
.
_scanPreMethod
()
break
case
'填写存放信息'
:
this
.
_batchEdit
()
break
case
'申请处理'
:
this
.
_handle
()
break
case
'导出'
:
if
(
this
.
getPage
.
records
.
length
===
0
)
{
this
.
$Message
.
warning
(
'暂无数据,不可导出'
)
}
else
{
this
.
_export
()
}
break
case
'导出备样记录'
:
this
.
_exportReceiveRecord
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
// 制备
_preMethod
()
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
preModal
.
_open
(
this
.
selectSampleIds
)
}
},
// 无需制备
_noPreMethod
()
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
noPreModal
.
_open
(
this
.
selectSampleIds
)
}
},
_scanPreMethod
()
{
this
.
$refs
.
scanPreModal
.
_open
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
.
records
=
[]
this
.
getPage
=
{
total
:
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
total
,
pages
:
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
pages
,
current
:
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
current
,
size
:
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
size
,
records
:
[]
}
const
tableList
=
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
records
for
(
let
i
=
0
;
i
<
tableList
.
length
;
i
++
)
{
this
.
getPage
.
records
.
push
({
sampleId
:
tableList
[
i
].
sampleId
!==
undefined
?
tableList
[
i
].
sampleId
:
''
,
sampleSn
:
tableList
[
i
].
sampleSn
!==
undefined
?
tableList
[
i
].
sampleSn
:
''
,
sampleName
:
tableList
[
i
].
sampleName
!==
undefined
?
tableList
[
i
].
sampleName
:
''
,
backupPlace
:
tableList
[
i
].
backupPlace
!==
undefined
?
tableList
[
i
].
backupPlace
:
''
,
cname
:
tableList
[
i
].
cname
!==
undefined
?
tableList
[
i
].
cname
:
''
,
storageCondition
:
tableList
[
i
].
storageCondition
!==
undefined
?
tableList
[
i
].
storageCondition
:
''
,
quantity
:
tableList
[
i
].
quantity
!==
undefined
?
tableList
[
i
].
quantity
:
''
,
sampleQuantity
:
tableList
[
i
].
sampleQuantity
!==
undefined
?
tableList
[
i
].
sampleQuantity
:
''
,
handleQuantity
:
tableList
[
i
].
handleQuantity
!==
undefined
?
tableList
[
i
].
handleQuantity
:
''
,
sampleUnit
:
tableList
[
i
].
sampleUnit
!==
undefined
?
tableList
[
i
].
sampleUnit
:
''
,
endDate
:
tableList
[
i
].
endDate
!==
undefined
?
new
Date
(
tableList
[
i
].
endDate
)
:
''
,
handleMethod
:
tableList
[
i
].
handleMethod
!==
undefined
?
tableList
[
i
].
handleMethod
:
''
,
id
:
tableList
[
i
].
id
!==
undefined
?
tableList
[
i
].
id
:
''
,
contractName
:
tableList
[
i
].
contractName
!==
undefined
?
tableList
[
i
].
contractName
:
''
,
code
:
tableList
[
i
].
code
!==
undefined
?
tableList
[
i
].
code
:
''
,
contractSn
:
tableList
[
i
].
contractSn
!==
undefined
?
tableList
[
i
].
contractSn
:
''
,
progress
:
tableList
[
i
].
progress
!==
undefined
?
tableList
[
i
].
progress
:
''
,
type
:
tableList
[
i
].
type
!==
undefined
?
tableList
[
i
].
type
:
''
,
issueDate
:
tableList
[
i
].
issueDate
!==
undefined
?
tableList
[
i
].
issueDate
:
''
,
sampleRemark
:
tableList
[
i
].
sampleRemark
!==
undefined
?
tableList
[
i
].
sampleRemark
:
''
,
contractRemark
:
tableList
[
i
].
contractRemark
!==
undefined
?
tableList
[
i
].
contractRemark
:
''
,
isEligible
:
tableList
[
i
].
isEligible
!==
undefined
?
tableList
[
i
].
isEligible
:
''
,
remark
:
tableList
[
i
].
remark
!==
undefined
?
tableList
[
i
].
remark
:
''
,
contractId
:
tableList
[
i
].
contractId
!==
undefined
?
tableList
[
i
].
contractId
:
''
})
}
this
.
selectIds
=
[]
this
.
selectData
=
[]
this
.
selectSampleIds
=
[]
break
case
'selectData'
:
this
.
selectData
=
data
this
.
selectIds
=
[]
this
.
selectSampleIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
data
[
i
].
id
)
this
.
selectSampleIds
.
push
(
data
[
i
].
sampleId
)
}
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
this
.
_getBackUpCount
()
},
_page
:
async
function
()
{
this
.
editIndex
=
-
1
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soilEntrust
.
pageBackup
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_batchEdit
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
$refs
.
editModal
.
_open
(
this
.
selectData
)
}
},
_handle
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
$refs
.
applyModal
.
_open
(
this
.
selectData
)
}
},
// 委托详情
_detailModal
(
data
)
{
// 查看
this
.
$store
.
dispatch
(
'FoodContract/getById'
,
data
.
contractId
).
then
(()
=>
{
if
(
data
.
type
===
0
)
{
// 企业委托 ’0‘
this
.
currentComponent
=
'FoodContractCompanyDetail'
}
else
{
// 政府委托 ’1‘
this
.
currentComponent
=
'FoodContractGovernDetail'
}
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodContract
.
model
)
})
})
},
// 样品详情
_sampleDetailModal
(
data
)
{
if
(
data
.
type
===
1
)
{
// 政府
this
.
currentComponent
=
'FoodSampleGovernDetail'
this
.
$nextTick
(()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
}
else
{
this
.
currentComponent
=
'FoodSampleCompanyDetail'
this
.
$nextTick
(()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
companyModel
)
})
})
}
},
/** *********************************导出-begin*********************************************/
_export
()
{
let
result
=
[]
if
(
this
.
selectData
.
length
===
0
)
{
// 导出全部数据
this
.
$store
.
dispatch
(
'LmsFoodSamplePrepare/page'
,
this
.
_searchParams
())
.
then
(()
=>
{
result
=
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
records
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
this
.
selectData
.
length
===
0
?
'确定导出全部数据(最多导出5000条)?'
:
'确定导出这'
+
result
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
$exportExcel
(
'samplePreManage'
,
'备样记录'
,
this
.
pageColumns
,
result
)
}
})
})
}
else
{
// 只导出选中的数据
result
=
this
.
selectData
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
this
.
selectData
.
length
===
0
?
'确定导出全部数据(最多导出5000条)?'
:
'确定导出这'
+
result
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
$exportExcel
(
'samplePreManage'
,
'备样记录'
,
this
.
pageColumns
,
result
)
}
})
}
},
// 参数
_searchParams
()
{
const
data
=
this
.
$serialize
(
'search-form'
)
return
this
.
$extend
(
data
,
{
page
:
1
,
rows
:
5000
})
}
/** *********************************导出样品台账-end*********************************************/
}
}
</
script
>
<
style
scoped
>
/******副样、备样卡片********/
.reimbursement-item
{
flex
:
1
;
border-radius
:
5px
;
border
:
1px
solid
#e8e8e8
;
padding-bottom
:
10px
;
}
.reimbursement-item
+
.reimbursement-item
{
margin-left
:
20px
;
}
.reimbursement-item
p
{
text-align
:
center
;
margin
:
0
;
}
.reimbursement-item
>
p
:first-child
{
font-size
:
22px
;
line-height
:
40px
;
}
</
style
>
pages/soil-sample-manage/sample-dispose/tab/SampleDisposeQuery.vue
0 → 100644
View file @
559b27b0
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-form-query"
:label-width=
"80"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"样品编号:"
>
<Input
@
on-enter=
"_formSearch"
name=
"sampleSn"
placeholder=
"请输入样品编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"样品名称:"
>
<Input
@
on-enter=
"_formSearch"
name=
"sampleName"
placeholder=
"请输入样品名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"存储位置:"
>
<Input
@
on-enter=
"_formSearch"
name=
"backupPlace"
placeholder=
"请输入存储位置"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"存储期限:"
>
<Date-picker
@
on-change=
"_dateChange"
:editable=
"false"
type=
"daterange"
split-panels
style=
"width:100%;"
placeholder=
"请选择存储期限"
></Date-picker>
<input
v-model=
"endDateBegin"
type=
"hidden"
name=
"endDateBegin"
>
<input
v-model=
"endDateEnd"
type=
"hidden"
name=
"endDateEnd"
>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托单位:"
style=
"margin-left: 8px;"
>
<Input
@
on-enter=
"_formSearch"
name=
"cname"
placeholder=
"请输入委托单位"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托名称:"
>
<Input
@
on-enter=
"_formSearch"
name=
"contractName"
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"
@
on-result-change=
"_btnClick"
:showSearchBtn=
"true"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<!--
<ElementTable
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
--
>
<!--ref="pageTable" :getPage="getPage" id="perSampleQuery" selectData>-->
<!--
<el-table-column-->
<!--show-overflow-tooltip-->
<!--sortable-->
<!--:prop="item.key"-->
<!--:label="item.title"-->
<!--:width="item.width"-->
<!--:min-width="200"-->
<!--:fixed="item.fixed?item.fixed:undefined"-->
<!--v-for="item in pageColumns" :key="item.key">-->
<!--
<template
slot-scope=
"scope"
>
-->
<!--
<div
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
-->
<!--
<a
v-else-if=
"item.key==='sampleSn'"
--
>
<!--@click.stop="_sampleDetailModal(scope.row)">
{{
scope
.
row
[
item
.
key
]
}}
</a>
-->
<!--
<div
v-else-if=
"item.key==='progress'"
>
-->
<!--
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
-->
<!--
</div>
-->
<!--
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
-->
<!--
</
template
>
-->
<!--</el-table-column>-->
<!--</ElementTable>-->
<PTVXETable
id=
"perSampleQuery"
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
select-data
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<a
v-else-if=
"item.key==='sampleSn'"
@
click
.
stop=
"_sampleDetailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<div
v-else-if=
"item.key==='progress'"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<
script
>
import
{
soilEntrust
}
from
'../../../../api'
export
default
{
components
:
{},
data
()
{
return
{
currentComponent
:
''
,
selectIds
:
[],
formObj
:
{},
btn
:
[
// { type: '', id: '', name: '导出' },
{
type
:
''
,
id
:
'food-sample-handle-already-export-sample-store'
,
name
:
'导出样品贮存表'
}
],
pageColumns
:
[
{
title
:
'样品编号'
,
key
:
'sampleSn'
,
width
:
180
},
{
title
:
'样品名称'
,
key
:
'sampleName'
,
width
:
140
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
110
,
status
:
true
},
{
title
:
'存储期限'
,
key
:
'endDate'
,
width
:
120
,
date
:
true
},
{
title
:
'委托单位'
,
key
:
'cname'
,
width
:
140
},
{
title
:
'委托名称'
,
key
:
'contractName'
,
width
:
170
},
{
title
:
'处置方式'
,
key
:
'handleMethod'
,
width
:
120
},
{
title
:
'处理人'
,
key
:
'handlePerson'
,
width
:
100
},
{
title
:
'处理时间'
,
key
:
'handleTime'
,
width
:
120
,
date
:
true
},
{
title
:
'处理申请人'
,
key
:
'applyer'
,
width
:
120
},
{
title
:
'申请时间'
,
key
:
'applyDate'
,
width
:
120
,
date
:
true
},
{
title
:
'存储位置'
,
key
:
'backupPlace'
,
width
:
100
},
{
title
:
'存储条件'
,
key
:
'storageCondition'
,
width
:
120
},
{
title
:
'样品数量'
,
key
:
'quantity'
,
width
:
100
},
{
title
:
'备样数量'
,
key
:
'sampleQuantity'
,
width
:
100
},
{
title
:
'样品备注'
,
key
:
'sampleRemark'
},
{
title
:
'委托备注'
,
key
:
'contractRemark'
}
],
searchOpen
:
false
,
getPage
:
{},
selectData
:
[],
endDateBegin
:
''
,
endDateEnd
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'tabSearchTwo'
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
methods
:
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soilEntrust
.
pageSampleReceive
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
selectIds
=
[]
this
.
getPage
=
this
.
$store
.
state
.
FoodSampleBackup
.
page
break
case
'selectData'
:
this
.
selectData
=
data
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
data
[
i
].
id
)
}
break
case
'changeSize'
:
this
.
_page
()
break
// default :
// this._page();
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_dateChange
(
data
)
{
this
.
endDateBegin
=
data
[
0
]
this
.
endDateEnd
=
data
[
1
]
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'导出'
:
if
(
this
.
getPage
.
records
.
length
===
0
)
{
this
.
$Message
.
warning
(
'暂无数据,不可导出'
)
}
else
{
this
.
_export
()
}
break
case
'导出样品贮存表'
:
this
.
_exportSampleStore
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_exportSampleStore
()
{
const
obj
=
{
param
:
'ids'
,
ids
:
this
.
selectIds
,
url
:
''
,
queryObj
:
this
.
$serialize
(
'search-form-query'
)
}
this
.
$store
.
dispatch
(
'ReportExport/getById'
,
'food-sample-handle-already-export-sample-store'
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
ReportExport
.
model
obj
.
url
=
result
this
.
$exportByQuery
(
obj
)
})
},
// 样品详情
_sampleDetailModal
(
data
)
{
if
(
data
.
type
===
1
)
{
// 政府
this
.
currentComponent
=
'FoodSampleGovernDetail'
this
.
$nextTick
(()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
}
else
{
this
.
currentComponent
=
'FoodSampleCompanyDetail'
this
.
$nextTick
(()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
companyModel
)
})
})
}
},
/** *********************************导出-begin*********************************************/
_export
()
{
let
result
=
[]
if
(
this
.
selectData
.
length
===
0
)
{
// 导出全部数据
this
.
$store
.
dispatch
(
'FoodSampleBackup/perSampleQuery'
,
this
.
_searchParams
())
.
then
(()
=>
{
result
=
this
.
$store
.
state
.
FoodSampleBackup
.
page
.
records
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
this
.
selectData
.
length
===
0
?
'确定导出全部数据(最多导出5000条)?'
:
'确定导出这'
+
result
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
$exportExcel
(
'perSampleQuery'
,
'样品处理'
,
this
.
pageColumns
,
result
)
}
})
})
}
else
{
// 只导出选中的数据
result
=
this
.
selectData
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
this
.
selectData
.
length
===
0
?
'确定导出全部数据(最多导出5000条)?'
:
'确定导出这'
+
result
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
$exportExcel
(
'perSampleQuery'
,
'样品处理'
,
this
.
pageColumns
,
result
)
}
})
}
},
// 参数
_searchParams
()
{
const
data
=
this
.
$serialize
(
'search-form-query'
)
return
this
.
$extend
(
data
,
{
page
:
1
,
rows
:
5000
})
}
/** *********************************导出样品台账-end*********************************************/
}
}
</
script
>
pages/soil-sample-manage/sample-take/TakeByEntrust.vue
View file @
559b27b0
...
...
@@ -62,7 +62,7 @@
<!--组件加载-->
<!--选择领样人-->
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userResult"
></UserInfo>
<!-- <SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>--
>
<SampleManage
ref=
"sampleManageModal"
@
on-result-change=
"_page"
></SampleManage
>
<ItemManage
ref=
"itemManageModal"
@
on-result-change=
"_page"
></ItemManage>
<Operation
ref=
"operation"
></Operation>
</div>
...
...
@@ -71,12 +71,12 @@
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
import
{
soilEntrust
}
from
'../../../api'
import
Operation
from
'../../../components/operation/Operation'
// import SampleManage from './
SampleManage'
import
SampleManage
from
'./Take
SampleManage'
import
ItemManage
from
'./ItemManage'
export
default
{
components
:
{
UserInfo
,
//
SampleManage,
SampleManage
,
ItemManage
,
Operation
},
...
...
@@ -412,7 +412,6 @@ export default {
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soilEntrust
.
pageSampleReceive
(
this
.
$serializeForm
(
this
.
formObj
)
)
...
...
pages/soil-sample-manage/sample-take/TakeSampleManage.vue
0 → 100644
View file @
559b27b0
<
template
>
<div>
<Modal
v-model=
"showSampleModal"
width=
"1200"
class=
"zIndex-900 modal-footer-none"
>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col
span=
"24"
style=
"padding-bottom: 5px"
>
<Form
id=
"search-wait"
:label-width=
"90"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"样品名称:"
class=
"search-item"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入样品名称"
clearable
></Input>
</Form-item>
<Form-item
label=
"样品编号:"
class=
"search-item"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.num"
name=
"num"
placeholder=
"请输入样品编号"
clearable
></Input>
<input
name=
"contractId"
type=
"hidden"
>
</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"
@
on-result-change=
"_btnClick"
:show-search-btn=
"true"
class=
"contHide"
>
<!--
<template
slot=
"processTask"
>
-->
<!--
<div
class=
"fr process-task"
>
-->
<!--
<Button
@
click=
"_exportReceiveRecord"
>
导出交接记录
</Button>
-->
<!--
</div>
-->
<!--
</
template
>
-->
</btn-list>
</Col>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
select-data
>
<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.key ==='shape'"
>
{{
scope
.
row
[
'shape'
]
}}
{{
scope
.
row
[
'shapeRemark'
]
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
<!--选择领样人-->
</Modal>
</div>
</template>
<
script
>
import
{
soilEntrust
,
soilSample
}
from
'../../../api'
export
default
{
components
:
{},
data
()
{
return
{
btn
:
[{
type
:
'primary'
,
id
:
''
,
name
:
'领样'
}],
selectIds
:
[],
getPage
:
{},
pageColumns
:
[
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
160
,
fixed
:
'left'
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
160
},
{
title
:
'土质描述'
,
key
:
'sampleDescribe'
,
width
:
160
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
160
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
130
}
],
iconMsg
:
[{
type
:
'ios-list'
,
id
:
''
,
name
:
'试验项目'
}],
type
:
''
,
contractId
:
''
,
// 合同id
selectData
:
[],
currentComponent
:
''
,
showSampleModal
:
false
,
formObj
:
{
samplingNum
:
''
,
name
:
''
,
num
:
''
,
detectType
:
''
,
standard
:
''
,
samplingLinkList
:
[]
},
stdList
:
[],
sampleLinkList
:
[
{
value
:
0
,
name
:
'食品生产'
},
{
value
:
1
,
name
:
'食品流通'
},
{
value
:
2
,
name
:
'餐饮服务'
},
{
value
:
3
,
name
:
'食用农产品'
},
{
value
:
4
,
name
:
'生产'
},
{
value
:
5
,
name
:
'流通'
},
{
value
:
6
,
name
:
'餐饮'
}
],
searchOpen
:
true
,
acceptSelectUserValue
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
}
else
{
}
return
this
.
$tableHeight
(
'tableModal'
)
}
},
mounted
()
{
// 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
// this._getStdList()
},
methods
:
{
_userResult
(
data
,
msg
)
{
const
sendData
=
{
ids
:
this
.
selectIds
.
join
(
','
),
contractId
:
this
.
contractId
}
if
(
data
)
{
sendData
.
person
=
data
.
realname
sendData
.
personId
=
data
.
userId
}
switch
(
msg
)
{
case
'sampleReceiveSendMan'
:
// 接收并发放
this
.
$store
.
dispatch
(
'FoodSample/sampleReceiveSend'
,
sendData
)
.
then
(()
=>
{
this
.
_resultChange
(
'接收发放成功'
)
})
break
case
'sampleMan'
:
// 扫码接收并发放
this
.
$refs
.
refModal
.
_open
(
'扫码接收发放'
,
data
)
break
}
},
_selectSampleLink
(
data
)
{
console
.
log
(
data
)
},
// 组件返回值
_componentResult
(
data
,
msg
)
{
switch
(
this
.
currentComponent
)
{
case
'SelectPrinter'
:
this
.
_printerResult
(
data
)
break
case
'ReceiveScan'
:
// 扫码接收
this
.
_searchTop
()
break
default
:
this
.
_search
()
}
},
_detailModal
(
id
)
{
// 查看
if
(
this
.
type
===
0
)
{
// 政府
this
.
currentComponent
=
'FoodSampleCompanyDetail'
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
id
).
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
companyModel
)
})
})
}
else
{
this
.
currentComponent
=
'FoodSampleGovernDetail'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
id
).
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
}
},
_open
(
contractId
,
type
)
{
this
.
showSampleModal
=
true
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
$
(
'input[name=contractId]'
).
val
(
contractId
)
this
.
entrustId
=
contractId
this
.
type
=
type
this
.
selectIds
=
[]
this
.
saveWayList
=
[]
this
.
saveWayString
=
''
this
.
$nextTick
(()
=>
{
this
.
_page
()
})
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
this
.
formObj
.
entrustId
=
this
.
entrustId
const
result
=
await
soilEntrust
.
pageReceive
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'试验项目'
:
this
.
_itemManage
(
data
.
id
)
break
case
'复制'
:
this
.
_copySample
(
data
)
break
case
'操作日志'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
case
'附件'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
'sampleId'
)
break
}
})
},
_itemManage
(
data
)
{
// 管理检测项目
if
(
this
.
recordHis
)
{
this
.
$refs
.
sampleItemManage
.
_openRecord
(
data
)
}
else
{
this
.
$refs
.
sampleItemManage
.
_open
(
data
)
}
},
_btnClick
(
msg
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'接收并发放'
:
this
.
_submitSend
()
break
case
'扫码接收'
:
this
.
$refs
.
refModal
.
_open
()
break
case
'扫码接收并发放'
:
if
(
this
.
acceptSelectUserValue
===
'是'
)
{
// 扫码接收并发放根据字典是否选人
this
.
$refs
.
userModal
.
_open
(
'sampleMan'
,
'请选择领样人'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
'扫码接收发放'
)
}
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'收样室收样'
:
this
.
_sampleReceive
(
this
.
selectIds
)
break
case
'领样'
:
this
.
_sampleTake
()
break
case
'打印标签'
:
this
.
_selectPrinter
(
'print-label'
)
break
case
'自定义打印'
:
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
_cusTomePrint
()
}
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_sampleTake
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确认领样'
,
onOk
:
()
=>
{
this
.
_confirmTake
(
this
.
selectIds
.
join
(
','
))
}
})
}
},
_confirmTake
:
async
function
(
ids
)
{
const
result
=
await
soilSample
.
takeSample
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'领样成功'
)
}
},
// 1.自定义打印,除检样、备样、留样 增加制备标签,需要单独的查询制备标签的数据,
// 2.样品接收位置的制备用制备的的接口,将当前的保存方式置空,打印出来手动填写
_cusTomePrint
()
{
this
.
$store
.
dispatch
(
'FoodSample/preparationButton'
,
{
sampleIds
:
this
.
selectIds
.
join
(
','
)
})
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
list
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
// 样品制备保存方式
result
[
i
].
saveWay
=
''
}
// 样品的数据和制备样品的数据
this
.
$refs
.
refModal
.
_open
(
this
.
selectData
,
result
)
})
},
// 接收并发放
_submitSend
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$msgTip
(
'warning'
,
'请至少选择一条数据!'
)
}
else
{
const
data
=
{
ids
:
this
.
selectIds
.
join
(
','
)
}
// 判断接收发放是否选人
if
(
this
.
acceptSelectUserValue
===
'是'
)
{
this
.
$store
.
dispatch
(
'FoodSample/submitReceiveSendCheck'
,
data
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
success
if
(
result
)
{
// 验证成功
this
.
$refs
.
userModal
.
_open
(
'sampleReceiveSendMan'
,
'请选择领样人'
)
}
})
}
else
{
this
.
$store
.
dispatch
(
'FoodSample/sampleReceiveSend'
,
data
)
.
then
(()
=>
{
this
.
_resultChange
(
'接收发放成功'
)
})
}
}
},
_resultChange
(
msg
)
{
if
(
this
.
$store
.
state
.
FoodSample
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
this
.
selectIds
=
[]
}
},
_exportReceiveRecord
()
{
// 导出交接记录
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择数据进行导出'
)
}
else
{
// eslint-disable-next-line no-undef
http
.
open
(
'/food/report/excel/sheet?_u=db样品来源.report.xml&ids='
+
ids
)
}
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/deleteByIds'
,
id
).
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSample
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
'删除成功!'
)
}
})
}
})
},
// 添加与编辑
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
// 编辑
if
(
data
.
type
===
1
)
{
// 政府
this
.
currentComponent
=
'SampleGovernEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
id
).
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
this
.
contractId
,
'receive-his-wait'
)
})
})
}
else
if
(
data
.
type
===
2
)
{
this
.
currentComponent
=
'FoodSampleGovernLYEdit'
this
.
$nextTick
(
function
()
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
id
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
this
.
contractId
,
'receive-his-wait'
)
})
})
}
else
{
this
.
currentComponent
=
'CompanySampleEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
id
)
.
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
companyModel
,
this
.
contractId
,
'receive-his-wait'
)
})
})
}
}
else
{
// 添加
if
(
this
.
type
===
0
)
{
// 企业
this
.
currentComponent
=
'CompanySampleEdit'
}
else
{
// 政府和粮油
this
.
currentComponent
=
'SampleGovernEdit'
}
this
.
$nextTick
(()
=>
{
// receive 标识,表示是样品接收的添加页面与其他普通样品的添加页面不同
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
contractId
,
'receive-his-wait'
)
})
}
},
// 复制样品
_copySample
(
data
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要复制该样品信息?'
,
onOk
:
()
=>
{
if
(
data
.
type
===
1
)
{
// 政府
this
.
currentComponent
=
'SampleGovernEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
id
)
.
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_openCopyAll
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
'receive-his-wait-copy'
)
})
})
}
else
if
(
data
.
type
===
2
)
{
this
.
currentComponent
=
'FoodSampleGovernLYEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
id
)
.
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_openCopyAll
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
'receive-his-wait-copy'
)
})
})
}
else
{
this
.
currentComponent
=
'CompanySampleEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
id
)
.
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_openCopyAll
(
this
.
$store
.
state
.
FoodSample
.
companyModel
,
'receive-his-wait-copy'
)
})
})
}
}
})
},
_search
()
{
this
.
_page
()
},
// 刷新上级页面
_searchTop
()
{
this
.
_page
()
this
.
$emit
(
'on-result-change'
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodSample
.
page
break
case
'selectData'
:
this
.
selectData
=
data
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
data
[
i
].
id
)
}
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
// 样品接收
_sampleReceive
(
id
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
const
ids
=
id
.
join
(
','
)
this
.
$refs
.
locationModal
.
_open
(
ids
)
// const tempData = {
// ids: this.selectIds.join(',')
// }
// this.$Modal.confirm({
// title: '提示',
// content: '确定要接收这 ' + this.selectIds.length + ' 条数据?',
// onOk: () => {
// console.log(tempData)
// }
// })
}
},
// 导入检测项目包
_importItemPackage
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
})
}
},
// 导入检测项目
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
,
this
.
selectData
[
0
])
})
}
},
_copyHisItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
})
}
},
// 选择打印机
_selectPrinter
(
msg
)
{
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
msg
)
}
},
// 选择完打印机之后
_printerResult
(
data
)
{
// printModal 不能使用动态组件,否则第二次打不开,原因未知
switch
(
data
.
type
)
{
// 打印标签--直接打印
case
'print-label'
:
this
.
$refs
.
printModal
.
_printOpen
(
this
.
selectData
,
data
.
printerVal
)
break
}
},
_stdResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
standard
=
data
break
case
'query'
:
this
.
formObj
.
standard
=
data
this
.
_getStdList
(
data
)
break
case
'focus'
:
this
.
_getStdList
()
break
}
},
// 查询执行标准
_getStdList
(
data
)
{
const
obj
=
Object
.
assign
({},
this
.
$serialize
(
'search-wait'
))
if
(
data
)
{
obj
.
standard
=
data
}
this
.
$store
.
dispatch
(
'FoodSample/listReceiveStandard'
,
obj
).
then
(()
=>
{
this
.
stdList
=
this
.
$store
.
state
.
FoodSample
.
list
})
}
}
}
</
script
>
pages/soil-statistics/annual-entrust/MeterAnnualEntrust.vue
View file @
559b27b0
...
...
@@ -65,14 +65,12 @@ export default {
}
},
mounted
()
{
//
this._getData(this.entrustDate.getFullYear())
this
.
_getData
(
this
.
entrustDate
.
getFullYear
())
},
methods
:
{
_getData
:
async
function
(
data
)
{
this
.
formObj
.
entrustDate
=
data
const
result
=
await
soilStatistics
.
pageAnnualEntrustStatistics
(
this
.
formObj
)
const
result
=
await
soilStatistics
.
pageAnnual
(
this
.
formObj
)
console
.
log
(
'result'
,
result
)
if
(
result
)
{
this
.
_open
(
result
)
...
...
pages/soil-statistics/customer-entrust/MeterCustomerEntrust.vue
View file @
559b27b0
...
...
@@ -135,7 +135,7 @@ export default {
// this._getUserGroup()
this
.
formObj
.
edateBegin
=
this
.
tempData
.
beginDate
this
.
formObj
.
edateEnd
=
this
.
$dateformat
(
lastday
,
'yyyy-mm-dd HH:MM:ss'
)
//
this._getData()
this
.
_getData
()
// this._getServiceTypeList()
},
methods
:
{
...
...
@@ -145,11 +145,7 @@ export default {
},
// 服务类型
_getData
:
async
function
()
{
console
.
log
(
'753951'
)
console
.
log
(
'选择时间后的请求'
,
this
.
formObj
)
const
result
=
await
soilStatistics
.
pageCustomerEntrustStatistics
(
this
.
formObj
)
const
result
=
await
soilStatistics
.
pageCustomer
(
this
.
formObj
)
if
(
result
)
{
this
.
getPage
.
records
=
result
this
.
$refs
.
testPieModal
.
_openPie
(
this
.
getPage
.
records
)
...
...
router/soil-routes.js
View file @
559b27b0
...
...
@@ -25,6 +25,7 @@ import MeterPersonalTask from '../pages/soil-statistics/personal-task/MeterPerso
import
MeterAnnualEntrust
from
'../pages/soil-statistics/annual-entrust/MeterAnnualEntrust'
import
ReportAuditIndex
from
'../pages/soil-report-manage/report-audit/ReportAuditIndex'
import
ReportIssueIndex
from
'../pages/soil-report-manage/report-issue/ReportIssueIndex'
import
SampleDisposeIndex
from
'../pages/soil-sample-manage/sample-dispose/SampleDisposeIndex'
import
Blank
from
'~/pages/blank'
export
default
[
{
...
...
@@ -78,6 +79,11 @@ export default [
meta
:
{
title
:
'余样管理'
}
},
{
path
:
'dispose'
,
component
:
SampleDisposeIndex
,
meta
:
{
title
:
'样品处理'
}
},
{
path
:
'receive_location'
,
component
:
AddressManage
,
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