|
|
@ -48,6 +48,7 @@ |
|
|
<span>导出</span> |
|
|
<span>导出</span> |
|
|
</download-excel> |
|
|
</download-excel> |
|
|
<el-button v-if="authSearch" @click="searchHandle()">搜索</el-button> |
|
|
<el-button v-if="authSearch" @click="searchHandle()">搜索</el-button> |
|
|
|
|
|
<el-button type="warning" @click="closeProcessModal()">流程关闭</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
@ -872,7 +873,7 @@ |
|
|
import * as api from '@/api/lab/lab' |
|
|
import * as api from '@/api/lab/lab' |
|
|
import { getSiteList, searchUserListForRole } from '@/api/base/site' |
|
|
import { getSiteList, searchUserListForRole } from '@/api/base/site' |
|
|
import { queryOss, previewOssFileById } from '@/api/oss/oss' |
|
|
import { queryOss, previewOssFileById } from '@/api/oss/oss' |
|
|
import { checkSuperAdmin } from '@/api/changeManagement/changeManagement' |
|
|
|
|
|
|
|
|
import { checkSuperAdmin, closeProcess } from '@/api/changeManagement/changeManagement' |
|
|
import { verifyData } from '@/api/chooselist/chooselist.js' |
|
|
import { verifyData } from '@/api/chooselist/chooselist.js' |
|
|
import { searchProjectInfoList } from '@/api/quotation/quotationInformation.js' |
|
|
import { searchProjectInfoList } from '@/api/quotation/quotationInformation.js' |
|
|
import { queryCustomer } from '@/api/customer/customerInformation' |
|
|
import { queryCustomer } from '@/api/customer/customerInformation' |
|
|
@ -2942,6 +2943,33 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
closeProcessModal () { |
|
|
|
|
|
const approvedRows = (this.dataListSelections || []).filter(item => item && item.status === '审批中' && item.referenceNo) |
|
|
|
|
|
if (!approvedRows.length) { |
|
|
|
|
|
this.$message.warning('请勾选状态为"审批中"的单据!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.$confirm(`确定关闭这 ${approvedRows.length} 条实验室单据的OA流程?关闭后状态将变为"草稿"。`, '流程关闭', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
closeProcess({ |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
documentNos: approvedRows.map(row => row.referenceNo), |
|
|
|
|
|
documentType: 'LAB' |
|
|
|
|
|
}).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success('流程关闭成功') |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error((data && data.msg) || '流程关闭失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
this.$message.error((err && err.message) || '流程关闭失败') |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(() => {}) |
|
|
|
|
|
}, |
|
|
deleteHandle () { |
|
|
deleteHandle () { |
|
|
if (!this.authDelete) { |
|
|
if (!this.authDelete) { |
|
|
this.$message.warning('没有删除权限') |
|
|
this.$message.warning('没有删除权限') |
|
|
|