Commit 9f681fc2 by lichengming

修改了检测管理的提交返回按钮

parent 6218d051
...@@ -61,5 +61,41 @@ export default { ...@@ -61,5 +61,41 @@ export default {
itemSave: data => http.post('soil/v1/item/', data).then(res => res), itemSave: data => http.post('soil/v1/item/', data).then(res => res),
itemEdit: data => itemEdit: data =>
http.put('soil/v1/item/' + data.id, data.obj).then(res => res), http.put('soil/v1/item/' + data.id, data.obj).then(res => res),
itemGetById: data => http.get('soil/v1/item/' + data).then(res => res) itemGetById: data => http.get('soil/v1/item/' + data).then(res => res),
endExp: data =>
http.post('soil/v1/experiment/end_exp?ids=' + 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),
endExpAudit: data =>
http.post('soil/v1/experiment/end_exp_audit?ids=' + data).then(res => res),
pageCheckByExp: data =>
http.post('soil/v1/experiment/page_check_by_exp', data).then(res => res),
pageExpByCheck: data =>
http.post('soil/v1/experiment/page_exp_check', data).then(res => res),
pageExpAudit: data =>
http.post('soil/v1/entrust/page_exp_audit', data).then(res => res),
pageAuditByExp: data =>
http.post('soil/v1/experiment/page_audit_by_exp', data).then(res => res),
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),
checkBack: data =>
http
.post(
'soil/v1/experiment/exp_check_back?ids=' +
data.ids +
'&remark=' +
data.remark
)
.then(res => res)
} }
...@@ -402,7 +402,7 @@ export default { ...@@ -402,7 +402,7 @@ export default {
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj) console.log('this.formObj', this.formObj)
const result = await soilTest.pageExpTest( const result = await soilTest.pageExpAudit(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.entrustId = this.id this.formObj.entrustId = this.id
const result = await soilTest.pageTestByExp( const result = await soilTest.pageAuditByExp(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
<!-- <SelectOriTempRecord ref="recordModal" @on-result-change="_page"></SelectOriTempRecord>--> <!-- <SelectOriTempRecord ref="recordModal" @on-result-change="_page"></SelectOriTempRecord>-->
<!-- <OriginalRecordEdit ref="editModal"></OriginalRecordEdit>--> <!-- <OriginalRecordEdit ref="editModal"></OriginalRecordEdit>-->
<IndexManage ref="indexModal" @on-result-change="_page"></IndexManage> <IndexManage ref="indexModal" @on-result-change="_page"></IndexManage>
<Reason ref="reasonModal" @on-result-change="_reasonResult"></Reason>
</div> </div>
</template> </template>
<script> <script>
...@@ -59,9 +60,11 @@ import AssignPerson from '../../../../components/user-info-single/AssignPerson' ...@@ -59,9 +60,11 @@ import AssignPerson from '../../../../components/user-info-single/AssignPerson'
// import SelectOriTempRecord from '../SelectOriTempRecord' // import SelectOriTempRecord from '../SelectOriTempRecord'
// import OriginalRecordEdit from '../OriginalRecordEdit' // import OriginalRecordEdit from '../OriginalRecordEdit'
import IndexManage from '../IndexManage' import IndexManage from '../IndexManage'
import Reason from '../../../../components/base/Reason'
export default { export default {
components: { components: {
AssignPerson, AssignPerson,
Reason,
// SelectOriTempRecord, // SelectOriTempRecord,
// OriginalRecordEdit, // OriginalRecordEdit,
IndexManage IndexManage
...@@ -103,7 +106,7 @@ export default { ...@@ -103,7 +106,7 @@ export default {
], ],
btn: [ btn: [
{ type: 'success', id: '', name: '提交' }, { type: 'success', id: '', name: '提交' },
{ type: 'waring', id: '', name: '退回' }, { type: '', id: '', name: '退回' },
{ type: '', id: 'food-task-assign-adjust-group', name: '调整分组' }, { type: '', id: 'food-task-assign-adjust-group', name: '调整分组' },
{ {
type: '', type: '',
...@@ -157,6 +160,21 @@ export default { ...@@ -157,6 +160,21 @@ export default {
// this._dicSearch() // this._dicSearch()
}, },
methods: { methods: {
_reasonResult(data) {
if (undefined !== data && data !== '') {
this._reportCheckBack(data)
}
},
_reportCheckBack: async function(data) {
const result = await soilTest.auditBack({
ids: this.selectIds,
remark: data
})
if (result) {
this._resultChange('退回成功')
}
},
_iconClick(res, data, currentComponent) { _iconClick(res, data, currentComponent) {
this.$nextTick(() => { this.$nextTick(() => {
switch (res) { switch (res) {
...@@ -170,6 +188,13 @@ export default { ...@@ -170,6 +188,13 @@ export default {
} }
}) })
}, },
_auditBack() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$refs.reasonModal._open('退回原因')
}
},
_indexManage(data) { _indexManage(data) {
this.$refs.indexModal._open(data) this.$refs.indexModal._open(data)
}, },
...@@ -322,6 +347,12 @@ export default { ...@@ -322,6 +347,12 @@ export default {
// await this._reportDueDate() // await this._reportDueDate()
// await this._userAssign() // await this._userAssign()
break break
case '提交':
this._submitToMake()
break
case '退回':
this._auditBack()
break
case '试验项目分配': case '试验项目分配':
this._userAssign() this._userAssign()
break break
...@@ -353,6 +384,25 @@ export default { ...@@ -353,6 +384,25 @@ export default {
break break
} }
}, },
_submitToMake() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定提交该数据?',
onOk: () => {
this._submitToMakeOk()
}
})
}
},
_submitToMakeOk: async function() {
const result = await soilTest.endExpAudit(this.selectIds.join(','))
if (result) {
this._resultChange('提交成功')
}
},
_addRecord() { _addRecord() {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$message.warning('请至少选择一条数据') this.$message.warning('请至少选择一条数据')
...@@ -428,7 +478,7 @@ export default { ...@@ -428,7 +478,7 @@ export default {
this.formObj.entrustId = this.entrustId this.formObj.entrustId = this.entrustId
this.formObj.name = this.leftSelectData.name this.formObj.name = this.leftSelectData.name
this.formObj.testMethod = this.leftSelectData.testMethod this.formObj.testMethod = this.leftSelectData.testMethod
const result = await soilTest.pageExperimentTest( const result = await soilTest.pageExpByAudit(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
...@@ -402,7 +402,7 @@ export default { ...@@ -402,7 +402,7 @@ export default {
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj) console.log('this.formObj', this.formObj)
const result = await soilTest.pageExpTest( const result = await soilTest.pageExpCheck(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.entrustId = this.id this.formObj.entrustId = this.id
const result = await soilTest.pageTestByExp( const result = await soilTest.pageCheckByExp(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
<!-- <SelectOriTempRecord ref="recordModal" @on-result-change="_page"></SelectOriTempRecord>--> <!-- <SelectOriTempRecord ref="recordModal" @on-result-change="_page"></SelectOriTempRecord>-->
<!-- <OriginalRecordEdit ref="editModal"></OriginalRecordEdit>--> <!-- <OriginalRecordEdit ref="editModal"></OriginalRecordEdit>-->
<IndexManage ref="indexModal" @on-result-change="_page"></IndexManage> <IndexManage ref="indexModal" @on-result-change="_page"></IndexManage>
<Reason ref="reasonModal" @on-result-change="_reasonResult"></Reason>
</div> </div>
</template> </template>
<script> <script>
...@@ -59,9 +60,11 @@ import AssignPerson from '../../../../components/user-info-single/AssignPerson' ...@@ -59,9 +60,11 @@ import AssignPerson from '../../../../components/user-info-single/AssignPerson'
// import SelectOriTempRecord from '../SelectOriTempRecord' // import SelectOriTempRecord from '../SelectOriTempRecord'
// import OriginalRecordEdit from '../OriginalRecordEdit' // import OriginalRecordEdit from '../OriginalRecordEdit'
import IndexManage from '../IndexManage' import IndexManage from '../IndexManage'
import Reason from '../../../../components/base/Reason'
export default { export default {
components: { components: {
AssignPerson, AssignPerson,
Reason,
// SelectOriTempRecord, // SelectOriTempRecord,
// OriginalRecordEdit, // OriginalRecordEdit,
IndexManage IndexManage
...@@ -157,6 +160,21 @@ export default { ...@@ -157,6 +160,21 @@ export default {
// this._dicSearch() // this._dicSearch()
}, },
methods: { methods: {
_reasonResult(data) {
if (undefined !== data && data !== '') {
this._reportCheckBack(data)
}
},
_reportCheckBack: async function(data) {
const result = await soilTest.checkBack({
ids: this.selectIds,
remark: data
})
if (result) {
this._resultChange('退回成功')
}
},
_iconClick(res, data, currentComponent) { _iconClick(res, data, currentComponent) {
this.$nextTick(() => { this.$nextTick(() => {
switch (res) { switch (res) {
...@@ -328,6 +346,12 @@ export default { ...@@ -328,6 +346,12 @@ export default {
case '填写原始记录': case '填写原始记录':
this._addRecord() this._addRecord()
break break
case '提交':
this._submitToAudit()
break
case '退回':
this._checkBack()
break
case '按组分配': case '按组分配':
await this._reportDueDate() await this._reportDueDate()
await this._groupAssign() await this._groupAssign()
...@@ -353,6 +377,32 @@ export default { ...@@ -353,6 +377,32 @@ export default {
break break
} }
}, },
_checkBack() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$refs.reasonModal._open('退回原因')
}
},
_submitToAudit() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定提交该数据?',
onOk: () => {
this._submitToAuditOk()
}
})
}
},
_submitToAuditOk: async function() {
const result = await soilTest.endExpCheck(this.selectIds.join(','))
if (result) {
this._resultChange('提交成功')
}
},
_addRecord() { _addRecord() {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$message.warning('请至少选择一条数据') this.$message.warning('请至少选择一条数据')
...@@ -428,7 +478,7 @@ export default { ...@@ -428,7 +478,7 @@ export default {
this.formObj.entrustId = this.entrustId this.formObj.entrustId = this.entrustId
this.formObj.name = this.leftSelectData.name this.formObj.name = this.leftSelectData.name
this.formObj.testMethod = this.leftSelectData.testMethod this.formObj.testMethod = this.leftSelectData.testMethod
const result = await soilTest.pageExperimentTest( const result = await soilTest.pageExpByCheck(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
...@@ -103,6 +103,7 @@ export default { ...@@ -103,6 +103,7 @@ export default {
], ],
btn: [ btn: [
{ type: 'success', id: '', name: '填写原始记录' }, { type: 'success', id: '', name: '填写原始记录' },
{ type: 'success', id: '', name: '完成提交' },
{ type: '', id: 'food-task-assign-adjust-group', name: '调整分组' }, { type: '', id: 'food-task-assign-adjust-group', name: '调整分组' },
{ {
type: '', type: '',
...@@ -124,7 +125,6 @@ export default { ...@@ -124,7 +125,6 @@ export default {
{ title: '是否填写原始记录', key: 'recorded', width: 180 }, { title: '是否填写原始记录', key: 'recorded', width: 180 },
{ title: '大类', key: 'mainType', width: 140 }, { title: '大类', key: 'mainType', width: 140 },
{ title: '小类', key: 'smallType', width: 140 }, { title: '小类', key: 'smallType', width: 140 },
{ title: '原始记录是否填写', key: 'recorded', width: 140 },
{ title: '检测方法', key: 'testMethod', width: 260 }, { title: '检测方法', key: 'testMethod', width: 260 },
{ title: '检测依据', key: 'testBasis', width: 140 }, { title: '检测依据', key: 'testBasis', width: 140 },
{ title: '检测科室', key: 'groupName', width: 150 } { title: '检测科室', key: 'groupName', width: 150 }
...@@ -328,6 +328,9 @@ export default { ...@@ -328,6 +328,9 @@ export default {
case '填写原始记录': case '填写原始记录':
this._addRecord() this._addRecord()
break break
case '完成提交':
this._submitItem(this.selectData)
break
case '按组分配': case '按组分配':
await this._reportDueDate() await this._reportDueDate()
await this._groupAssign() await this._groupAssign()
...@@ -353,6 +356,26 @@ export default { ...@@ -353,6 +356,26 @@ export default {
break break
} }
}, },
_submitItem(data) {
console.log(data)
if (data[0].recorded !== '是') {
this.$Message.warning('未编制报告不能提交')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定提交该数据?',
onOk: () => {
this._submitOk()
}
})
}
},
_submitOk: async function() {
const result = await soilTest.endExp(this.selectIds.join(','))
if (result) {
this._resultChange('提交成功')
}
},
_addRecord() { _addRecord() {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$message.warning('请至少选择一条数据') this.$message.warning('请至少选择一条数据')
......
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