diff --git a/src/api/sc/stock/warning/index.ts b/src/api/sc/stock/warning/index.ts index 498af049bc9cb13315408b59f46d8a35b7e77c4f..b51291147b5cdc383f2896e1229d79a4c076a034 100644 --- a/src/api/sc/stock/warning/index.ts +++ b/src/api/sc/stock/warning/index.ts @@ -1,5 +1,5 @@ import { defHttp } from '/@/utils/http/axios'; -import { ContentTypeEnum } from '@/enums/httpEnum'; +import { ContentTypeEnum, ResponseEnum } from '@/enums/httpEnum'; import { PageResult } from '@/api/model/pageResult'; import { QueryProductStockWarningBo } from '@/api/sc/stock/warning/model/queryProductStockWarningBo'; import { QueryProductStockWarningVo } from '@/api/sc/stock/warning/model/queryProductStockWarningVo'; @@ -98,15 +98,18 @@ export function deleteById(id: string): Promise { /** * 批量删除 */ -export function deleteByIds(ids: string[]): Promise { +export function batchDelete(id: string): Promise { return defHttp.delete( { - url: baseUrl + '/batch', - data: ids, + url: baseUrl, + data: { + id, + }, }, { + errorMessageMode: 'none', region, - contentType: ContentTypeEnum.JSON, + contentType: ContentTypeEnum.FORM_URLENCODED, }, ); } @@ -162,3 +165,34 @@ export function deleteSetting(id: string): Promise { }, ); } + +/** + * 下载导入模板 + */ +export function downloadImportTemplate(): Promise { + return defHttp.get( + { + url: baseUrl + '/import/template', + }, + { + responseType: ResponseEnum.BLOB, + region, + }, + ); +} + +/** + * 导入 + */ +export function importExcel(data: { id: string; file: Blob }): Promise { + return defHttp.post( + { + url: baseUrl + '/import', + data, + }, + { + contentType: ContentTypeEnum.BLOB, + region, + }, + ); +} diff --git a/src/components/Importor/src/ReceiveSheetImporter.vue b/src/components/Importor/src/ReceiveSheetImporter.vue index 22703c0c3fd8283d731c3bfdf0215dcd58cc8139..ecb89d97d370272311672012aeee86e95f9e4988 100644 --- a/src/components/Importor/src/ReceiveSheetImporter.vue +++ b/src/components/Importor/src/ReceiveSheetImporter.vue @@ -27,7 +27,7 @@ this.$refs.importer.openDialog(); }, downloadTemplate() { - return api.downloadImportPayTypeTemplate(); + return api.downloadImportTemplate(); }, upload(params) { return api.importExcel(params); diff --git a/src/components/Importor/src/StockWarningImporter.vue b/src/components/Importor/src/StockWarningImporter.vue new file mode 100644 index 0000000000000000000000000000000000000000..de43f661a6a7cd39dffbf935e5a89061e28b8c77 --- /dev/null +++ b/src/components/Importor/src/StockWarningImporter.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/src/components/JForm/src/JForm.vue b/src/components/JForm/src/JForm.vue index f1264fc1faf0a7277da5cdf04b4360c60331d1e8..6a9893426dc53244e9c20c2f8589c5a5d3c1c4e5 100644 --- a/src/components/JForm/src/JForm.vue +++ b/src/components/JForm/src/JForm.vue @@ -59,6 +59,10 @@ type: Boolean, default: true, }, + colon: { + type: Boolean, + default: true, + }, }, setup() { const collapseStatus = ref(false); diff --git a/src/components/JFormItem/src/JFormItem.vue b/src/components/JFormItem/src/JFormItem.vue index f9aeeefa42124a4ab061d3e7049ebedf07ff21c7..a07db99d026a35c98596dda1ed890f38fe969822 100644 --- a/src/components/JFormItem/src/JFormItem.vue +++ b/src/components/JFormItem/src/JFormItem.vue @@ -11,7 +11,7 @@ {{ label }} - {{ ':' }} + {{ ':' }}
@@ -153,6 +153,9 @@ _contentNest() { return this.contentNest && (this.form?.contentNest ?? this.contentNest); }, + _colon() { + return this.colon && (this.form?.colon ?? this.colon); + }, }, }); diff --git a/src/components/JImgUpload/src/JImgUpload.vue b/src/components/JImgUpload/src/JImgUpload.vue index fe547b968869719037a9927d7e2ced7d246c61d8..ac099f50e02e4857d77690f7c74cd458955f796e 100644 --- a/src/components/JImgUpload/src/JImgUpload.vue +++ b/src/components/JImgUpload/src/JImgUpload.vue @@ -13,7 +13,8 @@ @change="handleChange" >
- + +
上传图片
@@ -27,12 +28,15 @@ import { defHttp } from '@/utils/http/axios'; import * as api from '@/api/components'; import { ContentTypeEnum } from '@/enums/httpEnum'; + import { LoadingOutlined, PictureOutlined } from '@ant-design/icons-vue'; export default defineComponent({ name: 'JImgUpload', - componentName: 'JImgUpload', - + components: { + LoadingOutlined, + PictureOutlined, + }, props: { value: { type: String, diff --git a/src/design/ant/index.less b/src/design/ant/index.less index d508217c970a45e43c4824a3b6ebb8fe7777f847..8fbec828eb2e67addb9ad7db4d3567b24ae5246b 100644 --- a/src/design/ant/index.less +++ b/src/design/ant/index.less @@ -1,63 +1,55 @@ -@import './pagination.less'; -@import './input.less'; -@import './btn.less'; -.ant-image-preview-root { - img { - display: unset; - } -} - -.ant-back-top { - right: 20px; - bottom: 20px; -} - -.collapse-container__body { - > .ant-descriptions { - margin-left: 6px; - } +.ant-image-preview-operations-wrapper { + position: fixed; + inset-block-start: 0; + inset-inline-end: 0; + z-index: 1081; + width: 100%; } .ant-image-preview-operations { - background-color: rgb(0 0 0 / 30%); -} - -.ant-popover { - &-content { - box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%); - } + box-sizing: border-box; + margin: 0; + padding: 0; + color: rgb(255, 255, 255); + font-size: 12px; + line-height: 1.6666666666666667; + list-style: none; + font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'; + display: flex; + flex-direction: row-reverse; + align-items: center; + background: rgba(0, 0, 0, 0.1); + pointer-events: auto; } -// ================================= -// ==============modal message====== -// ================================= -.modal-icon-warning { - color: @warning-color !important; +.ant-image-preview-operations-operation { + margin-inline-start: 8px; + padding: 8px; + cursor: pointer; + transition: all 0.3s; + user-select: none; } -.modal-icon-success { - color: @success-color !important; +.ant-image-preview-operations-operation:hover { + background: rgba(0, 0, 0, 0.2); } -.modal-icon-error { - color: @error-color !important; +.ant-image-preview-operations-operation-disabled { + color: rgba(255, 255, 255, 0.25); + pointer-events: none; } -.modal-icon-info { - color: @primary-color !important; +.ant-image-preview-operations-operation:last-of-type { + margin-inline-start: 0; } -.ant-checkbox-checked .ant-checkbox-inner::after, -.ant-tree-checkbox-checked .ant-tree-checkbox-inner::after { - border-top: 0 !important; - border-left: 0 !important; +.ant-image-preview-operations-progress { + position: absolute; + left: 50%; + transform: translateX(-50%); } -.ant-form-item-control-input-content { - > div { - > div { - max-width: 100%; - } - } +.ant-image-preview-operations-icon { + font-size: 15px; } diff --git a/src/design/index.less b/src/design/index.less index 5302825684e6664790a8812957e64879173cbfb7..ca4d225ffb77308a2269c552758d30755ae5c0f0 100644 --- a/src/design/index.less +++ b/src/design/index.less @@ -1,6 +1,7 @@ @import 'transition/index.less'; @import 'var/index.less'; @import 'public.less'; +@import 'ant/index.less'; @import './theme.less'; @import './entry.css'; @import './dark.less'; diff --git a/src/layouts/default/header/components/export-center/index.vue b/src/layouts/default/header/components/export-center/index.vue index 812126914366b4f32f6ba707703de371b9d55df9..ce8849c0f4f11dc46f72fe9ad32f26c8d58e1303 100644 --- a/src/layouts/default/header/components/export-center/index.vue +++ b/src/layouts/default/header/components/export-center/index.vue @@ -88,7 +88,7 @@ import { useDesign } from '@/hooks/web/useDesign'; import eventBus from '@/events/eventBus'; import * as api from '@/api/export-task'; - import { uuid } from '@/utils/utils'; + import { uuid, isEmpty } from '@/utils/utils'; import { ExportingExportTaskBo } from '@/api/export-task/model/exportingExportTaskBo'; import projectSetting from '@/settings/projectSetting'; import SuccessList from './SuccessList.vue'; @@ -137,6 +137,13 @@ eventBusOff.value.push(eventBus.$on(eventBus.$pullEvent.EXPORT_TASK, onExportTaskSummary)); function onExportTaskSummary(e) { + if (isEmpty(e)) { + e = { + unFinishedCount: 0, + successCount: 0, + failCount: 0, + }; + } const { unFinishedCount, successCount, failCount } = e; unFinishedSummary.value = unFinishedCount; successSummary.value = successCount; diff --git a/src/views/base-data/product/info/add.vue b/src/views/base-data/product/info/add.vue index ddbf2e38c418cd1f9ba019d149c44445360dc08a..6b5e1b2fed9584390b24100d57a83158fb889c9f 100644 --- a/src/views/base-data/product/info/add.vue +++ b/src/views/base-data/product/info/add.vue @@ -624,7 +624,7 @@ .filter((item) => item.isRequired) .every((item) => { if (that.$utils.isEmpty(item.text)) { - that.$msg.error(item.name + '不能为空!'); + that.$msg.createError(item.name + '不能为空!'); valid = false; return false; } diff --git a/src/views/base-data/product/info/modify.vue b/src/views/base-data/product/info/modify.vue index cd90dddaede906d59e2d397b7763f7144d64f4bc..ef13b09ad6544f931d5d5055b2ce6983fdf78100 100644 --- a/src/views/base-data/product/info/modify.vue +++ b/src/views/base-data/product/info/modify.vue @@ -606,7 +606,7 @@ .filter((item) => item.isRequired) .every((item) => { if (that.$utils.isEmpty(item.text)) { - that.$msg.error(item.name + '不能为空!'); + that.$msg.createError(item.name + '不能为空!'); valid = false; return false; } diff --git a/src/views/sc/purchase/order/add.vue b/src/views/sc/purchase/order/add.vue index 2a68ea771ad324aebaa93abb7b337acc68e2ac37..3fa3142d288bdf31ac41253bc77ce82a31ad5dc5 100644 --- a/src/views/sc/purchase/order/add.vue +++ b/src/views/sc/purchase/order/add.vue @@ -57,6 +57,7 @@ diff --git a/src/views/sc/purchase/order/modify.vue b/src/views/sc/purchase/order/modify.vue index 3f5bc1ae09faaa115ae0c4df67a3c3b76b75891b..9820b00c0d580322a944342eb76be4f09bdea6e7 100644 --- a/src/views/sc/purchase/order/modify.vue +++ b/src/views/sc/purchase/order/modify.vue @@ -102,6 +102,7 @@ diff --git a/src/views/sc/purchase/receive/add-require.vue b/src/views/sc/purchase/receive/add-require.vue index 428544fa8fb8df94665eb4d7fb1d114adf4b9d96..a2eec1b1e9e8a8676f8e5cd2a926479fcc4ab718 100644 --- a/src/views/sc/purchase/receive/add-require.vue +++ b/src/views/sc/purchase/receive/add-require.vue @@ -81,7 +81,7 @@