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
d234bf7b
Commit
d234bf7b
authored
Sep 22, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了试验任务分配
parent
9241ce6a
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
596 additions
and
116 deletions
+596
-116
soil-test.js
api/soil/soil-test.js
+12
-1
PTVXETable.vue
components/table/PTVXETable.vue
+0
-1
assignPerson.vue
components/user-info-single/assignPerson.vue
+13
-0
SoilSampleItemManage.vue
pages/meter-entrust/SoilSampleItemManage.vue
+10
-15
EntrustRegisterEdit.vue
pages/meter-entrust/entrust-register/EntrustRegisterEdit.vue
+2
-1
TestInputIndex.vue
pages/soil-test-manage/test-input/TestInputIndex.vue
+446
-0
AllotByEntrust.vue
pages/soil-test-manage/test-task-manage/AllotByEntrust.vue
+0
-10
SampleManage.vue
...e/test-task-manage/entrust-sample-manage/SampleManage.vue
+6
-3
ItemLeftList.vue
...k-manage/entrust-sample-manage/item-tabs/ItemLeftList.vue
+3
-3
ItemRightList.vue
...-manage/entrust-sample-manage/item-tabs/ItemRightList.vue
+10
-3
SampleLeftList.vue
...nage/entrust-sample-manage/sample-tabs/SampleLeftList.vue
+21
-12
SampleRightList.vue
...age/entrust-sample-manage/sample-tabs/SampleRightList.vue
+69
-63
SampleTabs.vue
...k-manage/entrust-sample-manage/sample-tabs/SampleTabs.vue
+2
-3
soil-routes.js
router/soil-routes.js
+2
-1
No files found.
api/soil/soil-test.js
View file @
d234bf7b
...
...
@@ -8,5 +8,16 @@ import http from '../http'
export
default
{
// page
pageExpAllot
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_allot'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/entrust/page_exp_allot'
,
data
).
then
(
res
=>
res
),
// 试验任务分配按样品分配分页列表
pageExpAllotSample
:
data
=>
http
.
post
(
'soil/v1/sample/page_exp_allot_sample'
,
data
).
then
(
res
=>
res
),
// 试验任务按样品分配-试验项目分配操作
allotExp
:
data
=>
http
.
post
(
'soil/v1/experiment/allot_exp'
,
data
).
then
(
res
=>
res
),
// 试验任务分配样品对应检测项目分页列表
pageAllot
:
data
=>
http
.
post
(
'soil/v1/experiment/page_allot'
,
data
).
then
(
res
=>
res
),
pageExpTest
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_test'
,
data
).
then
(
res
=>
res
)
}
components/table/PTVXETable.vue
View file @
d234bf7b
...
...
@@ -261,7 +261,6 @@ export default {
if
(
this
.
hideCheckbox
===
undefined
||
this
.
hideCheckbox
===
false
)
{
const
selData
=
data
.
selection
this
.
checkData
=
selData
console
.
log
(
'checkData'
,
this
.
checkData
)
// 默认返回的是id数组
if
(
this
.
selectData
===
undefined
)
{
const
idList
=
[]
...
...
components/user-info-single/assignPerson.vue
View file @
d234bf7b
...
...
@@ -124,6 +124,19 @@ export default {
this
.
$refs
.
userCheck
.
_refresh
()
this
.
$refs
.
marshalling
.
_uidOpen
(
uid
)
},
_openGoup
(
modalTitle
,
treeName
)
{
this
.
modalTitle
=
modalTitle
this
.
changeBool
=
false
this
.
showUserModal
=
true
this
.
titleChange
=
'用户编组'
if
(
treeName
===
undefined
)
{
this
.
treeName
=
'userMan'
}
else
{
this
.
treeName
=
treeName
}
this
.
$refs
.
userCheck
.
_refresh
()
this
.
$refs
.
marshalling
.
_open
()
},
// 当前登录用户所处的组织
_getCurrentOrg
:
async
function
()
{
const
result
=
await
sysOrg
.
getOrg
()
...
...
pages/meter-entrust/SoilSampleItemManage.vue
View file @
d234bf7b
...
...
@@ -31,7 +31,7 @@
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
:get-page=
"getPage"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
...
...
@@ -54,7 +54,7 @@
</el-select>
<span
v-if=
"!showOption"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'否'
:
'是'
}}
</span>
</div>
<div
v-else-if=
"item.key==='
progres
s'"
>
<div
v-else-if=
"item.key==='
statu
s'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</div>
<div
v-else-if=
"item.judged"
>
...
...
@@ -119,6 +119,7 @@ export default {
components
:
{},
data
()
{
return
{
formId
:
'SampleItemManage'
,
currentComponent
:
''
,
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'提交分包'
},
...
...
@@ -142,19 +143,13 @@ export default {
{
id
:
''
,
name
:
'关闭'
,
type
:
'primary'
}
],
pageColumns
:
[
{
title
:
'项目类别'
,
key
:
'type'
,
width
:
160
},
{
title
:
'检测项目'
,
key
:
'name'
,
width
:
140
},
{
title
:
'子项目'
,
key
:
'sonItem'
,
width
:
140
},
{
title
:
'是否分包'
,
key
:
'epibolyItem'
},
{
title
:
'方法'
,
key
:
'method'
,
width
:
180
},
{
title
:
'设备'
,
key
:
'device'
,
width
:
180
},
{
title
:
'检测依据'
,
key
:
'code'
,
width
:
180
},
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
110
},
{
title
:
'比较符'
,
key
:
'compareSymbol'
,
width
:
100
},
{
title
:
'限值'
,
key
:
'limitValue'
},
{
title
:
'单位'
,
key
:
'unit'
},
{
title
:
'是否系统判定'
,
key
:
'judged'
,
width
:
120
,
judged
:
true
},
{
title
:
'备注'
,
key
:
'remark'
}
{
title
:
'试验名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'试验项目英文简写'
,
key
:
'shortName'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
},
{
title
:
'检测依据'
,
key
:
'testBasis'
,
width
:
180
},
{
title
:
'试验方法'
,
key
:
'testMethod'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
180
}
],
subOptions
:
[
{
...
...
pages/meter-entrust/entrust-register/EntrustRegisterEdit.vue
View file @
d234bf7b
...
...
@@ -685,6 +685,7 @@ export default {
this
.
showModal
=
false
},
_open
(
formObj
)
{
this
.
_getList
()
this
.
showBtn
=
true
this
.
showModal
=
true
this
.
$refs
.
formObj
.
resetFields
()
...
...
@@ -702,6 +703,7 @@ export default {
}
},
_openEdit
(
formObj
)
{
this
.
_getList
()
this
.
showBtn
=
false
this
.
showModal
=
true
this
.
$refs
.
formObj
.
resetFields
()
...
...
@@ -723,7 +725,6 @@ export default {
// }
// }
},
_showTime
(
formObj
)
{
if
(
this
.
formObj
.
entrustDate
===
undefined
)
{
this
.
formObj
.
entrustDate
=
''
...
...
pages/soil-test-manage/test-input/TestInputIndex.vue
0 → 100644
View file @
d234bf7b
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-form"
:label-width=
"70"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"委托商:"
>
<Input
v-model=
"formObj.client"
@
on-enter=
"_formSearch"
placeholder=
"请输入委托编号"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
v-model=
"formObj.entrustCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入委托单位"
clearable
></Input>
</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"
>
<PTVXETable
ref=
"pageTable"
: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"
>
<div
v-if=
"item.detail"
><a
@
click
.
stop=
"_detailModal(scope.row.id,scope.row.type)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
</div>
<span
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<div
v-else-if=
"item.type"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'企业'
:
scope
.
row
[
item
.
key
]
===
1
?
'政府'
:
scope
.
row
[
item
.
key
]
===
2
?
'食品类抽样单'
:
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userResult"
></UserInfo>
<SampleManage
ref=
"sampleManageModal"
@
on-result-change=
"_page"
></SampleManage>
<ItemManage
ref=
"itemManageModal"
@
on-result-change=
"_page"
></ItemManage>
<Operation
ref=
"operation"
></Operation>
</div>
</template>
<
script
>
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
import
{
soilTest
}
from
'../../../api'
import
Operation
from
'../../../components/operation/Operation'
export
default
{
components
:
{
UserInfo
,
Operation
},
data
()
{
return
{
formObj
:
{
client
:
undefined
,
entrustCode
:
undefined
},
typeList
:
[{
name
:
'企业'
,
value
:
0
},
{
name
:
'政府'
,
value
:
1
}],
iconMsg
:
[
{
type
:
'ios-beaker'
,
id
:
''
,
name
:
'管理样品'
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
},
{
type
:
'ios-clock'
,
id
:
''
,
name
:
'操作日志'
}
],
getPage
:
{},
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
200
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
120
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
120
,
date
:
true
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
120
},
{
title
:
'水深(米)'
,
key
:
'waterDepth'
,
width
:
120
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
120
},
{
title
:
'进度'
,
key
:
'progress'
,
width
:
120
,
status
:
true
},
{
title
:
'工程号'
,
key
:
'projectNo'
,
width
:
120
},
{
title
:
'报告编号'
,
key
:
'reportCode'
,
width
:
120
},
{
title
:
'制表日期'
,
key
:
'tabulateDate'
,
width
:
120
,
date
:
true
},
{
title
:
'制表人'
,
key
:
'tabulater'
,
width
:
120
},
{
title
:
'批准日期'
,
key
:
'approveDate'
,
width
:
120
,
date
:
true
},
{
title
:
'批准人'
,
key
:
'approver'
,
width
:
120
},
{
title
:
'检验类别'
,
key
:
'testType'
,
width
:
120
}
],
searchOpen
:
false
,
btn
:
[
{
type
:
'primary'
,
id
:
'ZBC'
,
name
:
'一键接收'
}
],
selectIds
:
[],
currentComponent
:
''
,
acceptSelectUserValue
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'tabSearch'
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
// 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
},
methods
:
{
_userResult
(
data
,
msg
)
{
const
sendData
=
{
ids
:
this
.
selectIds
.
join
(
','
)
}
if
(
data
)
{
sendData
.
person
=
data
.
realname
sendData
.
personId
=
data
.
userId
}
switch
(
msg
)
{
case
'contractSendMan'
:
// 一键发放
this
.
$store
.
dispatch
(
'FoodContract/oneKeySend'
,
sendData
).
then
(()
=>
{
this
.
_resultChange
(
'发放成功'
)
})
break
case
'contractReceiveSendMan'
:
// 一键接收并发放
this
.
$store
.
dispatch
(
'FoodContract/oneKeyReceiveSend'
,
sendData
)
.
then
(()
=>
{
this
.
_resultChange
(
'一键接收并发放成功'
)
})
break
case
'sampleSendScanMan'
:
// 扫码发放
this
.
$refs
.
refModal
.
_open
(
'扫码发放'
,
data
)
break
case
'sampleReceiveSendScanMan'
:
// 扫码接收并发放
this
.
$refs
.
refModal
.
_open
(
'扫码接收发放'
,
data
)
break
}
},
// 一键接收并发放
// 组件返回值
_componentResult
(
data
,
msg
)
{
switch
(
this
.
currentComponent
)
{
default
:
this
.
_page
()
}
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(()
=>
{
switch
(
msg
)
{
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
default
:
this
.
_btnOption
(
msg
)
}
})
},
// btn操作
_btnOption
(
msg
)
{
console
.
log
(
msg
)
switch
(
msg
)
{
case
'一键接收'
:
this
.
_oneKeyReceive
()
break
case
'一键发放'
:
this
.
_oneKeySend
()
break
case
'一键接收并发放'
:
this
.
_oneKeyReceiveSend
()
break
case
'扫码接收'
:
this
.
currentComponent
=
'ReceiveScan'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_open
()
})
break
case
'扫码发放'
:
this
.
_scanSend
(
'sampleSendScanMan'
)
break
case
'扫码接收并发放'
:
this
.
_scanSend
(
'sampleReceiveSendScanMan'
)
break
case
'信息维护'
:
this
.
_maintainInfo
()
break
case
'登记协议'
:
this
.
_editModals
(
msg
)
break
}
},
// 扫码接收并发放
_scanSend
(
msg
)
{
if
(
msg
===
'sampleReceiveSendScanMan'
||
msg
===
'sampleSendScanMan'
)
{
// 扫码接收并发放判断是够选人
if
(
this
.
acceptSelectUserValue
===
'是'
)
{
this
.
$refs
.
userModal
.
_open
(
msg
,
'请选择领样人'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
'扫码发放'
)
}
}
else
{
// 其他
this
.
$refs
.
userModal
.
_open
(
msg
,
'请选择领样人'
)
}
},
// 一键接收并发放
_oneKeyReceiveSend
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$msgTip
(
'warning'
,
'请至少选择一条数据!'
)
}
else
{
// 根据字典是否选择人员
// eslint-disable-next-line no-lonely-if
if
(
this
.
acceptSelectUserValue
===
'是'
)
{
// 选择人员接收并发放
this
.
$store
.
dispatch
(
'FoodContract/oneKeyReceiveSendCheck'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
})
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodContract
.
success
if
(
result
)
{
// 验证成功
this
.
$refs
.
userModal
.
_open
(
'contractReceiveSendMan'
,
'请选择领样人'
)
}
})
}
else
{
// 不选择人员
this
.
$store
.
dispatch
(
'FoodContract/oneKeyReceiveSend'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
})
.
then
(()
=>
{
this
.
_resultChange
(
'一键接收并发放成功'
)
})
}
}
},
// 一键发放
_oneKeySend
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$msgTip
(
'warning'
,
'请至少选择一条数据!'
)
}
else
{
// 一键发放判断是否选人
// eslint-disable-next-line no-lonely-if
if
(
this
.
acceptSelectUserValue
===
'是'
)
{
this
.
$store
.
dispatch
(
'FoodContract/oneKeySendCheck'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
})
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodContract
.
success
)
{
this
.
$refs
.
userModal
.
_open
(
'contractSendMan'
,
'请选择领样人'
)
}
})
}
else
{
// 一键发放
this
.
$store
.
dispatch
(
'FoodContract/oneKeySend'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
})
.
then
(()
=>
{
this
.
_resultChange
(
'发放成功'
)
})
}
}
},
// 一键接收
_oneKeyReceive
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$msgTip
(
'warning'
,
'请至少选择一条数据!'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要一键接收这 '
+
this
.
selectIds
.
length
+
' 条委托下的样品?'
,
onOk
:
()
=>
{
this
.
$store
.
dispatch
(
'FoodContract/oneKeyReceive'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
})
.
then
(()
=>
{
this
.
_resultChange
(
'接收成功'
)
})
}
})
}
},
// 信息维护
_maintainInfo
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
currentComponent
=
'MaintainInfoModal'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
,
1
)
})
}
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
console
.
log
(
res
)
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'管理样品'
:
this
.
_editModal
(
data
.
id
,
data
.
type
,
data
.
cname
)
break
case
'项目管理'
:
this
.
$refs
.
itemManageModal
.
_open
(
data
.
id
)
break
case
'编辑协议'
:
this
.
_editModals
(
res
,
data
)
break
case
'附件'
:
this
.
_upload
(
data
.
id
)
break
case
'操作日志'
:
this
.
_operationRecord
(
data
.
id
)
break
}
})
},
_editModal
(
id
,
type
,
name
)
{
this
.
$refs
.
sampleManageModal
.
_open
(
id
,
type
,
name
)
},
_editModals
(
res
,
data
)
{
if
(
res
===
'登记协议'
)
{
this
.
$refs
.
editModal
.
_open
(
res
,
data
)
}
else
if
(
res
===
'编辑协议'
)
{
this
.
$store
.
dispatch
(
'FoodContract/verificationEdit'
,
{
id
:
data
.
id
})
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodContract
.
model
===
true
)
{
this
.
$refs
.
editModal
.
_open
(
res
,
data
)
}
})
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodContract
.
page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soilTest
.
pageExpTest
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_detailModal
(
id
,
type
)
{
// 查看
this
.
$store
.
dispatch
(
'FoodContract/getById'
,
id
).
then
(()
=>
{
if
(
type
===
0
)
{
// 企业委托 ’0‘
this
.
currentComponent
=
'FoodContractCompanyDetail'
}
else
{
// 政府委托 ’1‘
this
.
currentComponent
=
'FoodContractGovernDetail'
}
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodContract
.
model
)
})
})
},
_search
()
{
this
.
_page
()
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
operation
.
_open
(
id
)
},
_resultChange
(
msg
)
{
if
(
this
.
$store
.
state
.
FoodContract
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
this
.
selectIds
=
[]
}
},
_upload
(
id
)
{
// 上传文件
this
.
$refs
.
refModal
.
_open
(
id
,
'contractId'
)
}
}
}
</
script
>
pages/soil-test-manage/test-task-manage/AllotByEntrust.vue
View file @
d234bf7b
...
...
@@ -93,16 +93,6 @@ export default {
id
:
''
,
name
:
'管理样品'
},
{
type
:
'ios-list'
,
id
:
''
,
name
:
'项目管理'
},
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑协议'
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
},
{
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/SampleManage.vue
View file @
d234bf7b
...
...
@@ -29,6 +29,7 @@ export default {
return
{
type
:
''
,
contractId
:
''
,
// 合同id
entrustId
:
''
,
showSampleModal
:
false
,
modalTitle
:
''
,
selectIds
:
[],
...
...
@@ -58,7 +59,7 @@ export default {
},
// 待发放
_waitSend
()
{
this
.
$refs
.
waitScanModal
.
_open
()
this
.
$refs
.
waitScanModal
.
_open
(
this
.
entrustId
)
},
// 已接收
_issuedPage
()
{
...
...
@@ -66,11 +67,13 @@ export default {
},
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'alreadyIssued'
)
{
this
.
_issuedPage
()
//
this._issuedPage()
}
else
if
(
tab
.
name
===
'waitReceive'
)
{
// this._waitPage()
this
.
$refs
.
waitReceiveModal
.
_open
()
}
else
if
(
tab
.
name
===
'waitScan'
)
{
this
.
_waitSend
()
this
.
$refs
.
waitScanModal
.
_open
(
this
.
entrustId
)
// this._waitSend()
}
},
_search
()
{
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/item-tabs/ItemLeftList.vue
View file @
d234bf7b
...
...
@@ -14,7 +14,7 @@
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
<btn-list
:msg=
"btn"
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 6px;"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
...
...
@@ -59,7 +59,6 @@ export default {
{
key
:
'name'
,
name
:
'检测项目'
,
placeholder
:
'请输入检测项目'
},
{
key
:
'testBasis'
,
name
:
'检测依据'
,
placeholder
:
'请输入检测依据'
}
],
btn
:
[{
id
:
''
,
name
:
'自动分配'
}],
getPage
:
{},
pageColumns
:
[
{
title
:
'检测项目'
,
key
:
'name'
,
width
:
120
},
...
...
@@ -139,7 +138,8 @@ export default {
}
},
_autoAssign
()
{
this
.
$refs
.
autoAssignModal
.
_open
()
console
.
log
(
'自动分配'
)
// this.$refs.autoAssignModal._open()
// this.$store.dispatch('FoodItem/autoAllotNum').then(() => {
// const num = this.$store.state.FoodItem.count
// if (num !== undefined) {
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/item-tabs/ItemRightList.vue
View file @
d234bf7b
...
...
@@ -46,13 +46,15 @@
</PTVXETable>
</Col>
</Row>
<AssignPerson
ref=
"personModal"
@
on-result-change=
"_page"
></AssignPerson>
</div>
</template>
<
script
>
import
Global
from
'../../../../../api/config'
import
{
soilTest
}
from
'../../../../../api'
import
AssignPerson
from
'../../../../../components/user-info-single/AssignPerson'
export
default
{
components
:
{},
components
:
{
AssignPerson
},
data
()
{
return
{
// 定义表格名称----英文
...
...
@@ -267,8 +269,9 @@ export default {
async
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'按人分配'
:
await
this
.
_reportDueDate
()
await
this
.
_userAssign
()
this
.
_allotByPerson
()
// await this._reportDueDate()
// await this._userAssign()
break
case
'按组分配'
:
await
this
.
_reportDueDate
()
...
...
@@ -295,6 +298,10 @@ export default {
break
}
},
_allotByPerson
()
{
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
this
.
$refs
.
personModal
.
_openGoupByUserId
(
'分配人员'
,
user
.
id
,
'itemTree'
)
},
// 信息维护
_maintainInfo
()
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/sample-tabs/SampleLeftList.vue
View file @
d234bf7b
...
...
@@ -14,13 +14,13 @@
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
@
on-result-change=
"_btnClick"
class=
"contHide
"
></btn-list>
<btn-list
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 6px;
"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:pageColumns=
"pageColumns"
:table-name=
"tableName"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:rows=
"100"
select-data
>
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:rows=
"100"
>
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
...
...
@@ -50,20 +50,23 @@ export default {
data
()
{
return
{
currentComponent
:
''
,
formObj
:
{},
formObj
:
{
entrustId
:
undefined
},
entrustId
:
''
,
tableName
:
'food-task-assign-item-left'
,
// 用户自己选中的列
userColumns
:
[],
selectIds
:
[],
optionList
:
[
{
key
:
'name'
,
name
:
'检测项目'
,
placeholder
:
'请输入检测项目'
},
{
key
:
'testBasis'
,
name
:
'检测依据'
,
placeholder
:
'请输入检测依据'
}
],
btn
:
[{
id
:
''
,
name
:
'自动分配'
}],
getPage
:
{},
pageColumns
:
[
{
title
:
'
检测项目'
,
key
:
'nam
e'
,
width
:
120
},
{
title
:
'
检测依据'
,
key
:
'testBasis
'
,
width
:
140
},
{
title
:
'
检测依据名称'
,
key
:
'testBasisName
'
,
width
:
200
}
{
title
:
'
试样编号'
,
key
:
'sampleCod
e'
,
width
:
120
},
{
title
:
'
委托编号'
,
key
:
'entrustCode
'
,
width
:
140
},
{
title
:
'
委托商'
,
key
:
'client
'
,
width
:
200
}
]
}
},
...
...
@@ -90,7 +93,8 @@ export default {
break
}
},
_open
()
{
_open
(
id
)
{
this
.
entrustId
=
id
this
.
_page
()
},
_searchParams
()
{
...
...
@@ -101,7 +105,8 @@ export default {
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
pageExpAllot
(
this
.
formObj
.
entrustId
=
this
.
entrustId
const
result
=
await
soilTest
.
pageExpAllotSample
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
...
...
@@ -112,10 +117,14 @@ export default {
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodItem
.
page
this
.
_page
()
break
case
'selectData'
:
this
.
$emit
(
'on-result-change'
,
data
)
// case 'selectData':
// this.$emit('on-result-change', data)
// break
case
'selectIds'
:
this
.
selectIds
=
data
this
.
$emit
(
'on-result-change'
,
this
.
selectIds
.
join
(
','
))
break
case
'changeSize'
:
this
.
_page
()
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/sample-tabs/SampleRightList.vue
View file @
d234bf7b
...
...
@@ -35,6 +35,7 @@
</div>
<a
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<a
v-else-if=
"item.key==='num'"
@
click
.
stop=
"_sampleDetail(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<span
v-else-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else-if=
"item.datetime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</span>
...
...
@@ -46,13 +47,15 @@
</PTVXETable>
</Col>
</Row>
<AssignPerson
ref=
"personModal"
@
on-result-change=
"_assignBackData"
></AssignPerson>
</div>
</template>
<
script
>
import
Global
from
'../../../../../api/config'
import
{
soilTest
}
from
'../../../../../api'
import
AssignPerson
from
'../../../../../components/user-info-single/AssignPerson'
export
default
{
components
:
{},
components
:
{
AssignPerson
},
data
()
{
return
{
// 定义表格名称----英文
...
...
@@ -83,8 +86,7 @@ export default {
{
key
:
'detectType'
,
name
:
'样品类别'
,
placeholder
:
'请输入样品类别'
}
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'按人分配'
},
{
type
:
'warning'
,
id
:
''
,
name
:
'按组分配'
},
{
type
:
'success'
,
id
:
''
,
name
:
'试验项目分配'
},
{
type
:
''
,
id
:
'food-task-assign-adjust-group'
,
name
:
'调整分组'
},
{
type
:
''
,
...
...
@@ -95,27 +97,16 @@ export default {
],
getPage
:
{},
pageColumns
:
[
{
title
:
'检测项目'
,
key
:
'name'
,
width
:
120
,
fixed
:
'left'
},
{
title
:
'样品编号'
,
key
:
'num'
,
width
:
180
},
{
title
:
'样品名称'
,
key
:
'sampleName'
,
width
:
140
},
{
title
:
'服务类型'
,
key
:
'serviceType'
,
width
:
160
},
{
title
:
'产品'
,
key
:
'subClass'
,
width
:
160
},
{
title
:
'计划完成时间'
,
key
:
'planEndDate'
,
width
:
120
,
date
:
true
},
{
title
:
'应出报告日期'
,
key
:
'reportDueDate'
,
width
:
120
,
date
:
true
},
{
title
:
'数据出具日期'
,
key
:
'resultDate'
,
width
:
120
,
date
:
true
},
{
title
:
'检测依据'
,
key
:
'testBasis'
,
width
:
140
},
{
title
:
'检测依据名称'
,
key
:
'testBasisName'
,
width
:
200
},
{
title
:
'检测方法'
,
key
:
'testMethod'
,
width
:
260
},
{
title
:
'主检人'
,
key
:
'tester'
,
width
:
100
},
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
150
},
{
title
:
'判定依据'
,
key
:
'judgeBasis'
,
width
:
140
},
{
title
:
'判定依据名称'
,
key
:
'judgeBasisName'
,
width
:
200
},
{
title
:
'接样日期'
,
key
:
'receiveDate'
,
width
:
100
,
date
:
true
},
{
title
:
'项目备注'
,
key
:
'remark'
,
width
:
200
},
{
title
:
'样品备注'
,
key
:
'sampleRemark'
,
width
:
200
},
{
title
:
'委托备注'
,
key
:
'contractRemark'
,
width
:
200
}
{
title
:
'试验名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'试验项目英文简写'
,
key
:
'shortName'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'检测依据'
,
key
:
'testBasis'
,
width
:
180
},
{
title
:
'试验方法'
,
key
:
'testMethod'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
180
}
],
leftSelectData
:
[],
sampleIds
:
[],
selectIds
:
[],
// 检测项目id
selectData
:
[],
// 检测项目data
selectSampleIds
:
[],
// 样品ids
...
...
@@ -259,16 +250,15 @@ export default {
})
},
_resultChange
(
msg
)
{
if
(
this
.
$store
.
state
.
FoodItem
.
success
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
}
this
.
$emit
(
'on-result-change'
)
this
.
selectIds
=
[]
},
async
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'按人分配'
:
await
this
.
_reportDueDate
()
await
this
.
_userAssign
()
case
'试验项目分配'
:
this
.
_userAssign
()
break
case
'按组分配'
:
await
this
.
_reportDueDate
()
...
...
@@ -317,7 +307,8 @@ export default {
}
},
_open
(
data
)
{
this
.
leftSelectData
=
data
this
.
getPage
.
records
=
[]
this
.
sampleIds
=
data
if
(
data
.
length
===
0
)
{
this
.
$set
(
this
.
getPage
,
'records'
,
[])
this
.
$set
(
this
.
getPage
,
'total'
,
0
)
...
...
@@ -327,7 +318,7 @@ export default {
this
.
selectData
=
[]
this
.
result
=
[]
}
else
{
this
.
_
formSearch
()
this
.
_
page
()
}
},
_refresh
()
{
...
...
@@ -346,10 +337,8 @@ export default {
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soilTest
.
pageExpAllot
(
this
.
$serializeForm
(
this
.
formObj
)
)
this
.
formObj
.
sampleIds
=
this
.
sampleIds
const
result
=
await
soilTest
.
pageAllot
(
this
.
$serializeForm
(
this
.
formObj
))
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_checkAll
()
...
...
@@ -388,37 +377,40 @@ export default {
},
// 按人分配 选人选时间
_userAssign
()
{
if
(
this
.
defaultPlanDate
)
{
// 有字典
if
(
this
.
sampleNames
===
''
)
{
// 有计划完成时间
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
this
.
currentComponent
=
'AssignPerson'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openGoupByUserId
(
'分配人员'
,
user
.
id
,
'itemTree'
)
})
}
else
{
// 有字典,无计划完成时间的
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'所选项目中含有未设置计划完成时间的'
+
`
${
this
.
_reportDueDate
()}
`
+
'请确认!'
,
onOk
:
()
=>
{}
})
}
}
else
{
// 无字典
this
.
currentComponent
=
'EndDateModal'
this
.
$nextTick
(()
=>
{
this
.
_endDate
()
})
}
console
.
log
(
user
)
this
.
$refs
.
personModal
.
_openGoup
(
'分配人员'
,
'itemTree'
)
// if (this.defaultPlanDate) {
// // 有字典
// if (this.sampleNames === '') {
// // 有计划完成时间
// const user = Global.getUserInfo('userInfo')
// this.currentComponent = 'AssignPerson'
// this.$nextTick(function() {
// this.$refs.refModal._openGoupByUserId(
// '分配人员',
// user.id,
// 'itemTree'
// )
// })
// } else {
// // 有字典,无计划完成时间的
// this.$Modal.confirm({
// title: '提示',
// content:
// '所选项目中含有未设置计划完成时间的' +
// `${this._reportDueDate()}` +
// '请确认!',
// onOk: () => {}
// })
// }
// } else {
// // 无字典
// this.currentComponent = 'EndDateModal'
// this.$nextTick(() => {
// this._endDate()
// })
// }
},
// 遍历出计划时间为空的样品名
_reportDueDate
()
{
...
...
@@ -500,6 +492,20 @@ export default {
})
})
},
_assignBackData
(
data
)
{
console
.
log
(
data
)
const
tempData
=
{}
tempData
.
ids
=
this
.
selectIds
.
join
(
','
)
tempData
.
user
=
data
.
realname
tempData
.
userId
=
data
.
userId
this
.
_allotItems
(
tempData
)
},
_allotItems
:
async
function
(
data
)
{
const
result
=
await
soilTest
.
allotExp
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'分配成功'
)
}
},
// 样品详情
_sampleDetail
(
data
)
{
this
.
$nextTick
(
function
()
{
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/sample-tabs/SampleTabs.vue
View file @
d234bf7b
...
...
@@ -32,9 +32,8 @@ export default {
_rightResult
()
{
this
.
$refs
.
SampleleftModal
.
_page
()
},
_open
()
{
console
.
log
(
'按样品分配'
)
this
.
$refs
.
SampleleftModal
.
_open
()
_open
(
id
)
{
this
.
$refs
.
SampleleftModal
.
_open
(
id
)
// this.$refs.rightModal._getColumn()
}
}
...
...
router/soil-routes.js
View file @
d234bf7b
...
...
@@ -14,6 +14,7 @@ import BackupsManage from '../pages/soil-sample-manage/backups-manage/SampleBack
import
SampleTakeIndex
from
'../pages/soil-sample-manage/sample-take/SampleTakeIndex'
import
SurplusManage
from
'../pages/soil-sample-manage/surplus-manage/SampleSurplusIndex'
import
TestTaskIndex
from
'../pages/soil-test-manage/test-task-manage/TestTaskIndex'
import
TestInputIndex
from
'../pages/soil-test-manage/test-input/TestInputIndex'
import
Blank
from
'~/pages/blank'
export
default
[
{
...
...
@@ -84,7 +85,7 @@ export default [
},
{
path
:
'do_test'
,
component
:
ExperimentItemManage
,
component
:
TestInputIndex
,
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