diff --git a/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue b/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue index d13db2240..651457153 100644 --- a/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue +++ b/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue @@ -66,7 +66,7 @@ import * as BarbasicApi from '@/api/wms/barbasic' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as PackageApi from '@/api/wms/package' import { formatTime } from '@/utils/index' -import * as Itempackaging from '@/api/wms/itempackage' +import * as itembasicApi from '@/api/wms/itembasic' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' @@ -110,17 +110,21 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row setV['produceDate'] = '' setV['expireDate'] = '' setV['validityDays'] = val[0]['validityDays'] - await Itempackaging.getItempackagingPage({ - itemCode: val[0]['code'] + await itembasicApi.getItembasicPage({ + code: val[0]['code'] }).then(res => { if (res) { if (res.list.length > 0) { - setV['packQty'] = res.list[0].packQty - setV['packUnit'] = res.list[0].packUnit + setV['packQty'] = res.list[0].defaultPackQty + setV['packUnit'] = res.list[0].defaultPackUnit } } }) } + if(formField == 'packUnit') { + setV['packUnit'] = val[0].packUnit + setV['packQty'] = val[0].packQty + } basicFormRef.setValues(setV) }) } diff --git a/src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts b/src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts index c2e2dabf7..2416e29e9 100644 --- a/src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts +++ b/src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts @@ -1,658 +1,721 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' -import { Itembasic } from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; -import * as ItembasicApi from "@/api/wms/itembasic"; -import { Productionline } from "@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data"; -import * as ProductionlineApi from "@/api/wms/productionline"; -import { Shift } from "@/views/wms/basicDataManage/orderManage/shift/shift.data"; -import * as ShiftApi from "@/api/wms/shift"; -import { Team } from "@/views/wms/basicDataManage/orderManage/team/team.data"; -import * as TeamApi from "@/api/wms/team"; +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' +import * as ItembasicApi from '@/api/wms/itembasic' +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' +import * as ProductionlineApi from '@/api/wms/productionline' +import { Shift } from '@/views/wms/basicDataManage/orderManage/shift/shift.data' +import * as ShiftApi from '@/api/wms/shift' +import { Team } from '@/views/wms/basicDataManage/orderManage/team/team.data' +import * as TeamApi from '@/api/wms/team' + +import * as ItempackagingApi from '@/api/wms/itempackage' +import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' // 表单校验 export const PackageRules = reactive({ number: [required], itemCode: [required], - itemName: [required], + itemName: [required] }) -export const Package = useCrudSchemas(reactive([ - { - label: '标签号', - field: 'number', - sort: 'custom', - isSearch: true, - table: { - fixed: 'left', - width:210 - } - }, - { - label: '标签类型', - field: 'type', - sort: 'custom', - isSearch: false, - dictType: DICT_TYPE.LABEL_TYPE, - dictClass: 'string', - table: { - width: 180 - } - }, - { - label: '标签模板', - field: 'template', - sort: 'custom', - isTable:false, - table: { - width: 180 - } - }, - { - label: '标签状态', - field: 'status', - sort: 'custom', - isTable:false, - isSearch: true, - dictType: DICT_TYPE.LABEL_STATUS, - dictClass: 'string', - table: { - width: 180 - } - }, - { - label: '关联号', - field: 'relateNumber', - sort: 'custom', - isSearch:true, - table: { - width: 210 - } - }, - { - label: '标签条码字符串', - field: 'barcodeString', - sort: 'custom', - table: { - width: 380, - } - }, - // { - // label: '打印次数', - // field: 'printTimes', - // sort: 'custom', - // form: { - // component: 'InputNumber', - // componentProps: { - // min: 0 - // }, - // value: 0 - // }, - // table: { - // width: 180 - // } - // }, - // { - // label: '最后打印时间', - // field: 'lastPrintTime', - // sort: 'custom', - // formatter: dateFormatter, - // form: { - // component: 'DatePicker', - // componentProps: { - // style: {width:'100%'}, - // type: 'datetime', - // dateFormat: 'YYYY-MM-DD HH:mm:ss', - // valueFormat: 'x', - // } - // }, - // table: { - // width: 180 - // } - // }, - // { - // label: '最后打印人ID', - // field: 'lastPrintUserId', - // sort: 'custom', - // table: { - // width: 180 - // } - // }, - // { - // label: '最后打印人用户名', - // field: 'lastPrintUserName', - // sort: 'custom', - // table: { - // width: 180, - // } - // }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - isSearch:true, - isForm: false, - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - search: { - value: 'TRUE', - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' +export const Package = useCrudSchemas( + reactive([ + { + label: '标签号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + fixed: 'left', + width: 210 } }, - table: { - width: 110 - } - }, - { - label: '创建时间', - field: 'createTime', - isForm: false, - table: { - width: 180 - }, - formatter: dateFormatter, - detail: { - dateFormat : 'YYYY-MM-DD HH:mm:ss' - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '标签类型', + field: 'type', + sort: 'custom', + isSearch: false, + dictType: DICT_TYPE.LABEL_TYPE, + dictClass: 'string', + table: { + width: 180 } - } - }, - { - label: '创建者', - field: 'creator', - table: { - width: 130 - }, - isForm: false, - isTable: true - }, - { - label: '最后更新时间', - field: 'updateTime', - sort: 'custom', - isDetail: true, - isForm: false, - isTable: true, - 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: 'template', + sort: 'custom', + isTable: false, + table: { + width: 180 } - } - }, - { - label: '最后更新者', - field: 'updater', - isDetail: true, - isForm: false, - isTable: true, - table: { - width: 150 - } - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } -])) - -export const PackageInventory = useCrudSchemas(reactive([ - { - label: '物料代码', - field: 'itemCode', - sort: 'custom', - isSearch: true, - table: { - width: 150, }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择物料代码', - searchField: 'code', - searchTitle: '物料信息', - searchAllSchemas: Itembasic.allSchemas, - searchPage: ItembasicApi.getItembasicPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, { - key: 'enableMake', - value: 'TRUE', - isMainValue: false - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + { + label: '标签状态', + field: 'status', + sort: 'custom', + isTable: false, + isSearch: true, + dictType: DICT_TYPE.LABEL_STATUS, + dictClass: 'string', + table: { + width: 180 } - } - }, - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - table: { - width: 150, }, - isForm:false - }, - { - label: '物料描述1', - field: 'itemDesc1', - sort: 'custom', - table: { - width: 150, - }, - isForm:false - }, - { - label: '物料描述2', - field: 'itemDesc2', - sort: 'custom', - table: { - width: 150, - }, - isForm:false - }, - { - label: '批次', - field: 'batch', - sort: 'custom', - isSearch: true, - table: { - width: 150, - }, - }, - // { - // label: '替代批次', - // field: 'altBatch', - // sort: 'custom', - // table: { - // width: 150, - // }, - // }, - { - label: '生产日期', - field: 'produceDate', - sort: 'custom', - formatter: dateFormatter2, - search: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - valueFormat: 'YYYY-MM-DD', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')], + { + label: '关联号', + field: 'relateNumber', + sort: 'custom', + isSearch: true, + table: { + width: 210 } }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', + { + label: '标签条码字符串', + field: 'barcodeString', + sort: 'custom', + table: { + width: 380 } }, - table: { - width: 180, - }, - }, - { - label: '有效期(日)', - field: 'validityDays', - sort: 'custom', - form: { - component: 'InputNumber', - componentProps: { - min: 0, - precision: 0, - disabled: true + // { + // label: '打印次数', + // field: 'printTimes', + // sort: 'custom', + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 0 + // }, + // value: 0 + // }, + // table: { + // width: 180 + // } + // }, + // { + // label: '最后打印时间', + // field: 'lastPrintTime', + // sort: 'custom', + // formatter: dateFormatter, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width:'100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // table: { + // width: 180 + // } + // }, + // { + // label: '最后打印人ID', + // field: 'lastPrintUserId', + // sort: 'custom', + // table: { + // width: 180 + // } + // }, + // { + // label: '最后打印人用户名', + // field: 'lastPrintUserName', + // sort: 'custom', + // table: { + // width: 180, + // } + // }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: true, + isForm: false, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + search: { + value: 'TRUE' }, - value: 0 - }, - table: { - width: 150, - }, - }, - { - label: '失效日期', - field: 'expireDate', - sort: 'custom', - formatter: dateFormatter, - search: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')], - disabled: true + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + table: { + width: 110 } }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', - disabled: true + { + label: '创建时间', + field: 'createTime', + isForm: false, + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } }, - table: { - width: 180, + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isForm: false, + isTable: true + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: true, + 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: 'uom', - sort: 'custom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - form: { - component: 'Select' + { + label: '最后更新者', + field: 'updater', + isDetail: true, + isForm: false, + isTable: true, + table: { + width: 150 + } }, - table: { - width: 150, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } + ]) +) + +export const PackageInventory = useCrudSchemas( + reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择物料代码', + searchField: 'code', + searchTitle: '物料信息', + searchAllSchemas: Itembasic.allSchemas, + searchPage: ItembasicApi.getItembasicPage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'enableMake', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } }, - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + table: { + width: 150 + } }, - form: { - component: 'InputNumber', - componentProps: { - min: 0, - precision: 6 + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + { + label: '生产日期', + field: 'produceDate', + sort: 'custom', + formatter: dateFormatter2, + search: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + valueFormat: 'YYYY-MM-DD', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } }, - value: 0 + table: { + width: 180 + } }, - }, - { - label: '替代计量单位', - field: 'altUom', - sort: 'custom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - form: { - component: 'Select' + { + label: '有效期(日)', + field: 'validityDays', + sort: 'custom', + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 0, + disabled: true + }, + value: 0 + }, + table: { + width: 150 + } }, - table: { - width: 150, + { + label: '失效日期', + field: 'expireDate', + sort: 'custom', + formatter: dateFormatter, + search: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')], + disabled: true + } + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + disabled: true + } + }, + table: { + width: 180 + } }, - }, - { - label: '替代数量', - field: 'altQty', - sort: 'custom', - table: { - width: 150, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Select' + }, + table: { + width: 150 + } }, - form: { - component: 'InputNumber', - componentProps: { - min: 0, - precision: 6 + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 }, - value: 0 + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + }, + value: 0 + } }, - }, - { - label: '转换率', - field: 'convertRate', - sort: 'custom', - table: { - width: 150, + { + label: '替代计量单位', + field: 'altUom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Select' + }, + table: { + width: 150 + } }, - }, - { - label: '包装数量', - field: 'packQty', - sort: 'custom', - table: { - width: 150, + { + label: '替代数量', + field: 'altQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + }, + value: 0 + } }, - form: { - componentProps:{ - disabled: true + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 } }, - tableForm: { - disabled: true - } - }, - { - label: '包装规格', - field: 'packUnit', - sort: 'custom', - // dictType: DICT_TYPE.PACK_UNIT, - // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - table: { - width: 150, + + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + isSearch: false, + table: { + width: 120 + }, + isTable: false, + isTableForm: false, + isForm: true, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装规格', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'itemCode', + value: 'itemCode', + message: '请先选择物料代码!', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'packUnit', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装规格', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'itemCode', + value: 'itemCode', + message: '请先选择物料代码!', // 当前置条件为空时 弹出信息提示 + isMainValue: true + } + ], + verificationParams: [ + { + key: 'packUnit', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } }, - form: { - component: 'Select', - componentProps:{ - disabled: true + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 } }, - tableForm: { - disabled: true - } - }, - // { - // label: '生产订单号', - // field: 'woNumber', - // sort: 'custom', - // table: { - // width: 150, - // }, - // form: { - // // labelMessage: '信息提示说明!!!', - // componentProps: { - // isSearchList: true, - // searchListPlaceholder: '请选择物料代码', - // searchField: 'code', - // searchTitle: '物料信息', - // searchAllSchemas: Itembasic.allSchemas, - // searchPage: ItembasicApi.getItembasicPage, - // searchCondition: [{ - // key: 'available', - // value: 'TRUE', - // isMainValue: false - // }] - // } - // } - // }, - // { - // label: '生产订单行', - // field: 'woLine', - // sort: 'custom', - // table: { - // width: 150, - // }, - // }, - { - label: '生产线代码', - field: 'productionLineCodePackage', - sort: 'custom', - table: { - width: 150, + // { + // label: '生产订单号', + // field: 'woNumber', + // sort: 'custom', + // table: { + // width: 150, + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, + // searchListPlaceholder: '请选择物料代码', + // searchField: 'code', + // searchTitle: '物料信息', + // searchAllSchemas: Itembasic.allSchemas, + // searchPage: ItembasicApi.getItembasicPage, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, + // { + // label: '生产订单行', + // field: 'woLine', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + { + label: '生产线代码', + field: 'productionLineCodePackage', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择生产线代码', + searchField: 'code', + searchTitle: '生产线信息', + searchAllSchemas: Productionline.allSchemas, + searchPage: ProductionlineApi.getProductionlinePage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择生产线代码', - searchField: 'code', - searchTitle: '生产线信息', - searchAllSchemas: Productionline.allSchemas, - searchPage: ProductionlineApi.getProductionlinePage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + { + label: '班组代码', + field: 'teamCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择生产线代码', + searchField: 'code', + searchTitle: '生产线信息', + searchAllSchemas: Team.allSchemas, + searchPage: TeamApi.getTeamPage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } - } - }, - { - label: '班组代码', - field: 'teamCode', - sort: 'custom', - table: { - width: 150, }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择生产线代码', - searchField: 'code', - searchTitle: '生产线信息', - searchAllSchemas: Team.allSchemas, - searchPage: TeamApi.getTeamPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + { + label: '班次代码', + field: 'shiftCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择生产线代码', + searchField: 'code', + searchTitle: '生产线信息', + searchAllSchemas: Shift.allSchemas, + searchPage: ShiftApi.getShiftPage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } - } - }, - { - label: '班次代码', - field: 'shiftCode', - sort: 'custom', - table: { - width: 150, }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择生产线代码', - searchField: 'code', - searchTitle: '生产线信息', - searchAllSchemas: Shift.allSchemas, - searchPage: ShiftApi.getShiftPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' } } - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } -])) + ]) +) //表单校验 export const PackageRulesInventor = reactive({ - itemCode: [ - { required: true, message: '请选择物料代码', trigger: 'change' } - ], - batch: [ - { required: true, message: '请输入批次', trigger: 'blur' } - ], - produceDate: [ - { required: true, message: '请选择生产日期', trigger: 'change' } - ], - validityDays: [ - { required: true, message: '请输入有效期(日)', trigger: 'blur' } - ], - expireDate: [ - { required: true, message: '请选择失效日期', trigger: 'change' } - ], - uom: [ - { required: true, message: '请选择计量单位', trigger: 'change' } - ], - qty: [ - { required: true, message: '请输入数量', trigger: 'blur' } - ], - woNumber: [ - { required: true, message: '请选择生产订单号', trigger: 'change' } - ], - woLine: [ - { required: true, message: '请选择生产订单行', trigger: 'change' } + itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }], + batch: [{ required: true, message: '请输入批次', trigger: 'blur' }], + produceDate: [{ required: true, message: '请选择生产日期', trigger: 'change' }], + validityDays: [{ required: true, message: '请输入有效期(日)', trigger: 'blur' }], + expireDate: [{ required: true, message: '请选择失效日期', trigger: 'change' }], + uom: [{ required: true, message: '请选择计量单位', trigger: 'change' }], + qty: [{ required: true, message: '请输入数量', trigger: 'blur' }], + woNumber: [{ required: true, message: '请选择生产订单号', trigger: 'change' }], + woLine: [{ required: true, message: '请选择生产订单行', trigger: 'change' }], + productionLineCodePackage: [{ required: true, message: '请选择生产线代码', trigger: 'change' }], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: ['change','blur'] } ], - productionLineCodePackage: [ - { required: true, message: '请选择生产线代码', trigger: 'change' } + packQty: [ + { required: true, message: '请输入包装数量', trigger: ['change','blur'] } ], }) diff --git a/src/views/wms/inventoryManage/balance/balance.data.ts b/src/views/wms/inventoryManage/balance/balance.data.ts index 05ea363a9..77b1aebba 100644 --- a/src/views/wms/inventoryManage/balance/balance.data.ts +++ b/src/views/wms/inventoryManage/balance/balance.data.ts @@ -7,6 +7,9 @@ import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplie import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' import { validatePositiveNumber } from "@/utils/validator"; + +import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' +import * as ItemPackageApi from '@/api/wms/itempackage/index' /** * @returns {Array} 库存余额 */ @@ -902,22 +905,109 @@ export const BalancePackage = useCrudSchemas(reactive([ min: 0 } }, - { - label: '包装规格', - field: 'packUnit', - sort: 'custom', - tableForm: { - disabled: true - } - }, - { - label: '标包数量', - field: 'packQty', - sort: 'custom', - tableForm: { - disabled: true - } - }, + // { + // label: '包装规格', + // field: 'packUnit', + // sort: 'custom', + // tableForm: { + // disabled: true + // } + // }, + // { + // label: '标包数量', + // field: 'packQty', + // sort: 'custom', + // tableForm: { + // disabled: true + // } + // }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + isSearch: false, + table: { + width: 120 + }, + isTable: false, + isTableForm: true, + isForm: true, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装规格', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItemPackageApi.getItempackagingPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'itemCode', + value: 'itemCode', + message: '请先选择物料代码!', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'packUnit', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装规格', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItemPackageApi.getItempackagingPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'itemCode', + value: 'itemCode', + message: '请先选择物料代码!', // 当前置条件为空时 弹出信息提示 + isMainValue: true + } + ], + verificationParams: [ + { + key: 'packUnit', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + } + }, { label: '计量单位', field: 'uom', diff --git a/src/views/wms/inventoryManage/balance/index.vue b/src/views/wms/inventoryManage/balance/index.vue index fb45d7d4c..e774bc17f 100644 --- a/src/views/wms/inventoryManage/balance/index.vue +++ b/src/views/wms/inventoryManage/balance/index.vue @@ -475,7 +475,11 @@ const getLabelDetailPage = async (row, useToPackingNumber) => { const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => { console.log('批量打印',val) if (type == 'tableForm') { - row[formField] = val[0][searchField] + // row[formField] = val[0][searchField] + if (formField === 'packUnit') { + row['packUnit'] = val[0]['packUnit'] + row['packQty'] = val[0]['packQty'] + } } else { const setV = {} setV[formField] = val[0][searchField] diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 4a6ed02ac..ed9ab05c7 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -1706,7 +1706,6 @@ export const UnplannedreceiptRequestDetailLabel = useCrudSchemas(reactive( } } }, - { - label: '包装规格', - field: 'packUnit', - sort: 'custom', - table: { - width: 150, - componentProps: { - disabled: true, - isSearchList: true, - searchListPlaceholder: '请选择包装', - searchField: 'packUnit', - searchTitle: '物品包装信息', - searchAllSchemas: Itempackaging.allSchemas, - searchPage: ItemPackageApi.getItemPackagingPageByItemCode, - searchCondition: [ - { - key: 'itemCode', - value: 'itemCode', - message: '请选择订单行', - isMainValue: true - }, - { - key: 'available', - value: 'TRUE', - isMainValue: false - } - ] - - } - }, - tableForm: { - disabled: true, - isInpuFocusShow: true, - searchListPlaceholder: '请选择包装', - searchField: 'packUnit', - searchTitle: '物品包装信息', - searchAllSchemas: Itempackaging.allSchemas, - searchPage: ItemPackageApi.getItemPackagingPageByItemCode, - searchCondition: [ - { - key: 'itemCode', - value: 'itemCode', - message: '请选择订单行', - isMainValue: true + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + isSearch: false, + table: { + width: 120 }, - { - key: 'available', - value: 'TRUE', - isMainValue: false - }] - }, - }, - { - label: '包装数量', - field: 'packQty', - sort: 'custom', - table: { - width: 150 - }, - form: { - componentProps: { - disabled: true - } - }, - tableForm: { - disabled: true, - } - }, + isTable: false, + isTableForm: true, + isForm: true, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装规格', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItemPackageApi.getItempackagingPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'itemCode', + value: 'itemCode', + message: '请先选择物料代码!', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'packUnit', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装规格', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItemPackageApi.getItempackagingPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'itemCode', + value: 'itemCode', + message: '请先选择物料代码!', // 当前置条件为空时 弹出信息提示 + isMainValue: true + } + ], + verificationParams: [ + { + key: 'packUnit', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + } + }, { label: '标签生产线代码', field: 'productionLineCodePackage', @@ -2159,5 +2178,11 @@ export const ProductreceiptRequestLabelRules = reactive({ batch: [ { required: true, message: '请选择批次', trigger: ['change','blur'] } ], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: ['change','blur'] } + ], + packQty: [ + { required: true, message: '请输入包装数量', trigger: ['change','blur'] } + ], }) diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts index 2249d4887..44ea55dd4 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts @@ -1,6 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' -import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as WorkshopApi from '@/api/wms/workshop' import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' @@ -26,7 +26,7 @@ import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/prod import * as BomApi from '@/api/wms/bom' import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data' -import * as SupplieritemApi from '@/api/wms/supplieritem' +import * as SupplieritemApi from '@/api/wms/supplieritem' import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' @@ -36,584 +36,610 @@ const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { - pageSize:10, - pageNo:1, - code:'ProductReceiptRequest' + pageSize: 10, + pageNo: 1, + code: 'ProductReceiptRequest' } - const data = await getRequestsettingApi.getRequestsettingPage(queryParams) - const requestsettingData =data?.list[0]||{} +const data = await getRequestsettingApi.getRequestsettingPage(queryParams) +const requestsettingData = data?.list[0] || {} - export const shiftList = await ShiftApi.getShiftPage({available:'TRUE',pageSize: 500,pageNo: 1,sort:'',by: 'ASC'}) - console.log('shiftList',shiftList) - // 获取当前操作人的部门 - import { useUserStore } from '@/store/modules/user' - import { TableColumn } from '@/types/table' - const userStore = useUserStore() - const userDept = userStore.userSelfInfo.dept - // id 转str 否则form回显匹配不到 - userDept.id = userDept.id.toString() - const userDeptArray:any = [userDept] +export const shiftList = await ShiftApi.getShiftPage({ + available: 'TRUE', + pageSize: 500, + pageNo: 1, + sort: '', + by: 'ASC' +}) +console.log('shiftList', shiftList) +// 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +import { TableColumn } from '@/types/table' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept +// id 转str 否则form回显匹配不到 +userDept.id = userDept.id.toString() +const userDeptArray: any = [userDept] /** * @returns {Array} 制品收货申请主表 */ -export const ProductreceiptRequestMain = useCrudSchemas(reactive([ - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180, - fixed: 'left' - }, - isForm: false, - isSearch: true, - }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, - dictClass: 'string', - isSearch: true, - isTable: true, - isForm:false, - sort: 'custom', - table: { - width: 150 - }, - form: { - value: '1', - componentProps: { - disabled: true +export const ProductreceiptRequestMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } } - } - }, - { - label: '生产计划单号', - field: 'productionPlanNumber', - sort: 'custom', - table: { - width: 180 - }, - isSearch: true, - isForm: false, - isTable:true, - }, - { - label: '车间代码', - field: 'workshopCode', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择车间', - searchField: 'code', - searchTitle: '车间信息', - searchAllSchemas: Workshop.allSchemas, - searchPage: WorkshopApi.getWorkshopPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + }, + { + label: '生产计划单号', + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + isForm: false, + isTable: true + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择车间', + searchField: 'code', + searchTitle: '车间信息', + searchAllSchemas: Workshop.allSchemas, + searchPage: WorkshopApi.getWorkshopPage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } - } - }, - { - label: '生产线代码', - field: 'productionLineCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - tableForm: { - enterSearch: true, - isInpuFocusShow: true, - searchListPlaceholder: '请选择生产线代码', - searchField: 'code', - searchTitle: '生产线信息', - searchAllSchemas: Productionline.allSchemas, - searchPage: ProductionlineApi.getProductionlinePage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - },{ - key: 'workshopCode', - value: 'workshopCode', - message: '请填写车间代码!', - isMainValue: true - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { + }, + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + tableForm: { enterSearch: true, - isSearchList: true, + isInpuFocusShow: true, searchListPlaceholder: '请选择生产线代码', searchField: 'code', searchTitle: '生产线信息', searchAllSchemas: Productionline.allSchemas, searchPage: ProductionlineApi.getProductionlinePage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - },{ - key: 'type', - value: 'assemble',//号口品类型 - isMainValue: false - },{ - key: 'workshopCode', - value: 'workshopCode', - message: '请填写车间代码!', - isMainValue: true - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 - } - } - }, - { - label: '班组', - field: 'team', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - sortTableDefault: 1001, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择班组', - searchField: 'code', - searchTitle: '班组信息', - searchAllSchemas: Team.allSchemas, - searchPage: TeamApi.getTeamPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 - } - } - }, - { - label: '班组', - field: 'teamName', - sort: 'custom', - table: { - width: 150 - }, - isForm:false, - sortTableDefault: 1001, - }, - { - label: '班次', - field: 'shift', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - sortTableDefault: 1001, - form: { - component:'Select', - componentProps:{ - options:shiftList.list, - optionsAlias: { - labelField: 'name', - valueField: 'code' + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false }, - verificationParams: [{ + { + key: 'workshopCode', + value: 'workshopCode', + message: '请填写车间代码!', + isMainValue: true + } + ], + verificationParams: [ + { key: 'code', action: '==', value: '', isMainValue: false, isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + isFormModel: true + } + ] // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择生产线代码', + searchField: 'code', + searchTitle: '生产线信息', + searchAllSchemas: Productionline.allSchemas, + searchPage: ProductionlineApi.getProductionlinePage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'type', + value: 'assemble', //号口品类型 + isMainValue: false + }, + { + key: 'workshopCode', + value: 'workshopCode', + message: '请填写车间代码!', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } - } - }, - { - label: '班次', - field: 'shiftName', - sort: 'custom', - table: { - width: 150 - }, - isSearch:true, - isForm:false, - sortTableDefault: 1001, - search: { - component:'Select', - componentProps:{ - options:shiftList.list, + }, + { + label: '班组', + field: 'team', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + sortTableDefault: 1001, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择班组', + searchField: 'code', + searchTitle: '班组信息', + searchAllSchemas: Team.allSchemas, + searchPage: TeamApi.getTeamPage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '班组', + field: 'teamName', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + sortTableDefault: 1001 + }, + { + label: '班次', + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + sortTableDefault: 1001, + form: { + component: 'Select', + componentProps: { + options: shiftList.list, optionsAlias: { labelField: 'name', - valueField: 'name' + valueField: 'code' }, + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } - } - }, - { - label: '收货类型', - field: 'type', - dictType: DICT_TYPE.PLAN_PRODUCTION_TYPE, - dictClass: 'string', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false - }, - { - label: '到仓库代码', - field: 'toWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, - }, - { - label: '到库区类型范围', - field: 'toAreaTypes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, - }, - { - label: '到库区代码范围', - field: 'toAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - isForm: false, - }, - { - label: '业务类型', - field: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - form: { - value: 'ProductReceipt', - componentProps: { - disabled: true + }, + { + label: '班次', + field: 'shiftName', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + isForm: false, + sortTableDefault: 1001, + search: { + component: 'Select', + componentProps: { + options: shiftList.list, + optionsAlias: { + labelField: 'name', + valueField: 'name' + } + } } }, - isTable: false, - isForm: false, - }, - // { - // label: '备注', - // field: 'remark', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTable: false - // }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '收货类型', + field: 'type', + dictType: DICT_TYPE.PLAN_PRODUCTION_TYPE, + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'ProductReceipt', + componentProps: { + disabled: true + } + }, + isTable: false, + isForm: false + }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false + // }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isTable: false, + isForm: false, + isSearch: true, + 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')] + } } }, - isTable: false, - isForm: false, - isSearch: true, - 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')] + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isTable: false, + isForm: false + }, + // { + // label: '截止时间', + // field: 'dueTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width: '100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // isTable: false, + // }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isForm: false, + table: { + width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id == cellValue)?.name + }, + form: { + value: userDept.id, + component: 'Select', + api: () => userDeptArray, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + } + }, + isTable: false }, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - isForm: false - }, - { - label: '申请时间', - field: 'requestTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isForm: false, + isTable: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } } }, - isTable: false, - isForm: false - }, - // { - // label: '截止时间', - // field: 'dueTime', - // formatter: dateFormatter, - // detail: { - // dateFormat: 'YYYY-MM-DD HH:mm:ss' - // }, - // sort: 'custom', - // table: { - // width: 180 - // }, - // form: { - // component: 'DatePicker', - // componentProps: { - // style: {width: '100%'}, - // type: 'datetime', - // dateFormat: 'YYYY-MM-DD HH:mm:ss', - // valueFormat: 'x', - // } - // }, - // isTable: false, - // }, - { - label: '部门', - field: 'departmentCode', - sort: 'custom', - isForm:false, - table: { - width: 150 - }, - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return userDeptArray.find((account) => account.id == cellValue)?.name - }, - form: { - value: userDept.id, - component: 'Select', - api: () => userDeptArray, - componentProps: { - disabled: true, - optionsAlias: { - labelField: 'name', - valueField: 'id' + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true } } }, - isTable: false, - }, - - { - label: '最后更新时间', - field: 'updateTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } } }, - isForm: false, - isTable: false, - }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - isTable: false, - }, - { - label: '自动提交', - field: 'autoCommit', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - isForm:false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: requestsettingData.autoCommit, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true - } - } - }, - { - label: '自动通过', - field: 'autoAgree', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - isForm:false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: requestsettingData.autoAgree, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true - } - } - }, - { - label: '自动执行', - field: 'autoExecute', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - isForm:false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: requestsettingData.autoExecute, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + { + label: '直接生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } } - } - }, - { - label: '直接生成记录', - field: 'directCreateRecord', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isForm: false, - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: requestsettingData.directCreateRecord, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 250, + fixed: 'right' } } - }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width:250, - fixed: 'right' - }, - } -])) + ]) +) //表单校验 export const ProductreceiptRequestMainRules = reactive({ - workshopCode: [ - { required: true, message: '请选择车间代码', trigger: 'change' } - ], + workshopCode: [{ required: true, message: '请选择车间代码', trigger: 'change' }], // team: [ // { required: true, message: '请选择班组代码', trigger: 'change' } // ], @@ -623,117 +649,83 @@ export const ProductreceiptRequestMainRules = reactive({ // departmentCode: [ // { required: true, message: '请输入部门', trigger: 'blur' } // ], - productionLineCode: [ - { required: true, message: '请选择生产线代码', trigger: 'change' } - ], - autoCommit: [ - { required: true, message: '请选择是否自动提交', trigger: 'change' } - ], - autoAgree: [ - { required: true, message: '请选择是否自动通过', trigger: 'change' } - ], - autoExecute: [ - { required: true, message: '请选择是否自动执行', trigger: 'change' } - ], + productionLineCode: [{ required: true, message: '请选择生产线代码', trigger: 'change' }], + autoCommit: [{ required: true, message: '请选择是否自动提交', trigger: 'change' }], + autoAgree: [{ required: true, message: '请选择是否自动通过', trigger: 'change' }], + autoExecute: [{ required: true, message: '请选择是否自动执行', trigger: 'change' }], directCreateRecord: [ { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } ], - remark: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' } - ], + remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }] }) /** * @returns {Array} 制品收货申请子表 */ -export const ProductreceiptRequestDetail = useCrudSchemas(reactive([ - { - label: '生产线代码', - field: 'productionLineCode', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - tableForm:{ - isInpuFocusShow: true, - searchListPlaceholder: '请选择生产线代码', - searchField: 'code', - searchTitle: '生产线信息', - searchAllSchemas: Productionline.allSchemas, - searchPage: ProductionlineApi.getProductionlinePage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - },{ - key: 'workshopCode', - value: 'workshopCode', - message: '请填写车间代码!', - isMainValue: true - }] - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, +export const ProductreceiptRequestDetail = useCrudSchemas( + reactive([ + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + tableForm: { + isInpuFocusShow: true, searchListPlaceholder: '请选择生产线代码', searchField: 'code', searchTitle: '生产线信息', searchAllSchemas: Productionline.allSchemas, searchPage: ProductionlineApi.getProductionlinePage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - },{ - key: 'workshopCode', - value: 'workshopCode', - message: '请填写车间代码!', - isMainValue: true - }] + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'workshopCode', + value: 'workshopCode', + message: '请填写车间代码!', + isMainValue: true + } + ] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择生产线代码', + searchField: 'code', + searchTitle: '生产线信息', + searchAllSchemas: Productionline.allSchemas, + searchPage: ProductionlineApi.getProductionlinePage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'workshopCode', + value: 'workshopCode', + message: '请填写车间代码!', + isMainValue: true + } + ] + } } - } - }, - { - label: '工位代码', - field: 'workStationCode', - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - enterSearch: true, - isInpuFocusShow: true, - searchListPlaceholder: '请选择工位代码', - searchField: 'code', - searchTitle: '工位信息', - searchAllSchemas: Workstation.allSchemas, - searchPage: WorkstationApi.getWorkstationPage, - - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, { - key: 'productionLineCode', - value: 'productionLineCode', - message: '请填写生产线代码!', - isMainValue: true - }], - isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据 - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { enterSearch: true, isInpuFocusShow: true, searchListPlaceholder: '请选择工位代码', @@ -741,1308 +733,1393 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive searchTitle: '工位信息', searchAllSchemas: Workstation.allSchemas, searchPage: WorkstationApi.getWorkstationPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, { - key: 'productionLineCode', - value: 'productionLineCode', - message: '请填写生产线代码!', - isMainValue: true - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 - } - } - }, - { - label: '工序代码', - field: 'processCode', - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - enterSearch: true, - isInpuFocusShow: true, - searchListPlaceholder: '请选择工序代码', - searchField: 'code', - searchTitle: '工序信息', - searchAllSchemas: Process.allSchemas, - searchPage: ProcessApi.getProcessPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, - { - key: 'workshopCode', - value: 'workshopCode', - message: '请填写车间代码!', - isMainValue: true - }, - // { - // key: 'productionLineCode', - // value: 'productionLineCode', - // message: '请填写生产线代码!', - // isMainValue: true - // } + + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + } ], - isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据 - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { + isRepeat: true, //tableForm下方输入框是否可以重复添加该条数据 + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择工位代码', + searchField: 'code', + searchTitle: '工位信息', + searchAllSchemas: Workstation.allSchemas, + searchPage: WorkstationApi.getWorkstationPage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { enterSearch: true, - isSearchList: true, + isInpuFocusShow: true, searchListPlaceholder: '请选择工序代码', searchField: 'code', searchTitle: '工序信息', searchAllSchemas: Process.allSchemas, searchPage: ProcessApi.getProcessPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, { - key: 'workshopCode', - value: 'workshopCode', - message: '请填写车间代码!', - isMainValue: true - }, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'workshopCode', + value: 'workshopCode', + message: '请填写车间代码!', + isMainValue: true + } // { // key: 'productionLineCode', // value: 'productionLineCode', // message: '请填写生产线代码!', // isMainValue: true // } + ], + isRepeat: true, //tableForm下方输入框是否可以重复添加该条数据 + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择工序代码', + searchField: 'code', + searchTitle: '工序信息', + searchAllSchemas: Process.allSchemas, + searchPage: ProcessApi.getProcessPage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'workshopCode', + value: 'workshopCode', + message: '请填写车间代码!', + isMainValue: true + } + // { + // key: 'productionLineCode', + // value: 'productionLineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // } ], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } - } - }, - { - label: '包装号', - field: 'packingNumber', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTable:false, - isTableForm: false, - isForm: false - }, - // { - // label: '器具号', - // field: 'containerNumber', - // sort: 'custom', - // table: { - // width: 150 - // }, - // hiddenInMain:true, - // isTable:false, - // isTableForm: false, - // isForm: false - // }, - { - label: '库存状态', - field: 'inventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTable: false, - isTableForm: false, - isForm: false - }, - { - label: '订单号', - field: 'woNumber', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '订单行', - field: 'woLine', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '包装数量', - field: 'packQty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - componentProps: { - min: 1, - precision: 6 - }, - }, - isTable: false, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '包装规格', - field: 'packUnit', - // dictType: DICT_TYPE.PACK_UNIT, - // dictClass: 'string', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '到货主代码', - field: 'toOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - hiddenInMain:true, - isTableForm: false, - form: { - componentProps: { - disabled: true + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTable: false, + isTableForm: false, + isForm: false + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // isTable:false, + // isTableForm: false, + // isForm: false + // }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTable: false, + isTableForm: false, + isForm: false + }, + { + label: '订单号', + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '订单行', + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + isTable: false, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '包装规格', + field: 'packUnit', + // dictType: DICT_TYPE.PACK_UNIT, + // dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + hiddenInMain: true, + isTableForm: false, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '品番', - field: 'itemCode', - sort: 'custom', - sortTableDefault: 1003, - table: { - width: 150 - }, - tableForm: { - // enterSearch:true, - disabled: true, - multiple: true, - isInpuFocusShow: false, - searchListPlaceholder: '请选择物料代码', - searchField: 'itemCode', - searchTitle: '生产线物料关系信息', - searchAllSchemas: Productionlineitem.allSchemas, - searchPage: ProductionlineitemApi.getProductionlineitemPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, { - key: 'productionLineCode', - value: 'productionLineCode', - message: '请填写生产线代码!', - isMainValue: true - }], - - verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法 - isShowTableFormSearch: true, - verificationParams: [{ - key: 'itemCode', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, + }, + { + label: '品番', + field: 'itemCode', + sort: 'custom', + sortTableDefault: 1003, + table: { + width: 150 + }, + tableForm: { + // enterSearch:true, + disabled: true, + multiple: true, + isInpuFocusShow: false, searchListPlaceholder: '请选择物料代码', searchField: 'itemCode', searchTitle: '生产线物料关系信息', searchAllSchemas: Productionlineitem.allSchemas, searchPage: ProductionlineitemApi.getProductionlineitemPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, { - key: 'productionLineCode', - value: 'productionLineCode', - message: '请填写生产线代码!', - isMainValue: true - }], - verificationParams: [{ - key: 'itemCode', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + } + ], + + verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法 + isShowTableFormSearch: true, + verificationParams: [ + { + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择物料代码', + searchField: 'itemCode', + searchTitle: '生产线物料关系信息', + searchAllSchemas: Productionlineitem.allSchemas, + searchPage: ProductionlineitemApi.getProductionlineitemPage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } - } - }, - { - label: '背番', - field: 'itemDesc1', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false, - isSearch: true, - sortTableDefault: 1003, - tableForm: { - disabled: true - }, - form: { - componentProps: { + }, + { + label: '背番', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + isSearch: true, + sortTableDefault: 1003, + tableForm: { disabled: true + }, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: 'Bom版本', - field: 'bomVersion', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:1004, - tableForm: { - isInpuFocusShow: true, - searchListPlaceholder: '请选择Bom版本', // 输入框占位文本 - searchField: 'version', // 查询弹窗赋值字段 - searchTitle: '物料清单信息', // 查询弹窗标题 - searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 - searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key:'productItemCode', - value:'itemCode', - message: '请填写物料代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 + }, + { + label: 'Bom版本', + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1004, + tableForm: { + isInpuFocusShow: true, searchListPlaceholder: '请选择Bom版本', // 输入框占位文本 searchField: 'version', // 查询弹窗赋值字段 searchTitle: '物料清单信息', // 查询弹窗标题 searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key:'productItemCode', - value:'itemCode', - message: '请填写物料代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + searchCondition: [ + { + key: 'productItemCode', + value: 'itemCode', + message: '请填写物料代码!', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择Bom版本', // 输入框占位文本 + searchField: 'version', // 查询弹窗赋值字段 + searchTitle: '物料清单信息', // 查询弹窗标题 + searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 + searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'productItemCode', + value: 'itemCode', + message: '请填写物料代码!', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + sortTableDefault: 1006, + table: { + width: 150 } }, - }, - { - label: '批次', - field: 'batch', - sort: 'custom', - sortTableDefault:1006, - table: { - width: 150 - }, - }, - { - label: '品名', - field: 'itemName', - sortTableDefault:1005, - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '物料描述1', - field: 'itemDesc1', - hiddenInMain:true, - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '物料描述2', - field: 'itemDesc2', - hiddenInMain:true, - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '项目代码', - field: 'projectCode', - hiddenInMain:true, - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - sortTableDefault:1006, - table: { - width: 150 - }, - form: { - component: 'InputNumber', - componentProps: { + { + label: '品名', + field: 'itemName', + sortTableDefault: 1005, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + hiddenInMain: true, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + hiddenInMain: true, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '项目代码', + field: 'projectCode', + hiddenInMain: true, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + sortTableDefault: 1006, + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + max: 9999 + // precision: 6 + } + }, + tableForm: { + type: 'InputNumber', min: 0, - max:9999, + max: 9999 // precision: 6 - }, + } }, - tableForm: { - type: 'InputNumber', - min: 0, - max:9999, - // precision: 6 - } - }, - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - sortTableDefault:1007, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - type: 'Select', - disabled: true - } - }, - { - label: '生产日期', - field: 'produceDate', - formatter: dateFormatter2, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - sortTableDefault:1008, - sort: 'custom', - table: { - width: 180 - }, - tableForm: { - type: 'FormDate', - valueFormat: 'x', - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + sortTableDefault: 1007, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true } }, - }, - { - label: '过期日期', - field: 'expireDate', - hiddenInMain:true, - isTable: false, - formatter: dateFormatter2, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - sort: 'custom', - table: { - width: 180 - }, - // tableForm: { - // type: 'FormDate', - // valueFormat: 'x', - // }, - tableForm:{ - type: 'slot', - disabled: true - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sortTableDefault: 1008, + sort: 'custom', + table: { + width: 180 + }, + tableForm: { + type: 'FormDate', + valueFormat: 'x' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } } }, - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - hiddenInMain:true, - table: { - width: 150 - }, - }, - { - label: '创建时间', - field: 'createTime', - sortTableDefault:1009, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '过期日期', + field: 'expireDate', + hiddenInMain: true, + isTable: false, + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + // tableForm: { + // type: 'FormDate', + // valueFormat: 'x', + // }, + tableForm: { + type: 'slot', + disabled: true + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } } }, - isTableForm: false, - isForm: false, - isTable: true - }, - { - label: '创建者', - field: 'creator', - sortTableDefault:1010, - sort: 'custom', - isTable: true, - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '最后更新时间', - field: 'updateTime', - isTable: false, - hiddenInMain:true, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '备注', + field: 'remark', + sort: 'custom', + hiddenInMain: true, + table: { + width: 150 } }, - isTableForm: false, - isForm: false - }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTable: false, - isTableForm: false, - isForm: false - }, - { - label: '操作', - hiddenInMain:true, - field: 'action', - isDetail: false, - isForm: false , - table: { - width: 150, - fixed: 'right' - }, - isTableForm:false, - } -])) + { + label: '创建时间', + field: 'createTime', + sortTableDefault: 1009, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isTableForm: false, + isForm: false, + isTable: true + }, + { + label: '创建者', + field: 'creator', + sortTableDefault: 1010, + sort: 'custom', + isTable: true, + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新时间', + field: 'updateTime', + isTable: false, + hiddenInMain: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTable: false, + isTableForm: false, + isForm: false + }, + { + label: '操作', + hiddenInMain: true, + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 150, + fixed: 'right' + }, + isTableForm: false + } + ]) +) //表单校验 export const ProductreceiptRequestDetailRules = reactive({ - produceDate: [ - { required: true, message: '请选择生产日期', trigger: 'change' } - ], - expireDate: [ - { required: true, message: '请选择过期日期', trigger: 'change' } - ], + produceDate: [{ required: true, message: '请选择生产日期', trigger: 'change' }], + expireDate: [{ required: true, message: '请选择过期日期', trigger: 'change' }], batch: [ { required: true, message: '请输入批次', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], - itemCode: [ - { required: true, message: '请选择物料代码', trigger: 'change' } - ], - bomVersion: [ - { required: true, message: '请选择Bom版本', trigger: 'change' } - ], - workStationCode: [ - { required: true, message: '请选择工位代码', trigger: 'change' } - ], - uom: [ - { required: true, message: '请选择计量单位', trigger: 'change' } - ], - productionLineCode: [ - { required: true, message: '请选择生产线代码', trigger: 'change' } - ], - remark: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' } - ], + itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }], + bomVersion: [{ required: true, message: '请选择Bom版本', trigger: 'change' }], + workStationCode: [{ required: true, message: '请选择工位代码', trigger: 'change' }], + uom: [{ required: true, message: '请选择计量单位', trigger: 'change' }], + productionLineCode: [{ required: true, message: '请选择生产线代码', trigger: 'change' }], + remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }] }) /** * @returns {Array} 制品收货申请子表 */ -export const BackflushRequestDetailb = useCrudSchemas(reactive([ - { - label: '工序代码', - field: 'processCode', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180 - }, - }, - { - label: '物料代码', - field: 'itemCode', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', +export const BackflushRequestDetailb = useCrudSchemas( + reactive([ + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 } }, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '物料描述1', - field: 'itemDesc1', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '物料描述2', - field: 'itemDesc2', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - } - }, - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '最后更新时间', - field: 'updateTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 } }, - }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - table: { - width: 150 + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + } }, - } -])) + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + } + } + ]) +) //表单校验 export const BackflushRequestDetailbRules = reactive({ - number: [ - { required: true, message: '请输入单据号', trigger: 'blur' } - ], - itemCode: [ - { required: true, message: '请选择物料代码', trigger: 'change' } - ], - createTime: [ - { required: true, message: '请输入创建时间', trigger: 'blur' } - ], - creator: [ - { required: true, message: '请输入创建者', trigger: 'blur' } - ], - + number: [{ required: true, message: '请输入单据号', trigger: 'blur' }], + itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }], + createTime: [{ required: true, message: '请输入创建时间', trigger: 'blur' }], + creator: [{ required: true, message: '请输入创建者', trigger: 'blur' }] }) - - - - /** * @returns {Array} 制品收货申请子表二子表 */ -export const BackflushDetailRequest = useCrudSchemas(reactive([ - { - label: '工序代码', - field: 'processCode', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: 'BOM版本', - field: 'bomVersion', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '物料代码', - field: 'itemCode', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '物料描述1', - field: 'itemDesc1', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '物料描述2', - field: 'itemDesc2', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180, - fixed: 'left' - }, - isTableForm: false, - isForm: false - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTableForm: false, - isForm: false - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '最后更新时间', - field: 'updateTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTableForm: false, - isForm: false - }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, -])) - +export const BackflushDetailRequest = useCrudSchemas( + reactive([ + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: 'BOM版本', + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isTableForm: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + } + ]) +) /** * @returns {Array} 号口品收货申请创建标签 */ -export const ProductreceiptRequestLabel = useCrudSchemas(reactive([ - { - label: '物料代码', - field: 'itemCode', - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - disabled: true - }, - form: { - componentProps: { +export const ProductreceiptRequestLabel = useCrudSchemas( + reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { disabled: true + }, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '批次', - field: 'batch', - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - disabled: true, - type:'FormDate', - placeholder: '请选择从批次', - valueFormat: 'YYYYMMDD', - format: 'YYYYMMDD', - }, - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - disabled: true - }, - form: { - componentProps: { + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'FormDate', + placeholder: '请选择从批次', + valueFormat: 'YYYYMMDD', + format: 'YYYYMMDD' + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { disabled: true + }, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - type: 'Select', - disabled: true - }, - form: { - componentProps: { + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', disabled: true + }, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '包装规格', - field: 'packUnit', - sort: 'custom', - table: { - width: 150, - componentProps: { - disabled: true, - isSearchList: true, - searchListPlaceholder: '请选择包装', - searchField: 'packUnit', - searchTitle: '物品包装信息', - searchAllSchemas: Itempackaging.allSchemas, - searchPage: ItemPackageApi.getItemPackagingPageByItemCode, + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + isSearch: false, + table: { + width: 120 + }, + isTable: false, + isTableForm: true, + isForm: true, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装规格', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItemPackageApi.getItempackagingPage, // 查询弹窗所需分页方法 searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, { key: 'itemCode', value: 'itemCode', - message: '请选择订单行', + message: '请先选择物料代码!', isMainValue: true - }, + } + ], + verificationParams: [ { - key: 'available', - value: 'TRUE', - isMainValue: false + key: 'packUnit', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true } - ] - + ] // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装规格', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItemPackageApi.getItempackagingPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'itemCode', + value: 'itemCode', + message: '请先选择物料代码!', // 当前置条件为空时 弹出信息提示 + isMainValue: true + } + ], + verificationParams: [ + { + key: 'packUnit', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 } }, - tableForm: { - disabled: true, - isInpuFocusShow: true, - searchListPlaceholder: '请选择包装', - searchField: 'packUnit', - searchTitle: '物品包装信息', - searchAllSchemas: Itempackaging.allSchemas, - searchPage: ItemPackageApi.getItemPackagingPageByItemCode, - searchCondition: [ - { - key: 'itemCode', - value: 'itemCode', - message: '请选择订单行', - isMainValue: true - }, - { - key: 'available', - value: 'TRUE', - isMainValue: false - }] - }, - }, - { - label: '包装数量', - field: 'packQty', - sort: 'custom', - table: { - width: 150 - }, - form: { - componentProps: { + { + label: '标签生产线代码', + field: 'productionLineCodePackage', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + tableForm: { disabled: true } }, - tableForm: { - disabled: true, - } - }, - { - label: '标签生产线代码', - field: 'productionLineCodePackage', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - tableForm: { - disabled: true, - }, - }, - { - label: '供应商代码', - field: 'supplierItemCode', - sort: 'custom', - isTableForm: false, - isForm: false, - table: { - width: 150 - }, - tableForm: { - isInpuFocusShow: true, - searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 - searchField: 'supplierCode', // 查询弹窗赋值字段 - searchTitle: '供应商信息', // 查询弹窗标题 - searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 - searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'itemCode', - value: 'itemCode', - message: '请填写物料代码!', - isMainValue: true - }] - } - }, + { + label: '供应商代码', + field: 'supplierItemCode', + sort: 'custom', + isTableForm: false, + isForm: false, + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'supplierCode', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码!', + isMainValue: true + } + ] + } + }, - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false, - }, - { - label: '物料描述1', - field: 'itemDesc1', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false, - }, - { - label: '物料描述2', - field: 'itemDesc2', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false, - }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false, - }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, - { - label: '库存状态', - field: 'inventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - isTableForm: false, - isForm: false, - table: { - width: 150 - }, - tableForm: { - type: 'Select', - disabled: true - }, - form: { - componentProps: { + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + isTableForm: false, + isForm: false, + table: { + width: 150 + }, + tableForm: { + type: 'Select', disabled: true + }, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '来源生产线代码', - field: 'productionLineCode', - sort: 'custom', - isTableForm: false, - isForm: false, - table: { - width: 150 - }, - tableForm: { - disabled: true - }, - form: { - componentProps: { + }, + { + label: '来源生产线代码', + field: 'productionLineCode', + sort: 'custom', + isTableForm: false, + isForm: false, + table: { + width: 150 + }, + tableForm: { disabled: true + }, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '来源工位代码', - field: 'workStationCode', - sort: 'custom', - isTableForm: false, - isForm: false, - table: { - width: 150 - }, - tableForm: { - disabled: true - }, - form: { - componentProps: { + }, + { + label: '来源工位代码', + field: 'workStationCode', + sort: 'custom', + isTableForm: false, + isForm: false, + table: { + width: 150 + }, + tableForm: { disabled: true + }, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '来源库位代码', - field: 'fromLocationCode', - sort: 'custom', - isTableForm: false, - isForm: false, - table: { - width: 150 - }, - tableForm: { - disabled: true - }, - form: { - componentProps: { + }, + { + label: '来源库位代码', + field: 'fromLocationCode', + sort: 'custom', + isTableForm: false, + isForm: false, + table: { + width: 150 + }, + tableForm: { disabled: true + }, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180 - }, - isTableForm: false, - form: { - componentProps: { - disabled: true + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } } - } - }, + }, - { - label: '包装规格2', - field: 'secondPackUnit', - sort: 'custom', - isTableForm: false, - isForm: false, - table: { - width: 150, - componentProps: { + { + label: '包装规格2', + field: 'secondPackUnit', + sort: 'custom', + isTableForm: false, + isForm: false, + table: { + width: 150, + componentProps: { + disabled: true, + isSearchList: true, + searchListPlaceholder: '请选择包装', + searchField: 'packUnit', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageByProductreceipt, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } + }, + tableForm: { + enterSearch: true, disabled: true, - isSearchList: true, + isInpuFocusShow: true, searchListPlaceholder: '请选择包装', searchField: 'packUnit', searchTitle: '物品包装信息', @@ -2061,62 +2138,38 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive( isMainValue: false } ] - } }, - tableForm: { - enterSearch: true, - disabled: true, - isInpuFocusShow: true, - searchListPlaceholder: '请选择包装', - searchField: 'packUnit', - searchTitle: '物品包装信息', - searchAllSchemas: Itempackaging.allSchemas, - searchPage: ItemPackageApi.getItempackagingPageByProductreceipt, - searchCondition: [ - { - key: 'itemCode', - value: 'itemCode', - message: '请选择订单行', - isMainValue: true - }, - { - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - }, - { - label: '包装数量2', - field: 'secondPackQty', - sort: 'custom', - isTableForm: false, - isForm: false, - table: { - width: 150 - }, - form: { - componentProps: { + { + label: '包装数量2', + field: 'secondPackQty', + sort: 'custom', + isTableForm: false, + isForm: false, + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { disabled: true } - }, - tableForm: { - disabled: true, } - }, -])) + ]) +) //表单校验 export const ProductreceiptRequestLabelRules = reactive({ - supplierItemCode: [ - { required: true, message: '请选择供应商', trigger: 'change' } + supplierItemCode: [{ required: true, message: '请选择供应商', trigger: 'change' }], + productionLineCodePackage: [{ required: true, message: '请选择生产线', trigger: 'change' }], + batch: [{ required: true, message: '请选择批次', trigger: ['change', 'blur'] }], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: ['change','blur'] } ], - productionLineCodePackage: [ - { required: true, message: '请选择生产线', trigger: 'change' } - ], - batch: [ - { required: true, message: '请选择批次', trigger: ['change', 'blur'] } + packQty: [ + { required: true, message: '请输入包装数量', trigger: ['change','blur'] } ], }) -