|
@ -4,11 +4,13 @@ |
|
|
<Search |
|
|
<Search |
|
|
:schema="InspectionJobMain.allSchemas.searchSchema" |
|
|
:schema="InspectionJobMain.allSchemas.searchSchema" |
|
|
@search="setSearchParams" |
|
|
@search="setSearchParams" |
|
|
@reset="setSearchParams({ |
|
|
@reset=" |
|
|
|
|
|
setSearchParams({ |
|
|
available: true, |
|
|
available: true, |
|
|
excludeInspectionType: '1,4' |
|
|
excludeInspectionType: '1,4' |
|
|
})" |
|
|
}) |
|
|
/> |
|
|
" |
|
|
|
|
|
/> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
@ -23,7 +25,8 @@ |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<Table v-clientTable |
|
|
<Table |
|
|
|
|
|
v-clientTable |
|
|
:columns="tableColumns" |
|
|
:columns="tableColumns" |
|
|
:data="tableObject.tableList" |
|
|
:data="tableObject.tableList" |
|
|
:loading="tableObject.loading" |
|
|
:loading="tableObject.loading" |
|
@ -60,6 +63,7 @@ |
|
|
:rules="InspectionJobMainRules" |
|
|
:rules="InspectionJobMainRules" |
|
|
:formAllSchemas="InspectionJobMain.allSchemas" |
|
|
:formAllSchemas="InspectionJobMain.allSchemas" |
|
|
@submitForm="submitForm" |
|
|
@submitForm="submitForm" |
|
|
|
|
|
@close="getList" |
|
|
/> |
|
|
/> |
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<Detail |
|
|
<Detail |
|
@ -86,13 +90,13 @@ |
|
|
:list="list" |
|
|
:list="list" |
|
|
/> |
|
|
/> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
v-model="showQualityReport" |
|
|
v-model="showQualityReport" |
|
|
:title="t('质检明细')" |
|
|
:title="t('质检明细')" |
|
|
:append-to-body="false" |
|
|
:append-to-body="false" |
|
|
destroy-on-close |
|
|
destroy-on-close |
|
|
fullscreen |
|
|
fullscreen |
|
|
> |
|
|
> |
|
|
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe> |
|
|
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -122,6 +126,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import AddForm from './addForm.vue' |
|
|
import AddForm from './addForm.vue' |
|
|
import Detail from './detail.vue' |
|
|
import Detail from './detail.vue' |
|
|
import { getReportUrl } from '@/utils/systemParam' |
|
|
import { getReportUrl } from '@/utils/systemParam' |
|
|
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
|
|
|
|
|
// 采购订单 |
|
|
// 采购订单 |
|
|
defineOptions({ name: 'inspectionJobMain' }) |
|
|
defineOptions({ name: 'inspectionJobMain' }) |
|
@ -132,7 +137,7 @@ const route = useRoute() // 路由信息 |
|
|
const routeName = ref() |
|
|
const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns) |
|
|
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns) |
|
|
|
|
|
const userStore = useUserStore() |
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
@ -202,7 +207,7 @@ const buttonBaseClick = (val, item) => { |
|
|
handleExport() |
|
|
handleExport() |
|
|
} else if (val == 'refresh') { |
|
|
} else if (val == 'refresh') { |
|
|
// 刷新 |
|
|
// 刷新 |
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0) { |
|
|
searchFormClick({ |
|
|
searchFormClick({ |
|
|
filters: tableObject.params.filters |
|
|
filters: tableObject.params.filters |
|
|
}) |
|
|
}) |
|
@ -235,23 +240,35 @@ const isShowMainButton2 = (row, val) => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
|
|
const isShowMainButton1 = (row, val) => { |
|
|
|
|
|
if (val.indexOf(row.status) > -1) { |
|
|
|
|
|
if (userStore.getUser.id == row.acceptUserId) { |
|
|
|
|
|
return false |
|
|
|
|
|
} else { |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row) => { |
|
|
const butttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListJobAccBtn({ |
|
|
// defaultButtons.mainListJobAccBtn({ |
|
|
hide: isShowMainButton(row, ['1']), |
|
|
// hide: isShowMainButton(row, ['1']), |
|
|
hasPermi: 'qms:inspection-job-main:accept' |
|
|
// hasPermi: 'qms:inspection-job-main:accept' |
|
|
}), // 承接 |
|
|
// }), // 承接 |
|
|
defaultButtons.mainListJobCloBtn({ |
|
|
defaultButtons.mainListJobCloBtn({ |
|
|
hide: isShowMainButton(row, ['1']), |
|
|
hide: isShowMainButton(row, ['1']), |
|
|
hasPermi: 'qms:inspection-job-main:close' |
|
|
hasPermi: 'qms:inspection-job-main:close' |
|
|
}), // 关闭 |
|
|
}), // 关闭 |
|
|
defaultButtons.mainListJobAbaBtn({ |
|
|
defaultButtons.mainListJobAbaBtn({ |
|
|
hide: isShowMainButton(row, ['2']), |
|
|
hide: isShowMainButton1(row, ['2']), |
|
|
hasPermi: 'qms:inspection-job-main:abandon' |
|
|
hasPermi: 'qms:inspection-job-main:abandon' |
|
|
}), // 放弃 |
|
|
}), // 放弃 |
|
|
defaultButtons.mainListJobExeBtn({ |
|
|
defaultButtons.mainListJobExeBtn({ |
|
|
hide: isShowMainButton(row, ['2']), |
|
|
hide: isShowMainButton(row, ['1', '2']), |
|
|
hasPermi: 'qms:inspection-job-main:execute' |
|
|
hasPermi: 'qms:inspection-job-main:execute' |
|
|
}), // 执行 |
|
|
}), // 执行 |
|
|
defaultButtons.mainListOrderPubBtn({ |
|
|
defaultButtons.mainListOrderPubBtn({ |
|
@ -299,8 +316,9 @@ const showQualityReport = ref(false) |
|
|
const qualityReport = ref('') |
|
|
const qualityReport = ref('') |
|
|
const checkQualityReport = async (row) => { |
|
|
const checkQualityReport = async (row) => { |
|
|
showQualityReport.value = true |
|
|
showQualityReport.value = true |
|
|
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}` |
|
|
qualityReport.value =getReportUrl()+'purchasereceiptReport?asnNumber=' + row.asnNumber |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|
// const formRef = ref() |
|
|
// const formRef = ref() |
|
@ -317,8 +335,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
//执行 |
|
|
//执行 |
|
|
|
|
|
|
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const execute = async (type: string, row?: number) => { |
|
|
const execute = async (type: string, row?: any) => { |
|
|
formRef.value.open(type, row) |
|
|
if (row.status == '2') { |
|
|
|
|
|
if (userStore.getUser.id == row.acceptUserId) { |
|
|
|
|
|
formRef.value.open(type, row) |
|
|
|
|
|
} else { |
|
|
|
|
|
message.error('承接人与当前登录人不一致') |
|
|
|
|
|
} |
|
|
|
|
|
} else if (row.status == '1') { |
|
|
|
|
|
await handleAccept(row.id) |
|
|
|
|
|
formRef.value.open(type, row) |
|
|
|
|
|
await getList() |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
/** 关闭按钮操作 */ |
|
|
/** 关闭按钮操作 */ |
|
|
const handleClose = async (id: number) => { |
|
|
const handleClose = async (id: number) => { |
|
@ -329,7 +357,7 @@ const handleClose = async (id: number) => { |
|
|
await InspectionJobMainApi.closeInspectionJobMain(id) |
|
|
await InspectionJobMainApi.closeInspectionJobMain(id) |
|
|
message.success(t('common.closeSuccess')) |
|
|
message.success(t('common.closeSuccess')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
buttonBaseClick('refresh',null) |
|
|
buttonBaseClick('refresh', null) |
|
|
} catch {} |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
/** 发布按钮操作 */ |
|
|
/** 发布按钮操作 */ |
|
@ -341,19 +369,19 @@ const handleRelease = async (id: number) => { |
|
|
await InspectionJobMainApi.releaseInspectionJobMain(id) |
|
|
await InspectionJobMainApi.releaseInspectionJobMain(id) |
|
|
message.success('发布成功!') |
|
|
message.success('发布成功!') |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
buttonBaseClick('refresh',null) |
|
|
buttonBaseClick('refresh', null) |
|
|
} catch {} |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
// 承接 |
|
|
// 承接 |
|
|
const handleAccept = async (id: number) => { |
|
|
const handleAccept = async (id: number) => { |
|
|
try { |
|
|
try { |
|
|
// 承接的二次确认 |
|
|
// 承接的二次确认 |
|
|
await message.confirm(t('common.confirmAccept')) |
|
|
// await message.confirm(t('common.confirmAccept')) |
|
|
// 发起承接 |
|
|
// 发起承接 |
|
|
await InspectionJobMainApi.acceptInspectionJobMain(id) |
|
|
await InspectionJobMainApi.acceptInspectionJobMain(id) |
|
|
message.success(t('common.acceptSuccess')) |
|
|
// message.success(t('common.acceptSuccess')) |
|
|
// 刷新列表(TB反馈,取消承接后刷新页面) |
|
|
// 刷新列表(TB反馈,取消承接后刷新页面) |
|
|
buttonBaseClick('refresh',null) |
|
|
// buttonBaseClick('refresh', null) |
|
|
} catch {} |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
// 放弃任务 |
|
|
// 放弃任务 |
|
@ -365,7 +393,7 @@ const handleAbandon = async (id: number) => { |
|
|
await InspectionJobMainApi.abandonInspectionJobMain(id) |
|
|
await InspectionJobMainApi.abandonInspectionJobMain(id) |
|
|
message.success(t('common.giveupSuccess')) |
|
|
message.success(t('common.giveupSuccess')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
buttonBaseClick('refresh',null) |
|
|
buttonBaseClick('refresh', null) |
|
|
} catch {} |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -411,8 +439,8 @@ const submitForm = async (formType, data) => { |
|
|
// 刷新当前列表 |
|
|
// 刷新当前列表 |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|
getList() |
|
|
getList() |
|
|
}else{ |
|
|
} else { |
|
|
buttonBaseClick('refresh',null) |
|
|
buttonBaseClick('refresh', null) |
|
|
} |
|
|
} |
|
|
} finally { |
|
|
} finally { |
|
|
formRef.value.formLoading = false |
|
|
formRef.value.formLoading = false |
|
|