Commit 30018857 by lichengming

修改了备样余样管理

parent 02c0fdf1
......@@ -22,6 +22,9 @@ export default {
// 试验室领样操作
takeSample: data =>
http.post('soil/v1/sample/take_sample?ids=' + data).then(res => res),
// 备样历史分页列表
pageBackupHis: data =>
http.post('soil/v1/sample_backup/page_backup_his', data).then(res => res),
// 备样管理提交申请
appleHandle: data =>
http.post('soil/v1/sample_backup/apply_handle', data).then(res => res),
......@@ -45,5 +48,34 @@ export default {
.then(res => res),
// 备样管理处理备样申请
handleOk: data =>
http.post('soil/v1/sample_backup/handle_ok?ids=' + data).then(res => res)
http.post('soil/v1/sample_backup/handle_ok?ids=' + data).then(res => res),
pageSurplus: data =>
http.post('soil/v1/prepare/page_surplus', data).then(res => res),
// 余样处理审批分页列表
pageSurplusHandleCheck: data =>
http
.post('soil/v1/prepare/page_surplus_handle_check', data)
.then(res => res),
// 余样管理处理备样申请
surplusApplyHandle: data =>
http.post('soil/v1/prepare/apply_handle', data).then(res => res),
// 余样管理处理备样申请
surplusHandleOk: data =>
http.post('soil/v1/prepare/handle_ok?ids=' + data).then(res => res),
// 余品处理审批通过
surplusDisposalOk: data =>
http.post('soil/v1/prepare/disposal_ok?ids=' + data).then(res => res),
// 余样处理审批驳回
surplueDisposalFail: data =>
http
.post(
'soil/v1/prepare/disposal_fail?ids=' +
data.ids +
'&reason=' +
data.remark
)
.then(res => res),
// 余样样品历史分页列表
pageSurplusHis: data =>
http.post('soil/v1/prepare/page_surplus_his', data).then(res => res)
}
......@@ -420,7 +420,6 @@ export default {
})
},
checkedData() {
console.log(this.$refs.xTable.selection)
this.$emit('on-result-change', 'allSelect', this.$refs.xTable.selection)
},
// 双击行操作
......
......@@ -294,7 +294,6 @@ export default {
this.selectData = data
break
case 'allSelect':
console.log('123465798', data)
this.allSelect(data)
break
case 'iconClick':
......
......@@ -153,7 +153,7 @@ export default {
{
type: 'primary',
id: '',
name: '处理备样申请'
name: '完成处理'
},
{
type: 'primary',
......@@ -253,6 +253,7 @@ export default {
}
},
mounted() {
this.$refs.pageTable._showLoading()
// 样品存储期限预警
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this._getLocList()
......@@ -383,7 +384,7 @@ export default {
case '申请处理':
this._applyDispose()
break
case '处理备样申请':
case '完成处理':
this._handleApply()
break
case '制备':
......@@ -417,6 +418,14 @@ export default {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择一条或多条数据!')
} else {
console.log(this.selectData)
const errorIds = []
for (let i = 0; i < this.selectIds.length; i++) {
if (this.selectData[i].status.display !== '处理审批通过') {
errorIds.push(this.selectData[i].sampleCode)
}
}
if (errorIds.length === 0) {
this.$Modal.confirm({
title: '提示',
content: '确定处理这 ' + this.selectIds.length + ' 条数据?',
......@@ -424,6 +433,13 @@ export default {
this._handleOk(this.selectIds.join(','))
}
})
} else {
this.$Message.warning('试样编号为 ' + errorIds + ' 的审批未通过')
// this.$Modal.confirm({
// title: '提示',
// content: '试样编号为 ' + errorIds + ' 的审批未通过'
// })
}
}
},
_handleOk: async function() {
......@@ -590,8 +606,8 @@ export default {
this.$serializeForm(this.formObj)
)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
this.$refs.pageTable._hideLoading()
}
},
_batchEdit() {
......
......@@ -75,6 +75,9 @@
<div v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</div>
<a v-else-if="item.key==='sampleSn'"
@click.stop="_sampleDetailModal(scope.row)">{{scope.row[item.key]}}</a>
<div v-else-if="item.key==='status'">
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}}
</div>
<div v-else-if="item.key==='progress'">
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}}
</div>
......@@ -89,7 +92,7 @@
</div>
</template>
<script>
import { soilEntrust } from '../../../../api'
import { soilSample } from '../../../../api'
export default {
components: {},
......@@ -107,23 +110,20 @@ export default {
}
],
pageColumns: [
{ title: '样品编号', key: 'sampleSn', width: 180 },
{ title: '样品名称', key: 'sampleName', width: 140 },
{ title: '状态', key: 'progress', width: 110, status: true },
{ title: '存储期限', key: 'endDate', width: 120, date: true },
{ title: '委托单位', key: 'cname', width: 140 },
{ title: '委托名称', key: 'contractName', width: 170 },
{ title: '处置方式', key: 'handleMethod', width: 120 },
{ title: '处理人', key: 'handlePerson', width: 100 },
{ title: '处理时间', key: 'handleTime', width: 120, date: true },
{ title: '处理申请人', key: 'applyer', width: 120 },
{ title: '申请时间', key: 'applyDate', width: 120, date: true },
{ title: '存储位置', key: 'backupPlace', width: 100 },
{ title: '存储条件', key: 'storageCondition', width: 120 },
{ title: '样品数量', key: 'quantity', width: 100 },
{ title: '备样数量', key: 'sampleQuantity', width: 100 },
{ title: '样品备注', key: 'sampleRemark' },
{ title: '委托备注', key: 'contractRemark' }
{ title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '状态', key: 'status', width: 160 },
{ title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '样品包装类型', key: 'samplePack', width: 180 },
{ title: '现场编号', key: 'siteNo', width: 180 },
{ title: '存储条件', key: 'conditions', width: 180 },
{ title: '备样位置', key: 'backupLocation', width: 180 },
{ title: '备样数量', key: 'quantity', width: 180 },
{ title: '备样人', key: 'backupUser', width: 140 },
{ title: '钻孔位置', key: 'boreholeLocation', width: 110 },
{ title: '钻孔名称', key: 'boreholeName', width: 160 },
{ title: '水深(米)', key: 'waterDepth', width: 160 }
],
searchOpen: false,
getPage: {},
......@@ -145,7 +145,7 @@ export default {
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await soilEntrust.pageSampleReceive(
const result = await soilSample.pageBackupHis(
this.$serializeForm(this.formObj)
)
if (result) {
......
......@@ -133,7 +133,7 @@ export default {
{
type: 'primary',
id: '',
name: '完成处理'
name: '通过'
},
{
type: '',
......@@ -363,7 +363,7 @@ export default {
},
_btnClick(msg) {
switch (msg) {
case '完成处理':
case '通过':
this._dispose()
break
case '驳回':
......
<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="wait">
<SampleBackupsManage ref="waitTabs"></SampleBackupsManage>
</el-tab-pane>
<el-tab-pane label="已处理" name="query">
<SampleBackupsQuery ref="queryTabs"></SampleBackupsQuery>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import SampleBackupsManage from './tab/SurplusDisposeManage'
import SampleBackupsQuery from './tab/SurplusDisposeQuery'
export default {
components: {
SampleBackupsManage,
SampleBackupsQuery
},
data() {
return {
activeName: 'wait'
}
},
mounted() {
this.activeName = 'wait'
this.$refs.waitTabs._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'wait') {
this.$refs.waitTabs._page()
} else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page()
} else {
this.$refs.queryTabs._page()
}
}
}
}
</script>
......@@ -110,11 +110,11 @@
</div>
</template>
<script>
import SampleParpareApply from '../SurplusParpareApply'
import AutoCompletes from '../../../../components/base/AutoCompletes'
// eslint-disable-next-line no-unused-vars
import http from '../../../../api/http'
import { soilEntrust } from '../../../../api'
import SampleParpareApply from '../../backups-manage/SampleParpareApply'
import { soilSample } from '../../../../api'
export default {
components: {
AutoCompletes,
......@@ -127,6 +127,7 @@ export default {
formObj: {},
selectData: [],
selectIds: [],
indexList: [],
selectSampleIds: [],
getPage: {},
btn: [
......@@ -138,7 +139,7 @@ export default {
{
type: 'primary',
id: '',
name: '处理备样申请'
name: '完成处理'
},
{
type: 'primary',
......@@ -169,20 +170,12 @@ export default {
],
iconMsgSave: [{ type: 'ios-checkmark', id: '', name: '保存' }],
pageColumns: [
{ title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '状态', key: 'status', width: 160 },
{ title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '样品包装类型', key: 'samplePack', width: 180 },
{ title: '现场编号', key: 'siteNo', width: 180 },
{ title: '存储条件', key: 'conditions', width: 180 },
{ title: '备样位置', key: 'backupLocation', width: 180 },
{ title: '备样数量', key: 'quantity', width: 180 },
{ title: '备样人', key: 'backupUser', width: 140 },
{ title: '钻孔位置', key: 'boreholeLocation', width: 110 },
{ title: '钻孔名称', key: 'boreholeName', width: 160 },
{ title: '水深(米)', key: 'waterDepth', width: 160 }
{ title: '试样编号', key: 'sampleCode' },
{ title: '状态', key: 'status' },
{ title: '包装类型', key: 'samplePack' },
{ title: '制备数量', key: 'quantity' },
{ title: '单位', key: 'unit' }
// { title: '备注', key: 'remark', width: 130 }
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
],
conditionList: [],
......@@ -236,6 +229,7 @@ export default {
}
},
mounted() {
this.$refs.pageTable._showLoading()
// 样品存储期限预警
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this._getLocList()
......@@ -366,7 +360,7 @@ export default {
case '申请处理':
this._applyDispose()
break
case '处理备样申请':
case '完成处理':
this._handleApply()
break
case '制备':
......@@ -411,6 +405,14 @@ export default {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择一条或多条数据!')
} else {
console.log(this.selectData)
const errorIds = []
for (let i = 0; i < this.selectIds.length; i++) {
if (this.selectData[i].status.display !== '处理审批通过') {
errorIds.push(this.selectData[i].index + 1)
}
}
if (errorIds.length === 0) {
this.$Modal.confirm({
title: '提示',
content: '确定处理这 ' + this.selectIds.length + ' 条数据?',
......@@ -418,6 +420,15 @@ export default {
this._handleOk(this.selectIds.join(','))
}
})
} else {
this.$Message.warning('第 ' + errorIds + ' 条数据的审批未通过')
}
}
},
_handleOk: async function() {
const result = await soilSample.surplusHandleOk(this.selectIds.join(','))
if (result) {
this._resultChange('提交成功')
}
},
// 制备
......@@ -555,6 +566,12 @@ export default {
break
}
},
allSelect(data) {
this.indexList = []
for (let i = 0; i < data.length; i++) {
this.indexList.push(data[i])
}
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
// this._getBackUpCount()
......@@ -563,7 +580,7 @@ export default {
this.editIndex = -1
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await soilEntrust.pageBackup(
const result = await soilSample.pageSurplus(
this.$serializeForm(this.formObj)
)
if (result) {
......
......@@ -75,6 +75,9 @@
<div v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</div>
<a v-else-if="item.key==='sampleSn'"
@click.stop="_sampleDetailModal(scope.row)">{{scope.row[item.key]}}</a>
<div v-else-if="item.key==='status'">
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}}
</div>
<div v-else-if="item.key==='progress'">
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}}
</div>
......@@ -89,7 +92,7 @@
</div>
</template>
<script>
import { soilEntrust } from '../../../../api'
import { soilSample } from '../../../../api'
export default {
components: {},
......@@ -107,23 +110,11 @@ export default {
}
],
pageColumns: [
{ title: '样品编号', key: 'sampleSn', width: 180 },
{ title: '样品名称', key: 'sampleName', width: 140 },
{ title: '状态', key: 'progress', width: 110, status: true },
{ title: '存储期限', key: 'endDate', width: 120, date: true },
{ title: '委托单位', key: 'cname', width: 140 },
{ title: '委托名称', key: 'contractName', width: 170 },
{ title: '处置方式', key: 'handleMethod', width: 120 },
{ title: '处理人', key: 'handlePerson', width: 100 },
{ title: '处理时间', key: 'handleTime', width: 120, date: true },
{ title: '处理申请人', key: 'applyer', width: 120 },
{ title: '申请时间', key: 'applyDate', width: 120, date: true },
{ title: '存储位置', key: 'backupPlace', width: 100 },
{ title: '存储条件', key: 'storageCondition', width: 120 },
{ title: '样品数量', key: 'quantity', width: 100 },
{ title: '备样数量', key: 'sampleQuantity', width: 100 },
{ title: '样品备注', key: 'sampleRemark' },
{ title: '委托备注', key: 'contractRemark' }
{ title: '试样编号', key: 'sampleCode' },
{ title: '状态', key: 'status' },
{ title: '包装类型', key: 'samplePack' },
{ title: '制备数量', key: 'quantity' },
{ title: '单位', key: 'unit' }
],
searchOpen: false,
getPage: {},
......@@ -145,7 +136,7 @@ export default {
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await soilEntrust.pageSampleReceive(
const result = await soilSample.pageSurplusHis(
this.$serializeForm(this.formObj)
)
if (result) {
......
......@@ -26,6 +26,7 @@ import MeterAnnualEntrust from '../pages/soil-statistics/annual-entrust/MeterAnn
import ReportAuditIndex from '../pages/soil-report-manage/report-audit/ReportAuditIndex'
import ReportIssueIndex from '../pages/soil-report-manage/report-issue/ReportIssueIndex'
import SampleDisposeIndex from '../pages/soil-sample-manage/sample-dispose/SampleDisposeIndex'
import SurplusDisposeIndex from '../pages/soil-sample-manage/sample-surplus-dispose/SurplusDisposeIndex'
import ClientLocationSearch from '../pages/soil-statistics/client_location/ClientLocationIndex'
import Blank from '~/pages/blank'
export default [
......@@ -85,6 +86,11 @@ export default [
meta: { title: '样品处理' }
},
{
path: 'surplus_dispose',
component: SurplusDisposeIndex,
meta: { title: '余样处理审批' }
},
{
path: 'receive_location',
component: AddressManage,
meta: { title: '收样位置管理' }
......
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