Commit 54f6ce72 by lichengming

修改了报告编制

parent 8ca5aab0
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
currentComponent: '', currentComponent: '',
getPage: {}, getPage: {},
showModal: false, showModal: false,
btn: [{ type: 'primary', id: 'ZBC', name: '生成报告' }], btn: [{ type: 'primary', id: '', name: '生成报告' }],
selectIds: [], selectIds: [],
iconMsg: [ iconMsg: [
{ {
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据') this.$Message.warning('请至少选择一条数据')
} else { } else {
this.$refs.templateModal._open(this.selectIds) console.log(this.selectIds)
} }
}, },
// 设置填写人乙 // 设置填写人乙
......
...@@ -31,6 +31,7 @@ export default { ...@@ -31,6 +31,7 @@ export default {
modalTitle: '', modalTitle: '',
activeName: '', activeName: '',
contractId: '', contractId: '',
entrustId: '',
type: '', type: '',
personal: '' personal: ''
} }
...@@ -41,13 +42,13 @@ export default { ...@@ -41,13 +42,13 @@ export default {
} }
}, },
methods: { methods: {
_open(contractId, title, type, personal) { _open(entrustId) {
this.modalTitle = '管理样品和报告' this.modalTitle = '管理样品和报告'
this.showModal = true this.showModal = true
this.activeName = 'sample' this.activeName = 'sample'
this.contractId = contractId this.entrustId = entrustId
this.type = type this.$refs.sampleTabs._open(this.entrustId)
this.personal = personal console.log(this.entrustId)
// 先初始化样品台账的数据 // 先初始化样品台账的数据
// this.$nextTick(() => // this.$nextTick(() =>
// this.$refs.sampleTabs._getPage( // this.$refs.sampleTabs._getPage(
...@@ -89,7 +90,8 @@ export default { ...@@ -89,7 +90,8 @@ export default {
this.$refs.reportTabs._open(this.contractId, this.personal) this.$refs.reportTabs._open(this.contractId, this.personal)
}, },
_sample() { _sample() {
this.$refs.sampleTabs._open(this.contractId, this.type, this.personal) console.log(this.entrustId)
this.$refs.sampleTabs._open(this.entrustId)
}, },
_changeTabs(tab, event) { _changeTabs(tab, event) {
switch (tab.name) { switch (tab.name) {
......
...@@ -212,12 +212,7 @@ export default { ...@@ -212,12 +212,7 @@ export default {
this.$nextTick(function() { this.$nextTick(function() {
switch (res) { switch (res) {
case '管理样品和报告': case '管理样品和报告':
this.$refs.sampleByMakeModal._open( this.$refs.sampleByMakeModal._open(data.id)
data.id,
data.cname + '【' + data.code + '】',
data.type,
this.personal
)
break break
case '查看原始记录': case '查看原始记录':
this.$refs.originalRecordView._open(data.id) this.$refs.originalRecordView._open(data.id)
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable ref="pageTable" :tableHeight="tableHeight" @on-result-change="_tableResultChange" <PTVXETable ref="pageTable" :tableHeight="tableHeight" @on-result-change="_tableResultChange"
:getPage="getPage" :rows="100" select-data is-report> :getPage="getPage" :rows="100" select-data>
<vxe-table-column <vxe-table-column
:field="item.key" :field="item.key"
:title="item.title" :title="item.title"
...@@ -38,10 +38,6 @@ ...@@ -38,10 +38,6 @@
:key="item.key" sortable> :key="item.key" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="item.display">{{scope.row[item.key]? scope.row[item.key].display: ''}}</div> <div v-if="item.display">{{scope.row[item.key]? scope.row[item.key].display: ''}}</div>
<div v-else-if="item.key==='reportDueDate'"
:style="{color:$reportDueDateColor(scope.row.reportDueDate)}">
{{ scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}
</div>
<div v-else-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'): ''}} <div v-else-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'): ''}}
</div> </div>
<div v-else-if="item.judge">{{Number(scope.row[item.key])===1?'是':'否'}} <div v-else-if="item.judge">{{Number(scope.row[item.key])===1?'是':'否'}}
...@@ -73,14 +69,17 @@ ...@@ -73,14 +69,17 @@
</Row> </Row>
</div> </div>
</div> </div>
<SoilSampleItemManage ref="sampleItemManage" @on-result-change="_page"></SoilSampleItemManage>
</div> </div>
</template> </template>
<script> <script>
import { soilEntrust } from '../../../../api'
import SoilSampleItemManage from '../../../meter-entrust/SoilSampleItemManage'
/** /**
* 按委托编制----管理样品 * 按委托编制----管理样品
*/ */
export default { export default {
components: {}, components: { SoilSampleItemManage },
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
...@@ -120,34 +119,17 @@ export default { ...@@ -120,34 +119,17 @@ export default {
getPage: {}, getPage: {},
detectionDate: '', detectionDate: '',
pageColumns: [ pageColumns: [
{ title: '样品编号', key: 'num', width: 180, fixed: 'left' }, { title: '试样编号', key: 'sampleCode', width: 160, fixed: 'left' },
{ title: '样品名称', key: 'name', width: 160 }, { title: '试样深度', key: 'sampleDepth', width: 160 },
{ title: '报告已生成', key: 'reported', width: 120, reported: true }, { title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '是否合格', key: 'isEligible', width: 120 }, { title: '样品包装类型', key: 'samplePack', width: 160 },
{ title: '状态', key: 'progress', width: 100 }, { title: '现场编号', key: 'siteNo', width: 130 },
{ title: '信息维护状态', key: 'infoMaintain', width: 130 }, { title: '试验项目', key: 'experimentNames', width: 330 }
{ title: '应出报告日期', key: 'reportDueDate', width: 120, date: true },
{ title: '是否判定', key: 'judge', width: 100, judge: true },
{ title: '报告类别', key: 'reportClass', width: 120 },
{ title: '所需资质', key: 'aptitudeType', width: 120 },
{ title: '大类', key: 'firstClass', width: 130 },
{ title: '细类', key: 'detectType', width: 200 },
{ title: '任务来源', key: 'taskSource', width: 150 },
{ title: '已推国抽', key: 'dataPushed', width: 150, judge: true },
{
title: '抽样单状态',
key: 'samplingStatus',
width: 120,
display: true
},
{ title: '报告语言', key: 'reportType', width: 100 },
{ title: '报告要求', key: 'reportRequire', width: 150 },
{ title: '是否带照片', key: 'havePhoto', width: 120, judge: true },
{ title: '备注', key: 'remark' }
], ],
selectIds: [], selectIds: [],
selectData: [], selectData: [],
formObj: { formObj: {
entrustId: '',
contractId: '', contractId: '',
num: '', num: '',
name: '', name: '',
...@@ -163,26 +145,12 @@ export default { ...@@ -163,26 +145,12 @@ export default {
dateList: [], dateList: [],
type: '', type: '',
iconMsg: [ iconMsg: [
{ type: 'cloud', id: '', name: '样品附件', disabled: true },
{ type: 'compose', id: '', name: '编辑' }, // food-report-make-sample-edit
{ {
type: 'ios-upload', type: 'ios-beaker',
id: '', id: '',
name: '上传', name: '管理检测项目'
componentName: 'UploadReport'
}, },
{ { type: 'md-trash', id: '', name: '删除' }
type: 'document-text',
id: '',
name: '项目台账',
componentName: 'FoodItemEditModal'
},
{
type: 'ios-clock',
id: '',
name: '操作记录',
componentName: 'FoodSampleRecord'
}
], ],
iconMsg1: [ iconMsg1: [
{ {
...@@ -279,6 +247,9 @@ export default { ...@@ -279,6 +247,9 @@ export default {
this.currentComponent = componentName this.currentComponent = componentName
this.$nextTick(function() { this.$nextTick(function() {
switch (res) { switch (res) {
case '管理检测项目':
this._itemManage(data.id)
break
case '上传': case '上传':
this.currentId = data.id this.currentId = data.id
this.$refs.refModal._open(data.id) this.$refs.refModal._open(data.id)
...@@ -299,6 +270,10 @@ export default { ...@@ -299,6 +270,10 @@ export default {
} }
}) })
}, },
_itemManage(data) {
// 管理检测项目
this.$refs.sampleItemManage._open(data)
},
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.$refs.refModal._open(id, 'sampleId') this.$refs.refModal._open(id, 'sampleId')
...@@ -357,14 +332,21 @@ export default { ...@@ -357,14 +332,21 @@ export default {
break break
} }
}, },
_open(contractId, type, personal) { _open(entrustId) {
// 初始化数据 // 初始化数据
this._resetData(contractId, type, personal) // this._resetData(contractId, type, personal)
// this._page() this.formObj.entrustId = entrustId
this._page()
}, },
_page() { _page: async function() {
const data = this.$serializeFormSearch(this.formObj) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.$refs.pageTable._page('', this.postUrl, data) const result = await soilEntrust.samplePage(
this.$serializeForm(this.formObj)
)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
}
}, },
_formSearch() { _formSearch() {
this.$refs.pageTable._pageChange(1) this.$refs.pageTable._pageChange(1)
......
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