From 98c6e4b8500d05cd183c5ef327ef7dc6c6d62a8b Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Dec 2023 10:21:48 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E7=9B=98=E7=82=B9=E5=92=8C=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E6=94=B6=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchasereceiptJobMain/index.ts | 7 ++++++- src/api/wms/purchasereceiptRequestMain/index.ts | 7 ++++++- src/components/Form/src/Form.vue | 2 +- src/views/wms/countManage/count/countPlanMain/index.vue | 2 +- .../purchasereceipt/purchasereceiptJobMain/index.vue | 2 +- .../purchasereceipt/purchasereceiptRequestMain/index.vue | 2 +- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/api/wms/purchasereceiptJobMain/index.ts b/src/api/wms/purchasereceiptJobMain/index.ts index 6c8965e80..44601138e 100644 --- a/src/api/wms/purchasereceiptJobMain/index.ts +++ b/src/api/wms/purchasereceiptJobMain/index.ts @@ -80,7 +80,12 @@ export const deletePurchasereceiptJobMain = async (id: number) => { // 导出采购收货任务主 Excel export const exportPurchasereceiptJobMain = async (params) => { - return await request.download({ url: `/wms/purchasereceipt-job-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/purchasereceipt-job-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/purchasereceipt-job-main/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/wms/purchasereceiptRequestMain/index.ts b/src/api/wms/purchasereceiptRequestMain/index.ts index 9d5c588d7..4aa84e577 100644 --- a/src/api/wms/purchasereceiptRequestMain/index.ts +++ b/src/api/wms/purchasereceiptRequestMain/index.ts @@ -64,7 +64,12 @@ export const deletePurchasereceiptRequestMain = async (id: number) => { // 导出采购收货申请主 Excel export const exportPurchasereceiptRequestMain = async (params) => { - return await request.download({ url: `/wms/purchasereceipt-request-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/purchasereceipt-request-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/purchasereceipt-request-main/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index ecd52eca9..16a4a1000 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -228,7 +228,7 @@ export default defineComponent({ formItemSlotsSearchList[item.field] = () => { return ( <> - + { diff --git a/src/views/wms/countManage/count/countPlanMain/index.vue b/src/views/wms/countManage/count/countPlanMain/index.vue index f27acef75..46c9e687b 100644 --- a/src/views/wms/countManage/count/countPlanMain/index.vue +++ b/src/views/wms/countManage/count/countPlanMain/index.vue @@ -53,7 +53,7 @@ :tableData="tableData" :apiUpdate="CountPlanMainApi.updateCountPlanMain" :apiCreate="CountPlanMainApi.createCountPlanMain" - :isBusiness="true" + :isBusiness="false" fromeWhere="countPlan" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue index 0144dd0e8..ef1305dde 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue @@ -210,7 +210,7 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await PurchasereceiptJobMainApi.exportPurchasereceiptJobMain(setSearchParams) + const data = await PurchasereceiptJobMainApi.exportPurchasereceiptJobMain(tableObject.params) download.excel(data, '采购收货任务主.xlsx') } catch { } finally { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index 45532afac..9b9ce77ec 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -297,7 +297,7 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(setSearchParams) + const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(tableObject.params) download.excel(data, '采购收货申请主.xlsx') } catch { } finally { From 1b1ece9eb4570886ae3e88b977a9a2ddf6a3ee65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Fri, 1 Dec 2023 10:40:36 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E7=94=9F=E6=88=90=E9=80=80=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionreturnRequestDetailNo/index.ts | 67 ++ .../wms/productionreturnRequestMain/index.ts | 37 +- .../productionreturnRequestMainNo/index.ts | 67 ++ .../factoryModeling/workshop/workshop.data.ts | 26 - .../productionreturnRequestMain/index.vue | 125 +-- .../productionreturnRequestMain.data.ts | 503 ++++++----- .../productionreturnRequestMainNo/index.vue | 367 ++++++++ .../productionreturnRequestMainNo.data.ts | 804 ++++++++++++++++++ 8 files changed, 1692 insertions(+), 304 deletions(-) create mode 100644 src/api/wms/productionreturnRequestDetailNo/index.ts create mode 100644 src/api/wms/productionreturnRequestMainNo/index.ts create mode 100644 src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue create mode 100644 src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts diff --git a/src/api/wms/productionreturnRequestDetailNo/index.ts b/src/api/wms/productionreturnRequestDetailNo/index.ts new file mode 100644 index 000000000..66dd5921d --- /dev/null +++ b/src/api/wms/productionreturnRequestDetailNo/index.ts @@ -0,0 +1,67 @@ +import request from '@/config/axios' + +export interface ProductionreturnRequestDetailVO { + productionLineCode: string + workStationCode: string + inventoryStatus: string + fromOwnerCode: string + packingNumber: string + containerNumber: string + batch: string + fromLocationCode: string + number: string + itemCode: string + remark: string + createTime: Date + creator: string + itemName: string + itemDesc1: string + itemDesc2: string + projectCode: string + qty: number + uom: string + updateTime: Date + updater: string + toOwnerCode: string +} + +// 查询生产退料申请子列表 +export const getProductionreturnRequestDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionreturn-request-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productionreturn-request-detail/page`, params }) + } +} + +// 查询生产退料申请子详情 +export const getProductionreturnRequestDetail = async (id: number) => { + return await request.get({ url: `/wms/productionreturn-request-detail/get?id=` + id }) +} + +// 新增生产退料申请子 +export const createProductionreturnRequestDetail = async (data: ProductionreturnRequestDetailVO) => { + return await request.post({ url: `/wms/productionreturn-request-detail/create`, data }) +} + +// 修改生产退料申请子 +export const updateProductionreturnRequestDetail = async (data: ProductionreturnRequestDetailVO) => { + return await request.put({ url: `/wms/productionreturn-request-detail/update`, data }) +} + +// 删除生产退料申请子 +export const deleteProductionreturnRequestDetail = async (id: number) => { + return await request.delete({ url: `/wms/productionreturn-request-detail/delete?id=` + id }) +} + +// 导出生产退料申请子 Excel +export const exportProductionreturnRequestDetail = async (params) => { + return await request.download({ url: `/wms/productionreturn-request-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productionreturn-request-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/productionreturnRequestMain/index.ts b/src/api/wms/productionreturnRequestMain/index.ts index 634910b28..3c93fec0a 100644 --- a/src/api/wms/productionreturnRequestMain/index.ts +++ b/src/api/wms/productionreturnRequestMain/index.ts @@ -58,10 +58,45 @@ export const deleteProductionreturnRequestMain = async (id: number) => { // 导出生产退料申请主 Excel export const exportProductionreturnRequestMain = async (params) => { - return await request.download({ url: `/wms/productionreturn-request-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productionreturn-request-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productionreturn-request-main/export-excel`, params }) + } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/productionreturn-request-main/get-import-template' }) +} + +// 关闭 +export const close = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/close?id=' + id }) +} + +// 重新添加 +export const reAdd = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/reAdd?id=' + id }) +} + +// 提交审批 +export const submit = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/submit?id=' + id }) +} + +// 驳回 +export const refused = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/refused?id=' + id }) +} + +// 审批通过 +export const agree = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/agree?id=' + id }) +} + +// 处理 +export const handle = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/handle?id=' + id }) } \ No newline at end of file diff --git a/src/api/wms/productionreturnRequestMainNo/index.ts b/src/api/wms/productionreturnRequestMainNo/index.ts new file mode 100644 index 000000000..634910b28 --- /dev/null +++ b/src/api/wms/productionreturnRequestMainNo/index.ts @@ -0,0 +1,67 @@ +import request from '@/config/axios' + +export interface ProductionreturnRequestMainVO { + workshopCode: string + fromWarehouseCode: string + fromLocationTypes: string + fromAreaCodes: string + number: string + businessType: string + remark: string + createTime: Date + creator: string + requestTime: Date + dueTime: Date + departmentCode: string + status: string + updateTime: Date + updater: string + toWarehouseCode: string + toLocationTypes: string + toAreaCodes: string + autoCommit: string + autoAgree: string + autoExecute: string + directCreateRecord: string +} + +// 查询生产退料申请主列表 +export const getProductionreturnRequestMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionreturn-request-main/senior', data }) + } else { + return await request.get({ url: `/wms/productionreturn-request-main/page`, params }) + } +} + +// 查询生产退料申请主详情 +export const getProductionreturnRequestMain = async (id: number) => { + return await request.get({ url: `/wms/productionreturn-request-main/get?id=` + id }) +} + +// 新增生产退料申请主 +export const createProductionreturnRequestMain = async (data: ProductionreturnRequestMainVO) => { + return await request.post({ url: `/wms/productionreturn-request-main/create`, data }) +} + +// 修改生产退料申请主 +export const updateProductionreturnRequestMain = async (data: ProductionreturnRequestMainVO) => { + return await request.put({ url: `/wms/productionreturn-request-main/update`, data }) +} + +// 删除生产退料申请主 +export const deleteProductionreturnRequestMain = async (id: number) => { + return await request.delete({ url: `/wms/productionreturn-request-main/delete?id=` + id }) +} + +// 导出生产退料申请主 Excel +export const exportProductionreturnRequestMain = async (params) => { + return await request.download({ url: `/wms/productionreturn-request-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productionreturn-request-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts b/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts index 1da0eb2b1..9290a46a0 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts @@ -14,7 +14,6 @@ export const Workshop = useCrudSchemas(reactive([ field: 'code', sort: 'custom', table: { - width: 150, fixed: 'left' }, isSearch: true @@ -23,9 +22,6 @@ export const Workshop = useCrudSchemas(reactive([ label: '名称', field: 'name', sort: 'custom', - table: { - width: 150 - }, isSearch: true }, { @@ -36,9 +32,6 @@ export const Workshop = useCrudSchemas(reactive([ isSearch: true, isTable: true, sort: 'custom', - table: { - width: 150 - }, }, { label: '是否可用', @@ -48,9 +41,6 @@ export const Workshop = useCrudSchemas(reactive([ isSearch: true, isTable: true, sort: 'custom', - table: { - width: 150 - }, form: { component: 'Switch', value: 'TRUE', @@ -69,9 +59,6 @@ export const Workshop = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', - table: { - width: 180 - }, form: { component: 'DatePicker', componentProps: { @@ -91,9 +78,6 @@ export const Workshop = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', - table: { - width: 180 - }, form: { component: 'DatePicker', componentProps: { @@ -112,9 +96,6 @@ export const Workshop = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', - table: { - width: 180 - }, form: { component: 'DatePicker', componentProps: { @@ -131,17 +112,11 @@ export const Workshop = useCrudSchemas(reactive([ label: '备注', field: 'remark', sort: 'custom', - table: { - width: 150 - }, }, { label: '创建者', field: 'creator', sort: 'custom', - table: { - width: 150 - }, isForm: false, isTable: false }, @@ -151,7 +126,6 @@ export const Workshop = useCrudSchemas(reactive([ isDetail: false, isForm: false , table: { - width: 150, fixed: 'right' } } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 93567545d..c60dd2d38 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -67,13 +67,9 @@ :apiUpdate="ProductionreturnRequestDetailApi.updateProductionreturnRequestDetail" :apiPage="ProductionreturnRequestDetailApi.getProductionreturnRequestDetailPage" :apiDelete="ProductionreturnRequestDetailApi.deleteProductionreturnRequestDetail" - :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" /> - - diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 77d039a7a..77beca909 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -59,36 +59,6 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive } }, }, - { - label: '从仓库代码', - field: 'fromWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, - { - label: '从库位类型范围', - field: 'fromLocationTypes', - dictType: DICT_TYPE.LOCATION_TYPE, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, - { - label: '从库区代码范围', - field: 'fromAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, { label: '单据号', field: 'number', @@ -101,53 +71,22 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive isSearch: true, }, { - label: '业务类型', - field: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, - { - label: '备注', - field: 'remark', + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, sort: 'custom', table: { width: 150 }, - isTable: false - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, form: { - component: 'DatePicker', + value: '1', componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + disabled: true } - }, - isForm: false - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isForm: false + } }, { label: '申请时间', @@ -193,23 +132,21 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive }, }, { - label: '部门', - field: 'departmentCode', + label: '从库位类型范围', + field: 'fromLocationTypes', + dictType: DICT_TYPE.LOCATION_TYPE, + dictClass: 'string', + isTable: true, sort: 'custom', table: { width: 150 }, - form: { - value: userDept.name, - componentProps: { - disabled: true - } - } + isForm: false, }, { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, + label: '到库位类型范围', + field: 'toLocationTypes', + dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, isTable: true, @@ -217,43 +154,34 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive table: { width: 150 }, - form: { - value: '1', - componentProps: { - disabled: true - } - } + isForm: false, }, { - label: '最后更新时间', - field: 'updateTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, + label: '从库区代码范围', + field: 'fromAreaCodes', sort: 'custom', table: { - width: 180 + width: 150 }, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } + isForm: false, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 }, - isForm: false + isForm: false, }, { - label: '最后更新者', - field: 'updater', + label: '从仓库代码', + field: 'fromWarehouseCode', sort: 'custom', table: { width: 150 }, - isForm: false + isForm: false, }, { label: '到仓库代码', @@ -265,27 +193,37 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive isForm: false, }, { - label: '到库位类型范围', - field: 'toLocationTypes', - dictType: DICT_TYPE.LOCATION_TYPE, - dictClass: 'string', - isSearch: true, - isTable: true, + label: '备注', + field: 'remark', sort: 'custom', table: { width: 150 }, - isForm: false, + isTable: false }, { - label: '到库区代码范围', - field: 'toAreaCodes', + label: '业务类型', + field: 'businessType', sort: 'custom', table: { width: 150 }, isForm: false, }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: userDept.name, + componentProps: { + disabled: true + } + } + }, { label: '自动提交', field: 'autoCommit', @@ -366,6 +304,68 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive } } }, + { + 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 + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + 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', + } + }, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, { label: '操作', field: 'action', @@ -436,6 +436,10 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts new file mode 100644 index 000000000..77d039a7a --- /dev/null +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts @@ -0,0 +1,804 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' + +import * as ProductionlineApi from '@/api/wms/productionline' +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' + +import * as WorkstationApi from '@/api/wms/workstation' +import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' + +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'MaterialReturnRequest' +} + const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const requestsettingData =data?.list[0]||{} + + // 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept + +/** + * @returns {Array} 生产退料申请主表 + */ +export const ProductionreturnRequestMain = useCrudSchemas(reactive([ + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '从库位类型范围', + field: 'fromLocationTypes', + dictType: DICT_TYPE.LOCATION_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isForm: false, + isSearch: true, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '创建者', + field: 'creator', + 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: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: userDept.name, + componentProps: { + disabled: true + } + } + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: 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 + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库位类型范围', + field: 'toLocationTypes', + dictType: DICT_TYPE.LOCATION_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + 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, + 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, + 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', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true, + } + } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + }, + } +])) + +//表单校验 +export const ProductionreturnRequestMainRules = reactive({ + // fromWarehouseCode: [ + // { required: true, message: '请输入从仓库代码', trigger: 'blur' } + // ], + // fromLocationTypes: [ + // { required: true, message: '请选择从库位类型范围', trigger: 'change' } + // ], + // toWarehouseCode: [ + // { required: true, message: '请输入到仓库代码', trigger: 'blur' } + // ], + // toLocationTypes: [ + // { required: true, message: '请选择到库位类型范围', trigger: 'change' } + // ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + // businessType: [ + // { required: true, message: '请输入业务类型', trigger: 'blur' } + // ], +}) + +/** + * @returns {Array} 生产退料申请子表 + */ +export const ProductionreturnRequestDetail = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工位信息', // 查询弹窗标题 + searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工位信息', // 查询弹窗标题 + searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装号', // 输入框占位文本 + searchField: 'packingNumber', // 查询弹窗赋值字段 + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法 + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择包装号', // 输入框占位文本 + searchField: 'packingNumber', // 查询弹窗赋值字段 + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法 + }, + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物品代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: 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', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物品描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物品描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } + }, + { + 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' + }, + isTableForm:false, + } +])) + +//表单校验 +export const ProductionreturnRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + // fromLocationCode: [ + // { required: true, message: '请输入从库位代码', trigger: 'blur' } + // ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], +}) \ No newline at end of file From 9ecaaa06ceea2c5881954822b7d90b6891aff02f Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Fri, 1 Dec 2023 11:09:40 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E7=9B=98=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/countJobMain/index.ts | 7 +- src/api/wms/countPlanMain/index.ts | 35 ++++++++ src/api/wms/countRequestMain/index.ts | 32 ++++++- .../countManage/count/countJobMain/index.vue | 18 +++- .../countManage/count/countPlanMain/index.vue | 81 +++++++++++++---- .../count/countRequestMain/index.vue | 90 +++++++++++++++---- 6 files changed, 223 insertions(+), 40 deletions(-) diff --git a/src/api/wms/countJobMain/index.ts b/src/api/wms/countJobMain/index.ts index a2c6bc5f9..48ce99185 100644 --- a/src/api/wms/countJobMain/index.ts +++ b/src/api/wms/countJobMain/index.ts @@ -79,4 +79,9 @@ export const exportCountJobMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/count-job-main/get-import-template' }) -} \ No newline at end of file +} + +// 关闭盘点任务主 +export const closeCountJobMain = (id: number) => { + return request.download({ url: '/wms/count-job-main/close?id=' + id }) +} diff --git a/src/api/wms/countPlanMain/index.ts b/src/api/wms/countPlanMain/index.ts index 58d45ba32..b62d13077 100644 --- a/src/api/wms/countPlanMain/index.ts +++ b/src/api/wms/countPlanMain/index.ts @@ -66,4 +66,39 @@ export const exportCountPlanMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/count-plan-main/get-import-template' }) +} + +// 关闭 +export const close = (id) => { + return request.put({ url: '/wms/count-plan-main/close?id=' + id }) +} + +// 提交审批 +export const submit = (id) => { + return request.put({ url: '/wms/count-plan-main/submit?id=' + id }) +} + +// 打开 +export const open = (id) => { + return request.put({ url: '/wms/count-plan-main/open?id=' + id }) +} + +// 驳回 +export const reject = (id) => { + return request.put({ url: '/wms/count-plan-main/reject?id=' + id }) +} + +// 通过 +export const agree = (id) => { + return request.put({ url: '/wms/count-plan-main/agree?id=' + id }) +} + +// 发布 +export const publish = (id) => { + return request.put({ url: '/wms/count-plan-main/publish?id=' + id }) +} + +// 重置 +export const resetting = (id) => { + return request.put({ url: '/wms/count-plan-main/resetting?id=' + id }) } \ No newline at end of file diff --git a/src/api/wms/countRequestMain/index.ts b/src/api/wms/countRequestMain/index.ts index 7d1eb304a..2f462c421 100644 --- a/src/api/wms/countRequestMain/index.ts +++ b/src/api/wms/countRequestMain/index.ts @@ -61,4 +61,34 @@ export const exportCountRequestMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/count-request-main/get-import-template' }) -} \ No newline at end of file +} + +// 关闭盘点申请主 Excel +export const closeCountRequestMain = async (id) => { + return await request.put({ url: `/wms/count-request-main/close?id=` + id }) +} + +// 重新添加盘点申请主 Excel +export const reAddCountRequestMain = async (id) => { + return await request.put({ url: `/wms/count-request-main/reAdd?id=` + id }) +} + +// 提交盘点申请主 Excel +export const submitCountRequestMain = async (id) => { + return await request.put({ url: `/wms/count-request-main/submit?id=` + id }) +} + +// 审批通过盘点申请主 Excel +export const agreeCountRequestMain = async (id) => { + return await request.put({ url: `/wms/count-request-main/agree?id=` + id }) +} + +// 审批驳回盘点申请主 Excel +export const refusedCountRequestMain = async (id) => { + return await request.put({ url: `/wms/count-request-main/refused?id=` + id }) +} + +// 处理盘点申请主 Excel +export const handleCountRequestMain = async (id) => { + return await request.put({ url: `/wms/count-request-main/handle?id=` + id }) +} diff --git a/src/views/wms/countManage/count/countJobMain/index.vue b/src/views/wms/countManage/count/countJobMain/index.vue index 8ee5228ee..45bd1d558 100644 --- a/src/views/wms/countManage/count/countJobMain/index.vue +++ b/src/views/wms/countManage/count/countJobMain/index.vue @@ -174,9 +174,9 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 - defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 - defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 + // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 + defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-job-main:close'}), // 关闭 + // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 ] } @@ -188,12 +188,22 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainJobAba') { // 放弃 console.log('列表-操作按钮事件-放弃') } else if (val == 'mainJobClo') { // 关闭 - console.log('列表-操作按钮事件-关闭') + handleClose(row.id) } else if (val == 'mainJobAcc') { // 承接 console.log('列表-操作按钮事件-承接') } } +/** 关闭按钮操作 */ +const handleClose = async (id: number) => { + try { + await message.confirm(t('common.confirmColse')) + await CountJobMainApi.closeCountJobMain(id) + message.success(t('common.closeSuccess')) + await getList() + } catch {} +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/countManage/count/countPlanMain/index.vue b/src/views/wms/countManage/count/countPlanMain/index.vue index 46c9e687b..347151989 100644 --- a/src/views/wms/countManage/count/countPlanMain/index.vue +++ b/src/views/wms/countManage/count/countPlanMain/index.vue @@ -204,14 +204,14 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:count-plan-main:open'}), // 打开 - defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:count-plan-main:close'}), // 关闭 - defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:submit'}), // 提交审批 - defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:reject'}), // 驳回 - defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:agree'}), // 审批通过 - defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:count-plan-main:publish'}), // 发布 - defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:'wms:count-plan-main:resetting'}), // 重置 - defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:update'}), // 编辑 + defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:count-plan-main:open'}), // 打开 + defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:count-plan-main:close'}), // 关闭 + defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:submit'}), // 提交审批 + defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:reject'}), // 驳回 + defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:agree'}), // 审批通过 + defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:count-plan-main:publish'}), // 发布 + defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:'wms:count-plan-main:resetting'}), // 重置 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:update'}), // 编辑 ] } @@ -219,16 +219,61 @@ const butttondata = (row) => { // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { - if (val == 'mainClose') { // 关闭 - console.log('列表-操作按钮事件-关闭') - } else if (val == 'mainReAdd') { // 重新添加 - console.log('列表-操作按钮事件-重新添加') - } else if (val == 'mainSubmit') { // 提交审批 - console.log('列表-操作按钮事件-提交审批') - } else if (val == 'mainTurnDown') { // 驳回 - console.log('列表-操作按钮事件-驳回') - } else if (val == 'mainApprove') { // 审批通过 - console.log('列表-操作按钮事件-审批通过') + if (val == 'mainPlanOpe') { // 打开 + CountPlanMainApi.open(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) + } else if (val == 'mainPlanClo') { // 关闭 + await message.confirm('确认要关闭吗?') + CountPlanMainApi.close(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) + } else if (val == 'mainPlanSub') { // 提交审批 + await message.confirm('确认要提交审批吗?') + CountPlanMainApi.submit(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) + } else if (val == 'mainPlanTur') { // 驳回 + await message.confirm('确认要驳回吗?') + CountPlanMainApi.reject(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) + } else if (val == 'mainPlanApp') { // 审批通过 + await message.confirm('确认要审批通过吗?') + CountPlanMainApi.agree(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) + } else if (val == 'mainPlanPub') { // 发布 + await message.confirm('确认要发布吗?') + CountPlanMainApi.publish(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) + } else if (val == 'mainPlanRes') { // 重置 + await message.confirm('确认要重置吗?') + CountPlanMainApi.resetting(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'edit') { // 编辑 openForm('update', row) } else if (val == 'delete') { // 删除 diff --git a/src/views/wms/countManage/count/countRequestMain/index.vue b/src/views/wms/countManage/count/countRequestMain/index.vue index 877b6f7f4..923ec3a24 100644 --- a/src/views/wms/countManage/count/countRequestMain/index.vue +++ b/src/views/wms/countManage/count/countRequestMain/index.vue @@ -192,34 +192,32 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加 - defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 - defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 - defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 - defaultButtons.mainListEditBtn({hasPermi:'wms:count-request-main:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'wms:count-request-main:delete'}), // 删除 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:count-request-main:close'}), // 关闭 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:count-request-main:reAdd'}), //重新添加 + defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-request-main:submit'}), // 提交审批 + defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-request-main:refused'}), // 驳回 + defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-request-main:agree'}), // 审批通过 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:count-request-main:handle'}), // 处理 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-request-main:update'}), // 编辑 ] } - - // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'mainClose') { // 关闭 - console.log('列表-操作按钮事件-关闭') + handleClose(row.id) } else if (val == 'mainReAdd') { // 重新添加 - console.log('列表-操作按钮事件-重新添加') + handleReAdd(row.id) } else if (val == 'mainSubmit') { // 提交审批 - console.log('列表-操作按钮事件-提交审批') + handleSubmit(row.id) } else if (val == 'mainTurnDown') { // 驳回 - console.log('列表-操作按钮事件-驳回') + handleRefused(row.id) } else if (val == 'mainApprove') { // 审批通过 - console.log('列表-操作按钮事件-审批通过') + handleAgree(row.id) + } else if (val == 'mainHandle') { // 处理 + handleHandle(row.id) } else if (val == 'edit') { // 编辑 openForm('update', row) - } else if (val == 'delete') { // 删除 - handleDelete(row.id) } } @@ -230,6 +228,66 @@ const openForm =async (type: string, row?: number) => { formRef.value.open(type, row) } +/** 关闭按钮操作 */ +const handleClose = async (id: number) => { + try { + await message.confirm(t('common.confirmColse')) + await CountRequestMainApi.closeCountRequestMain(id) + message.success(t('common.closeSuccess')) + await getList() + } catch {} +} + +/** 重新添加按钮操作 */ +const handleReAdd = async (id: number) => { + try { + await message.confirm(t('common.confirmReAdd')) + await CountRequestMainApi.reAddCountRequestMain(id) + message.success(t('common.reAddSuccess')) + await getList() + } catch {} +} + +/** 审批通过按钮操作 */ +const handleAgree = async (id: number) => { + try { + await message.confirm(t('common.confirmAgree')) + await CountRequestMainApi.agreeCountRequestMain(id) + message.success(t('common.agreeSuccess')) + await getList() + } catch {} +} + +/** 审批驳回按钮操作 */ +const handleRefused = async (id: number) => { + try { + await message.confirm(t('common.confirmRefused')) + await CountRequestMainApi.refusedCountRequestMain(id) + message.success(t('common.refusedSuccess')) + await getList() + } catch {} +} + +/** 处理按钮操作 */ +const handleHandle = async (id: number) => { + try { + await message.confirm(t('common.confirmHandle')) + await CountRequestMainApi.handleCountRequestMain(id) + message.success(t('common.handleSuccess')) + await getList() + } catch {} +} + +/** 提交按钮操作 */ +const handleSubmit = async (id: number) => { + try { + await message.confirm(t('common.confirmSubmit')) + await CountRequestMainApi.submitCountRequestMain(id) + message.success(t('common.submitSuccess')) + await getList() + } catch {} +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { From bd3aab844aedab2ce75fb7e870c5f666c15d3ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Fri, 1 Dec 2023 11:15:19 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=8F=91=E6=96=99=E7=94=B3=E8=AF=B7=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=8E=E7=BB=86=E6=95=B0=E6=8D=AE=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E7=BA=BF=E5=B7=A5=E4=BD=8D=E4=B8=8D=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issue/issueRequestMain/index.vue | 25 ++++++++++++- .../issueRequestMain/issueRequestMain.data.ts | 36 +++++++++---------- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index c47a81102..6d1cd909b 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -294,7 +294,13 @@ const tableData = ref([]) // 添加明细 const handleAddTable = () => { - tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) + // 添加明细 已有数据 添加的明细 生产线 工位按照之前数据进行添加 + let tableForm = JSON.parse(JSON.stringify(tableFormKeys)) + if (tableData.value.length > 0) { + tableForm.productionLineCode = tableData.value[0].productionLineCode + tableForm.workStationCode = tableData.value[0].workStationCode + } + tableData.value.push(tableForm) } // 删除明细 const handleDeleteTable = (item, index) => { @@ -304,6 +310,23 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 + // 判断子表中,是否有不同的生产线和工位 + if (tableData.value.length > 0) { + let productionLineCode = tableData.value[0].productionLineCode + let workStationCode = tableData.value[0].workStationCode + for(var i=0;i([ - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, - dictClass: 'string', - isSearch: true, - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - form: { - value: '1', - componentProps: { - disabled: true - } - } - }, { label: '车间代码', field: 'workshopCode', @@ -76,6 +58,24 @@ export const IssueRequestMain = useCrudSchemas(reactive([ } } }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, { label: '从仓库代码', field: 'fromWarehouseCode', From 0415936596e62de73422259c0d3a919ee43ff0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Fri, 1 Dec 2023 11:37:15 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=8F=91=E6=96=99=E7=94=B3=E8=AF=B7=20tabl?= =?UTF-8?q?eform=E6=95=B0=E6=8D=AE=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/issueManage/issue/issueRequestMain/index.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index 6d1cd909b..b4fae40b0 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -68,6 +68,7 @@ :apiPage="IssueRequestDetailApi.getIssueRequestDetailPage" :apiDelete="IssueRequestDetailApi.deleteIssueRequestDetail" @searchTableSuccessDetail="searchTableSuccessDetail" + :detailValidate="detailValidate" /> @@ -343,6 +344,13 @@ const submitForm = async (formType, data) => { } } +// 子表新增/编辑校验 +const detailValidate = async (data) => { + // let rs = false + // TODO: 单一新编/编辑,校验是否与其他子数据存在生产线工位有不同数据情况 + return true + } + /** 导入 */ const importFormRef = ref() const handleImport = () => { From c77f49285ca3b3dca31d0e0a1139321febd45716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Fri, 1 Dec 2023 14:35:40 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=A7=84=E5=88=99=E7=AD=96=E7=95=A5=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../strategySetting/rule/rule.data.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts b/src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts index 83dac5474..ebd689dc1 100644 --- a/src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts +++ b/src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts @@ -26,12 +26,12 @@ export const Rule = useCrudSchemas(reactive([ } }, }, - { - label: '代码', - field: 'code', - sort: 'custom', - isSearch:true - }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // isSearch:true + // }, { label: '名称', field: 'name', @@ -68,9 +68,9 @@ export const RuleRules = reactive({ priority: [ { required: true, message: '请输入优先级', trigger: 'blur' } ], - code: [ - { required: true, message: '请输入代码', trigger: 'blur' } - ], + // code: [ + // { required: true, message: '请输入代码', trigger: 'blur' } + // ], configuration: [ { required: true, message: '请输入配置', trigger: 'blur' } ], From 3822caada9b815f43fb84e7c56b2a98f0f882f4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Fri, 1 Dec 2023 15:48:29 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=8F=91=E6=96=99=E7=94=B3=E8=AF=B7=20?= =?UTF-8?q?=E7=89=A9=E5=93=81=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9=E4=BB=8E?= =?UTF-8?q?=E7=89=A9=E5=93=81=E5=9F=BA=E7=A1=80=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issueRequestMain/issueRequestMain.data.ts | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts index b8ba89fb3..acd0ee701 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts @@ -14,6 +14,9 @@ import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/w import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -596,15 +599,11 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ isInpuFocusShow: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择物品代码', // 输入框占位文本 - searchField: 'itemCode', // 查询弹窗赋值字段 - searchTitle: '生产线物品信息', // 查询弹窗标题 - searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 - searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物品信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 searchCondition: [{ - key:'productionLineCode', - value:'productionLineCode', - isMainValue: true - },{ key: 'available', value: 'TRUE', isMainValue: false @@ -615,15 +614,11 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ componentProps: { isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择物品代码', // 输入框占位文本 - searchField: 'itemCode', // 查询弹窗赋值字段 - searchTitle: '生产线物品信息', // 查询弹窗标题 - searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 - searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物品信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 searchCondition: [{ - key:'productionLineCode', - value:'productionLineCode', - isMainValue: true - },{ key: 'available', value: 'TRUE', isMainValue: false