Commit fcda5bdf by lichengming

修改了报告编制 生成报告

parent 54f6ce72
......@@ -3,7 +3,7 @@
*/
import http from '../http'
// import { https } from '../https'
import { https } from '../https'
export default {
// page
......@@ -80,5 +80,9 @@ export default {
http.post('soil/v1/prepare/page_surplus_his', data).then(res => res),
// 报告模板
reportTemplate: data =>
http.post('soil/v1/report/page', data).then(res => res)
http.post('soil/v1/report/page', data).then(res => res),
reportMake: data =>
https
.post('soil/v1/report/make_report', JSON.stringify(data))
.then(res => res)
}
......@@ -68,7 +68,7 @@
* 原始记录查看
*/
import Global from '../../../api/config'
import { soilTest } from '../../../api'
import { soilSample, soilTest } from '../../../api'
import ItemOriginalRecordEdit from './OriginalRecordEdit'
import ItemView from './ItemView'
import ReportTemplateModal from './ReportTemplateModal'
......@@ -233,7 +233,23 @@ export default {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
console.log(this.selectIds)
this.$Modal.confirm({
title: '提示',
content: '确定这' + this.selectIds.length + '条数据生成报告',
onOk: () => {
this._reportMakeOk()
}
})
}
},
_reportMakeOk: async function() {
const result = await soilSample.reportMake({
entrustId: this.formObj.entrustId,
originalList: this.selectIds
})
if (result) {
this.$Message.success('报告成功生成')
this._page()
}
},
// 设置填写人乙
......
......@@ -110,12 +110,8 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '工程号', key: 'projectNo', width: 120 },
{ title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
{ title: '批准日期', key: 'approveDate', width: 120, date: true },
{ title: '批准人', key: 'approver', width: 120 },
{ title: '检验类别', key: 'testType', width: 120 }
],
searchOpen: false,
......
......@@ -134,11 +134,16 @@ export default {
getPage: {},
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 160, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 160 },
{ title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 160 },
{ title: '现场编号', key: 'siteNo', width: 130 }
{ title: '委托商', key: 'client', width: 200 },
{ title: '试样编号', key: 'entrustCode', width: 120 },
{ title: '委托日期', key: 'entrustDate', width: 120, date: true },
{ title: '钻孔位置', key: 'boreholeLocation', width: 120 },
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
{ title: '检验类别', key: 'testType', width: 120 }
],
searchOpen: false,
btn: [
......
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