Commit 4a3cb708 by lichengming

修改了报告审核

parent 9a415c72
...@@ -93,5 +93,9 @@ export default { ...@@ -93,5 +93,9 @@ export default {
summaryReportSubmit: data => summaryReportSubmit: data =>
http http
.post('soil/v1/report/summary_report_submit?ids=' + data) .post('soil/v1/report/summary_report_submit?ids=' + data)
.then(res => res),
summaryReportCheckSubmit: data =>
http
.post('soil/v1/report/summary_report_check_submit?ids=' + data)
.then(res => res) .then(res => res)
} }
...@@ -197,6 +197,8 @@ export default { ...@@ -197,6 +197,8 @@ export default {
deleteReport: data => deleteReport: data =>
http.delete('soil/v1/exp_report/?ids=' + data).then(res => res), http.delete('soil/v1/exp_report/?ids=' + data).then(res => res),
reportPage: data => http.post('soil/v1/report/page', data).then(res => res), reportPage: data => http.post('soil/v1/report/page', data).then(res => res),
pageSummaryCheck: data =>
http.post('soil/v1/report/page_summary_check', data).then(res => res),
dataGds: data => http.get('soil/v1/data_gds/' + data).then(res => res), dataGds: data => http.get('soil/v1/data_gds/' + data).then(res => res),
gdsGetMainInfo: data => gdsGetMainInfo: data =>
http http
......
<template>
<div>
<!--内容-->
<Modal v-model="showModal" :width="100" class="modal-footer-none modal-top-0">
<p slot="header">{{modalTitle}}</p>
<div>
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="汇总报告台账" name="summary">
<SummaryInfo ref="summaryTabs"></SummaryInfo>
</el-tab-pane>
</el-tabs>
</div>
</Modal>
</div>
</template>
<script>
import SummaryInfo from './SummaryInfo'
export default {
components: {
SummaryInfo
},
data() {
return {
showModal: false,
modalTitle: '',
activeName: '',
contractId: '',
entrustId: '',
type: '',
personal: ''
}
},
computed: {
tableHeight: function() {
return document.documentElement.clientHeight - 135
}
},
methods: {
_open(entrustId) {
this.modalTitle = '查看汇总报告'
this.showModal = true
this.activeName = 'summary'
this.entrustId = entrustId
this.$refs.summaryTabs._open(this.entrustId)
console.log(this.entrustId)
// 先初始化样品台账的数据
// this.$nextTick(() =>
// this.$refs.sampleTabs._getPage(
// this.contractId,
// this.type,
// this.personal
// )
// )
// this._sampleData(contractId)
},
// 判断待编样品是否为0
_sampleData(contractId) {
const data = {
contractId: contractId,
onlyReportMake: 1,
reported: 0,
page: 1,
rows: 50,
personal: this.personal
}
this.$store.dispatch('FoodSample/pageSampleReportMake', data).then(() => {
const records = this.$store.state.FoodSample.page.records
if (records.length === 0) {
this.activeName = 'report'
this.$nextTick(() => this._report())
} else {
this.activeName = 'sample'
this.$nextTick(() =>
this.$refs.sampleTabs._getPage(
this.contractId,
this.type,
this.personal
)
)
}
})
},
_report() {
this.$refs.reportTabs._open(this.entrustId)
},
_sample() {
console.log(this.entrustId)
this.$refs.sampleTabs._open(this.entrustId)
},
_summary() {
this.$refs.summaryTabs._open(this.entrustId)
},
_changeTabs(tab, event) {
switch (tab.name) {
case 'sample':
this._sample()
break
case 'report':
this._report()
break
case 'summary':
this._summary()
break
}
}
// _sampleTabResult(msg) {
// if (msg === 'changeTab') {
// this.activeName = 'report'
// this.$refs.reportTabs._open(this.contractId, this.personal)
// }
// }
}
}
</script>
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
<FileManage ref="FileManage" @on-result-change="_fileResult" /> <FileManage ref="FileManage" @on-result-change="_fileResult" />
<Reason ref="reasonModal" @on-result-change="_reasonResult" /> <Reason ref="reasonModal" @on-result-change="_reasonResult" />
<OperationModal ref="operationModal" /> <OperationModal ref="operationModal" />
<SampleByMakeModal ref="summaryModal"></SampleByMakeModal>
</div> </div>
</template> </template>
...@@ -74,9 +75,10 @@ import { soilSample, soilStatistics } from '../../../../api' ...@@ -74,9 +75,10 @@ import { soilSample, soilStatistics } from '../../../../api'
import global from '../../../../api/config' import global from '../../../../api/config'
import Reason from '../../../../components/base/Reason' import Reason from '../../../../components/base/Reason'
import OperationModal from '../../../../components/operation/Operation' import OperationModal from '../../../../components/operation/Operation'
import SampleByMakeModal from '../SampleByMakeModal'
export default { export default {
name: 'PreparationManage', name: 'PreparationManage',
components: { Reason, OperationModal }, components: { Reason, OperationModal, SampleByMakeModal },
data() { data() {
return { return {
name: '', name: '',
...@@ -110,6 +112,7 @@ export default { ...@@ -110,6 +112,7 @@ export default {
selectData: [], selectData: [],
iconMsg: [ iconMsg: [
{ id: '', type: 'md-image', name: '预览报告' }, { id: '', type: 'md-image', name: '预览报告' },
{ id: '', type: 'ios-book', name: '查看汇总报告' },
{ id: '', type: 'ios-cloud', name: '附件' }, { id: '', type: 'ios-cloud', name: '附件' },
{ id: '', type: 'ios-clock', name: '操作日志' } { id: '', type: 'ios-clock', name: '操作日志' }
] ]
...@@ -271,6 +274,9 @@ export default { ...@@ -271,6 +274,9 @@ export default {
case '预览报告': case '预览报告':
this._viewReport(data) this._viewReport(data)
break break
case '查看汇总报告':
this._viewSummary(data)
break
case '操作日志': case '操作日志':
this._record(data.id) this._record(data.id)
break break
...@@ -282,7 +288,9 @@ export default { ...@@ -282,7 +288,9 @@ export default {
_viewReport(data) { _viewReport(data) {
this._getObjectKey(data) this._getObjectKey(data)
}, },
_viewSummary(data) {
this.$refs.summaryModal._open(data.id)
},
_getObjectKey: async function(data) { _getObjectKey: async function(data) {
const result = await soilSample.getReport(data.id) const result = await soilSample.getReport(data.id)
if (result) { if (result) {
......
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
</div> </div>
</template> </template>
<script> <script>
import global from '../../../../api/config'
import http from '../../../../api/http' import http from '../../../../api/http'
import { soilReport, soilStatistics, soilTest } from '../../../../api' import { soilReport, soilStatistics, soilTest } from '../../../../api'
import Global from '../../../../api/config' import Global from '../../../../api/config'
...@@ -352,7 +351,7 @@ export default { ...@@ -352,7 +351,7 @@ export default {
flag: 0 flag: 0
} }
http.open( http.open(
global.baseURL + Global.baseURL +
'/food/v1/sample_report/download_batch_by_sampleIds', '/food/v1/sample_report/download_batch_by_sampleIds',
obj, obj,
'_blank' '_blank'
......
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