Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

hella_online_20240829
陈薪名 4 months ago
parent
commit
5358f8cbf1
  1. 5
      src/api/qms/inspectionQ1/index.ts
  2. 5
      src/api/qms/inspectionQ2/index.ts
  3. 5
      src/api/qms/inspectionQ3/index.ts
  4. 6
      src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
  5. 7
      src/utils/dict.ts
  6. 40
      src/views/qms/inspectionQ1/index.vue
  7. 22
      src/views/qms/inspectionQ1/inspectionQ1.data.ts
  8. 40
      src/views/qms/inspectionQ2/index.vue
  9. 16
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  10. 42
      src/views/qms/inspectionQ3/index.vue
  11. 93
      src/views/qms/inspectionQ3/inspectionQ3.data.ts
  12. 16
      src/views/qms/inspectionRecord/detail.vue
  13. 29
      src/views/qms/inspectionRecord/index.vue
  14. 101
      src/views/qms/inspectionRecordFirst/addForm.vue
  15. 407
      src/views/qms/inspectionRecordFirst/detail.vue
  16. 270
      src/views/qms/inspectionRecordFirst/index.vue
  17. 456
      src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts
  18. 312
      src/views/qms/inspectionRecordFirst/useAddForm.vue
  19. 2
      src/views/wms/basicDataManage/labelManage/locationLabel/index.vue
  20. 2
      src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue
  21. 2
      src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue
  22. 2
      src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue
  23. 2
      src/views/wms/countManage/count/countJobMain/index.vue
  24. 2
      src/views/wms/countManage/count/countPlanMain/index.vue
  25. 2
      src/views/wms/countManage/count/countRecordMain/index.vue
  26. 2
      src/views/wms/countManage/count/countRequestMain/index.vue
  27. 2
      src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue
  28. 2
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue
  29. 2
      src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue
  30. 2
      src/views/wms/inventoryManage/package/index.vue
  31. 2
      src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue
  32. 2
      src/views/wms/inventoryjobManage/packageManage/packagemergeMain/index.vue
  33. 2
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue
  34. 2
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue
  35. 2
      src/views/wms/inventoryjobManage/packageManage/packagesplitMain/index.vue
  36. 2
      src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue
  37. 2
      src/views/wms/issueManage/pick/pickJobMain/index.vue
  38. 2
      src/views/wms/issueManage/pick/pickRecordMain/index.vue
  39. 2
      src/views/wms/issueManage/pick/pickRequestMain/index.vue
  40. 2
      src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue
  41. 2
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  42. 2
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue
  43. 2
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue
  44. 2
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  45. 2
      src/views/wms/moveManage/itemChange/index.vue
  46. 2
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue
  47. 2
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue
  48. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue
  49. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  50. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue

5
src/api/qms/inspectionQ1/index.ts

@ -65,3 +65,8 @@ export const exportQ1 = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/qms/inspectionQ1/get-import-template' })
}
// 完成
export const finishQ1 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ1/finish?id=` + id })
}

5
src/api/qms/inspectionQ2/index.ts

@ -66,3 +66,8 @@ export const exportQ2 = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/qms/inspectionQ2/get-import-template' })
}
// 完成
export const finishQ2 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ2/finish?id=` + id })
}

5
src/api/qms/inspectionQ3/index.ts

@ -66,3 +66,8 @@ export const exportQ3 = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/qms/inspectionQ3/get-import-template' })
}
// 完成
export const finishQ3 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ3/finish?id=` + id })
}

6
src/api/qms/inspectionRecord/inspectionRecordMain/index.ts

@ -56,8 +56,13 @@ export const deleteInspectionRecordMain = async (id: number) => {
// 导出检验申请 Excel
export const exportInspectionRecordMain = async (params) => {
if (params.isSearch) {
const data = { ...params }
return await request.downloadPost({ url: `/qms/inspection-record-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/qms/inspection-record-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
@ -67,3 +72,4 @@ export const importTemplate = () => {
export const publishInspectionRecordMain = async (id) => {
return await request.put({ url: `/qms/inspection-record-main/publish?id=`+id })
}

7
src/utils/dict.ts

@ -318,6 +318,13 @@ export enum DICT_TYPE {
QUALITY_NOTIFICATION_TYPE = 'quality_notification_type', // 质量通知类型
QUALITY_NOTICE_STATUS = 'quality_notice_status', // 质量通知状态
QUALITY_TASK_STATUS = 'quality_task_status', // 质量通知任务状态
QUALITY_NOTIFICATION_PRIORITY = 'quality_notification_priority', // 质量通知优先级
CLAIM_REASON = 'claim_Reason', // 质量通知索赔原因
QMS_CODE = 'qms_code', // 质量通知代码
DEFECT_LOCATION = 'defect_location', // 质量通知缺陷位置
DEFECT_TYPE = 'defect_type', // 质量通知缺陷类型
PROBLEM_REASON = 'problem_reason', // 质量通知问题原因
// ========== 业务 - mes -gaojs ==========
QUALIFY_STATUS = 'qualify_status', //质检状态

40
src/views/qms/inspectionQ1/index.vue

@ -33,7 +33,7 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -66,6 +66,9 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
defineOptions({ name: 'InspectionQ1' })
const message = useMessage() //
@ -105,9 +108,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn({hasPermi:'wms:q1:import'}), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultAddBtn({hasPermi:'qms:Q1:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'qms:Q1:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'qms:Q1:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -137,11 +140,22 @@ const buttonBaseClick = (val, item) => {
}
}
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:q1:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:q1:delete'}), //
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q1:update'}), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q1:delete'}), //
defaultButtons.mainListFinishBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q1:finish'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
@ -149,7 +163,18 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}else if (val == 'finish') { //
handleFinish(row.id)
}
}
const handleFinish = async (id: number) => {
try {
await Q1Api.finishQ1(id)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 添加/修改操作 */
@ -160,6 +185,7 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType, data) => {
data.responUser = userStore.getUser.id
var isHave =Q1.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});

22
src/views/qms/inspectionQ1/inspectionQ1.data.ts

@ -10,6 +10,9 @@ import { Customeritem } from '@/views/wms/basicDataManage/customerManage/custome
import * as QadCostcentreApi from '@/api/wms/qadCostcentre'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
// 表单校验
export const Q1Rules = reactive({
customerCode: [required],
@ -35,7 +38,7 @@ export const Q1 = useCrudSchemas(
table: {
width: 150,
fixed: 'left'
},
}
},
{
label: '状态',
@ -164,7 +167,7 @@ export const Q1 = useCrudSchemas(
label: '编码',
field: 'code',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictType: DICT_TYPE.QMS_CODE,
dictClass: 'string',
isSearch: false,
isTable: true,
@ -176,7 +179,7 @@ export const Q1 = useCrudSchemas(
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string',
isSearch: false,
isTable: true,
@ -188,7 +191,14 @@ export const Q1 = useCrudSchemas(
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false
isSearch: false,
isForm: true,
form: {
componentProps: {
value: userStore.getUser.nickname,
disabled: true
}
}
},
{
label: '索赔金额',
@ -232,7 +242,7 @@ export const Q1 = useCrudSchemas(
label: '索赔原因',
field: 'claimReason',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictType: DICT_TYPE.CLAIM_REASON,
dictClass: 'string',
isSearch: false,
isTable: true,
@ -281,7 +291,7 @@ export const Q1 = useCrudSchemas(
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
valueFormat: 'x',
}
}
},

40
src/views/qms/inspectionQ2/index.vue

@ -33,7 +33,7 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -66,6 +66,9 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
defineOptions({ name: 'InspectionQ2' })
const message = useMessage() //
@ -113,9 +116,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn({hasPermi:'wms:q2:import'}), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultAddBtn({hasPermi:'qms:Q2:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'qms:Q2:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'qms:Q2:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -145,11 +148,22 @@ const buttonBaseClick = (val, item) => {
}
}
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:q2:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:q2:delete'}), //
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q2:update'}), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q2:delete'}), //
defaultButtons.mainListFinishBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q2:finish'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
@ -157,7 +171,18 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}else if (val == 'finish') { //
handleFinish(row.id)
}
}
const handleFinish = async (id: number) => {
try {
await Q2Api.finishQ2(id)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 添加/修改操作 */
@ -168,6 +193,7 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType, data) => {
data.responUser = userStore.getUser.id
var isHave =Q2.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});

16
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -16,6 +16,9 @@ import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/su
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
import { PurchasereceiptRecordMain1 } from '@/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
// 表单校验
export const Q2Rules = reactive({
number: [required],
@ -232,7 +235,7 @@ export const Q2 = useCrudSchemas(
label: '编码',
field: 'code',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictType: DICT_TYPE.QMS_CODE,
dictClass: 'string',
isSearch: false,
isTable: true,
@ -245,7 +248,7 @@ export const Q2 = useCrudSchemas(
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string',
isSearch: false,
isTable: true,
@ -257,7 +260,14 @@ export const Q2 = useCrudSchemas(
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false
isSearch: false,
isForm: true,
form: {
componentProps: {
value: userStore.getUser.nickname,
disabled: true
}
}
},
{
label: '索赔金额',

42
src/views/qms/inspectionQ3/index.vue

@ -33,7 +33,7 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -66,6 +66,9 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
defineOptions({ name: 'InspectionQ3' })
const message = useMessage() //
@ -82,7 +85,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
const setV = {}
if(formField == 'itemCode'){
console.log(val);
setV['uom'] = val[0]['customerUom']
setV['uom'] = val[0]['uom']
}
if (formField == 'q1Number') {
console.log(123)
@ -107,9 +110,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn({hasPermi:'wms:q3:import'}), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultAddBtn({hasPermi:'qms:Q3:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'qms:Q3:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'qms:Q3:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(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 = [
defaultButtons.mainListEditBtn({hasPermi:'wms:q3:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:q3:delete'}), //
const butttondata = (row) => {
return [
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) => {
@ -151,7 +165,18 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
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 {}
}
/** 添加/修改操作 */
@ -162,6 +187,7 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType, data) => {
data.responUser = userStore.getUser.id
var isHave =Q3.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});

93
src/views/qms/inspectionQ3/inspectionQ3.data.ts

@ -7,8 +7,11 @@ import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as CustomeritemApi from '@/api/wms/customeritem'
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
// 表单校验
export const Q3Rules = reactive({
@ -93,40 +96,37 @@ export const Q3 = useCrudSchemas(
table: {
width: 150
},
isSearch: true,
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '客户物料信息', // 查询弹窗标题
searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类
searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
message: '请填写客户代码!',
isMainValue: true
}
],
verificationParams: [
{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
]
}
}
},
@ -165,7 +165,7 @@ export const Q3 = useCrudSchemas(
label: '编码',
field: 'code',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictType: DICT_TYPE.QMS_CODE,
dictClass: 'string',
isSearch: false,
isTable: true,
@ -173,36 +173,47 @@ export const Q3 = useCrudSchemas(
type: 'Select'
}
},
{
label: '缺陷位置',
field: 'defectLocation',
sort: 'custom',
dictType: DICT_TYPE.DEFECT_LOCATION,
dictClass: 'string',
isSearch: false,
isTable: false
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '缺陷类型',
field: 'defectType',
sort: 'custom',
dictType: DICT_TYPE.DEFECT_TYPE,
dictClass: 'string',
isSearch: false,
isTable: false,
form: {
component: 'SelectV2'
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '问题原因',
field: 'problemReason',
sort: 'custom',
dictType: DICT_TYPE.PROBLEM_REASON,
dictClass: 'string',
isSearch: false,
isTable: false
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string',
isSearch: false,
isTable: true,
@ -214,7 +225,14 @@ export const Q3 = useCrudSchemas(
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false
isSearch: false,
isForm: true,
form: {
componentProps: {
value: userStore.getUser.nickname,
disabled: true
}
}
},
{
label: '金额',
@ -235,12 +253,12 @@ export const Q3 = useCrudSchemas(
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isForm: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchListPlaceholder: '请选择成本中心', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
@ -297,7 +315,8 @@ export const Q3 = useCrudSchemas(
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: false
isSearch: false,
isForm: false
},
{
label: '创建时间',

16
src/views/qms/inspectionRecord/detail.vue

@ -256,7 +256,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-for="(cur, i) in item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList" :key="i" style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-col :span="24" v-for="(cur, i) in item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList" :key="i" style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
@ -276,7 +276,18 @@
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'">
<el-form-item label="选定集">
<el-input v-model="cur.number" placeholder="" type="number" disabled/>
<el-select
v-model="cur.qualitativeCode"
placeholder="请选择选定集"
disabled
>
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'" >
@ -367,6 +378,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList = item.inspectionRecordCharacteristicsRespVO.featureType == 1 ? item.inspectionRecordCharacteristicsRespVO.qualitativeRespVOList : item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList
})
data.value.subList = list
} finally {

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

@ -36,16 +36,7 @@
:formAllSchemas="InspectionRecordMain.allSchemas"
@submitForm="submitForm"
/>
<!-- 新增 -->
<AddForm
ref="basicFormRef"
basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
:formAllSchemasProcess="InspectionTemplateProcess.allSchemas"
:formAllSchemasMain="InspectionTemplateMain.allSchemas"
:rules="InspectionTemplateRules"
@submitForm="submitForm"
/>
<Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionRecordMain.allSchemas"
@ -72,7 +63,6 @@
import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import UseAddForm from './useAddForm.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
@ -116,26 +106,13 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const { getList, setSearchParams } = tableMethods
//
let HeadButttondata = []
//
if (routeName.value == 'inspectionRecordMain') {
// [
HeadButttondata = [
let HeadButttondata = [
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
}else if (routeName.value == 'inspectionRecordMainFirst') {
// [
HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
}
//
const buttonBaseClick = (val, item) => {

101
src/views/qms/inspectionRecord/addForm.vue → src/views/qms/inspectionRecordFirst/addForm.vue

@ -76,7 +76,14 @@
</el-col>
<el-col :span="12">
<el-form-item label="检验时间" prop="inspectionTime">
<el-input v-model="data.inspectionTime" placeholder="请填写检验时间" />
<!-- <el-input v-model="data.inspectionTime" placeholder="请填写检验时间" /> -->
<el-date-picker
v-model="data.inspectionTime"
type="datetime"
placeholder="请选择检验时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -570,8 +577,7 @@ import { getCurrentInstance } from 'vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import { SearchTable } from '@/components/SearchTable'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
import * as InspectionRecordDetail from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
@ -730,9 +736,8 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
allSamplePieceSize.value = 0 //0
if (row) {
data.value = JSON.parse(JSON.stringify(row))
nextTick(() => {
formMainRef.value.setValues(row)
})
let list = await InspectionRecordDetail.getInspectionRecordDetailList(data.value.id)
await processList( data.value,list)
} else {
data.value = {
code: '',
@ -751,6 +756,87 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
dialogVisible.value = true
tabIndex = data.value.subList.length + 1
}
//
const processList =async (InspectionSchemeObj,list) => {
editableTabsValue.value = 1
list.forEach((item, index) => {
item.name = index + 1
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionRecordCharacteristicsRespVO
item.isPass = '' //
//
allSamplePieceSize.value += parseFloat(
(
parseFloat(item.samplingProcessRespVO.sampleQty) *
parseFloat(InspectionSchemeObj.samplePieceSize)
).toFixed(6)
)
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1 ? item.inspectionJobCharacteristicsUpdateReqVO.qualitativeRespVOList : item.inspectionJobCharacteristicsUpdateReqVO.quantifyRespVOList
if (!item?.inspectionJobCharacteristicsUpdateReqVO?.recordInspectionQuantifyList) {
//
if (item?.inspectionJobCharacteristicsUpdateReqVO?.resultEntryMethod == 2) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
for (
let i = 0;
i < parseInt(item.samplingProcessRespVO.sampleQty);
i++
) {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue: '', //
qualitativeCode: '', //
defectLevel: '', //
qualifiedQuantity: '', //
unqualifiedQuantity: '' //
})
}
} else {
//
console.log(2333,item.inspectionJobCharacteristicsUpdateReqVO)
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue: '', //
qualitativeCode: '', //
defectLevel: '', //
qualifiedQuantity: parseFloat(
(
parseFloat(item.samplingProcessRespVO.sampleQty) *
parseFloat(InspectionSchemeObj.samplePieceSize)
).toFixed(6)
), //
unqualifiedQuantity: '0' //
})
}
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
} else {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
}
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true
} else {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false
}
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true
} else {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = false
}
if (item.samplingProcessRespVO.evaluationMode == 1) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = true
} else {
rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false
}
})
data.value.subList = list
}
defineExpose({ open, dialogVisible, formLoading }) // open
import type { TabPaneName } from 'element-plus'
@ -853,14 +939,13 @@ const validateForm = (formRef) => {
}
const submitForm = async () => {
try {
await formMainRef.value.validate()
const bol2 = await validateForm(formFeaturesRef.value)
if (!bol2) {
message.error(`模板中有检验工序和检验特性未填写完全`)
return
}
debugger
//
let arrBol = []
let isOutweigh = [] //

407
src/views/qms/inspectionRecordFirst/detail.vue

@ -0,0 +1,407 @@
<template>
<div>
<el-drawer
v-model="isShowDrawer"
title="详情"
direction="rtl"
size="80%"
v-loading="detailLoading"
>
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions
:data="data"
labelClassName="label-class-name"
label-align="left"
direction="vertical"
:column="8"
:schema="allSchemas.detailSchema"
:columns="2"
width="200px"
/>
</ContentWrap>
<ContentWrap>
<el-tabs
v-model="editableTabsValue"
class="demo-tabs"
type="border-card"
tab-position="left"
:stretch="false"
>
<el-tab-pane
v-for="item in data.subList"
:key="item.name"
:label="item.processDescribe"
:name="item.name"
>
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="small-title">检验特性</div>
<el-form :model="item" label-width="auto" ref="formFeaturesRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.number"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionRecordCharacteristicsRespVO.description">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.description" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法"
prop="inspectionRecordCharacteristicsRespVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionMethodName"
disabled
placeholder="请输入检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程"
prop="inspectionRecordCharacteristicsRespVO.inspectionMethod"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName"
disabled
placeholder="请输入采样过程"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采样过程编码" prop="inspectionRecordCharacteristicsRespVO.samplingProcessCode">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName" disabled placeholder="请选择采样过程编码" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionRecordCharacteristicsRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.sampleQty" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item
label="动态修改规则编码"
prop="inspectionRecordCharacteristicsRespVO.dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.dynamicUpdateName"
disabled
placeholder="请输入动态修改规则编码"
/>
</div>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"
prop="inspectionRecordCharacteristicsRespVO.isCanUpdate"
>
<el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionRecordCharacteristicsRespVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event,item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionRecordCharacteristicsRespVO.featureType">
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionRecordCharacteristicsRespVO.inspectionStartTime">
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="inspectionRecordCharacteristicsRespVO.inspectionEndTime">
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计量单位" prop="inspectionRecordCharacteristicsRespVO.quantifyUom" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.quantifyUom" placeholder="请选择计量单位" disabled >
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.UOM)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="小数位" prop="inspectionRecordCharacteristicsRespVO.quantifyDecimal" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyDecimal" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item label="是否设定上限" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" label="是否设定下限" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsTarget" label="是否设定目标值" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping">
<el-form-item label="上限值" prop="inspectionRecordCharacteristicsRespVO.quantifyCapping" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyCapping" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit">
<el-form-item label="下限值" prop="inspectionRecordCharacteristicsRespVO.quantifyLowlimit" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyLowlimit" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget">
<el-form-item label="目标值" prop="inspectionRecordCharacteristicsRespVO.quantifyTarget" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyTarget" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="评估代码">
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.estimateCode" placeholder="请选择评估代码" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value" :label="dict.label" :value="dict.value" disabled/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-for="(cur, i) in item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList" :key="i" style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="合格数量">
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="不合格数量">
<el-input v-model="cur.unqualifiedQuantity" type="number" placeholder="请输入不合格数量" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '0'">
<el-form-item label="检验值">
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'">
<el-form-item label="选定集">
<el-select
v-model="cur.qualitativeCode"
placeholder="请选择选定集"
disabled
>
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'" >
<el-form-item label="缺陷级别">
<el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注">
<el-input v-model="cur.remark" placeholder="" type="number" disabled/>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
</ContentWrap>
</el-drawer>
</div>
</template>
<script lang="ts" setup>
import * as InspectionRecordDetailPageApi from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'InspectionRecordDetail' })
const editableTabsValue = ref('1')
const message = useMessage() //
const { t } = useI18n() //
const updateKey = ref(0)
const props = defineProps({
//
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
data.value = row
let list = []
list = await InspectionRecordDetailPageApi.getInspectionRecordDetailList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList = item.inspectionRecordCharacteristicsRespVO.featureType == 1 ? item.inspectionRecordCharacteristicsRespVO.qualitativeRespVOList : item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList
})
data.value.subList = list
} finally {
detailLoading.value = false
}
}
}
defineExpose({ openDetail }) // open
</script>
<style lang="scss">
.el-drawer__body {
background: #f5f5f5 !important;
}
::v-deep(.label-class-name) {
color: #dedede;
}
</style>
<style scoped lang="scss"></style>

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

@ -0,0 +1,270 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="InspectionRecordMain.allSchemas" />
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 新增 -->
<AddForm
ref="basicFormRef"
basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
:formAllSchemasProcess="InspectionTemplateProcess.allSchemas"
:formAllSchemasMain="InspectionTemplateMain.allSchemas"
:rules="InspectionTemplateRules"
@submitForm="submitForm"
/>
<Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordDetail.allSchemas" :detailAllSchemasRules="InspectionRecordDetailRules"
:apiCreate="InspectionRecordDetailApi.createInspectionRecordDetail"
:apiUpdate="InspectionRecordDetailApi.updateInspectionRecordDetail"
:apiPage="InspectionRecordDetailApi.getInspectionRecordDetailPage"
:apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true"
/>
<!-- 包装信息 --> <ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordPackage.allSchemas" :detailAllSchemasRules="InspectionRecordPackageRules"
:list="list"/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { InspectionRecordMain, InspectionRecordMainRules, InspectionRecordDetail, InspectionRecordDetailRules,InspectionRecordPackage, InspectionRecordPackageRules} from './inspectionRecordFirstMain.data'
// import { InspectionJobPackage,InspectionJobPackageRules} from '../inspectionJob/inspectionJobMain.data'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordDetailApi from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
//
defineOptions({ name: 'InspectionRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionRecordMain.allSchemas.tableColumns)
if(routeName.value=='InspectRecordMain'){
tableColumns.value = tableColumns.value.filter(item=>{
return item.label!='操作'
})
}
//
const updataTableColumns = (val) => {
if(routeName.value=='InspectRecordMain'){
tableColumns.value = val.filter(item=>{
return item.label!='操作'
})
}else{
tableColumns.value = val
}
}
//
const { tableObject, tableMethods } = useTable({
getListApi: InspectionRecordMainApi.getInspectionRecordMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
let HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
const isShowMainButton = (row, val) => {
if(!row.callbackRequestNumber) {//callbackRequestNumber使
return true;
}
if(row.useDecision) {
return row.isPublished
} else {
return val ? true : false
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:inspection-recode-first-main:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi: 'wms:inspection-recode-first-main:delete' }), //
defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, 'publish'), hasPermi:'qms:inspection-recode-first-main:pub'}), //
]
}
const listTableRef = ref()
const list = ref([])
const useDecisionList = getStrDictOptions(DICT_TYPE.USAGE_DECISION)
// const useDecisionList = InspectionRecordMain.allSchemas.formSchema.filter(item=>item.field == "useDecision")
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
}else if (val == 'delete') { //
handleDelete(row.id)
}else if (val == 'mainOrderPub') { //
handleOrderPub(row)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = async (type : string, row ?: number) => {
tableData.value = [] //
basicFormRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionRecordMain')
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {
//
await message.delConfirm()
//
await InspectionRecordMainApi.deleteInspectionRecordMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
/** 发布按钮操作 */
const handleOrderPub = async (row : object) => {
try {
//
await message.confirm(t('common.confirmPublish'))
//
await InspectionRecordMainApi.publishInspectionRecordMain(row.id)
message.success(t('common.publishSuccess'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
download.excel(data, '备件申领记录主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
InspectionRecordDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
// //
const submitForm = async (formType, data) => {
// data.subList = tableData.value //
try {
if (formType === 'create') {
await InspectionRecordMainApi.createInspectionRecordMain(data)
message.success(t('common.createSuccess'))
}else {
await InspectionRecordMainApi.updateInspectionRecordMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
//
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
//
const searchFormClick = (searchData) => {
searchData.filters.push({
action: "==",
column: "firstInspectionAdded",
value: "TRUE"
})
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
available: true,
firstInspectionAdded:'TRUE'
}
getList()
})
</script>

456
src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts

@ -0,0 +1,456 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime'
import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
* @returns {Array}
*/
export const InspectionRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '记录编码',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 200,
fixed: 'left'
}
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
{
label: '检验批次',
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
{
label: '检验批数量',
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
{
label: '检验方案编码',
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
}
},
{
label: '检验人',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '检验时间',
field: 'inspectionTime',
sort: 'custom',
isDetail: true,
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 200,
fixed: 'right'
}
}
])
)
//表单校验
export const InspectionRecordMainRules = reactive({
useDecision: [required],
})
/**
* @returns {Array}
*/
export const InspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isTable: false,
isSearch: false,
isForm: false,
},
{
label: '记录编码',
field: 'recordCode',
sort: 'custom',
isSearch: false,
},
{
label: '工序编码',
field: 'processCode',
sort: 'custom',
isSearch: false,
},
{
label: '工序描述',
field: 'processDescribe',
sort: 'custom',
isSearch: false,
},
{
label: '顺序号',
field: 'sequenceCode',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '是否破坏性检验',
field: 'isDestroyInspection',
sort: 'custom',
isSearch: false,
form: {
component: 'Radio'
},
},
{
label: '检验开始时间',
field: 'inspectionStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '检验结束时间',
field: 'inspectionEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '检验人',
field: 'inspectionOperator',
sort: 'custom',
isSearch: false,
},
{
label: '检验特性编码',
field: 'inspectionFeaturesCode',
sort: 'custom',
isSearch: false,
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// isSearch: false,
// },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false,
}
]))
//表单校验
export const InspectionRecordDetailRules = reactive({
recordCode: [required],
processCode: [required],
sequenceCode: [required],
isDestroyInspection: [required],
available: [required],
})
/**
* @returns {Array}
*/
export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true,
width:200
},
table:{
width:150
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true,
width:160
},
table:{
width:150
}
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true,
width:150
},
table:{
width:150
}
},
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
tableForm:{
disabled:true,
width:120
},
table:{
width:150
}
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true,
width:120
},
table:{
width:150
}
},
{
label: '采样数量',
field: 'sampleAmount',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true,
width:100
},
table:{
width:150
}
},
{
label: '合格数量',
field: 'qualifiedAmount',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true,
width:100
},
table:{
width:150
}
},
{
label: '不合格数量',
field: 'noQualifiedAmount',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true,
width:100
},
table:{
width:150
}
},
{
label: '破坏数量',
field: 'destroyAmount',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true,
width:100
},
table:{
width:150
}
},
{
label: '冻结数量',
field: 'frozenAmount',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true,
width:100
},
table:{
width:150
}
}
]))
//表单校验
export const InspectionRecordPackageRules = reactive({
qualifiedAmount: [
required,
{ validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
],
frozenAmount: [
required,
{ validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
],
destroyAmount: [
required,
{ validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
],
noQualifiedAmount: [
required,
{ validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
],
})

312
src/views/qms/inspectionRecordFirst/useAddForm.vue

@ -0,0 +1,312 @@
<template>
<div>
<Dialog
:title="dialogTitle"
v-model="dialogVisible"
:width="dialogWidth"
:close-on-click-modal="false"
:vLoading="formLoading"
>
<div style="max-height: 80vh; overflow-y: auto; padding: 0px 20px">
<Form
ref="formMainRef"
:rules="rules"
:schema="formSchema"
:is-col="true"
@onChange="onChange"
/>
<div class="small-title">包装列表</div>
<div style="border:1px solid #dedede;margin-bottom:20px;display: flex;">
<TableForm
ref="tableFormRef"
style="width:100%;"
:maxHeight = "490"
:tableFields="tableSchemas.tableFormColumns"
:tableFormRules="tableFormRules"
:tableData="data.packageList"
:isShowButton="false"
:isShowReduceButton="false"
@inputStringBlur="tableFormBlur"
/>
</div>
</div>
<template #footer>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
</Dialog>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</div>
</template>
<script setup lang="ts">44
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getCurrentInstance } from 'vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { SearchTable } from '@/components/SearchTable'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordPackageApi from '@/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage'
const { proxy } = getCurrentInstance()
const message = useMessage() //
const props = defineProps({
//
basicFormWidth: {
type: String,
default: ''
},
//
footButttondata: {
type: Array,
required: false,
default: null
},
//
formAllSchemas: {
type: Object,
required: true,
default: null
},
// rules
rules: {
type: Object,
required: true,
default: null
},
//
tableAllSchemas: {
type: Array,
required: true,
default: null
},
tableFormRules: {
type: Array,
required: true,
default: null
},
})
const { t } = useI18n() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const dialogWidth = ref()
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
const formMainRef = ref()
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
if (props.basicFormWidth) {
dialogWidth.value = props.basicFormWidth + '%'
} else {
dialogWidth.value = props.isBusiness ? '60%' : '40%'
}
/** 打开弹窗 */
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => {
dialogTitle.value = t('action.applyDecision')
formType.value = type
if (row) {
data.value = JSON.parse(JSON.stringify(row))
data.value.packageList = await InspectionRecordPackageApi.getInspectionRecordPackageList(row.id)
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.qualifiedAmount?item.qualifiedAmount:0
item.noQualifiedAmount = item.noQualifiedAmount?item.noQualifiedAmount:0
item.destroyAmount = item.destroyAmount?item.destroyAmount:0
item.frozenAmount = item.frozenAmount?item.frozenAmount:0
})
dialogVisible.value = true
tableSchemas.value.tableFormColumns.map(item=>{
item.tableForm.disabled = true
})
// 1使
if(row.estimateCode == 1){
data.value.useDecision = '1'
}else{
data.value.useDecision =''
}
// ==
if(data.value.useDecision == 1){
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.amount
})
}
//
else if(data.value.useDecision == 2 || data.value.useDecision == 6){
tableSchemas.value.tableFormColumns.map(item=>{
if(item.field == 'noQualifiedAmount'){
item.tableForm.disabled = false
}else{
item.tableForm.disabled = true
}
})
}
//
else if(data.value.useDecision == 3){
data.value.packageList.forEach(item=>{
item.noQualifiedAmount = item.amount
})
}
else if(data.value.useDecision == 4){
data.value.packageList.forEach(item=>{
item.frozenAmount = item.amount
})
}
nextTick(() => {
formMainRef.value.setValues( data.value)
})
}
dialogVisible.value = true
}
defineExpose({ open, dialogVisible, formLoading }) // open
// console.log(11,tableAllSchemas.value.tableFormColumns)
//
const emit = defineEmits([
'onChange',
'submitForm'
])
/** 弹窗按钮 */
let Butttondata: any = []
if (props.footButttondata) {
Butttondata = props.footButttondata
} else {
Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
const onChange = (field, cur)=>{
if(field=='useDecision'){
tableSchemas.value.tableFormColumns.map(item=>{
item.tableForm.disabled = true
})
data.value.packageList.forEach(item=>{
item.qualifiedAmount =0
item.noQualifiedAmount =0
item.destroyAmount =0
item.frozenAmount =0
})
// ==
if(cur == 1){
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.amount
})
}
//
else if(cur == 2 || cur == 6){
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.amount
})
tableSchemas.value.tableFormColumns.map(item=>{
if(item.field == 'noQualifiedAmount'){
item.tableForm.disabled = false
}else{
item.tableForm.disabled = true
}
})
}
//
else if(cur == 3){
data.value.packageList.forEach(item=>{
item.noQualifiedAmount = item.amount
})
}
else if(cur == 4){
data.value.packageList.forEach(item=>{
item.frozenAmount = item.amount
})
}
}
}
//
const tableFormBlur = (field, val,row)=>{
if( row.amount < val){
row.noQualifiedAmount = row.amount
row.qualifiedAmount = 0
}else{
row.qualifiedAmount = row.amount - val
row.qualifiedAmount = row.qualifiedAmount.toFixed(6)
}
}
const buttonBaseClick = (val) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
const tableFormRef = ref()
const submitForm = async () => {
try {
const elForm = unref(formMainRef)?.getElFormRef()
//
if (!elForm) return
const valid = await elForm.validate()
if (!valid) return
//
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
const data1 = unref(formMainRef)?.formModel
data.value.useDecision = data1.useDecision
if(data1.useDecision == 2 || data1.useDecision == 6){
if(data.value.packageList.length>0){
let isBol = data.value.packageList.filter(cur=>parseFloat(cur.qualifiedAmount)+parseFloat(cur.noQualifiedAmount)!=parseFloat(cur.amount))
console.log(isBol)
if(isBol&&isBol.length>0){
message.error(`合格数量和不合格数量总和不等于数量`)
return
}
}
}
if (formType.value == 'create') {
//
emit('submitForm', formType.value, data.value)
} else {
// /
emit('submitForm', formType.value, data.value)
}
} catch {
console.log(111)
}
}
</script>
<style scoped>
.small-title {
font-weight: bold;
padding: 0px 10px 10px;
color: #1a8bfc;
font-size: 16px;
}
</style>
<style>
.el-tabs--left .el-tabs__header.is-left {
min-height: 700px !important;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {
min-width: 120px !important;
}
</style>

2
src/views/wms/basicDataManage/labelManage/locationLabel/index.vue

@ -150,7 +150,7 @@ const openForm = (type: string, row?: number) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"labelBarbasic")
}
/** 删除按钮操作 */

2
src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue

@ -219,7 +219,7 @@ const openForm = (type: string, row?: number) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"labelBarbasic")
}
/** 删除按钮操作 */

2
src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue

@ -220,7 +220,7 @@ const openForm = (type: string, row?: number) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"labelBarbasic")
}
/** 删除按钮操作 */

2
src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue

@ -202,7 +202,7 @@ const openForm =async (type: string, row?: number) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"labelBarbasic")
}
/** 删除按钮操作 */

2
src/views/wms/countManage/count/countJobMain/index.vue

@ -282,7 +282,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"jobCountMain")
}
/** 导出按钮操作 */

2
src/views/wms/countManage/count/countPlanMain/index.vue

@ -457,7 +457,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
// getAreaAllList()
// getLocationgroupAllList()
// getLocationAllList()
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"planCountMain")
}
//
const detailOpenForm = (type, row) => {

2
src/views/wms/countManage/count/countRecordMain/index.vue

@ -154,7 +154,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordCountMain")
}
/** 导出按钮操作 */

2
src/views/wms/countManage/count/countRequestMain/index.vue

@ -458,7 +458,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"requestCountMain")
}
/** 删除按钮操作 */

2
src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue

@ -140,7 +140,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordCountadjustMain")
}
/** 导出按钮操作 */

2
src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

@ -288,7 +288,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"requestCountadjustMain")
}
/** 删除按钮操作 */

2
src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue

@ -245,7 +245,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"transactionContainerMain")
}
/** 删除按钮操作 */

2
src/views/wms/inventoryManage/package/index.vue

@ -205,7 +205,7 @@ const openForm =async (type: string, row?: number) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"transactionPackage")
}
/** 删除按钮操作 */

2
src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue

@ -197,7 +197,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordContainerMain")
}
/** 添加/修改操作 */

2
src/views/wms/inventoryjobManage/packageManage/packagemergeMain/index.vue

@ -128,7 +128,7 @@ const buttonTableClick = async (val, row) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordPackagemergeMain")
}
/** 导出按钮操作 */

2
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue

@ -172,7 +172,7 @@ const handlePoint = async (row) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordPackageoverMain")
}
/** 导出按钮操作 */

2
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue

@ -340,7 +340,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"requestPackageoverMain")
}
/** 删除按钮操作 */

2
src/views/wms/inventoryjobManage/packageManage/packagesplitMain/index.vue

@ -128,7 +128,7 @@ const buttonTableClick = async (val, row) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordPackagesplitMain")
}
/** 导出按钮操作 */

2
src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue

@ -240,7 +240,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"requestOnlinesettlementMain")
}
/** 删除按钮操作 */

2
src/views/wms/issueManage/pick/pickJobMain/index.vue

@ -203,7 +203,7 @@ const buttonTableClick = async (val, row) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"jobPickMain")
}
/** 导出按钮操作 */

2
src/views/wms/issueManage/pick/pickRecordMain/index.vue

@ -136,7 +136,7 @@ const buttonTableClick = async (val, row) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordStockupMain")
}
/** 导出按钮操作 */

2
src/views/wms/issueManage/pick/pickRequestMain/index.vue

@ -245,7 +245,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"requestStockupMain")
}
/** 删除按钮操作 */

2
src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue

@ -190,7 +190,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordInventorychangeMain")
}
/** 导出按钮操作 */

2
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

@ -378,7 +378,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"requestInventorychangeMain")
}
/** 删除按钮操作 */

2
src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue

@ -288,7 +288,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"jobInventorymoveMain")
}
/** 导出按钮操作 */

2
src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue

@ -213,7 +213,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordInventorymoveMain")
}
/** 导出按钮操作 */

2
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -611,7 +611,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
fromWarehouseCodeMain.value = row.fromWarehouseCode
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"requestInventorymoveMain")
}
/** 删除按钮操作 */

2
src/views/wms/moveManage/itemChange/index.vue

@ -150,7 +150,7 @@ const openForm = (type: string, row?: any) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"transactionBalance")
}
/** 删除按钮操作 */

2
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue

@ -144,7 +144,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordPurchaseclaimMain")
}
/** 导出按钮操作 */

2
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

@ -283,7 +283,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam'
const openDetail = (row : any, titleName : any, titleValue : any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"requestPurchaseclaimMain")
}
/** 删除按钮操作 */

2
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

@ -270,7 +270,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any) => {
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"recordSupplierinvoiceMain")
}
const searchList = (model)=>{
if(model.postingDate&&model.postingDate.length>1){

2
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -716,7 +716,7 @@ const handleImport = () => {
detailAnnexTable.value[1].hiddenUpload = true
}
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"requestSupplierinvoiceMain")
}
/** 删除按钮操作 */

2
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue

@ -302,7 +302,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
clicKRowId.value = row.id
detailRef.value.openDetail(row, titleName, titleValue)
detailRef.value.openDetail(row, titleName, titleValue,"requestSupplierinvoiceMain")
}
/** 导出按钮操作 */

Loading…
Cancel
Save