Commit fc4c977d by zhangmengqi

Merge branch 'dev'

parents 296c3db7 11926d54
......@@ -114,10 +114,12 @@ export default {
.get('soil/v1/sample_photo/view?objectKey=' + data.objectKey)
.then(res => res),
// 试样制备表
// preparePage: data =>
// http
// .post('soil/v1/sample/obtain_prepare_data?ids=' + data)
// .then(res => res),
preparePage: data =>
http
.post('soil/v1/sample/obtain_prepare_data?ids=' + data)
.then(res => res),
http.post('soil/v1/sample/obtain_prepare_data', data).then(res => res),
// 试样制备完成
savePrepare: data =>
......
......@@ -27,7 +27,7 @@ export default {
http.put('soil/v1/receive_location/' + data.id, data.obj).then(res => res),
// 试验室领样操作
takeSample: data =>
http.post('soil/v1/sample/take_sample?ids=' + data).then(res => res),
http.post('soil/v1/sample/take_sample', data).then(res => res),
// 备样历史分页列表
pageBackupHis: data =>
http.post('soil/v1/sample_backup/page_backup_his', data).then(res => res),
......@@ -45,20 +45,13 @@ export default {
.then(res => res),
// 样品处理审批通过
disposalOk: data =>
http.post('soil/v1/sample_backup/disposal_ok?ids=' + data).then(res => res),
http.post('soil/v1/sample_backup/disposal_ok', data).then(res => res),
// 样品处理审批驳回
disposalFail: data =>
http
.post(
'soil/v1/sample_backup/disposal_fail?ids=' +
data.ids +
'&reason=' +
data.remark
)
.then(res => res),
http.post('soil/v1/sample_backup/disposal_fail', data).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', data).then(res => res),
pageSurplus: data =>
http.post('soil/v1/prepare/page_surplus', data).then(res => res),
// 余样处理审批分页列表
......@@ -71,20 +64,13 @@ export default {
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),
http.post('soil/v1/prepare/handle_ok', data).then(res => res),
// 余品处理审批通过
surplusDisposalOk: data =>
http.post('soil/v1/prepare/disposal_ok?ids=' + data).then(res => res),
http.post('soil/v1/prepare/disposal_ok', data).then(res => res),
// 余样处理审批驳回
surplueDisposalFail: data =>
http
.post(
'soil/v1/prepare/disposal_fail?ids=' +
data.ids +
'&reason=' +
data.remark
)
.then(res => res),
http.post('soil/v1/prepare/disposal_fail', data).then(res => res),
// 余样样品历史分页列表
pageSurplusHis: data =>
http.post('soil/v1/prepare/page_surplus_his', data).then(res => res),
......@@ -138,12 +124,16 @@ export default {
http.post('res/v1/dict/dict_query?type=' + data).then(res => res),
editBackup: data =>
http.put('soil/v1/sample_backup/' + data.id, data.obj).then(res => res),
// bathUpdateBackupInfo: data =>
// http
// .post(
// 'soil/v1/sample_backup/bath_update_backup_info/?ids=' + data.id,
// data.obj
// )
// .then(res => res),
bathUpdateBackupInfo: data =>
http
.post(
'soil/v1/sample_backup/bath_update_backup_info/?ids=' + data.id,
data.obj
)
.post('soil/v1/sample_backup/bath_update_backup_info/', data)
.then(res => res),
editItem: data =>
http.post('soil/v1/experiment/bath_update_info', data).then(res => res),
......@@ -153,10 +143,7 @@ export default {
// 批量填写余样信息
bathUpdateSurplusInfo: data =>
http
.post(
'soil/v1/prepare/bath_update_surplus_info/?ids=' + data.id,
data.obj
)
.post('soil/v1/prepare/bath_update_surplus_info/', data)
.then(res => res),
getUserList: data => http.post('/base/v1/user/page').then(res => res),
scanTakeSample: data =>
......@@ -166,14 +153,7 @@ export default {
pageLocationSample: data =>
http.post('soil/v1/sample/page_location_sample', data).then(res => res),
importExperiments: data =>
http
.post(
'soil/v1/experiment/import_experiments?aptitudeIds=' +
data.aptitudeIds +
'&ids=' +
data.ids
)
.then(res => res),
http.post('soil/v1/experiment/import_experiments', data).then(res => res),
pageSecondary: data =>
http.post('soil/v1/prepare/page_secondary', data).then(res => res),
pageSecondaryHis: data =>
......@@ -182,17 +162,19 @@ export default {
http.delete('soil/v1/sample/?ids=' + data).then(res => res),
// 制备审核通过
prepareCheckOk: data =>
http.post('soil/v1/sample/prepare_check_ok?ids=' + data).then(res => res),
http.post('soil/v1/sample/prepare_check_ok', data).then(res => res),
// 制备审核驳回
// prepareCheckBack: data =>
// http
// .post(
// 'soil/v1/sample/prepare_check_back?ids=' +
// data.ids +
// '&remark=' +
// data.remark
// )
// .then(res => res),
prepareCheckBack: data =>
http
.post(
'soil/v1/sample/prepare_check_back?ids=' +
data.ids +
'&remark=' +
data.remark
)
.then(res => res),
http.post('soil/v1/sample/prepare_check_back', data).then(res => res),
sampleBringOut: data =>
http.post('soil/v1/sample/sample_bring_out?ids=' + data).then(res => res),
boxPage: data => http.post('soil/v1/box/page', data).then(res => res),
......@@ -201,14 +183,18 @@ export default {
editBox: data =>
http.put('soil/v1/box/' + data.id, data.obj).then(res => res),
getByIdBox: data => http.get('soil/v1/box/' + data).then(res => res),
// saveExcelOriginalRecord: data =>
// http
// .post(
// 'soil/v1/experiment/save_excel_original_record?ids=' +
// data.ids +
// '&templateId=' +
// data.id
// )
// .then(res => res),
saveExcelOriginalRecord: data =>
http
.post(
'soil/v1/experiment/save_excel_original_record?ids=' +
data.ids +
'&templateId=' +
data.id
)
.post('soil/v1/experiment/save_excel_original_record', data)
.then(res => res),
saveExcelExpReport: data =>
http
......
......@@ -93,14 +93,17 @@ export default {
itemEdit: data =>
http.put('soil/v1/item/' + data.id, data.obj).then(res => res),
itemGetById: data => http.get('soil/v1/item/' + data).then(res => res),
itemDelete: data => http.delete('soil/v1/item/?ids=' + data).then(res => res),
endExp: data =>
http.post('soil/v1/experiment/end_exp?ids=' + data).then(res => res),
endExpIds: data =>
http.post('soil/v1/experiment/end_exp', data).then(res => res),
pageExpCheck: data =>
http.post('soil/v1/entrust/page_exp_check', data).then(res => res),
endExpCheck: data =>
http.post('soil/v1/experiment/end_exp_check?ids=' + data).then(res => res),
http.post('soil/v1/experiment/end_exp_check', data).then(res => res),
endExpAudit: data =>
http.post('soil/v1/experiment/end_exp_audit?ids=' + data).then(res => res),
http.post('soil/v1/experiment/end_exp_audit', data).then(res => res),
pageCheckByExp: data =>
http.post('soil/v1/experiment/page_check_by_exp', data).then(res => res),
pageExpByCheck: data =>
......@@ -112,23 +115,9 @@ export default {
pageExpByAudit: data =>
http.post('soil/v1/experiment/page_exp_audit', data).then(res => res),
auditBack: data =>
http
.post(
'soil/v1/experiment/exp_audit_back?ids=' +
data.ids +
'&remark=' +
data.remark
)
.then(res => res),
http.post('soil/v1/experiment/exp_audit_back', data).then(res => res),
checkBack: data =>
http
.post(
'soil/v1/experiment/exp_check_back?ids=' +
data.ids +
'&remark=' +
data.remark
)
.then(res => res),
http.post('soil/v1/experiment/exp_check_back', data).then(res => res),
// 添加设备信息
addExpEquip: data =>
https
......
......@@ -59,14 +59,14 @@
/>
</Form-item>
<Form-item label="是否是项目指标" prop="itemed" class="width-48">
<el-select v-model="formObj.itemed" @change="_optionChange" placeholder="请选择">
<el-option
<Select v-model="formObj.itemed" @change="_optionChange" placeholder="请选择">
<Option
v-for="(item,index) in options"
:key="index"
:label="item.value"
:value="index"
/>
</el-select>
</Select>
</Form-item>
<Form-item label="单位" prop="unit" class="width-48">
<Input v-model="formObj.unit" name="unit"
......
......@@ -54,6 +54,11 @@
placeholder="请输入模板样品数"
/>
</Form-item>
<Form-item label="多sheet模板" prop="moreSheet" style="width: 100%">
<Radio-group v-model="formObj.moreSheet">
<Radio v-for="item in sheetType" :key="item.value" :label="item.value">{{item.name}}</Radio>
</Radio-group>
</Form-item>
</Form>
</div>
<div slot="footer" class="btn-width clearfix">
......@@ -96,6 +101,7 @@ const defVal = {
sampleBeginCol: '',
sampleMergerNum: '',
templateSampleNum: '',
moreSheet: 0,
classifyId: 0
}
......@@ -173,6 +179,7 @@ export default {
{ required: true, message: '类别不能为空', trigger: 'blur' }
]
},
sheetType: [{ value: 1, name: '是' }, { value: 0, name: '否' }],
typeList: [
{
value: '力学'
......@@ -257,6 +264,7 @@ export default {
this.formObj.sampleBeginCol = data.sampleBeginCol
this.formObj.sampleMergerNum = data.sampleMergerNum
this.formObj.templateSampleNum = data.templateSampleNum
this.formObj.moreSheet = data.moreSheet
this.modalTitle = '编辑模板'
console.log(this.id)
},
......
<template>
<div>
<Modal v-model="showModal" v-drag width="1200">
<Modal v-model="showModal" @on-visible-change="_visibleChange" v-drag width="1200">
<p slot="header">
{{ modalTitle }}
</p>
......@@ -615,6 +615,9 @@ export default {
_operationRecord(id) {
// 操作日志
this.$refs.recordModal._open(id)
},
_visibleChange(data) {
this.$emit('on-result-change')
}
}
}
......
......@@ -40,7 +40,8 @@
<Input :value="scope.row.describeDetail" @change.native="_inputChange($event.target.value,scope.row)"></Input>
</div>
<div v-else-if="item.key==='remark'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.remark" @change="_remarkChange(scope.row)"></el-input>
<Input :value="scope.row.remark" @change.native="_remarkChange($event.target.value,scope.row)"></Input>
<!-- <Input v-model="scope.row.remark" @change="_remarkChange(scope.row)"></Input>-->
</div>
</template>
<template slot-scope="scope">
......@@ -170,10 +171,11 @@ export default {
}
},
_remarkChange: async function(info) {
_remarkChange: async function(info, data) {
this.getPage.records[data.index].remark = info
const result = await soilEntrust.sampleRemarkEdit({
id: info.id,
remark: info.remark
id: data.id,
remark: info
})
if (result) {
// this._resultChange('修改成功')
......
......@@ -148,7 +148,8 @@ export default {
this.$refs.formObj.validate(valid => {
if (valid) {
const data = this.$serializeForm(this.formObj)
this._saveInfo({ id: this.ids.join(','), obj: data })
data.ids = this.ids.join(',')
this._saveInfo(data)
} else {
this.$Message.error('表单验证失败!')
this.$refs.footerModal._hideLoading()
......
......@@ -491,7 +491,9 @@ export default {
}
},
_handleOk: async function() {
const result = await soilSample.handleOk(this.selectIds.join(','))
const result = await soilSample.handleOk({
ids: this.selectIds.join(',')
})
if (result) {
this._resultChange('提交成功')
}
......
......@@ -371,8 +371,8 @@ export default {
},
_reportCheckBack: async function(data) {
const result = await soilSample.disposalFail({
ids: this.selectIds,
remark: data
ids: this.selectIds.join(','),
reason: data
})
if (result) {
......@@ -382,7 +382,7 @@ export default {
}
},
_disposeOk: async function(ids) {
const result = await soilSample.disposalOk(ids)
const result = await soilSample.disposalOk({ ids: ids })
if (result) {
this._resultChange('提交成功')
}
......
......@@ -104,7 +104,7 @@ export default {
},
_ok: async function() {
const result = await soilSample.importExperiments({
aptitudeIds: this.addIds,
aptitudeIds: this.addIds.join(','),
ids: this.sampleId
})
if (result) {
......
......@@ -264,7 +264,7 @@ export default {
},
_reportCheckBack: async function(data) {
const result = await soilSample.prepareCheckBack({
ids: this.selectIds,
ids: this.selectIds.join(','),
remark: data
})
......@@ -289,7 +289,9 @@ export default {
}
},
_passPrepare: async function() {
const result = await soilSample.prepareCheckOk(this.selectIds.join(','))
const result = await soilSample.prepareCheckOk({
ids: this.selectIds.join(',')
})
if (result) {
this.$Message.success('审核通过')
this._page()
......
......@@ -103,8 +103,9 @@ export default {
}
},
_ok: async function() {
console.log('导入检测项目')
const result = await soilSample.importExperiments({
aptitudeIds: this.addIds,
aptitudeIds: this.addIds.join(','),
ids: this.sampleId
})
if (result) {
......
......@@ -40,7 +40,7 @@
</el-input>
</div>
<div v-else-if="item.key==='unit'" @click="_handleRow(scope)">
<el-input v-model="scope.row.unit" name="unit" placeholder="输入或选择单位">
<el-input v-model="scope.row.unit" name="unit" placeholder="输入单位">
</el-input>
</div>
<div v-else-if="item.key==='quantity'" @click="_handleRow(scope)">
......@@ -51,12 +51,12 @@
<div v-else-if="item.key==='keepWay'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.keepWay" :handle-obj="scope" :down-data="saveWayData"
@on-result-change="_saveChange" clearable
placeholder="输入或选择保存方式" show-key="name"></AutoComplete>
placeholder="输入或选择保存方式"></AutoComplete>
</div>
<div v-else-if="item.key==='keepContainer'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.keepContainer" :handle-obj="scope" :down-data="packList"
@on-result-change="_packSaveChange" clearable
placeholder="输入或选择保存容器" show-key="name"></AutoComplete>
placeholder="输入或选择保存容器"></AutoComplete>
</div>
<!-- <div v-else-if="item.key==='prepareDate'" @click="_handleTimeRow(scope)">-->
<!-- <el-date-picker-->
......@@ -69,9 +69,14 @@
<el-date-picker v-model="scope.row.prepareDate" @change="timeChange(scope.row)" type="datetime" format="yyyy-MM-dd HH:mm" style="width:100%;"
placeholder="请选择日期"></el-date-picker>
</div>
<!-- <div v-else-if="item.key==='preparer'" @click="_handleRow(scope)">-->
<!-- <el-input v-model="scope.row.preparer" @focus="_handleRow(scope)"-->
<!-- placeholder="制备人" size="small" name="preparer"></el-input>-->
<!-- </div>-->
<div v-else-if="item.key==='preparer'" @click="_handleRow(scope)">
<el-input v-model="scope.row.preparer" @focus="_handleRow(scope)"
placeholder="制备人" size="small" name="preparer"></el-input>
<AutoComplete v-model="scope.row.preparer" :handle-obj="scope" :down-data="preparerList"
@on-result-change="_preparerChange" clearable
placeholder="制备人"></AutoComplete>
</div>
<div v-else-if="item.key==='remark'" @click="_handleRow(scope)">
<el-input v-model="scope.row.remark" @focus="_handleRow(scope)" placeholder="备注"
......@@ -112,7 +117,7 @@
<script>
import AutoComplete from '../../../components/base/AutoCompletes'
import { soilEntrust } from '../../../api'
import { soilEntrust, soilSample } from '../../../api'
import { getLodop } from '../../../plugins/clodop/LodopFuncs'
// eslint-disable-next-line no-unused-vars
import downloadPlugin from '../../../plugins/download/downloadPlugin'
......@@ -195,6 +200,7 @@ export default {
preparationWayData: [],
resultStateWayData: [],
saveWayData: [],
preparerList: [],
sampleIds: '',
unitData: [],
......@@ -251,35 +257,22 @@ export default {
}
},
// 多个参数查询
_dicSearch() {
const data = [
'制备单位',
'制备方式',
'制备后状态',
'保存方式',
'制备保存容器',
'制备时间是否精确至时分'
]
this.$store.dispatch('LmsBaseDict/listDict', data).then(() => {
const result = this.$store.state.LmsBaseDict.list
// 0-数据录入常用单位
for (let j = 0; j < result[0].length; j++) {
this.unitData.push(result[0][j].name)
}
// 1-制备方式
for (let j = 0; j < result[1].length; j++) {
this.preparationWayData.push(result[1][j].name)
this.wayData.set(result[1][j].name, result[1][j].code)
// _dicSearch: async function() {
// const data = ['制备方式', '保存方式', '保存容器']
// const result = await soilSample.getDictList(data)
// if (result) {
// this.keepWayList = result
// }
// },
_getUserList: async function() {
const result = await soilSample.getUserList()
if (result) {
console.log('result==============', result)
for (let i = 0; i < result.records.length; i++) {
this.preparerList.push(result.records[i].realname)
}
// 2-制备后状态
this.resultStateWayData = result[2]
// 3-保存方式
this.saveWayData = result[3]
// 4-制备保存容器
this.packList = result[4]
// 5-制备时间是否精确至时分
this.isAccurate = result[5][0].name
})
console.log(this.preparerList)
}
},
backData(data) {
this.$forceUpdate()
......@@ -291,6 +284,7 @@ export default {
console.log('合并后', this.selectData)
},
_preparationChange(msg, data, handleObj) {
console.log('data', data)
this._handleRow(handleObj)
this.currentRow.prepareWay = data
},
......@@ -299,8 +293,13 @@ export default {
this.currentRow.resultState = data.name
},
_saveChange(msg, data, handleObj) {
console.log('data', data)
this._handleRow(handleObj)
this.currentRow.keepWay = data
},
_preparerChange(msg, data, handleObj) {
this._handleRow(handleObj)
this.currentRow.keepWay = data.name
this.currentRow.preparer = data
},
timeChange(data) {
console.log(data)
......@@ -309,16 +308,20 @@ export default {
console.log(this.getPage.records)
},
_packSaveChange(msg, data, handleObj) {
console.log('data', data)
this._handleRow(handleObj)
this.currentRow.keepContainer = data.name
this.currentRow.keepContainer = data
},
_open(sampleIds) {
this.$refs.pageTable._showLoading()
this.sampleIds = sampleIds
console.log(this.sampleIds)
this.showModal = true
this.getPage.records = []
this.preparationWayData = []
this.saveWayData = []
this.packList = []
this.unitData = []
this.preparerList = []
this.footerList = []
for (let i = 0; i < this.list.length; i++) {
if (this.$showBtn(this.list[i].id)) {
......@@ -326,22 +329,47 @@ export default {
}
}
this._page()
// this._dicSearch()
this._getPrepareWay()
this._getkeepWayList()
this._getkeepContainerList()
this._getUserList()
},
_page: async function() {
const result = await soilEntrust.preparePage(this.sampleIds)
const result = await soilEntrust.preparePage({ ids: this.sampleIds })
if (result) {
console.log(result)
this.getPage.records = result
for (let j = 0; j < result.length; j++) {
console.log(result[j].prepareDate)
console.log(new Date(result[j].prepareDate))
this.getPage.records[j].prepareDate = new Date(result[j].prepareDate)
this.getPage.records[j].printNum = 1
}
this.$refs.pageTable._hideLoading()
}
},
_getPrepareWay: async function() {
const result = await soilSample.getDictList('制备方式')
if (result) {
for (let i = 0; i < result.length; i++) {
this.preparationWayData.push(result[i].name)
}
}
},
_getkeepWayList: async function() {
const result = await soilSample.getDictList('保存方式')
if (result) {
for (let i = 0; i < result.length; i++) {
this.saveWayData.push(result[i].name)
}
console.log(this.saveWayData)
}
},
_getkeepContainerList: async function() {
const result = await soilSample.getDictList('保存容器')
if (result) {
for (let j = 0; j < result.length; j++) {
this.packList.push(result[j].name)
}
}
},
_footerResult(name) {
switch (name) {
case '取消':
......@@ -360,28 +388,32 @@ export default {
this._hideLoading()
},
_ok() {
console.log(this.getPage.records)
this.$refs.pageTable._showLoading()
const prepareList = []
for (let i = 0; i < this.getPage.records.length; i++) {
prepareList.push(this.getPage.records[i])
}
if (prepareList.length === 0) {
this.$Message.warning('制备数据不能为空')
this.$refs.pageTable._hideLoading()
this._hideLoading()
return false
}
this.save({ prepareList: prepareList })
},
save: async function(data) {
this.$refs.pageTable._showLoading()
const result = await soilEntrust.savePrepare(data)
console.log(result)
this._resultChange('制备成功')
if (result) {
this._resultChange('制备成功')
}
},
_resultChange(msg) {
this.showModal = false
this.$Message.success(msg)
this.$emit('on-result-change')
this._hideLoading()
this.$refs.pageTable._hideLoading()
},
_hideLoading() {
this.$refs.footerModal._hideLoading()
......
......@@ -119,15 +119,17 @@ export default {
{ key: 'detectType', name: '样品类别', placeholder: '请输入样品类别' }
],
btn: [
{ type: 'success', id: '', name: '填写原始记录' },
{
type: 'success',
id: 'sample-preparation-write-record',
name: '填写原始记录'
},
{ type: 'success', id: '', name: '原始记录填写' },
{ type: 'success', id: '', name: '完成提交' },
{ type: 'success', id: '', name: '设备' }
],
btnPro: [
{ type: 'success', id: '', name: '填写原始记录' },
{ type: 'success', id: '', name: '设备' },
{ type: 'success', id: '', name: '完成提交' }
{ type: 'success', id: '', name: '设备' }
],
iconMsg: [
{ type: 'ios-book', id: '', name: '查看原始记录' },
......@@ -472,7 +474,10 @@ export default {
console.log(this.selectIds)
console.log('----dddd---', data)
this.$refs.pageTable._hideLoading()
const result = await soilSample.generateExcelReport(data)
const result = await soilSample.saveExcelOriginalRecord({
ids: this.selectIds.join(','),
templateId: data.id
})
if (result) {
await this._page()
if (result === null || result === undefined) {
......
......@@ -361,8 +361,8 @@ export default {
},
_importItemOk: async function(ids) {
const result = await soilSample.importExperiments({
aptitudeIds: ids,
ids: this.selectIds
aptitudeIds: ids.join(','),
ids: this.selectIds.join(',')
})
if (result) {
this.$Message.success('导入成功')
......
......@@ -340,8 +340,8 @@ export default {
},
_reportCheckBack: async function(data) {
const result = await soilSample.surplueDisposalFail({
ids: this.selectIds,
remark: data
ids: this.selectIds.join(','),
reason: data
})
if (result) {
......@@ -351,7 +351,7 @@ export default {
}
},
_disposeOk: async function(ids) {
const result = await soilSample.surplusDisposalOk(ids)
const result = await soilSample.surplusDisposalOk({ ids: ids })
if (result) {
this._resultChange('提交成功')
}
......
......@@ -276,7 +276,7 @@ export default {
}
},
_confirmTake: async function(ids) {
const result = await soilSample.takeSample(ids)
const result = await soilSample.takeSample({ ids: ids })
if (result) {
this._resultChange('领样成功')
}
......
<template>
<div>
<Modal v-model="showSampleModal" v-drag width="1100"
class="zIndex-900 modal-footer-none" @on-visible-change="_visibleChange">
<Modal v-model="showSampleModal" v-drag @on-visible-change="_visibleChange"
width="1100" class="zIndex-900 modal-footer-none">
<p slot="header">
管理样品
</p>
......@@ -10,19 +10,19 @@
<Row>
<!--查询-->
<Col span="24" style="padding-bottom: 5px">
<Form v-show="searchOpen" id="search-wait" :label-width="90" inline onsubmit="return false">
<Form id="search-wait" v-show="searchOpen" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="试样编号:" class="search-item">
<Input v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入样品编号" clearable @on-enter="_formSearch"></Input>
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" name="sampleCode" placeholder="请输入样品编号" clearable></Input>
<input name="contractId" type="hidden">
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button>
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide" @on-result-change="_btnClick">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" @on-result-change="_btnClick" class="contHide">
<!--<template slot="processTask">-->
<!--<div class="fr process-task">-->
<!--<Button @click="_exportReceiveRecord">导出交接记录</Button>-->
......@@ -36,8 +36,8 @@
:table-height="tableHeight"
:get-page="getPage"
:icon-msg="iconMsg"
select-data
@on-result-change="_tableResultChange">
@on-result-change="_tableResultChange"
select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
......@@ -303,7 +303,7 @@ export default {
}
},
_confirmTake: async function(ids) {
const result = await soilSample.takeSample(ids)
const result = await soilSample.takeSample({ ids: ids })
if (result) {
this._resultChange('领样成功')
}
......
......@@ -159,7 +159,8 @@ export default {
this.$refs.formObj.validate(valid => {
if (valid) {
const data = this.formObj
this._saveInfo({ id: this.ids.join(','), obj: data })
data.ids = this.ids.join(',')
this._saveInfo(data)
} else {
this.$Message.error('表单验证失败!')
this.$refs.footerModal._hideLoading()
......
......@@ -434,7 +434,9 @@ export default {
}
},
_handleOk: async function() {
const result = await soilSample.surplusHandleOk(this.selectIds.join(','))
const result = await soilSample.surplusHandleOk({
ids: this.selectIds.join(',')
})
if (result) {
this._resultChange('提交成功')
}
......
......@@ -56,7 +56,7 @@
</template>
<script>
import Global from '../../../../api/config'
import { soilTest } from '../../../../api'
import { soilReport, soilTest } from '../../../../api'
import AssignPerson from '../../../../components/user-info-single/assignPerson'
import EquipManage from '../EquipManage'
// import SelectOriTempRecord from '../SelectOriTempRecord'
......@@ -109,14 +109,7 @@ export default {
],
btn: [
{ type: 'success', id: '', name: '提交' },
{ type: '', id: '', name: '退回' },
{ type: '', id: 'food-task-assign-adjust-group', name: '调整分组' },
{
type: '',
id: 'food-task-assign-plan-date',
name: '设置计划完成时间'
},
{ type: '', id: 'food-task-assign-maintain-info', name: '信息维护' }
{ type: 'warning', id: '', name: '退回' }
],
iconMsg: [
{ type: 'ios-book', id: '', name: '查看原始记录' },
......@@ -171,7 +164,7 @@ export default {
},
_reportCheckBack: async function(data) {
const result = await soilTest.auditBack({
ids: this.selectIds,
ids: this.selectIds.join(','),
remark: data
})
......@@ -183,9 +176,8 @@ export default {
this.$nextTick(() => {
switch (res) {
case '查看原始记录':
console.log(data)
if (data.recordId) {
this._viewRecord(data.recordId)
if (data.recorded === '是') {
this._recordLook(data)
} else {
this.$Message.warning('尚未填写原始记录')
}
......@@ -199,6 +191,29 @@ export default {
}
})
},
_recordLook(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._viewRecord(data.recordId)
}
},
_reportMakeLook: async function(data) {
const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
}
},
_equipManage(data) {
this.$refs.equipModal._open(data)
},
......@@ -415,7 +430,9 @@ export default {
}
},
_submitToMakeOk: async function() {
const result = await soilTest.endExpAudit(this.selectIds.join(','))
const result = await soilTest.endExpAudit({
ids: this.selectIds.join(',')
})
if (result) {
this._resultChange('提交成功')
}
......
......@@ -55,7 +55,7 @@
</template>
<script>
import Global from '../../../../api/config'
import { soilTest } from '../../../../api'
import { soilReport, soilTest } from '../../../../api'
import AssignPerson from '../../../../components/user-info-single/assignPerson'
import IndexManage from '../IndexManage'
import Reason from '../../../../components/base/Reason'
......@@ -153,7 +153,7 @@ export default {
},
_reportCheckBack: async function(data) {
const result = await soilTest.auditBack({
ids: this.selectIds,
ids: this.selectIds.join(','),
remark: data
})
......@@ -339,7 +339,9 @@ export default {
}
},
_submitToMakeOk: async function() {
const result = await soilTest.endExpAudit(this.selectIds.join(','))
const result = await soilTest.endExpAudit({
ids: this.selectIds.join(',')
})
if (result) {
this._resultChange('提交成功')
}
......@@ -435,9 +437,8 @@ export default {
this.$nextTick(() => {
switch (res) {
case '查看原始记录':
console.log(data)
if (data.recordId) {
this._viewRecord(data.recordId)
if (data.recorded === '是') {
this._recordLook(data)
} else {
this.$Message.warning('尚未填写原始记录')
}
......@@ -451,6 +452,29 @@ export default {
}
})
},
_recordLook(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._viewRecord(data.recordId)
}
},
_reportMakeLook: async function(data) {
const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
}
},
_equipManage(data) {
this.$refs.equipModal._open(data)
},
......
......@@ -56,7 +56,7 @@
</template>
<script>
import Global from '../../../../api/config'
import { soilTest } from '../../../../api'
import { soilReport, soilTest } from '../../../../api'
import AssignPerson from '../../../../components/user-info-single/assignPerson'
import EquipManage from '../EquipManage'
// import SelectOriTempRecord from '../SelectOriTempRecord'
......@@ -109,14 +109,7 @@ export default {
],
btn: [
{ type: 'success', id: '', name: '提交' },
{ type: 'warning', id: '', name: '退回' },
{ type: '', id: 'food-task-assign-adjust-group', name: '调整分组' },
{
type: '',
id: 'food-task-assign-plan-date',
name: '设置计划完成时间'
},
{ type: '', id: 'food-task-assign-maintain-info', name: '信息维护' }
{ type: 'warning', id: '', name: '退回' }
],
iconMsg: [
{ type: 'ios-book', id: '', name: '查看原始记录' },
......@@ -171,7 +164,7 @@ export default {
},
_reportCheckBack: async function(data) {
const result = await soilTest.checkBack({
ids: this.selectIds,
ids: this.selectIds.join(','),
remark: data
})
......@@ -183,9 +176,8 @@ export default {
this.$nextTick(() => {
switch (res) {
case '查看原始记录':
console.log(data)
if (data.recordId) {
this._viewRecord(data.recordId)
if (data.recorded === '是') {
this._recordLook(data)
} else {
this.$Message.warning('尚未填写原始记录')
}
......@@ -199,6 +191,29 @@ export default {
}
})
},
_recordLook(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._viewRecord(data.recordId)
}
},
_reportMakeLook: async function(data) {
const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
}
},
_equipManage(data) {
this.$refs.equipModal._open(data)
},
......@@ -415,7 +430,9 @@ export default {
}
},
_submitToAuditOk: async function() {
const result = await soilTest.endExpCheck(this.selectIds.join(','))
const result = await soilTest.endExpCheck({
ids: this.selectIds.join(',')
})
if (result) {
this._resultChange('提交成功')
}
......
......@@ -55,7 +55,7 @@
</template>
<script>
import Global from '../../../../api/config'
import { soilTest } from '../../../../api'
import { soilReport, soilTest } from '../../../../api'
import AssignPerson from '../../../../components/user-info-single/assignPerson'
import IndexManage from '../IndexManage'
import Reason from '../../../../components/base/Reason'
......@@ -93,14 +93,7 @@ export default {
],
btn: [
{ type: 'success', id: '', name: '提交' },
{ type: 'warning', id: '', name: '退回' },
{ type: '', id: 'food-task-assign-adjust-group', name: '调整分组' },
{
type: '',
id: 'food-task-assign-plan-date',
name: '设置计划完成时间'
},
{ type: '', id: 'food-task-assign-maintain-info', name: '信息维护' }
{ type: 'warning', id: '', name: '退回' }
],
getPage: {},
iconMsg: [
......@@ -204,7 +197,7 @@ export default {
},
_reportCheckBack: async function(data) {
const result = await soilTest.checkBack({
ids: this.selectIds,
ids: this.selectIds.join(','),
remark: data
})
......@@ -332,7 +325,9 @@ export default {
}
},
_submitToAuditOk: async function() {
const result = await soilTest.endExpCheck(this.selectIds.join(','))
const result = await soilTest.endExpCheck({
ids: this.selectIds.join(',')
})
if (result) {
this._resultChange('提交成功')
}
......@@ -435,9 +430,8 @@ export default {
this.$nextTick(() => {
switch (res) {
case '查看原始记录':
console.log(data)
if (data.recordId) {
this._viewRecord(data.recordId)
if (data.recorded === '是') {
this._recordLook(data)
} else {
this.$Message.warning('尚未填写原始记录')
}
......@@ -451,6 +445,29 @@ export default {
}
})
},
_recordLook(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._viewRecord(data.recordId)
}
},
_reportMakeLook: async function(data) {
const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
}
},
_equipManage(data) {
this.$refs.equipModal._open(data)
},
......
......@@ -34,7 +34,7 @@
</template>
<script>
import { soilAptitude, soilTest } from '../../../api'
import { soilTest } from '../../../api'
import IndexManageEdit from './IndexManageEdit'
export default {
......@@ -139,7 +139,7 @@ export default {
_deleteByIds() {
if (this.selectIds.length === 0) {
// this.$msgTip('warning')
this.$message.warning('请至少选择一条记录')
this.$Message.warning('请至少选择一条记录')
} else {
this.$Modal.confirm({
title: '提示',
......@@ -151,9 +151,9 @@ export default {
}
},
_delOk: async function(ids) {
const result = await soilAptitude.expItemDeleteByIds(ids)
const result = await soilTest.itemDelete(ids)
if (result) {
this.$message.success('删除成功')
this.$Message.success('删除成功')
this._page()
}
}
......
......@@ -119,7 +119,11 @@ export default {
{ key: 'detectType', name: '样品类别', placeholder: '请输入样品类别' }
],
btn: [
{ type: 'success', id: '', name: '填写原始记录' },
{
type: 'success',
id: 'test-input-write-record',
name: '填写原始记录'
},
{ type: 'success', id: '', name: '原始记录填写' },
{ type: 'success', id: '', name: '完成提交' },
{ type: 'success', id: '', name: '设备' }
......@@ -227,7 +231,6 @@ export default {
}
},
_reportMakeLook: async function(data) {
console.log(data)
const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
this._viewReport(result)
......@@ -251,12 +254,12 @@ export default {
this.$refs.createModal._open()
},
_makeCodeExcel: async function(data) {
console.log(this.selectIds)
this.$refs.pageTable._hideLoading()
this.$refs.pageTable._showLoading()
const result = await soilSample.saveExcelOriginalRecord({
ids: this.selectIds,
id: data.id
ids: this.selectIds.join(','),
templateId: data.id
})
this.$refs.pageTable._hideLoading()
if (result) {
await this._page()
if (result === null || result === undefined) {
......@@ -270,6 +273,7 @@ export default {
}
},
_viewReport(data) {
this.$refs.pageTable._hideLoading()
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
......@@ -327,7 +331,6 @@ export default {
this.$refs.pageTable._loadColumn(colList)
},
_equipResult: async function(res) {
console.log(res)
const tempData = {}
tempData.equipList = []
res.map((item, index) => {
......@@ -526,7 +529,7 @@ export default {
})
},
_submitOk: async function() {
const result = await soilTest.endExp(this.selectIds.join(','))
const result = await soilTest.endExpIds({ ids: this.selectIds.join(',') })
if (result) {
this._resultChange('提交成功')
}
......
......@@ -109,7 +109,11 @@ export default {
{ key: 'detectType', name: '样品类别', placeholder: '请输入样品类别' }
],
btn: [
{ type: 'success', id: '', name: '填写原始记录' },
{
type: 'success',
id: 'test-input-write-record',
name: '填写原始记录'
},
{ type: 'success', id: '', name: '原始记录填写' },
{ type: 'success', id: '', name: '完成提交' },
{ type: 'success', id: '', name: '设备' }
......@@ -367,10 +371,11 @@ export default {
}
},
_makeCodeExcel: async function(data) {
console.log(this.selectIds)
console.log('----dddd---', data)
this.$refs.pageTable._hideLoading()
const result = await soilSample.generateExcelReport(data)
const result = await soilSample.saveExcelOriginalRecord({
ids: this.selectIds.join(','),
templateId: data.id
})
if (result) {
await this._page()
if (result === null || result === undefined) {
......
......@@ -108,7 +108,7 @@ export default [
{
path: 'dispose',
component: SampleDisposeIndex,
meta: { title: '样品处理' }
meta: { title: '备样样品处理' }
},
{
path: 'surplus_dispose',
......
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