|
@ -33,7 +33,7 @@ |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template #action="{ row }"> |
|
|
<template #action="{ row }"> |
|
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|
|
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
</template> |
|
|
</template> |
|
|
</Table> |
|
|
</Table> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
@ -66,6 +66,9 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
|
|
|
|
|
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
|
|
const userStore = useUserStore() |
|
|
|
|
|
|
|
|
defineOptions({ name: 'InspectionQ3' }) |
|
|
defineOptions({ name: 'InspectionQ3' }) |
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
const message = useMessage() // 消息弹窗 |
|
@ -82,7 +85,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
if(formField == 'itemCode'){ |
|
|
if(formField == 'itemCode'){ |
|
|
console.log(val); |
|
|
console.log(val); |
|
|
setV['uom'] = val[0]['customerUom'] |
|
|
setV['uom'] = val[0]['uom'] |
|
|
} |
|
|
} |
|
|
if (formField == 'q1Number') { |
|
|
if (formField == 'q1Number') { |
|
|
console.log(123) |
|
|
console.log(123) |
|
@ -107,9 +110,9 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultAddBtn(null), // 新增 |
|
|
defaultButtons.defaultAddBtn({hasPermi:'qms:Q3:create'}), // 新增 |
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:q3:import'}), // 导入 |
|
|
defaultButtons.defaultImportBtn({hasPermi:'qms:Q3:import'}), // 导入 |
|
|
defaultButtons.defaultExportBtn(null), // 导出 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'qms:Q3:export'}), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
@ -139,11 +142,22 @@ const buttonBaseClick = (val, item) => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const isShowMainButton = (row,val) => { |
|
|
|
|
|
if (val.indexOf(row.status) > -1) { |
|
|
|
|
|
return false |
|
|
|
|
|
} else { |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = [ |
|
|
const butttondata = (row) => { |
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:q3:update'}), // 编辑 |
|
|
return [ |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:q3:delete'}), // 删除 |
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q3:update'}), // 编辑 |
|
|
] |
|
|
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q3:delete'}), // 删除 |
|
|
|
|
|
defaultButtons.mainListFinishBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q3:finish'}), // 完成 |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
@ -151,9 +165,20 @@ const buttonTableClick = async (val, row) => { |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { // 删除 |
|
|
handleDelete(row.id) |
|
|
handleDelete(row.id) |
|
|
|
|
|
}else if (val == 'finish') { // 删除 |
|
|
|
|
|
handleFinish(row.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const handleFinish = async (id: number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
await Q3Api.finishQ3(id) |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|
const basicFormRef = ref() |
|
|
const basicFormRef = ref() |
|
|
const openForm = (type: string, row?: any) => { |
|
|
const openForm = (type: string, row?: any) => { |
|
@ -161,7 +186,8 @@ const openForm = (type: string, row?: any) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// form表单提交 |
|
|
// form表单提交 |
|
|
const formsSuccess = async (formType,data) => { |
|
|
const formsSuccess = async (formType, data) => { |
|
|
|
|
|
data.responUser = userStore.getUser.id |
|
|
var isHave =Q3.allSchemas.formSchema.some(function (item) { |
|
|
var isHave =Q3.allSchemas.formSchema.some(function (item) { |
|
|
return item.field === 'activeTime' || item.field === 'expireTime'; |
|
|
return item.field === 'activeTime' || item.field === 'expireTime'; |
|
|
}); |
|
|
}); |
|
|