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
00299a2c
Commit
00299a2c
authored
Dec 02, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了收样室收样导入试验项目
parent
2d8ef824
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
308 additions
and
33 deletions
+308
-33
SampleItemSelect.vue
...sample-receive/entrust-sample-manage/SampleItemSelect.vue
+259
-0
WaitReceive.vue
...nage/sample-receive/entrust-sample-manage/WaitReceive.vue
+49
-33
No files found.
pages/soil-sample-manage/sample-receive/entrust-sample-manage/SampleItemSelect.vue
0 → 100644
View file @
00299a2c
<!--检测项目编辑列表(添加、导入检测项目)-->
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
:width=
"690"
title=
"检测项目管理"
>
<Row>
<Col
span=
"24"
>
<Form
v-model=
"formObj"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<Form-item
class=
"search-item"
label=
"试验名称:"
style=
"margin-left: -25px"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入试验名称"
clearable
/>
</Form-item>
<!--
<Form-item
class=
"search-item"
label=
"检测依据:"
>
-->
<!--
<Input
v-model=
"formObj.code"
placeholder=
"请输入检测依据名称"
clearable
@
on-enter=
"_formSearch"
/>
-->
<!--
</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"
/>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:loading=
"true"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
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"
>
<span
v-if=
"item.key==='judged'"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
</span>
<div
v-else-if=
"item.key==='compareSymbol'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.compareSymbol"
placeholder=
"请输入比较符"
/>
</div>
<div
v-else-if=
"item.key==='limitValue'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.limitValue"
placeholder=
"请输入限值"
/>
</div>
<div
v-else-if=
"item.key==='unit'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.unit"
placeholder=
"请输入单位"
/>
</div>
<div
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.code"
style=
"width: 130px;"
blur
placeholder=
"请选择检测依据"
/>
<i
@
click
.
stop=
"_selectjudgeBasis(scope.$index)"
style=
"cursor: pointer;font-size: 14px;"
class=
"icons iconfont pt-search icon-search"
></i>
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</template>
<
script
>
import
{
soilAptitude
}
from
'../../../../api'
export
default
{
components
:
{},
data
()
{
return
{
formObj
:
{
catalogueId
:
''
,
name
:
''
,
code
:
''
,
standardCode
:
''
,
standardName
:
''
},
showModal
:
false
,
searchOpen
:
false
,
btn
:
[],
index
:
''
,
iconMsg
:
[],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
],
pageColumns
:
[
{
title
:
'试验名称'
,
key
:
'name'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'方法'
,
key
:
'testMethod'
,
width
:
180
}
// { title: '设备', key: 'device', width: 180 },
// { title: '检测依据', key: 'code', width: 180 },
// { title: '检测科室', key: 'groupName', width: 110 },
// { title: '比较符', key: 'compareSymbol', width: 120 },
// { title: '限值', key: 'limitValue' },
// { title: '单位', key: 'unit' },
// { title: '是否系统判定', key: 'judged', width: 120, judged: true },
// { title: '备注', key: 'remark' }
],
catalogueId
:
''
,
getPage
:
{},
selectData
:
[]
}
},
methods
:
{
_open
(
catalogueId
,
label
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
showModal
=
true
this
.
catalogueId
=
catalogueId
this
.
formObj
.
catalogueId
=
catalogueId
this
.
getPage
.
records
=
[]
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_page
()
// if (catalogueId) {
// this._page()
// }
},
_handleRow
(
scope
)
{
console
.
log
(
scope
)
},
_selectjudgeBasis
(
index
)
{
console
.
log
(
index
)
this
.
index
=
index
this
.
$refs
.
EditModal
.
_open
()
},
_backData
(
data
)
{
console
.
log
(
typeof
this
.
index
)
this
.
getPage
.
records
[
this
.
index
].
code
=
data
.
code
this
.
$set
(
this
.
getPage
.
records
,
this
.
index
,
this
.
getPage
.
records
[
this
.
index
]
)
console
.
log
(
this
.
getPage
.
records
)
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_page
:
async
function
()
{
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
page
(
this
.
$serializeForm
(
this
.
formObj
))
if
(
result
)
{
console
.
log
(
result
)
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'导入检测项目'
:
this
.
$refs
.
relItemModal
.
_open
(
this
.
catalogueId
)
break
}
},
// 操作列操作
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'删除'
:
this
.
_deleteById
(
data
.
relPackageId
)
break
}
},
// 删除
_deleteById
(
id
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除该数据?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
id
)
}
})
},
// _deleteOk: async function(id) {
// // const result = await drugCatalogueItem.deleteById(id)
// if (result) {
// this.$Message.success('删除成功')
// this._page()
// }
// },
// table结果 返回整行
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
break
case
'selectData'
:
this
.
selectData
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_ok
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
_hideLoading
()
this
.
$Message
.
warning
(
'请选择至少一条数据!'
)
}
const
ids
=
[]
data
.
forEach
(
item
=>
{
ids
.
push
(
item
.
id
)
})
this
.
_saveCatalogueItem
(
data
)
},
_saveCatalogueItem
(
data
)
{
this
.
showModal
=
false
this
.
_hideLoading
()
this
.
$emit
(
'on-result-change'
,
data
)
console
.
log
(
'data------'
,
data
)
this
.
_hideLoading
()
},
_cancel
()
{
this
.
selectData
=
[]
this
.
showModal
=
false
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
}
}
}
</
script
>
pages/soil-sample-manage/sample-receive/entrust-sample-manage/WaitReceive.vue
View file @
00299a2c
...
...
@@ -11,13 +11,16 @@
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.sampleCode"
name=
"sampleCode"
placeholder=
"请输入试样编号"
clearable
></Input>
</Form-item>
<Form-item
label=
"是否有试验项目:"
class=
"search-item"
>
<Select
v-model=
"formObj.haveExp"
clearable
name=
"groupId"
style=
"width:150px"
placeholder=
"请选择
检测科室
"
>
<Select
v-model=
"formObj.haveExp"
clearable
name=
"groupId"
style=
"width:150px"
placeholder=
"请选择
是否有试验项目
"
>
<Option
v-for=
"(item,index) in itemData"
:value=
"item.value"
:key=
"index"
>
{{
item
.
name
}}
</Option>
</Select>
</Form-item>
<Form-item
label=
"筛选试样:"
class=
"search-item"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.experimentNames"
name=
"experimentNames"
placeholder=
"请输入试验项目"
clearable
></Input>
</Form-item>
<Form-item
label=
"试验科室:"
class=
"search-item"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.groupName"
name=
"groupName"
placeholder=
"请输入试验科室"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
...
...
@@ -61,20 +64,28 @@
<SampleReceiveModal
ref=
"locationModal"
@
on-result-change=
"_page()"
></SampleReceiveModal>
<SoilSampleItemManage
ref=
"sampleItemManage"
@
on-result-change=
"_page"
></SoilSampleItemManage>
<KeepAdress
ref=
"keepAdressModal"
@
on-result-change=
"_page"
></KeepAdress>
<SampleItemSelect
ref=
"sampleItemSelectModal"
@
on-result-change=
"_itemImportBack"
is-change
/>
</div>
</template>
<
script
>
import
{
soilEntrust
}
from
'../../../../api'
import
{
soilEntrust
,
soilSample
}
from
'../../../../api'
import
SampleReceiveModal
from
'../SampleReceiveModal'
import
SampleItemSelect
from
'./SampleItemSelect'
import
SoilSampleItemManage
from
'./SoilSampleItemManage'
import
KeepAdress
from
'./KeepAdress'
export
default
{
components
:
{
SampleReceiveModal
,
SoilSampleItemManage
,
KeepAdress
},
components
:
{
SampleReceiveModal
,
SoilSampleItemManage
,
KeepAdress
,
SampleItemSelect
},
data
()
{
return
{
btn
:
[
{
type
:
'primary'
,
id
:
''
,
name
:
'收样室收样'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'样品留存'
}
{
type
:
'primary'
,
id
:
''
,
name
:
'样品留存'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'导入试验项目'
}
],
selectIds
:
[],
getPage
:
{},
...
...
@@ -102,6 +113,7 @@ export default {
contractId
:
''
,
// 合同id
selectData
:
[],
currentComponent
:
''
,
indexList
:
[],
formObj
:
{
samplingNum
:
''
,
name
:
''
,
...
...
@@ -109,7 +121,8 @@ export default {
detectType
:
''
,
standard
:
''
,
samplingLinkList
:
[],
haveExp
:
undefined
haveExp
:
undefined
,
groupName
:
undefined
},
stdList
:
[],
sampleLinkList
:
[
...
...
@@ -281,12 +294,6 @@ export default {
this
.
$refs
.
refModal
.
_open
(
'扫码接收发放'
)
}
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
...
...
@@ -296,6 +303,9 @@ export default {
case
'样品留存'
:
this
.
_sampleKeep
(
this
.
selectIds
)
break
case
'导入试验项目'
:
this
.
_importItem
()
break
case
'打印标签'
:
this
.
_selectPrinter
(
'print-label'
)
break
...
...
@@ -312,6 +322,33 @@ export default {
}
})
},
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择至少一条数据!'
)
}
else
{
this
.
$refs
.
sampleItemSelectModal
.
_open
()
}
},
_itemImportBack
(
data
)
{
console
.
log
(
data
)
if
(
data
.
length
>
0
)
{
const
ids
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
ids
.
push
(
data
[
i
].
id
)
}
this
.
_importItemOk
(
ids
)
}
},
_importItemOk
:
async
function
(
ids
)
{
const
result
=
await
soilSample
.
importExperiments
({
aptitudeIds
:
ids
,
ids
:
this
.
selectIds
})
if
(
result
)
{
this
.
$Message
.
success
(
'导入成功'
)
this
.
_page
()
}
},
// 1.自定义打印,除检样、备样、留样 增加制备标签,需要单独的查询制备标签的数据,
// 2.样品接收位置的制备用制备的的接口,将当前的保存方式置空,打印出来手动填写
_cusTomePrint
()
{
...
...
@@ -512,7 +549,7 @@ export default {
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodSample
.
page
this
.
_page
()
break
case
'selectData'
:
this
.
selectData
=
data
...
...
@@ -556,27 +593,6 @@ export default {
// })
}
},
// 导入检测项目包
_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
(
'请至少选中一条样品数据!'
)
...
...
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