Browse Source

BUG修改

linshi20240813
parent
commit
b7eae98bda
  1. 85
      src/views/qms/inspectionJob/index.vue
  2. 7
      src/views/qms/inspectionJobProduction/index.vue
  3. 7
      src/views/qms/inspectionJobPurchase/index.vue
  4. 10
      src/views/qms/inspectionRecord/index.vue
  5. 8
      src/views/qms/inspectionRecordFirst/index.vue
  6. 4
      src/views/qms/inspectionRequest/index.vue

85
src/views/qms/inspectionJob/index.vue

@ -4,8 +4,11 @@
<Search
:schema="InspectionJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
@reset="setSearchParams({
available: true,
excludeInspectionType: '1,4'
})"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -20,8 +23,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
v-clientTable
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -58,7 +60,6 @@
:rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm"
@close="getList"
/>
<!-- 详情 -->
<Detail
@ -85,13 +86,13 @@
:list="list"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
@ -121,7 +122,6 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
import { useUserStore } from '@/store/modules/user'
//
defineOptions({ name: 'inspectionJobMain' })
@ -132,7 +132,6 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
const userStore = useUserStore()
//
const updataTableColumns = (val) => {
@ -203,7 +202,7 @@ const buttonBaseClick = (val, item) => {
handleExport()
} else if (val == 'refresh') {
//
if (tableObject.params.filters && tableObject.params.filters.length > 0) {
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
@ -235,35 +234,24 @@ const isShowMainButton2 = (row, val) => {
return true
}
}
//
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) => {
return [
// defaultButtons.mainListJobAccBtn({
// hide: isShowMainButton(row, ['1']),
// hasPermi: 'qms:inspection-job-main:accept'
// }), //
defaultButtons.mainListJobAccBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:accept'
}), //
defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:close'
}), //
defaultButtons.mainListJobAbaBtn({
hide: isShowMainButton1(row, ['2']),
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-job-main:abandon'
}), //
defaultButtons.mainListJobExeBtn({
hide: isShowMainButton(row, ['1', '2']),
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListOrderPubBtn({
@ -327,19 +315,10 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
}
//
const formRef = ref()
const execute = async (type: string, row?: any) => {
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 execute = async (type: string, row?: number) => {
formRef.value.open(type, row)
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
@ -350,7 +329,7 @@ const handleClose = async (id: number) => {
await InspectionJobMainApi.closeInspectionJobMain(id)
message.success(t('common.closeSuccess'))
//
buttonBaseClick('refresh', null)
buttonBaseClick('refresh',null)
} catch {}
}
/** 发布按钮操作 */
@ -362,19 +341,19 @@ const handleRelease = async (id: number) => {
await InspectionJobMainApi.releaseInspectionJobMain(id)
message.success('发布成功!')
//
buttonBaseClick('refresh', null)
buttonBaseClick('refresh',null)
} catch {}
}
//
const handleAccept = async (id: number) => {
try {
//
// await message.confirm(t('common.confirmAccept'))
await message.confirm(t('common.confirmAccept'))
//
await InspectionJobMainApi.acceptInspectionJobMain(id)
// message.success(t('common.acceptSuccess'))
message.success(t('common.acceptSuccess'))
// (TB)
// buttonBaseClick('refresh',null)
buttonBaseClick('refresh',null)
} catch {}
}
//
@ -386,7 +365,7 @@ const handleAbandon = async (id: number) => {
await InspectionJobMainApi.abandonInspectionJobMain(id)
message.success(t('common.giveupSuccess'))
//
buttonBaseClick('refresh', null)
buttonBaseClick('refresh',null)
} catch {}
}
@ -432,8 +411,8 @@ const submitForm = async (formType, data) => {
//
if (formType === 'create') {
getList()
} else {
buttonBaseClick('refresh', null)
}else{
buttonBaseClick('refresh',null)
}
} finally {
formRef.value.formLoading = false

7
src/views/qms/inspectionJobProduction/index.vue

@ -4,8 +4,11 @@
<Search
:schema="InspectionJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
@reset="setSearchParams({
available: true,
inspectionType: '4'
})"
/>
</ContentWrap>
<!-- 列表头部 -->

7
src/views/qms/inspectionJobPurchase/index.vue

@ -4,8 +4,11 @@
<Search
:schema="InspectionJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
@reset="setSearchParams({
available: true,
inspectionType: '1'
})"
/>
</ContentWrap>
<!-- 列表头部 -->

10
src/views/qms/inspectionRecord/index.vue

@ -4,8 +4,11 @@
<Search
:schema="InspectionRecordMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
@reset="setSearchParams({
available: true,
excludeInspectionType: '11'
})"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -315,10 +318,8 @@ const basicFormRef = ref()
// }
/** 使用决策操作操作 */
const formRef = ref()
const rowData = ref()
const openUseForm = async (type: string, row?: number) => {
tableData.value = [] //
rowData.value = row
formRef.value.open(type, row)
}
@ -395,7 +396,6 @@ const submitForm = async (formType, data) => {
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
handleOrderPub(rowData.value )
//
getList()
} finally {

8
src/views/qms/inspectionRecordFirst/index.vue

@ -1,7 +1,13 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="InspectionRecordMain.allSchemas.searchSchema" @search="setSearchParams"
@reset="setSearchParams({
available: true,
inspectionType:'11'
})"
/>
/>
</ContentWrap>
<!-- 列表头部 -->

4
src/views/qms/inspectionRequest/index.vue

@ -5,7 +5,9 @@
<Search
:schema="InspectionMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
@reset="setSearchParams({
available: true
})"
/>
</ContentWrap>

Loading…
Cancel
Save