diff --git a/.env.test b/.env.test index 2c1e25575..314cbd94e 100644 --- a/.env.test +++ b/.env.test @@ -4,10 +4,10 @@ NODE_ENV=test VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://dev.ccwin-in.com:25300/api' +VITE_BASE_URL='http://dev.ccwin-in.com:29000/api' # 上传路径 -VITE_UPLOAD_URL='http://dev.ccwin-in.com:25300/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://dev.ccwin-in.com:29000/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -31,13 +31,13 @@ VITE_BASE_PATH=/ VITE_OUT_DIR=sfms3.0-ui # 自定义接口路径 -VITE_INTERFACE_URL='http://dev.ccwin-in.com:25310/magic/web/index.html' +VITE_INTERFACE_URL='http://dev.ccwin-in.com:29000/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' +VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:29000' # 租户配置 -VITE_TENANT='["长春1379","成都1397","长春2379"]' +VITE_TENANT='["长春","成都"]' # 查看质检报告环境 VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400' diff --git a/src/api/qms/inspectionJob/inspectionJobMain/index.ts b/src/api/qms/inspectionJob/inspectionJobMain/index.ts index 9b3f59c7e..b8ff3f9fa 100644 --- a/src/api/qms/inspectionJob/inspectionJobMain/index.ts +++ b/src/api/qms/inspectionJob/inspectionJobMain/index.ts @@ -4,7 +4,7 @@ import request from '@/config/axios' // 查询检验任务列表 export const getInspectionJobMainPage = async (params) => { if (params.isSearch) { - delete params.isSearch + // delete params.isSearch const data = {...params} return await request.post({ url: '/qms/inspection-job-main/senior', data }) } else { diff --git a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts index 81ffa403e..f5ec5d94b 100644 --- a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts +++ b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts @@ -26,8 +26,8 @@ export interface InspectionRecordMainVO { // 查询检验申请列表 export const getInspectionRecordMainPage = async (params) => { if (params.isSearch) { - delete params.isSearch - const data = {...params} + // delete params.isSearch + const data = { ...params } return await request.post({ url: '/qms/inspection-record-main/senior', data }) } else { return await request.get({ url: `/qms/inspection-record-main/page`, params }) @@ -62,16 +62,23 @@ export const deleteInspectionRecordMain = async (id: number) => { export const exportInspectionRecordMain = async (params) => { if (params.isSearch) { const data = { ...params } - return await request.downloadPost({ url: `/qms/inspection-record-main/export-excel-senior`, data }) + return await request.downloadPost({ + url: `/qms/inspection-record-main/export-excel-senior`, + data + }) } else { return await request.download({ url: `/qms/inspection-record-main/export-excel`, params }) } } +// 导出首件检验记录 Excel export const exportFirstInspectionRecordMain = async (params) => { if (params.isSearch) { const data = { ...params } - return await request.downloadPost({ url: `/qms/inspection-record-main/export-excel-first-senior`, data }) + return await request.downloadPost({ + url: `/qms/inspection-record-main/export-excel-first-senior`, + data + }) } else { return await request.download({ url: `/qms/inspection-record-main/export-excel-first`, params }) } diff --git a/src/api/qms/inspectionRequest/index.ts b/src/api/qms/inspectionRequest/index.ts index b3033bc32..68dc89e56 100644 --- a/src/api/qms/inspectionRequest/index.ts +++ b/src/api/qms/inspectionRequest/index.ts @@ -20,7 +20,7 @@ export interface InspectionMainVO { // 查询检验申请列表 export const getInspectionMainPage = async (params) => { if (params.isSearch) { - delete params.isSearch + // delete params.isSearch const data = {...params} return await request.post({ url: '/qms/inspection-request-main/senior', data }) } else { diff --git a/src/api/wms/demandforecastingDetail/index.ts b/src/api/wms/demandforecastingDetail/index.ts index e3303bbd1..309422d37 100644 --- a/src/api/wms/demandforecastingDetail/index.ts +++ b/src/api/wms/demandforecastingDetail/index.ts @@ -72,6 +72,9 @@ const getPageParams = (params)=>{ export const getDemandforecastingDetailPage = async (params) => { if (params.isSearch) { delete params.isSearch + if(params.flag){ + delete params.flag + } const data = {...params} return await request.post({ url: '/wms/demandforecasting-detail/senior', data }) } else { diff --git a/src/api/wms/demandforecastingMain/index.ts b/src/api/wms/demandforecastingMain/index.ts index 7d5596a8f..0433af12c 100644 --- a/src/api/wms/demandforecastingMain/index.ts +++ b/src/api/wms/demandforecastingMain/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import { isString } from '@/utils/is' export interface DemandforecastingMainVO { supplierCode: string @@ -66,6 +67,56 @@ export const witPurchaseMain = async (id: number) => { return await request.post({ url: `/wms/demandforecasting-main/wit?id=` + id }) } +// 要货预测-列表和头部请求参数 +const getPageParams = (params)=>{ + // 到货日期 + if(params.dueDate&¶ms.dueDate.length>0){ + if(isString(params.dueDate[0])){ + params.startDate = params.dueDate[0] + }else{ + params.startDate = params.dueDate[0].format('YYYY-MM-DD') + } + + } + if(params.dueDate&¶ms.dueDate.length>1){ + if(isString(params.dueDate[1])){ + params.endDate = params.dueDate[1] + }else{ + params.endDate = params.dueDate[1].format('YYYY-MM-DD') + } + } + params.dueDate = '' + + //计划员 + if(params.planerId&¶ms.planerId.length>0){ + params.planers = params.planerId.join(',') + } + params.planerId = '' + // 供应商代码 + if(params.supplierCode&¶ms.supplierCode.length>0){ + let keyValue = params.supplierCode.split(' ') + keyValue.forEach(item=>{item = item.trim()}) + params.supplierCodes = keyValue.join(',') + } + params.supplierCode = '' + + // 物料代码 + if(params.itemCode&¶ms.itemCode.length>0){ + let keyValue = params.itemCode.split(' ') + keyValue.forEach(item=>{item = item.trim()}) + params.itemCodes = keyValue.join(',') + } + params.itemCode = '' + + // 版本号 + if(params.version&¶ms.version.length>0){ + let keyValue = params.version.split(' ') + keyValue.forEach(item=>{item = item.trim()}) + params.versions = keyValue.join(',') + } + params.version = '' + return params +} // 导出要货预测主 Excel export const exportDemandforecastingMain = async (params) => { if (params.isSearch) { @@ -73,6 +124,7 @@ export const exportDemandforecastingMain = async (params) => { const data = {...params} return request.post({ url: '/wms/demandforecasting-main/export-excel-senior', data }) } else { + params = getPageParams(params) return await request.download({ url: `/wms/demandforecasting-main/export-excel`, params }) } } diff --git a/src/api/wms/inventorymoveRecordMain/index.ts b/src/api/wms/inventorymoveRecordMain/index.ts index 9d9c4f083..03e2f36a3 100644 --- a/src/api/wms/inventorymoveRecordMain/index.ts +++ b/src/api/wms/inventorymoveRecordMain/index.ts @@ -45,7 +45,7 @@ export const getInventorymoveRecordMain = async (id: number) => { // 新增库存转移记录主 export const createInventorymoveRecordMain = async (data: InventorymoveRecordMainVO) => { - return await request.post({ url: `/wms/inventorymove-record-main/create`, data }) + return await request.post({ url: `/wms/inventorymove-record-main/createMove`, data }) } // 修改库存转移记录主 diff --git a/src/api/wms/location/index.ts b/src/api/wms/location/index.ts index 36cf3f575..bce556d5c 100644 --- a/src/api/wms/location/index.ts +++ b/src/api/wms/location/index.ts @@ -34,6 +34,17 @@ export const getLocationPage = async (params) => { return await request.get({ url: `/wms/location/page`, params }) } } + +export const getLocationMPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/wms/location/Msenior', data }) + } else { + return await request.get({ url: `/wms/location/Mpage`, params }) + } +} + export const getLocationPageRepleinsh = async (params) => { if (params.isSearch) { delete params.isSearch @@ -139,4 +150,4 @@ export const selectConfigToLocation = async (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/productionreturnRecordDetail/index.ts b/src/api/wms/productionreturnRecordDetail/index.ts index f9ffcd4a4..910cb941e 100644 --- a/src/api/wms/productionreturnRecordDetail/index.ts +++ b/src/api/wms/productionreturnRecordDetail/index.ts @@ -44,6 +44,26 @@ export const getProductionreturnRecordDetailPage = async (params) => { return await request.get({ url: `/wms/productionreturn-record-detail/page`, params }) } } +// 查询生产退料记录子列表 +export const getProductionreturnRecordDetailPageStore = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionreturn-record-detail-store/senior', data }) + } else { + return await request.get({ url: `/wms/productionreturn-record-detail-store/page`, params }) + } +} +// 查询隔离退料记录子列表 +export const getProductionreturnRecordDetailPageHold = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionreturn-record-detail-hold/senior', data }) + } else { + return await request.get({ url: `/wms/productionreturn-record-detail-hold/page`, params }) + } +} // 查询生产退料记录子详情 export const getProductionreturnRecordDetail = async (id: number) => { diff --git a/src/api/wms/productreceiptRecordMain/index.ts b/src/api/wms/productreceiptRecordMain/index.ts index 074f47423..e3dd420d9 100644 --- a/src/api/wms/productreceiptRecordMain/index.ts +++ b/src/api/wms/productreceiptRecordMain/index.ts @@ -95,7 +95,7 @@ export const exportProductreceiptRecordMain = async (params) => { params.filters.push(cmd) delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/productreceipt-record-main/export-excel-senior', data }) + return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior', data }) } else { return await request.download({ url: `/wms/productreceipt-record-main/export-excel`, params }) } diff --git a/src/api/wms/purchasePlanDetail/index.ts b/src/api/wms/purchasePlanDetail/index.ts index a436ab74a..d09baf96a 100644 --- a/src/api/wms/purchasePlanDetail/index.ts +++ b/src/api/wms/purchasePlanDetail/index.ts @@ -20,10 +20,12 @@ const getPageParams = (params)=>{ console.log('params.status',params.status) // 状态 - if(params.status&¶ms.status.length>0){ - params.statuss = params.status.join(',') + if(Array.isArray(params.status)){ + if(params.status&¶ms.status.length>0){ + params.statuss = params.status.join(',') + } + params.status = '' } - params.status = '' return params } // 查询要货计划子列表 diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 57b8ee523..f30f0f829 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -106,6 +106,7 @@ :routeName="routeName" @visibleChange="visibleChange" @inputStringFcous='inputStringFcous' + :sureDisabled="sureDisabled" > diff --git a/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts b/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts index 8ede0bdc3..9c106671b 100644 --- a/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts +++ b/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts @@ -58,7 +58,7 @@ export const InspectionRecordMain = useCrudSchemas( field: 'asnNumber', sort: 'custom', isSearch: true, - isForm:false, + isForm: false, form: { componentProps: { disabled: true @@ -245,7 +245,6 @@ export const InspectionRecordMain = useCrudSchemas( componentProps: { disabled: true } - }, table: { width: 150 @@ -277,7 +276,6 @@ export const InspectionRecordMain = useCrudSchemas( componentProps: { disabled: true } - }, table: { width: 150 @@ -294,7 +292,6 @@ export const InspectionRecordMain = useCrudSchemas( componentProps: { disabled: true } - }, table: { width: 150 @@ -421,7 +418,7 @@ export const InspectionRecordMain = useCrudSchemas( componentProps: { type: 'datetime', valueFormat: 'x', - disabled: true + disabled: true } }, detail: { @@ -499,7 +496,7 @@ export const InspectionRecordMain = useCrudSchemas( table: { width: 150 }, - isForm:false + isForm: false }, { label: '执行结果', @@ -516,6 +513,17 @@ export const InspectionRecordMain = useCrudSchemas( } } }, + { + label: '包装号', + field: 'packageCode', + sort: 'custom', + isSearch: true, + isTable: false, + isForm: false, + tableForm: { + disabled: false + } + }, { label: '创建时间', field: 'createTime', @@ -535,6 +543,15 @@ export const InspectionRecordMain = useCrudSchemas( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x' } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } } }, { @@ -586,7 +603,7 @@ export const InspectionRecordMain = useCrudSchemas( isForm: false, isDetail: false, table: { - width: 250, + width: 300, fixed: 'right' } } diff --git a/src/views/qms/inspectionRecordFirst/addForm.vue b/src/views/qms/inspectionRecordFirst/addForm.vue index ebcab9ac7..4f4777f9a 100644 --- a/src/views/qms/inspectionRecordFirst/addForm.vue +++ b/src/views/qms/inspectionRecordFirst/addForm.vue @@ -715,6 +715,7 @@ if (props.basicFormWidth) { dialogWidth.value = props.isBusiness ? '60%' : '40%' } const rules = ref({ + inspectionSchemeCode: [{ required: true, message: '请选择检验方案', trigger: 'blur' }], inspectionTime: [{ required: true, message: '请选择检验时间', trigger: 'blur' }], 'inspectionJobCharacteristicsUpdateReqVO.description': [ { required: true, message: '请填写描述', trigger: ['blur', 'change'] } diff --git a/src/views/qms/inspectionRecordFirst/index.vue b/src/views/qms/inspectionRecordFirst/index.vue index 2ed3dbac1..0f124b412 100644 --- a/src/views/qms/inspectionRecordFirst/index.vue +++ b/src/views/qms/inspectionRecordFirst/index.vue @@ -1,7 +1,12 @@ diff --git a/src/views/wms/inventoryManage/package/package.data.ts b/src/views/wms/inventoryManage/package/package.data.ts index cd0625bf5..a8d1f6955 100644 --- a/src/views/wms/inventoryManage/package/package.data.ts +++ b/src/views/wms/inventoryManage/package/package.data.ts @@ -2,12 +2,36 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; import * as ItembasicApi from "@/api/wms/itembasic"; +import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; +import * as WarehouseApi from "@/api/wms/warehouse"; +import {Dock} from "@/views/wms/basicDataManage/factoryModeling/dock/dock.data"; +import * as DockApi from "@/api/wms/dock"; +import {Packageunit} from "@/views/wms/basicDataManage/itemManage/packageunit/packageunit.data"; +import * as PackageunitApi from "@/api/wms/packageunit"; +import {Location} from "@/views/wms/basicDataManage/factoryModeling/location/location.data"; +import * as LocationApi from "@/api/wms/location"; +import {Supplier} from "@/views/wms/basicDataManage/supplierManage/supplier/supplier.data"; +import * as SupplierApi from "@/api/wms/supplier"; +import {Itempackaging} from "@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data"; +import * as ItempackagingApi from "@/api/wms/itempackage"; +import * as SupplieritemApi from "@/api/wms/supplieritem"; +import { formatTime } from '@/utils/index' + +import { + Supplieritem +} from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data"; +import { + Productionline +} from "@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data"; +import * as ProductionlineApi from "@/api/wms/productionline"; // 表单校验 export const PackageRules = reactive({ - number: [required], + // number: [required], itemCode: [required], itemName: [required], + packUnit: [required], + packQty: [required], }) export const Package = useCrudSchemas(reactive([ { @@ -19,12 +43,14 @@ export const Package = useCrudSchemas(reactive([ width: 180, fixed: 'left' }, + isForm:false }, { label: '父包装号', field: 'parentNumber', sort: 'custom', isSearch: true, + isForm: false, table: { width: 180, }, @@ -50,7 +76,15 @@ export const Package = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, isSearch: true @@ -70,6 +104,11 @@ export const Package = useCrudSchemas(reactive([ table: { width: 150, }, + form: { + componentProps: { + disabled: true + } + }, }, { label: '物料描述2', @@ -78,12 +117,20 @@ export const Package = useCrudSchemas(reactive([ table: { width: 150, }, + form: { + componentProps: { + disabled: true + } + }, }, { label: '批次', field: 'batch', sort: 'custom', isSearch: true, + form:{ + value: formatTime(new Date(), 'yyyyMMdd') + }, table: { width: 150, }, @@ -123,6 +170,7 @@ export const Package = useCrudSchemas(reactive([ }, form: { component: 'DatePicker', + value: formatTime(new Date(), 'yyyy-MM-dd'), componentProps: { style: {width: '100%'}, type: 'date', @@ -186,7 +234,10 @@ export const Package = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', // 默认都是字符串类型其他暂不考虑 form: { - component: 'SelectV2' + component: 'SelectV2', + componentProps: { + disabled: true + } }, table: { width: 150, @@ -207,7 +258,10 @@ export const Package = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', // 默认都是字符串类型其他暂不考虑 form: { - component: 'SelectV2' + component: 'SelectV2', + componentProps: { + disabled: true + } }, table: { width: 150, @@ -229,14 +283,6 @@ export const Package = useCrudSchemas(reactive([ width: 150, }, }, - { - label: '包装数量', - field: 'packQty', - sort: 'custom', - table: { - width: 150, - }, - }, { label: '包装规格', field: 'packUnit', @@ -249,31 +295,134 @@ export const Package = useCrudSchemas(reactive([ table: { width: 150, }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch:true, + isSearch:true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', + searchField: 'packUnit', + searchTitle: '物料包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItempackagingApi.getItempackagingPageTree, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key:'itemCode', // 查询列表中字段 + value:'itemCode', // 指主表某字段 + message: '请选择物料代码!', // 当前置条件为空时 弹出信息提示 + isMainValue: true, // 表示查询条件是主表的字段的值 + action: '==', // 查询拼接条件 + }], + verificationParams: [{ + key: 'packUnit', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + + } + } }, { - label: '仓库代码', - field: 'toWarehouseCode', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '月台代码', - field: 'toDockCode', + label: '包装数量', + field: 'packQty', sort: 'custom', table: { width: 150, }, - }, - { - label: '库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150, + form: { + componentProps: { + disabled: true + } }, }, + // { + // label: '仓库代码', + // field: 'toWarehouseCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // enterSearch:true, + // isSearch:true, + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '仓库信息', // 查询弹窗标题 + // searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 + // searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, + // { + // label: '月台代码', + // field: 'toDockCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // enterSearch: true, + // isSearchList: true, + // searchListPlaceholder: '请选择月台代码', + // searchField: 'code', + // searchTitle: '客户月台', + // searchAllSchemas: Dock.allSchemas, + // searchPage: DockApi.getDockPage, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }], + // } + // } + // }, + // { + // label: '库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // enterSearch: true, + // isSearchList: true, + // searchListPlaceholder: '请选择库位代码', + // searchField: 'code', + // searchTitle: '库位信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: LocationApi.getLocationPage, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // },{ + // key: 'warehouseCode', + // value: 'toWarehouseCode', + // message: '请填写仓库代码!', + // isMainValue: true + // }], + // } + // } + // }, { label: '供应商代码', field: 'supplierCode', @@ -281,6 +430,36 @@ export const Package = useCrudSchemas(reactive([ table: { width: 150, }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch:true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'supplierCode', // 查询弹窗赋值字段 + searchTitle: '供应商物料信息', + isSearchList: true, // 开启查询弹窗 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码!', + isMainValue: true + }], + verificationParams: [ + { + key: 'supplierCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + + } + } }, { label: '供应商物料代码', @@ -289,55 +468,106 @@ export const Package = useCrudSchemas(reactive([ table: { width: 150, }, + form: { + componentProps: { + disabled: true + // enterSearch: true, + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择供应商物料', // 输入框占位文本 + // searchField: 'supplierItemCode', // 查询弹窗赋值字段 + // searchTitle: '供应商信息', // 查询弹窗标题 + // searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + // searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + // searchCondition: [ + // { + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // },{ + // key: 'supplierCode', + // value: 'supplierCode', + // message: '请填写物料代码!', + // isMainValue: true + // } + // ], + // verificationParams: [ + // { + // key: 'code', + // action: '==', + // value: '', + // isMainValue: false, + // isSearch: true, + // isFormModel: true + // } + // ] // 失去焦点校验参数 + } + } }, { - label: '采购订单号', - field: 'poNumber', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '采购订单行', - field: 'poLine', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '采购计划单号', - field: 'rpNumber', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '发货单号', - field: 'asnNumber', - sort: 'custom', - table: { - width: 182, - }, - }, - { - label: '生产订单号', - field: 'woNumber', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '生产订单行', - field: 'woLine', + label: '标签数量', + field: 'count', sort: 'custom', + isTable: false, table: { - width: 150, + width: 150 }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 0, + max: 100, + } + } }, + // { + // label: '采购订单号', + // field: 'poNumber', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '采购订单行', + // field: 'poLine', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '采购计划单号', + // field: 'rpNumber', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '发货单号', + // field: 'asnNumber', + // sort: 'custom', + // table: { + // width: 182, + // }, + // }, + // { + // label: '生产订单号', + // field: 'woNumber', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '生产订单行', + // field: 'woLine', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, { label: '生产线代码', field: 'productionLineCode', @@ -345,103 +575,120 @@ export const Package = useCrudSchemas(reactive([ table: { width: 150, }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + multiple:true, + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } }, - { - label: '班组代码', - field: 'teamCode', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '班次代码', - field: 'shiftCode', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '客户代码', - field: 'customerCode', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '客户月台代码', - field: 'customerDockCode', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '客户物料代码', - field: 'customerItemCode', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '销售订单号', - field: 'soNumber', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '销售订单行', - field: 'soLine', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '质量等级', - field: 'eqLevel', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '货主代码', - field: 'ownerCode', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '重量', - field: 'weight', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '面积', - field: 'area', - sort: 'custom', - table: { - width: 150, - }, - }, - { - label: '体积', - field: 'volume', - sort: 'custom', - table: { - width: 150, - }, - }, + // { + // label: '班组代码', + // field: 'teamCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '班次代码', + // field: 'shiftCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '客户代码', + // field: 'customerCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '客户月台代码', + // field: 'customerDockCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '客户物料代码', + // field: 'customerItemCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '销售订单号', + // field: 'soNumber', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '销售订单行', + // field: 'soLine', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '质量等级', + // field: 'eqLevel', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '货主代码', + // field: 'ownerCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '重量', + // field: 'weight', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '面积', + // field: 'area', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, + // { + // label: '体积', + // field: 'volume', + // sort: 'custom', + // table: { + // width: 150, + // }, + // }, { label: '创建时间', field: 'createTime', @@ -461,7 +708,16 @@ export const Package = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryManage/transaction/index.vue b/src/views/wms/inventoryManage/transaction/index.vue index 23f4cd17e..12b5ed0ad 100644 --- a/src/views/wms/inventoryManage/transaction/index.vue +++ b/src/views/wms/inventoryManage/transaction/index.vue @@ -168,7 +168,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } diff --git a/src/views/wms/inventoryManage/transaction/transaction.data.ts b/src/views/wms/inventoryManage/transaction/transaction.data.ts index 18bd46297..961e6bf1d 100644 --- a/src/views/wms/inventoryManage/transaction/transaction.data.ts +++ b/src/views/wms/inventoryManage/transaction/transaction.data.ts @@ -286,6 +286,37 @@ export const Transaction = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '创建时间', + field: 'createTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + }, diff --git a/src/views/wms/inventoryManage/transferlog/index.vue b/src/views/wms/inventoryManage/transferlog/index.vue index 1303b5ef2..a59a5d54b 100644 --- a/src/views/wms/inventoryManage/transferlog/index.vue +++ b/src/views/wms/inventoryManage/transferlog/index.vue @@ -167,7 +167,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } diff --git a/src/views/wms/inventoryManage/transferlog/transferlog.data.ts b/src/views/wms/inventoryManage/transferlog/transferlog.data.ts index 68eef843b..26b8967e4 100644 --- a/src/views/wms/inventoryManage/transferlog/transferlog.data.ts +++ b/src/views/wms/inventoryManage/transferlog/transferlog.data.ts @@ -375,7 +375,16 @@ export const Transferlog = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts index 9afba26c7..c023ed086 100644 --- a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts @@ -215,6 +215,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ detail: { dateFormat : 'YYYY-MM-DD HH:mm:ss' }, + isSearch: true, search: { component: 'DatePicker', componentProps: { diff --git a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue index bc48196fa..5964396b7 100644 --- a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue @@ -306,7 +306,13 @@ const buttonBaseClick = (val, item) => { } else if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) @@ -348,7 +354,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -359,7 +365,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -370,7 +376,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -381,7 +387,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -392,7 +398,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -403,7 +409,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -477,7 +483,11 @@ const submitForm = async (formType,submitData) => { message.success(t('common.updateSuccess')) } basicFormRef.value.dialogVisible = false - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { basicFormRef.value.formLoading = false } @@ -498,7 +508,7 @@ const handleDelete = async (id: number) => { await ContainerMainRequestApi.deleteContainerMainRequest(id) message.success(t('common.delSuccess')) // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } diff --git a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts index e63799675..57daad0dd 100644 --- a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts @@ -126,6 +126,7 @@ export const ContainerRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, + isSearch: true, search: { component: 'DatePicker', componentProps: { diff --git a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue index f4dba5289..6c8da9a16 100644 --- a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue @@ -162,7 +162,13 @@ const buttonBaseClick = (val, item) => { } else if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) @@ -215,7 +221,7 @@ const handleDelete = async (id: number) => { await ContainerRecordMainApi.deleteContainerRecordMain(id) message.success(t('common.delSuccess')) // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue index 96b9229c3..2e5458fae 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue @@ -268,7 +268,13 @@ const buttonBaseClick = (val, item) => { } else if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) @@ -301,7 +307,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -312,7 +318,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -323,7 +329,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -334,7 +340,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -345,7 +351,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -356,7 +362,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -432,7 +438,11 @@ const submitForm = async (formType,submitData) => { message.success(t('common.updateSuccess')) } basicFormRef.value.dialogVisible = false - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { basicFormRef.value.formLoading = false } @@ -453,7 +463,7 @@ const handleDelete = async (id: number) => { await ContainerMainRequestApi.deleteContainerMainRequest(id) message.success(t('common.delSuccess')) // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts index 233ae6d55..119add89e 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts @@ -219,6 +219,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ detail: { dateFormat : 'YYYY-MM-DD HH:mm:ss' }, + isSearch: true, search: { component: 'DatePicker', componentProps: { @@ -227,7 +228,10 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, - isTable:false, + isTable: true, + table: { + width: 180 + }, isForm: false, }, { @@ -485,7 +489,10 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, - isTable:false, + isTable: false, + table: { + width: 180 + }, isForm: false, isTableForm: false }, diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue index 08285130b..5239b74b9 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue @@ -290,7 +290,13 @@ const buttonBaseClick = (val, item) => { } else if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) @@ -323,7 +329,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -334,7 +340,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -345,7 +351,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -356,7 +362,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -367,7 +373,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -378,7 +384,7 @@ const buttonTableClick = async (val, row) => { ContainerMainRequestApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -457,7 +463,11 @@ const submitForm = async (formType,submitData) => { message.success(t('common.updateSuccess')) } basicFormRef.value.dialogVisible = false - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { basicFormRef.value.formLoading = false } @@ -478,7 +488,7 @@ const handleDelete = async (id: number) => { await ContainerMainRequestApi.deleteContainerMainRequest(id) message.success(t('common.delSuccess')) // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts index 58338a454..7a8b22d41 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts @@ -218,6 +218,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ detail: { dateFormat : 'YYYY-MM-DD HH:mm:ss' }, + isSearch: true, search: { component: 'DatePicker', componentProps: { diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/inventoryinitRecordMain.data.ts b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/inventoryinitRecordMain.data.ts index 76ff3786d..e7b0496ef 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/inventoryinitRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/inventoryinitRecordMain.data.ts @@ -196,7 +196,16 @@ export const InventoryinitRecordMain = useCrudSchemas(reactive([ inactiveValue: 'FALSE', activeValue: 'TRUE' } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue index 6d9ca8f17..90793b7ac 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue @@ -297,7 +297,7 @@ const handleClose = async (id: number) => { await InventoryinitRequestMainApi.closeInventoryinitRequestMain(id) message.success(t('common.closeSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -310,7 +310,7 @@ const handleReAdd = async (id: number) => { await InventoryinitRequestMainApi.reAddInventoryinitRequestMain(id) message.success(t('common.reAddSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -323,7 +323,7 @@ const handleSubmit = async (id: number) => { await InventoryinitRequestMainApi.submitInventoryinitRequestMain(id) message.success(t('common.updateSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -336,7 +336,7 @@ const handleAgree = async (id: number) => { await InventoryinitRequestMainApi.agreeInventoryinitRequestMain(id) message.success(t('common.agreeSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -348,7 +348,7 @@ const handleHandle = async (id: number) => { tableObject.loading = true await InventoryinitRequestMainApi.handleInventoryinitRequestMain(id) message.success(t('common.handleSuccess')) - await getList() + buttonBaseClick('refresh',null) } catch {} tableObject.loading = false } @@ -362,7 +362,7 @@ const handleRefused = async (id: number) => { await InventoryinitRequestMainApi.refusedInventoryinitRequestMain(id) message.success(t('common.refusedSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -392,7 +392,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { // await InventoryinitRequestMainApi.deleteInventoryinitRequestMain(id) // message.success(t('common.delSuccess')) // // 刷新列表 -// await getList() +// buttonBaseClick('refresh',null) // } catch {} // } @@ -453,7 +453,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts index d90dd8f79..12f41d622 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts @@ -296,6 +296,15 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ }, isForm: false, isTable: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/packageManage/packagemergeMain/packagemergeMain.data.ts b/src/views/wms/inventoryjobManage/packageManage/packagemergeMain/packagemergeMain.data.ts index b655b60a6..2e4e8f15a 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packagemergeMain/packagemergeMain.data.ts +++ b/src/views/wms/inventoryjobManage/packageManage/packagemergeMain/packagemergeMain.data.ts @@ -194,7 +194,17 @@ export const PackagemergeMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, + }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue index fd8dd5624..36bd2f4af 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue @@ -132,7 +132,13 @@ const buttonBaseClick = (val, item) => { } else if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) @@ -167,17 +173,17 @@ const buttonTableClick = async (val, row) => { await message.confirm('确认要关闭吗?') await PackageoverJobMainApi.closePackageoverJobMain(row.masterId) // 刷新列表 - await getList() + buttonBaseClick('refresh',null) }else if (val == 'edit') { // 编辑 openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.masterId) } else if (val == 'mainJobAcc') { // 承接 await PackageoverJobMainApi.acceptPackageoverJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAba') { // 放弃 await PackageoverJobMainApi.abandonPackageoverJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } @@ -208,7 +214,11 @@ const formsSuccess = async (formType,data) => { message.success(t('common.updateSuccess')) } basicFormRef.value.dialogVisible = false - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } // 获取部门 用于详情 部门回显 const { wsCache } = useCache() @@ -229,7 +239,7 @@ const handleDelete = async (id: number) => { await PackageoverJobMainApi.deletePackageoverJobMain(id) message.success(t('common.delSuccess')) // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts index 015b3e622..ac2a6c853 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts @@ -500,7 +500,16 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isTable: false + isTable: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '最后更新者', diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/packageoverRecordMain.data.ts b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/packageoverRecordMain.data.ts index 97aa03bf5..ce27beb2c 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/packageoverRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/packageoverRecordMain.data.ts @@ -11,11 +11,18 @@ export const PackageoverMain = useCrudSchemas(reactive([ width: 180 }, }, + // { + // label: '申请单号', + // field: 'requestNumber', + // sort: 'custom', + // table: { + // width: 180 + // }, + // }, { label: '任务单据号', field: 'jobNumber', sort: 'custom', - isTable: false, isSearch: true, table: { width: 180 @@ -481,6 +488,36 @@ export const PackageoverDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + isTable: true, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + }, // { // label: '创建时间', // field: 'createTime', diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue index 1ac4e1452..7edb981c1 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue @@ -257,7 +257,7 @@ const buttonTableClick = async (val, row) => { PackageoverRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -268,7 +268,7 @@ const buttonTableClick = async (val, row) => { PackageoverRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -279,7 +279,7 @@ const buttonTableClick = async (val, row) => { PackageoverRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -290,7 +290,7 @@ const buttonTableClick = async (val, row) => { PackageoverRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -301,7 +301,7 @@ const buttonTableClick = async (val, row) => { PackageoverRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -312,7 +312,7 @@ const buttonTableClick = async (val, row) => { PackageoverRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -354,7 +354,7 @@ const handleDelete = async (id: number) => { tableObject.loading = false message.success(t('common.delSuccess')) // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -419,7 +419,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts index 1c2b1683b..04436a526 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts @@ -367,6 +367,15 @@ export const PackageoverRequestMain = useCrudSchemas(reactive([ } }, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue index 22242c0af..47d56c66a 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue @@ -126,7 +126,13 @@ const buttonBaseClick = (val, item) => { if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts index b1f96b27c..425317c2c 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts @@ -15,6 +15,14 @@ export const PackageoverRetrospect = useCrudSchemas(reactive([ width: 180 }, }, + // { + // label: '申请单号', + // field: 'requestNumber', + // sort: 'custom', + // table: { + // width: 180 + // }, + // }, { label: '任务单据号', field: 'jobNumber', @@ -378,6 +386,15 @@ export const PackageoverRetrospect = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '最后更新者', diff --git a/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts b/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts index 3eb010c76..b853e5c9a 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts +++ b/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts @@ -195,7 +195,16 @@ export const PackagesplitMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue index f7ddbe650..676beaacc 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue @@ -199,15 +199,15 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainJobAba') { // 放弃 console.log('列表-操作按钮事件-放弃') await ScrapJobMainApi.abandonScrapJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 console.log('列表-操作按钮事件-关闭') await ScrapJobMainApi.closeScrapJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 console.log('列表-操作按钮事件-承接') await ScrapJobMainApi.acceptScrapJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 diff --git a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts index 7afec161a..8f3ef3edd 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts @@ -20,6 +20,15 @@ export const ScrapJobMain = useCrudSchemas( }, isSearch: true }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, { label: '状态', field: 'status', @@ -32,15 +41,6 @@ export const ScrapJobMain = useCrudSchemas( width: 150 } }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - table: { - width: 180 - }, - isSearch: true - }, { label: 'Q3通知单号', field: 'q3Number', @@ -503,7 +503,16 @@ export const ScrapJobMain = useCrudSchemas( valueFormat: 'x' } }, - isTable: false + isTable: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts index b2901d1a2..20a8009e4 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts @@ -261,7 +261,16 @@ export const ScrapRecordMain = useCrudSchemas( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x' } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index 814dab997..20177ff95 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -291,7 +291,7 @@ const handleClose = async (id: number) => { await ScrapRequestMainApi.closeScrapRequestMain(id) message.success(t('common.closeSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -303,7 +303,7 @@ const handleReAdd = async (id: number) => { await ScrapRequestMainApi.reAddScrapRequestMain(id) message.success(t('common.reAddSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -315,7 +315,7 @@ const handleSubmit = async (id: number) => { await ScrapRequestMainApi.submitScrapRequestMain(id) message.success(t('common.submitSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -327,7 +327,7 @@ const handleRefused = async (id: number) => { await ScrapRequestMainApi.refusedScrapRequestMain(id) message.success(t('common.refusedSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -339,7 +339,7 @@ const handleAgree = async (id: number) => { await ScrapRequestMainApi.agreeScrapRequestMain(id) message.success(t('common.agreeSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -351,7 +351,7 @@ const handleHandle = async (id: number) => { await ScrapRequestMainApi.handleScrapRequestMain(id) message.success(t('common.handleSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -383,7 +383,7 @@ const handleDelete = async (id: number) => { tableObject.loading = false message.success(t('common.delSuccess')) // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -461,7 +461,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts index 8225d5bca..8938c82a8 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts @@ -394,7 +394,16 @@ export const ScrapRequestMain = useCrudSchemas( } }, isTable: false, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue index 714ac4696..eb90f3cc6 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue @@ -199,15 +199,15 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainJobAba') { // 放弃 console.log('列表-操作按钮事件-放弃') await UnplannedissueJobMainApi.abandonUnplannedissueJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 console.log('列表-操作按钮事件-关闭') await UnplannedissueJobMainApi.closeUnplannedissueJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 console.log('列表-操作按钮事件-承接') await UnplannedissueJobMainApi.acceptUnplannedissueJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts index 26391492a..c4b8f6f2d 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts @@ -389,6 +389,15 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ } }, isTable:false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts index e79185505..79008aa80 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts @@ -470,6 +470,16 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ } }, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, + }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/transferissueJobMain.data.ts b/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/transferissueJobMain.data.ts index b20c7da71..c0eea73f2 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/transferissueJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/transferissueJobMain.data.ts @@ -513,6 +513,15 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts b/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts index ac8bba927..386c0bc16 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts @@ -277,6 +277,15 @@ export const TransferissueRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts index 94a4791be..ab17ffa86 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts @@ -503,6 +503,15 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ }, isTable:false, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts index 2b43fe237..61664b19e 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts @@ -513,6 +513,15 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts index 466eb63dd..449334325 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts @@ -285,6 +285,15 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts index 00b624e74..246d16e93 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts @@ -337,6 +337,15 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( } }, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue index 19d7c0bb8..e53943ae3 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue @@ -199,15 +199,15 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainJobAba') { // 放弃 console.log('列表-操作按钮事件-放弃') await UnplannedissueJobMainApi.abandonUnplannedissueJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 console.log('列表-操作按钮事件-关闭') await UnplannedissueJobMainApi.closeUnplannedissueJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 console.log('列表-操作按钮事件-承接') await UnplannedissueJobMainApi.acceptUnplannedissueJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts index 689b8a90a..5482ed0b7 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts @@ -25,6 +25,15 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ }, isSearch: true, }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, { label: '状态', field: 'status', @@ -55,15 +64,7 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - }, + { label: '申请时间', field: 'requestTime', @@ -368,12 +369,12 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ }, { label: '备注', - field: 'remark', + field: 'remarkMain', sort: 'custom', isTable:false, table: { width: 150 - }, + } }, { label: '自动完成', @@ -645,6 +646,15 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts index a24d5b002..52f8636d2 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts @@ -375,11 +375,12 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ }, { label: '备注', - field: 'remark', + field: 'remarkMain', sort: 'custom', table: { width: 150 }, + isTable: false, }, { label: '创建时间', @@ -400,6 +401,15 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', @@ -736,8 +746,7 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( table: { width: 150 }, - isTable:false, - hiddenInMain:true, + isTable: true, }, // { // label: '任务明细ID', diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index aa62f4d82..31581700c 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -291,40 +291,56 @@ const buttonTableClick = async (val, row) => { const handleHandle = async (id: number) => { await message.confirm(t('common.confirmHandle')) tableObject.loading = true - await UnplannedissueRequestMainApi.handleUnplannedissueRequestMain(id) - message.success(t('common.handleSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedissueRequestMainApi.handleUnplannedissueRequestMain(id) + message.success(t('common.handleSuccess')) + tableObject.loading = false + buttonBaseClick('refresh',null) + }catch{ + tableObject.loading = false + } } /** 审批通过按钮操作 */ const handleAgree = async (id: number) => { await message.confirm(t('common.confirmAgree')) tableObject.loading = true - await UnplannedissueRequestMainApi.agreeUnplannedissueRequestMain(id) - message.success(t('common.agreeSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedissueRequestMainApi.agreeUnplannedissueRequestMain(id) + message.success(t('common.agreeSuccess')) + tableObject.loading = false + buttonBaseClick('refresh',null) + }catch{ + tableObject.loading = false + } } /** 审批驳回按钮操作 */ const handleRefused = async (id: number) => { await message.confirm(t('common.confirmRefused')) tableObject.loading = true - await UnplannedissueRequestMainApi.refusedUnplannedissueRequestMain(id) - message.success(t('common.refusedSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedissueRequestMainApi.refusedUnplannedissueRequestMain(id) + message.success(t('common.refusedSuccess')) + tableObject.loading = false + buttonBaseClick('refresh',null) + }catch{ + tableObject.loading = false + } } /** 提交按钮操作 */ const handleSubmit = async (id: number) => { await message.confirm(t('common.confirmSubmit')) tableObject.loading = true - await UnplannedissueRequestMainApi.submitUnplannedissueRequestMain(id) - message.success(t('common.submitSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedissueRequestMainApi.submitUnplannedissueRequestMain(id) + message.success(t('common.submitSuccess')) + tableObject.loading = false + buttonBaseClick('refresh',null) + }catch{ + tableObject.loading = false + } } @@ -332,20 +348,28 @@ const handleSubmit = async (id: number) => { const handleClose = async (id: number) => { await message.confirm(t('common.confirmColse')) tableObject.loading = true - await UnplannedissueRequestMainApi.closeUnplannedissueRequestMain(id) - message.success(t('common.closeSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedissueRequestMainApi.closeUnplannedissueRequestMain(id) + message.success(t('common.closeSuccess')) + tableObject.loading = false + buttonBaseClick('refresh',null) + }catch{ + tableObject.loading = false + } } /** 重新添加按钮操作 */ const handleReAdd = async (id: number) => { await message.confirm(t('common.confirmReAdd')) tableObject.loading = true - await UnplannedissueRequestMainApi.reAddUnplannedissueRequestMain(id) - message.success(t('common.reAddSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedissueRequestMainApi.reAddUnplannedissueRequestMain(id) + message.success(t('common.reAddSuccess')) + tableObject.loading = false + buttonBaseClick('refresh',null) + }catch{ + tableObject.loading = false + } } /** 添加/修改操作 */ @@ -401,7 +425,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -481,7 +505,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index ba2f86dbd..225dec49e 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -497,13 +497,13 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ }, { label: '备注', - field: 'remark', + field: 'remarkMain', sort: 'custom', table: { width: 150 }, + isTable: false, sortTableDefault: 1000, - isTable: true, }, { label: '直接生成记录', @@ -547,6 +547,15 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ }, isTable:false, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', @@ -996,14 +1005,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive isTableForm: false, isTable:false, }, - // { - // label: '备注', - // field: 'remark', - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '创建时间', field: 'createTime', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue index 173434adf..34ba89d23 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue @@ -199,15 +199,15 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainJobAba') { // 放弃 console.log('列表-操作按钮事件-放弃') await UnplannedreceiptJobMainApi.abandonUnplannedreceiptJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 console.log('列表-操作按钮事件-关闭') await UnplannedreceiptJobMainApi.closeUnplannedreceiptJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 console.log('列表-操作按钮事件-承接') await UnplannedreceiptJobMainApi.acceptUnplannedreceiptJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts index 5d1ea6aef..d6f590e93 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts @@ -27,6 +27,15 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ }, isSearch: true, }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + }, { label: '状态', field: 'status', @@ -39,15 +48,6 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - table: { - width: 180 - }, - isSearch: true, - }, { label: '申请时间', field: 'requestTime', @@ -350,14 +350,15 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ // width: 150 // }, // }, - // { - // label: '备注', - // field: 'remark', - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, + { + label: '备注', + field: 'remarkMain', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, { label: '自动完成', field: 'autoComplete', @@ -643,6 +644,15 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts index a9f5d795b..32c7b00bf 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts @@ -350,12 +350,12 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( }, { label: '备注', - field: 'remark', + field: 'remarkMain', isTable:false, sort: 'custom', table: { width: 150 - }, + } }, { label: '创建时间', @@ -377,6 +377,15 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index a77e37b73..596f9eaa7 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -513,7 +513,7 @@ const handleClose = async (id: number) => { await UnplannedreceiptRequestMainApi.closeUnplannedreceiptRequestMain(id) message.success(t('common.closeSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{ tableObject.loading = false } @@ -527,7 +527,7 @@ const handleReAdd = async (id: number) => { await UnplannedreceiptRequestMainApi.reAddUnplannedreceiptRequestMain(id) message.success(t('common.reAddSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{ tableObject.loading = false } @@ -541,7 +541,7 @@ const handleSubmit = async (id: number) => { await UnplannedreceiptRequestMainApi.submitUnplannedreceiptRequestMain(id) message.success(t('common.submitSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{ tableObject.loading = false } @@ -555,7 +555,7 @@ const handleRefused = async (id: number) => { await UnplannedreceiptRequestMainApi.refusedUnplannedreceiptRequestMain(id) message.success(t('common.refusedSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{ tableObject.loading = false } @@ -569,7 +569,7 @@ const handleAgree = async (id: number) => { await UnplannedreceiptRequestMainApi.agreeUnplannedreceiptRequestMain(id) message.success(t('common.agreeSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{ tableObject.loading = false } @@ -582,7 +582,7 @@ const handleHandle = async (id: number) => { try { await UnplannedreceiptRequestMainApi.handleUnplannedreceiptRequestMain(id) message.success(t('common.handleSuccess')) - await getList() + buttonBaseClick('refresh',null) } finally { tableObject.loading = false } @@ -654,7 +654,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -741,7 +741,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 4b2310c5d..cd7947c15 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -539,11 +539,12 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive }, { label: '备注', - field: 'remark', + field: 'remarkMain', sort: 'custom', table: { width: 150 }, + isTable:false, sortTableDefault: 1000, }, { @@ -567,7 +568,16 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', @@ -1237,7 +1247,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive { }] } await IssueJobMainApi.executeIssueMain(aaa) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAba') { // 放弃 await IssueJobMainApi.abandonIssueMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await IssueJobMainApi.closeIssueMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await IssueJobMainApi.acceptIssueMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 @@ -300,7 +301,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await IssueJobMainApi.exportIssueJobMain(tableObject.params) - download.excel(data, '发料任务主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts b/src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts index 5f14338ab..4ca560e46 100644 --- a/src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts +++ b/src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts @@ -24,7 +24,7 @@ export const IssueJobMain = useCrudSchemas( table: { width: 180 }, - isTable: false + sortTableDefault: 1 }, { label: '供应商代码', @@ -331,7 +331,7 @@ export const IssueJobMain = useCrudSchemas( table: { width: 180 }, - isTable: false, + isTable: true, form: { component: 'DatePicker', componentProps: { @@ -339,7 +339,16 @@ export const IssueJobMain = useCrudSchemas( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x' } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', @@ -774,6 +783,26 @@ export const IssueJobDetail = useCrudSchemas( }, isSearch: true }, + { + label: '从库区', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + isTable: true + }, + { + label: '到库区', + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + isTable: true + }, { label: '单据号', field: 'number', diff --git a/src/views/wms/issueManage/issue/issueRecordMain/index.vue b/src/views/wms/issueManage/issue/issueRecordMain/index.vue index 61c8326cd..1d33dadca 100644 --- a/src/views/wms/issueManage/issue/issueRecordMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRecordMain/index.vue @@ -68,6 +68,7 @@ import * as IssueRecordMainApi from '@/api/wms/issueRecordMain' import * as IssueRecordDetailApi from '@/api/wms/issueRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { formatDate } from '@/utils/formatTime' // 发料记录主 defineOptions({ name: 'IssueRecordMain' }) @@ -156,7 +157,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await IssueRecordMainApi.exportIssueRecordMain(tableObject.params) - download.excel(data, '发料记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts b/src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts index f10bde9f7..718af8ea1 100644 --- a/src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts @@ -18,34 +18,34 @@ export const IssueRecordMain = useCrudSchemas( isSearch: true }, { - label: '状态', - field: 'status', - dictType: DICT_TYPE.JOB_STATUS, - dictClass: 'string', - isTable: false, + label: '申请单号', + field: 'requestNumber', sort: 'custom', table: { - width: 150 + width: 180 }, sortTableDefault: 1 }, { - label: '申请单号', - field: 'requestNumber', + label: '任务单号', + field: 'jobNumber', sort: 'custom', table: { width: 180 }, - isTable: false + sortTableDefault: 1 }, { - label: '任务单号', - field: 'jobNumber', + label: '状态', + field: 'status', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', + isTable: false, sort: 'custom', table: { - width: 180 + width: 150 }, - isTable: false + sortTableDefault: 1 }, { label: '供应商代码', @@ -683,7 +683,16 @@ export const IssueRecordDetail = useCrudSchemas( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x' } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '到库位组代码', diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index 43b0edb6f..cc0172aea 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -103,6 +103,7 @@ import * as IssueRequestMainApi from '@/api/wms/issueRequestMain' import * as IssueRequestDetailApi from '@/api/wms/issueRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as WorkstationApi from '@/api/wms/workstation' +import { formatDate } from '@/utils/formatTime' // 发料申请 defineOptions({ name: 'IssueRequestMain' }) @@ -317,7 +318,7 @@ const buttonTableClick = async (val, row) => { IssueRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -328,7 +329,7 @@ const buttonTableClick = async (val, row) => { IssueRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -339,7 +340,7 @@ const buttonTableClick = async (val, row) => { IssueRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -350,7 +351,7 @@ const buttonTableClick = async (val, row) => { IssueRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -361,7 +362,7 @@ const buttonTableClick = async (val, row) => { IssueRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -372,7 +373,7 @@ const buttonTableClick = async (val, row) => { IssueRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -430,7 +431,7 @@ const handleDelete = async (id: number) => { tableObject.loading = false message.success(t('common.delSuccess')) // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -443,7 +444,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await IssueRequestMainApi.exportIssueRequestMain(tableObject.params) - download.excel(data, '发料申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -519,7 +520,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } @@ -541,7 +546,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '发料申请主导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts index 247798559..1904b7842 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts @@ -577,7 +577,16 @@ export const IssueRequestMain = useCrudSchemas( valueFormat: 'x' } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue index b4f8a8d89..6a4851095 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue @@ -67,6 +67,7 @@ import * as OnlinesettlementRecordMainApi from '@/api/wms/onlinesettlementRecord import * as OnlinesettlementRecordDetailApi from '@/api/wms/onlinesettlementRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { formatDate } from '@/utils/formatTime' // 上线结算记录主 defineOptions({ name: 'OnlinesettlementRecordMain' }) @@ -151,7 +152,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await OnlinesettlementRecordMainApi.exportOnlinesettlementRecordMain(tableObject.params) - download.excel(data, '上线结算记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/onlinesettlementRecordMain.data.ts b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/onlinesettlementRecordMain.data.ts index e661b8317..80e614380 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/onlinesettlementRecordMain.data.ts +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/onlinesettlementRecordMain.data.ts @@ -200,6 +200,15 @@ export const OnlinesettlementRecordMain = useCrudSchemas(reactive( valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '是否可用', diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue index ff16d1679..3ed7419cb 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue @@ -86,6 +86,7 @@ import * as OnlinesettlementRequestMainApi from '@/api/wms/onlinesettlementReque import * as OnlinesettlementRequestDetailApi from '@/api/wms/onlinesettlementRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as SupplieritemApi from '@/api/wms/supplieritem' +import { formatDate } from '@/utils/formatTime' // 上线结算申请 defineOptions({ name: 'OnlinesettlementRequestMain' }) @@ -267,7 +268,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await OnlinesettlementRequestMainApi.exportOnlinesettlementRequestMain(tableObject.params) - download.excel(data, '上线结算申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -325,7 +326,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '上线结算申请主导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue index 8ea4298e2..cbe5bb6f4 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue @@ -88,6 +88,7 @@ import * as PreparetoissueMainApi from '@/api/wms/preparetoissueMain' import * as PreparetoissueDetailApi from '@/api/wms/preparetoissueDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as ProductionlineitemApi from '@/api/wms/productionlineitem' +import { formatDate } from '@/utils/formatTime' // 备料计划 defineOptions({ name: 'PreparetoissueMain' }) @@ -458,7 +459,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PreparetoissueMainApi.exportPreparetoissueMain(tableObject.params) - download.excel(data, '备料计划主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -532,7 +533,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '备料计划主导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts index a709b6926..a060bade1 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts @@ -423,6 +423,15 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ } }, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue b/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue index 611dd428c..c215034cd 100644 --- a/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue +++ b/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue @@ -73,6 +73,7 @@ import * as ProductionreceiptJobMainApi from '@/api/wms/productionreceiptJobMain import * as ProductionreceiptJobDetailApi from '@/api/wms/productionreceiptJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { formatDate } from '@/utils/formatTime' // 生产收料任务主 defineOptions({ name: 'ProductionreceiptJobMain' }) @@ -272,13 +273,13 @@ const buttonTableClick = async (val, row) => { ProductionreceiptJobMainApi.executeIssueMain(aaa) } else if (val == 'mainJobAba') { // 放弃 await ProductionreceiptJobMainApi.abandonIssueMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await ProductionreceiptJobMainApi.closeIssueMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await ProductionreceiptJobMainApi.acceptIssueMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 @@ -300,7 +301,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductionreceiptJobMainApi.exportProductionreceiptJobMain(tableObject.params) - download.excel(data, '生产收料任务.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/productionreceiptJobMain.data.ts b/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/productionreceiptJobMain.data.ts index ca98bc89e..4eaf12322 100644 --- a/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/productionreceiptJobMain.data.ts +++ b/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/productionreceiptJobMain.data.ts @@ -23,7 +23,7 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, + sortTableDefault: 2, }, { label: '车间代码', @@ -315,6 +315,15 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue b/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue index 23ce2913b..7a21ef6bb 100644 --- a/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue +++ b/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue @@ -68,6 +68,7 @@ import * as ProductionreceiptRecordMainApi from '@/api/wms/productionreceiptReco import * as ProductionreceiptRecordDetailApi from '@/api/wms/productionreceiptRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { formatDate } from '@/utils/formatTime' // 生产收料记录主 defineOptions({ name: 'ProductionreceiptRecordMain' }) @@ -156,7 +157,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductionreceiptRecordMainApi.exportProductionreceiptRecordMain(tableObject.params) - download.excel(data, '生产收料记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/productionreceiptRecordMain.data.ts b/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/productionreceiptRecordMain.data.ts index 2ff6a2c2f..15e2231be 100644 --- a/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/productionreceiptRecordMain.data.ts +++ b/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/productionreceiptRecordMain.data.ts @@ -17,16 +17,13 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive isSearch: true }, { - label: '状态', - field: 'status', - dictType: DICT_TYPE.JOB_STATUS, - dictClass: 'string', - isTable: false, + label: '生产收料任务单号', + field: 'jobNumber', sort: 'custom', table: { - width: 150 + width: 180 }, - sortTableDefault:1, + sortTableDefault: 1, }, { label: '发料记录单号', @@ -35,7 +32,19 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive table: { width: 180 }, + sortTableDefault: 1 + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', isTable: false, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:1, }, { label: '任务单号', @@ -216,6 +225,15 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue index 2d64cb732..76b2ea5a7 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue @@ -73,6 +73,7 @@ import * as ProductionreturnJobMainApi from '@/api/wms/productionreturnJobMain' import * as ProductionreturnJobDetailApi from '@/api/wms/productionreturnJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { formatDate } from '@/utils/formatTime' // 生产退料任务主 defineOptions({ name: 'ProductionreturnJobMain' }) @@ -244,13 +245,13 @@ const buttonTableClick = async (val, row) => { ProductionreturnJobMainApi.executeProductionreturnMain(aaa) } else if (val == 'mainJobAba') { // 放弃 await ProductionreturnJobMainApi.abandonProductionreturnMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await ProductionreturnJobMainApi.closeProductionreturnMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await ProductionreturnJobMainApi.acceptProductionreturnMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 @@ -272,7 +273,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductionreturnJobMainApi.exportProductionreturnJobMain(tableObject.params) - download.excel(data, '生产退料任务.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/productionreturnJobMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/productionreturnJobMain.data.ts index f83b7e195..3cc29ed56 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/productionreturnJobMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/productionreturnJobMain.data.ts @@ -15,6 +15,15 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ }, isSearch: true, }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + }, { label: '状态', field: 'status', @@ -35,16 +44,6 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - table: { - width: 180 - }, - isSearch: true, - isTable: false, - }, { label: '从仓库代码', field: 'fromWarehouseCode', @@ -317,6 +316,15 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue index ae8aebbeb..17197ae23 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue @@ -68,7 +68,8 @@ import * as ProductionreturnRecordMainApi from '@/api/wms/productionreturnRecord import * as ProductionreturnRecordDetailApi from '@/api/wms/productionreturnRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' -// 生产退料记录主 +import { formatDate } from '@/utils/formatTime' +// 生产退料记录主 and 隔离退料记录 defineOptions({ name: 'ProductionreturnRecordMain' }) const message = useMessage() // 消息弹窗 @@ -77,6 +78,7 @@ const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name + const tableColumns = ref([...ProductionreturnRecordMain.allSchemas.tableColumns,...ProductionreturnRecordDetail.allSchemas.tableMainColumns]) // 字段设置 更新主列表字段 @@ -85,7 +87,7 @@ const updataTableColumns = (val) => { } const { tableObject, tableMethods } = useTable({ - getListApi: ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPage // 分页接口 + getListApi: 'ProductionreturnRecordMain'==routeName.value?ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPageStore:ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPageHold // 分页接口 }) // 获得表格的各种操作 @@ -156,7 +158,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductionreturnRecordMainApi.exportProductionreturnRecordMain(tableObject.params) - download.excel(data, '生产退料记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/productionreturnRecordMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/productionreturnRecordMain.data.ts index 3092425ed..9ccd2f3ac 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/productionreturnRecordMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/productionreturnRecordMain.data.ts @@ -15,26 +15,6 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( }, isSearch: true }, - // { - // label: '状态', - // field: 'status', - // dictType: DICT_TYPE.REQUEST_STATUS, - // dictClass: 'string', - // isForm: false, - // isTable: true, - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, - { - label: '车间代码', - field: 'workshopCode', - sort: 'custom', - table: { - width: 150 - }, - }, { label: '申请单号', field: 'requestNumber', @@ -42,7 +22,6 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( table: { width: 180 }, - isTable: false, isSearch: true }, @@ -53,10 +32,30 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( table: { width: 180 }, - isTable: false, isSearch: true }, + // { + // label: '状态', + // field: 'status', + // dictType: DICT_TYPE.REQUEST_STATUS, + // dictClass: 'string', + // isForm: false, + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { label: '出库事务类型', field: 'outTransactionType', @@ -227,6 +226,15 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新时间', diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 62d1cd711..bcc489c2e 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -110,6 +110,7 @@ import * as ItembasicApi from '@/api/wms/itembasic' import * as PackageApi from '@/api/wms/package' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' +import { formatDate } from '@/utils/formatTime' // 生产退料申请 defineOptions({ name: 'ProductionreturnRequestMain' }) @@ -363,7 +364,7 @@ const buttonTableClick = async (val, row) => { ProductionreturnRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -374,7 +375,7 @@ const buttonTableClick = async (val, row) => { ProductionreturnRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -385,7 +386,7 @@ const buttonTableClick = async (val, row) => { ProductionreturnRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -396,7 +397,7 @@ const buttonTableClick = async (val, row) => { ProductionreturnRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -407,7 +408,7 @@ const buttonTableClick = async (val, row) => { ProductionreturnRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -500,7 +501,7 @@ const buttonTableClick = async (val, row) => { ProductionreturnRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -594,7 +595,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -607,7 +608,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductionreturnRequestMainApi.exportProductionreturnRequestMain(tableObject.params) - download.excel(data, '生产退料合格申请.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -677,7 +678,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } @@ -765,7 +770,7 @@ const labelPrint = async (row) => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '生产退料导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 0c9f20e76..97ccff14f 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -233,7 +233,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive field: 'toAreaTypes', dictType: DICT_TYPE.AREA_TYPE, dictClass: 'string', - isSearch: true, + isSearch: false, isTable: false, sort: 'custom', table: { @@ -430,7 +430,16 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', @@ -655,7 +664,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive { ProductionreturnRequestMainNoApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -355,7 +356,7 @@ const buttonTableClick = async (val, row) => { ProductionreturnRequestMainNoApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -366,7 +367,7 @@ const buttonTableClick = async (val, row) => { ProductionreturnRequestMainNoApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -377,7 +378,7 @@ const buttonTableClick = async (val, row) => { ProductionreturnRequestMainNoApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -388,7 +389,7 @@ const buttonTableClick = async (val, row) => { ProductionreturnRequestMainNoApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -465,23 +466,23 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainHandle') { // 处理 // 判断 是否已创建标签 - let isCreateLabel = false - await PackageApi.getPackagePage({ - requestNumber: row.number - }).then(res => { - if (res) { - if (res.list.length > 0) isCreateLabel = true - } - }) - if (!isCreateLabel) { - message.warning('请先创建标签') - return - } + // let isCreateLabel = false + // await PackageApi.getPackagePage({ + // requestNumber: row.number + // }).then(res => { + // if (res) { + // if (res.list.length > 0) isCreateLabel = true + // } + // }) + // if (!isCreateLabel) { + // message.warning('请先创建标签') + // return + // } tableObject.loading = true ProductionreturnRequestMainNoApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -538,7 +539,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -551,7 +552,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductionreturnRequestMainNoApi.exportProductionreturnRequestMain(tableObject.params) - download.excel(data, '生产退料不合格申请.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -607,7 +608,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } @@ -753,7 +758,7 @@ const importFormRef = ref() // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '隔离退料导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts index 753a35d25..40ace6f98 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts @@ -514,17 +514,27 @@ export const ProductionreturnRequestDetail = useCrudSchemas( }, isTableForm: false, isForm: false, - isTable: true + isTable: true, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '包装规格', field: 'packUnit', sort: 'custom', - isSearch: true, + isSearch: false, table: { width: 120 }, - isTable: false, + isTable:false, + isTableForm:true, tableForm: { isInpuFocusShow: true, isSearchList: true, // 开启查询弹窗 @@ -580,6 +590,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas( width: 120 }, isTable: false, + isTableForm: true, tableForm: { disabled: true }, diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue index 9b20b5985..a86d7465d 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue +++ b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue @@ -68,6 +68,7 @@ import * as ProductionscrapRecordMainApi from '@/api/wms/productionscrapRecordMa import * as ProductionscrapRecordDetailApi from '@/api/wms/productionscrapRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { formatDate } from '@/utils/formatTime' // 生产退料记录主 defineOptions({ name: 'ProductionscrapRecordMain' }) @@ -156,7 +157,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductionscrapRecordMainApi.exportProductionscrapRecordMain(tableObject.params) - download.excel(data, '线边报废记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts index e95a4ca67..3e5b910f5 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts +++ b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts @@ -673,6 +673,15 @@ export const ProductionscrapRecordDetail = useCrudSchemas(reactive valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '接口类型', diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue index 3f8cae170..706cfc44d 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue +++ b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue @@ -110,6 +110,7 @@ import * as ItembasicApi from '@/api/wms/itembasic' import * as PackageApi from '@/api/wms/package' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' +import { formatDate } from '@/utils/formatTime' // 线标原料报废申请 defineOptions({ name: 'ProductionscrapRequestMain' }) @@ -363,7 +364,7 @@ const buttonTableClick = async (val, row) => { ProductionscrapRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -374,7 +375,7 @@ const buttonTableClick = async (val, row) => { ProductionscrapRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -385,7 +386,7 @@ const buttonTableClick = async (val, row) => { ProductionscrapRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -396,7 +397,7 @@ const buttonTableClick = async (val, row) => { ProductionscrapRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -407,7 +408,7 @@ const buttonTableClick = async (val, row) => { ProductionscrapRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -500,7 +501,7 @@ const buttonTableClick = async (val, row) => { ProductionscrapRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -594,7 +595,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -607,7 +608,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductionscrapRequestMainApi.exportProductionscrapRequestMain(tableObject.params) - download.excel(data, '线边原料报废申请.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -676,7 +677,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } @@ -764,7 +769,7 @@ const labelPrint = async (row) => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '线边原料报废导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts index 5acd62749..c86473107 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts +++ b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts @@ -488,7 +488,16 @@ export const ProductionscrapRequestMain = useCrudSchemas( } }, isTable: false, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue index d780368bc..b2ced7cb5 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue @@ -73,6 +73,7 @@ import { RepleinshJobMain,RepleinshJobMainRules,RepleinshJobDetail,RepleinshJobD import * as RepleinshJobMainApi from '@/api/wms/repleinshJobMain' import * as RepleinshJobDetailApi from '@/api/wms/repleinshJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import { formatDate } from '@/utils/formatTime' // 补料任务主 defineOptions({ name: 'RepleinshJobMain' }) @@ -303,13 +304,13 @@ const buttonTableClick = async (val, row) => { RepleinshJobMainApi.executeRepleinshMain(aaa) } else if (val == 'mainJobAba') { // 放弃 await RepleinshJobMainApi.abandonRepleinshMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await RepleinshJobMainApi.closeRepleinshMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await RepleinshJobMainApi.acceptRepleinshMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } @@ -328,7 +329,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await RepleinshJobMainApi.exportRepleinshJobMain(tableObject.params) - download.excel(data, '补料任务.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts b/src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts index 2506e3e2d..6051b154e 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts +++ b/src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts @@ -23,7 +23,7 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, + sortTableDefault: 1, }, { label: '供应商代码', @@ -555,6 +555,15 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新者', diff --git a/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue index 5f1e898c8..3cd277407 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue @@ -67,6 +67,7 @@ import { RepleinshRecordMain,RepleinshRecordMainRules,RepleinshRecordDetail,Repl import * as RepleinshRecordMainApi from '@/api/wms/repleinshRecordMain' import * as RepleinshRecordDetailApi from '@/api/wms/repleinshRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import { formatDate } from '@/utils/formatTime' // 补料记录主 defineOptions({ name: 'RepleinshRecordMain' }) @@ -153,7 +154,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await RepleinshRecordMainApi.exportRepleinshRecordMain(tableObject.params) - download.excel(data, '补料记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts b/src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts index 5cee216f1..250073f0d 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts +++ b/src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts @@ -35,7 +35,7 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, + sortTableDefault:1, }, { label: '任务单号', @@ -44,7 +44,7 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, + sortTableDefault: 2, }, // { // label: '供应商代码', @@ -226,6 +226,15 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新时间', diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue index 578d0b2ed..f1429b571 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue @@ -87,6 +87,7 @@ import { RepleinshRequestMain,RepleinshRequestMainRules,RepleinshRequestDetail,R import * as RepleinshRequestMainApi from '@/api/wms/repleinshRequestMain' import * as RepleinshRequestDetailApi from '@/api/wms/repleinshRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import { formatDate } from '@/utils/formatTime' // 补料申请 defineOptions({ name: 'RepleinshRequestMain' }) @@ -236,7 +237,7 @@ const buttonTableClick = async (val, row) => { RepleinshRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -247,7 +248,7 @@ const buttonTableClick = async (val, row) => { RepleinshRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -258,7 +259,7 @@ const buttonTableClick = async (val, row) => { RepleinshRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -269,7 +270,7 @@ const buttonTableClick = async (val, row) => { RepleinshRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -280,7 +281,7 @@ const buttonTableClick = async (val, row) => { RepleinshRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -291,7 +292,7 @@ const buttonTableClick = async (val, row) => { RepleinshRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -331,7 +332,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -344,7 +345,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(tableObject.params) - download.excel(data, '补料申请.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -404,7 +405,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } @@ -419,7 +424,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '补料申请导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts index 277c38782..e6a3daef5 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts @@ -403,6 +403,15 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ } }, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/inventorychangeRecordMain.data.ts b/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/inventorychangeRecordMain.data.ts index 6674ef44d..bb57a9d99 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/inventorychangeRecordMain.data.ts +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/inventorychangeRecordMain.data.ts @@ -183,7 +183,16 @@ export const InventorychangeRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isTable: false + isTable: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index 1f1d10ecc..7ad146b27 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue @@ -298,7 +298,7 @@ const buttonTableClick = async (val, row) => { InventorychangeRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -309,7 +309,7 @@ const buttonTableClick = async (val, row) => { InventorychangeRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -320,7 +320,7 @@ const buttonTableClick = async (val, row) => { InventorychangeRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -331,7 +331,7 @@ const buttonTableClick = async (val, row) => { InventorychangeRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -342,7 +342,7 @@ const buttonTableClick = async (val, row) => { InventorychangeRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -353,7 +353,7 @@ const buttonTableClick = async (val, row) => { InventorychangeRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -393,7 +393,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -508,7 +508,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts index 16f285994..84ef721ef 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts @@ -273,6 +273,15 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( }, isForm: false, isTable: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue index 582b7104b..496dd016e 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue @@ -272,13 +272,13 @@ const buttonTableClick = async (val, row) => { InventorymoveJobMainApi.executeInventorymoveMain(row.masterId) } else if (val == 'mainJobAba') { // 放弃 await InventorymoveJobMainApi.abandonInventorymoveMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await InventorymoveJobMainApi.closeInventorymoveMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await InventorymoveJobMainApi.acceptInventorymoveMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts index 1a9a2419c..6f0905ed8 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts @@ -16,20 +16,20 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ isSearch: true, }, { - label: '状态', - field: 'status', - dictType: DICT_TYPE.JOB_STATUS, - dictClass: 'string', - isSearch: true, - isTable: true, + label: '申请单号', + field: 'requestNumber', sort: 'custom', table: { width: 150 }, }, { - label: '申请单号', - field: 'requestNumber', + label: '状态', + field: 'status', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, sort: 'custom', table: { width: 150 @@ -503,6 +503,15 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue index aebbaa0dc..4fed4c42e 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue @@ -103,7 +103,8 @@ const { tableObject, tableMethods } = useTable({ if ( routeName.value == 'OktoholdRecordMain') { tableObject.params = { fromInventoryStatus: 'OK', - toInventoryStatus:'HOLD' + toInventoryStatus: 'HOLD', + businessType:'OkToHold' } fromInventoryStatus.value = 'OK' toInventoryStatus.value = "HOLD" @@ -111,7 +112,8 @@ const { tableObject, tableMethods } = useTable({ } else if ( routeName.value == 'NoktoholdRecordMain') { tableObject.params = { fromInventoryStatus: 'NOK', - toInventoryStatus:'HOLD' + toInventoryStatus:'HOLD', + businessType:'Move' } fromInventoryStatus.value = 'NOK' toInventoryStatus.value = "HOLD" @@ -119,7 +121,8 @@ const { tableObject, tableMethods } = useTable({ }else if ( routeName.value == 'HoldtookRecordMain') { tableObject.params = { fromInventoryStatus: 'HOLD', - toInventoryStatus:'OK' + toInventoryStatus:'OK', + businessType:'NokToHold' } fromInventoryStatus.value = 'HOLD' toInventoryStatus.value = "OK" diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/inventorymoveRecordMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/inventorymoveRecordMain.data.ts index 9611e7f26..6c3323a0a 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/inventorymoveRecordMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/inventorymoveRecordMain.data.ts @@ -267,6 +267,15 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue new file mode 100644 index 000000000..35b55234f --- /dev/null +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue @@ -0,0 +1,455 @@ + + + +./inventorymoveRecordRequestMain.data \ No newline at end of file diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordMainNew.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordMainNew.data.ts new file mode 100644 index 000000000..aba057022 --- /dev/null +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordMainNew.data.ts @@ -0,0 +1,775 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' + +/** + * @returns {Array} 库存转移记录主表 + */ +export const InventorymoveRecordMainNew = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true + }, + // { + // label: '申请单号', + // field: 'requestNumber', + // sort: 'custom', + // table: { + // width: 180 + // }, + // isSearch: true + // }, + // { + // label: '任务单号', + // field: 'jobNumber', + // sort: 'custom', + // table: { + // width: 180 + // }, + // isSearch: true + // }, + // { + // label: '使用在途库', + // field: 'useOnTheWayLocation', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + // { + // label: '申请时间', + // field: 'requestTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, + // { + // label: '截止时间', + // field: 'dueTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, + // { + // label: '执行时间', + // field: 'executeTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, + // { + // label: '生效日期', + // field: 'activeDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // }, + // { + // label: '发货单号', + // field: 'asnNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isForm: false, + // }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:22 + + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:23 + }, + // { + // label: '从库区类型范围', + // field: 'fromAreaTypes', + // dictType: DICT_TYPE.AREA_TYPE, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '到库区类型范围', + // field: 'toAreaTypes', + // dictType: DICT_TYPE.AREA_TYPE, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '从库区代码范围', + // field: 'fromAreaCodes', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '到库区代码范围', + // field: 'toAreaCodes', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:24 + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:25 + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:36 + }, + + // { + // label: '部门', + // field: 'departmentCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '接口类型', + // field: 'interfaceType', + // dictType: DICT_TYPE.INTERFACE_TYPE, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + sortTableDefault:34 + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:35 + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + { + label: '最后更新者', + field: 'updater', + isDetail: true, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '是否可用', + // field: 'available', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isSearch: true, + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 120, + fixed: 'right' + }, + } +])) + +//表单校验 +export const InventorymoveRecordMainNewRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toAreaTypes: [ + { required: true, message: '请选择到库区类型范围', trigger: 'change' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'change' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请输入是否可用', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 库存转移记录子表 + */ +export const InventorymoveRecordDetailNew = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:10, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:27 + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:28 + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:29 + }, + // { + // label: '在途库库位', + // field: 'onTheWayLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '从批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:18 + }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:19 + }, + { + label: '从包装号', + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:11 + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:12 + }, + // { + // label: '从器具号', + // field: 'fromContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '到器具号', + // field: 'toContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + sortTableDefault:17 + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:30 + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13 + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:14 + }, + { + label: '从库存状态', + field: 'fromInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:15 + }, + { + label: '到库存状态', + field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:16 + }, + { + label: '从库位组代码', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:31 + }, + { + label: '到库位组代码', + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:32 + }, + { + label: '从库区代码', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:20 + }, + { + label: '到库区代码', + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:21 + }, + // { + // label: '项目代码', + // field: 'projectCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '从货主代码', + // field: 'fromOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '到货主代码', + // field: 'toOwnerCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '接口类型', + // field: 'interfaceType', + // dictType: DICT_TYPE.INTERFACE_TYPE, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '创建时间', + // field: 'createTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, + // { + // label: '创建者', + // field: 'creator', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, +])) + +//表单校验 +export const InventorymoveRecordDetailNewRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + fromInventoryStatus: [ + { required: true, message: '请选择从库存状态', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + toInventoryStatus: [ + { required: true, message: '请选择到库存状态', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts new file mode 100644 index 000000000..b35bd6e88 --- /dev/null +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts @@ -0,0 +1,458 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' +import * as ItempackagingApi from '@/api/wms/itempackage' +import { Itempackaging } from '@//views/wms/basicDataManage/itemManage/itempackage/itempackage.data' + +import * as WarehouseApi from '@/api/wms/warehouse' +import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data' + +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'MoveRequest' +} + 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] + +/** + * @returns {Array} 库存转移申请主表 + */ +export const InventorymoveRequestMain = useCrudSchemas(reactive([ + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择从库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [ + { + key: 'businessType', + value: 'Move', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], + isRepeat:true, + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择从库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [ + { + key: 'businessType', + value: 'Move', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [ + { + key: 'businessType', + value: 'Move', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], + isRepeat:true, + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [ + { + key: 'businessType', + value: 'Move', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, + { + label: '到库存状态', + field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: false, + type: 'Select' + }, + form: { + value:'OK', + componentProps: { + disabled: 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', + } + }, + }, +])) + +//表单校验 +export const InventorymoveRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'blur' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'blur' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ] +}) + +/** + * @returns {Array} 库存转移申请子表 + */ +export const InventorymoveRequestDetail = useCrudSchemas(reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + multiple:true, + disabled: true, + isInpuFocusShow: false, // 开启查询弹窗 + searchListPlaceholder: '请选择从包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.selectLocationTypeToBalance, + searchCondition: [{ + key: 'businessType', + value: 'Move', + isMainValue: false + },{ + key:'locationCode', // 查询列表中字段 + value:'fromLocationCode', // 指主表某字段 + message: '请选择从库位代码!', // 当前置条件为空时 弹出信息提示 + isMainValue: true, // 表示查询条件是主表的字段的值 + action: '==', // 查询拼接条件 + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled: true, + isSearchList: false, // 开启查询弹窗 + searchListPlaceholder: '请选择从包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.selectLocationTypeToBalance, + searchCondition: [{ + key: 'businessType', + value: 'Move', + isMainValue: false + }] + } + } + + }, + { + label: '从包装号', + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm:false, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm:false, + isForm: false, + }, + { + label: '从库存状态', + field: 'fromInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: true, + isForm: false, + tableForm:{ + multiple:false, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', + searchField: 'packUnit', + searchTitle: '物料包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItempackagingApi.getItempackagingPageTree, + searchCondition: [{ + key:'itemCode', // 查询列表中字段 + value:'itemCode', // 指主表某字段 + message: '请选择物料代码!', // 当前置条件为空时 弹出信息提示 + isMainValue: true, // 表示查询条件是主表的字段的值 + action: '==', // 查询拼接条件 + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled: true, + isSearchList: false, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', + searchField: 'packUnit', + searchTitle: '物料包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItempackagingApi.getItempackagingPageTree, + searchCondition: [{ + key:'itemCode', // 查询列表中字段 + value:'itemCode', // 指主表某字段 + message: '请选择物料代码!', // 当前置条件为空时 弹出信息提示 + isMainValue: true, // 表示查询条件是主表的字段的值 + action: '==', // 查询拼接条件 + }] + } + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + isForm: false, + }, + { + label: '批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + } + }, + tableForm: { + disabled: false, + type: 'InputNumber', + min: 0, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + } +])) + +//表单校验 +export const InventorymoveRequestDetailRules = reactive({ + itemCode: [ + { required: true, message: '请点击从包装号选择物料代码', trigger: 'change' } + ], + fromInventoryStatus: [ + { required: true, message: '请选择从库存状态', trigger: 'change' } + ], + toInventoryStatus: [ + { required: true, message: '请选择到库存状态', trigger: 'change' } + ] +}) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index d7c1d4a8c..499e908c3 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -510,7 +510,7 @@ const buttonTableClick = async (val, row) => { InventorymoveRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -521,7 +521,7 @@ const buttonTableClick = async (val, row) => { InventorymoveRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -532,7 +532,7 @@ const buttonTableClick = async (val, row) => { InventorymoveRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -543,7 +543,7 @@ const buttonTableClick = async (val, row) => { InventorymoveRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -554,7 +554,7 @@ const buttonTableClick = async (val, row) => { InventorymoveRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -565,7 +565,7 @@ const buttonTableClick = async (val, row) => { InventorymoveRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -627,7 +627,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -743,7 +743,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts index 5899a7623..28768dd0f 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts @@ -117,6 +117,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isTable:false, + isTableForm:false, isForm: false, }, { @@ -388,7 +390,16 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ } }, isForm: false, - isTable: true + isTable: true, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', @@ -691,6 +702,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm:false, tableForm: { enterSearch: true, isInpuFocusShow: true, // 开启查询弹窗 @@ -927,9 +939,9 @@ export const InventorymoveRequestDetailRules = reactive({ fromInventoryStatus: [ { required: true, message: '请选择从库存状态', trigger: 'change' } ], - toLocationCode: [ - { required: true, message: '请选择到库位代码', trigger: 'change' } - ], + // toLocationCode: [ + // { required: true, message: '请选择到库位代码', trigger: 'change' } + // ], remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue new file mode 100644 index 000000000..7ddee302a --- /dev/null +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue @@ -0,0 +1,820 @@ + + + diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts new file mode 100644 index 000000000..6f6e21b82 --- /dev/null +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts @@ -0,0 +1,948 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +import * as WarehouseApi from '@/api/wms/warehouse' +import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data' + +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'MoveRequest' +} + 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] + +/** + * @returns {Array} 库存转移申请主表 + */ +export const InventorymoveRequestMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isForm: false, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择从仓库代码', + searchField: 'code', + searchTitle: '仓库基础信息', + searchAllSchemas: Warehouse.allSchemas, + searchPage: WarehouseApi.pageBusinessTypeToWarehouse, + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择从仓库代码', + searchField: 'code', + searchTitle: '仓库基础信息', + searchAllSchemas: Warehouse.allSchemas, + searchPage: WarehouseApi.pageBusinessTypeToWarehouse, + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + isTableForm:false, + isForm: false, + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + 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', + } + }, + }, + // { + // label: '从库区类型范围', + // field: 'fromAreaTypes', + // // dictType: DICT_TYPE.AREA_TYPE, + // // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // isForm: false, + // }, + // { + // label: '从库区代码范围', + // field: 'fromAreaCodes', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isForm: false, + // }, + + // { + // label: '到库区类型范围', + // field: 'toAreaTypes', + // // dictType: DICT_TYPE.AREA_TYPE, + // // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // isSearch: true, + // isForm: false, + // }, + // { + // label: '到库区代码范围', + // field: 'toAreaCodes', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isForm: false, + // }, + // { + // label: '业务类型', + // field: 'businessType', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // value: 'Move', + // componentProps: { + // disabled: true + // } + // }, + // isForm: false, + // }, + // { + // label: '部门', + // field: 'departmentCode', + // sort: 'custom', + // isForm: false, + // table: { + // width: 150 + // }, + // formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + // return userDeptArray.find((account) => account.id == cellValue)?.name + // }, + // form: { + // value: userDept.id, + // component: 'Select', + // api: () => userDeptArray, + // componentProps: { + // disabled: true, + // optionsAlias: { + // labelField: 'name', + // valueField: 'id' + // } + // } + // } + // }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // }, + // { + // label: '自动提交', + // field: 'autoCommit', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable: true, + // isForm: false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: requestsettingData.autoCommit, + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE', + // disabled: true + // } + // } + // }, + // { + // label: '自动通过', + // field: 'autoAgree', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable: true, + // isForm: false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: requestsettingData.autoAgree, + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE', + // disabled: true + // } + // } + // }, + // { + // label: '自动执行', + // field: 'autoExecute', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable: true, + // isForm: false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: requestsettingData.autoExecute, + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE', + // disabled: true + // } + // } + // }, + // { + // label: '直接生成记录', + // field: 'directCreateRecord', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isForm: false, + // isTable: false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: requestsettingData.directCreateRecord, + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE', + // disabled: true + // } + // } + // }, + // { + // label: '使用在途库', + // field: 'useOnTheWayLocation', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isSearch: true, + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + isTable: true, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: true + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + isTable: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + }, + } +])) + +//表单校验 +export const InventorymoveRequestMainRules = reactive({ + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 库存转移申请子表 + */ +export const InventorymoveRequestDetail = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + hiddenInMain: true, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '从批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '从包装号', + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + multiple:true, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择从包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.selectLocationTypeToBalance, + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择从包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.selectLocationTypeToBalance, + } + } + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + // { + // label: '从器具号', + // field: 'fromContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm: { + // disabled: true + // }, + // form: { + // componentProps: { + // disabled: true + // } + // } + // }, + // { + // label: '到器具号', + // field: 'toContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false, + // }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm:true, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [ + { + key: 'type', + value: 'businessType', + isMainValue: true + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], + isRepeat:true, + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [ + { + key: 'type', + value: 'businessType', + isMainValue: true + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, + { + label: '从库存状态', + field: 'fromInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '到库存状态', + field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + hiddenInMain: true, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + hiddenInMain: true, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + hiddenInMain: true, + }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + // { + // label: '最后更新时间', + // field: 'updateTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: { width:'100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // isTableForm: false, + // isForm: false + // }, + // { + // label: '最后更新者', + // field: 'updater', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + hiddenInMain: true, + isTableForm:false, + } +])) + +//表单校验 +export const InventorymoveRequestDetailRules = reactive({ + itemCode: [ + { required: true, message: '请点击从包装号选择物料代码', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + fromInventoryStatus: [ + { required: true, message: '请选择从库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], +}) diff --git a/src/views/wms/moveManage/itemChange/itemChange.data.ts b/src/views/wms/moveManage/itemChange/itemChange.data.ts index 8d91875d9..6415e0ac9 100644 --- a/src/views/wms/moveManage/itemChange/itemChange.data.ts +++ b/src/views/wms/moveManage/itemChange/itemChange.data.ts @@ -414,7 +414,16 @@ export const ItemChange = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/offlinesettlementRecordMain.data.ts b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/offlinesettlementRecordMain.data.ts index d1aa1db58..c0d765bc2 100644 --- a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/offlinesettlementRecordMain.data.ts +++ b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/offlinesettlementRecordMain.data.ts @@ -217,6 +217,15 @@ export const OfflinesettlementRecordMain = useCrudSchemas(reactive valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, ])) diff --git a/src/views/wms/productionManage/processproduction/processproductionRecord/index.vue b/src/views/wms/productionManage/processproduction/processproductionRecord/index.vue index c04743a7b..fced86acb 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRecord/index.vue +++ b/src/views/wms/productionManage/processproduction/processproductionRecord/index.vue @@ -237,7 +237,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProcessproductionRecordMainApi.exportProcessproductionRecordMain(tableObject.params) - download.excel(data, '工序报产申请主.xlsx') + download.excel(data, route.meta.title+'.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/processproduction/processproductionRecord/processproductionRecordMain.data.ts b/src/views/wms/productionManage/processproduction/processproductionRecord/processproductionRecordMain.data.ts index ba0c04612..523d2d328 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRecord/processproductionRecordMain.data.ts +++ b/src/views/wms/productionManage/processproduction/processproductionRecord/processproductionRecordMain.data.ts @@ -94,7 +94,16 @@ export const ProcessproductionRecordMain = useCrudSchemas(reactive } }, isTableForm: false, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts b/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts index 469b3e238..d9d638d38 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts @@ -156,7 +156,16 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts b/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts index 2f0fe286e..02fea97a1 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts +++ b/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts @@ -215,6 +215,15 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '最后更新时间', diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts index a97fc2653..19a0dd669 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts @@ -240,6 +240,15 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive }, isTable: false, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index 70e5f5693..c107abc6d 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -316,7 +316,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.open(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -327,7 +327,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -342,7 +342,7 @@ const buttonTableClick = async (val, row) => { } // message.success(t('common.updateSuccess')) // tableObject.loading = false - // getList() + // buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -353,7 +353,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.reject(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -365,7 +365,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -397,7 +397,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.publish(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -408,7 +408,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.resetting(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -420,7 +420,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.generatePreparetoissue(row.number).then((PreparetoissueRes) => { message.success(t('common.createSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) // 生成发料申请 ProductionMainApi.generateIssueRequest(PreparetoissueRes.number) }).catch(err => { @@ -434,7 +434,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { message.success(t('common.createSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -481,7 +481,7 @@ const autoCreatePlanRequest = async (row)=>{ } finally { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) } } } @@ -534,7 +534,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {}finally{ tableObject.loading = false } @@ -607,7 +607,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index fb50dea45..f54be98de 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -573,6 +573,15 @@ export const ProductionMain = useCrudSchemas(reactive([ } }, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新者', diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index db022f33e..d9923a922 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -314,7 +314,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.open(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -325,7 +325,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -342,7 +342,7 @@ const buttonTableClick = async (val, row) => { } // message.success(t('common.updateSuccess')) // tableObject.loading = false - // getList() + // buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -353,7 +353,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.reject(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -365,7 +365,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -398,7 +398,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.publish(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -409,7 +409,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.resetting(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -421,7 +421,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.generatePreparetoissue(row.number).then((PreparetoissueRes) => { message.success(t('common.createSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) // 生成发料申请 ProductionMainApi.generateIssueRequest(PreparetoissueRes.number) }).catch(err => { @@ -435,7 +435,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { message.success(t('common.createSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -497,7 +497,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {}finally{ tableObject.loading = false } @@ -572,7 +572,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } @@ -609,7 +613,7 @@ const autoCreatePlanRequest = async (row)=>{ } finally { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) } } } diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts index b66a906aa..a68c9f096 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts @@ -572,6 +572,15 @@ export const ProductionMain = useCrudSchemas(reactive([ } }, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新者', diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index f18d7babd..f289523a4 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -306,7 +306,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.open(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -317,7 +317,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -332,7 +332,7 @@ const buttonTableClick = async (val, row) => { } // message.success(t('common.updateSuccess')) // tableObject.loading = false - // getList() + // buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -343,7 +343,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.reject(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -355,7 +355,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -386,7 +386,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.publish(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -397,7 +397,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.resetting(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -409,7 +409,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.generatePreparetoissue(row.number).then((PreparetoissueRes) => { message.success(t('common.createSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) // 生成发料申请 ProductionMainApi.generateIssueRequest(PreparetoissueRes.number) }).catch(err => { @@ -423,7 +423,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { message.success(t('common.createSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -485,7 +485,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {}finally{ tableObject.loading = false } @@ -559,7 +559,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } @@ -598,7 +602,7 @@ const autoCreatePlanRequest = async (row)=>{ } finally { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) } } } diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts index ece420527..e51d25451 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts @@ -565,6 +565,15 @@ export const ProductionMain = useCrudSchemas(reactive([ } }, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新者', diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index 37d343540..3585c8f56 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -306,7 +306,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.open(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -317,7 +317,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -332,7 +332,8 @@ const buttonTableClick = async (val, row) => { } // message.success(t('common.updateSuccess')) // tableObject.loading = false - // getList() + // buttonBaseClick('refresh',null) + }).catch(err => { tableObject.loading = false console.log(err) @@ -343,7 +344,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.reject(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -355,7 +356,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -387,7 +388,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.publish(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -398,7 +399,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.resetting(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -410,7 +411,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.generatePreparetoissue(row.number).then((PreparetoissueRes) => { message.success(t('common.createSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) // 生成发料申请 ProductionMainApi.generateIssueRequest(PreparetoissueRes.number) }).catch(err => { @@ -424,7 +425,7 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { message.success(t('common.createSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -486,7 +487,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {}finally{ tableObject.loading = false } @@ -562,7 +563,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } @@ -600,7 +605,7 @@ const autoCreatePlanRequest = async (row)=>{ } finally { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) } } } diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts index fd3f997e5..82a6ceb40 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts @@ -565,6 +565,15 @@ export const ProductionMain = useCrudSchemas(reactive([ } }, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新者', diff --git a/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue b/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue index a81de7ad2..699d01705 100644 --- a/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue +++ b/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue @@ -124,7 +124,13 @@ const buttonBaseClick = (val, item) => { } else if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) @@ -173,7 +179,11 @@ const formsSuccess = async (formType,data) => { message.success(t('common.updateSuccess')) } basicFormRef.value.dialogVisible = false - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } /** 详情操作 */ diff --git a/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts b/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts index 21f5e26ea..97e776d34 100644 --- a/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts +++ b/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts @@ -62,10 +62,16 @@ export const QadProductionPlanMain = useCrudSchemas(reactive([ { label: '计划类型', field: 'planType', + dictType: DICT_TYPE.PLAN_PRODUCTION_TYPE, + dictClass: 'string', + isTable: true, sort: 'custom', - form: { - component: 'SelectV2' + table: { + width: 150 }, + form: { + component: 'Select' + } }, { label: '业务类型', @@ -94,7 +100,16 @@ export const QadProductionPlanMain = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue index 57a431d19..c14093312 100644 --- a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue @@ -202,13 +202,13 @@ const buttonTableClick = async (val, row) => { // ProductputawayJobMainApi.executeProductputawayMain(aaa) } else if (val == 'mainJobAba') { // 放弃 await ProductputawayJobMainApi.abandonProductputawayMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await ProductputawayJobMainApi.closeProductputawayMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await ProductputawayJobMainApi.acceptProductputawayMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'documentPrint') { // 单据打印 handleDocumentPrint(row) diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts b/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts index c1e1e78d0..5a48e1134 100644 --- a/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts +++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts @@ -15,6 +15,16 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ }, isSearch: true, }, + + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + }, { label: '状态', field: 'status', @@ -27,16 +37,6 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - isSearch: true, - }, // { // label: '供应商代码', // field: 'supplierCode', @@ -309,6 +309,15 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productputaway/productputawayRecordMain/productputawayRecordMain.data.ts b/src/views/wms/productionManage/productputaway/productputawayRecordMain/productputawayRecordMain.data.ts index 94487c419..b38e6b264 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRecordMain/productputawayRecordMain.data.ts +++ b/src/views/wms/productionManage/productputaway/productputawayRecordMain/productputawayRecordMain.data.ts @@ -35,7 +35,7 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, + sortTableDefault: 1, isSearch: true }, { @@ -45,7 +45,7 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, + sortTableDefault: 1, isSearch: true }, // { @@ -226,6 +226,15 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue index 5e3567de0..f1d1619f0 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue @@ -232,7 +232,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -243,7 +243,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -254,7 +254,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -265,7 +265,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -276,7 +276,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -287,7 +287,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -327,7 +327,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {}finally{ tableObject.loading = false } @@ -397,7 +397,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts index 2b5d2e897..f315502ab 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts @@ -146,7 +146,7 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, + isTable: true, form: { component: 'DatePicker', componentProps: { @@ -155,7 +155,16 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', @@ -802,7 +811,6 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive width: 150, fixed: 'right' }, - hiddenInMain:true, isTableForm:false, } ])) diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue index a7ba72a23..a6fe1a158 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue @@ -203,13 +203,13 @@ const buttonTableClick = async (val, row) => { // ProductputawayJobMainApi.executeProductputawayMain(aaa) } else if (val == 'mainJobAba') { // 放弃 await ProductputawayJobMainApi.abandonProductputawayMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await ProductputawayJobMainApi.closeProductputawayMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await ProductputawayJobMainApi.acceptProductputawayMain(row.masterId) - getList() + buttonBaseClick('refresh',null) }else if (val == 'documentPrint') { // 单据打印 handleDocumentPrint(row) @@ -249,7 +249,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductputawayJobMainApi.exportProductputawayJobMain(tableObject.params) - download.excel(data, '制品上架任务主.xlsx') + download.excel(data, route.meta.title+'.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts index b7e20f429..3d7ca5bf4 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts @@ -15,6 +15,15 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ }, isSearch: true, }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + }, { label: '状态', field: 'status', @@ -27,16 +36,6 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - table: { - width: 180 - }, - isSearch: true, - isTable: false, - }, // { // label: '供应商代码', // field: 'supplierCode', @@ -311,6 +310,15 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue index 622847e52..d1451da7b 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue @@ -156,7 +156,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductputawayRecordMainApi.exportProductputawayRecordMain(tableObject.params) - download.excel(data, '制品上架记录主.xlsx') + download.excel(data, route.meta.title+'.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/productputawayAssembleRecordMain.data.ts b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/productputawayAssembleRecordMain.data.ts index 1bea38b90..57b04a37f 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/productputawayAssembleRecordMain.data.ts +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/productputawayAssembleRecordMain.data.ts @@ -35,8 +35,8 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, - isSearch: true + isSearch: true, + sortTableDefault: 1, }, { label: '任务单号', @@ -45,8 +45,8 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, - isSearch: true + isSearch: true, + sortTableDefault: 1, }, // { // label: '供应商代码', @@ -226,6 +226,15 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue index d3082f024..28366c9bf 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue @@ -234,7 +234,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -245,7 +245,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -256,7 +256,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -267,7 +267,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -278,7 +278,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -289,7 +289,7 @@ const buttonTableClick = async (val, row) => { ProductputawayRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -329,7 +329,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {}finally{ tableObject.loading = false } @@ -344,7 +344,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductputawayRequestMainApi.exportProductputawayRequestMainAssemble(tableObject.params) - download.excel(data, '制品上架申请主.xlsx') + download.excel(data, route.meta.title+'.xlsx') } catch { } finally { exportLoading.value = false @@ -398,7 +398,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts index cd3da472d..e836f1931 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts @@ -147,7 +147,16 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue index b9a0ae9fa..253fb0f49 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue @@ -322,13 +322,13 @@ const buttonTableClick = async (val, row) => { ProductreceiptJobMainApi.executeProductreceiptMain(aaa) } else if (val == 'mainJobAba') { // 放弃 await ProductreceiptJobMainApi.abandonProductreceiptMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await ProductreceiptJobMainApi.closeProductreceiptMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await ProductreceiptJobMainApi.acceptProductreceiptMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 diff --git a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts index 6f8011f4c..45a93e713 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts @@ -350,6 +350,16 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue index 3811c3b89..8493a2bd0 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue @@ -211,7 +211,7 @@ const buttonTableClick = async (val, row) => { const BASE_URL = getJmreportBaseUrl() // 标签打印 const searchTableRef = ref() -const labelType = ref('') // 标签类别 采购还是制造等 +const labelType = ref('') // 标签类别 采购还是制造等 const labelPrint = async (row) => { tableObject.loading = true //获取类型 @@ -243,7 +243,7 @@ const labelPrint = async (row) => { // 批量打印--预生产收货 const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => { console.log('批量打印',val) - + if(val.length == 0){ message.warning("请先选择要打印的数据!") return @@ -279,7 +279,7 @@ const handleCreateInspectRequest = async (number:string) => { tableObject.loading = true await ProductreceiptRecordMainApi.createInspectRequest(number) message.success(t('ts.到货检验申请生成成功')) - await getList() + buttonBaseClick('refresh',null) }catch{}finally{ tableObject.loading = false } diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts index 04036f02b..cb57f422f 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts @@ -251,6 +251,15 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新时间', diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 61f4c5984..f5f87a731 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -356,7 +356,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -367,7 +367,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -378,7 +378,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -389,7 +389,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -400,7 +400,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -493,7 +493,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { console.log(err) }) @@ -552,7 +552,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {}finally{ tableObject.loading = false } @@ -626,7 +626,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts index f372eec7b..94b31e711 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts @@ -347,7 +347,16 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ } }, isTable: false, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue index 195d84712..dac357f0d 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue @@ -262,13 +262,13 @@ const buttonTableClick = async (val, row) => { ProductreceiptJobMainApi.executeProductreceiptMain(aaa) } else if (val == 'mainJobAba') { // 放弃 await ProductreceiptJobMainApi.abandonProductreceiptMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await ProductreceiptJobMainApi.closeProductreceiptMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await ProductreceiptJobMainApi.acceptProductreceiptMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts index a0ba771f6..029ec1ca1 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts @@ -352,6 +352,15 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue index 5bc4a178a..67e177c28 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue @@ -255,7 +255,7 @@ const handleCreateInspectRequest = async (number:string) => { tableObject.loading = true await ProductreceiptRecordMainApi.createInspectRequest(number) message.success(t('ts.到货检验申请生成成功')) - await getList() + buttonBaseClick('refresh',null) }catch{}finally{ tableObject.loading = false } @@ -268,7 +268,7 @@ const handleCreatePutawayRequest = async (number:string) => { tableObject.loading = true await ProductreceiptRecordMainApi.createPutawayRequest(number) message.success(t('ts.上架申请生成成功')) - await getList() + buttonBaseClick('refresh',null) }catch{}finally{ tableObject.loading = false } diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts index a39bc62f8..24bb9c07b 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts @@ -255,6 +255,15 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新时间', diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 4864d6187..37b729e3f 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -355,7 +355,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -366,7 +366,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -377,7 +377,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -388,7 +388,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -399,7 +399,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -493,7 +493,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { console.log(err) }) @@ -552,7 +552,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {}finally{ tableObject.loading = false } @@ -627,7 +627,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts index 6c1efc524..1688ced9e 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts @@ -355,7 +355,17 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ } }, isTable: false, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, + }, { label: '创建者', diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue index 7a96fc26d..995a10ac6 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue @@ -259,13 +259,13 @@ const buttonTableClick = async (val, row) => { ProductreceiptJobMainApi.executeProductreceiptMain(aaa) } else if (val == 'mainJobAba') { // 放弃 await ProductreceiptJobMainApi.abandonProductreceiptMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await ProductreceiptJobMainApi.closeProductreceiptMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await ProductreceiptJobMainApi.acceptProductreceiptMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } // 获取部门 用于详情 部门回显 @@ -287,7 +287,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(tableObject.params) - download.excel(data, '制品收货任务.xlsx') + download.excel(data, route.meta.title+'.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/productreceiptscrapJobMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/productreceiptscrapJobMain.data.ts index 9c906dc83..d047bd058 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/productreceiptscrapJobMain.data.ts +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/productreceiptscrapJobMain.data.ts @@ -334,6 +334,15 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue index e9a0eb4cd..69439d8b4 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue @@ -199,7 +199,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) - download.excel(data, '制品收货记录主.xlsx') + download.excel(data, route.meta.title+'.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts index bc903136b..1f13ef026 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts @@ -239,6 +239,15 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新时间', diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue index a0398bac6..2fa3d5bd2 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue @@ -343,7 +343,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -354,7 +354,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -365,7 +365,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -376,7 +376,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -387,7 +387,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -480,7 +480,7 @@ const buttonTableClick = async (val, row) => { ProductreceiptRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { console.log(err) }) @@ -539,7 +539,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {}finally{ tableObject.loading = false } @@ -554,7 +554,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMain(tableObject.params) - download.excel(data, '制品收货申请主.xlsx') + download.excel(data, route.meta.title+'.xlsx') } catch { } finally { exportLoading.value = false @@ -612,7 +612,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts index a21f40e59..929e92008 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts @@ -366,7 +366,16 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ } }, isTable: false, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productredress/productredressJobMain/index.vue b/src/views/wms/productionManage/productredress/productredressJobMain/index.vue index 51e97a100..19de72466 100644 --- a/src/views/wms/productionManage/productredress/productredressJobMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressJobMain/index.vue @@ -96,7 +96,13 @@ const buttonBaseClick = (val, item) => { if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) @@ -133,13 +139,13 @@ const buttonTableClick = async (val, row) => { handleDelete(row.masterId) } else if (val == 'mainJobAba') { // 放弃 await ProductredressJobMainApi.abandonProductredressJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobClo') { // 关闭 await ProductredressJobMainApi.closeProductredressJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } else if (val == 'mainJobAcc') { // 承接 await ProductredressJobMainApi.acceptProductredressJobMain(row.masterId) - getList() + buttonBaseClick('refresh',null) } } @@ -176,7 +182,7 @@ const handleDelete = async (id: number) => { await ProductredressJobMainApi.deleteProductredressJobMain(id) message.success(t('common.delSuccess')) // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } diff --git a/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts b/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts index e9b7dabd9..89d853a3d 100644 --- a/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts +++ b/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts @@ -407,7 +407,16 @@ export const ProductredressJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '最后更新者', diff --git a/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue b/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue index 9cf2196de..f85fe1943 100644 --- a/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue @@ -94,7 +94,13 @@ const buttonBaseClick = (val, item) => { if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) diff --git a/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts b/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts index d1919b684..d0518f979 100644 --- a/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts +++ b/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts @@ -300,7 +300,16 @@ export const ProductredressRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '最后更新者', diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue index a58f08d13..8a9c000a3 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue @@ -208,7 +208,13 @@ const buttonBaseClick = (val, item) => { } else if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) @@ -249,7 +255,7 @@ const buttonTableClick = async (val, row) => { ProductredressRequestMainApi.close(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -260,7 +266,7 @@ const buttonTableClick = async (val, row) => { ProductredressRequestMainApi.reAdd(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -271,7 +277,7 @@ const buttonTableClick = async (val, row) => { ProductredressRequestMainApi.submit(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -282,7 +288,7 @@ const buttonTableClick = async (val, row) => { ProductredressRequestMainApi.refused(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -293,7 +299,7 @@ const buttonTableClick = async (val, row) => { ProductredressRequestMainApi.agree(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { tableObject.loading = false console.log(err) @@ -304,7 +310,7 @@ const buttonTableClick = async (val, row) => { ProductredressRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false - getList() + buttonBaseClick('refresh',null) }).catch(err => { console.log(err) }) @@ -361,7 +367,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {}finally{ tableObject.loading = false } @@ -432,7 +438,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts index facb6d0d4..7ec65d060 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts @@ -251,7 +251,16 @@ export const ProductredressRequestMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '最后更新者', diff --git a/src/views/wms/productionManage/productrepair/productrepairRecordMain/productrepairRecordMain.data.ts b/src/views/wms/productionManage/productrepair/productrepairRecordMain/productrepairRecordMain.data.ts index 1ce8bcec4..18eaba2c4 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRecordMain/productrepairRecordMain.data.ts +++ b/src/views/wms/productionManage/productrepair/productrepairRecordMain/productrepairRecordMain.data.ts @@ -226,6 +226,15 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '最后更新时间', diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts index 3fa3c6f93..ba37189ef 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts @@ -330,6 +330,15 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ } }, isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue index b17908398..76405880a 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue @@ -182,7 +182,8 @@ const tableFormButton = async (val , row) => { bomModelVisible.value = true DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息' detatableDataBom.params = { - masterId: row.id + masterId: row.masterId, + itemCode: row.itemCodeThird } await getDetailListBom() } @@ -204,7 +205,7 @@ const { getList, setSearchParams } = tableMethods const HeadButttondata = [ defaultButtons.defaultExportBtn({hasPermi:'wms:productscrap-record-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 - defaultButtons.defaultFilterBtn(null), // 筛选 + //defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 // { // label: '自定义扩展按钮', diff --git a/src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts b/src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts index fe3d913bd..76301b377 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts +++ b/src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts @@ -296,7 +296,16 @@ export const ProductscrapRecordMain = useCrudSchemas( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x' } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '最后更新时间', @@ -375,7 +384,7 @@ export const ProductscrapRecordMain = useCrudSchemas( field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, + isSearch: false, isTable: false, sort: 'custom', table: { @@ -473,15 +482,16 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive([ } }, { - label: '物料代码', + label: '制品物料代码', field: 'itemCode', + isSearch:true, sort: 'custom', table: { width: 150 } }, { - label: '物料名称', + label: '制品物料名称', field: 'itemName', sort: 'custom', table: { @@ -506,7 +516,7 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive([ }, }, { - label: '报废数量', + label: '制品报废数量', field: 'qty', sort: 'custom', table: { @@ -517,7 +527,7 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive([ } }, { - label: '计量单位', + label: '制品计量单位', field: 'uom', dictType: DICT_TYPE.UOM, dictClass: 'string', @@ -528,9 +538,52 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive([ }, }, { - label: '单价', - field: 'singlePrice', + label: '原料物料代码', + field: 'itemCodeThird', + sort: 'custom', + isSearch:true, + isTable: true, + table: { + width: 150 + } + }, + { + label: '原料物料名称', + field: 'itemNameThird', + sort: 'custom', + isTable: true, + table: { + width: 150 + }, + }, + { + label: '原料报废数量', + field: 'qtyThird', + sort: 'custom', + isTable: true, + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '原料计量单位', + field: 'uomThird', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + tableForm:{ + type: 'Select', + disabled: true + } + }, + { + label: '原料单价', + field: 'singlePriceThird', sort: 'custom', + isTable: true, table: { width: 150 }, @@ -539,9 +592,10 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive([ } }, { - label: '金额', - field: 'amount', + label: '原料金额', + field: 'amountThird', sort: 'custom', + isTable: true, table: { width: 150 }, diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 29439169f..31d59a712 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -528,7 +528,7 @@ const handleClose = async (id: number) => { await ProductscrapRequestMainApi.closeProductscrapRequestMain(id) message.success(t('common.closeSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{}finally{ tableObject.loading = false } @@ -542,7 +542,7 @@ const handleReAdd = async (id: number) => { await ProductscrapRequestMainApi.reAddProductscrapRequestMain(id) message.success(t('common.reAddSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{}finally{ tableObject.loading = false } @@ -556,7 +556,7 @@ const handleSubmit = async (id: number) => { await ProductscrapRequestMainApi.submitProductscrapRequestMain(id) message.success(t('common.submitSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{}finally{ tableObject.loading = false } @@ -570,7 +570,7 @@ const handleRefused = async (id: number) => { await ProductscrapRequestMainApi.refusedProductscrapRequestMain(id) message.success(t('common.refusedSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{}finally{ tableObject.loading = false } @@ -584,7 +584,7 @@ const handleAgree = async (id: number) => { await ProductscrapRequestMainApi.agreeProductscrapRequestMain(id) message.success(t('common.agreeSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{}finally{ tableObject.loading = false } @@ -598,7 +598,7 @@ const handleHandle = async (id: number) => { await ProductscrapRequestMainApi.handleProductscrapRequestMain(id) message.success(t('common.handleSuccess')) tableObject.loading = false - await getList() + buttonBaseClick('refresh',null) }catch{}finally{ tableObject.loading = false } @@ -663,7 +663,7 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) tableObject.loading = false // 刷新列表 - await getList() + buttonBaseClick('refresh',null) } catch {} } @@ -756,7 +756,11 @@ const submitForm = async (formType, submitData) => { } formRef.value.dialogVisible = false // 刷新当前列表 - getList() + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } } finally { formRef.value.formLoading = false } diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts index 6067ca3e1..f3ce47a15 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts @@ -383,7 +383,16 @@ export const ProductscrapRequestMain = useCrudSchemas( valueFormat: 'x' } }, - isForm: false + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue index b2779c087..73a95c56b 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue @@ -73,6 +73,7 @@ import * as InspectJobMainApi from '@/api/wms/inspectJobMain' import * as InspectJobDetailApi from '@/api/wms/inspectJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + import { formatDate } from '@/utils/formatTime' // 检验任务主 defineOptions({ name: 'InspectJobMain' }) @@ -233,7 +234,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await InspectJobMainApi.exportInspectJobMain(tableObject.params) - download.excel(data, '检验任务主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/inspectJobMain.data.ts b/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/inspectJobMain.data.ts index 4920252e9..848a37dc4 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/inspectJobMain.data.ts +++ b/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/inspectJobMain.data.ts @@ -271,6 +271,15 @@ export const InspectJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue index b7f63eff1..a987cad02 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue @@ -72,6 +72,7 @@ import * as InspectRecordDetailApi from '@/api/wms/inspectRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import Preview from '@/components/UploadFile/src/Preview.vue' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + import { formatDate } from '@/utils/formatTime' // 检验记录主 defineOptions({ name: 'InspectRecordMain' }) @@ -179,7 +180,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await InspectRecordMainApi.exportInspectRecordMain(tableObject.params) - download.excel(data, '检验记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue index 91b579ad2..4cbc8f5df 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue @@ -53,6 +53,7 @@ import * as InspectRequestMainApi from '@/api/wms/inspectRequestMain' import * as InspectRequestDetailApi from '@/api/wms/inspectRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' + import { formatDate } from '@/utils/formatTime' // 到货检验申请 defineOptions({ name: 'InspectRequestMain' }) @@ -322,7 +323,7 @@ // 发起导出 exportLoading.value = true const data = await InspectRequestMainApi.exportInspectRequestMain(tableObject.params) - download.excel(data, '检验申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -385,7 +386,7 @@ // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '检验申请主导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts index ad80329e8..7a29f4b94 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts @@ -373,6 +373,15 @@ export const InspectRequestMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, isForm: false, }, { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue index 80dbd8b06..6cf95dc4e 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue @@ -104,6 +104,7 @@ import * as PurchasereceiptJobDetailApi from '@/api/wms/purchasereceiptJobDetail import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getReportUrl } from '@/utils/systemParam' +import { formatDate } from '@/utils/formatTime' // 采购收货任务主 defineOptions({ name: 'PurchasereceiptJobMain' }) @@ -363,7 +364,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PurchasereceiptJobMainApi.exportPurchasereceiptJobMain(tableObject.params) - download.excel(data, '采购收货任务主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts index c5bc9e337..86762ce33 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts @@ -52,7 +52,6 @@ export const PurchasereceiptJobMain = useCrudSchemas( label: '供应商代码', field: 'supplierCode', sort: 'custom', - sortTableDefault: 1, table: { width: 150 }, @@ -414,7 +413,16 @@ export const PurchasereceiptJobMain = useCrudSchemas( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x' } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '自动完成', diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue index b51dbbefd..8eb9603f4 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue @@ -115,6 +115,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getReportUrl } from '@/utils/systemParam' + +import { formatDate } from '@/utils/formatTime' // 采购收货记录主 defineOptions({ name: 'PurchasereceiptRecordMain' }) const message = useMessage() // 消息弹窗 @@ -303,10 +305,10 @@ const handleExport = async () => { exportLoading.value = true if(routeName.value.includes('SCP')){ const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMainSCP(tableObject.params) - download.excel(data, `${t('ts.采购收货记录主')}.xlsx`) + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) }else{ const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMain(tableObject.params) - download.excel(data, `${t('ts.采购收货记录主')}.xlsx`) + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } } catch { } finally { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts index 05bbd18c6..2d8d0ba03 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts @@ -373,9 +373,9 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ search: { component: 'DatePicker', componentProps: { - type: 'datetimerange', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, form: { @@ -385,7 +385,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } - }, + } }, { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue index c96206f80..2dcb35833 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue @@ -115,6 +115,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { PurchasereceiptRefuseRequestTabsList } from '@/utils/disposition/tabsList' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getReportUrl } from '@/utils/systemParam' +import { formatDate } from '@/utils/formatTime' // 采购收货记录主 defineOptions({ name: 'PurchasereceiptRecordRefuseMain' }) const message = useMessage() // 消息弹窗 @@ -292,10 +293,10 @@ const handleExport = async () => { exportLoading.value = true if(routeName.value.includes('SCP')){ const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMainSCP(tableObject.params) - download.excel(data, `${t('ts.采购收货记录主')}.xlsx`) + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) }else{ const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordRefuseMain(tableObject.params) - download.excel(data, `${t('ts.采购拒收记录主')}.xlsx`) + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } } catch { } finally { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/purchasereceiptRecordMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/purchasereceiptRecordMain.data.ts index 6dce3f6d0..b5c0fbd48 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/purchasereceiptRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/purchasereceiptRecordMain.data.ts @@ -412,6 +412,15 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index d7dd91517..c05b715f6 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -762,7 +762,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(tableObject.params) - download.excel(data, '采购收货申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -838,7 +838,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '采购收货申请主导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts index 68e62984c..1c7bf9ea8 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts @@ -326,7 +326,17 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + }, { label: '创建者', @@ -1027,6 +1037,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive { // 发起导出 exportLoading.value = true const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(tableObject.params) - download.excel(data, '采购收货申请主.xlsx') + download.excel(data, 'M类型采购收货.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts index 9458a4b92..d84f01b0d 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts @@ -331,7 +331,16 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', @@ -997,13 +1006,13 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive { // 发起导出 exportLoading.value = true const data = await PurchasereturnJobMainApi.exportPurchasereturnJobMain(tableObject.params) - download.excel(data, '采购退货任务主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts index 1463bf747..e401c8840 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts @@ -27,7 +27,7 @@ export const PurchasereturnJobMain = useCrudSchemas( table: { width: 180 }, - isTable: false + sortTableDefault: 1 }, { label: '采购收货记录单号', @@ -635,6 +635,15 @@ export const PurchasereturnJobMain = useCrudSchemas( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x' } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, } }, { diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue index 4619a99d0..6765de99b 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue @@ -70,6 +70,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { getAccessToken } from '@/utils/auth' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getJmreportBaseUrl } from '@/utils/systemParam' +import { formatDate } from '@/utils/formatTime' // 采购退货记录主 defineOptions({ name: 'PurchasereturnRecordMain' }) @@ -140,15 +141,15 @@ const butttondata = (row,$index) => { const buttonTableClick = async (val, row) => { if (val == 'documentPrint') { // 单据打印 - handleDocumentPrint(row.masterId) + handleDocumentPrint(row.id,row.masterId) } } // 单据打印 const BASE_URL = getJmreportBaseUrl() const documentSrc = ref(BASE_URL + '/jmreport/view/920874172025987072?token=' + getAccessToken()) -const handleDocumentPrint = async (id) => { - window.open(documentSrc.value + '&id=' + id) +const handleDocumentPrint = async (id,masterId) => { + window.open(documentSrc.value + '&id=' + id+ '&masterId=' + masterId) } // 获取部门 用于详情 部门回显 const { wsCache } = useCache() @@ -170,12 +171,11 @@ const handleExport = async () => { exportLoading.value = true if(routeName.value.includes('SCP')){ const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params) - download.excel(data, `${t('ts.采购退货记录主')}.xlsx`) + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) }else{ const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMain(tableObject.params) - download.excel(data, `${t('ts.采购退货记录主')}.xlsx`) + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } - } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts index ff8ee85f8..4934ee993 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts @@ -28,7 +28,7 @@ export const PurchasereturnRecordMain = useCrudSchemas( table: { width: 180 }, - isTable: false + sortTableDefault: 1 }, { label: '任务单号', @@ -37,7 +37,8 @@ export const PurchasereturnRecordMain = useCrudSchemas( table: { width: 180 }, - isTable: false + + sortTableDefault: 1 }, { label: '采购收货记录单号', @@ -412,6 +413,15 @@ export const PurchasereturnRecordMain = useCrudSchemas( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x' } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, } }, { diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue index 6c99b8e79..700d90eda 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue @@ -139,6 +139,7 @@ import { getAccessToken } from '@/utils/auth' import * as BalanceApi from '@/api/wms/balance' import { async } from '@antv/x6/lib/registry/marker/async' import { getJmreportBaseUrl } from '@/utils/systemParam' +import { formatDate } from '@/utils/formatTime' // 采购退货申请 defineOptions({ name: 'PurchasereturnRequestMain' }) @@ -534,31 +535,31 @@ const butttondata = (row, $index) => { return [ defaultButtons.mainListCloseBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4', '6']), - hasPermi: 'wms:purchasereceipt-request-main:close' + hasPermi: 'wms:purchasereturn-request-main:close' }), // 关闭 defaultButtons.mainListReAddBtn({ hide: isShowMainButton(row, ['5']), - hasPermi: 'wms:purchasereceipt-request-main:reAdd' + hasPermi: 'wms:purchasereturn-request-main:reAdd' }), //重新添加 defaultButtons.mainListSubmitBtn({ hide: isShowMainButton(row, ['1']), - hasPermi: 'wms:purchasereceipt-request-main:submit' + hasPermi: 'wms:purchasereturn-request-main:submit' }), // 提交审批 defaultButtons.mainListTurnDownBtn({ hide: isShowMainButton(row, ['2']), - hasPermi: 'wms:purchasereceipt-request-main:refused' + hasPermi: 'wms:purchasereturn-request-main:refused' }), // 驳回 defaultButtons.mainListApproveBtn({ hide: isShowMainButton(row, ['2']), - hasPermi: 'wms:purchasereceipt-request-main:agree' + hasPermi: 'wms:purchasereturn-request-main:agree' }), // 审批通过 defaultButtons.mainListHandleBtn({ hide: isShowMainButton(row, ['3']), - hasPermi: 'wms:purchasereceipt-request-main:handle' + hasPermi: 'wms:purchasereturn-request-main:handle' }), // 处理 defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), - hasPermi: 'wms:purchasereceipt-request-main:update' + hasPermi: 'wms:purchasereturn-request-main:update' }) // 编辑 // { // label: '生成标签', @@ -758,7 +759,7 @@ const handleExport = async () => { const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMain( tableObject.params ) - download.excel(data, '采购退货申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -983,7 +984,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '采购退货申请主导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts index 7752f643d..03fec37ac 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts @@ -546,6 +546,15 @@ export const PurchasereturnRequestMain = useCrudSchemas( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x' } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, } }, { diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue index 5f5e2b9ed..a2ec773c7 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue @@ -70,6 +70,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { getAccessToken } from '@/utils/auth' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getJmreportBaseUrl } from '@/utils/systemParam' + import { formatDate } from '@/utils/formatTime' // 采购退货记录主 defineOptions({ name: 'PurchasereturnRecordSpareMain' }) @@ -170,10 +171,10 @@ const handleExport = async () => { exportLoading.value = true if(routeName.value.includes('SCP')){ const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params) - download.excel(data, `${t('ts.采购退货记录主')}.xlsx`) + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) }else{ const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSpare(tableObject.params) - download.excel(data, `维修备件退货记录主.xlsx`) + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } } catch { diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/purchasereturnRecordSpareMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/purchasereturnRecordSpareMain.data.ts index f742061be..52c0fb402 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/purchasereturnRecordSpareMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/purchasereturnRecordSpareMain.data.ts @@ -361,6 +361,15 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + } }, { label: '创建者', diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue index bea529f22..a5de550cc 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue @@ -141,6 +141,7 @@ import { getAccessToken } from '@/utils/auth' import * as BalanceApi from '@/api/wms/balance' import { async } from '@antv/x6/lib/registry/marker/async' import { getJmreportBaseUrl } from '@/utils/systemParam' + import { formatDate } from '@/utils/formatTime' // 采购退货申请 defineOptions({ name: 'PurchasereturnRequestSpareMain' }) @@ -708,7 +709,7 @@ const handleExport = async () => { const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMainSpare( tableObject.params ) - download.excel(data, '维修备件退货申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts index 456a626fb..afdb1d58f 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts @@ -482,6 +482,15 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ } }, isTable:false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + } }, { label: '创建者', diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue index c4a0dd4b4..7dee1ed75 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue @@ -101,6 +101,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {getAccessToken} from "@/utils/auth"; import { getJmreportBaseUrl } from '@/utils/systemParam' + import { formatDate } from '@/utils/formatTime' // 上架任务主 defineOptions({ name: 'PutawayJobMain' }) @@ -348,7 +349,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PutawayJobMainApi.exportPutawayJobMain(tableObject.params) - download.excel(data, '上架任务主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts b/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts index 7ccb28ffe..065224b82 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts +++ b/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts @@ -23,7 +23,7 @@ export const PutawayJobMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, + sortTableDefault: 1, }, { label: '供应商代码', @@ -278,6 +278,15 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, } }, { diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue index 3d07d9ad2..9aa5e6792 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue @@ -91,6 +91,7 @@ import * as PutawayRecordMainApi from '@/api/wms/putawayRecordMain' import * as PutawayRecordDetailApi from '@/api/wms/putawayRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + import { formatDate } from '@/utils/formatTime' // 上架记录主 defineOptions({ name: 'PutawayRecordMain' }) @@ -211,7 +212,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PutawayRecordMainApi.exportPutawayRecordMain(tableObject.params) - download.excel(data, '上架记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/putawayRecordMain.data.ts b/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/putawayRecordMain.data.ts index 306539cfc..7a0c13fd3 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/putawayRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/putawayRecordMain.data.ts @@ -23,7 +23,7 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, + sortTableDefault: 1, }, { label: '任务单号', @@ -32,7 +32,7 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: false, + sortTableDefault: 1, }, { label: '供应商代码', @@ -204,6 +204,15 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, } }, { diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue index 1223cadad..ad499e129 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue @@ -110,6 +110,7 @@ import { PutawayRequestMain, import * as PutawayRequestMainApi from '@/api/wms/putawayRequestMain' import * as PutawayRequestDetailApi from '@/api/wms/putawayRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' + import { formatDate } from '@/utils/formatTime' // 上架申请 defineOptions({ name: 'PutawayRequestMain' }) @@ -406,7 +407,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PutawayRequestMainApi.exportPutawayRequestMain(tableObject.params) - download.excel(data, '上架申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -475,7 +476,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '上架申请主导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts index 1e0567b0d..f68e002e1 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts @@ -219,6 +219,15 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, } }, { diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue index 76e6d66a4..b32591516 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue @@ -74,6 +74,7 @@ import * as PurchasereceiptJobDetailApi from '@/api/wms/purchasereceiptJobDetail import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {exportSparereceiptJobMain} from "@/api/wms/purchasereceiptJobMain"; +import { formatDate } from '@/utils/formatTime' // 备件收货任务主 defineOptions({ name: 'PurchasereceiptJobMain' }) @@ -259,7 +260,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PurchasereceiptJobMainApi.exportSparereceiptJobMain(tableObject.params) - download.excel(data, '备件收货任务.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts index 2be57709a..396494053 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts @@ -49,7 +49,6 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ label: '供应商代码', field: 'supplierCode', sort: 'custom', - sortTableDefault:1, table: { width: 150 }, @@ -402,7 +401,7 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable:false, + isTable:true, form: { component: 'DatePicker', componentProps: { @@ -411,6 +410,15 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '自动完成', diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue index f5270ed4f..0682aad0b 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue @@ -85,6 +85,7 @@ const routeName = ref() routeName.value = route.name const tableColumns = ref([...PurchasereceiptRecordMain.allSchemas.tableColumns,...PurchasereceiptRecordDetail.allSchemas.tableMainColumns]) const detailAllSchemas = ref(PurchasereceiptRecordDetail.allSchemas) +import { formatDate } from '@/utils/formatTime' // 字段设置 更新主列表字段 const updataTableColumns = (val) => { @@ -160,7 +161,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PurchasereceiptRecordMainApi.exportSparereceiptRecordMain(tableObject.params) - download.excel(data, '备件收货记录.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts index c5f111858..63841eb29 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts @@ -366,7 +366,6 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable:true, form: { component: 'DatePicker', componentProps: { @@ -375,6 +374,15 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + } }, { @@ -1032,7 +1040,6 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive table: { width: 150 }, - isTable:false, hiddenInMain:true }, { diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue index 622c5196f..8020ef79d 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue @@ -561,7 +561,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PurchasereceiptRequestMainApi.exportSparereceiptRequestMain(tableObject.params) - download.excel(data, '备件收货申请.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -628,7 +628,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '采购收货申请主导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts index 87959bca3..fd3e60289 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts @@ -513,7 +513,16 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, }, { label: '创建者', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue index 1057b940a..43c77fb2d 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue @@ -208,13 +208,14 @@ const searchFormClick = (searchData) => { /** 初始化 **/ onMounted(async () => { - try { - await getListHead() - } catch (error) { + // try { + // await getListHead() + // } catch (error) { - } - // updateDateTableColumns() - getList() + // } + // // updateDateTableColumns() + // getList() + seachRef.value.search() importTemplateData.templateUrl = await DemandforecastingMainApi.importTemplate() }) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts index b094557b3..19632d743 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts @@ -109,45 +109,45 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ } } }, - { - label: '版本号', - field: 'version', - sort: 'custom', - table: { - width: 150 - }, - isSearch:true, - search: { - // labelMessage: '信息提示说明!!!', - componentProps: { - multiple: true, - enterSearch: true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择版本号', // 输入框占位文本 - searchField: 'detailVersion', // 查询弹窗赋值字段 - searchTitle: '版本号', // 查询弹窗标题 - searchAllSchemas: Version.allSchemas, // 查询弹窗所需类 - searchPage: DemandforecastingDetailApi.queryVersion, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'supplierCodes', - value: 'supplierCode', - message: '请填写供应商代码!', - isMainValue: true, - isCSV:true,//是否用逗号分隔参数 - },{ - key: 'itemCodes', - value: 'itemCode', - message: '请填写物料代码!', - isMainValue: true, - isCSV:true,//是否用逗号分隔参数 - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - }, + // { + // label: '版本号', + // field: 'version', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isSearch:true, + // search: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // multiple: true, + // enterSearch: true, + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择版本号', // 输入框占位文本 + // searchField: 'detailVersion', // 查询弹窗赋值字段 + // searchTitle: '版本号', // 查询弹窗标题 + // searchAllSchemas: Version.allSchemas, // 查询弹窗所需类 + // searchPage: DemandforecastingDetailApi.queryVersion, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key: 'supplierCodes', + // value: 'supplierCode', + // message: '请填写供应商代码!', + // isMainValue: true, + // isCSV:true,//是否用逗号分隔参数 + // },{ + // key: 'itemCodes', + // value: 'itemCode', + // message: '请填写物料代码!', + // isMainValue: true, + // isCSV:true,//是否用逗号分隔参数 + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, { label: '到货日期', field: 'dueDate', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue index 9e3dea6c8..d53844f8e 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue @@ -1,7 +1,7 @@