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
92667396
Commit
92667396
authored
Oct 27, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了备样管理批样填写
parent
2aa68ee8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
187 additions
and
98 deletions
+187
-98
SampleParpareBatchEdit.vue
...l-sample-manage/backups-manage/SampleParpareBatchEdit.vue
+169
-0
SampleBackupsManage.vue
...-sample-manage/backups-manage/tab/SampleBackupsManage.vue
+18
-98
No files found.
pages/soil-sample-manage/backups-manage/SampleParpareBatchEdit.vue
0 → 100644
View file @
92667396
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
>
<p
slot=
"header"
>
填写存放信息
</p>
<div>
<Form
id=
"storage-location-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
>
<Form-item
label=
"存储条件:"
>
<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>
</el-select>
</Form-item>
<Form-item
label=
"备样位置:"
prop=
"backupLocation"
>
<Input
v-model=
"formObj.backupLocation"
clearable
placeholder=
"请输入备样位置"
></Input>
</Form-item>
<Form-item
label=
"备样数量"
>
<Input
v-model=
"formObj.quantity"
clearable
placeholder=
"请输入备样数量"
></Input>
</Form-item>
<Form-item
label=
"备样人:"
>
<el-select
:value=
"formObj.backupUser"
@
change=
"selUser"
style=
"width:100%"
size=
"small"
>
<el-option
v-for=
"item in backupUserList"
:value=
"item.id"
:label=
"item.realname"
:key=
"item.realname"
>
{{
item
.
realname
}}
</el-option>
</el-select>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></modal-footer>
</div>
</Modal>
</div>
</
template
>
<
script
>
import
{
soilSample
}
from
'../../../api'
export
default
{
components
:
{},
data
()
{
return
{
ids
:
[],
// 委托ids
showModal
:
false
,
formObj
:
{},
ruleValidate
:
{
backupLocation
:
[
{
required
:
true
,
message
:
'备样位置不能为空'
,
trigger
:
'blur'
}
]
},
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
],
conditionList
:
[],
locList
:
[],
backupUserList
:
[],
sampleUnit
:
''
}
},
mounted
()
{
this
.
_getConditionList
()
this
.
_getUserList
()
},
methods
:
{
_locChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
backupPlace
=
data
.
backupPlace
this
.
_getCondition
(
data
.
backupPlace
)
break
case
'query'
:
this
.
formObj
.
backupPlace
=
data
.
backupPlace
this
.
_getLocList
(
data
.
backupPlace
)
break
}
},
selCondi
(
data
)
{
this
.
$forceUpdate
()
this
.
formObj
.
conditions
=
data
},
selUser
(
data
)
{
this
.
$forceUpdate
()
if
(
data
)
{
for
(
let
i
=
0
;
i
<
this
.
backupUserList
.
length
;
i
++
)
{
if
(
this
.
backupUserList
[
i
].
id
===
data
)
{
this
.
formObj
.
backupUser
=
this
.
backupUserList
[
i
].
realname
}
}
}
else
{
this
.
getPage
.
records
[
this
.
currentIndex
].
backupUser
=
''
}
this
.
formObj
.
backupUserId
=
data
// this.$forceUpdate()
// this.getPage.records[this.currentIndex].backupUser = data
// this.getPage.records[this.currentIndex].backupUser = data
},
// 存储条件 回调
_locChangeCondition
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
storageCondition
=
data
.
name
this
.
_getLocCondition
(
data
.
name
)
break
case
'query'
:
this
.
formObj
.
storageCondition
=
data
.
name
this
.
_getLocConditionList
(
data
.
name
)
break
}
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_open
(
data
)
{
this
.
showModal
=
true
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
sampleUnit
=
''
this
.
$refs
.
footerModal
.
_hideLoading
()
this
.
ids
=
data
// 循环遍历数据
},
_getConditionList
:
async
function
()
{
const
result
=
await
soilSample
.
getDictList
(
'存储条件'
)
if
(
result
)
{
this
.
conditionList
=
result
}
},
_getUserList
:
async
function
()
{
const
result
=
await
soilSample
.
getUserList
()
if
(
result
)
{
console
.
log
(
result
)
this
.
backupUserList
=
result
.
records
}
},
//
_dateChange
(
data
)
{
this
.
formObj
.
endDate
=
data
},
_cancel
()
{
this
.
showModal
=
false
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
formObj
this
.
_saveInfo
({
id
:
this
.
ids
.
join
(
','
),
obj
:
data
})
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
$refs
.
footerModal
.
_hideLoading
()
}
})
},
_saveInfo
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
editBackup
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'保存成功'
)
}
}
}
}
</
script
>
pages/soil-sample-manage/backups-manage/tab/SampleBackupsManage.vue
View file @
92667396
...
@@ -93,11 +93,13 @@
...
@@ -93,11 +93,13 @@
</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>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
// import AutoCompletes from '../../../../components/base/AutoCompletes'
// import AutoCompletes from '../../../../components/base/AutoCompletes'
import
SampleParpareApply
from
'../SampleParpareApply'
import
SampleParpareApply
from
'../SampleParpareApply'
import
SampleParpareBatchEdit
from
'../SampleParpareBatchEdit'
// 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
{
soilEntrust
,
soilSample
}
from
'../../../../api'
import
{
soilEntrust
,
soilSample
}
from
'../../../../api'
...
@@ -106,6 +108,7 @@ export default {
...
@@ -106,6 +108,7 @@ export default {
components
:
{
components
:
{
// AutoCompletes,
// AutoCompletes,
SampleParpareApply
,
SampleParpareApply
,
SampleParpareBatchEdit
,
Operation
Operation
},
},
data
()
{
data
()
{
...
@@ -130,6 +133,11 @@ export default {
...
@@ -130,6 +133,11 @@ export default {
},
},
{
{
type
:
'primary'
,
type
:
'primary'
,
id
:
''
,
name
:
'批量填写存放信息'
},
{
type
:
'primary'
,
id
:
'food-sample-preparation-his-all'
,
id
:
'food-sample-preparation-his-all'
,
name
:
'制备'
name
:
'制备'
},
},
...
@@ -423,6 +431,9 @@ export default {
...
@@ -423,6 +431,9 @@ export default {
case
'申请处理'
:
case
'申请处理'
:
this
.
_applyDispose
()
this
.
_applyDispose
()
break
break
case
'批量填写存放信息'
:
this
.
_writeInfo
()
break
case
'完成处理'
:
case
'完成处理'
:
this
.
_handleApply
()
this
.
_handleApply
()
break
break
...
@@ -453,6 +464,13 @@ export default {
...
@@ -453,6 +464,13 @@ export default {
break
break
}
}
},
},
_writeInfo
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
$refs
.
batchEdit
.
_open
(
this
.
selectIds
)
}
},
_handleApply
()
{
_handleApply
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
...
@@ -521,104 +539,6 @@ export default {
...
@@ -521,104 +539,6 @@ export default {
switch
(
msg
)
{
switch
(
msg
)
{
case
'page'
:
case
'page'
:
this
.
_page
()
this
.
_page
()
// this.getPage.records = []
// this.getPage = {
// total: this.$store.state.LmsFoodSamplePrepare.page.total,
// pages: this.$store.state.LmsFoodSamplePrepare.page.pages,
// current: this.$store.state.LmsFoodSamplePrepare.page.current,
// size: this.$store.state.LmsFoodSamplePrepare.page.size,
// records: []
// }
// const tableList = this.$store.state.LmsFoodSamplePrepare.page.records
// for (let i = 0; i
<
tableList
.
length
;
i
++
)
{
// this.getPage.records.push({
// sampleId:
// tableList[i].sampleId !== undefined
// ? tableList[i].sampleId
// : '',
// sampleSn:
// tableList[i].sampleSn !== undefined
// ? tableList[i].sampleSn
// : '',
// sampleName:
// tableList[i].sampleName !== undefined
// ? tableList[i].sampleName
// : '',
// backupPlace:
// tableList[i].backupPlace !== undefined
// ? tableList[i].backupPlace
// : '',
// cname: tableList[i].cname !== undefined ? tableList[i].cname : '',
// storageCondition:
// tableList[i].storageCondition !== undefined
// ? tableList[i].storageCondition
// : '',
// quantity:
// tableList[i].quantity !== undefined
// ? tableList[i].quantity
// : '',
// sampleQuantity:
// tableList[i].sampleQuantity !== undefined
// ? tableList[i].sampleQuantity
// : '',
// handleQuantity:
// tableList[i].handleQuantity !== undefined
// ? tableList[i].handleQuantity
// : '',
// sampleUnit:
// tableList[i].sampleUnit !== undefined
// ? tableList[i].sampleUnit
// : '',
// endDate:
// tableList[i].endDate !== undefined
// ? new Date(tableList[i].endDate)
// : '',
// handleMethod:
// tableList[i].handleMethod !== undefined
// ? tableList[i].handleMethod
// : '',
// id: tableList[i].id !== undefined ? tableList[i].id : '',
// contractName:
// tableList[i].contractName !== undefined
// ? tableList[i].contractName
// : '',
// code: tableList[i].code !== undefined ? tableList[i].code : '',
// contractSn:
// tableList[i].contractSn !== undefined
// ? tableList[i].contractSn
// : '',
// progress:
// tableList[i].progress !== undefined
// ? tableList[i].progress
// : '',
// type: tableList[i].type !== undefined ? tableList[i].type : '',
// issueDate:
// tableList[i].issueDate !== undefined
// ? tableList[i].issueDate
// : '',
// sampleRemark:
// tableList[i].sampleRemark !== undefined
// ? tableList[i].sampleRemark
// : '',
// contractRemark:
// tableList[i].contractRemark !== undefined
// ? tableList[i].contractRemark
// : '',
// isEligible:
// tableList[i].isEligible !== undefined
// ? tableList[i].isEligible
// : '',
// remark:
// tableList[i].remark !== undefined ? tableList[i].remark : '',
// contractId:
// tableList[i].contractId !== undefined
// ? tableList[i].contractId
// : ''
// })
// }
// this.selectIds = []
// this.selectData = []
// this.selectSampleIds = []
break
break
case
'selectData'
:
case
'selectData'
:
this
.
selectData
=
data
this
.
selectData
=
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