Commit a366359d by lichengming

修改了独立留存

parent f4a52992
...@@ -81,6 +81,8 @@ export default { ...@@ -81,6 +81,8 @@ export default {
http.post('soil/v1/sample/page_receive', data).then(res => res), http.post('soil/v1/sample/page_receive', data).then(res => res),
pageReceiveHis: data => pageReceiveHis: data =>
http.post('soil/v1/sample/page_receive_his', data).then(res => res), 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 => pageSend: data =>
http.post('soil/v1/sample/page_send', data).then(res => res), http.post('soil/v1/sample/page_send', data).then(res => res),
pageSendHis: data => pageSendHis: data =>
...@@ -177,5 +179,9 @@ export default { ...@@ -177,5 +179,9 @@ export default {
pageSampleOfStorehouse: data => pageSampleOfStorehouse: data =>
http http
.post('soil/v1/alone_sample/page_sample_of_storehouse', data) .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) .then(res => res)
} }
...@@ -5,12 +5,9 @@ ...@@ -5,12 +5,9 @@
<p slot="header"> {{name}}--管理样品</p> <p slot="header"> {{name}}--管理样品</p>
<div> <div>
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <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> <WaitReceive ref="waitReceiveModal" @on-result-change="_search"></WaitReceive>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="待发放样品" name="waitScan">
<WaitScan ref="waitScanModal" @-result-change="_search"></WaitScan>
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</Modal> </Modal>
...@@ -18,12 +15,10 @@ ...@@ -18,12 +15,10 @@
</template> </template>
<script> <script>
import WaitReceive from './WaitReceive' import WaitReceive from './WaitReceive'
import WaitScan from './WaitScan'
export default { export default {
components: { components: {
WaitReceive, WaitReceive
WaitScan
}, },
data() { data() {
return { return {
......
...@@ -90,8 +90,7 @@ export default { ...@@ -90,8 +90,7 @@ export default {
data() { data() {
return { return {
btn: [ btn: [
{ type: 'primary', id: '', name: '收样室收样' }, { type: 'primary', id: '', name: '调出' },
{ type: 'primary', id: '', name: '样品留存' },
{ type: 'primary', id: '', name: '导入试验项目' } { type: 'primary', id: '', name: '导入试验项目' }
], ],
groupoptions: [], groupoptions: [],
...@@ -249,7 +248,7 @@ export default { ...@@ -249,7 +248,7 @@ export default {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj) console.log('this.formObj', this.formObj)
this.formObj.entrustId = this.entrustId this.formObj.entrustId = this.entrustId
const result = await soilEntrust.pageReceive( const result = await soilEntrust.pageAloneKeepSample(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
...@@ -323,6 +322,9 @@ export default { ...@@ -323,6 +322,9 @@ export default {
case '样品留存': case '样品留存':
this._sampleKeep(this.selectIds) this._sampleKeep(this.selectIds)
break break
case '调出':
this._callOut()
break
case '导入试验项目': case '导入试验项目':
this._importItem() this._importItem()
break break
...@@ -418,11 +420,9 @@ export default { ...@@ -418,11 +420,9 @@ export default {
} }
}, },
_resultChange(msg) { _resultChange(msg) {
if (this.$store.state.FoodSample.success) { this._page()
this._page() this.$Message.success(msg)
this.$Message.success(msg) this.selectIds = []
this.selectIds = []
}
}, },
_exportReceiveRecord() { _exportReceiveRecord() {
...@@ -594,6 +594,27 @@ export default { ...@@ -594,6 +594,27 @@ export default {
this.$refs.keepAdressModal._open(ids) 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) { _sampleReceive(id) {
if (this.selectIds.length === 0) { 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