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
7928bdc9
Commit
7928bdc9
authored
Sep 18, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改收样位置管理页面
parent
a3fe7a0d
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
645 additions
and
14 deletions
+645
-14
index.js
api/index.js
+1
-0
soil-entrust.js
api/soil/soil-entrust.js
+3
-1
soil-sample.js
api/soil/soil-sample.js
+20
-0
SoilSampleItemManage.vue
pages/soil-sample-manage/SoilSampleItemManage.vue
+1
-0
AddressManage.vue
pages/soil-sample-manage/sample-address/AddressManage.vue
+385
-0
AddressManageEdit.vue
...s/soil-sample-manage/sample-address/AddressManageEdit.vue
+222
-0
ReceiveBySample.vue
pages/soil-sample-manage/sample-receive/ReceiveBySample.vue
+3
-1
WaitReceive.vue
...nage/sample-receive/entrust-sample-manage/WaitReceive.vue
+4
-12
soil-routes.js
router/soil-routes.js
+6
-0
No files found.
api/index.js
View file @
7928bdc9
...
@@ -28,3 +28,4 @@ export { default as meterEntrust } from './meter/meter-entrust'
...
@@ -28,3 +28,4 @@ export { default as meterEntrust } from './meter/meter-entrust'
export
{
default
as
meterSample
}
from
'./meter/meter-sample'
export
{
default
as
meterSample
}
from
'./meter/meter-sample'
export
{
default
as
soilAptitude
}
from
'./soil/soil-aptitude'
export
{
default
as
soilAptitude
}
from
'./soil/soil-aptitude'
export
{
default
as
soilEntrust
}
from
'./soil/soil-entrust'
export
{
default
as
soilEntrust
}
from
'./soil/soil-entrust'
export
{
default
as
soilSample
}
from
'./soil/soil-sample'
api/soil/soil-entrust.js
View file @
7928bdc9
...
@@ -40,5 +40,7 @@ export default {
...
@@ -40,5 +40,7 @@ export default {
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
reviewPass
:
data
=>
reviewPass
:
data
=>
http
.
post
(
'soil/v1/entrust/review_pass?ids='
+
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/entrust/review_pass?ids='
+
data
).
then
(
res
=>
res
),
samplePage
:
data
=>
http
.
post
(
'soil/v1/sample/page'
,
data
).
then
(
res
=>
res
)
samplePage
:
data
=>
http
.
post
(
'soil/v1/sample/page'
,
data
).
then
(
res
=>
res
),
pageReceive
:
data
=>
http
.
post
(
'soil/v1/sample/page_receive'
,
data
).
then
(
res
=>
res
)
}
}
api/soil/soil-sample.js
0 → 100644
View file @
7928bdc9
/**
* 工作台
*/
import
http
from
'../http'
// import { https } from '../https'
export
default
{
// page
locationPage
:
data
=>
http
.
post
(
'soil/v1/receive_location/page'
,
data
).
then
(
res
=>
res
),
locationGetById
:
data
=>
http
.
get
(
'soil/v1/receive_location/'
+
data
).
then
(
res
=>
res
),
locationSave
:
data
=>
http
.
post
(
'soil/v1/receive_location/'
,
data
).
then
(
res
=>
res
),
locationDeleteById
:
data
=>
http
.
delete
(
'soil/v1/receive_location/?ids='
+
data
).
then
(
res
=>
res
),
locationEdit
:
data
=>
http
.
put
(
'soil/v1/receive_location/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
)
}
pages/soil-sample-manage/SoilSampleItemManage.vue
View file @
7928bdc9
...
@@ -119,6 +119,7 @@ export default {
...
@@ -119,6 +119,7 @@ export default {
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
formId
:
'SoilSampleItemManage'
,
currentComponent
:
''
,
currentComponent
:
''
,
btn
:
[
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'提交分包'
},
{
type
:
'success'
,
id
:
''
,
name
:
'提交分包'
},
...
...
pages/soil-sample-manage/sample-address/AddressManage.vue
0 → 100644
View file @
7928bdc9
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<Col
span=
"24"
class=
"margin-top-10"
>
<!--搜索表单-->
<Form
id=
"search-form"
:label-width=
"90"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"检测依据:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.code"
name=
"code"
placeholder=
"请输入检测依据"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"检测依据名称:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入检测依据名称"
clearable
/>
</Form-item>
<!--
<Form-item
class=
"search-item"
label=
"标准状态:"
>
-->
<!--
<Select
name=
"status"
placeholder=
"请选择标准状态"
clearable
>
-->
<!--
<Option
v-for=
"item in statusList"
:value=
"item.value"
:key=
"item.name"
>
{{
item
.
name
}}
</Option>
-->
<!--
</Select>
-->
<!--
</Form-item>
-->
<!--
<Form-item
class=
"search-item"
label=
"标准分类:"
>
-->
<!--
<Select
name=
'classify'
placeholder=
"请选择标准分类"
clearable
>
-->
<!--
<Option
v-for=
"item in classifyList"
:value=
"item.value"
:key=
"item.name"
>
{{
item
.
name
}}
</Option>
-->
<!--
</Select>
-->
<!--
</Form-item>
-->
<!--
<Form-item
label=
"标准类型:"
class=
"search-item margin-left-6"
>
-->
<!--
<Select
name=
"type"
placeholder=
"请选择标准类型"
clearable
>
-->
<!--
<Option
v-for=
"item in typeList"
:value=
"item.value"
:key=
"item.value"
>
{{
item
.
name
}}
</Option>
-->
<!--
</Select>
-->
<!--
</Form-item>
-->
<!--
<Form-item
class=
"search-item"
label=
"发布单位:"
>
-->
<!--
<Input
@
on-enter=
"_formSearch"
name=
"publishUnit"
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"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
>
<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.key==='status'"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'现行'
:
scope
.
row
[
item
.
key
]
===
1
?
'即将实施'
:
scope
.
row
[
item
.
key
]
===
2
?
'部分被代替'
:
scope
.
row
[
item
.
key
]
===
3
?
'被代替'
:
scope
.
row
[
item
.
key
]
===
4
?
'作废'
:
''
}}
</div>
<div
v-else-if=
"item.key==='classify'"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'判定依据'
:
scope
.
row
[
item
.
key
]
===
1
?
'检测依据'
:
scope
.
row
[
item
.
key
]
===
2
?
'其他'
:
''
}}
</div>
<div
v-else-if=
"item.key==='type'"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'国家标准'
:
scope
.
row
[
item
.
key
]
===
1
?
'地方标准'
:
scope
.
row
[
item
.
key
]
===
2
?
'行业标准'
:
scope
.
row
[
item
.
key
]
===
3
?
'企业标准'
:
''
}}
</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.key==='fileUrl'"
>
<span
v-if=
"scope.row['fileUrl']"
class=
"green-color"
>
是
</span>
<span
v-else
class=
"red-color"
>
否
</span>
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<!--组件加载-->
<StandardsManageEdit
ref=
"editModal"
@
on-result-change=
"_page"
></StandardsManageEdit>
<DownloadTemplateImport
ref=
"importModal"
@
on-result-change=
"_page"
></DownloadTemplateImport>
<!-- <component ref="refModal" :is="currentComponent" @on-result-change="_page"></component>-->
</div>
</template>
<
script
>
import
http
from
'../../../api/http'
import
{
soilSample
}
from
'../../../api'
import
global
from
'../../../api/config'
import
DownloadTemplateImport
from
'../../../components/import/DownloadTemplateImport'
// 导入
import
StandardsManageEdit
from
'./AddressManageEdit'
// 添加、编辑
export
default
{
components
:
{
StandardsManageEdit
,
DownloadTemplateImport
},
data
()
{
return
{
currentComponent
:
''
,
formObj
:
{
code
:
undefined
,
name
:
undefined
},
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
,
componentName
:
'StandardsManageEdit'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
// { id: '', name: '导入', componentName: 'DownloadTemplateImport' },
// { id: '', name: '导出' }
],
// 表格
pageColumns
:
[
{
title
:
'位置编号'
,
key
:
'code'
},
{
title
:
'位置管理人'
,
key
:
'manager'
},
{
title
:
'收样存储位置'
,
key
:
'name'
},
{
title
:
'位置分类'
,
key
:
'type'
},
{
title
:
'备注说明'
,
key
:
'remark'
}
// { title: '标准状态', key: 'status', width: 120 },
// { title: '标准分类', key: 'classify' },
// { title: '标准类型', key: 'type' },
// { title: '发布单位', key: 'publishUnit' },
// { title: '发布日期', key: 'publishDate', date: true, width: 140 },
// { title: '文件是否上传', key: 'fileUrl', width: 120 }
],
// 操作
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
,
componentName
:
'StandardsManageEdit'
},
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
}
],
searchOpen
:
false
,
getPage
:
{},
// 选中的内容
selectIds
:
[],
statusList
:
[
{
value
:
0
,
name
:
'现行'
},
{
value
:
1
,
name
:
'即将实施'
},
{
value
:
2
,
name
:
'部分被代替'
},
{
value
:
3
,
name
:
'被代替'
},
{
value
:
4
,
name
:
'作废'
}
],
classifyList
:
[
{
value
:
0
,
name
:
'判定标准'
},
{
value
:
1
,
name
:
'检测依据'
},
{
value
:
2
,
name
:
'其他'
}
],
typeList
:
[
{
value
:
0
,
name
:
'国家标准'
},
{
value
:
1
,
name
:
'地方标准'
},
{
value
:
2
,
name
:
'行业标准'
},
{
value
:
3
,
name
:
'企业标准'
}
]
}
},
computed
:
{
// 表格的高度
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
// 操作按钮
_btnClick
(
msg
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
switch
(
msg
)
{
case
'添加'
:
this
.
$nextTick
(()
=>
{
this
.
_editModal
(
false
)
})
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导入'
:
this
.
$nextTick
(()
=>
{
this
.
_import
()
})
break
case
'导出'
:
// this._export()
break
// 收起搜索
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
// 表格中操作
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'上传'
:
this
.
_upload
(
data
.
id
)
break
case
'下载'
:
this
.
_download
(
data
)
break
case
'预览'
:
this
.
_viewReport
(
data
)
break
case
'查看替代关系'
:
this
.
$refs
.
relationModal
.
_open
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
}
})
},
_upload
(
id
)
{
const
obj
=
{
importUrl
:
'/soil/v1/standard_annex/upload/'
+
id
}
this
.
$refs
.
uploadModal
.
_open
(
obj
)
},
_editModal
:
async
function
(
edit
,
id
)
{
if
(
edit
)
{
// 编辑
// this.$store.dispatch('StandardInfo/getById', id).then(() => {
// this.$refs.refModal._open(this.$store.state.StandardInfo.model)
// })
const
result
=
await
soilSample
.
locationGetById
(
id
)
if
(
result
)
{
this
.
$refs
.
editModal
.
_open
(
result
)
}
}
else
{
// 添加
this
.
$refs
.
editModal
.
_open
()
}
},
// 获取数据
_page
:
async
function
()
{
// this.$refs.pageTable._page('search-form', 'StandardInfo/page')
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilSample
.
locationPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
console
.
log
(
result
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
// 查询
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
// 删除一条记录
_deleteById
(
id
)
{
this
.
_deleteByIds
([
id
])
},
// 批量删除
_deleteSelected
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
this
.
selectIds
,
'确定删除这 '
+
this
.
selectIds
.
length
+
' 条记录?'
)
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
loading
:
true
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
ids
)
}
})
},
_delOk
:
async
function
(
ids
)
{
const
result
=
await
soilSample
.
locationDeleteById
(
ids
)
if
(
result
)
{
this
.
_page
()
this
.
$Modal
.
remove
()
this
.
$Message
.
success
(
'删除成功'
)
}
},
// 表格内容
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
// this.getPage = this.$store.state.StandardInfo.page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
// 导入
_import
()
{
const
data
=
{
importUrl
:
'/food/v1/food_standard_info/import_standard'
,
downloadUrl
:
'/food/v1/excel/template/FoodStandardInfo'
,
title
:
'导入食品标准管理'
}
this
.
$refs
.
importModal
.
_open
(
data
)
},
// 导出
_export
()
{
const
ids
=
this
.
selectIds
this
.
_exportByIds
(
ids
,
ids
.
length
===
0
?
'确定导出全部记录?'
:
'确定导出 '
+
ids
.
length
+
' 条记录?'
)
},
_exportByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
,
onOk
:
()
=>
{
if
(
ids
.
length
===
0
)
{
http
.
open
(
'/food/v1/food_standard_info/export_standard'
)
}
else
{
http
.
open
(
'/food/v1/food_standard_info/export_standard?ids='
+
ids
)
}
}
})
},
// 预览
_viewReport
(
data
)
{
const
fileUrl
=
encodeURIComponent
(
global
.
baseURL
+
'/soil/v1/standard_annex/preview/'
+
data
.
id
)
console
.
log
(
fileUrl
)
window
.
open
(
global
.
staticURL
+
'/pdf/PDFJS/pdfjs/web/viewer.html?file='
+
fileUrl
)
},
// 下载
_download
(
data
)
{
console
.
log
(
data
)
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要下载文件?'
,
onOk
:
()
=>
{
if
(
!
data
.
fileUrl
)
{
this
.
$Message
.
error
(
'附件未上传,请上传附件!'
)
return
}
window
.
open
(
global
.
baseURL
+
'/soil/v1/standard_annex/download/'
+
data
.
id
,
'_blank'
)
}
})
}
}
}
</
script
>
pages/soil-sample-manage/sample-address/AddressManageEdit.vue
0 → 100644
View file @
7928bdc9
<
template
>
<div>
<Modal
v-model=
"showEditModal"
:mask-closable=
"false"
:width=
"500"
class=
"zIndex-1200"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
inline
>
<Form-item
label=
"位置编号"
prop=
"code"
style=
"width: 100%"
>
<Input
v-model=
"formObj.code"
name=
"code"
placeholder=
"请输入位置编号"
/>
</Form-item>
<Form-item
label=
"收样存储位置"
prop=
"name"
style=
"width: 100%"
>
<Input
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入收样存储位置"
/>
</Form-item>
<Form-item
label=
"位置分类"
prop=
"type"
style=
"width: 100%"
>
<Select
v-model=
"formObj.type"
name=
"type"
>
<Option
v-for=
"(item,index) in options"
:key=
"item.name"
:value=
"index"
>
{{
item
.
name
}}
</Option>
</Select>
</Form-item>
<Form-item
label=
"位置管理人"
prop=
"manager"
style=
"width: 100%"
>
<Input
v-model=
"formObj.manager"
@
click
.
native=
"_selectStaff"
name=
"manager"
readonly
/>
</Form-item>
<Form-item
prop=
"managerId"
style=
"width: 100%;display: none"
>
<Input
v-model=
"formObj.managerId"
@
click
.
native=
"_selectStaff"
name=
"managerId"
readonly
/>
</Form-item>
<Form-item
label=
"备注说明"
prop=
"remark"
style=
"width: 100%"
>
<Input
v-model=
"formObj.remark"
name=
"remark"
placeholder=
"请输入备注说明"
/>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
>
<ModalFooter
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></ModalFooter>
</div>
</Modal>
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userData"
is-change
></UserInfo>
</div>
</
template
>
<
script
>
/**
* 添加编辑
*/
import
ModalFooter
from
'../../../components/base/modalFooter'
import
{
soilSample
}
from
'../../../api'
import
Global
from
'../../../api/config'
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
export
default
{
components
:
{
ModalFooter
,
UserInfo
},
data
()
{
return
{
formId
:
''
,
lengthLimitList
:
[
{
key
:
'stdNum'
,
title
:
'标准号'
},
{
key
:
'enName'
,
title
:
'英文名称'
},
{
key
:
'belongUnit'
,
title
:
'归口单位'
},
{
key
:
'publishUnit'
,
title
:
'发布单位'
}
],
modalTitle
:
'添加食品标准表'
,
formObj
:
{
name
:
''
,
code
:
''
,
type
:
''
,
remark
:
''
,
manager
:
''
,
managerId
:
''
},
options
:
[
{
name
:
'国家标准'
},
{
name
:
'地方标准'
},
{
name
:
'行业标准'
},
{
name
:
'企业标准'
}
],
ruleValidate
:
{
code
:
[
{
required
:
true
,
message
:
'检测依据不能为空'
,
trigger
:
'blur'
}
],
name
:
[
{
required
:
true
,
message
:
'检测依据名称不能为空'
,
trigger
:
'blur'
}
]
},
showEditModal
:
false
,
classifyList
:
[
{
value
:
0
,
name
:
'判定依据'
},
{
value
:
1
,
name
:
'检测依据'
},
{
value
:
2
,
name
:
'其他'
}
],
typeList
:
[
{
value
:
0
,
name
:
'国家标准'
},
{
value
:
1
,
name
:
'地方标准'
},
{
value
:
2
,
name
:
'行业标准'
},
{
value
:
3
,
name
:
'企业标准'
}
],
statusList
:
[
{
value
:
0
,
name
:
'现行'
},
{
value
:
1
,
name
:
'即将实施'
},
{
value
:
2
,
name
:
'部分被代替'
},
{
value
:
3
,
name
:
'被代替'
},
{
value
:
4
,
name
:
'作废'
}
],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
]
}
},
methods
:
{
_getUser
()
{
const
user
=
Global
.
getUserInfo
()
this
.
formObj
.
manager
=
user
.
realname
this
.
formObj
.
managerId
=
user
.
id
console
.
log
(
user
)
},
_selectStaff
()
{
this
.
$refs
.
userModal
.
_open
()
},
_userData
(
data
,
msg
,
contractTempData
)
{
console
.
log
(
data
,
msg
)
},
/** *modal-footer */
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_resultChange
(
msg
)
{
this
.
showEditModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
this
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
formObj
.
publishDate
&&
this
.
formObj
.
effectDate
)
{
if
(
this
.
formObj
.
publishDate
>
this
.
formObj
.
effectDate
)
{
this
.
$Message
.
error
(
'发布日期应早于实施日期'
)
this
.
_hideLoading
()
return
}
}
const
data
=
this
.
$serialize
(
'edit-form'
)
if
(
this
.
$string
(
this
.
formObj
.
id
).
isEmpty
())
{
// 添加
this
.
_save
(
data
)
}
else
{
// 编辑
this
.
_edit
({
id
:
this
.
formObj
.
id
,
obj
:
data
})
}
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
_hideLoading
()
}
})
},
_save
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
locationSave
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'添加成功!'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
locationEdit
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'编辑成功!'
)
}
},
_cancel
()
{
this
.
_hideLoading
()
this
.
showEditModal
=
false
},
_open
(
formObj
)
{
this
.
formId
=
this
.
$randomCode
()
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
modalTitle
=
'添加'
this
.
formObj
.
id
=
''
this
.
_getUser
()
}
else
{
this
.
formObj
=
formObj
this
.
formObj
.
id
=
formObj
.
id
this
.
formObj
.
effectDate
=
this
.
formObj
.
effectDate
?
new
Date
(
formObj
.
effectDate
)
:
''
this
.
formObj
.
publishDate
=
this
.
formObj
.
publishDate
?
new
Date
(
formObj
.
publishDate
)
:
''
this
.
modalTitle
=
'编辑'
}
this
.
showEditModal
=
true
},
_registerAdd
()
{
this
.
formId
=
this
.
$randomCode
()
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
this
.
modalTitle
=
'添加'
this
.
formObj
.
id
=
''
this
.
formObj
.
type
=
3
this
.
showEditModal
=
true
}
}
}
</
script
>
pages/soil-sample-manage/sample-receive/ReceiveBySample.vue
View file @
7928bdc9
...
@@ -666,7 +666,9 @@ export default {
...
@@ -666,7 +666,9 @@ export default {
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soilEntrust
.
page
(
this
.
$serializeForm
(
this
.
formObj
))
const
result
=
await
soilEntrust
.
pageReceive
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
this
.
getPage
=
result
...
...
pages/soil-sample-manage/sample-receive/entrust-sample-manage/WaitReceive.vue
View file @
7928bdc9
...
@@ -68,7 +68,7 @@ export default {
...
@@ -68,7 +68,7 @@ export default {
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
btn
:
[{
type
:
'primary'
,
id
:
'
wait-receive-receive'
,
name
:
'接收
'
}],
btn
:
[{
type
:
'primary'
,
id
:
'
'
,
name
:
'收样室收样
'
}],
selectIds
:
[],
selectIds
:
[],
getPage
:
{},
getPage
:
{},
pageColumns
:
[
pageColumns
:
[
...
@@ -214,7 +214,7 @@ export default {
...
@@ -214,7 +214,7 @@ export default {
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
)
this
.
formObj
.
entrustId
=
this
.
entrustId
this
.
formObj
.
entrustId
=
this
.
entrustId
const
result
=
await
soilEntrust
.
samplePag
e
(
const
result
=
await
soilEntrust
.
pageReceiv
e
(
this
.
$serializeForm
(
this
.
formObj
)
this
.
$serializeForm
(
this
.
formObj
)
)
)
if
(
result
)
{
if
(
result
)
{
...
@@ -277,7 +277,7 @@ export default {
...
@@ -277,7 +277,7 @@ export default {
case
'复制历史样品检测项目'
:
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
this
.
_copyHisItem
()
break
break
case
'
接收
'
:
case
'
收样室收样
'
:
this
.
_sampleReceive
()
this
.
_sampleReceive
()
break
break
case
'打印标签'
:
case
'打印标签'
:
...
@@ -526,15 +526,7 @@ export default {
...
@@ -526,15 +526,7 @@ export default {
title
:
'提示'
,
title
:
'提示'
,
content
:
'确定要接收这 '
+
this
.
selectIds
.
length
+
' 条数据?'
,
content
:
'确定要接收这 '
+
this
.
selectIds
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
onOk
:
()
=>
{
this
.
$store
console
.
log
(
tempData
)
.
dispatch
(
'FoodSample/batchSaveReceive'
,
tempData
)
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSample
.
success
)
{
this
.
$Message
.
success
(
'提交成功!'
)
this
.
selectData
=
[]
this
.
_searchTop
()
}
})
}
}
})
})
}
}
...
...
router/soil-routes.js
View file @
7928bdc9
...
@@ -9,6 +9,7 @@ import EntrustIndex from '../pages/meter-entrust/entrust-register/EntrustIndex'
...
@@ -9,6 +9,7 @@ import EntrustIndex from '../pages/meter-entrust/entrust-register/EntrustIndex'
import
ReviewEntrust
from
'../pages/meter-entrust/entrust-review/ReviewEntrust'
import
ReviewEntrust
from
'../pages/meter-entrust/entrust-review/ReviewEntrust'
import
SampleReceiveIndex
from
'../pages/soil-sample-manage/sample-receive/SampleReceiveIndex'
import
SampleReceiveIndex
from
'../pages/soil-sample-manage/sample-receive/SampleReceiveIndex'
import
SamplePreparationIndex
from
'../pages/soil-sample-manage/sample-preparation/SamplePreparationIndex'
import
SamplePreparationIndex
from
'../pages/soil-sample-manage/sample-preparation/SamplePreparationIndex'
import
AddressManage
from
'../pages/soil-sample-manage/sample-address/AddressManage'
import
Blank
from
'~/pages/blank'
import
Blank
from
'~/pages/blank'
export
default
[
export
default
[
{
{
...
@@ -55,6 +56,11 @@ export default [
...
@@ -55,6 +56,11 @@ export default [
path
:
'backups'
,
path
:
'backups'
,
component
:
workbench
,
component
:
workbench
,
meta
:
{
title
:
'备样管理'
}
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