Commit 2f38b37a by lichengming

修改了收样位置查看样品

parent 510b980d
...@@ -141,5 +141,7 @@ export default { ...@@ -141,5 +141,7 @@ export default {
scanTakeSample: data => scanTakeSample: data =>
http http
.post('soil/v1/sample/scan_take_sample?sampleCode=' + data) .post('soil/v1/sample/scan_take_sample?sampleCode=' + data)
.then(res => res) .then(res => res),
pageLocationSample: data =>
http.post('soil/v1/sample/page_location_sample', data).then(res => res)
} }
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
this._editModal(true, data.id) this._editModal(true, data.id)
break break
case '查看试样': case '查看试样':
this._viewSample(data.id) this._viewSample(data.name)
break break
case '上传': case '上传':
this._upload(data.id) this._upload(data.id)
...@@ -227,7 +227,7 @@ export default { ...@@ -227,7 +227,7 @@ export default {
}, },
_viewSample(data) { _viewSample(data) {
console.log(data) console.log(data)
this.$refs.viewSample._openHis() this.$refs.viewSample._openHis(data)
}, },
_editModal: async function(edit, id) { _editModal: async function(edit, id) {
if (edit) { if (edit) {
......
<template> <template>
<div> <div>
<Modal v-model="showModal" width="980" class="modal-footer-none"> <Modal v-model="showModal" width="875" class="modal-footer-none">
<p slot="header"> <p slot="header">
{{ modalTitle }} {{ modalTitle }}
</p> </p>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</template> </template>
<script> <script>
import http from '../../../api/http' import http from '../../../api/http'
import { soilEntrust } from '../../../api' import { soilEntrust, soilSample } from '../../../api'
import { getLodop } from '../../../plugins/clodop/LodopFuncs' import { getLodop } from '../../../plugins/clodop/LodopFuncs'
let LODOP let LODOP
export default { export default {
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
sampleId: '', sampleId: '',
dateList: [], dateList: [],
formObj: { formObj: {
entrustId: undefined, receiveLocation: undefined,
sampleCode: undefined sampleCode: undefined
} }
} }
...@@ -342,12 +342,11 @@ export default { ...@@ -342,12 +342,11 @@ export default {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this._page() this._page()
}, },
_openHis(id) { _openHis(adress) {
this.formObj = this.$resetFields(this.formObj) this.formObj = this.$resetFields(this.formObj)
this.dateList = [] this.dateList = []
this.showModal = true this.showModal = true
this.formObj.entrustId = id // 委托id this.formObj.receiveLocation = adress // 委托id
console.log(this.entrustId)
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this.recordHis = true this.recordHis = true
this._page() this._page()
...@@ -356,7 +355,7 @@ export default { ...@@ -356,7 +355,7 @@ export default {
this.$refs.pageTable._pageChange(1) this.$refs.pageTable._pageChange(1)
}, },
_page: async function() { _page: async function() {
const result = await soilEntrust.pagePrepareHis(this.formObj) const result = await soilSample.pageLocationSample(this.formObj)
if (result) { if (result) {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this.getPage = result this.getPage = result
......
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