Commit d612f605 by wangweidong

土工试验Lims

parent 108fad10
...@@ -162,5 +162,21 @@ export default { ...@@ -162,5 +162,21 @@ export default {
backupRecordPage: data => backupRecordPage: data =>
http.post('soil/v1/sample_backup_record/page', data).then(res => res), http.post('soil/v1/sample_backup_record/page', data).then(res => res),
experimentRecordPage: data => experimentRecordPage: data =>
http.post('soil/v1/experiment_record/page', data).then(res => res) http.post('soil/v1/experiment_record/page', data).then(res => res),
pageGroupExpReportMake: data =>
http
.post('soil/v1/exp_report/page_group_exp_report_make', data)
.then(res => res),
pageGroupExpReportCheck: data =>
http
.post('soil/v1/exp_report/page_group_exp_report_check', data)
.then(res => res),
pageGroupExpReportIssue: data =>
http
.post('soil/v1/exp_report/page_group_exp_report_issue', data)
.then(res => res),
pageGroupExpReportEnd: data =>
http
.post('soil/v1/exp_report/page_group_exp_report_end', data)
.then(res => res)
} }
...@@ -53,5 +53,30 @@ export default { ...@@ -53,5 +53,30 @@ export default {
.post('soil/v1/experiment/list_experiment_progress', data) .post('soil/v1/experiment/list_experiment_progress', data)
.then(res => res), .then(res => res),
listSampleProgress: data => listSampleProgress: data =>
http.post('soil/v1/sample/list_sample_progress', data).then(res => res) http.post('soil/v1/sample/list_sample_progress', data).then(res => res),
pageExpReportMake: data =>
http.post('soil/v1/entrust/page_exp_report_make', data).then(res => res),
pageExpReportCheck: data =>
http.post('soil/v1/entrust/page_exp_report_check', data).then(res => res),
pageExpReportIssue: data =>
http.post('soil/v1/entrust/page_exp_report_issue', data).then(res => res),
pageExpReportEnd: data =>
http.post('soil/v1/entrust/page_exp_report_end', data).then(res => res),
expReportCheckApprove: data =>
http
.post('soil/v1/exp_report/exp_report_approve?ids=' + data)
.then(res => res),
expReportCheckSubmit: data =>
http
.post('soil/v1/exp_report/exp_report_check?ids=' + data)
.then(res => res),
expReportIssueSubmit: data =>
http
.post('soil/v1/exp_report/exp_report_issue?ids=' + data)
.then(res => res),
pagePersonalTaskStatistics: data =>
http
.post('soil/v1/statistics/page_personal_task_statistics', data)
.then(res => res)
} }
...@@ -178,6 +178,10 @@ export default { ...@@ -178,6 +178,10 @@ export default {
http.delete('soil/v1/original_record/?ids=' + data).then(res => res), http.delete('soil/v1/original_record/?ids=' + data).then(res => res),
expReportPage: data => expReportPage: data =>
http.post('soil/v1/exp_report/page', data).then(res => res), http.post('soil/v1/exp_report/page', data).then(res => res),
pageExpReportEnd: data =>
http
.post('soil/v1/exp_report/page_group_exp_report_end', data)
.then(res => res),
pageExperimentReport: data => pageExperimentReport: data =>
http.post('soil/v1/exp_report/page', data).then(res => res), http.post('soil/v1/exp_report/page', data).then(res => res),
deleteReport: data => deleteReport: data =>
......
<!--检测项目编辑列表(添加、导入检测项目)-->
<template> <template>
<div> <div>
<Modal <Modal
...@@ -13,9 +12,6 @@ ...@@ -13,9 +12,6 @@
<Form-item class="search-item" label="试验名称:" style="margin-left: -25px"> <Form-item class="search-item" label="试验名称:" style="margin-left: -25px">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入试验名称" clearable /> <Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入试验名称" clearable />
</Form-item> </Form-item>
<!-- <Form-item class="search-item" label="检测依据:">-->
<!-- <Input v-model="formObj.code" placeholder="请输入检测依据名称" clearable @on-enter="_formSearch" />-->
<!-- </Form-item>-->
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary"> <Button @click="_formSearch" type="primary">
搜索 搜索
...@@ -111,14 +107,6 @@ export default { ...@@ -111,14 +107,6 @@ export default {
{ title: '大类', key: 'mainType', width: 140 }, { title: '大类', key: 'mainType', width: 140 },
{ title: '小类', key: 'smallType', width: 140 }, { title: '小类', key: 'smallType', width: 140 },
{ title: '方法', key: 'testMethod', width: 180 } { title: '方法', key: 'testMethod', width: 180 }
// { title: '设备', key: 'device', width: 180 },
// { title: '检测依据', key: 'code', width: 180 },
// { title: '检测科室', key: 'groupName', width: 110 },
// { title: '比较符', key: 'compareSymbol', width: 120 },
// { title: '限值', key: 'limitValue' },
// { title: '单位', key: 'unit' },
// { title: '是否系统判定', key: 'judged', width: 120, judged: true },
// { title: '备注', key: 'remark' }
], ],
catalogueId: '', catalogueId: '',
getPage: {}, getPage: {},
...@@ -204,14 +192,6 @@ export default { ...@@ -204,14 +192,6 @@ export default {
} }
}) })
}, },
// _deleteOk: async function(id) {
// // const result = await drugCatalogueItem.deleteById(id)
// if (result) {
// this.$Message.success('删除成功')
// this._page()
// }
// },
// table结果 返回整行
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
case 'page': case 'page':
......
...@@ -14,24 +14,6 @@ ...@@ -14,24 +14,6 @@
<Form-item class="search-item" label="检测依据名称:"> <Form-item class="search-item" label="检测依据名称:">
<Input @on-enter="_formSearch" v-model="formObj.name" name="name" placeholder="请输入检测依据名称" clearable/> <Input @on-enter="_formSearch" v-model="formObj.name" name="name" placeholder="请输入检测依据名称" clearable/>
</Form-item> </Form-item>
<!-- <Form-item class="search-item" label="标准状态:">-->
<!-- <Select name="status" placeholder="请选择标准状态" clearable>-->
<!-- <Option v-for="item in statusList" :value="item.value" :key="item.name">{{item.name}}</Option>-->
<!-- </Select>-->
<!-- </Form-item>-->
<!-- <Form-item class="search-item" label="标准分类:">-->
<!-- <Select name='classify' placeholder="请选择标准分类" clearable>-->
<!-- <Option v-for="item in classifyList" :value="item.value" :key="item.name">{{item.name}}</Option>-->
<!-- </Select>-->
<!-- </Form-item>-->
<!-- <Form-item label="标准类型:" class="search-item margin-left-6">-->
<!-- <Select name="type" placeholder="请选择标准类型" clearable>-->
<!-- <Option v-for="item in typeList" :value="item.value" :key="item.value">{{ item.name }}</Option>-->
<!-- </Select>-->
<!-- </Form-item>-->
<!-- <Form-item class="search-item" label="发布单位:">-->
<!-- <Input @on-enter="_formSearch" name="publishUnit" placeholder="请输入发布单位" clearable/>-->
<!-- </Form-item>-->
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
</Form-item> </Form-item>
......
...@@ -119,11 +119,6 @@ export default { ...@@ -119,11 +119,6 @@ export default {
this.selectData = [] this.selectData = []
console.log(expList) console.log(expList)
this.$refs.pageTable._clearSelection() this.$refs.pageTable._clearSelection()
// this.formObj.sampleId = id
// this.$refs.pageTable._hideLoading()
// if (catalogueId) {
// this._page()
// }
}, },
_handleRow(scope) { _handleRow(scope) {
console.log(scope) console.log(scope)
...@@ -147,7 +142,6 @@ export default { ...@@ -147,7 +142,6 @@ export default {
} }
}, },
_page: async function() { _page: async function() {
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await soilEntrust.pageItem( const result = await soilEntrust.pageItem(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
......
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="试验项目报告审核" name="lab">
<reportMake ref="labTabs" />
</el-tab-pane>
<el-tab-pane label="试验项目报告审核历史" name="his">
<historyTask ref="hisTabs" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import reportMake from './tabs/ExpReportCheck'
import historyTask from './tabs/ExpReportCheckHis'
export default {
components: { reportMake, historyTask },
data() {
return {
activeName: 'lab'
}
},
mounted() {
this.activeName = 'lab'
this._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'lab') {
this._page()
} else {
this.$refs.hisTabs._clearPage()
this.$refs.hisTabs._page()
}
},
_page() {
this.$refs.labTabs._clearPage()
this.$refs.labTabs._page()
}
}
}
</script>
<template>
<div>
<Modal v-model="showModal" v-drag width="1050" class="modal-footer-none zIndex-1100">
<p slot="header">项目试验项目编制</p>
<div>
<Row>
<!--查询-->
<Col span="24">
<Form id="search-contract-record" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="项目名称:">
<Input v-model="formObj.expName" name="expName" placeholder="请输入项目名称" style="width: 200px"
clearable @on-enter="_search"/>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_search">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" show-search-btn="true" @on-result-change="_btnClick" />
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight"
:get-page="getPage" :icon-msg="iconMsg" show-check-box @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined">
<template slot-scope="scope">
<span v-if="item.key==='status'">
{{scope.row[item.key].display}}
</span>
<span v-else-if="item.key==='ctime'">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd HH:MM:ss'):''}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
</div>
</template>
<script>
/**
* 操作日志-委托
*/
import { meterEntrust, soilReport, soilStatistics } from '../../../api'
import Global from '../../../api/config'
export default {
data() {
return {
showModal: false,
getPage: {},
searchOpen: false,
selectIds: [],
pageColumns: [
{ title: '项目名称', key: 'expName' },
{ title: '检测科室', key: 'groupName' },
{ title: '状态', key: 'status' },
{ title: '备注', key: 'remark' },
{ title: '创建人', key: 'uname' },
{ title: '创建时间', key: 'ctime', dateTime: true }
],
btn: [{ id: '', type: 'primary', name: '提交至签发' }],
iconMsg: [
{
type: 'ios-book',
id: '',
name: '查看项目报告'
}
],
formObj: {
entrustId: undefined,
expName: undefined,
groupId: undefined
}
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('tableModal')
}
},
methods: {
_open(data) {
this.showModal = true
this.formObj.entrustId = data.id
this.formObj.groupId = data.groupId
this._page()
},
_btnClick(msg, data) {
switch (msg) {
case '提交至签发':
this._submitExpReportCheck()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
},
_iconClick(res, data) {
this.$nextTick(() => {
switch (res) {
case '查看项目报告':
this._reportView(data)
// this._recordView(data.originalRecordId)
break
case '查看试验项目':
this._itemView(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
}
})
},
_reportView(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._recordView(data.originalRecordId)
}
},
_reportMakeLook: async function(data) {
console.log(data)
const result = await soilReport.expReportGetById(data.id)
if (result) {
console.log('result')
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 13,
id: data.id,
isReport: 4
})
}
},
// 查看原始记录
_recordView(originalRecordId) {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef
layx.iframe(
'labRecordWriteOriView',
'原始记录预览',
recordUrl + '/print/v1/form/' + originalRecordId + '?type=ENVTESTMAKE',
{
event: {
onload: {
after: function(layxWindow, winform) {
// eslint-disable-next-line no-undef
layx.max(winform.id)
}
}
}
}
)
},
_submitExpReportCheck() {
const ids = this.selectIds
if (ids.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
this._submitExpReportCheckConfirm(
ids,
`确认要提交 ${ids.length} 条数据吗?`
)
}
},
_submitExpReportCheckConfirm(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || `确定要处理该条数据吗?`,
onOk: () => {
this._submitExpReportCheckOk(ids)
}
})
},
async _submitExpReportCheckOk(ids) {
const result = await soilStatistics.expReportCheckSubmit(ids)
if (result) {
this._resultChange('提交成功!')
}
},
_resultChange(msg) {
this.$Message.success(msg)
this._page()
this.$emit('on-result-change')
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await meterEntrust.pageGroupExpReportCheck(this.formObj)
console.log(result)
if (result) {
this.getPage = result
this.$refs.pageTable._hideLoading()
}
},
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
this._page()
break
case 'selectIds':
this.selectIds = data
break
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
}
},
_search() {
this._page()
}
}
}
</script>
<template>
<div>
<Modal v-model="showModal" v-drag width="1050" class="modal-footer-none zIndex-1100">
<p slot="header">项目试验报告</p>
<div>
<Row>
<!--查询-->
<Col span="24">
<Form id="search-contract-record" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="项目名称:">
<Input v-model="formObj.expName" name="expName" placeholder="请输入项目名称" style="width: 200px"
clearable @on-enter="_search"/>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_search">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" show-search-btn="true" @on-result-change="_btnClick" />
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight"
:get-page="getPage" :icon-msg="iconMsg" show-check-box @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined">
<template slot-scope="scope">
<span v-if="item.key==='status'">
{{scope.row[item.key].display}}
</span>
<span v-else-if="item.key==='ctime'">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd HH:MM:ss'):''}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
</div>
</template>
<script>
/**
* 操作日志-委托
*/
import { meterEntrust, soilReport, soilStatistics } from '../../../api'
import Global from '../../../api/config'
export default {
data() {
return {
showModal: false,
getPage: {},
searchOpen: false,
selectIds: [],
pageColumns: [
{ title: '项目名称', key: 'expName' },
{ title: '检测科室', key: 'groupName' },
{ title: '状态', key: 'status' },
{ title: '备注', key: 'remark' },
{ title: '创建人', key: 'uname' },
{ title: '创建时间', key: 'ctime', dateTime: true }
],
btn: [],
iconMsg: [
{
type: 'ios-book',
id: '',
name: '查看项目报告'
}
],
formObj: {
entrustId: undefined,
expName: undefined,
groupId: undefined
}
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('tableModal')
}
},
methods: {
_open(data) {
this.showModal = true
this.formObj.entrustId = data.id
this.formObj.groupId = data.groupId
this._page()
},
_btnClick(msg, data) {
switch (msg) {
case '通过':
this._submitExpReportIssue()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
},
_iconClick(res, data) {
this.$nextTick(() => {
switch (res) {
case '查看项目报告':
this._reportView(data)
// this._recordView(data.originalRecordId)
break
case '查看试验项目':
this._itemView(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
}
})
},
_reportView(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._recordView(data.originalRecordId)
}
},
_reportMakeLook: async function(data) {
console.log(data)
const result = await soilReport.expReportGetById(data.id)
if (result) {
console.log('result')
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 13,
id: data.id,
isReport: 4
})
}
},
// 查看原始记录
_recordView(originalRecordId) {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef
layx.iframe(
'labRecordWriteOriView',
'原始记录预览',
recordUrl + '/print/v1/form/' + originalRecordId + '?type=ENVTESTMAKE',
{
event: {
onload: {
after: function(layxWindow, winform) {
// eslint-disable-next-line no-undef
layx.max(winform.id)
}
}
}
}
)
},
_submitExpReportIssue() {
const ids = this.selectIds
if (ids.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
this._submitExpReportIssueConfirm(
ids,
`确认要提交 ${ids.length} 条数据吗?`
)
}
},
_submitExpReportIssueConfirm(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || `确定要处理该条数据吗?`,
onOk: () => {
this.__submitExpReportIssueOk(ids)
}
})
},
async __submitExpReportIssueOk(ids) {
const result = await soilStatistics.expReportIssueSubmit(ids)
if (result) {
this._resultChange('提交成功!')
}
},
_resultChange(msg) {
this.$Message.success(msg)
this._page()
this.$emit('on-result-change')
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await meterEntrust.pageGroupExpReportEnd(this.formObj)
console.log(result)
if (result) {
this.getPage = result
this.$refs.pageTable._hideLoading()
}
},
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
this._page()
break
case 'selectIds':
this.selectIds = data
break
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
}
},
_search() {
this._page()
}
}
}
</script>
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="试验项目报告批准" name="lab">
<reportMake ref="labTabs" />
</el-tab-pane>
<el-tab-pane label="试验项目报告批准历史" name="his">
<historyTask ref="hisTabs" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import reportMake from './tabs/ExpReportIssue'
import historyTask from './tabs/ExpReportIssueHis'
export default {
components: { reportMake, historyTask },
data() {
return {
activeName: 'lab'
}
},
mounted() {
this.activeName = 'lab'
this._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'lab') {
this._page()
} else {
this.$refs.hisTabs._clearPage()
this.$refs.hisTabs._page()
}
},
_page() {
this.$refs.labTabs._clearPage()
this.$refs.labTabs._page()
}
}
}
</script>
<template>
<div>
<Modal v-model="showModal" v-drag width="1050" class="modal-footer-none zIndex-1100">
<p slot="header">项目试验报告签发</p>
<div>
<Row>
<!--查询-->
<Col span="24">
<Form id="search-contract-record" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="项目名称:">
<Input v-model="formObj.expName" name="expName" placeholder="请输入项目名称" style="width: 200px"
clearable @on-enter="_search"/>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_search">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" show-search-btn="true" @on-result-change="_btnClick" />
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight"
:get-page="getPage" :icon-msg="iconMsg" show-check-box @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined">
<template slot-scope="scope">
<span v-if="item.key==='status'">
{{scope.row[item.key].display}}
</span>
<span v-else-if="item.key==='ctime'">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd HH:MM:ss'):''}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
</div>
</template>
<script>
/**
* 操作日志-委托
*/
import { meterEntrust, soilReport, soilStatistics } from '../../../api'
import Global from '../../../api/config'
export default {
data() {
return {
showModal: false,
getPage: {},
searchOpen: false,
selectIds: [],
pageColumns: [
{ title: '项目名称', key: 'expName' },
{ title: '检测科室', key: 'groupName' },
{ title: '状态', key: 'status' },
{ title: '备注', key: 'remark' },
{ title: '创建人', key: 'uname' },
{ title: '创建时间', key: 'ctime', dateTime: true }
],
btn: [{ id: '', type: 'primary', name: '通过' }],
iconMsg: [
{
type: 'ios-book',
id: '',
name: '查看项目报告'
}
],
formObj: {
entrustId: undefined,
expName: undefined,
groupId: undefined
}
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('tableModal')
}
},
methods: {
_open(data) {
this.showModal = true
this.formObj.entrustId = data.id
this.formObj.groupId = data.groupId
this._page()
},
_btnClick(msg, data) {
switch (msg) {
case '通过':
this._submitExpReportIssue()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
},
_iconClick(res, data) {
this.$nextTick(() => {
switch (res) {
case '查看项目报告':
this._reportView(data)
// this._recordView(data.originalRecordId)
break
case '查看试验项目':
this._itemView(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
}
})
},
_reportView(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._recordView(data.originalRecordId)
}
},
_reportMakeLook: async function(data) {
console.log(data)
const result = await soilReport.expReportGetById(data.id)
if (result) {
console.log('result')
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 13,
id: data.id,
isReport: 4
})
}
},
// 查看原始记录
_recordView(originalRecordId) {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef
layx.iframe(
'labRecordWriteOriView',
'原始记录预览',
recordUrl + '/print/v1/form/' + originalRecordId + '?type=ENVTESTMAKE',
{
event: {
onload: {
after: function(layxWindow, winform) {
// eslint-disable-next-line no-undef
layx.max(winform.id)
}
}
}
}
)
},
_submitExpReportIssue() {
const ids = this.selectIds
if (ids.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
this._submitExpReportIssueConfirm(
ids,
`确认要提交 ${ids.length} 条数据吗?`
)
}
},
_submitExpReportIssueConfirm(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || `确定要处理该条数据吗?`,
onOk: () => {
this.__submitExpReportIssueOk(ids)
}
})
},
async __submitExpReportIssueOk(ids) {
const result = await soilStatistics.expReportIssueSubmit(ids)
if (result) {
this._resultChange('提交成功!')
}
},
_resultChange(msg) {
this.$Message.success(msg)
this._page()
this.$emit('on-result-change')
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await meterEntrust.pageGroupExpReportIssue(this.formObj)
console.log(result)
if (result) {
this.getPage = result
this.$refs.pageTable._hideLoading()
}
},
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
this._page()
break
case 'selectIds':
this.selectIds = data
break
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
}
},
_search() {
this._page()
}
}
}
</script>
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="试验项目报告编制" name="lab">
<reportMake ref="labTabs" />
</el-tab-pane>
<el-tab-pane label="试验项目报告编制历史" name="his">
<historyTask ref="hisTabs" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import reportMake from './tabs/ExpReportMake'
import historyTask from './tabs/ExpReportMakeHis'
export default {
components: { reportMake, historyTask },
data() {
return {
activeName: 'lab'
}
},
mounted() {
this.activeName = 'lab'
this._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'lab') {
this._page()
} else {
this.$refs.hisTabs._clearPage()
this.$refs.hisTabs._page()
}
},
_page() {
this.$refs.labTabs._clearPage()
this.$refs.labTabs._page()
}
}
}
</script>
<template>
<div>
<Modal v-model="showModal" v-drag width="1050" class="modal-footer-none zIndex-1100">
<p slot="header">项目试验项目编制</p>
<div>
<Row>
<!--查询-->
<Col span="24">
<Form id="search-contract-record" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="项目名称:">
<Input v-model="formObj.expName" name="expName" placeholder="请输入项目名称" style="width: 200px"
clearable @on-enter="_search"/>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_search">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" show-search-btn="true" @on-result-change="_btnClick" />
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight"
:get-page="getPage" show-check-box @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined">
<template slot-scope="scope">
<span v-if="item.key==='status'">
{{scope.row[item.key].display}}
</span>
<span v-else-if="item.key==='ctime'">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd HH:MM:ss'):''}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
</div>
</template>
<script>
/**
* 操作日志-委托
*/
import { meterEntrust, soilStatistics } from '../../../api'
export default {
data() {
return {
showModal: false,
getPage: {},
searchOpen: false,
selectIds: [],
pageColumns: [
{ title: '项目名称', key: 'expName' },
{ title: '检测科室', key: 'groupName' },
{ title: '状态', key: 'status' },
{ title: '备注', key: 'remark' },
{ title: '创建人', key: 'uname' },
{ title: '创建时间', key: 'ctime', dateTime: true }
],
btn: [{ id: '', type: 'primary', name: '提交至审核' }],
formObj: {
entrustId: undefined,
expName: undefined,
groupId: undefined
}
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('tableModal')
}
},
methods: {
_open(data) {
this.showModal = true
this.formObj.entrustId = data.id
this.formObj.groupId = data.groupId
this._page()
},
_btnClick(msg, data) {
switch (msg) {
case '提交至审核':
this._submitExpReportMake()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
},
_submitExpReportMake() {
const ids = this.selectIds
if (ids.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
this._submitExpReportMakeConfirm(
ids,
`确认要提交 ${ids.length} 条数据吗?`
)
}
},
_submitExpReportMakeConfirm(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || `确定要处理该条数据吗?`,
onOk: () => {
this._submitExpReportMakeOk(ids)
}
})
},
async _submitExpReportMakeOk(ids) {
const result = await soilStatistics.expReportCheckApprove(ids)
if (result) {
this._resultChange('提交成功!')
}
},
_resultChange(msg) {
this.$Message.success(msg)
this._page()
this.$emit('on-result-change')
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await meterEntrust.pageGroupExpReportMake(this.formObj)
console.log(result)
if (result) {
this.getPage = result
this.$refs.pageTable._hideLoading()
}
},
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
this._page()
break
case 'selectIds':
this.selectIds = data
break
}
},
_search() {
this._page()
}
}
}
</script>
...@@ -350,7 +350,7 @@ export default { ...@@ -350,7 +350,7 @@ export default {
}, },
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await soilTest.expReportPage( const result = await soilTest.pageExpReportEnd(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
...@@ -8,31 +8,21 @@ ...@@ -8,31 +8,21 @@
<div class="fl"> <div class="fl">
<Form id="search-form" :label-width="70" inline onsubmit="return false"> <Form id="search-form" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<!-- <Form-item class="search-item" label="人员:">-->
<!-- <AutoCompletes :value="tester" :blur="true" :down-data="testerData" show-key="realname"-->
<!-- placeholder="请选择人员" @on-result-change="_testerChange"-->
<!-- ></AutoCompletes>-->
<!-- </Form-item>-->
<!-- <Form-item class="search-item" label="服务类型:">-->
<!-- <Select v-model="serviceType" placeholder="请选择服务类型" clearable>-->
<!-- <Option v-for="item in serviceTypeList" :value="item.name" :key="item.name">{{ item.name }}</Option>-->
<!-- </Select>-->
<!-- </Form-item>-->
<Form-item label="委托日期:"> <Form-item label="委托日期:">
<el-date-picker <el-date-picker
v-model="queryDate" v-model="queryDate"
@change="_dateChange"
type="monthrange" type="monthrange"
range-separator="-" range-separator="-"
start-placeholder="开始月份" start-placeholder="开始月份"
end-placeholder="结束月份" end-placeholder="结束月份"
size="small" size="small"
value-format="yyyy-MM" value-format="yyyy-MM"
@change="_dateChange"
> >
</el-date-picker> </el-date-picker>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_getData" type="primary" class="width-80"> <Button type="primary" class="width-80" @click="_getData">
搜索 搜索
</Button> </Button>
</Form-item> </Form-item>
...@@ -43,14 +33,14 @@ ...@@ -43,14 +33,14 @@
<!--内容--> <!--内容-->
<Col span="24"> <Col span="24">
<Row :gutter="16"> <Row :gutter="16">
<Col span="14"> <Col span="13">
<element-table <element-table
id="table-year" id="table-year"
ref="pageTable" ref="pageTable"
:table-height="tableHeight" :table-height="tableHeight"
:get-page="getPage" :get-page="getPage"
@on-result-change="_tableResultChange"
hide-checkbox hide-checkbox
@on-result-change="_tableResultChange"
> >
<el-table-column fixed type="index" label="序号" width="100"> <el-table-column fixed type="index" label="序号" width="100">
</el-table-column> </el-table-column>
...@@ -72,7 +62,7 @@ ...@@ -72,7 +62,7 @@
</el-table-column> </el-table-column>
</element-table> </element-table>
</Col> </Col>
<Col span="10"> <Col span="11">
<!--pie--> <!--pie-->
<UserTestPie ref="testPieModal"></UserTestPie> <UserTestPie ref="testPieModal"></UserTestPie>
</Col> </Col>
...@@ -109,47 +99,14 @@ export default { ...@@ -109,47 +99,14 @@ export default {
tester: '', tester: '',
testerId: '', testerId: '',
pageColumns: [ pageColumns: [
{ title: '姓名', key: 'tester', detail: true }, { title: '检测人员', key: 'tester', detail: true, width: 140 },
{ title: '样品量', key: 'total' }, { title: '项目总量', key: 'total', width: 100 },
{ title: '样品占比(%)', key: 'ratio' } { title: '未完成总量', key: 'doingTotal', width: 110 },
{ title: '已完成总量', key: 'endTotal', width: 110 },
{ title: '样品占比(%)', key: 'ratio', width: 120 }
], ],
groupData: [], groupData: [],
// getPage: [ getPage: {},
// {
// tester: 'wwd',
// total: '12',
// ratio: '10%',
// price: '3500'
// },
// {
// tester: 'wwd',
// total: '12',
// ratio: '10%',
// price: '3500'
// },
// {
// tester: 'wwd',
// total: '12',
// ratio: '10%',
// price: '3500'
// }
// ],
getPage: {
records: [
{
tester: '李承明',
total: '12',
ratio: '10%',
price: '3500'
},
{
tester: '李成明',
total: '12',
ratio: '10%',
price: '3500'
}
]
},
tempData: { tempData: {
groupId: '', groupId: '',
groupName: '', groupName: '',
...@@ -180,8 +137,7 @@ export default { ...@@ -180,8 +137,7 @@ export default {
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1 const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
this.formObj.edateBegin = this.tempData.beginDate this.formObj.edateBegin = this.tempData.beginDate
this.formObj.edateEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss') this.formObj.edateEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss')
// this._getData() this._getData()
// this._getServiceTypeList()
}, },
methods: { methods: {
mGetDate(year, month) { mGetDate(year, month) {
...@@ -194,7 +150,7 @@ export default { ...@@ -194,7 +150,7 @@ export default {
this.formObj this.formObj
) )
if (result) { if (result) {
this.getPage.records = result this.getPage = result
this.$refs.testPieModal._openPie(this.getPage.records) this.$refs.testPieModal._openPie(this.getPage.records)
} }
}, },
......
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
formatter: function(a) { formatter: function(a) {
return ( return (
a.name + a.name +
'</br>样品量: ' + '</br>项目量: ' +
a.data.value + a.data.value +
'<br>占比: ' + '<br>占比: ' +
a.percent + a.percent +
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
right: 0, right: 0,
top: 20, top: 20,
bottom: 20, bottom: 20,
data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎'] data: []
}, },
color: this.$echartColor, color: this.$echartColor,
series: [ series: [
...@@ -81,13 +81,7 @@ export default { ...@@ -81,13 +81,7 @@ export default {
labelLine: { labelLine: {
show: false show: false
}, },
data: [ data: []
{ value: 335, name: '直接访问' },
{ value: 310, name: '邮件营销' },
{ value: 234, name: '联盟广告' },
{ value: 135, name: '视频广告' },
{ value: 1548, name: '搜索引擎' }
]
} }
] ]
}, },
......
...@@ -172,8 +172,6 @@ export default { ...@@ -172,8 +172,6 @@ export default {
_reportMakeLook: async function(data) { _reportMakeLook: async function(data) {
console.log(data) console.log(data)
const result = await soilReport.expReportGetById(data.id) const result = await soilReport.expReportGetById(data.id)
// this._viewReport(data)
// const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) { if (result) {
console.log('result') console.log('result')
this._viewReport(result) this._viewReport(result)
......
...@@ -45,6 +45,12 @@ import DataConsult from '../pages/soil-test-manage/test-data-consult/DataConsult ...@@ -45,6 +45,12 @@ import DataConsult from '../pages/soil-test-manage/test-data-consult/DataConsult
import SoilRecordTemplate from '../pages/soil-record-template-manage/SoilRecordTemplate' import SoilRecordTemplate from '../pages/soil-record-template-manage/SoilRecordTemplate'
import SoilItemReportTemplate from '../pages/soil-report-manage/soil-item-report-template/SoilItemReportTemplate' import SoilItemReportTemplate from '../pages/soil-report-manage/soil-item-report-template/SoilItemReportTemplate'
import SoilSummarySheet from '../pages/soil-report-manage/soil-summary-sheet/SoilSummarySheetTemplate' import SoilSummarySheet from '../pages/soil-report-manage/soil-summary-sheet/SoilSummarySheetTemplate'
import SoilExpReportMakeIndex from '../pages/soil-exp-report/report-make/SoilExpReportMakeIndex'
import SoilExpReportCheckIndex from '../pages/soil-exp-report/report-check/SoilExpReportCheckIndex'
import SoilExpReportIssueIndex from '../pages/soil-exp-report/report-issue/SoilExpReportIssueIndex'
import SoilExpReportEndIndex from '../pages/soil-exp-report/report-end/SoilExpReportEndIndex'
import Blank from '~/pages/blank' import Blank from '~/pages/blank'
export default [ export default [
{ {
...@@ -242,6 +248,35 @@ export default [ ...@@ -242,6 +248,35 @@ export default [
} }
] ]
}, },
{
path: 'soil_exp_report',
component: Blank,
meta: { title: '试验项目报告管理' },
children: [
{
path: 'make',
component: SoilExpReportMakeIndex,
meta: { title: '项目报告编制' }
},
{
path: 'check',
component: SoilExpReportCheckIndex,
meta: { title: '项目报告审核' }
},
{
path: 'issue',
component: SoilExpReportIssueIndex,
meta: { title: '项目报告签发' }
},
{
path: 'end',
component: SoilExpReportEndIndex,
meta: { title: '项目报告汇总' }
}
]
},
{ {
path: 'aptitude', path: 'aptitude',
component: Blank, component: 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