diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue index f24522097..35c8ffc4d 100644 --- a/src/components/TableForm/src/TableForm.vue +++ b/src/components/TableForm/src/TableForm.vue @@ -97,7 +97,7 @@ :type="headerItem?.tableForm?.inputType" :placeholder=" t( - `ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}` + `ts.${headerItem?.tableForm?.isPlaceholder === false ? '' :( headerItem?.tableForm?.placeholder || '请输入' + headerItem.label)}` ).replace('ts.', '') " :disabled="itemIsDisabled(headerItem, row)" diff --git a/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts b/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts index d72f9dbc7..5cf8185e5 100644 --- a/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts +++ b/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts @@ -88,6 +88,22 @@ export const Customeritem = useCrudSchemas(reactive([ }, isSearch: true }, + { + label: '背番', + field: 'itemDesc1', + sort: 'custom', + isSearch: true, + isForm:false, +hiddenSearchHigh:true, + table: { + width: 150 + }, +form:{ + componentProps:{ + disabled: true, + } + } + }, { label: '客户物料代码', field: 'customerItemCode', diff --git a/src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts b/src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts index 3c13320b2..44dc0550b 100644 --- a/src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts +++ b/src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts @@ -88,6 +88,22 @@ export const Saleprice = useCrudSchemas(reactive([ } }, }, + { + label: '背番', + field: 'itemDesc1', + sort: 'custom', + isSearch: true, + isForm:false, +hiddenSearchHigh:true, + table: { + width: 150 + }, +form:{ + componentProps:{ + disabled: true, + } + } + }, { label: '货币', field: 'currency', diff --git a/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts b/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts index 4d9eee3a4..01db646dc 100644 --- a/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts +++ b/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts @@ -43,6 +43,21 @@ export const Bom = useCrudSchemas(reactive([ } } }, + { + label: '父背番', + field: 'productBackNumber', + sort: 'custom', + isSearch: true, + hiddenSearchHigh:true, + table: { + width: 150 + }, + form:{ + componentProps:{ + disabled: true, + } + } + }, { label: '子物料代码', field: 'componentItemCode', @@ -72,6 +87,21 @@ export const Bom = useCrudSchemas(reactive([ } } }, + { + label: '子背番', + field: 'componentBackNumber', + sort: 'custom', + isSearch: true, + hiddenSearchHigh:true, + table: { + width: 150 + }, + form:{ + componentProps:{ + disabled: true, + } + } + }, { label: '子物料计量单位', field: 'componentUom', diff --git a/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue b/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue index 5de98af6c..1d7712a30 100644 --- a/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue @@ -95,6 +95,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { } else { setV[formField] = val[0][searchField] } + setV['itemDesc1'] = val[0]['backNumber']//物料描述1赋值到背番 formRef.setValues(setV) }) } diff --git a/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts b/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts index cb338d498..5322d5927 100644 --- a/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts @@ -77,6 +77,22 @@ export const ItemSyntheticRelation = useCrudSchemas(reactive([ isSearch: false, isForm:false, }, + { + label: '背番', + field: 'itemDesc1', + sort: 'custom', + isSearch: false, + isForm:false, +hiddenSearchHigh:true, + table: { + width: 150 + }, +form:{ + componentProps:{ + disabled: true, + } + } + }, { label: '生效时间', field: 'effectiveDate', diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue index 8e5cd1eb4..86e6d869c 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue @@ -178,6 +178,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => }else{ setV[formField] = setV[0][searchField] } + setV['itemDesc1'] = val[0]['backNumber']//物料描述1赋值到背番 formRef.setValues(setV) } }) diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts index 939b782bd..b4acae0eb 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts @@ -50,6 +50,21 @@ export const Itemarea = useCrudSchemas(reactive([ } } }, + { + label: '背番', + field: 'itemDesc1', + sort: 'custom', + isSearch: true, +hiddenSearchHigh:true, + table: { + width: 150 + }, +form:{ + componentProps:{ + disabled: true, + } + } + }, { label: '区域代码', field: 'areaCode', diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts index ecbcb2c0e..d7d26a46b 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts @@ -49,7 +49,7 @@ export const Itembasic = useCrudSchemas(reactive([ label: '背番', field: 'backNumber', sort: 'custom', - isSearch: false, + isSearch: true, table: { width: 150 }, diff --git a/src/views/wms/basicDataManage/itemManage/itempackage/index.vue b/src/views/wms/basicDataManage/itemManage/itempackage/index.vue index 9b7bf5690..aa893407d 100644 --- a/src/views/wms/basicDataManage/itemManage/itempackage/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itempackage/index.vue @@ -359,6 +359,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { if('itemCode'==formField){ setV['itemName'] = val[0]['name'] setV['uom'] = val[0]['uom'] + setV['backNumber'] = val[0]['backNumber'] } if('packUnit'==formField){ setV['packType'] = val[0]['type'] diff --git a/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts b/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts index f048fa7eb..d11846f0a 100644 --- a/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts @@ -69,10 +69,16 @@ export const Itempackaging = useCrudSchemas(reactive([ label: '背番', field: 'backNumber', sort: 'custom', + hiddenSearchHigh:true, isSearch: true, table: { width: 150 }, + form: { + componentProps: { + disabled: true + } + }, }, { label: '计量单位', diff --git a/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue b/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue index ba64bab4d..9e44cf8a2 100644 --- a/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue +++ b/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue @@ -257,6 +257,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { const setV = {} setV[formField] = val[0][searchField] + setV['itemDesc1'] = val[0]['backNumber'] formRef.setValues(setV) }) } diff --git a/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts b/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts index 57e28346d..7f411b2aa 100644 --- a/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts +++ b/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts @@ -151,6 +151,21 @@ export const Productionlineitem = useCrudSchemas(reactive([ } } }, + { + label: '背番', + field: 'itemDesc1', + sort: 'custom', + isSearch: true, + hiddenSearchHigh:true, + table: { + width: 150 + }, + form:{ + componentProps:{ + disabled: true, + } + } + }, { label: '是否可用', field: 'available', diff --git a/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue b/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue index 79262bcb8..b3132e7ee 100644 --- a/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue +++ b/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue @@ -245,6 +245,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { const setV = {} setV[formField] = val[0][searchField] + setV['itemDesc1'] = val[0]['backNumber'] formRef.setValues(setV) }) } diff --git a/src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts b/src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts index 0c1184e0e..8dcfcb6be 100644 --- a/src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts +++ b/src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts @@ -82,6 +82,21 @@ export const Stdcostprice = useCrudSchemas(reactive([ } } }, + { + label: '背番', + field: 'itemDesc1', + sort: 'custom', + isSearch: true, + hiddenSearchHigh:true, + table: { + width: 150 + }, + form:{ + componentProps:{ + disabled: true, + } + } + }, { label: '货币', field: 'currency', 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 63073c4ab..2416e29e9 100644 --- a/src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts +++ b/src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts @@ -1,656 +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', - table: { - width: 180 - } - }, - { - label: '标签状态', - field: 'status', - sort: 'custom', - 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/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts b/src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts index 2d396437d..0d6c487b4 100644 --- a/src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts +++ b/src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts @@ -91,6 +91,7 @@ export const Purchaseprice = useCrudSchemas(reactive([ label: '背番', field: 'backNumber', sort: 'custom', + hiddenSearchHigh:true, isSearch: true, table: { width: 150 diff --git a/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts b/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts index cf589dc8c..25915eda9 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts +++ b/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts @@ -110,6 +110,7 @@ export const Supplieritem = useCrudSchemas(reactive([ width: 150 }, isSearch:true, + hiddenSearchHigh:true, tableForm:{ disabled:true, } 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 newRow['uom'] = item['uom'] newRow['qty'] = item['qty'] newRow['toInventoryStatus'] = item['inventoryStatus']//库存移动申请 + newRow['toBatch'] = formatTime(new Date(), 'yyyyMMdd') tableData.value.push(newRow) }) }else if (formField == 'toLocationCode') { @@ -347,7 +349,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if (toManagementPrecision.value == 'BY_BATCH') { if(row['fromBatch']==''){ row['fromBatchFormItemType'] = 'FormDate' - row['disabled_fromBatch'] = false + row['disabled_fromBatch'] = true } } else if (toManagementPrecision.value == 'BY_QUANTITY') { @@ -726,9 +728,9 @@ const submitForm = async (formType, submitData) => { return } let batchList = tableData.value.filter(item=>item.fromBatchFormItemType&&item.fromBatchFormItemType == 'FormDate' && item.toManagementPrecision == 'BY_BATCH') - let noBatch = batchList.find(item => !item.fromBatch) - if(noBatch){ - message.warning(`${noBatch.itemCode}没有填写批次,请填写`) + let noToBatch = batchList.find(item => !item.toBatch) + if(noToBatch){ + message.warning(`${noToBatch.itemCode}没有填写到批次,请填写`) return } data.subList = tableData.value // 拼接子表数据参数 diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/inventorymoveRequestMain.data.ts index caf3af137..87aed3ab1 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/inventorymoveRequestMain.data.ts @@ -588,22 +588,27 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( } }, }, - // { - // label: '到批次', - // field: 'toBatch', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTableForm: true, - // isForm: false, - // tableForm: { - // disabled: true, - // placeholder: '请选择从批次', - // valueFormat: 'YYYYMMDD', - // format: 'YYYYMMDD', - // }, - // }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: false, + type:'FormDate', + placeholder: '请选择到批次', + valueFormat: 'YYYYMMDD', + format: 'YYYYMMDD', + }, + form: { + componentProps: { + disabled: false, + valueFormat: 'YYYYMMDD', + } + } + }, { label: '从包装号', field: 'fromPackingNumber', diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts index e661a59d2..10cb16325 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts @@ -1790,74 +1790,93 @@ export const ProductreceiptRequestLabel = 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'] } ], }) - diff --git a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue index fb1691de2..b38e59460 100644 --- a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue +++ b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue @@ -253,16 +253,16 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3']),hasPermi:'wms:purchase-barter-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','8']),hasPermi:'wms:purchase-barter-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:purchase-barter-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-barter-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchase-barter-request-main:refused'}), // 驳回 defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchase-barter-request-main:agree'}), // 审批通过 - defaultButtons.outBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchase-barter-request-main:out'}), // 出库 - defaultButtons.inBtn({hide:isShowMainButton(row,['11']),hasPermi:'wms:purchase-barter-request-main:in'}), // 入库 - defaultButtons.mainListSuspend1Btn({hide:isShowMainButton(row,['11']),hasPermi:'wms:purchase-barter-request-main:suspend'}), // 中止 + // defaultButtons.outBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchase-barter-request-main:out'}), // 出库 + // defaultButtons.inBtn({hide:isShowMainButton(row,['11']),hasPermi:'wms:purchase-barter-request-main:in'}), // 入库 + // defaultButtons.mainListSuspend1Btn({hide:isShowMainButton(row,['11']),hasPermi:'wms:purchase-barter-request-main:suspend'}), // 中止 defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-barter-request-main:delete'}), // 删除 - defaultButtons.mainListDocumentPrintBtn({hide:isShowMainButton(row,['1','2','3','4','6','7','8','11'])}) + defaultButtons.mainListDocumentPrintBtn({hide:isShowMainButton(row,['8'])}) ] } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts index 3d356089b..ce669d1c9 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts @@ -219,6 +219,16 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ } } }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: true, +hiddenSearchHigh:true, + table: { + width: 150 + }, + }, { label: '版本号', field: 'version', @@ -556,6 +566,15 @@ export const DemandforecastingMainPlan = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: false, + table: { + width: 150 + }, + }, { label: '计划日期', field: 'dueDate', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts index 2ffc91738..605550b4b 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts @@ -109,6 +109,16 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ } } }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: true, +hiddenSearchHigh:true, + table: { + width: 150 + }, + }, { label: '版本号', field: 'version', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index 5e0bf682d..3f066efd8 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -513,6 +513,7 @@ export const PurchaseDetail = useCrudSchemas(reactive([ width: 150 }, isSearch:true, + hiddenSearchHigh:true, tableForm:{ disabled:true, } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/purchaseMain.data.ts index ad118ca10..d2b5b4db6 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/purchaseMain.data.ts @@ -508,7 +508,7 @@ export const PurchaseDetail = useCrudSchemas(reactive([ }, { label: '背番', - field: 'itemDesc1', + field: 'backNumber', sort: 'custom', table: { width: 150 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index 5a5676cdc..19bef105e 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -203,7 +203,7 @@ const { loadStart, loadDone } = usePageLoading() val.forEach(item=>{ if(tableData.value.find(item1=>item1['id'] == item['id'])) return const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row})) - + newRow[formField] = item[searchField] newRow['itemCode'] = item['code'] newRow['poNumber'] = item['number'] @@ -232,6 +232,16 @@ const { loadStart, loadDone } = usePageLoading() setV['itemCode'] = val[0]['code'] setV['poNumber'] = val[0]['number'] setV['poLine'] = val[0]['lineNumber'] + setV['receivedNumber'] = val[0]['receivedNumber'] + console.log(PurchasePlanDetail.allSchemas.tableFormColumns); + + PurchasePlanDetail.allSchemas.tableFormColumns.forEach(item =>{ + if(item.value == ''){ + if(item.field == 'receivedNumber'){ + item.tableForm.placeholder = '' + } + } + }) if(formField == 'supplierCode'){ setV['supplierCode'] = val[0]['code'] diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts index 34b72cab6..33573764b 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts @@ -653,6 +653,18 @@ export const PurchasePlanDetail = useCrudSchemas( // } // } // }, + { + label: '便次', + field: 'deliNo', + table: { + width: 150 + }, + sortTableDefault: 3, + isTableForm: false, + isForm: false, + isTable: true, + isDetail:false + }, { label: '订单行', field: 'poLine', @@ -772,15 +784,21 @@ export const PurchasePlanDetail = useCrudSchemas( field: 'backNumber', sort: 'custom', isSearch: true, + hiddenSearchHigh:true, table: { width: 150 }, - sortSearchDefault: 5, - sortTableDefault: 18, - isTableForm: false, - isForm: false, isTable: true, - isDetail:false + sortSearchDefault: 10, + sortTableDefault: 19, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } }, { label: '物料状态', @@ -843,8 +861,9 @@ export const PurchasePlanDetail = useCrudSchemas( } }, tableForm: { - type: 'Select', - disabled: true + // type: 'Select', + disabled: true, + isPlaceholder:false } }, { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts index 75917b43a..118bef62f 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts @@ -506,6 +506,7 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive field: 'backNumber', sort: 'custom', isSearch: true, + hiddenSearchHigh:true, table: { width: 150 }, diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue index 2e8d8b4b4..b98b2e5c4 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue @@ -153,6 +153,7 @@ + diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index df62496cd..36510a3de 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -932,9 +932,18 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive([ type: 'Select' }, }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: true, + hiddenSearchHigh:true, + table: { + width: 150 + }, + }, { label: '计量单位', field: 'uom', diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts index 413440157..7205f7294 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts @@ -293,6 +293,24 @@ export const PurchaseClaimRequestDetail = useCrudSchemas(reactive( } } }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + hiddenSearchHigh:true, + isSearch: true, + table: { + width: 150 + }, + tableForm: { + disabled:true + }, + form: { + componentProps: { + disabled: true, + } + } + }, { label: '计量单位', field: 'uom', diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue index 01e6b48e9..cf554c91c 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue @@ -176,6 +176,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => tfk['itemCode'] = item['itemCode'] tfk['itemName'] = item['itemName'] tfk['uom'] = item['supplierUom'] + tfk['backNumber'] = item['backNumber'] tableData.value.push(tfk) }) } diff --git a/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts b/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts index 47515e88f..677c6ad71 100644 --- a/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts +++ b/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts @@ -1532,6 +1532,17 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive width: 150 }, }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: false, + hiddenSearchHigh:true, + sortTableDefault:3, + table: { + width: 150 + }, + }, { label: '物料描述', field: 'itemDesc', diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts index 8ac1671fc..df2b2a631 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts @@ -1578,6 +1578,20 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive width: 150 }, }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: false, + hiddenSearchHigh:true, + table: { + width: 150 + }, + sortTableDefault:4, + isTableForm:false, + isDetail: false, + isTable: true, + }, { label: '物料描述', field: 'itemDesc', diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 97663905e..eed4c76b0 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -606,6 +606,7 @@ const searchTableSuccess = (formField, searchField, val, searchFormRef, type, ro newRow['deliveryDate'] = item['prhRcpDate'] newRow['arrivalQty'] = item['prhRcvd'] newRow['id'] = item['id'] + newRow['backNumber'] = item['backNumber'] newRow['currency'] = item['currency'] } tableData.value.push(newRow) @@ -1223,7 +1224,8 @@ const submitPurchasePass = async (id, submitData) => { const formFinanceRef = ref() const handleFinanceApp = async (row) => { row.postingDate = dayjs().valueOf() - row.voucherNumberRemark = '收到' + row.supplierName + '发票' + row.goldenTaxInvoiceNumber + //描述用供应商简称 + row.voucherNumberRemark = '收到' + row.supplierShortName + '发票' + row.goldenTaxInvoiceNumber formFinanceRef.value.open('update', row, null, '财务通过', '财务通过') } diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 80cf33539..0bdc3f9d8 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -126,6 +126,10 @@ export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive([ disabled: true } }, + { + label: '背番', + field: 'backNumber', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, { label: '索赔数量', field: 'claimQty', diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts index 569bfbc44..000358cd0 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts @@ -1717,6 +1717,16 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + hiddenSearchHigh:true, + isSearch: true, + table: { + width: 150 + }, + }, // { // label: '计量单位', // field: 'uom',