Commit 345a5659 by wangweidong

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	pages/soil-sample-manage/backups-manage/SampleParpareApply.vue
parents b295744b 02c0fdf1
...@@ -21,5 +21,29 @@ export default { ...@@ -21,5 +21,29 @@ export default {
http.put('soil/v1/receive_location/' + data.id, data.obj).then(res => res), http.put('soil/v1/receive_location/' + data.id, data.obj).then(res => res),
// 试验室领样操作 // 试验室领样操作
takeSample: data => takeSample: data =>
http.post('soil/v1/sample/take_sample?ids=' + data).then(res => res) http.post('soil/v1/sample/take_sample?ids=' + data).then(res => res),
// 备样管理提交申请
appleHandle: data =>
http.post('soil/v1/sample_backup/apply_handle', data).then(res => res),
// 样品处理分页列表
pageBackupHandleCheck: data =>
http
.post('soil/v1/sample_backup/page_backup_handle_check', data)
.then(res => res),
// 样品处理审批通过
disposalOk: data =>
http.post('soil/v1/sample_backup/disposal_ok?ids=' + data).then(res => res),
// 样品处理审批驳回
disposalFail: data =>
http
.post(
'soil/v1/sample_backup/disposal_fail?ids=' +
data.ids +
'&reason=' +
data.remark
)
.then(res => res),
// 备样管理处理备样申请
handleOk: data =>
http.post('soil/v1/sample_backup/handle_ok?ids=' + data).then(res => res)
} }
...@@ -268,7 +268,7 @@ export default { ...@@ -268,7 +268,7 @@ export default {
}, },
_samplePre() { _samplePre() {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$message.warning('至少选择一条数据') this.$Message.warning('至少选择一条数据')
} else { } else {
this.$refs.preModal._open(this.selectIds.join(',')) this.$refs.preModal._open(this.selectIds.join(','))
} }
...@@ -334,9 +334,9 @@ export default { ...@@ -334,9 +334,9 @@ export default {
} }
}, },
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
const selectIds = []
switch (msg) { switch (msg) {
case 'selectData': case 'selectData':
const selectIds = []
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
selectIds.push(data[i].id) selectIds.push(data[i].id)
} }
......
...@@ -25,14 +25,6 @@ ...@@ -25,14 +25,6 @@
</btn-list> </btn-list>
</Col> </Col>
<!--样品数量--> <!--样品数量-->
<Col span="24">
<div style="display: flex;padding-bottom: 10px;">
<div v-for="(item,index) in contList" :key="index" class="reimbursement-item">
<p :class="item.color?item.color:''">{{item.value}}</p>
<p>{{item.name}}</p>
</div>
</div>
</Col>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable <PTVXETable
...@@ -114,16 +106,19 @@ ...@@ -114,16 +106,19 @@
</Row> </Row>
</div> </div>
</div> </div>
<Reason ref="reasonModal" @on-result-change="_reasonResult"></Reason>
</div> </div>
</template> </template>
<script> <script>
import AutoCompletes from '../../../../components/base/AutoCompletes' import AutoCompletes from '../../../../components/base/AutoCompletes'
import Reason from '../../../../components/base/Reason'
// 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 { soilSample } from '../../../../api'
export default { export default {
components: { components: {
AutoCompletes AutoCompletes,
Reason
}, },
data() { data() {
return { return {
...@@ -137,6 +132,16 @@ export default { ...@@ -137,6 +132,16 @@ export default {
btn: [ btn: [
{ {
type: 'primary', type: 'primary',
id: '',
name: '完成处理'
},
{
type: '',
id: '',
name: '驳回'
},
{
type: 'primary',
id: 'food-sample-preparation-his-all', id: 'food-sample-preparation-his-all',
name: '制备' name: '制备'
}, },
...@@ -358,6 +363,12 @@ export default { ...@@ -358,6 +363,12 @@ export default {
}, },
_btnClick(msg) { _btnClick(msg) {
switch (msg) { switch (msg) {
case '完成处理':
this._dispose()
break
case '驳回':
this._disposeBack()
break
case '制备': case '制备':
this._preMethod() this._preMethod()
break break
...@@ -388,6 +399,54 @@ export default { ...@@ -388,6 +399,54 @@ export default {
break break
} }
}, },
// 通过
_dispose() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定通过这 ' + this.selectIds.length + ' 条数据?',
onOk: () => {
this._disposeOk(this.selectIds.join(','))
}
})
}
},
_disposeBack() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条委托!')
} else {
this.$refs.reasonModal._open('退回原因')
}
},
_reasonResult(data) {
if (undefined !== data && data !== '') {
this._reportCheckBack(data)
}
},
_reportCheckBack: async function(data) {
const result = await soilSample.disposalFail({
ids: this.selectIds,
remark: data
})
if (result) {
this.$Message.success('退回成功!')
console.log('退回成功')
await this._page()
}
},
_disposeOk: async function(ids) {
const result = await soilSample.disposalOk(ids)
if (result) {
this._resultChange('提交成功')
}
},
_resultChange(msg) {
this.$Message.success(msg)
this._page()
},
// 制备 // 制备
_preMethod() { _preMethod() {
if (this.selectSampleIds.length === 0) { if (this.selectSampleIds.length === 0) {
...@@ -530,8 +589,7 @@ export default { ...@@ -530,8 +589,7 @@ export default {
_page: async function() { _page: async function() {
this.editIndex = -1 this.editIndex = -1
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj) const result = await soilSample.pageBackupHandleCheck(
const result = await soilEntrust.pageBackup(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
...@@ -25,14 +25,6 @@ ...@@ -25,14 +25,6 @@
</btn-list> </btn-list>
</Col> </Col>
<!--样品数量--> <!--样品数量-->
<Col span="24">
<div style="display: flex;padding-bottom: 10px;">
<div v-for="(item,index) in contList" :key="index" class="reimbursement-item">
<p :class="item.color?item.color:''">{{item.value}}</p>
<p>{{item.name}}</p>
</div>
</div>
</Col>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable <PTVXETable
...@@ -114,6 +106,7 @@ ...@@ -114,6 +106,7 @@
</Row> </Row>
</div> </div>
</div> </div>
<SampleParpareApply ref="applyModal" @on-result-change="_page"></SampleParpareApply>
</div> </div>
</template> </template>
<script> <script>
...@@ -121,9 +114,11 @@ import AutoCompletes from '../../../../components/base/AutoCompletes' ...@@ -121,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 {
...@@ -137,6 +132,16 @@ export default { ...@@ -137,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: '制备'
}, },
...@@ -167,6 +172,7 @@ export default { ...@@ -167,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 },
...@@ -176,8 +182,7 @@ export default { ...@@ -176,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: [],
...@@ -358,6 +363,12 @@ export default { ...@@ -358,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
...@@ -370,9 +381,6 @@ export default { ...@@ -370,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('暂无数据,不可导出')
...@@ -388,6 +396,30 @@ export default { ...@@ -388,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) {
......
...@@ -10,6 +10,7 @@ import elementTable from '../components/table/elementTable' ...@@ -10,6 +10,7 @@ import elementTable from '../components/table/elementTable'
import modalFooter from '../components/base/modalFooter' import modalFooter from '../components/base/modalFooter'
import PTVXETable from '../components/table/PTVXETable' import PTVXETable from '../components/table/PTVXETable'
import PTVXETableHeight from '../components/table/PTVXETableHeight' import PTVXETableHeight from '../components/table/PTVXETableHeight'
import PTVXETableTemp from '../components/table/PTVXETableTemp'
import PTVXETableData from '../components/base/PTVXETableData' import PTVXETableData from '../components/base/PTVXETableData'
import VXEIconList from '../components/base/VXEIconList' import VXEIconList from '../components/base/VXEIconList'
import FileManage from '../components/file/file-manage/FileManage' import FileManage from '../components/file/file-manage/FileManage'
...@@ -26,6 +27,7 @@ Vue.component('element-table-height', elementTableHeight) ...@@ -26,6 +27,7 @@ Vue.component('element-table-height', elementTableHeight)
Vue.component('modal-footer', modalFooter) Vue.component('modal-footer', modalFooter)
Vue.component('PTVXETable', PTVXETable) Vue.component('PTVXETable', PTVXETable)
Vue.component('PTVXETableHeight', PTVXETableHeight) Vue.component('PTVXETableHeight', PTVXETableHeight)
Vue.component('PTVXETableTemp', PTVXETableTemp)
Vue.component('PTVXETableData', PTVXETableData) Vue.component('PTVXETableData', PTVXETableData)
Vue.component('VXEIconList', VXEIconList) Vue.component('VXEIconList', VXEIconList)
Vue.component('VXESettingCol', VXESettingCol) Vue.component('VXESettingCol', VXESettingCol)
......
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