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
f43c1f81
Commit
f43c1f81
authored
Oct 19, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了样品处理
parent
0f83ee75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
1 deletions
+81
-1
soil-sample.js
api/soil/soil-sample.js
+13
-0
SampleDisposeManage.vue
...-sample-manage/sample-dispose/tab/SampleDisposeManage.vue
+68
-1
No files found.
api/soil/soil-sample.js
View file @
f43c1f81
...
@@ -29,5 +29,18 @@ export default {
...
@@ -29,5 +29,18 @@ export default {
pageBackupHandleCheck
:
data
=>
pageBackupHandleCheck
:
data
=>
http
http
.
post
(
'soil/v1/sample_backup/page_backup_handle_check'
,
data
)
.
post
(
'soil/v1/sample_backup/page_backup_handle_check'
,
data
)
.
then
(
res
=>
res
),
// 样品处理审批通过
disposalOk
:
data
=>
http
.
post
(
'soil/v1/sample_backup/disposal_ok?ids='
+
data
).
then
(
res
=>
res
),
// 样品处理审批驳回
disposalFail
:
data
=>
http
.
post
(
'soil/v1/sample_backup/disposal_fail?ids='
+
data
.
ids
+
'&reason='
+
data
.
remark
)
.
then
(
res
=>
res
)
.
then
(
res
=>
res
)
}
}
pages/soil-sample-manage/sample-dispose/tab/SampleDisposeManage.vue
View file @
f43c1f81
...
@@ -106,16 +106,19 @@
...
@@ -106,16 +106,19 @@
</Row>
</Row>
</div>
</div>
</div>
</div>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
></Reason>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
AutoCompletes
from
'../../../../components/base/AutoCompletes'
import
AutoCompletes
from
'../../../../components/base/AutoCompletes'
import
Reason
from
'../../../../components/base/Reason'
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-unused-vars
import
http
from
'../../../../api/http'
import
http
from
'../../../../api/http'
import
{
soilSample
}
from
'../../../../api'
import
{
soilSample
}
from
'../../../../api'
export
default
{
export
default
{
components
:
{
components
:
{
AutoCompletes
AutoCompletes
,
Reason
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -129,6 +132,16 @@ export default {
...
@@ -129,6 +132,16 @@ export default {
btn
:
[
btn
:
[
{
{
type
:
'primary'
,
type
:
'primary'
,
id
:
''
,
name
:
'完成处理'
},
{
type
:
''
,
id
:
''
,
name
:
'驳回'
},
{
type
:
'primary'
,
id
:
'food-sample-preparation-his-all'
,
id
:
'food-sample-preparation-his-all'
,
name
:
'制备'
name
:
'制备'
},
},
...
@@ -350,6 +363,12 @@ export default {
...
@@ -350,6 +363,12 @@ export default {
},
},
_btnClick
(
msg
)
{
_btnClick
(
msg
)
{
switch
(
msg
)
{
switch
(
msg
)
{
case
'完成处理'
:
this
.
_dispose
()
break
case
'驳回'
:
this
.
_disposeBack
()
break
case
'制备'
:
case
'制备'
:
this
.
_preMethod
()
this
.
_preMethod
()
break
break
...
@@ -380,6 +399,54 @@ export default {
...
@@ -380,6 +399,54 @@ export default {
break
break
}
}
},
},
// 通过
_dispose
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定通过这 '
+
this
.
selectIds
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
_disposeOk
(
this
.
selectIds
.
join
(
','
))
}
})
}
},
_disposeBack
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条委托!'
)
}
else
{
this
.
$refs
.
reasonModal
.
_open
(
'退回原因'
)
}
},
_reasonResult
(
data
)
{
if
(
undefined
!==
data
&&
data
!==
''
)
{
this
.
_reportCheckBack
(
data
)
}
},
_reportCheckBack
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
disposalFail
({
ids
:
this
.
selectIds
,
remark
:
data
})
if
(
result
)
{
this
.
$Message
.
success
(
'退回成功!'
)
console
.
log
(
'退回成功'
)
await
this
.
_page
()
}
},
_disposeOk
:
async
function
(
ids
)
{
const
result
=
await
soilSample
.
disposalOk
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功'
)
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
},
// 制备
// 制备
_preMethod
()
{
_preMethod
()
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
...
...
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