Commit 02c0fdf1 by lichengming

修改了余样管理

parent f43c1f81
......@@ -42,5 +42,8 @@ export default {
'&reason=' +
data.remark
)
.then(res => res)
.then(res => res),
// 备样管理处理备样申请
handleOk: data =>
http.post('soil/v1/sample_backup/handle_ok?ids=' + data).then(res => res)
}
......@@ -129,7 +129,7 @@ import AutoCompletes from '../../../../components/base/AutoCompletes'
import SampleParpareApply from '../SampleParpareApply'
// eslint-disable-next-line no-unused-vars
import http from '../../../../api/http'
import { soilEntrust } from '../../../../api'
import { soilEntrust, soilSample } from '../../../../api'
export default {
components: {
AutoCompletes,
......@@ -152,6 +152,11 @@ export default {
},
{
type: 'primary',
id: '',
name: '处理备样申请'
},
{
type: 'primary',
id: 'food-sample-preparation-his-all',
name: '制备'
},
......@@ -182,6 +187,7 @@ export default {
{ 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 },
......@@ -191,8 +197,7 @@ export default {
{ title: '备样人', key: 'backupUser', width: 140 },
{ title: '钻孔位置', key: 'boreholeLocation', width: 110 },
{ title: '钻孔名称', key: 'boreholeName', width: 160 },
{ title: '水深(米)', key: 'waterDepth', width: 160 },
{ title: '状态', key: 'status', width: 160 }
{ title: '水深(米)', key: 'waterDepth', width: 160 }
// { title: '备份开始日期', key: 'startTime', width: 170 },
// { title: '备份结束日期', key: 'endTime', width: 170 }
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
......@@ -378,6 +383,9 @@ export default {
case '申请处理':
this._applyDispose()
break
case '处理备样申请':
this._handleApply()
break
case '制备':
this._preMethod()
break
......@@ -405,6 +413,29 @@ export default {
break
}
},
_handleApply() {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择一条或多条数据!')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定处理这 ' + this.selectIds.length + ' 条数据?',
onOk: () => {
this._handleOk(this.selectIds.join(','))
}
})
}
},
_handleOk: async function() {
const result = await soilSample.handleOk(this.selectIds.join(','))
if (result) {
this._resultChange('提交成功')
}
},
_resultChange(msg) {
this.$Message.success(msg)
this._page()
},
_applyDispose() {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择一条或多条数据!')
......
......@@ -106,6 +106,7 @@
</Row>
</div>
</div>
<SampleParpareApply ref="applyModal" @on-result-change="_page"></SampleParpareApply>
</div>
</template>
<script>
......@@ -113,9 +114,11 @@ 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'
export default {
components: {
AutoCompletes
AutoCompletes,
SampleParpareApply
},
data() {
return {
......@@ -129,6 +132,16 @@ export default {
btn: [
{
type: 'primary',
id: '',
name: '申请处理'
},
{
type: 'primary',
id: '',
name: '处理备样申请'
},
{
type: 'primary',
id: 'food-sample-preparation-his-all',
name: '制备'
},
......@@ -159,6 +172,7 @@ export default {
{ 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 },
......@@ -168,8 +182,7 @@ export default {
{ title: '备样人', key: 'backupUser', width: 140 },
{ title: '钻孔位置', key: 'boreholeLocation', width: 110 },
{ title: '钻孔名称', key: 'boreholeName', width: 160 },
{ title: '水深(米)', key: 'waterDepth', width: 160 },
{ title: '状态', key: 'status', width: 160 }
{ title: '水深(米)', key: 'waterDepth', width: 160 }
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
],
conditionList: [],
......@@ -350,6 +363,12 @@ export default {
},
_btnClick(msg) {
switch (msg) {
case '申请处理':
this._applyDispose()
break
case '处理备样申请':
this._handleApply()
break
case '制备':
this._preMethod()
break
......@@ -362,9 +381,6 @@ export default {
case '填写存放信息':
this._batchEdit()
break
case '申请处理':
this._handle()
break
case '导出':
if (this.getPage.records.length === 0) {
this.$Message.warning('暂无数据,不可导出')
......@@ -380,6 +396,30 @@ export default {
break
}
},
_resultChange(msg) {
this.$Message.success(msg)
this._page()
},
_applyDispose() {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择一条或多条数据!')
} else {
this.$refs.applyModal._open(this.selectIds)
}
},
_handleApply() {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择一条或多条数据!')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定处理这 ' + this.selectIds.length + ' 条数据?',
onOk: () => {
this._handleOk(this.selectIds.join(','))
}
})
}
},
// 制备
_preMethod() {
if (this.selectSampleIds.length === 0) {
......
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