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
e5542eb4
Commit
e5542eb4
authored
Oct 26, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了余样管理
parent
f35d37bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
34 deletions
+28
-34
soil-sample.js
api/soil/soil-sample.js
+3
-0
SampleSurplusManage.vue
...-sample-manage/surplus-manage/tab/SampleSurplusManage.vue
+25
-34
No files found.
api/soil/soil-sample.js
View file @
e5542eb4
...
...
@@ -132,5 +132,8 @@ export default {
http
.
post
(
'res/v1/dict/dict_query?type='
+
data
).
then
(
res
=>
res
),
editBackup
:
data
=>
http
.
put
(
'soil/v1/sample_backup/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
// 余样编辑
editPrepare
:
data
=>
http
.
put
(
'soil/v1/prepare/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
getUserList
:
data
=>
http
.
post
(
'/base/v1/user/page'
).
then
(
res
=>
res
)
}
pages/soil-sample-manage/surplus-manage/tab/SampleSurplusManage.vue
View file @
e5542eb4
...
...
@@ -39,31 +39,15 @@
<template
slot-scope=
"scope"
>
<span
v-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.key==='quantity'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
<el-input
v-model=
"scope.row.quantity"
clearable
></el-input>
</div>
</div>
<div
v-else-if=
"item.key==='conditions'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-else-if=
"item.key==='keepContainer'"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
<el-select
v-model=
"scope.row.
conditionList
"
clearable
style=
"width:100%"
size=
"small"
>
<el-option
v-for=
"item in con
dition
List"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
<el-select
v-model=
"scope.row.
keepContainer
"
clearable
style=
"width:100%"
size=
"small"
>
<el-option
v-for=
"item in con
tainer
List"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
</el-option>
</el-select>
</div>
</div>
<div
v-else-if=
"item.key==='backupLocation'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
<el-input
v-model=
"scope.row.backupLocation"
clearable
></el-input>
</div>
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
...
...
@@ -151,7 +135,7 @@ export default {
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
150
},
{
title
:
'状态'
,
key
:
'status'
,
status
:
true
,
width
:
100
},
{
title
:
'包装类型'
,
key
:
'samplePack'
,
width
:
100
},
{
title
:
'保存容器'
,
key
:
'keepContainer'
,
width
:
1
0
0
},
{
title
:
'保存容器'
,
key
:
'keepContainer'
,
width
:
1
5
0
},
{
title
:
'制备数量'
,
key
:
'quantity'
,
width
:
100
},
{
title
:
'单位'
,
key
:
'unit'
,
width
:
70
},
{
title
:
'制备人'
,
key
:
'preparer'
,
width
:
130
},
...
...
@@ -161,6 +145,7 @@ export default {
],
conditionList
:
[],
locList
:
[],
containerList
:
[],
currentIndex
:
-
1
,
editIndex
:
-
1
,
endDateBegin
:
''
,
...
...
@@ -216,6 +201,7 @@ export default {
// this._getLocList()
// this._getConditionList()
// this._getBackUpCount()
this
.
_getContainerList
()
},
methods
:
{
// 签发日期
...
...
@@ -228,6 +214,12 @@ export default {
this
.
_page
()
// this._getBackUpCount()
},
_getContainerList
:
async
function
()
{
const
result
=
await
soilSample
.
getDictList
(
'保存容器'
)
if
(
result
)
{
this
.
containerList
=
result
}
},
// 查询卡片备样数量
_getBackUpCount
()
{
this
.
$store
.
dispatch
(
'FoodSampleBackup/backUpCount'
).
then
(()
=>
{
...
...
@@ -249,23 +241,22 @@ export default {
},
_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
const
tempData
=
{
keepContainer
:
this
.
getPage
.
records
[
this
.
currentIndex
].
keepContainer
}
this
.
$store
.
dispatch
(
'FoodSampleBackup/batchEdit'
,
data
).
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSampleBackup
.
success
)
{
}
else
{
this
.
$msgTip
(
'error'
,
'保存失败!'
)
}
this
.
_relPage
()
this
.
_saveOk
({
id
:
this
.
getPage
.
records
[
this
.
currentIndex
].
id
,
obj
:
tempData
})
})
},
_saveOk
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilSample
.
editPrepare
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'编辑成功'
)
}
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentIndex
=
index
switch
(
res
)
{
...
...
@@ -281,7 +272,7 @@ export default {
// // 非空情况下格式化赋值,如果不判断会格式化为当天的日期
// this._endDateChange(this.$dateformat(data.endDate, 'yyyy-mm-dd'))
// }
//
this._save()
this
.
_save
()
this
.
editIndex
=
-
1
break
}
...
...
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