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
21b1bbde
Commit
21b1bbde
authored
Nov 10, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了备样和余样批量填写存放信息
parent
23d5ea3d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
20 deletions
+65
-20
soil-sample.js
api/soil/soil-sample.js
+15
-0
SampleParpareBatchEdit.vue
...l-sample-manage/backups-manage/SampleParpareBatchEdit.vue
+5
-6
SampleBackupsManage.vue
...-sample-manage/backups-manage/tab/SampleBackupsManage.vue
+1
-1
SampleSurplusBatchEdit.vue
...l-sample-manage/surplus-manage/SampleSurplusBatchEdit.vue
+19
-7
SampleSurplusManage.vue
...-sample-manage/surplus-manage/tab/SampleSurplusManage.vue
+25
-6
No files found.
api/soil/soil-sample.js
View file @
21b1bbde
...
@@ -134,11 +134,26 @@ export default {
...
@@ -134,11 +134,26 @@ export default {
http
.
post
(
'res/v1/dict/dict_query?type='
+
data
).
then
(
res
=>
res
),
http
.
post
(
'res/v1/dict/dict_query?type='
+
data
).
then
(
res
=>
res
),
editBackup
:
data
=>
editBackup
:
data
=>
http
.
put
(
'soil/v1/sample_backup/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
http
.
put
(
'soil/v1/sample_backup/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
bathUpdateBackupInfo
:
data
=>
http
.
post
(
'soil/v1/sample_backup/bath_update_backup_info/?ids='
+
data
.
id
,
data
.
obj
)
.
then
(
res
=>
res
),
editItem
:
data
=>
editItem
:
data
=>
http
.
post
(
'soil/v1/experiment/bath_update_info'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/experiment/bath_update_info'
,
data
).
then
(
res
=>
res
),
// 余样编辑
// 余样编辑
editPrepare
:
data
=>
editPrepare
:
data
=>
http
.
put
(
'soil/v1/prepare/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
http
.
put
(
'soil/v1/prepare/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
// 批量填写余样信息
bathUpdateSurplusInfo
:
data
=>
http
.
post
(
'soil/v1/prepare/bath_update_surplus_info/?ids='
+
data
.
id
,
data
.
obj
)
.
then
(
res
=>
res
),
getUserList
:
data
=>
http
.
post
(
'/base/v1/user/page'
).
then
(
res
=>
res
),
getUserList
:
data
=>
http
.
post
(
'/base/v1/user/page'
).
then
(
res
=>
res
),
scanTakeSample
:
data
=>
scanTakeSample
:
data
=>
http
http
...
...
pages/soil-sample-manage/backups-manage/SampleParpareBatchEdit.vue
View file @
21b1bbde
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<Modal
v-model=
"showModal"
:mask-closable=
"false"
>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
>
<p
slot=
"header"
>
填写存放信息
</p>
<p
slot=
"header"
>
填写存放信息
</p>
<div>
<div>
<Form
id=
"storage-location-form"
ref=
"formObj"
:model=
"formObj"
:
rules=
"ruleValidate"
:
label-width=
"100"
>
<Form
id=
"storage-location-form"
ref=
"formObj"
:model=
"formObj"
:label-width=
"100"
>
<Form-item
label=
"存储条件:"
>
<Form-item
label=
"存储条件:"
>
<el-select
:value=
"formObj.conditions"
@
change=
"selCondi"
style=
"width:100%"
size=
"small"
>
<el-select
:value=
"formObj.conditions"
@
change=
"selCondi"
style=
"width:100%"
size=
"small"
>
<el-option
v-for=
"item in conditionList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
<el-option
v-for=
"item in conditionList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
...
@@ -88,9 +88,6 @@ export default {
...
@@ -88,9 +88,6 @@ export default {
this
.
getPage
.
records
[
this
.
currentIndex
].
backupUser
=
''
this
.
getPage
.
records
[
this
.
currentIndex
].
backupUser
=
''
}
}
this
.
formObj
.
backupUserId
=
data
this
.
formObj
.
backupUserId
=
data
// this.$forceUpdate()
// this.getPage.records[this.currentIndex].backupUser = data
// this.getPage.records[this.currentIndex].backupUser = data
},
},
// 存储条件 回调
// 存储条件 回调
_locChangeCondition
(
msg
,
data
)
{
_locChangeCondition
(
msg
,
data
)
{
...
@@ -150,7 +147,7 @@ export default {
...
@@ -150,7 +147,7 @@ export default {
_ok
()
{
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
const
data
=
this
.
formObj
const
data
=
this
.
$serializeForm
(
this
.
formObj
)
this
.
_saveInfo
({
id
:
this
.
ids
.
join
(
','
),
obj
:
data
})
this
.
_saveInfo
({
id
:
this
.
ids
.
join
(
','
),
obj
:
data
})
}
else
{
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
$Message
.
error
(
'表单验证失败!'
)
...
@@ -159,9 +156,11 @@ export default {
...
@@ -159,9 +156,11 @@ export default {
})
})
},
},
_saveInfo
:
async
function
(
data
)
{
_saveInfo
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
editBackup
(
data
)
const
result
=
await
soilSample
.
bathUpdateBackupInfo
(
data
)
if
(
result
)
{
if
(
result
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-result-change'
)
this
.
showModal
=
false
}
}
}
}
}
}
...
...
pages/soil-sample-manage/backups-manage/tab/SampleBackupsManage.vue
View file @
21b1bbde
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
</div>
</div>
<SampleParpareApply
ref=
"applyModal"
@
on-result-change=
"_page"
></SampleParpareApply>
<SampleParpareApply
ref=
"applyModal"
@
on-result-change=
"_page"
></SampleParpareApply>
<Operation
ref=
"recordModal"
></Operation>
<Operation
ref=
"recordModal"
></Operation>
<SampleParpareBatchEdit
ref=
"batchEdit"
></SampleParpareBatchEdit>
<SampleParpareBatchEdit
ref=
"batchEdit"
@
on-result-change=
"_page"
></SampleParpareBatchEdit>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
...
pages/soil-sample-manage/surplus-manage/SampleSurplusBatchEdit.vue
View file @
21b1bbde
...
@@ -5,10 +5,9 @@
...
@@ -5,10 +5,9 @@
<div>
<div>
<Form
id=
"storage-location-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
>
<Form
id=
"storage-location-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
>
<Form-item
label=
"保存容器:"
prop=
"keepContainer"
>
<Form-item
label=
"保存容器:"
prop=
"keepContainer"
>
<el-select
v-model=
"formObj.keepContainer"
clearable
style=
"width:100%"
size=
"small"
>
<AutoCompletes
v-model=
"formObj.keepContainer"
:downData=
"containerList"
<el-option
v-for=
"item in containerList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
@
on-result-change=
"_containerChange"
name=
"keepContainer"
placeholder=
"输入或选择保存容器"
</el-option>
></AutoCompletes>
</el-select>
</Form-item>
</Form-item>
<Form-item
label=
"制备数量"
>
<Form-item
label=
"制备数量"
>
<Input
v-model=
"formObj.quantity"
clearable
placeholder=
"请输入备样数量"
></Input>
<Input
v-model=
"formObj.quantity"
clearable
placeholder=
"请输入备样数量"
></Input>
...
@@ -26,9 +25,10 @@
...
@@ -26,9 +25,10 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
soilSample
}
from
'../../../api'
import
{
soilSample
}
from
'../../../api'
import
AutoCompletes
from
'../../../components/base/AutoCompletes'
export
default
{
export
default
{
components
:
{},
components
:
{
AutoCompletes
},
data
()
{
data
()
{
return
{
return
{
ids
:
[],
// 委托ids
ids
:
[],
// 委托ids
...
@@ -56,7 +56,19 @@ export default {
...
@@ -56,7 +56,19 @@ export default {
_getContainerList
:
async
function
()
{
_getContainerList
:
async
function
()
{
const
result
=
await
soilSample
.
getDictList
(
'保存容器'
)
const
result
=
await
soilSample
.
getDictList
(
'保存容器'
)
if
(
result
)
{
if
(
result
)
{
this
.
containerList
=
result
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
this
.
containerList
.
push
(
result
[
i
].
name
)
}
}
},
_containerChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
keepContainer
=
data
break
case
'query'
:
this
.
formObj
.
keepContainer
=
data
break
}
}
},
},
_locChange
(
msg
,
data
)
{
_locChange
(
msg
,
data
)
{
...
@@ -155,7 +167,7 @@ export default {
...
@@ -155,7 +167,7 @@ export default {
})
})
},
},
_saveInfo
:
async
function
(
data
)
{
_saveInfo
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
editPrepare
(
data
)
const
result
=
await
soilSample
.
bathUpdateSurplusInfo
(
data
)
if
(
result
)
{
if
(
result
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-result-change'
)
this
.
$emit
(
'on-result-change'
)
...
...
pages/soil-sample-manage/surplus-manage/tab/SampleSurplusManage.vue
View file @
21b1bbde
...
@@ -42,11 +42,16 @@
...
@@ -42,11 +42,16 @@
<div
v-else-if=
"item.key==='keepContainer'"
>
<div
v-else-if=
"item.key==='keepContainer'"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
<div
v-else
>
<el-select
v-model=
"scope.row.keepContainer"
clearable
style=
"width:100%"
size=
"small"
>
<AutoCompletes
v-model=
"scope.row.keepContainer"
:downData=
"containerList"
<el-option
v-for=
"item in containerList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
@
on-result-change=
"_containerChange"
name=
"keepContainer"
placeholder=
"输入或选择保存容器"
</el-option>
></AutoCompletes>
</el-select>
</div>
</div>
<!--
<div
v-else
>
-->
<!--
<el-select
v-model=
"scope.row.keepContainer"
clearable
style=
"width:100%"
size=
"small"
>
-->
<!--
<el-option
v-for=
"item in containerList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
-->
<!--
</el-option>
-->
<!--
</el-select>
-->
<!--
</div>
-->
</div>
</div>
<div
v-else-if=
"item.key==='quantity'"
>
<div
v-else-if=
"item.key==='quantity'"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
...
@@ -90,11 +95,13 @@ import SampleSurplusBatchEdit from '../SampleSurplusBatchEdit'
...
@@ -90,11 +95,13 @@ import SampleSurplusBatchEdit from '../SampleSurplusBatchEdit'
import
http
from
'../../../../api/http'
import
http
from
'../../../../api/http'
import
{
soilSample
}
from
'../../../../api'
import
{
soilSample
}
from
'../../../../api'
import
Operation
from
'../../../../components/operation/Operation'
import
Operation
from
'../../../../components/operation/Operation'
import
AutoCompletes
from
'../../../../components/base/AutoCompletes'
export
default
{
export
default
{
components
:
{
components
:
{
SampleParpareApply
,
SampleParpareApply
,
Operation
,
Operation
,
SampleSurplusBatchEdit
SampleSurplusBatchEdit
,
AutoCompletes
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -213,7 +220,9 @@ export default {
...
@@ -213,7 +220,9 @@ export default {
_getContainerList
:
async
function
()
{
_getContainerList
:
async
function
()
{
const
result
=
await
soilSample
.
getDictList
(
'保存容器'
)
const
result
=
await
soilSample
.
getDictList
(
'保存容器'
)
if
(
result
)
{
if
(
result
)
{
this
.
containerList
=
result
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
this
.
containerList
.
push
(
result
[
i
].
name
)
}
}
}
},
},
// 查询卡片备样数量
// 查询卡片备样数量
...
@@ -226,6 +235,16 @@ export default {
...
@@ -226,6 +235,16 @@ export default {
}
}
})
})
},
},
_containerChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
getPage
.
records
[
this
.
currentIndex
].
keepContainer
=
data
break
case
'query'
:
this
.
getPage
.
records
[
this
.
currentIndex
].
keepContainer
=
data
break
}
},
// 选择时间
// 选择时间
_endDateChange
(
data
)
{
_endDateChange
(
data
)
{
this
.
getPage
.
records
[
this
.
currentIndex
].
endDate
=
data
this
.
getPage
.
records
[
this
.
currentIndex
].
endDate
=
data
...
...
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