Commit fcda5bdf by lichengming

修改了报告编制 生成报告

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