From a83e1dc23e3ea063a05170cc82b9299b5e0c93be Mon Sep 17 00:00:00 2001 From: "HUOJIN\\92525" Date: Thu, 5 Mar 2026 11:55:50 +0800 Subject: [PATCH] no message --- src/views/base/point/Point.api.ts | 7 + src/views/count/CountPlan.api.ts | 64 +++++--- src/views/count/CountPlan.data.ts | 23 ++- src/views/count/CountPlanList.vue | 69 +++++--- .../components/issueTask/IssueTaskForm.vue | 153 ++++++++++++++++++ .../components/issueTask/IssueTaskModal.vue | 74 +++++++++ 6 files changed, 343 insertions(+), 47 deletions(-) create mode 100644 src/views/count/components/issueTask/IssueTaskForm.vue create mode 100644 src/views/count/components/issueTask/IssueTaskModal.vue diff --git a/src/views/base/point/Point.api.ts b/src/views/base/point/Point.api.ts index b525f13..0745f6e 100644 --- a/src/views/base/point/Point.api.ts +++ b/src/views/base/point/Point.api.ts @@ -12,6 +12,7 @@ enum Api { deleteBatch = '/base/point/deleteBatch', importExcel = '/base/point/importExcel', exportXls = '/base/point/exportXls', + queryOutWorkStation='/base/point/queryOutWorkStation', } /** @@ -78,3 +79,9 @@ export const saveOrUpdate = (params, isUpdate) => { const url = isUpdate ? Api.edit : Api.save; return defHttp.post({ url: url, params }, { isTransformResponse: false }); } + + +export const queryOutWorkStation = (params) => defHttp.get( + { url: Api.queryOutWorkStation, params }, + {isTransformResponse: false,} +); diff --git a/src/views/count/CountPlan.api.ts b/src/views/count/CountPlan.api.ts index c29f104..1eba4bd 100644 --- a/src/views/count/CountPlan.api.ts +++ b/src/views/count/CountPlan.api.ts @@ -1,19 +1,21 @@ -import {defHttp} from '/@/utils/http/axios'; -import { useMessage } from "/@/hooks/web/useMessage"; +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; const { createConfirm } = useMessage(); enum Api { list = '/count/countPlan/list', - save='/count/countPlan/add', - edit='/count/countPlan/edit', + save = '/count/countPlan/add', + edit = '/count/countPlan/edit', deleteOne = '/count/countPlan/delete', deleteBatch = '/count/countPlan/deleteBatch', importExcel = '/count/countPlan/importExcel', exportXls = '/count/countPlan/exportXls', queryDataById = '/count/countPlan/queryById', countDetailList = '/count/countPlan/queryCountDetailByMainId', + countIssueTask = '/count/countPlan/countIssueTask', } + /** * 导出api * @param params @@ -28,24 +30,27 @@ export const getImportUrl = Api.importExcel; * 查询子表数据 * @param params */ -export const queryCountDetailListByMainId = (id) => defHttp.get({url: Api.countDetailList, params:{ id }}); +export const queryCountDetailListByMainId = (id) => + defHttp.get({ + url: Api.countDetailList, + params: { id }, + }); -export const queryDataById = (id) => defHttp.get({url: Api.queryDataById, params:{ id }}); +export const queryDataById = (id) => defHttp.get({ url: Api.queryDataById, params: { id } }); /** * 列表接口 * @param params */ -export const list = (params) => - defHttp.get({url: Api.list, params}); +export const list = (params) => defHttp.get({ url: Api.list, params }); /** * 删除单个 */ -export const deleteOne = (params,handleSuccess) => { - return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { +export const deleteOne = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); }); -} +}; /** * 批量删除 * @param params @@ -58,17 +63,40 @@ export const batchDelete = (params, handleSuccess) => { okText: '确认', cancelText: '取消', onOk: () => { - return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { - handleSuccess(); - }); - } + return defHttp + .delete( + { + url: Api.deleteBatch, + data: params, + }, + { joinParamsToUrl: true } + ) + .then(() => { + handleSuccess(); + }); + }, }); -} +}; /** * 保存或者更新 * @param params */ export const saveOrUpdate = (params, isUpdate) => { const url = isUpdate ? Api.edit : Api.save; - return defHttp.post({url: url, params}); -} + return defHttp.post({ url: url, params }); +}; + +/** + * 任务下发 + * @param workStations + */ +export const countIssueTask = (workStations) => + defHttp.get( + { + url: Api.countIssueTask, + params: { workStations }, + }, + { + isTransformResponse: false, + } + ); diff --git a/src/views/count/CountPlan.data.ts b/src/views/count/CountPlan.data.ts index ffa4ae9..cc37a7f 100644 --- a/src/views/count/CountPlan.data.ts +++ b/src/views/count/CountPlan.data.ts @@ -1,7 +1,13 @@ import { BasicColumn } from '/@/components/Table'; import { JVxeTypes, JVxeColumn } from '/@/components/jeecg/JVxeTable/types'; +import { render } from '@/utils/common/renderUtils'; //列表数据 export const columns: BasicColumn[] = [ + { + title: '库区', + align: 'center', + dataIndex: 'areaId_dictText', + }, { title: '盘点单号', align: 'center', @@ -16,11 +22,18 @@ export const columns: BasicColumn[] = [ title: '状态', align: 'center', dataIndex: 'status_dictText', - }, - { - title: '审核人', - align: 'center', - dataIndex: 'auditor', + customRender: ({ text }) => { + //盘点状态:1.已创建;2.已审核;3.盘点中;4.盘点完成;5.已取消;6.已关闭; + const statusColorMap = { + 已创建: 'orange', + 盘点中: 'blue', + 盘点完成: 'green', + 已关闭: 'green', + 已取消: 'red', + }; + const color = statusColorMap[text] || 'red'; + return render.renderTag(text, color); + }, }, { title: '创建时间', diff --git a/src/views/count/CountPlanList.vue b/src/views/count/CountPlanList.vue index 6460071..6a16627 100644 --- a/src/views/count/CountPlanList.vue +++ b/src/views/count/CountPlanList.vue @@ -5,21 +5,29 @@ - - - + + + - - - + + + + + + + + + + + - - - + + + @@ -35,14 +43,6 @@ - - - @@ -85,6 +85,7 @@ + @@ -100,10 +101,15 @@ import { JInputTypeEnum } from '@/enums/cpteEnum'; import { JInput, JDictSelectTag } from '@/components/Form'; import JRangeDate from '@/components/Form/src/jeecg/components/JRangeDate.vue'; + import JSelectMultiple from '../../components/Form/src/jeecg/components/JSelectMultiple.vue'; + import ScanTrayModal from '@/views/receive/asn/components/scanTray/ScanTrayModal.vue'; + import IssueTaskModal from '@/views/count/components/issueTask/IssueTaskModal.vue'; const fieldPickers = reactive({}); const formRef = ref(); - const queryParam = reactive({}); + const queryParam = reactive({ + status_MultiString: '1,3,4', // 默认查询已创建、盘点中、盘点完成 + }); //注册model const [registerModal, { openModal }] = useModal(); //注册table数据 @@ -123,12 +129,12 @@ const newQueryParam = { ...queryParam }; // 处理日期范围 - if (newQueryParam.orderDate) { + if (newQueryParam.createTime) { try { - const [begin, end] = newQueryParam.orderDate.split(','); - if (begin !== undefined) newQueryParam.orderDate_begin = begin; - if (end !== undefined) newQueryParam.orderDate_end = end; - delete newQueryParam.orderDate; + const [begin, end] = newQueryParam.createTime.split(','); + if (begin !== undefined) newQueryParam.createTime_begin = begin; + if (end !== undefined) newQueryParam.createTime_end = end; + delete newQueryParam.createTime; } catch (error) { console.error('日期范围处理错误:', error); } @@ -190,6 +196,16 @@ }); } + /** + * 下发 + */ + const registerIssueTaskModal = ref(); + + function handleIssueTask(record) { + registerIssueTaskModal.value.disableSubmit = false; + registerIssueTaskModal.value.edit(record); + } + /** * 删除事件 */ @@ -229,9 +245,14 @@ */ function getDropDownAction(record) { return [ - { + /*{ label: '详情', onClick: handleDetail.bind(null, record), + },*/ + { + label: '下发', + onClick: handleIssueTask.bind(null, record), + auth: 'count:data_count_plan:countIssueTask', }, { label: '删除', diff --git a/src/views/count/components/issueTask/IssueTaskForm.vue b/src/views/count/components/issueTask/IssueTaskForm.vue new file mode 100644 index 0000000..946ec1d --- /dev/null +++ b/src/views/count/components/issueTask/IssueTaskForm.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/src/views/count/components/issueTask/IssueTaskModal.vue b/src/views/count/components/issueTask/IssueTaskModal.vue new file mode 100644 index 0000000..b4ecbde --- /dev/null +++ b/src/views/count/components/issueTask/IssueTaskModal.vue @@ -0,0 +1,74 @@ + + + + + +