Commit 12816a03 by lichengming

修改了报告审核报告签发退回按钮

parent 80dccefa
...@@ -120,6 +120,24 @@ export default { ...@@ -120,6 +120,24 @@ export default {
data.remark data.remark
) )
.then(res => res), .then(res => res),
expReportIssueBack: data =>
http
.post(
'soil/v1/exp_report/exp_report_issue_back?ids=' +
data.ids +
'&remark=' +
data.remark
)
.then(res => res),
expReportCheckBack: data =>
http
.post(
'soil/v1/exp_report/exp_report_check_back?ids=' +
data.ids +
'&remark=' +
data.remark
)
.then(res => res),
// 样品检测退回 // 样品检测退回
testInputBack: data => testInputBack: data =>
......
...@@ -60,17 +60,18 @@ ...@@ -60,17 +60,18 @@
style="width:400px"> style="width:400px">
</DatePicker> </DatePicker>
</Modal> </Modal>
<Reason ref="reasonModal" @on-result-change="_reasonResult" ></Reason>
</div> </div>
</template> </template>
<script> <script>
import { soilReport, soilStatistics, soilTest } from '../../../api' import { soilReport, soilSample, soilStatistics, soilTest } from '../../../api'
import Global from '../../../api/config' import Global from '../../../api/config'
import Reason from '../../../components/base/Reason'
/** /**
* 报告编制的-待办-报告台账 * 报告编制的-待办-报告台账
*/ */
export default { export default {
components: {}, components: { Reason },
data() { data() {
return { return {
notOkCountList: [ notOkCountList: [
...@@ -91,6 +92,11 @@ export default { ...@@ -91,6 +92,11 @@ export default {
type: 'primary', type: 'primary',
id: '', id: '',
name: '提交' name: '提交'
},
{
type: 'primary',
id: '',
name: '退回'
} }
], ],
selectIds: [], selectIds: [],
...@@ -301,12 +307,39 @@ export default { ...@@ -301,12 +307,39 @@ export default {
case '提交': case '提交':
this._submit() this._submit()
break break
case '退回':
this._goBack()
break
case 'search': case 'search':
this.searchOpen = !this.searchOpen this.searchOpen = !this.searchOpen
break break
} }
}) })
}, },
_goBack() {
// 退回
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.expReportCheckBack({
ids: this.selectIds,
remark: data
})
if (result) {
this.$Message.success('退回成功!')
await this._page()
}
},
// 选择审核人 // 选择审核人
_selectAuditor() { _selectAuditor() {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
......
...@@ -330,7 +330,7 @@ export default { ...@@ -330,7 +330,7 @@ export default {
} }
}, },
_reportCheckBack: async function(data) { _reportCheckBack: async function(data) {
const result = await soilSample.reportIssueBack({ const result = await soilSample.expReportIssueBack({
ids: this.selectIds, ids: this.selectIds,
remark: data remark: data
}) })
......
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