Commit a366359d by lichengming

修改了独立留存

parent f4a52992
......@@ -81,6 +81,8 @@ export default {
http.post('soil/v1/sample/page_receive', data).then(res => res),
pageReceiveHis: data =>
http.post('soil/v1/sample/page_receive_his', data).then(res => res),
pageAloneKeepSample: data =>
http.post('soil/v1/sample/page_alone_keep_sample', data).then(res => res),
pageSend: data =>
http.post('soil/v1/sample/page_send', data).then(res => res),
pageSendHis: data =>
......@@ -177,5 +179,9 @@ export default {
pageSampleOfStorehouse: data =>
http
.post('soil/v1/alone_sample/page_sample_of_storehouse', data)
.then(res => res),
callOutAloneKeepSample: data =>
http
.post('soil/v1/sample/call_out_alone_keep_sample/', data)
.then(res => res)
}
......@@ -5,12 +5,9 @@
<p slot="header"> {{name}}--管理样品</p>
<div>
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="待接收样品" name="waitReceive">
<el-tab-pane label="样品管理" name="waitReceive">
<WaitReceive ref="waitReceiveModal" @on-result-change="_search"></WaitReceive>
</el-tab-pane>
<el-tab-pane label="待发放样品" name="waitScan">
<WaitScan ref="waitScanModal" @-result-change="_search"></WaitScan>
</el-tab-pane>
</el-tabs>
</div>
</Modal>
......@@ -18,12 +15,10 @@
</template>
<script>
import WaitReceive from './WaitReceive'
import WaitScan from './WaitScan'
export default {
components: {
WaitReceive,
WaitScan
WaitReceive
},
data() {
return {
......
......@@ -90,8 +90,7 @@ export default {
data() {
return {
btn: [
{ type: 'primary', id: '', name: '收样室收样' },
{ type: 'primary', id: '', name: '样品留存' },
{ type: 'primary', id: '', name: '调出' },
{ type: 'primary', id: '', name: '导入试验项目' }
],
groupoptions: [],
......@@ -249,7 +248,7 @@ export default {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
this.formObj.entrustId = this.entrustId
const result = await soilEntrust.pageReceive(
const result = await soilEntrust.pageAloneKeepSample(
this.$serializeForm(this.formObj)
)
if (result) {
......@@ -323,6 +322,9 @@ export default {
case '样品留存':
this._sampleKeep(this.selectIds)
break
case '调出':
this._callOut()
break
case '导入试验项目':
this._importItem()
break
......@@ -418,11 +420,9 @@ export default {
}
},
_resultChange(msg) {
if (this.$store.state.FoodSample.success) {
this._page()
this.$Message.success(msg)
this.selectIds = []
}
},
_exportReceiveRecord() {
......@@ -594,6 +594,27 @@ export default {
this.$refs.keepAdressModal._open(ids)
}
},
_callOut(id) {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选中一条样品数据!')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定调出?',
onOk: () => {
this._callOutOk()
}
})
}
},
_callOutOk: async function() {
const result = await soilEntrust.callOutAloneKeepSample({
ids: this.selectIds.join(',')
})
if (result) {
this._resultChange('调出成功')
}
},
// 样品接收
_sampleReceive(id) {
if (this.selectIds.length === 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment