Commit 02c0fdf1 by lichengming

修改了余样管理

parent f43c1f81
...@@ -42,5 +42,8 @@ export default { ...@@ -42,5 +42,8 @@ export default {
'&reason=' + '&reason=' +
data.remark 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' ...@@ -129,7 +129,7 @@ import AutoCompletes from '../../../../components/base/AutoCompletes'
import SampleParpareApply from '../SampleParpareApply' import SampleParpareApply from '../SampleParpareApply'
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import http from '../../../../api/http' import http from '../../../../api/http'
import { soilEntrust } from '../../../../api' import { soilEntrust, soilSample } from '../../../../api'
export default { export default {
components: { components: {
AutoCompletes, AutoCompletes,
...@@ -152,6 +152,11 @@ export default { ...@@ -152,6 +152,11 @@ export default {
}, },
{ {
type: 'primary', type: 'primary',
id: '',
name: '处理备样申请'
},
{
type: 'primary',
id: 'food-sample-preparation-his-all', id: 'food-sample-preparation-his-all',
name: '制备' name: '制备'
}, },
...@@ -182,6 +187,7 @@ export default { ...@@ -182,6 +187,7 @@ export default {
{ title: '委托商', key: 'client', width: 180 }, { title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 180 }, { title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '试样编号', key: 'sampleCode', width: 180 }, { title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '状态', key: 'status', width: 160 },
{ title: '试样深度', key: 'sampleDepth', width: 180 }, { title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '样品包装类型', key: 'samplePack', width: 180 }, { title: '样品包装类型', key: 'samplePack', width: 180 },
{ title: '现场编号', key: 'siteNo', width: 180 }, { title: '现场编号', key: 'siteNo', width: 180 },
...@@ -191,8 +197,7 @@ export default { ...@@ -191,8 +197,7 @@ export default {
{ title: '备样人', key: 'backupUser', width: 140 }, { title: '备样人', key: 'backupUser', width: 140 },
{ title: '钻孔位置', key: 'boreholeLocation', width: 110 }, { title: '钻孔位置', key: 'boreholeLocation', width: 110 },
{ title: '钻孔名称', key: 'boreholeName', width: 160 }, { title: '钻孔名称', key: 'boreholeName', width: 160 },
{ title: '水深(米)', key: 'waterDepth', width: 160 }, { title: '水深(米)', key: 'waterDepth', width: 160 }
{ title: '状态', key: 'status', width: 160 }
// { title: '备份开始日期', key: 'startTime', width: 170 }, // { title: '备份开始日期', key: 'startTime', width: 170 },
// { title: '备份结束日期', key: 'endTime', width: 170 } // { title: '备份结束日期', key: 'endTime', width: 170 }
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */ /* {title: '处置方式', key: 'handleMethod', width: 120,}, */
...@@ -378,6 +383,9 @@ export default { ...@@ -378,6 +383,9 @@ export default {
case '申请处理': case '申请处理':
this._applyDispose() this._applyDispose()
break break
case '处理备样申请':
this._handleApply()
break
case '制备': case '制备':
this._preMethod() this._preMethod()
break break
...@@ -405,6 +413,29 @@ export default { ...@@ -405,6 +413,29 @@ export default {
break 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() { _applyDispose() {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$Message.warning('请选择一条或多条数据!') this.$Message.warning('请选择一条或多条数据!')
......
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
</Row> </Row>
</div> </div>
</div> </div>
<SampleParpareApply ref="applyModal" @on-result-change="_page"></SampleParpareApply>
</div> </div>
</template> </template>
<script> <script>
...@@ -113,9 +114,11 @@ import AutoCompletes from '../../../../components/base/AutoCompletes' ...@@ -113,9 +114,11 @@ import AutoCompletes from '../../../../components/base/AutoCompletes'
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import http from '../../../../api/http' import http from '../../../../api/http'
import { soilEntrust } from '../../../../api' import { soilEntrust } from '../../../../api'
import SampleParpareApply from '../../backups-manage/SampleParpareApply'
export default { export default {
components: { components: {
AutoCompletes AutoCompletes,
SampleParpareApply
}, },
data() { data() {
return { return {
...@@ -129,6 +132,16 @@ export default { ...@@ -129,6 +132,16 @@ export default {
btn: [ btn: [
{ {
type: 'primary', type: 'primary',
id: '',
name: '申请处理'
},
{
type: 'primary',
id: '',
name: '处理备样申请'
},
{
type: 'primary',
id: 'food-sample-preparation-his-all', id: 'food-sample-preparation-his-all',
name: '制备' name: '制备'
}, },
...@@ -159,6 +172,7 @@ export default { ...@@ -159,6 +172,7 @@ export default {
{ title: '委托商', key: 'client', width: 180 }, { title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 180 }, { title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '试样编号', key: 'sampleCode', width: 180 }, { title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '状态', key: 'status', width: 160 },
{ title: '试样深度', key: 'sampleDepth', width: 180 }, { title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '样品包装类型', key: 'samplePack', width: 180 }, { title: '样品包装类型', key: 'samplePack', width: 180 },
{ title: '现场编号', key: 'siteNo', width: 180 }, { title: '现场编号', key: 'siteNo', width: 180 },
...@@ -168,8 +182,7 @@ export default { ...@@ -168,8 +182,7 @@ export default {
{ title: '备样人', key: 'backupUser', width: 140 }, { title: '备样人', key: 'backupUser', width: 140 },
{ title: '钻孔位置', key: 'boreholeLocation', width: 110 }, { title: '钻孔位置', key: 'boreholeLocation', width: 110 },
{ title: '钻孔名称', key: 'boreholeName', width: 160 }, { title: '钻孔名称', key: 'boreholeName', width: 160 },
{ title: '水深(米)', key: 'waterDepth', width: 160 }, { title: '水深(米)', key: 'waterDepth', width: 160 }
{ title: '状态', key: 'status', width: 160 }
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */ /* {title: '处置方式', key: 'handleMethod', width: 120,}, */
], ],
conditionList: [], conditionList: [],
...@@ -350,6 +363,12 @@ export default { ...@@ -350,6 +363,12 @@ export default {
}, },
_btnClick(msg) { _btnClick(msg) {
switch (msg) { switch (msg) {
case '申请处理':
this._applyDispose()
break
case '处理备样申请':
this._handleApply()
break
case '制备': case '制备':
this._preMethod() this._preMethod()
break break
...@@ -362,9 +381,6 @@ export default { ...@@ -362,9 +381,6 @@ export default {
case '填写存放信息': case '填写存放信息':
this._batchEdit() this._batchEdit()
break break
case '申请处理':
this._handle()
break
case '导出': case '导出':
if (this.getPage.records.length === 0) { if (this.getPage.records.length === 0) {
this.$Message.warning('暂无数据,不可导出') this.$Message.warning('暂无数据,不可导出')
...@@ -380,6 +396,30 @@ export default { ...@@ -380,6 +396,30 @@ export default {
break 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() { _preMethod() {
if (this.selectSampleIds.length === 0) { 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