Commit 6f6b44e3 by lichengming
parents 7edbfa09 4e08240e
......@@ -26,5 +26,9 @@ export default {
http.get('soil/v1/exp_report/' + data).then(res => res),
reportGetById: data => http.get('soil/v1/report/' + data).then(res => res),
expReportCheck: data =>
http.post('soil/v1/exp_report/exp_report_check', data).then(res => res)
http.post('soil/v1/exp_report/exp_report_check', data).then(res => res),
pageReportEndBySummaryReport: data =>
http
.post('soil/v1/entrust/page_report_end_by_summary_report', data)
.then(res => res)
}
......@@ -97,5 +97,13 @@ export default {
summaryReportCheckSubmit: data =>
http
.post('soil/v1/report/summary_report_check_submit?ids=' + data)
.then(res => res),
pageReportIssueBySummaryReport: data =>
http
.post('soil/v1/entrust/page_report_issue_by_summary_report', data)
.then(res => res),
summaryReportIssueSubmit: data =>
http
.post('soil/v1/report/summary_report_issue_submit?ids=' + data)
.then(res => res)
}
......@@ -199,11 +199,15 @@ export default {
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),
pageSummaryIssue: data =>
http.post('soil/v1/report/page_summary_issue', data).then(res => res),
dataGds: data => http.get('soil/v1/data_gds/' + data).then(res => res),
gdsGetMainInfo: data =>
http
.post('soil/v1/data_gds/get_main_info?sampleCode=' + data)
.then(res => res),
dataGdsDetail: data =>
http.post('soil/v1/data_gds_detail/page', data).then(res => res)
http.post('soil/v1/data_gds_detail/page', data).then(res => res),
pageSummaryEnd: data =>
http.post('soil/v1/report/page_summary_report_end', data).then(res => res)
}
......@@ -63,7 +63,6 @@
</div>
</template>
<script>
import http from '../../../api/http'
import { soilReport, soilStatistics, soilTest } from '../../../api'
import Global from '../../../api/config'
......@@ -326,6 +325,7 @@ export default {
},
_resultChange(msg) {
this.$Message.success(msg)
this.$emit('on-result-change')
this._page()
},
_issueCancel() {
......@@ -336,30 +336,6 @@ export default {
this.showIssueModal = false
this._createOk()
},
_downloadBatch() {
const ids = this.selectIds
if (ids.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定要下载这 ' + ids.length + ' 个报告?',
onOk: () => {
const obj = {
ids: ids.join(','),
contractId: this.formObj.contractId,
flag: 0
}
http.open(
Global.baseURL +
'/food/v1/sample_report/download_batch_by_sampleIds',
obj,
'_blank'
)
}
})
}
},
_submit() {
const ids = this.selectIds
if (ids.length === 0) {
......
......@@ -65,7 +65,7 @@
<FileManage ref="FileManage" @on-result-change="_fileResult" />
<Reason ref="reasonModal" @on-result-change="_reasonResult" />
<OperationModal ref="operationModal" />
<SampleByMakeModal ref="summaryModal"></SampleByMakeModal>
<SampleByMakeModal ref="summaryModal" @on-result-change="_page"></SampleByMakeModal>
</div>
</template>
......
<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>
......@@ -2,8 +2,8 @@
<div>
<Row>
<Form
id="lab-sample-form"
v-show="searchOpen"
id="lab-sample-form"
:label-width="70"
inline
onsubmit="return false"
......@@ -11,10 +11,10 @@
>
<label class="label-sign" />
<Form-item class="search-item" label="委托方:">
<Input @on-enter="_formSearch" name="client" placeholder="请输入委托方" clearable />
<Input name="client" placeholder="请输入委托方" clearable @on-enter="_formSearch" />
</Form-item>
<Form-item class="search-item" label="委托编号:">
<Input @on-enter="_formSearch" name="entrustCode" placeholder="请输入委托编号" clearable />
<Input name="entrustCode" placeholder="请输入委托编号" clearable @on-enter="_formSearch" />
</Form-item>
<!-- <Form-item class="search-item" label="报检时间:">-->
<!-- <Date-picker-->
......@@ -30,13 +30,13 @@
<!-- <input type="hidden" name="inspectionDateEnd">-->
<!-- </Form-item>-->
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">
<Button type="primary" @click="_formSearch">
搜索
</Button>
</Form-item>
</Form>
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" @on-result-change="_btnClick" show-search-btn="true" />
<btn-list :msg="btn" :open="searchOpen" show-search-btn="true" @on-result-change="_btnClick" />
</Col>
<!-- <Col span="24">-->
<!-- &lt;!&ndash; <Button type="primary" @click="_submitReportCheck">&ndash;&gt;-->
......@@ -57,9 +57,9 @@
:table-height="tableHeight"
:get-page="getPage"
:icon-msg="iconMsg"
@on-result-change="_tableResultChange"
show-check-box
select-data
@on-result-change="_tableResultChange"
>
<vxe-table-column
v-for="item in pageColumns"
......@@ -89,6 +89,7 @@
<fileManage ref="FileManage" @on-result-change="_fileResult" />
<Reason ref="reasonModal" @on-result-change="_reasonResult" />
<OperationModal ref="operationModal" />
<SampleByMakeModal ref="summaryModal" @on-result-change="_page"></SampleByMakeModal>
</div>
</template>
......@@ -98,9 +99,10 @@ import { soilSample, soilStatistics } from '../../../../api'
import global from '../../../../api/config'
import Reason from '../../../../components/base/Reason'
import OperationModal from '../../../../components/operation/Operation'
import SampleByMakeModal from '../SampleByMakeModal'
export default {
name: 'PreparationManage',
components: { Reason, OperationModal },
components: { Reason, OperationModal, SampleByMakeModal },
data() {
return {
name: '',
......@@ -108,17 +110,18 @@ export default {
{
title: '委托商',
key: 'client',
width: 100,
width: 160,
fixed: 'left'
},
{ title: '委托编号', key: 'entrustCode', width: 100 },
{ title: '报告编号', key: 'reportCode', width: 100 },
{ title: '进度', key: 'progress', width: 110, status: true },
{ title: '状态', key: 'status', width: 100, status: true },
{ title: '委托日期', key: 'entrustDate', width: 100, date: true },
{ title: '钻孔位置', key: 'boreholeLocation', width: 100 },
{ title: '钻孔名称', key: 'boreholeName', width: 100 },
{ title: '水深', key: 'waterDepth', width: 100 },
{ title: '项目名称', key: 'projectName', width: 150 },
{ title: '委托编号', key: 'entrustCode', width: 150 },
// { title: '报告编号', key: 'reportCode', width: 100 },
// { title: '进度', key: 'progress', width: 110, status: true },
// { title: '状态', key: 'status', width: 100, status: true },
{ title: '委托日期', key: 'entrustDate', width: 130, date: true },
{ title: '钻孔位置', key: 'boreholeLocation', width: 140 },
{ title: '钻孔名称', key: 'boreholeName', width: 140 },
{ title: '水深', key: 'waterDepth', width: 150 },
{ title: '制表人', key: 'tabulater', width: 110 },
{ title: '制表日期', key: 'tabulateDate', width: 110, date: true }
],
......@@ -133,6 +136,7 @@ export default {
selectData: [],
iconMsg: [
{ id: '', type: 'md-image', name: '预览报告' },
{ id: '', type: 'ios-book', name: '查看汇总报告' },
{ id: '', type: 'ios-cloud', name: '附件' },
{ id: '', type: 'ios-clock', name: '操作日志' }
]
......@@ -151,7 +155,7 @@ export default {
async _page() {
const data = this.$serialize('lab-sample-form')
Object.assign(data, this.$refs.pageTable._searchParams())
const result = await soilStatistics.pageReportIssue(data)
const result = await soilStatistics.pageReportIssueBySummaryReport(data)
if (result) {
this.getPage = result
this.$refs.pageTable._hideLoading()
......@@ -328,11 +332,17 @@ export default {
case '预览报告':
this._viewReport(data)
break
case '查看汇总报告':
this._viewSummary(data)
break
case '操作日志':
this._record(data.id)
break
}
},
_viewSummary(data) {
this.$refs.summaryModal._open(data.id)
},
_viewReport(data) {
this._getObjectKey(data)
},
......
......@@ -81,38 +81,7 @@ export default {
return {
currentComponent: '',
searchOpen: false,
btn: [
{
type: 'primary',
id: 'food-report-make-push-to-gc',
name: '推送至国抽平台'
},
{ type: 'success', id: 'ZBC', name: '生成' },
{
type: 'success',
id: 'food-report-make-select-template-create',
name: '选择模板生成',
componentName: 'CreateReport'
},
{
type: 'primary',
id: 'food-report-make-create-samples',
name: '多样品生成',
componentName: 'CreateReportBySamples'
},
{
type: 'primary',
id: 'food-report-make-edit-items',
name: '批量维护检测项目',
componentName: 'FoodItemBatchEditModal'
},
{
type: '',
id: 'food-report-make-sample-maintain-info',
name: '信息维护',
componentName: 'MaintainInfoModal'
}
],
btn: [{ type: 'success', id: 'ZBC', name: '生成' }],
getPage: {},
detectionDate: '',
pageColumns: [
......@@ -137,8 +106,7 @@ export default {
type: 'ios-beaker',
id: '',
name: '管理检测项目'
},
{ type: 'md-trash', id: '', name: '删除' }
}
],
iconMsg1: [
{
......@@ -198,9 +166,6 @@ export default {
// 进度条
this.$emit('on-result-change', 'changeTab')
break
case 'FoodSampleCompanyEdit':
case 'FoodSampleGovernLYEdit':
case 'FoodSampleGovernEdit':
case 'UploadReport':
// 单个编辑
this._updateRows()
......@@ -253,45 +218,8 @@ export default {
// 上传文件
this.$refs.refModal._open(id, 'sampleId')
},
_edit(data) {
if (data.type === 0) {
this.currentComponent = 'FoodSampleCompanyEdit'
this.$store.dispatch('FoodSample/getByCompanyId', data.id).then(() => {
this.$nextTick(function() {
this.$refs.refModal._open(
this.$store.state.FoodSample.companyModel,
this.formObj.contractId
)
})
})
} else if (data.type === 2) {
this.currentComponent = 'FoodSampleGovernLYEdit'
this.$store.dispatch('FoodSample/getByGovernId', data.id).then(() => {
this.$nextTick(function() {
this.$refs.refModal._open(
this.$store.state.FoodSample.governModel,
this.formObj.contractId
)
})
})
} else {
this.currentComponent = 'FoodSampleGovernEdit'
this.$store.dispatch('FoodSample/getByGovernId', data.id).then(() => {
this.$nextTick(function() {
this.$refs.refModal._open(
this.$store.state.FoodSample.governModel,
this.formObj.contractId
)
})
})
}
},
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this.selectIds = []
this.getPage = this.$store.state.FoodSample.page
break
case 'selectData':
this.selectData = data
this.selectIds = []
......@@ -340,63 +268,16 @@ export default {
case '选择模板生成':
this._judgeReport('create')
break
case '推送至国抽平台':
this._pushToGC()
break
case '多样品生成':
this._judgeReport('create-samples')
break
case '批量维护检测项目':
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$refs.refModal._open(this.selectIds)
}
break
case '信息维护':
this._maintainInfo()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
// 信息维护
_maintainInfo() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
this.$refs.refModal._open(this.selectIds, 2)
}
},
// 推送至国抽平台
_pushToGC() {
const ids = this.selectIds
if (ids.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定要推送这' + ids.length + '条数据至国抽平台?',
loading: true,
onOk: () => {
this.$store
.dispatch('FoodSample/pushDataToGC', { ids: ids.join(',') })
.then(() => {
this._resultChange('信息推送成功')
})
}
})
}
},
_resultChange(msg) {
if (this.$store.state.FoodSample.success) {
this.$Message.success(msg)
this._page()
this.selectIds = []
}
this.$Modal.remove()
this.$Message.success(msg)
this._page()
this.selectIds = []
},
// 生成报告
_judgeReport(name) {
......@@ -412,38 +293,6 @@ export default {
break
}
}
},
_createReport() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
const validateObj = { sampleIds: this.selectIds }
// 先进行验证
this.$store
.dispatch('FoodSampleReport/generateAutomaticValidate', validateObj)
.then(() => {
if (this.$store.state.FoodSampleReport.success) {
// 验证成功之后再建立连接,然后进行生成报告操作
// 建立websocket连接
const currentTime = new Date().getTime()
// true --- 建立连接
this.currentComponent = 'ProgressByReport'
this.$nextTick(() => {
this.$refs.refModal._open(this.selectIds.length, currentTime)
})
validateObj.seriesNo = currentTime
this.$store
.dispatch('FoodSampleReport/generateAutomatic', validateObj)
.then(() => {})
} else {
// false --- 弹出选择模板框
this.currentComponent = 'CreateReport'
this.$nextTick(() => {
this.$refs.refModal._open(this.selectData)
})
}
})
}
}
}
}
......
......@@ -305,7 +305,7 @@ export default {
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await soilTest.reportPage(
const result = await soilTest.pageSummaryEnd(
this.$serializeForm(this.formObj)
)
if (result) {
......
......@@ -98,27 +98,22 @@ export default {
{
title: '委托商',
key: 'client',
width: 100,
width: 160,
fixed: 'left'
},
{ title: '委托编号', key: 'entrustCode', width: 100 },
{ title: '报告编号', key: 'reportCode', width: 100 },
{ title: '进度', key: 'progress', width: 110, status: true },
{ title: '状态', key: 'status', width: 100, status: true },
{ title: '委托日期', key: 'entrustDate', width: 100, date: true },
{ title: '钻孔位置', key: 'boreholeLocation', width: 100 },
{ title: '钻孔名称', key: 'boreholeName', width: 100 },
{ title: '水深', key: 'waterDepth', width: 100 },
{ title: '项目名称', key: 'projectName', width: 150 },
{ title: '委托编号', key: 'entrustCode', width: 150 },
// { title: '报告编号', key: 'reportCode', width: 100 },
// { title: '进度', key: 'progress', width: 110, status: true },
// { title: '状态', key: 'status', width: 100, status: true },
{ title: '委托日期', key: 'entrustDate', width: 130, date: true },
{ title: '钻孔位置', key: 'boreholeLocation', width: 140 },
{ title: '钻孔名称', key: 'boreholeName', width: 140 },
{ title: '水深', key: 'waterDepth', width: 150 },
{ title: '制表人', key: 'tabulater', width: 110 },
{ title: '制表日期', key: 'tabulateDate', width: 110, date: true }
],
iconMsg: [
// {
// type: 'ios-list',
// id: '',
// name: '资料管理',
// componentName: 'ErecordIndex'
// },
{
type: 'ios-flask-outline',
id: '',
......@@ -136,35 +131,13 @@ export default {
name: '操作记录'
}
],
btn: [
{
type: 'primary',
id: 'food-report-manage-contract-push-to-gc',
name: '推送至国抽平台'
},
{
type: '',
id: 'food-report-manage-export-send-record',
name: '导出发放记录'
},
{
type: '',
id: 'food-report-manage-export-send-form',
name: '导出发放记录表'
},
{
type: '',
id: 'food-report-manage-export-report-collect',
name: '导出报告汇总统计表'
}
],
btn: [],
searchOpen: false,
selectIds: [],
formObj: {
reportSn: '',
num: ''
},
// 导出发放记录与统计表区分,false--统计表,true--统计表
exportSendRecords: false
}
},
......@@ -184,101 +157,20 @@ export default {
_modalChange(data) {
switch (this.currentComponent) {
case 'SelectReportExportModal':
if (this.exportSendRecords) {
// 导出发放记录
this._exportSendRecordsForm(data)
} else {
// 导出报告汇总统计表
this._exportReportCollect(data)
}
break
}
},
_btnClick(msg) {
switch (msg) {
case '导出发放记录':
this.currentComponent = 'GrantRecordModal'
this.$nextTick(() => {
this.$refs.refModal._open()
})
break
case '推送至国抽平台':
this._pushToGC()
break
case '导出发放记录表':
this.exportSendRecords = true
this.currentComponent = 'SelectReportExportModal'
this._exportSendForm()
break
case '导出报告汇总统计表':
this.exportSendRecords = false
this.currentComponent = 'SelectReportExportModal'
this._selectTempExport()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
},
// 导出发放记录表
_exportSendForm() {
this.$nextTick(() => {
this.$refs.refModal._open('food-report-manage-export-send-form')
})
},
// 导出发放记录表
_exportSendRecordsForm(result) {
const obj = {
param: 'ids',
ids: this.selectIds,
url: '',
queryObj: this.$serialize('search-form-report-tab')
}
obj.url = this.$judgeUrlChar(result) + '_n=' + '导出发放记录表'
// position,标识当前导出菜单位置用
this.$exportByQuery(obj, { position: 3 })
},
// 一个按钮对应多个报表
_selectTempExport() {
this.$nextTick(() => {
this.$refs.refModal._open('food-report-manage-export-report-collect')
})
},
// 导出报告汇总统计表
_exportReportCollect(url) {
const obj = {
param: 'ids',
ids: this.selectIds,
url: url,
queryObj: this.$serialize('search-form-report-tab')
}
this.$exportByQuery(obj)
},
// 推送至国抽平台
_pushToGC() {
const ids = this.selectIds
if (ids.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定要推送这' + ids.length + '条数据至国抽平台?',
onOk: () => {
this.$store
.dispatch('FoodSample/pushDataToGCContract', ids)
.then(() => {
this._resultChange('信息推送成功')
})
}
})
}
},
_resultChange(msg) {
if (this.$store.state.FoodSample.success) {
this.$Message.success(msg)
this._page()
this.selectIds = []
}
this.$Message.success(msg)
this._page()
this.selectIds = []
},
_iconClick(res, data, componentName) {
this.currentComponent = componentName
......@@ -327,9 +219,6 @@ export default {
},
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this.getPage = this.$store.state.FoodContract.page
break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
......@@ -341,11 +230,10 @@ export default {
break
}
},
// FoodContract/page
async _page() {
const data = this.$serialize('search-form-report-tab')
Object.assign(data, this.$refs.pageTable._searchParams())
const result = await soilReport.pageReportIssueHis(data)
const result = await soilReport.pageReportEndBySummaryReport(data)
if (result) {
this.getPage = result
this.$refs.pageTable._hideLoading()
......@@ -354,21 +242,6 @@ export default {
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
_detailModal(id, type) {
// 查看
this.$store.dispatch('FoodContract/getById', id).then(() => {
if (type === 0) {
// 企业委托 ’0‘
this.currentComponent = 'FoodContractCompanyDetail'
} else {
// 政府委托 ’1‘
this.currentComponent = 'FoodContractGovernDetail'
}
this.$nextTick(() => {
this.$refs.refModal._open(this.$store.state.FoodContract.model)
})
})
},
_search() {
this._page()
}
......
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