diff --git a/src/api/wms/balance/index.ts b/src/api/wms/balance/index.ts index fbca93edf..0aa246832 100644 --- a/src/api/wms/balance/index.ts +++ b/src/api/wms/balance/index.ts @@ -193,4 +193,8 @@ export const getBalanceByBusinessTypeByItemType = async (params) => { // 根据code获取数据列表 export const getBalanceItemListByCodes = async (data) => {   return await request.get({ url: `/wms/balance/listByCodes`,data }) - } \ No newline at end of file +} +// 查询bom批次默认数据 +export const getBanchBomPage = async (params) => { + return await request.get({ url: `/wms/balance/pageBOM`, params }) +} \ No newline at end of file diff --git a/src/api/wms/business/business.ts b/src/api/wms/business/business.ts deleted file mode 100644 index 6329afa0b..000000000 --- a/src/api/wms/business/business.ts +++ /dev/null @@ -1,524 +0,0 @@ -// 获取供应商列表 -import { getSupplierListByCodes, importTemplate } from '@/api/wms/supplier' -// 获取物料列表 -import { getItemListByCodes } from '@/api/wms/itembasic' -// 获取供应商物料列表 -import { getSupplierItemListByCodes } from '@/api/wms/supplieritem' -// 获取生产线物料 -import { getProductionLineCodelistByCodes } from '@/api/wms/productionlineitem' -// 获取包装规格 -import { getPackageunitListByCodes } from '@/api/wms/packageunit' -// 获取物料包装规格 -import { getItemPackageunitListByCodes } from '@/api/wms/itempackage' -// 获取客户物料 -import { getCustomerItemListByCodes } from '@/api/wms/customeritem' -// 获取库存余额 -import { getBalanceItemListByCodes } from '@/api/wms/balance' -import { isString } from 'min-dash' -const message = useMessage() // 消息弹窗 -const { t } = useI18n() // 国际化 -/** - * 业务组件 - * tableFormBlur 表格表单失去焦点时候获取焦点 - * FormBlur 表格失去焦点时候获取焦点 - */ -export const tableFormBlurVer = async (headerItem, val, row, index,routeName,formRef,detailData,tableData,callback) => { - if ( - headerItem.field == 'fromPackingNumber' || - headerItem.field == 'packingNumber' || - headerItem.field == 'itemCode' || - headerItem.field == 'packUnit' || - headerItem.field == 'secondPackUnit' || - headerItem.field == 'fromPackUnit' || - headerItem.field == 'toPackUnit'|| - headerItem.field == 'toPackUnit'|| - headerItem.field == 'supplierItemCode' - - ) { - let searchField = headerItem.field - let pageApi = ref() - let params = ref() - - if (val && isString(val)) { - // const obj = props.tableAllSchemas.tableFormColumns.find((item) => item.field == headerItem.field) - if (val.indexOf(',') > -1) { - message.alert('该输入框只能输入一条数据') - row[headerItem.field] = '' - return - } - // 校验 - let params = ref({}) - let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息 - // 循环参数设置参数为key:value格式 - if (searchCondition1 && searchCondition1.length > 0) { - for (let i = 0; i < searchCondition1.length; i++) { - if (searchCondition1[i].isMainValue) { - params.value[searchCondition1[i].key] = formRef.formModel[ - searchCondition1[i].value - ] - ? formRef.formModel[searchCondition1[i].value] - : detailData - ? detailData[searchCondition1[i].value] - : row - ? row[searchCondition1[i].value] - : '' - // 是否含有空参数情况 - let isNull = false - if ( - params.value[searchCondition1[i].key] == '' || - params.value[searchCondition1[i].key] == undefined - ) { - isNull = true - } - if (isNull) { - message.warning( - searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' - ) - row[headerItem.field] = '' - return - } - } else { - // 扩展 转换为筛选条件进行查询 - if (searchCondition1[i].isSearch) { - if (searchCondition1[i].isFormModel) { - //用formModel中的值 - if (searchCondition1[i].required) { - if ( - formRef.formModel[searchCondition1[i].value] == '' || - formRef.formModel[searchCondition1[i].value] == undefined - ) { - message.warning( - searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' - ) - row[headerItem.field] = '' - return - } - } - } - } else { - params.value[searchCondition1[i].key] = searchCondition1[i].value - } - } - } - } - params.value[headerItem.field] = val?.trim() - // 判断改包装号是否已经添加 - const seen = new Set() - const repeatCode = new Set() - let arr = tableData.map((item) => item[headerItem.field]?.trim()) - arr.forEach((item) => { - if (seen.has(item)) { - repeatCode.add(item) - } else { - seen.add(item) - } - }) - const arr1 = Array.from(repeatCode) - if (arr1.length > 0) { - message.warning(`${arr1.join(',')}${t('ts.已经存在')}`) - row[headerItem.field] = '' - return - } - if ( - headerItem.field == 'fromPackingNumber' || - headerItem.field == 'packingNumber' || - headerItem.field == 'itemCode' - ) { - // 业务 - // 采购退货申请,制品拆解,调拨出库,报废出库申请,合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请,库存修改申请 - if ( - routeName == 'PurchasereturnRequestMain' || - routeName == 'ProductdismantleRequestMain' || - routeName == 'TransferissueRequestMain' || - routeName == 'ScrapRequestMain' || - routeName == 'OktoholdRequestMain' || - routeName == 'HoldtookRequestMain' || - routeName == 'HoldtoscrapRequestMain' || - routeName == 'OktoscrapRequestMain' || - routeName == 'ScraptoholdRequestMain' || - routeName == 'InventorymoveRequestMain' || - routeName == 'InventorychangeRequestMain' - ) { - // //合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请参数稍有不同 - // if ( - // routeName == 'OktoholdRequestMain' || - // routeName == 'HoldtookRequestMain' || - // routeName == 'HoldtoscrapRequestMain' || - // routeName == 'OktoscrapRequestMain' || - // routeName == 'ScraptoholdRequestMain' || - // routeName == 'InventorymoveRequestMain' || - // routeName == 'InventorychangeRequestMain' - // ) { - // searchField = 'packingNumber' - // params.value.packingNumber = val?.trim() - // } - // pageApi.value = getBalanceItemListByCodes - } else if ( - routeName == 'RepleinshRequestMain' || - routeName == 'IssueRequestMain' || - routeName == 'InventoryinitRequestMain' - ) { - // 补料申请业务 - pageApi.value = getItemListByCodes - searchField = 'code' - params.value.codes = val?.trim() - } else if ( - routeName == 'ProductionMainAssemble' || - routeName == 'ProductionMainASparePart' || - routeName == 'ProductionMainPredictSparePart' || - routeName == 'ProductreceiptRequestMain' || - routeName == 'ProductreceiptRequestMainA' || - routeName == 'ProductreceiptscrapRequestMain' || - routeName == 'ProductscrapRequestMain' - ) { - // 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请 - pageApi.value = getProductionLineCodelistByCodes - params.value.productionLineCode= - formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode, - params.value.itemCodes=val?.trim() - } - } else if ( - headerItem.field == 'packUnit' || - headerItem.field == 'secondPackUnit' || - headerItem.field == 'fromPackUnit' || - headerItem.field == 'toPackUnit' - ) { - searchField = 'packUnit' - //包装规格 - // 预生产收货申请,装配收货申请,报修收货申请,客户退货申请,计划外入库,计划外出库,翻包申请 - if ( - routeName == 'ProductreceiptRequestMain' || - routeName == 'ProductreceiptRequestMainA' || - routeName == 'ProductreceiptscrapRequestMain' || - routeName == 'CustomerreturnRequestMain' || - routeName == 'UnplannedreceiptRequestMain' || - routeName == 'UnplannedissueJobMain' || - routeName == 'PackageoverRequestMain' - ) { - params.value.itemCode= row.itemCode - params.value.packUnit= val?.trim() - pageApi.value = getItemPackageunitListByCodes - } - } else if ( - headerItem.field == 'supplierItemCode' - ) { - // 生产退料申请,隔离退料申请 - if ( - routeName == 'ProductionreturnRequestMain' || - routeName == 'ProductionreturnRequestMainNo' - ) { - searchField = 'supplierCode' - params.value.itemCodes= row.itemCode - params.value.supplierCode= val?.trim() - pageApi.value = getSupplierItemListByCodes - } - } - const list = ref() - // 调取包装接口 - await pageApi.value(params.value).then(async (res) => { - list.value = res ? res : [] - // 只查一条数据,多条数据查询默认显示不存在 - if (res.length == 1) { - callback(searchField,list.value) - } else { - message.alert('代码' + row[headerItem.field] + '没有找到对应数据') - row[headerItem.field] = '' - return - } - }) - } - } -} -export const FormBlur = async (formField, val,routeName,formRef,detailData,formSchema,callback) => { - let pageApi = ref() - let params = ref() - let setV = {} - setV[formField] = '' - if (val && isString(val)) { - if ( - formField == 'supplierCode' || - formField == 'itemCode' || - formField == 'productItemCode' || - formField == 'componentItemCode' || - formField == 'packUnit' || - formField == 'inPackUnit' || - formField == 'fromPackingNumber' - ) { - let searchField = 'code' - if (formField == 'supplierCode') { - params.value = val?.trim() - pageApi.value = getSupplierListByCodes - } else if ( - formField == 'itemCode' || - formField == 'productItemCode' || - formField == 'componentItemCode' - ) { - // 销售价格单 - if (routeName == 'Saleprice') { - params.value = { - customerCode: formRef.formModel.customerCode, - itemCodes: val?.trim() - } - pageApi.value = getCustomerItemListByCodes - searchField = 'itemCode' - }else if (routeName == 'ProductscrapRequestMain') { - // 制品报废申请 - params.value = { - productionLineCode: - detailData.productionLine || detailData.productionLineCode, - itemCodes: val?.trim() - } - pageApi.value = getProductionLineCodelistByCodes - searchField = 'itemCode' - }else { - // params.value = val.trim() - searchField = 'code' - - params.value={ - codes:val?.trim() - } - pageApi.value = getItemListByCodes - } - } else if (formField == 'packUnit') { - if(routeName == 'Itemwarehouse'||routeName == 'Callmaterials'){//物料仓库默认配置,叫料标签 - searchField = 'packUnit' - params.value = { - itemCode: formRef.formModel.itemCode, - packUnit: val?.trim() - } - pageApi.value = getItemPackageunitListByCodes - }else{ - params.value = val?.trim() - pageApi.value = getPackageunitListByCodes - } - } else if (formField == 'inPackUnit') { - params.value = { - itemCode: formRef.formModel.itemCode, - packUnit: val.trim() - } - pageApi.value = getItemPackageunitListByCodes - } - // else if (formField == 'fromPackingNumber') { - // params.value = { - // packingNumber: val?.trim() - // } - // pageApi.value = getBalanceItemListByCodes - // } - let obj = {} - let searchCondition1 = formSchema.find((item) => item.field == formField).componentProps - .searchCondition //获取data.ts参数信息 - // 循环参数设置参数为key:value格式 - if (searchCondition1 && searchCondition1.length > 0) { - for (let i = 0; i < searchCondition1.length; i++) { - if (searchCondition1[i].isMainValue) { - obj[searchCondition1[i].key] = formRef.formModel[searchCondition1[i].value] - ? formRef.formModel[searchCondition1[i].value] - : detailData - ? detailData[searchCondition1[i].value] - : '' - // 是否含有空参数情况 - let isNull = false - if (obj[searchCondition1[i].key] == '' || obj[searchCondition1[i].key] == undefined) { - isNull = true - } - if (isNull) { - message.warning( - searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' - ) - return - } - } else { - // 扩展 转换为筛选条件进行查询 - if (searchCondition1[i].isSearch) { - if (searchCondition1[i].isFormModel) { - //用formModel中的值 - if (searchCondition1[i].required) { - if ( - formRef.formModel[searchCondition1[i].value] == '' || - formRef.formModel[searchCondition1[i].value] == undefined - ) { - message.warning( - searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' - ) - return - } - } - } - } else { - obj[searchCondition1[i].key] = searchCondition1[i].value - } - } - } - } - - let obj1 = formSchema.find((item) => item.field == formField) - if (!obj1.componentProps.multiple && val.indexOf(',') > -1) { - message.alert('该输入框只能输入一条数据') - formRef.setValues(setV) - return - } - await pageApi.value(params.value).then((res) => { - let arr1 = val.split(',') - let list = ref([]) - list.value = res - if (list.value?.length == 0) { - message.alert('暂无数据') - formRef.setValues(setV) - return - } - if (arr1.length != list.value.length) { - let arr2 = list.value.map((item) => item.code) - let str = [ - ...arr1.filter((item) => !arr2.includes(item)), - ...arr2.filter((item) => !arr1.includes(item)) - ].join(',') - message.alert('代码' + str + '没有找到对应数据') - formRef.setValues(setV) - return - } - // emit('searchTableSuccess', formField, searchField, list.value, formRef.value, 'form') - callback(searchField,list.value) - }) - } - } -} - -// 根据下方输入框失去焦点校验信息 -export const getListByBottonInput = async (headerItem, val,row,routeName,formRef,detailData,tableData,callback) => { - let pageApi = ref() - let params = ref({}) - let list = ref([]) - let field = 'itemCode' - // scp采购订单 - if(!val)return; - if (routeName == 'PurchaseMain') { - pageApi.value = getSupplierItemListByCodes - params.value = { - supplierCode: formRef.formModel.supplierCode, - itemCodes: val?.trim(), - available: true - } - } else if (routeName == 'ProductionMain') { - pageApi.value = getProductionLineCodelistByCodes - params.value = { - productionLineCode: formRef.formModel.productionLine, - itemCodes: val?.trim() - } - } else if ( - routeName == 'ZZBJDeliverPlanMain' || - routeName == 'DeliverPlanMain' || - routeName == 'DeliverRequestMain' || - routeName == 'ZZBJDeliverRequestMain' - ) { - // 自制备件发货计划,发货计划,成品发货申请,自制备件发货申请 - pageApi.value = getCustomerItemListByCodes - params.value = { - customerCode: formRef.formModel.customerCode, - itemCodes: val?.trim() - } - } - // else if (routeName == 'UnplannedissueRequestMain') { - // // 计划外出库 - // pageApi.value = getBalanceItemListByCodes - // params.value = { - // packingNumber: val?.trim() - // } - // field = 'packingNumber' - // } - else { - params.value.codes = val?.trim() - pageApi.value = getItemListByCodes - } - let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息 - // 循环参数设置参数为key:value格式 - if (searchCondition1 && searchCondition1.length > 0) { - for (let i = 0; i < searchCondition1.length; i++) { - if (searchCondition1[i].isMainValue) { - params.value[searchCondition1[i].key] = formRef.formModel[ - searchCondition1[i].value - ] - ? formRef.formModel[searchCondition1[i].value] - : detailData - ? detailData[searchCondition1[i].value] - : '' - // 是否含有空参数情况 - let isNull = false - if ( - params.value[searchCondition1[i].key] == '' || - params.value[searchCondition1[i].key] == undefined - ) { - isNull = true - } - if (isNull) { - message.warning( - searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' - ) - return - } - } else if (searchCondition1[i].isTableRowValue) { - if (searchCondition1[i].required) { - if (row[searchCondition1[i].value] == '' || row[searchCondition1[i].value] == undefined) { - message.warning( - searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' - ) - return - } - } - row[searchCondition1[i].value] - //查询当前table表数据的值 - params.value[searchCondition1[i].key] = row[searchCondition1[i].value] - } else { - // 扩展 转换为筛选条件进行查询 - if (searchCondition1[i].isSearch) { - if (searchCondition1[i].isFormModel) { - //用formModel中的值 - if (searchCondition1[i].required) { - if ( - formRef.formModel[searchCondition1[i].value] == '' || - formRef.formModel[searchCondition1[i].value] == undefined - ) { - message.warning( - searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' - ) - return - } - } - }else { - params.value[searchCondition1[i].key] = searchCondition1[i].value - } - } else { - params.value[searchCondition1[i].key] = searchCondition1[i].value - } - } - } - } - await pageApi.value(params.value).then(async (res) => { - list.value = res ? res : [] - let arr1 = val.split(',').map(item=>item.trim()) - if (arr1.length != res.length) { - let arr2 = res.map((item) => item[field]) - let str = [ - ...arr1.filter((item) => !arr2.includes(item)), - ...arr2.filter((item) => !arr1.includes(item)) - ].join(',') - message.alert('代码' + str + '没有找到对应数据') - return - } else { - let repeatCode = [] - if(tableData.length > 0){ - tableData.forEach((item) => { - const findIndex = arr1.findIndex(valItem=>valItem==item[field]) - if(findIndex > -1){ - arr1.splice(findIndex,1) - repeatCode.push(item.itemCode) - } - }) - } - if(repeatCode.length>0){ - message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`); - return; - } - callback(list.value) - } - }) -} diff --git a/src/api/wms/business/inputBlur.ts b/src/api/wms/business/inputBlur.ts new file mode 100644 index 000000000..905a255d5 --- /dev/null +++ b/src/api/wms/business/inputBlur.ts @@ -0,0 +1,922 @@ +// 获取供应商列表 +import { getSupplierListByCodes, importTemplate } from '@/api/wms/supplier' +// 获取物料列表 +import { getItemListByCodes } from '@/api/wms/itembasic' +// 获取供应商物料列表 +import { getSupplierItemListByCodes } from '@/api/wms/supplieritem' +// 获取生产线物料 +import { getProductionLineCodelistByCodes } from '@/api/wms/productionlineitem' +// 获取包装规格 +import { getPackageunitListByCodes } from '@/api/wms/packageunit' +// 获取物料包装规格 +import { getItemPackageunitListByCodes } from '@/api/wms/itempackage' +// 获取客户物料 +import { getCustomerItemListByCodes } from '@/api/wms/customeritem' +// 获取库存余额 +import { getBalanceItemListByCodes } from '@/api/wms/balance' +import { isString } from 'min-dash' +const message = useMessage() // 消息弹窗 +const { t } = useI18n() // 国际化 +/** + * 业务组件 + * tableFormBlur 表格表单失去焦点时候获取焦点 + * FormBlur 表格失去焦点时候获取焦点 + */ +export const tableFormBlurVer = async (headerItem, val, row, index, routeName, formRef, detailData, tableData, callback) => { + if (headerItem.tableForm.searchPage && headerItem.tableForm.verificationParams) { + if (val && isString(val)) { + if (val.indexOf(',') > -1) { + message.alert('该输入框只能输入一条数据') + row[headerItem.field] = '' + return + } + // 校验 + const params = ref({}) + const filters: any[] = [] + const searchCondition = headerItem.tableForm.searchCondition //获取data.ts参数信息 + const verificationParams = headerItem.tableForm.verificationParams //获取data.ts参数信息 + // 循环参数设置参数为key:value格式 + if (searchCondition && searchCondition.length > 0) { + for (let i = 0; i < searchCondition.length; i++) { + if (searchCondition[i].isMainValue) { + params.value[searchCondition[i].key] = formRef.formModel[ + searchCondition[i].value + ] + ? formRef.formModel[searchCondition[i].value] + : detailData + ? detailData[searchCondition[i].value] + : row + ? row[searchCondition[i].value] + : '' + // 是否含有空参数情况 + let isNull = false + if ( + params.value[searchCondition[i].key] == '' || + params.value[searchCondition[i].key] == undefined + ) { + isNull = true + } + if (isNull) { + message.warning( + searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' + ) + row[headerItem.field] = '' + return + } + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: formRef.formModel[searchCondition[i].value] + }) + } else if (searchCondition[i].isTableRowValue) { + if (searchCondition[i].required) { + if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) { + message.warning( + searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' + ) + row[headerItem.field] = '' + return + } + } + //查询当前table表数据的值 + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: row[searchCondition[i].value] + }) + } else { + // 扩展 转换为筛选条件进行查询 + if (searchCondition[i].isSearch) { + if (searchCondition[i].isFormModel) { + //用formModel中的值 + if (searchCondition[i].required) { + if ( + formRef.formModel[searchCondition[i].value] == '' || + formRef.formModel[searchCondition[i].value] == undefined + ) { + message.warning( + searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' + ) + row[headerItem.field] = '' + return + } + } + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: formRef.formModel[searchCondition[i].value] + }) + } else { + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: searchCondition[i].value + }) + } + } else { + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: searchCondition[i].value + }) + } + } + } + } + if (verificationParams && verificationParams.length > 0) { + // 转换筛选条件所需 + for (let i = 0; i < verificationParams.length; i++) { + // 扩展 转换为筛选条件进行查询 + if (verificationParams[i].isSearch) { + if (verificationParams[i].isFormModel) { + filters.push({ + action: verificationParams[i].action, + column: verificationParams[i].key, + value: formRef.formModel[verificationParams[i].value] + ? formRef.formModel[verificationParams[i].value] + : val.trim() + }) + } else { + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: searchCondition[i].value + }) + } + } else { + params[verificationParams[i].key] = verificationParams[i].value + } + } + } + // 判断改包装号是否已经添加 + const seen = new Set() + const repeatCode = new Set() + const arr = tableData.map((item) => item[headerItem.field]?.trim()) + arr.forEach((item) => { + if (item) { + if (seen.has(item)) { + repeatCode.add(item) + } else { + seen.add(item) + } + } + }) + const arr1 = Array.from(repeatCode) + if (arr1.length > 0) { + message.warning(`${arr1.join(',')}${t('ts.已经存在')}`) + row[headerItem.field] = '' + return + } + if (filters.length > 0) { + params.value.isSearch = true + params.value.filters = filters + } + const obj = { + by: 'ASC', + pageNo: 1, + pageSize: 20 + } + params.value = { + isSearch: params.value.isSearch, + filters: params.value.filters, + ...obj + } + const list = ref() + // 调取包装接口 + await headerItem.tableForm.searchPage(params.value).then(async (res) => { + + list.value = res?.list?.length > 0 ? res.list.slice(0, 1) : [] + // 只查一条数据,多条数据查询默认显示不存在 + if (list.value?.length == 0) { + message.alert('代码' + row[headerItem.field] + '没有找到对应数据') + row[headerItem.field] = '' + return + } + callback(list.value) + }) + } + } else { + if ( + headerItem.field == 'fromPackingNumber' || + headerItem.field == 'packingNumber' || + headerItem.field == 'itemCode' || + headerItem.field == 'packUnit' || + headerItem.field == 'secondPackUnit' || + headerItem.field == 'fromPackUnit' || + headerItem.field == 'toPackUnit'|| + headerItem.field == 'toPackUnit'|| + headerItem.field == 'supplierItemCode' + + ) { + let searchField = headerItem.field + let pageApi = ref() + let params = ref() + + if (val && isString(val)) { + // const obj = props.tableAllSchemas.tableFormColumns.find((item) => item.field == headerItem.field) + if (val.indexOf(',') > -1) { + message.alert('该输入框只能输入一条数据') + row[headerItem.field] = '' + return + } + // 校验 + let params = ref({}) + let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息 + // 循环参数设置参数为key:value格式 + if (searchCondition1 && searchCondition1.length > 0) { + for (let i = 0; i < searchCondition1.length; i++) { + if (searchCondition1[i].isMainValue) { + params.value[searchCondition1[i].key] = formRef.formModel[ + searchCondition1[i].value + ] + ? formRef.formModel[searchCondition1[i].value] + : detailData + ? detailData[searchCondition1[i].value] + : row + ? row[searchCondition1[i].value] + : '' + // 是否含有空参数情况 + let isNull = false + if ( + params.value[searchCondition1[i].key] == '' || + params.value[searchCondition1[i].key] == undefined + ) { + isNull = true + } + if (isNull) { + message.warning( + searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' + ) + row[headerItem.field] = '' + return + } + } else { + // 扩展 转换为筛选条件进行查询 + if (searchCondition1[i].isSearch) { + if (searchCondition1[i].isFormModel) { + //用formModel中的值 + if (searchCondition1[i].required) { + if ( + formRef.formModel[searchCondition1[i].value] == '' || + formRef.formModel[searchCondition1[i].value] == undefined + ) { + message.warning( + searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' + ) + row[headerItem.field] = '' + return + } + } + } + } else { + params.value[searchCondition1[i].key] = searchCondition1[i].value + } + } + } + } + params.value[headerItem.field] = val?.trim() + // 判断改包装号是否已经添加 + const seen = new Set() + const repeatCode = new Set() + let arr = tableData.map((item) => item[headerItem.field]?.trim()) + arr.forEach((item) => { + if (seen.has(item)) { + repeatCode.add(item) + } else { + seen.add(item) + } + }) + const arr1 = Array.from(repeatCode) + if (arr1.length > 0) { + message.warning(`${arr1.join(',')}${t('ts.已经存在')}`) + row[headerItem.field] = '' + return + } + if ( + headerItem.field == 'fromPackingNumber' || + headerItem.field == 'packingNumber' || + headerItem.field == 'itemCode' + ) { + // 业务 + // 采购退货申请,制品拆解,调拨出库,报废出库申请,合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请,库存修改申请 + if ( + routeName == 'PurchasereturnRequestMain' || + routeName == 'ProductdismantleRequestMain' || + routeName == 'TransferissueRequestMain' || + routeName == 'ScrapRequestMain' || + routeName == 'OktoholdRequestMain' || + routeName == 'HoldtookRequestMain' || + routeName == 'HoldtoscrapRequestMain' || + routeName == 'OktoscrapRequestMain' || + routeName == 'ScraptoholdRequestMain' || + routeName == 'InventorymoveRequestMain' || + routeName == 'InventorychangeRequestMain' + ) { + // //合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请参数稍有不同 + // if ( + // routeName == 'OktoholdRequestMain' || + // routeName == 'HoldtookRequestMain' || + // routeName == 'HoldtoscrapRequestMain' || + // routeName == 'OktoscrapRequestMain' || + // routeName == 'ScraptoholdRequestMain' || + // routeName == 'InventorymoveRequestMain' || + // routeName == 'InventorychangeRequestMain' + // ) { + // searchField = 'packingNumber' + // params.value.packingNumber = val?.trim() + // } + // pageApi.value = getBalanceItemListByCodes + } else if ( + routeName == 'RepleinshRequestMain' || + routeName == 'IssueRequestMain' || + routeName == 'InventoryinitRequestMain' + ) { + // 补料申请业务 + pageApi.value = getItemListByCodes + searchField = 'code' + params.value.codes = val?.trim() + } else if ( + routeName == 'ProductionMainAssemble' || + routeName == 'ProductionMainASparePart' || + routeName == 'ProductionMainPredictSparePart' || + routeName == 'ProductreceiptRequestMain' || + routeName == 'ProductreceiptRequestMainA' || + routeName == 'ProductreceiptscrapRequestMain' || + routeName == 'ProductscrapRequestMain' + ) { + // 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请 + pageApi.value = getProductionLineCodelistByCodes + params.value.productionLineCode= + formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode, + params.value.itemCodes=val?.trim() + } + } else if ( + headerItem.field == 'packUnit' || + headerItem.field == 'secondPackUnit' || + headerItem.field == 'fromPackUnit' || + headerItem.field == 'toPackUnit' + ) { + searchField = 'packUnit' + //包装规格 + // 预生产收货申请,装配收货申请,报修收货申请,客户退货申请,计划外入库,计划外出库,翻包申请 + if ( + routeName == 'ProductreceiptRequestMain' || + routeName == 'ProductreceiptRequestMainA' || + routeName == 'ProductreceiptscrapRequestMain' || + routeName == 'CustomerreturnRequestMain' || + routeName == 'UnplannedreceiptRequestMain' || + routeName == 'UnplannedissueJobMain' || + routeName == 'PackageoverRequestMain' + ) { + params.value.itemCode= row.itemCode + params.value.packUnit= val?.trim() + pageApi.value = getItemPackageunitListByCodes + } + } else if ( + headerItem.field == 'supplierItemCode' + ) { + // 生产退料申请,隔离退料申请 + if ( + routeName == 'ProductionreturnRequestMain' || + routeName == 'ProductionreturnRequestMainNo' + ) { + searchField = 'supplierCode' + params.value.itemCodes= row.itemCode + params.value.supplierCode= val?.trim() + pageApi.value = getSupplierItemListByCodes + } + } + const list = ref() + // 调取包装接口 + await pageApi.value(params.value).then(async (res) => { + list.value = res ? res : [] + // 只查一条数据,多条数据查询默认显示不存在 + if (res.length == 1) { + callback(list.value) + } else { + message.alert('代码' + row[headerItem.field] + '没有找到对应数据') + row[headerItem.field] = '' + return + } + }) + } + } + } +} +export const FormBlur = async (field, val, routeName, formRef, detailData, formSchema, callback) => { + if (formSchema.searchPage && formSchema.verificationParams) { + //获取data.ts参数信息 + const searchCondition = formSchema?.searchCondition || [] + //获取失去焦点参数信息 + const verificationParams = formSchema?.verificationParams || + [] + console.log('走新方法啦') + // searchCondition = [...searchCondition, ...verificationParams] + + if (val && isString(val)) { + const setV = {} + setV[field] = '' + let params = {} + const _searchCondition = {} + const filters: any[] = [] + if (searchCondition && searchCondition.length > 0) { + // 转换筛选条件所需 + for (let i = 0; i < searchCondition.length; i++) { + // searchCondition.forEach((item) => { + // 查询条件为主表某字段,需要赋值主表数据,数据来源是详情的,赋值需要从row中获取 + if (searchCondition[i].isMainValue) { + _searchCondition[searchCondition[i].key] = formRef.formModel[ + searchCondition[i].value + ] + ? formRef.formModel[searchCondition[i].value] + : detailData + ? detailData[searchCondition[i].value] + : // : row + // ? row[searchCondition[i].value] + '' + // 是否含有空参数情况 + let isNull = false + if ( + _searchCondition[searchCondition[i].key] == '' || + _searchCondition[searchCondition[i].key] == undefined + ) { + isNull = true + } + if (isNull) { + message.warning( + searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' + ) + formRef.setValues(setV) + return + } + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: formRef.formModel[searchCondition[i].value] + }) + } + + // else if (searchCondition[i].isTableRowValue) { + // if (searchCondition[i].required) { + // if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) { + // message.warning( + // searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' + // ) + // return + // } + // } + // row[searchCondition[i].value] + // //查询当前table表数据的值 + // _searchCondition[searchCondition[i].key] = row[searchCondition[i].value] + // } + else { + // 扩展 转换为筛选条件进行查询 + if (searchCondition[i].isSearch) { + if (searchCondition[i].isFormModel) { + //用formModel中的值 + if (searchCondition[i].required) { + if ( + formRef.formModel[searchCondition[i].value] == '' || + formRef.formModel[searchCondition[i].value] == undefined + ) { + message.warning( + searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' + ) + formRef.setValues(setV) + return + } + } + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: formRef.formModel[searchCondition[i].value] + }) + } else { + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: searchCondition[i].value + }) + } + } else { + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: searchCondition[i].value + }) + } + } + } + } + if (verificationParams && verificationParams.length > 0) { + // 转换筛选条件所需 + for (let i = 0; i < verificationParams.length; i++) { + // 扩展 转换为筛选条件进行查询 + if (verificationParams[i].isSearch) { + if (verificationParams[i].isFormModel) { + filters.push({ + action: verificationParams[i].action, + column: verificationParams[i].key, + value: formRef.formModel[verificationParams[i].value] + ? formRef.formModel[verificationParams[i].value] + : val.trim() + }) + } else { + filters.push({ + action: verificationParams[i].action, + column: verificationParams[i].key, + value: verificationParams[i].value + }) + } + } else { + _searchCondition[verificationParams[i].key] = verificationParams[i].value + } + } + } + console.log(filters) + if (filters.length > 0) { + _searchCondition.isSearch = true + _searchCondition.filters = filters + } + console.log(4545, _searchCondition) + const obj = { + by: 'ASC', + pageNo: 1, + pageSize: 20 + } + console.log(888, _searchCondition) + params = { + isSearch: _searchCondition.isSearch, + filters: _searchCondition.filters, + ...obj + } + // console.log(333,params) + if (!formSchema?.multiple && val.indexOf(',') > -1) { + message.alert('该输入框只能输入一条数据') + formRef.setValues(setV) + return + } + await formSchema.searchPage(params).then((res) => { + const arr1 = val.split(',') + const list = ref([]) + list.value = res?.list?.length > 0 ? res.list.slice(0, 1) : [] + if (list.value?.length == 0) { + message.alert('暂无数据') + formRef.setValues(setV) + return + } + if (arr1.length != list.value.length) { + const arr2 = list.value.map((item) => item.code) + const str = [ + ...arr1.filter((item) => !arr2.includes(item)), + ...arr2.filter((item) => !arr1.includes(item)) + ].join(',') + message.alert('代码' + str + '没有找到对应数据') + formRef.setValues(setV) + return + } + callback(list.value) + }) + } + } + else { + let pageApi = ref() + let params = ref() + let setV = {} + setV[field] = '' + if (val && isString(val)) { + if ( + field == 'supplierCode' || + field == 'itemCode' || + field == 'productItemCode' || + field == 'componentItemCode' || + field == 'packUnit' || + field == 'inPackUnit' || + field == 'fromPackingNumber' + ) { + let searchField = 'code' + if (field == 'supplierCode') { + params.value = val?.trim() + pageApi.value = getSupplierListByCodes + } else if ( + field == 'itemCode' || + field == 'productItemCode' || + field == 'componentItemCode' + ) { + // 销售价格单 + if (routeName == 'Saleprice') { + params.value = { + customerCode: formRef.formModel.customerCode, + itemCodes: val?.trim() + } + pageApi.value = getCustomerItemListByCodes + searchField = 'itemCode' + } else if (routeName == 'ProductscrapRequestMain') { + // 制品报废申请 + params.value = { + productionLineCode: + detailData.productionLine || detailData.productionLineCode, + itemCodes: val?.trim() + } + pageApi.value = getProductionLineCodelistByCodes + searchField = 'itemCode' + } else { + // params.value = val.trim() + searchField = 'code' + + params.value = { + codes: val?.trim() + } + pageApi.value = getItemListByCodes + } + } else if (field == 'packUnit') { + if (routeName == 'Itemwarehouse' || routeName == 'Callmaterials') {//物料仓库默认配置,叫料标签 + searchField = 'packUnit' + params.value = { + itemCode: formRef.formModel.itemCode, + packUnit: val?.trim() + } + pageApi.value = getItemPackageunitListByCodes + } else { + params.value = val?.trim() + pageApi.value = getPackageunitListByCodes + } + } else if (field == 'inPackUnit') { + params.value = { + itemCode: formRef.formModel.itemCode, + packUnit: val.trim() + } + pageApi.value = getItemPackageunitListByCodes + } + // else if (formField == 'fromPackingNumber') { + // params.value = { + // packingNumber: val?.trim() + // } + // pageApi.value = getBalanceItemListByCodes + // } + let obj = {} + let searchCondition1 = formSchema.searchCondition //获取data.ts参数信息 + // 循环参数设置参数为key:value格式 + if (searchCondition1 && searchCondition1.length > 0) { + for (let i = 0; i < searchCondition1.length; i++) { + if (searchCondition1[i].isMainValue) { + obj[searchCondition1[i].key] = formRef.formModel[searchCondition1[i].value] + ? formRef.formModel[searchCondition1[i].value] + : detailData + ? detailData[searchCondition1[i].value] + : '' + // 是否含有空参数情况 + let isNull = false + if (obj[searchCondition1[i].key] == '' || obj[searchCondition1[i].key] == undefined) { + isNull = true + } + if (isNull) { + message.warning( + searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' + ) + return + } + } else { + // 扩展 转换为筛选条件进行查询 + if (searchCondition1[i].isSearch) { + if (searchCondition1[i].isFormModel) { + //用formModel中的值 + if (searchCondition1[i].required) { + if ( + formRef.formModel[searchCondition1[i].value] == '' || + formRef.formModel[searchCondition1[i].value] == undefined + ) { + message.warning( + searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' + ) + return + } + } + } + } else { + obj[searchCondition1[i].key] = searchCondition1[i].value + } + } + } + } + + if (!formSchema.multiple && val.indexOf(',') > -1) { + message.alert('该输入框只能输入一条数据') + formRef.setValues(setV) + return + } + await pageApi.value(params.value).then((res) => { + let arr1 = val.split(',') + let list = ref([]) + list.value = res + if (list.value?.length == 0) { + message.alert('暂无数据') + formRef.setValues(setV) + return + } + if (arr1.length != list.value.length) { + let arr2 = list.value.map((item) => item.code) + let str = [ + ...arr1.filter((item) => !arr2.includes(item)), + ...arr2.filter((item) => !arr1.includes(item)) + ].join(',') + message.alert('代码' + str + '没有找到对应数据') + formRef.setValues(setV) + return + } + // emit('searchTableSuccess', formField, searchField, list.value, formRef.value, 'form') + callback(list.value) + }) + } + } + } +} + +// 根据下方输入框失去焦点校验信息 +export const getListByBottonInput = async (headerItem, val, row, routeName, formRef, detailData, tableData, callback) => { + let tableFormSchemaObj = headerItem?.tableForm + console.log(333,tableFormSchemaObj) + if (tableFormSchemaObj.searchPage && tableFormSchemaObj.verificationParams) { + let params = ref({}) + let list = ref([]) + console.log(3344) + let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息 + let verificationParams = headerItem.tableForm.verificationParams //获取data.ts参数信息 + // 循环参数设置参数为key:value格式 + if (searchCondition1 && searchCondition1.length > 0) { + for (let i = 0; i < searchCondition1.length; i++) { + if (searchCondition1[i].isMainValue) { + params.value[searchCondition1[i].key] = formRef.formModel[ + searchCondition1[i].value + ] + ? formRef.formModel[searchCondition1[i].value] + : detailData + ? detailData[searchCondition1[i].value] + : '' + // 是否含有空参数情况 + let isNull = false + if ( + params.value[searchCondition1[i].key] == '' || + params.value[searchCondition1[i].key] == undefined + ) { + isNull = true + } + if (isNull) { + message.warning( + searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' + ) + return + } + } else if (searchCondition1[i].isTableRowValue) { + if (searchCondition1[i].required) { + if (row[searchCondition1[i].value] == '' || row[searchCondition1[i].value] == undefined) { + message.warning( + searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' + ) + return + } + } + row[searchCondition1[i].value] + //查询当前table表数据的值 + params.value[searchCondition1[i].key] = row[searchCondition1[i].value] + } else { + // 扩展 转换为筛选条件进行查询 + if (searchCondition1[i].isSearch) { + if (searchCondition1[i].isFormModel) { + //用formModel中的值 + if (searchCondition1[i].required) { + if ( + formRef.formModel[searchCondition1[i].value] == '' || + formRef.formModel[searchCondition1[i].value] == undefined + ) { + message.warning( + searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!' + ) + return + } + } + } else { + params.value[searchCondition1[i].key] = searchCondition1[i].value + } + } else { + params.value[searchCondition1[i].key] = searchCondition1[i].value + } + } + } + } + console.log(999, verificationParams) + if (verificationParams && verificationParams.length > 0) { + for (let i = 0; i < verificationParams.length; i++) { + params.value[verificationParams[i].key] = val + } + } + await tableFormSchemaObj.verificationPage(params.value).then(async (res) => { + list.value = res ? res : [] + let arr1 = val.split(',').map(item => item.trim()) + if (arr1.length != res.length) { + let arr2 = res.map((item) => item[field]) + let str = [ + ...arr1.filter((item) => !arr2.includes(item)), + ...arr2.filter((item) => !arr1.includes(item)) + ].join(',') + message.alert('代码' + str + '没有找到对应数据') + return + } else { + let repeatCode = [] + if (tableData.length > 0) { + tableData.forEach((item) => { + const findIndex = arr1.findIndex(valItem => valItem == item[field]) + if (findIndex > -1) { + arr1.splice(findIndex, 1) + repeatCode.push(item.itemCode) + } + }) + } + if (repeatCode.length > 0) { + message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`); + return; + } + callback(list.value) + } + }) + return + } else { + let pageApi = ref() + let params = ref({}) + let list = ref([]) + let field = 'itemCode' + // scp采购订单 + if (!val) return; + + if (routeName == 'PurchaseMain') { + pageApi.value = getSupplierItemListByCodes + params.value = { + supplierCode: formRef.formModel.supplierCode, + itemCodes: val?.trim(), + available: true + } + } else if (routeName == 'ProductionMain') { + pageApi.value = getProductionLineCodelistByCodes + params.value = { + productionLineCode: formRef.formModel.productionLine, + itemCodes: val?.trim() + } + } else if ( + routeName == 'ZZBJDeliverPlanMain' || + routeName == 'DeliverPlanMain' || + routeName == 'DeliverRequestMain' || + routeName == 'ZZBJDeliverRequestMain' + ) { + // 自制备件发货计划,发货计划,成品发货申请,自制备件发货申请 + pageApi.value = getCustomerItemListByCodes + params.value = { + customerCode: formRef.formModel.customerCode, + itemCodes: val?.trim() + } + } + // else if (routeName == 'UnplannedissueRequestMain') { + // // 计划外出库 + // pageApi.value = getBalanceItemListByCodes + // params.value = { + // packingNumber: val?.trim() + // } + // field = 'packingNumber' + // } + else { + params.value.codes = val?.trim() + pageApi.value = getItemListByCodes + } + + await pageApi.value(params.value).then(async (res) => { + list.value = res ? res : [] + let arr1 = val.split(',').map(item => item.trim()) + if (arr1.length != res.length) { + let arr2 = res.map((item) => item[field]) + let str = [ + ...arr1.filter((item) => !arr2.includes(item)), + ...arr2.filter((item) => !arr1.includes(item)) + ].join(',') + message.alert('代码' + str + '没有找到对应数据') + return + } else { + let repeatCode = [] + if (tableData.length > 0) { + tableData.forEach((item) => { + const findIndex = arr1.findIndex(valItem => valItem == item[field]) + if (findIndex > -1) { + arr1.splice(findIndex, 1) + repeatCode.push(item.itemCode) + } + }) + } + if (repeatCode.length > 0) { + message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`); + return; + } + callback(list.value) + } + }) + + } + +} diff --git a/src/api/wms/location/index.ts b/src/api/wms/location/index.ts index 3870b46d7..36cf3f575 100644 --- a/src/api/wms/location/index.ts +++ b/src/api/wms/location/index.ts @@ -136,3 +136,7 @@ export const selectConfigToLocation = async (params) => { return request.get({ url: `/wms/location/pageConfigToLocation`, params }) } } +// 根据code获取数据列表 +export const getLocationByCodes = async (params) => { + return await request.get({ url: `/wms/location/listByCodes`, params }) +} \ No newline at end of file diff --git a/src/api/wms/supplierinvoiceRecordMain/index.ts b/src/api/wms/supplierinvoiceRecordMain/index.ts index 9ffde26ba..dfdb880ec 100644 --- a/src/api/wms/supplierinvoiceRecordMain/index.ts +++ b/src/api/wms/supplierinvoiceRecordMain/index.ts @@ -60,4 +60,8 @@ export const exportSupplierinvoiceRecordMain = async (data) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/supplierinvoice-record-main/get-import-template' }) -} \ No newline at end of file +} + +export const exportSupplierinvoiceRecordDetail = async (params) => { + return await request.download({ url: `/wms/supplierinvoice-record-deatil/export-excel`, params }) +} diff --git a/src/api/wms/unplannedreceiptRequestDetail/index.ts b/src/api/wms/unplannedreceiptRequestDetail/index.ts index c62a7e13f..3b63ee625 100644 --- a/src/api/wms/unplannedreceiptRequestDetail/index.ts +++ b/src/api/wms/unplannedreceiptRequestDetail/index.ts @@ -38,6 +38,11 @@ export const getUnplannedreceiptRequestDetailPage = async (params) => { } } +// 查询计划外入库申请子打印标签 +export const getUnplannedreceiptRequestDetailPageCreateLabel = async (params) => { + return await request.get({ url: `/wms/unplannedreceipt-request-detail/pageCreateLabel`, params }) +} + // 查询计划外入库申请子详情 export const getUnplannedreceiptRequestDetail = async (id: number) => { return await request.get({ url: `/wms/unplannedreceipt-request-detail/get?id=` + id }) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index e8a2d681f..99a390f19 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -134,12 +134,8 @@ :showSearchTableQueryFields="showSearchTableQueryFields" @searchTableSuccess="searchTableSuccess" > - - - @@ -150,7 +146,7 @@ import ButtonBase from '@/components/XButton/src/ButtonBase.vue' import TableForm from '@/components/TableForm/src/TableForm.vue' import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' -import { tableFormBlurVer, FormBlur, getListByBottonInput } from '@/api/wms/business/business' +import { tableFormBlurVer, FormBlur, getListByBottonInput } from '@/api/wms/business/inputBlur' import { isString } from 'min-dash' const props = defineProps({ @@ -846,210 +842,25 @@ const onChange = (field, cur) => { const onBlur = async (field, e) => { isExecute.value = false let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps - if (formSchemaObj?.enterSearch) { - if (formSchemaObj.searchPage && formSchemaObj.verificationParams) { - //获取data.ts参数信息 - let searchCondition = - formSchema.value.find((item) => item.field == field)?.componentProps?.searchCondition || [] - //获取失去焦点参数信息 - let verificationParams = - formSchema.value.find((item) => item.field == field)?.componentProps?.verificationParams || - [] - console.log('走新方法啦') - // searchCondition = [...searchCondition, ...verificationParams] - - if (e && isString(e)) { - let setV = {} - setV[field] = '' - let params = {} - const _searchCondition = {} - let filters: any[] = [] - if (searchCondition && searchCondition.length > 0) { - // 转换筛选条件所需 - for (var i = 0; i < searchCondition.length; i++) { - // searchCondition.forEach((item) => { - // 查询条件为主表某字段,需要赋值主表数据,数据来源是详情的,赋值需要从row中获取 - if (searchCondition[i].isMainValue) { - _searchCondition[searchCondition[i].key] = formRef.value.formModel[ - searchCondition[i].value - ] - ? formRef.value.formModel[searchCondition[i].value] - : props.detailData - ? props.detailData[searchCondition[i].value] - : // : row - // ? row[searchCondition[i].value] - '' - // 是否含有空参数情况 - let isNull = false - if ( - _searchCondition[searchCondition[i].key] == '' || - _searchCondition[searchCondition[i].key] == undefined - ) { - isNull = true - } - if (isNull) { - message.warning( - searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' - ) - return - } - filters.push({ - action: searchCondition[i].action || '==', - column: searchCondition[i].key, - value: formRef.value.formModel[searchCondition[i].value] - }) - } - // else if (searchCondition[i].isTableRowValue) { - // if (searchCondition[i].required) { - // if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) { - // message.warning( - // searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' - // ) - // return - // } - // } - // row[searchCondition[i].value] - // //查询当前table表数据的值 - // _searchCondition[searchCondition[i].key] = row[searchCondition[i].value] - // } - else { - // 扩展 转换为筛选条件进行查询 - if (searchCondition[i].isSearch) { - if (searchCondition[i].isFormModel) { - //用formModel中的值 - if (searchCondition[i].required) { - if ( - formRef.value.formModel[searchCondition[i].value] == '' || - formRef.value.formModel[searchCondition[i].value] == undefined - ) { - message.warning( - searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' - ) - return - } - } - filters.push({ - action: searchCondition[i].action || '==', - column: searchCondition[i].key, - value: formRef.value.formModel[searchCondition[i].value] - }) - } else { - filters.push({ - action: searchCondition[i].action || '==', - column: searchCondition[i].key, - value: searchCondition[i].value - }) - } - } else { - filters.push({ - action: searchCondition[i].action || '==', - column: searchCondition[i].key, - value: searchCondition[i].value - }) - } - } - } - } - if (verificationParams && verificationParams.length > 0) { - // 转换筛选条件所需 - for (var i = 0; i < verificationParams.length; i++) { - // 扩展 转换为筛选条件进行查询 - if (verificationParams[i].isSearch) { - if (verificationParams[i].isFormModel) { - filters.push({ - action: verificationParams[i].action, - column: verificationParams[i].key, - value: formRef.value.formModel[verificationParams[i].value] - ? formRef.value.formModel[verificationParams[i].value] - : e.trim() - }) - } else { - filters.push({ - action: verificationParams[i].action, - column: verificationParams[i].key, - value: verificationParams[i].value - }) - } - } else { - _searchCondition[verificationParams[i].key] = verificationParams[i].value - } - } - } - if (filters.length > 0) { - _searchCondition.isSearch = true - _searchCondition.filters = filters - } - console.log(4545, _searchCondition) - let obj = { - by: 'ASC', - pageNo: 1, - pageSize: 20 - } - console.log(888,_searchCondition) - params = { - isSearch:_searchCondition.isSearch, - filters:_searchCondition.filters, - ...obj - } - // console.log(333,params) - if (!formSchemaObj?.multiple && e.indexOf(',') > -1) { - message.alert('该输入框只能输入一条数据') - formRef.value.setValues(setV) - return - } - await formSchemaObj.searchPage(params).then((res) => { - let arr1 = e.split(',') - let list = ref([]) - list.value = res.list - if (list.value?.length == 0) { - message.alert('暂无数据') - formRef.value.setValues(setV) - return - } - if (arr1.length != list.value.length) { - let arr2 = list.value.map((item) => item.code) - let str = [ - ...arr1.filter((item) => !arr2.includes(item)), - ...arr2.filter((item) => !arr1.includes(item)) - ].join(',') - message.alert('代码' + str + '没有找到对应数据') - formRef.value.setValues(setV) - return - } - }) - } - } else { - if ( - field == 'supplierCode' || - field == 'itemCode' || - field == 'productItemCode' || - field == 'componentItemCode' || - field == 'packUnit' || - field == 'inPackUnit' || - field == 'fromPackingNumber' - ) { - await FormBlur( - field, - e, - routeName.value, - formRef.value, - props.detailData, - formSchema.value, - (searchField, list) => { - emit('searchTableSuccess', field, searchField, list, formRef.value, 'form') - } - ) - return + if (formSchemaObj?.enterSearch) { + await FormBlur( + field, + e, + routeName.value, + formRef.value, + props.detailData, + formSchemaObj, + (list) => { + emit('searchTableSuccess', field, formSchemaObj.searchField, list, formRef.value, 'form') } - } + ) } else { emit('onBlur', field, e) } isExecute.value = true } - // 批量增加 const batchAdd = async (val) => { const row = {} @@ -1093,11 +904,11 @@ const inputStringBlur = async (headerItem, val, row, index) => { formRef.value, props.detailData, props.tableData, - (searchField, list) => { + ( list) => { emit( 'searchTableSuccess', headerItem.field, - searchField, + headerItem.tableForm.searchField, list, formRef.value, 'tableForm', @@ -1116,8 +927,23 @@ const inputStringBlur = async (headerItem, val, row, index) => { * @param field 当前操作字段 * @param e */ -const onEnter = (field, value, e) => { - emit('onEnter', field, value, e) +const onEnter = async (field, value, e) => { + let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps + if (formSchemaObj?.enterSearch && formSchemaObj?.isEnter ) { + await FormBlur( + field, + value, + routeName.value, + formRef.value, + props.detailData, + formSchemaObj, + (list) => { + emit('onEnter', field, value, e) + } + ) + } else { + emit('onEnter', field, value, e) + } } // 修改盘点类型 diff --git a/src/components/SearchTable/src/SearchTable.vue b/src/components/SearchTable/src/SearchTable.vue index 539271296..64e3f6b7e 100644 --- a/src/components/SearchTable/src/SearchTable.vue +++ b/src/components/SearchTable/src/SearchTable.vue @@ -37,7 +37,7 @@ diff --git a/src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts b/src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts index a92e56d5f..399553c0a 100644 --- a/src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts +++ b/src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts @@ -36,7 +36,15 @@ export const Purchaseprice = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -67,7 +75,15 @@ export const Purchaseprice = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, diff --git a/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts b/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts index 82f7bf3e8..5ddace825 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts +++ b/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts @@ -44,7 +44,15 @@ export const Supplieritem = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -70,7 +78,15 @@ export const Supplieritem = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts index 40d883e9a..06e18de14 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts @@ -592,7 +592,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ }, tableForm:{ multiple:true, - isInpuFocusShow: true, // 开启查询弹窗 + // isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', searchField: 'itemCode', searchTitle: '客户物料基础信息', diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue index dab4cf2b7..7f99c50dc 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue @@ -236,7 +236,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:packageover-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:packageover-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:packageover-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:packageover-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:packageover-request-main:refused'}), // 驳回 diff --git a/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts b/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts index 7ea57ca7b..3eb010c76 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts +++ b/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts @@ -80,50 +80,50 @@ export const PackagesplitMain = useCrudSchemas(reactive([ }, isForm: false }, - { - label: '申请时间', - field: 'requestTime', - sort: 'custom', - 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', - } - }, - isForm: false - }, - { - label: '截止时间', - field: 'dueTime', - sort: 'custom', - 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', - } - }, - isForm: false - }, + // { + // label: '申请时间', + // field: 'requestTime', + // sort: 'custom', + // 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', + // } + // }, + // isForm: false + // }, + // { + // label: '截止时间', + // field: 'dueTime', + // sort: 'custom', + // 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', + // } + // }, + // isForm: false + // }, { label: '部门', field: 'departmentCode', @@ -297,6 +297,9 @@ export const PackagesplitDetail = useCrudSchemas(reactive([ { label: '从库存状态', field: 'fromInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, sort: 'custom', table: { width: 150 @@ -305,43 +308,46 @@ export const PackagesplitDetail = useCrudSchemas(reactive([ { label: '到库存状态', field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, sort: 'custom', table: { width: 150 }, }, - { - label: '从器具号', - field: 'fromContainerNumber', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '到器具号', - field: 'toContainerNumber', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '从货主代码', - field: 'fromOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '到货主代码', - field: 'toOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - }, + // { + // label: '从器具号', + // field: 'fromContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '到器具号', + // field: 'toContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '从货主代码', + // field: 'fromOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '到货主代码', + // field: 'toOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, { label: '物料代码', field: 'itemCode', @@ -385,6 +391,8 @@ export const PackagesplitDetail = useCrudSchemas(reactive([ { label: '计量单位', field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', sort: 'custom', table: { width: 150 diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index 9a5679c56..56e040304 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -244,7 +244,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:scrap-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:scrap-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:scrap-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:scrap-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:scrap-request-main:refused'}), // 驳回 diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue index 79a4547e5..d4ad79678 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue @@ -233,7 +233,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:unplannedissue-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:unplannedissue-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:unplannedissue-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedissue-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedissue-request-main:refused'}), // 驳回 diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue index 11ecd8cc3..29a8c0330 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue @@ -230,7 +230,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:transferissue-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:transferissue-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:transferissue-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferissue-request-main:refused'}), // 驳回 diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue index 0c52a5d4f..909159740 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue @@ -206,7 +206,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:transferreceipt-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:transferreceipt-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:transferreceipt-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferreceipt-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferreceipt-request-main:refused'}), // 驳回 diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 99dc8fae0..eb3cde1ea 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -150,7 +150,7 @@ const isCreateLabel = ref(false) const formLabelRef = ref() const labelType = ref('') // 标签类别 采购还是制造等 const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({ - getListApi: UnplannedreceiptRequestDetailApi.getUnplannedreceiptRequestDetailPage + getListApi: UnplannedreceiptRequestDetailApi.getUnplannedreceiptRequestDetailPageCreateLabel }) const { getList:getDetailList } = detatableMethods @@ -373,7 +373,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:unplannedreceipt-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:unplannedreceipt-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:unplannedreceipt-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedreceipt-request-main:refused'}), // 驳回 diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index df1f3f87a..f8406acad 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -283,7 +283,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:issue-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:issue-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:issue-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:issue-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:issue-request-main:refused'}), // 驳回 diff --git a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts index 022e7787d..74fe76479 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts @@ -766,8 +766,9 @@ export const IssueRequestDetail = useCrudSchemas( sortTableDefault: 3, tableForm: { multiple: true, - enterSearch: true, - isInpuFocusShow: true, + // enterSearch: true, + disabled:true, + // isInpuFocusShow: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index af65818e2..8375eb726 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -327,7 +327,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productionreturn-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productionreturn-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productionreturn-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productionreturn-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productionreturn-request-main:refused'}), // 驳回 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 46f95443d..d11ab5ea3 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -583,7 +583,9 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productionreturn-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productionreturn-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productionreturn-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productionreturn-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productionreturn-request-main:refused'}), // 驳回 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts index 0f32a1278..eed4bc467 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts @@ -106,7 +106,8 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive // row['itemCode'] = val[0]['code'] // row['uom'] = val[0]['uom'] val.forEach(item=>{ - if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])) return + if(tableData.value.find(item1=>item1['itemCode'] == item['code'])){ + message.warning(`物料${item['code']}已经存在`) + return + } const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow['itemCode'] = item['code'] newRow['uom'] = item['uom'] @@ -212,7 +215,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:repleinsh-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:repleinsh-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:repleinsh-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:repleinsh-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:repleinsh-request-main:refused'}), // 驳回 @@ -379,10 +382,13 @@ const submitForm = async (formType, submitData) => { data.id = data.masterId } data.subList = tableData.value // 拼接子表数据参数 - if( data.subList.length>1){ - message.warning('明细只能选择一条数据') - return; - } + data.subList.forEach(item=>{ + item.toLocationCode = data.toLocationCode + }) + // if( data.subList.length>1){ // 喜婷说可以添加多条 + // message.warning('明细只能选择一条数据') + // return; + // } if(tableData.value.find(item => (item.qty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts index f7a7c224c..0e728c496 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts @@ -543,7 +543,9 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ } }, tableForm:{ - isInpuFocusShow: true, + multiple:true, + disabled:true, + // isInpuFocusShow: true, searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '物料基础信息', // 查询弹窗标题 @@ -640,7 +642,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ }, hiddenInMain:true, sortSearchDefault:1000, - isSearch: true, + // isSearch: true, sortTableDefault:1100, isTableForm: false, }, diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index 63fc24a71..0aa1d217f 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue @@ -274,7 +274,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:inventorychange-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorychange-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorychange-request-main:reAdd'}), //重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorychange-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorychange-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue index 16efcd877..c6d753817 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue @@ -207,7 +207,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:processproduction-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:processproduction-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:processproduction-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:processproduction-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:processproduction-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts b/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts index 2a63f139b..07cd13ca5 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts @@ -339,7 +339,8 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productdismantle-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productdismantle-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productdismantle-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productdismantle-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productdismantle-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts index cdd5e6572..bb1e0b840 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts @@ -475,7 +475,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive([ }, tableForm:{ multiple:true, - isInpuFocusShow: true, + disabled:true, + // isInpuFocusShow: true, searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '生产线物料关系信息', // 查询弹窗标题 diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts index 76f307cbd..e700e948f 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts @@ -649,7 +649,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ tableForm:{ multiple:true, enterSearch:true, - isInpuFocusShow: true, + // isInpuFocusShow: true, searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '生产线物料关系信息', // 查询弹窗标题 diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts index 542dbb02b..7db5dfe79 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts @@ -649,7 +649,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ tableForm:{ multiple:true, enterSearch:true, - isInpuFocusShow: true, + // isInpuFocusShow: true, searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '生产线物料关系信息', // 查询弹窗标题 diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue index 997469e15..c82d51f25 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue @@ -214,7 +214,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productputaway-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productputaway-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productputaway-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productputaway-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productputaway-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts index fe9c56858..48ff2d557 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts @@ -126,15 +126,15 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ }, isForm: false, }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false - }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false + // }, { label: '创建时间', field: 'createTime', @@ -189,28 +189,28 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ }, isForm: false, }, - { - label: '截止时间', - field: 'dueTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - }, + // { + // label: '截止时间', + // field: 'dueTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // isTable: false, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width:'100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, { label: '部门', field: 'departmentCode', @@ -456,7 +456,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive }, tableForm:{ multiple:true, - isInpuFocusShow: true, + // isInpuFocusShow: true, + disabled:true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 @@ -611,7 +612,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 180 }, - hiddeInMain: true, + hiddenInMain: true, isTableForm: false, form: { componentProps: { @@ -626,7 +627,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - hiddeInMain: true, + hiddenInMain: true, }, { label: '创建时间', @@ -639,7 +640,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 180 }, - hiddeInMain: true, + hiddenInMain: true, form: { component: 'DatePicker', componentProps: { @@ -658,7 +659,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - hiddeInMain: true, + hiddenInMain: true, isTableForm: false, isForm: false }, @@ -670,7 +671,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - hiddeInMain: true, + hiddenInMain: true, isTableForm: false, isForm: false }, @@ -681,7 +682,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - hiddeInMain: true, + hiddenInMain: true, isTableForm: false, isForm: false }, @@ -692,7 +693,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - hiddeInMain: true, + hiddenInMain: true, isTableForm: false, isForm: false }, @@ -703,7 +704,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - hiddeInMain: true, + hiddenInMain: true, form: { component: 'InputNumber', componentProps: { @@ -725,7 +726,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - hiddeInMain: true, + hiddenInMain: true, isTableForm: false, isForm: false }, @@ -736,7 +737,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - hiddeInMain: true, + hiddenInMain: true, isTableForm: false, isForm: false }, diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue index 956de7a21..84d9e6d53 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue @@ -89,7 +89,7 @@ import * as ProductputawayRequestMainApi from '@/api/wms/productputawayRequestMa import * as ProductputawayRequestDetailApi from '@/api/wms/productputawayRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' -// 制品上架申请 装配上架申请 +// 制品上架申请 装配上架申请 装配制品上架申请 defineOptions({ name: 'ProductputawayRequestMain' }) const message = useMessage() // 消息弹窗 @@ -216,7 +216,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productputaway-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productputaway-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productputaway-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productputaway-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productputaway-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts index 9dcc911d5..c90e6eaf3 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts @@ -118,15 +118,15 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ }, isForm: false, }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false - }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false + // }, { label: '创建时间', field: 'createTime', @@ -181,28 +181,28 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ isTable: false, isForm: false, }, - { - label: '截止时间', - field: 'dueTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - }, + // { + // label: '截止时间', + // field: 'dueTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // isTable: false, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width:'100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, { label: '部门', field: 'departmentCode', @@ -448,7 +448,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive }, tableForm:{ multiple: true, - isInpuFocusShow: true, + // isInpuFocusShow: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts index 7253d12da..81838b9a2 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts @@ -724,7 +724,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( isDetail: false, isForm: false , table: { - width: 150, + width: 220, fixed: 'right' }, isTableForm:true, diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index ac11bd065..1e9dde54f 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -320,7 +320,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productreceipt-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productreceipt-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productreceipt-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productreceipt-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productreceipt-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts index 560808251..02f793ed1 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts @@ -280,15 +280,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ isTable: false, isForm: false, }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // }, { label: '创建时间', field: 'createTime', @@ -345,28 +345,28 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ 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: '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', @@ -616,7 +616,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive }, tableForm:{ multiple: true, - isInpuFocusShow: true, + disabled:true, + // isInpuFocusShow: true, searchListPlaceholder: '请选择工位代码', searchField: 'code', searchTitle: '工位信息', diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index be07c0b41..491dc8daf 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -319,7 +319,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productreceipt-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productreceipt-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productreceipt-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productreceipt-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productreceipt-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts index 63fd5b156..e786a028d 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts @@ -280,15 +280,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ isTable: false, isForm: false, }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false - }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false + // }, { label: '创建时间', field: 'createTime', @@ -345,28 +345,28 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ 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: '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', @@ -617,7 +617,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive }, tableForm:{ multiple: true, - isInpuFocusShow: true, + disabled:true, + // isInpuFocusShow: true, searchListPlaceholder: '请选择工位代码', searchField: 'code', searchTitle: '工位信息', diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue index 811f90d25..a95bf54c1 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue @@ -311,7 +311,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productreceipt-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productreceipt-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productreceipt-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productreceipt-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productreceipt-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts index 95d6f73fa..7e3cc8a51 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts @@ -238,15 +238,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ isTable: false, isForm: false, }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false - }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false + // }, { label: '创建时间', field: 'createTime', @@ -303,28 +303,28 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ 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: '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', diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue index 659d48369..086524541 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue @@ -229,7 +229,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productredress-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productredress-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productredress-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productredress-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productredress-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts index 023a77ee9..339927a39 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts @@ -180,12 +180,12 @@ export const ProductredressRequestMain = useCrudSchemas(reactive([ isForm:false, isTable:false, }, - { - label: '原因', - field: 'remark', - sort: 'custom', - isTable:false, - }, + // { + // label: '原因', + // field: 'remark', + // sort: 'custom', + // isTable:true, + // }, { label: '到库区类型范围', field: 'toAreaTypes', @@ -511,6 +511,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive width: 150 }, tableForm: { + type:'Select', disabled: true }, form: { @@ -558,16 +559,16 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive hiddenInMain:true, }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - hiddenInMain:true - }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain:true + // }, { label: '创建者', field: 'creator', diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue index 8c2482afd..89c622b32 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue @@ -380,7 +380,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productrepair-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productrepair-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productrepair-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productrepair-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productrepair-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts index 37114f603..58887b849 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts @@ -254,15 +254,15 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ isTable: false, isForm: false, }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // }, { label: '创建时间', field: 'createTime', @@ -319,28 +319,28 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ }, isForm: false, }, - { - label: '截止时间', - field: 'dueTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - style: { width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - }, + // { + // label: '截止时间', + // field: 'dueTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // isTable: false, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: { width:'100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, { label: '部门', field: 'departmentCode', @@ -554,7 +554,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive sortTableDefault:5, tableForm:{ multiple: true, - isInpuFocusShow: true, + disabled:true, + // isInpuFocusShow: true, searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '工位信息', // 查询弹窗标题 diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 8f48623fe..2bef4ef89 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -468,7 +468,7 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:productscrap-request-main:close'}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:productscrap-request-main:close'}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:productscrap-request-main:reAdd'}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:productscrap-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:productscrap-request-main:refused'}), // 驳回 diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts index c7ad921ec..3fac21ff8 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts @@ -307,37 +307,37 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ }, isForm: false, }, - { - label: '截止时间', - field: 'dueTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable:false, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, + // { + // label: '截止时间', + // field: 'dueTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // isTable:false, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width:'100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // }, { label: '部门', field: 'departmentCode', @@ -552,7 +552,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ }, tableForm:{ multiple: true, - isInpuFocusShow: true, + // isInpuFocusShow: true, + disabled:true, searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '工位信息', // 查询弹窗标题 @@ -1067,11 +1068,11 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ isDetail: false, isForm: false , hiddenInMain:true, + isTableForm:false, table: { width: 150, fixed: 'right' }, - hiddeInMain:true, tableForm: { type: 'action', buttonText: 'Bom', diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts index 15bb63b55..d2e2d5928 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts @@ -68,6 +68,7 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( searchDetailSchemas:PurchaseDetail.allSchemas, searchAllSchemas: PurchaseMain.allSchemas, // 查询弹窗所需类 searchPage: PurchaseDetailApi.getPurchaseDetailPageWMS, // 查询弹窗所需分页方法 + isEnter:true, searchCondition: [{ key:'status', value:'2', @@ -80,7 +81,15 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( action: '==', // 查询拼接条件 isSearch: true, // 使用自定义拼接条件 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 - }] + }], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, isForm: true, @@ -966,6 +975,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive( action: '==', // 查询拼接条件 isSearch: true, // 使用自定义拼接条件 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 - }] + }], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, isForm: true, @@ -966,6 +974,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive { setV['singlePrice'] = val[0]['singlePrice'] setV['amount'] = val[0]['amount'] setV['projectCode'] = val[0]['projectCode'] - setV['packingNumber'] = val[0]['packingNumber'] + // setV['packingNumber'] = val[0]['packingNumber'] + // setV['inventoryBalance'] = val[0]['qty'] if (formField == 'itemCode') { setV['batch'] = val[0]['toBatch'] @@ -428,7 +429,11 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => { // setV['fromLocationCode'] = val[0]['fromLocationCode'] // setV['toLocationCode'] = val[0]['toLocationCode'] } - } else { + } else if (formField == 'packingNumber'){ + setV[formField] = val[0][searchField] + setV['inventoryBalance'] = val[0]['qty'] + } + else { setV[formField] = val[0][searchField] } formRef.setValues(setV) diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts index bc10f2178..d46fac093 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts @@ -195,7 +195,15 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ searchField: 'code', // 查询弹窗赋值字段 searchTitle: '供应商信息', // 查询弹窗标题 searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 - searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法 + searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -209,6 +217,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, disabled:true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本 @@ -221,7 +230,15 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ key: 'supplierCode', value: 'supplierCode', isMainValue: true - }] + }], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -780,6 +797,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive isTableForm:false, isTable:false, hiddenInMain: true, + isForm: false, tableForm:{ disabled:true }, @@ -799,6 +817,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive isTableForm:false, isTable:false, hiddenInMain: true, + isForm: false, tableForm:{ disabled:true }, @@ -834,6 +853,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive hiddenInMain: true, isTableForm: false, isTable: false, + isForm: false, tableForm:{ disabled:true }, @@ -856,6 +876,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive }, isTableForm: false, isTable: false, + isForm: false, form: { componentProps:{ disabled:true @@ -867,7 +888,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive field: 'uom', dictType: DICT_TYPE.UOM, dictClass: 'string', - isSearch: true, + // isSearch: true, isTable: true, sort: 'custom', table: { @@ -939,12 +960,8 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - form: { - componentProps:{ - disabled:true - } - }, - tableForm:{ + tableForm: { + enterSearch: true, // labelMessage: '信息提示说明!!!', isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择从库位代码', @@ -962,7 +979,51 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive value: 'out', message: '', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + // form: { + // componentProps:{ + // disabled:true + // } + // }, + form:{ + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择从库位代码', + searchField: 'code', + searchTitle: '库位代码信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.getLocationListByAreaAndBusinesstype, + searchCondition: [{ + key: 'businessType', + value: 'PurchaseReturn', + message: '请填写业务类型', + isMainValue: false + },{ + key: 'isIn', + value: 'out', + message: '', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } }, hiddenInMain: true, isTable: false, @@ -976,12 +1037,54 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive }, hiddenInMain: true, isTable: false, + // form: { + // componentProps:{ + // disabled: true, + // } + // }, form: { - componentProps:{ - disabled:true + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage, + searchCondition: [{ + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + required:true, + isMainValue:true + },{ + key: 'batch', + value: 'batch', + message: '请填写批次', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + // required:true, + isMainValue:true + },{ + key: 'locationCode', + value: 'fromLocationCode', + message: '请选择从库位代码', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + required:true, + isMainValue:true + }], + verificationParams: [{ + key: 'packingNumber', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, - tableForm:{ + tableForm: { + enterSearch: true, multiple: true, // labelMessage: '信息提示说明!!!', isInpuFocusShow: true, // 开启查询弹窗 @@ -1011,31 +1114,42 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive isTableRowValue: true, //查询当前searchTable表中行数据的值 required:true, isMainValue:false - }] + }], + verificationParams: [{ + key: 'packingNumber', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, }, - // { - // label: '库存余额', - // field: 'inventoryBalance', - // sort: 'custom', - // table: { - // width: 150 - // }, - // form: { - // component: 'InputNumber', - // componentProps: { - // min: 0, - // precision: 6 - // } - // }, - // isForm:false, - // tableForm:{ - // hidden:false,//控制列是否展示 - // type:'InputNumber', - // min:0, - // precision: 6 - // } - // }, + { + label: '库存余额', + field: 'inventoryBalance', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 0, + precision: 6 + } + }, + tableForm:{ + hidden:false,//控制列是否展示 + type:'InputNumber', + min:0, + precision: 6 + }, + hiddenInMain: true, + isTable: false, + isDetail: false, + }, { label: '退货数量', field: 'qty', @@ -1074,6 +1188,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive }, isTableForm: false, isTable: false, + isForm: false, form: { componentProps:{ disabled:true @@ -1093,6 +1208,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive hiddenInMain: true, isTableForm: false, isTable: false, + isForm: false, form: { componentProps:{ disabled:true @@ -1112,6 +1228,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive hiddenInMain: true, isTableForm: false, isTable: false, + isForm: false, form: { componentProps:{ disabled:true @@ -1131,6 +1248,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive hiddenInMain: true, isTableForm: false, isTable: false, + isForm: false, form: { componentProps:{ disabled:true @@ -1256,6 +1374,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive tableForm:{ disabled:true }, + isForm: false, isTableForm: false, isTable: false, hiddenInMain: true, @@ -1277,6 +1396,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive tableForm:{ disabled:true }, + isForm: false, isTableForm:false, isForm:false }, @@ -1316,6 +1436,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive isTableForm: false, isTable: false, hiddenInMain: true, + isForm: false, form: { componentProps:{ disabled:true diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts b/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts index 07d5dd8df..d70ef2d4c 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts +++ b/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts @@ -793,15 +793,15 @@ export const PutawayJobDetail = useCrudSchemas(reactive([ }, hiddenInMain: true, }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - }, + // { + // label: '项目代码', + // field: 'projectCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // }, { label: '数量', field: 'qty', @@ -844,24 +844,24 @@ export const PutawayJobDetail = useCrudSchemas(reactive([ }, hiddenInMain: true, }, - { - label: '从货主代码', - field: 'fromOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - }, - { - label: '到货主代码', - field: 'toOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - }, + // { + // label: '从货主代码', + // field: 'fromOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // }, + // { + // label: '到货主代码', + // field: 'toOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // }, { label: '创建时间', field: 'createTime', diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/putawayRecordMain.data.ts b/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/putawayRecordMain.data.ts index 7f5c9997e..f1efeeada 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/putawayRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/putawayRecordMain.data.ts @@ -513,15 +513,15 @@ export const PutawayRecordDetail = useCrudSchemas(reactive([ }, sortTableDefault:3, }, - { - label: '从货主代码', - field: 'fromOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, + // { + // label: '从货主代码', + // field: 'fromOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // }, { label: '从库位代码', field: 'fromLocationCode', @@ -549,15 +549,15 @@ export const PutawayRecordDetail = useCrudSchemas(reactive([ }, hiddenInMain:true, }, - { - label: '到货主代码', - field: 'toOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, + // { + // label: '到货主代码', + // field: 'toOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // }, { label: '到库位代码', field: 'toLocationCode', @@ -671,15 +671,15 @@ export const PutawayRecordDetail = useCrudSchemas(reactive([ }, hiddenInMain:true, }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, + // { + // label: '项目代码', + // field: 'projectCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // }, { label: '数量', field: 'qty', @@ -701,18 +701,18 @@ export const PutawayRecordDetail = useCrudSchemas(reactive([ // width: 150 // }, // }, - { - label: '接口类型', - field: 'interfaceType', - dictType: DICT_TYPE.INTERFACE_TYPE, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, + // { + // label: '接口类型', + // field: 'interfaceType', + // dictType: DICT_TYPE.INTERFACE_TYPE, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // }, // { // label: '任务明细ID', // field: 'jobDetailId', @@ -721,24 +721,24 @@ export const PutawayRecordDetail = useCrudSchemas(reactive([ // width: 150 // }, // }, - { - label: '从器具号', - field: 'fromContainerNumber', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '到器具号', - field: 'toContainerNumber', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, + // { + // label: '从器具号', + // field: 'fromContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // }, + // { + // label: '到器具号', + // field: 'toContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // }, { label: '操作', hiddenInMain:true, diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts index bdfe01bf9..07db11bad 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts @@ -810,17 +810,17 @@ export const PutawayRequestDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, + // { + // label: '项目代码', + // field: 'projectCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // isTableForm: false, + // isForm: false + // }, { label: '数量', field: 'qty', @@ -843,28 +843,28 @@ export const PutawayRequestDetail = useCrudSchemas(reactive([ } }, - { - label: '从货主代码', - field: 'fromOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false, - hiddenInMain:true, - }, - { - label: '到货主代码', - field: 'toOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, + // { + // label: '从货主代码', + // field: 'fromOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false, + // hiddenInMain:true, + // }, + // { + // label: '到货主代码', + // field: 'toOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // isTableForm: false, + // isForm: false + // }, { label: '操作', hiddenInMain:true, diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts index 2b5581a23..e3f884bb2 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts @@ -692,29 +692,29 @@ export const PurchasereceiptJobMainRules = reactive({ * @returns {Array} 采购收货任务子表 */ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ - { - label: '包装号', - field: 'packingNumber', - sort: 'custom', - table: { - width: 150 - }, - isSearch:true, - hiddenInMain:true, - sortTableDefault:1002, - sortSearchDefault:1002 - }, - { - label: '包装规格', - field: 'packUnit', - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:1002 - }, + // { + // label: '包装号', + // field: 'packingNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isSearch:true, + // hiddenInMain:true, + // sortTableDefault:1002, + // sortSearchDefault:1002 + // }, + // { + // label: '包装规格', + // field: 'packUnit', + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:1002 + // }, { label: '包装数量', field: 'qty', @@ -841,15 +841,15 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ hiddenInMain:true, sortTableDefault:1006, }, - { - label: '来源库位', - field: 'fromLocationCode', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:1007, - }, + // { + // label: '来源库位', + // field: 'fromLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:1007, + // }, { label: '目标库位', field: 'toLocationCode', @@ -933,26 +933,26 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ sortTableDefault:1009, hiddenInMain:true, }, - { - label: '从货主', - field: 'fromOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - sortTableDefault:1008, - }, - { - label: '到货主', - field: 'toOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - sortTableDefault:1008, - }, + // { + // label: '从货主', + // field: 'fromOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // sortTableDefault:1008, + // }, + // { + // label: '到货主', + // field: 'toOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // sortTableDefault:1008, + // }, { label: '物料代码', field: 'itemCode', @@ -992,16 +992,16 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ hiddenInMain:true, sortTableDefault:7, }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - sortTableDefault:1010, - }, + // { + // label: '项目代码', + // field: 'projectCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // sortTableDefault:1010, + // }, { label: '计量单位', field: 'uom', diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts index 5aea05b6e..6ea0c3605 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts @@ -603,16 +603,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive sortTableDefault:14, hiddenInMain:true }, - { - label: '到批次', - field: 'toBatch', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:14, - hiddenInMain:true - }, + // { + // label: '到批次', + // field: 'toBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:14, + // hiddenInMain:true + // }, { label: '替代批次', field: 'altBatch', @@ -623,26 +623,26 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive isTable:false, hiddenInMain:true }, - { - label: '从包装号', - field: 'fromPackingNumber', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:15, - hiddenInMain:true - }, - { - label: '到包装号', - field: 'toPackingNumber', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:15, - hiddenInMain:true - }, + // { + // label: '从包装号', + // field: 'fromPackingNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:15, + // hiddenInMain:true + // }, + // { + // label: '到包装号', + // field: 'toPackingNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:15, + // hiddenInMain:true + // }, { label: '从器具号', field: 'fromContainerNumber', @@ -709,33 +709,33 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive }, sortTableDefault:13, }, - { - label: '包装规格', - field: 'packUnit', - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:16, - }, - { - label: '包装数量', - field: 'packQty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - }, - tableForm: { - disabled: true, - }, - isForm:false, - sortTableDefault:16, - }, + // { + // label: '包装规格', + // field: 'packUnit', + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:16, + // }, + // { + // label: '包装数量', + // field: 'packQty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // }, + // tableForm: { + // disabled: true, + // }, + // isForm:false, + // sortTableDefault:16, + // }, { label: '供应商计量数量', field: 'supplierQty', @@ -776,16 +776,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive sortTableDefault:18, hiddenInMain:true }, - { - label: '从库位代码', - field: 'fromLocationCode', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:18, + // { + // label: '从库位代码', + // field: 'fromLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:18, - }, + // }, { label: '到库位代码', field: 'toLocationCode', @@ -795,16 +795,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive }, sortTableDefault:18, }, - { - label: '从库位组', - field: 'fromLocationGroupCode', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:19, - hiddenInMain:true - }, + // { + // label: '从库位组', + // field: 'fromLocationGroupCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:19, + // hiddenInMain:true + // }, { label: '到库位组', field: 'toLocationGroupCode', @@ -815,16 +815,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive sortTableDefault:19, hiddenInMain:true }, - { - label: '从库区', - field: 'fromAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:22, - hiddenInMain:true, - }, + // { + // label: '从库区', + // field: 'fromAreaCodes', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:22, + // hiddenInMain:true, + // }, { label: '到库区', field: 'toAreaCodes', @@ -835,16 +835,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive sortTableDefault:22, hiddenInMain:true }, - { - label: '从货主', - field: 'fromOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:23, - hiddenInMain:true - }, + // { + // label: '从货主', + // field: 'fromOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:23, + // hiddenInMain:true + // }, { label: '到货主', field: 'toOwnerCode', @@ -1004,16 +1004,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive // }, // }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:1998, - hiddenInMain:true - }, + // { + // label: '项目代码', + // field: 'projectCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:1998, + // hiddenInMain:true + // }, // { // label: '代码', // field: 'code', diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts index 1df29662c..c3e136109 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts @@ -84,7 +84,15 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( action: '==', // 查询拼接条件 isSearch: true, // 使用自定义拼接条件 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 - }] + }], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, isForm: true, @@ -870,92 +878,92 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false, }, - { - label: t('ts.已计划数量'), - field: 'plannedQty', - table: { - width: 150 - }, - hiddenInMain:true, - form: { - component: 'InputNumber', - componentProps: { - min: 1, - precision: 6 - }, - value: 1 - }, - isTableForm: false, - isForm: false, - }, + // { + // label: t('ts.已计划数量'), + // field: 'plannedQty', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 1, + // precision: 6 + // }, + // value: 1 + // }, + // isTableForm: false, + // isForm: false, + // }, { label: t('ts.已发货数量'), field: 'shippedQty', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index bb9d87c5d..bb2c0a188 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -78,7 +78,6 @@ fieldTableColumn="poLine" /> - 采购订单信息 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index cbe18f856..20aa155c2 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -402,7 +402,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierdeliver-request-main:create' }), // 新增 - defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), // 导入 + // defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), // 导入 7.15喜婷说先拿掉 defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue index aca148dcb..8f6ab2391 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue @@ -12,7 +12,12 @@ - diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index b1990ebc4..d828ff12d 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -113,9 +113,9 @@ @sumFormDataHandle="sumFormDataHandle" > - + + + +./supplierinvoiceRequestMainDifference.data \ No newline at end of file diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/supplierinvoiceRecordMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts similarity index 53% rename from src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/supplierinvoiceRecordMain.data.ts rename to src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts index 750b54375..652c04092 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/supplierinvoiceRecordMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts @@ -2,32 +2,159 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { accountantFormart } from '@/utils/formatter' +import * as SupplierApi from '@/api/wms/supplier' +import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain' +import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' +const { t } = useI18n() // 国际化 + +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as supplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail' + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize: 10, + pageNo: 1, + code: 'PurchaseInvoiceRequest' +} +const data = await getRequestsettingApi.getRequestsettingPage(queryParams) +const requestsettingData = data?.list[0] || {} + + // 获取当前操作人的部门 + 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] + +const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' }) /** - * @returns {Array} 供应商发票记录主表 + * @returns {Array} 采购员列表 */ -export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ +export const PurchaseMemberInfo = useCrudSchemas(reactive([ { - label: '单据号', - field:'number', + label: '用户编号', + field: 'id', + table: { + width: 180, + }, + }, + { + label: '用户名称', + field: 'username', + table: { + width: 180, + }, + }, + { + label: '用户昵称', + field: 'nickname', + table: { + width: 180, + }, + } +])) + +/** + * @returns {Array} 采购订单或者采购退货单 + */ +export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive([ + { + label: '单据类型', + field: 'billType' + }, + { + label: '收货日期', + field: 'deliveryDate', sort: 'custom', + isDetail:false, + isTable: true, + isForm:false, + isTableForm:false, + isSearch:true, + formatter: dateFormatter2, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD', + type: 'daterange', + defaultTime: [new Date('1 '), new Date('1 ')] + } + }, + }, + { + label: '待开票单据号', + field: 'recvBillNum', + table: { + width: 180, + }, + }, + { + label: '供应商发货单号', + field: 'asnBillNum', table: { width: 180, - fixed: 'left' }, - isSearch: false }, { - label: '发票申请单号', - field:'requestNumber', + label: '供应商代码', + field: 'supplierCode' + }, + { + label: '订单号', + field: 'poNumber' + }, + { + label: '订单行', + field: 'poLine' + }, + { + label: '采购价格', + field: 'purchasePrice' + }, + { + label: '可开票数量', + field: 'invoicableQuantity' + }, + { + label: '货币', + field: 'currency', + }, + { + label: '物料代码', + field: 'itemCode' + }, + { + label: '创建时间', + field: 'createTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + isTableForm: false, + isForm: false + } +])) + + +/** + * @returns {Array} 供应商发票申请主表 + */ +export const SupplierinvoiceRequestMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', sort: 'custom', table: { width: 180, fixed: 'left' }, - sortSearchDefault:1, - sortTableDefault:1, - isSearch: true + isSearch: true, + isForm: false }, + { label: '供应商代码', field: 'supplierCode', @@ -36,45 +163,54 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ width: 150 }, sortTableDefault:1, - isSearch: true + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: {     + enterSearch:true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 + searchPage: SupplierApi.getSupplierPageSCP // 查询弹窗所需分页方法 + } + } }, { - label: '供应商名称', - field: 'supplierName', + label: '订单类型', + field: 'orderType', + dictType: DICT_TYPE.PURCHASE_INVOICE_ORDER_TYPE, + dictClass: 'string', + isTable: false, sort: 'custom', table: { - width: 180, + width: 150 }, - sortTableDefault:2, - isForm: false, - isSearch: true }, { - label: '税率', - field: 'taxRate', + label: '供应商名称', + field: 'supplierName', sort: 'custom', table: { - width: 150 + width: 180, }, - sortTableDefault:3, - form: { - component: 'InputNumber', - } + sortTableDefault:2, + isSearch: true, + isForm: false }, - - { label: '状态', field: 'status', dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS, dictClass: 'string', isTable: true, - sortTableDefault:7, isForm:false, sort: 'custom', table: { width: 150 }, + sortTableDefault:9, isSearch: true, form: { value: '1', @@ -83,81 +219,210 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ } } }, - - // { - // label: '申请单号', - // field: 'requestNumber', - // sort: 'custom', - // table: { - // width: 180, - // }, - // isTable: false, - // isSearch: true - // }, + //子表数据,仅是查询条件 { - label: '订单号', - field: 'poNumber', + label: '货运单号', + field: 'asnBillNum', sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isTableForm:false, isTable:false, + isDetail:false, + isSearch: true, + isForm: false, + }, + { + label: '系统未税金额', + field: 'amount', + formatter: accountantFormart, table: { width: 150 }, + sortTableDefault:8, + form: { + component: 'InputNumber', + componentProps: { + precision: 2, + disabled: true, + } + }, + tableForm: { + type: 'InputNumber', + precision: 2, + } }, { - label: '金税票号',//金税票号 - field: 'goldenTaxInvoiceNumber', + label: '税率(%)', + field: 'taxRate', + dictType: DICT_TYPE.TAX_RATE_DICT, + dictClass: 'string', + sortTableDefault:3, + isTable: true, sort: 'custom', table: { width: 150 }, - sortTableDefault:5, - isSearch: true }, + + // { + // label: '未税金额', + // field: 'beforeTaxAmount', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // sortTableDefault:3, + // isForm:false, + // isTableForm:false + // }, + // { + // label: '税额', + // field: 'totalTaxAmount', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // sortTableDefault:3, + // isForm:false, + // isTableForm:false + // }, + // { + // label: '价税合计金额', + // field: 'adTaxAmount', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // sortTableDefault:3, + // isForm:false, + // isTableForm:false + // }, { - label: '未税差额', - field: 'beforeTaxDiffAmount', + label: '系统税额', + field: 'taxAmount', formatter: accountantFormart, table: { width: 150 }, - sortTableDefault:5, - isForm:false, - isTableForm:false + sortTableDefault:6, + form: { + component: 'InputNumber', + componentProps: { + precision: 2, + disabled: true, + } + }, + tableForm: { + type: 'InputNumber', + precision: 2, + } }, { - label: '税额差异', - field: 'taxAmountDiff', + label: '系统价税合计', + field: 'afterTaxAmount', formatter: accountantFormart, table: { width: 150 }, - sortTableDefault:5, - isForm:false, - isTableForm:false + sortTableDefault:7, + form: { + component: 'InputNumber', + componentProps: { + precision: 2, + disabled: true, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2, + disabled: true, + } }, { - label: '价税合计差额', - field: 'totalTaxDiffAmount', + label: '索赔金额', + field: 'claimAmount', formatter: accountantFormart, table: { width: 150 }, - sortTableDefault:5, + isTable:false, + isTableForm:false, isForm:false, - isTableForm:false + isDetail:false, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2, + } }, - + // { + // label: '调整价差', + // field: 'discountAmount', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // isTable:false, + // form: { + // component: 'InputNumber', + // componentProps: { + // precision: 2, + // } + // }, + // tableForm: { + // type: 'InputNumber', + // min: 0, + // precision: 2, + // } + // }, + // { + // label: '调整税额', + // field: 'adjustingTaxAmount', + // table: { + // width: 150 + // }, + // isTable:false, + // form: { + // component: 'InputNumber', + // componentProps: { + // precision: 2, + // } + // }, + // tableForm: { + // type: 'InputNumber', + // min: 0, + // precision: 2, + // } + // }, { - label: '系统税额', - field: 'taxAmount', + label: '折扣金额', + field: 'discountAmount1', formatter: accountantFormart, - sort: 'custom', table: { width: 150 }, - sortTableDefault:8, + isTable:false, form: { component: 'InputNumber', + componentProps: { + precision: 2, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2, } }, { @@ -168,8 +433,14 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ width: 150 }, sortTableDefault:3, - isForm:false, - isTableForm:false + form: { + component: 'InputNumber', + componentProps: { + precision: 2, + disabled: true, + } + }, + isTableForm:false, }, { label: '税额', @@ -178,9 +449,15 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ table: { width: 150 }, - sortTableDefault:3, - isForm:false, - isTableForm:false + sortTableDefault:4, + form: { + component: 'InputNumber', + componentProps: { + precision: 2, + disabled: true, + } + }, + isTableForm:false, }, { label: '价税合计金额', @@ -189,9 +466,15 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ table: { width: 150 }, - sortTableDefault:3, - isForm:false, - isTableForm:false + sortTableDefault:5, + form: { + component: 'InputNumber', + componentProps: { + precision: 2, + disabled: true, + } + }, + isTableForm:false, }, { label: '是否有价差', @@ -205,7 +488,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ table: { width: 150 }, - sortTableDefault:3, + sortTableDefault:5, }, { label: '价差说明', @@ -220,147 +503,96 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ sortTableDefault:5, }, { - label: '系统价税合计',//税后金额 - field: 'afterTaxAmount', + label: '未税差额', + field: 'beforeTaxDiffAmount', formatter: accountantFormart, - sort: 'custom', table: { width: 150 }, - sortTableDefault:9, - form: { - component: 'InputNumber', - } - }, - - { - label: '价差',//总差额 - field: 'totalDifference', - table: { - width: 150 - }, - isTable: false, + sortTableDefault:5, form: { component: 'InputNumber', componentProps: { - min: 0, - precision: 6, + precision: 2, + disabled: true, } }, - tableForm: { - type: 'InputNumber', - min: 0, - precision: 6, - } - }, - - { - label: '系统未税金额', - field: 'amount', - formatter: accountantFormart, - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:8, - form: { - component: 'InputNumber', - } - }, - - - - { - label: '索赔金额', - field: 'claimAmount', - formatter: accountantFormart, - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - form: { - component: 'InputNumber', - } + isTableForm:false, }, { - label: '调整价差', - field: 'discountAmount', + label: '税额差异', + field: 'taxAmountDiff', formatter: accountantFormart, - sort: 'custom', table: { width: 150 }, - isDetail:false, - isTable: false, + sortTableDefault:5, form: { component: 'InputNumber', - } - }, - { - label: '调整税额', - field: 'adjustingTaxAmount', - formatter: accountantFormart, - sort: 'custom', - isDetail:false, - table: { - width: 150 + componentProps: { + precision: 2, + disabled: true, + } }, - isTable: false, - form: { - component: 'InputNumber', - } + isTableForm:false, }, - { - label: '未税差额', - field: 'untaxedDifference', + label: '价税合计差额', + field: 'totalTaxDiffAmount', formatter: accountantFormart, table: { width: 150 }, + sortTableDefault:5, + isTableForm:false, form: { component: 'InputNumber', componentProps: { - min: 0, - precision: 6, + precision: 2, + disabled: true, } }, - isTable: false, - tableForm: { - type: 'InputNumber', - min: 0, - precision: 6, - } }, + + // { + // label: '总差额', + // field: 'totalDifference', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // isTable:false, + // form: { + // component: 'InputNumber', + // componentProps: { + // precision: 2, + // } + // }, + // tableForm: { + // type: 'InputNumber', + // min: 0, + // precision: 2, + // } + // }, { - label: '含税差额', - field: 'taxInclusiveDifference', - formatter: accountantFormart, + label: '金税票号', + field: 'goldenTaxInvoiceNumber', table: { - width: 150 + width: 150, }, - isTable: false, - form: { - component: 'InputNumber', + sortTableDefault:10, + form:{ componentProps: { - min: 0, - precision: 6, + maxlength:23, + showWordLimit:true } - }, - tableForm: { - type: 'InputNumber', - min: 0, - precision: 6, } }, { label: '快递单号', field: 'expressTrackingNumber', - sort: 'custom', isTable:false, isForm:false, - isSearch:false, table: { width: 150 }, @@ -368,25 +600,24 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ { label: '开票日期', field: 'invoiceTime', - isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - form:{ + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:11, + form: { component: 'DatePicker', componentProps: { style: {width:'100%'}, type: 'datetime', - dateFormat: 'YYYY-MM-DD',//YYYY-MM-DD - valueFormat: 'x',//数据转成时间戳 + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } }, - sortTableDefault:4, - sort: 'custom', - table: { - width: 180 - }, }, // { // label: '采购审批人', @@ -400,89 +631,89 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ // isTableForm: false, // isForm:false, // isSearch:false, - // sortTableDefault:10 + // sortTableDefault:12 // }, { label: '过账日期', field: 'postingDate', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - form:{ - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD',//YYYY-MM-DD - valueFormat: 'x',//数据转成时间戳 - } + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - isTable: true, - sortTableDefault:6, sort: 'custom', table: { width: 180 }, - isSearch: true, - search: { - value:[], + isTable:false, + isDetail:false, + form: { component: 'DatePicker', componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - dateFormat: 'YYYY-MM-DD', - type: 'daterange', - defaultTime: [new Date('1 '), new Date('1 ')] + disabled: true, + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } }, }, + { - label: '创建日期', - field: 'createTime', + label: '申请时间', + field: 'requestTime', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - form:{ - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD',//YYYY-MM-DD - valueFormat: 'x',//数据转成时间戳 - } - }, - isTable: true, - sortTableDefault:6, sort: 'custom', table: { width: 180 }, - isSearch: true, - search: { - value:[], + isTable:false, + isForm:false, + form: { component: 'DatePicker', componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - dateFormat: 'YYYY-MM-DD', - type: 'daterange', - defaultTime: [new Date('1 '), new Date('1 ')] + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } }, }, - //子表数据,仅是查询条件 { - label: '货运单号', - field: 'asnBillNum', + label: '部门', + field: 'departmentCode', sort: 'custom', table: { - width: 180, - fixed: 'left' + width: 150 }, + isTable:false, isTableForm:false, + isForm:false, + 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: 'creator', + table: { + width: 150 + }, isTable:false, - isDetail:false, - isSearch: true, + sortTableDefault:1001, isForm: false, }, { @@ -500,55 +731,11 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ isForm: false, }, { - label: '财务凭证号', - field: 'voucherNumber', - sort: 'custom', - table: { - width: 180, - }, + label: '创建时间', + field: 'createTime', isTable:true, - sortTableDefault:6, - isForm: false - }, - { - label: '业务类型', - field:'businessType', - sort: 'custom', - isTable:false, - isTableForm:false, - isDetail:false, - table: { - width: 150 - }, - }, - { - label: '出库事务类型', - field: 'outTransactionType', - sort: 'custom', - isTable:false, - isTableForm:false, - isDetail:false, - table: { - width: 150 - }, - }, - { - label: '入库事务类型', - field: 'inTransactionType', - isTable:false, - isTableForm:false, - isDetail:false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '执行时间', - field: 'executeTime', - isTable:false, - isTableForm:false, formatter: dateFormatter, + sortTableDefault:1000, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, @@ -556,40 +743,42 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - }, - { - label: '生效日期', - field: 'activeDate', - isTable:false, - isTableForm:false, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD' + isForm: false, + isSearch: true, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetimerange', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } }, - sort: 'custom', - table: { - width: 180 + search: { + value:[], + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'datetimerange', + defaultTime: [new Date('1 '), new Date('1 ')] + } }, }, { - label: '申请时间', - field: 'requestTime', - isTable:false, - isTableForm:false, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, + label: '最后更新者', + field: 'updater', sort: 'custom', table: { - width: 180 + width: 150 }, + isTable:false, + isForm: false, }, { - label: '截止时间', - field: 'dueTime', - isTable:false, - isTableForm:false, + label: '最后更新时间', + field: 'updateTime', + isTable: false, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -598,103 +787,153 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, + isForm: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { - label: '部门', - field: 'departmentCode', - isTable:false, - isTableForm:false, - sort: 'custom', + label: '采购价格审批人', + field: 'procurementCreator', table: { width: 150 }, - }, - { - label: '代码', - field: 'code', + sortTableDefault:14, + isForm: true, isTable:false, - isTableForm:false, isDetail:false, - sort: 'custom', + form: { + component: 'Select', + api: () => procurementCreators.list, + componentProps: { + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + } + }, + // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // hiddenFilterButton:true,//是否隐藏筛选按钮 + // dialogWidth:'665px',//搜索出来弹窗的宽度 + // searchListPlaceholder: '请选择采购员', // 输入框占位文本 + // searchField: 'id', // 查询弹窗赋值字段 + // searchTitle: '采购员信息', // 查询弹窗标题 + // searchAllSchemas: PurchaseMemberInfo.allSchemas, // 查询弹窗所需类 + // searchPage: SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key: 'roleCode', // 查询列表中字段 + // value: 'purchase', // 指查询具体值 + // isMainValue: false // 表示查询条件不是主表的字段的值 + // }] + // } + } + }, + { + label: '采购价格审批人', + field: 'procurementCreatorName', table: { width: 150 }, + sortTableDefault:14, + isForm: false, + isTable:true, + isDetail:false, + form: { + component: 'Select', + api: () => procurementCreators.list, + componentProps: { + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + } + }, + } }, + // { + // label: '采购审批人', + // field: 'procurementCreatorName', + // sort: 'custom', + // table: { + // width: 180 + // }, + // isTable:true, + // isDetail: true, + // isTableForm: false, + // isForm:false, + // isSearch:false, + // sortTableDefault:12 + // }, + { - label: '接口类型', - field: 'interfaceType', - dictType: DICT_TYPE.INTERFACE_TYPE, - dictClass: 'string', - isTable:false, - isDetail:false, - isTableForm:false, + label: '采购审批时间', + field: 'procurementCreateTime', + isTable: true, + sortTableDefault:13, + 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',//YYYY-MM-DD + valueFormat: 'x',//数据转成时间戳 + } + }, sort: 'custom', table: { - width: 150 + width: 180 }, + isForm: false, }, { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - isTable:false, - isTableForm:false, - dictClass: 'string', - }, - { - label: '创建者', - field: 'creator', + label: '财务审批人', + field: 'financialCreatorName', sort: 'custom', - sortTableDefault:1000, - isTable: false, table: { width: 150 }, + sortTableDefault:14, + isForm: false, }, { - label: '创建时间', - field: 'createTime', - isTable: false, - sortTableDefault:1001, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', + label: '采购驳回原因', + field: 'purchaseRejectCause', table: { width: 180 }, + sortTableDefault:16, + isTable: true, + isSearch: false, + isForm: false, + isDetail:false, }, { - label: '采购审批人', - field: 'procurementCreatorName', - sort: 'custom', + label: '财务驳回原因', + field: 'financeRejectCause', table: { width: 180 - }, - isTable:true, - isDetail: true, - isTableForm: false, - isForm:false, - isSearch:false, - sortTableDefault:10 + }, + sortTableDefault:17, + isTable: true, + isSearch: false, + isForm: false, + isDetail:false, }, - // { - // label: '采购审批人代码', - // field: 'procurementCreator', - // sortTableDefault:1002, - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTable: false, - // isForm: false, - // }, { - label: '采购审批时间', - field: 'procurementCreateTime', - sortTableDefault:11, + label: '财务审批时间', + field: 'financialCreateTime', isTable: true, + sortTableDefault:15, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -715,20 +954,33 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ isForm: false, }, { - label: '财务审批人', - field: 'financialCreatorName', + label: '供应商审批人', + field: 'supplierCreator', sort: 'custom', + isTable:false, + isDetail:false, + sortTableDefault:1006, table: { - width: 150 + width: 180 }, - sortTableDefault:12, isForm: false, }, { - label: '财务审批时间', - field: 'financialCreateTime', - sortTableDefault:13, - isTable: true, + label: '供应商审批人', + field: 'supplierCreatorName', + sort: 'custom', + isTable:false, + isDetail:true, + sortTableDefault:1006, + table: { + width: 180 + }, + isForm: false, + }, + { + label: '供应商审批时间', + field: 'supplierCreateTime', + isTable:false, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -748,82 +1000,113 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ }, isForm: false, }, - // { - // label: '采购驳回原因', - // field: 'purchaseRejectCause', - // table: { - // width: 180 - // }, - // sortTableDefault:14, - // isTable: true, - // isSearch: false, - // isForm: false, - // isDetail:false, - // }, - // { - // label: '财务驳回原因', - // field: 'financeRejectCause', - // table: { - // width: 180 - // }, - // sortTableDefault:15, - // isTable: true, - // isSearch: false, - // isForm: false, - // isDetail:false, - // }, { - label: '供应商审批人', - field: 'supplierCreatorName', + label: '备注', + field: 'remark', sort: 'custom', - isTable:false, - isTableForm:false, table: { width: 150 }, - isForm: false, + isForm:false, + isTable: false, }, { - label: '供应商审批时间', - field: 'supplierCreateTime', - isTable:false, + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm:false, isTableForm:false, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' + isDetail: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, + isTableForm:false, + isDetail:false, sort: 'custom', table: { - width: 180 + width: 150 }, - isForm: false, + form: { + component: 'Switch', + value: requestsettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true, + } + } }, { - label: '凭证描述', - field: 'voucherNumberRemark', - isTable:true, + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm:false, isTableForm:false, + isDetail:false, sort: 'custom', table: { - width: 180 + width: 150 }, - isForm: false, + form: { + component: 'Switch', + value: requestsettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true, + } + } }, { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, + label: '跳过任务生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm:false, + isTableForm:false, + isDetail:false, + sort: 'custom', table: { - width: 150, - fixed: 'right' + width: 150 }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true, + } + } } ])) /** * @returns {Array} 供应商发票在详情展示的主表字段 */ -export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive([ +export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive([ { label: '汇总信息', field: '', @@ -899,7 +1182,6 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive { + cellValue= Number(cellValue).toFixed(2) + cellValue = cellValue + '' || '' + + let x = cellValue.split('.') + let x1 = x[0] + let x2 = x.length > 1 ? '.' + x[1] : '' + const reg = /(\d+)(\d{3})/ + while(reg.test(x1)){ + x1 = x1.replace(reg, '$1,$2') + } + return x1+x2 +} + +function validateTaxRate(rule, value, callback) { + if (value>0) { + callback() + }else{ + callback(new Error('税率必须大于0')) + } +} + //表单校验 -export const SupplierinvoiceRecordMainRules = reactive({ - requestNumber: [ - { required: true, message: '请选择申请单号', trigger: 'change' } +export const SupplierinvoiceRequestMainRules = reactive({ + taxRate: [ + required, + { validator:validateTaxRate, message: '税率必须大于0', trigger: 'blur'} ], supplierCode: [ { required: true, message: '请选择供应商代码', trigger: 'change' } ], - outTransaction: [ - { required: true, message: '请输入出库事务类型', trigger: 'blur' } + invoiceTime:[ + { required: false, message: '请选择发票日期', trigger: 'blur' } ], - inTransaction: [ - { required: true, message: '请输入入库事务类型', trigger: 'blur' } - ], - executeTime: [ - { required: true, message: '请输入执行时间', trigger: 'blur' } - ], - activeDate: [ - { required: true, message: '请输入生效日期', trigger: 'blur' } - ], - available: [ - { required: true, message: '请输入是否可用', trigger: 'blur' } + goldenTaxInvoiceNumber:[ + { required: false, message: '请输入金税票号', trigger: 'blur' } ], departmentCode: [ { required: true, message: '请输入部门', trigger: 'blur' } ], - interfaceType: [ - { required: true, message: '请选择接口类型', trigger: 'change' } + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } ], - number: [ - { required: true, message: '请输入单据号', trigger: 'blur' } + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } ], businessType: [ { required: true, message: '请输入业务类型', trigger: 'blur' } ], - createTime: [ - { required: true, message: '请输入创建时间', trigger: 'blur' } + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + procurementCreator: [ + { required: true, message: '请选择采购员', trigger: 'change' } ], - creator: [ - { required: true, message: '请输入创建者', trigger: 'blur' } + beforeTaxAmount: [ + { required: true, message: '请输入未税金额', trigger: 'change' } + ], + totalTaxAmount: [ + { required: true, message: '请输入税额', trigger: 'change' } ], }) -/** - * @returns {Array} 供应商发票记录子表 - */ -export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive([ +export const SupplierinvoiceRequestFinance = useCrudSchemas(reactive([ { - label: '项目编号', - field: 'projectCode', - isTable:false, - sort: 'custom', - table: { - width: 150 + label: '过账日期', + field: 'postingDate', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '采购收货记录单号', - field: 'qadNumber', sort: 'custom', table: { width: 180 }, - }, - { - label: '单据类型', - field: 'billType', - dictType: DICT_TYPE.BILL_TYPE, - dictClass: 'string', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '订单号', - field: 'poNumber', - sort: 'custom', - table: { - width: 150 + isTable:false, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } }, - sortTableDefault:7, }, { - label: '订单行', - field: 'poLine', + label: '凭证描述', + field: 'voucherNumberRemark', sort: 'custom', - table: { - width: 150 + isTable:false, + form: { + component: 'Input', + componentProps:{ + type: 'textarea' + } }, }, +])) + +export const SupplierinvoiceRequestFinanceRules = reactive({ + postingDate: [ + { required: true, message: '请选择过账日期', trigger: 'change' } + ], + // voucherNumberRemark: [ + // { max: 50, message: '不得超过40个字符', trigger: 'blur' } + // ], +}) +/** + * @returns {Array} 供应商发票申请子表 + */ +export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive([ { - label: '待开票单据号', - field: 'recvBillNum', + label: '物料代码', + field: 'itemCode', table: { width: 150 }, - sortTableDefault:9, form: { componentProps: { disabled: true @@ -1303,39 +1630,19 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive } }, { - label: '单据号', - field: 'number', - hiddenInMain:true, - sort: 'custom', - table: { - width: 180 - }, - }, - { - label: '供应商发货单号', - field: 'asnBillNum', - sort: 'custom', - table: { - width: 180 - }, - sortTableDefault:8, - }, - { - label: '供应商代码', - field: 'supplierCode', - sort: 'custom', - table: { - width: 180 - }, - }, - { - label: '物料代码', - field: 'itemCode', - sort: 'custom', - sortTableDefault:3, + label: '物料名称', + field: 'itemName', table: { width: 150 }, + form: { + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled: true + } }, { label: '物料描述', @@ -1343,215 +1650,408 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive table: { width: 150 }, - sortTableDefault:4, isForm:false, isTableForm:false, isDetail: false, isTable: true, }, - { - label: '到货时间', - field: 'planArriveTime', - table: { - width: 150 - }, - formatter: dateFormatter2, - sortTableDefault:5, + + //仅是主列表页面的筛选搜索条件 + { + label: '收货日期', + field: 'deliveryDate', + sort: 'custom', + isDetail:false, + isTable: false, isForm:false, isTableForm:false, - isDetail: false, - isTable: true, + isSearch:true, + formatter: dateFormatter, + search: { + value:[], + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD', + type: 'daterange', + defaultTime: [new Date('1 '), new Date('1 ')] + } + }, }, { - label: '到货数量', - field: 'arrivalQty', + label: '收货日期', + field: 'deliveryDate', table: { width: 150 }, - sortTableDefault:6, + formatter: dateFormatter2, isForm:false, - isTableForm:false, + isTableForm:true, isDetail: false, isTable: true, + tableForm:{ + disabled:true + } }, { - label: '物料名称', - field: 'itemName', - sort: 'custom', + label: '可开票数量', + field: 'invoicableQuantity', table: { width: 150 }, - }, - { - label: '货币', - field: 'currency', - sort: 'custom', - table: { - width: 150 + form: { + componentProps: { + disabled: true + } }, + tableForm:{ + disabled: true + } }, { label: '合同价格', field: 'singlePrice', - sort: 'custom', + formatter: singlePriceFormart, table: { width: 150 }, form: { component: 'InputNumber', + componentProps: { + min: 0, + precision: 2, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2, } }, { label: '采购价格', field: 'purchasePrice', - sort: 'custom', + formatter: singlePriceFormart, table: { width: 150 }, form: { component: 'InputNumber', + componentProps: { + disabled: true, + min: 0, + precision: 2, + } + }, + tableForm:{ + type: 'InputNumber', + disabled: true, + min: 0, + precision: 2, } }, { - label: '差额', + label: '单价差额', field: 'differencePrice', + formatter: singlePriceFormart, table: { width: 150 }, form: { componentProps: { - disabled: true + disabled: true, + min: 0, + precision: 2, } }, tableForm:{ type: 'slot', + disabled: true, + min: 0, + precision: 2, + } + }, + { + label: '到货数量', + field: 'arrivalQty', + table: { + width: 150 + }, + isForm:false, + isTableForm:true, + isDetail: false, + isTable: true, + tableForm:{ + disabled:true + } + }, + { + label: '订单号', + field: 'poNumber', + form: { + componentProps: { + disabled: true + } + }, + table: { + width: 150 + }, + tableForm:{ disabled: true } }, { - label: '未税差额', - field: 'untaxedDifference', - formatter: accountantFormart, + label: '订单行', + field: 'poLine', table: { width: 150 }, form: { - component: 'InputNumber', + // labelMessage: '信息提示说明!!!', componentProps: { - min: 0, - precision: 6, + multiple:true,//多选 + isSearchList: true, + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '待开票列表', + searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas, + searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo, + searchCondition: [ + { + key: 'supplierCode', + value: 'supplierCode', + message: '请填供应商信息!', + isMainValue: true + },{ + key: 'orderType', + value: 'orderType', + message: '请填订单类型!', + isMainValue: true + } + ] } }, tableForm: { - type: 'InputNumber', - min: 0, - precision: 6, + multiple:true,//多选 + isInpuFocusShow: true, + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '待开票列表', + searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas, + searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo, + searchCondition: [ + { + key: 'supplierCode', + value: 'supplierCode', + message: '请填供应商信息!', + isMainValue: true + }, + { + key: 'orderType', + value: 'orderType', + message: '请填订单类型!', + isMainValue: true + } + ] } }, { - label: '含税差额', - field: 'taxInclusiveDifference', - formatter: accountantFormart, + label: '待开票单据号', + field: 'recvBillNum', table: { width: 150 }, form: { - component: 'InputNumber', componentProps: { - min: 0, - precision: 6, + disabled: true } }, - tableForm: { - type: 'InputNumber', - min: 0, - precision: 6, + tableForm:{ + disabled: true } }, { - label: '收货日期', - field: 'deliveryDate', - isTable: true, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' + label: '单据类型', + field: 'billType', + dictType: DICT_TYPE.BILL_TYPE, + dictClass: 'string', + table: { + width: 150 }, - sort: 'custom', + form: { + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled: true + } + }, + { + label: '供应商发货单号', + field: 'asnBillNum', table: { - width: 180 + width: 150 }, form: { - component: 'DatePicker', componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + disabled: true } + }, + tableForm:{ + disabled: true } }, { - label: '开票数量', - field: 'invoicableQuantity', - sort: 'custom', + label: '供应商代码', + field: 'supplierCode', + hiddenInMain:true, table: { width: 150 }, form: { - component: 'InputNumber', + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled: true } }, + + // { + // label: '未税差额',//子表数据 + // field: 'untaxedDifference', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // precision: 2, + // } + // }, + // tableForm: { + // type: 'InputNumber', + // min: 0, + // precision: 2, + // } + // }, + // { + // label: '含税差额', + // field: 'taxInclusiveDifference', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // precision: 2, + // } + // }, + // tableForm: { + // type: 'InputNumber', + // min: 0, + // precision: 2, + // } + // }, + { - label: '财务凭证号', - field: 'voucherNumber', - sort: 'custom', + label: '货币', + field: 'currency', table: { width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled: true } }, { label: '备注', field: 'remark', - sort: 'custom', + hiddenInMain:true, + }, + { + label: '创建时间', + field: 'createTime', + hiddenInMain:true, + isTable: false, + table: { + width: 150 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + isTableForm: false, + isForm: false + }, + { + label: '创建者', + field: 'creator', + hiddenInMain:true, + isTableForm: false, + isTable:false, + isForm: false, table: { width: 150 }, }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 250, + fixed: 'right' + }, + hiddenInMain:true, + isTableForm: false, + } ])) - +// 批次校验 +const validateSinglePrice = (rule: any, value: any, callback: any) => { + if (Number(value)>0) { + callback(); + } else { + callback(new Error('请输入合同价格')); + } +} //表单校验 -export const SupplierinvoiceRecordDetailRules = reactive({ - packingNumber: [ - { required: true, message: '请输入包装号', trigger: 'blur' } - ], - batch: [ - { required: true, message: '请输入批次', trigger: 'blur' } - ], - poNumber: [ - { required: true, message: '请输入订单号', trigger: 'blur' } - ], - poLine: [ - { required: true, message: '请输入订单行', trigger: 'blur' } - ], - packQty: [ - { required: true, message: '请输入包装数量', trigger: 'blur' } - ], - packUnit: [ - { required: true, message: '请输入包装规格', trigger: 'blur' } - ], - convertRate: [ - { required: true, message: '请输入转换率', trigger: 'blur' } - ], - number: [ - { required: true, message: '请输入单据号', trigger: 'blur' } - ], - itemCode: [ - { required: true, message: '请输入物料代码', trigger: 'blur' } +export const SupplierinvoiceRequestDetailRules = reactive({ + singlePrice: [ + { required: true, message: '请输入合同价格', trigger: 'change' }, + { validator: validateSinglePrice, trigger: 'change' } ], - createTime: [ - { required: true, message: '请输入创建时间', trigger: 'blur' } - ], - creator: [ - { required: true, message: '请输入创建者', trigger: 'blur' } +}) +// 采购通过 +export const PurchasePass = useCrudSchemas(reactive([ + { + label: '价差通过说明', + field: 'balanceStatement', + sort: 'custom', + table: { + width: 180 + }, + isTable:false, + form: { + componentProps:{ + type:'textarea' + } + }, + }, +])) +//表单校验 +export const PurchasePassRules = reactive({ + balanceStatement: [ + { required: true, message: '请输入价差通过说明', trigger: 'blur'}, + { max: 100, message: '最多100字符', trigger: 'blur'} ], })