订单管理
This commit is contained in:
parent
4a3a81f16b
commit
680ac84c2e
21
.editorconfig
Normal file
21
.editorconfig
Normal file
@ -0,0 +1,21 @@
|
||||
# 告诉EditorConfig插件,这是根文件,不用继续往上查找
|
||||
root = true
|
||||
|
||||
# 匹配全部文件
|
||||
[*]
|
||||
# 缩进风格,可选space、tab
|
||||
indent_style = space
|
||||
# 缩进的空格数
|
||||
indent_size = 2
|
||||
# 设置字符集
|
||||
charset = utf-8
|
||||
# 结尾换行符,可选lf、cr、crlf
|
||||
end_of_line = lf
|
||||
# 在文件结尾插入新行
|
||||
trim_trailing_whitespace = true
|
||||
# 删除一行中的前后空格
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
312
.eslintrc-auto-import.json
Normal file
312
.eslintrc-auto-import.json
Normal file
@ -0,0 +1,312 @@
|
||||
{
|
||||
"globals": {
|
||||
"ComponentInternalInstance": true,
|
||||
"TransferKey": true,
|
||||
"ElFormRules": true,
|
||||
"CheckboxValueType": true,
|
||||
"PropType": true,
|
||||
"DateModelType": true,
|
||||
"UploadFile": true,
|
||||
"ElFormInstance": true,
|
||||
"ElTableInstance": true,
|
||||
"ElTreeInstance": true,
|
||||
"ElTreeSelectInstance": true,
|
||||
"ElSelectInstance": true,
|
||||
"ElUploadInstance": true,
|
||||
"ElCardInstance": true,
|
||||
"ElDialogInstance": true,
|
||||
"ElInputInstance": true,
|
||||
"ElInputNumberInstance": true,
|
||||
"ElRadioInstance": true,
|
||||
"ElRadioGroupInstance": true,
|
||||
"ElRadioButtonInstance": true,
|
||||
"ElCheckboxInstance": true,
|
||||
"ElCheckboxGroupInstance": true,
|
||||
"ElSwitchInstance": true,
|
||||
"ElDatePickerInstance": true,
|
||||
"ElTimePickerInstance": true,
|
||||
"ElTimeSelectInstance": true,
|
||||
"ElScrollbarInstance": true,
|
||||
"ElCascaderInstance": true,
|
||||
"ElColorPickerInstance": true,
|
||||
"ElRateInstance": true,
|
||||
"ElSliderInstance": true,
|
||||
"useRouter": true,
|
||||
"useRoute": true,
|
||||
"EffectScope": true,
|
||||
"ElTable": true,
|
||||
"ElSelect": true,
|
||||
"ElUpload": true,
|
||||
"ElForm": true,
|
||||
"ElTree": true,
|
||||
"ElMessage": true,
|
||||
"ElMessageBox": true,
|
||||
"asyncComputed": true,
|
||||
"autoResetRef": true,
|
||||
"computed": true,
|
||||
"computedAsync": true,
|
||||
"computedEager": true,
|
||||
"computedInject": true,
|
||||
"computedWithControl": true,
|
||||
"controlledComputed": true,
|
||||
"controlledRef": true,
|
||||
"createApp": true,
|
||||
"createEventHook": true,
|
||||
"createGlobalState": true,
|
||||
"createInjectionState": true,
|
||||
"createReactiveFn": true,
|
||||
"createSharedComposable": true,
|
||||
"createUnrefFn": true,
|
||||
"customRef": true,
|
||||
"debouncedRef": true,
|
||||
"debouncedWatch": true,
|
||||
"defineAsyncComponent": true,
|
||||
"defineComponent": true,
|
||||
"eagerComputed": true,
|
||||
"effectScope": true,
|
||||
"extendRef": true,
|
||||
"getCurrentInstance": true,
|
||||
"getCurrentScope": true,
|
||||
"h": true,
|
||||
"ignorableWatch": true,
|
||||
"inject": true,
|
||||
"isDefined": true,
|
||||
"isProxy": true,
|
||||
"isReactive": true,
|
||||
"isReadonly": true,
|
||||
"isRef": true,
|
||||
"makeDestructurable": true,
|
||||
"markRaw": true,
|
||||
"nextTick": true,
|
||||
"onActivated": true,
|
||||
"onBeforeMount": true,
|
||||
"onBeforeUnmount": true,
|
||||
"onBeforeUpdate": true,
|
||||
"onClickOutside": true,
|
||||
"onDeactivated": true,
|
||||
"onErrorCaptured": true,
|
||||
"onKeyStroke": true,
|
||||
"onLongPress": true,
|
||||
"onMounted": true,
|
||||
"onRenderTracked": true,
|
||||
"onRenderTriggered": true,
|
||||
"onScopeDispose": true,
|
||||
"onServerPrefetch": true,
|
||||
"onStartTyping": true,
|
||||
"onUnmounted": true,
|
||||
"onUpdated": true,
|
||||
"pausableWatch": true,
|
||||
"provide": true,
|
||||
"reactify": true,
|
||||
"reactifyObject": true,
|
||||
"reactive": true,
|
||||
"reactiveComputed": true,
|
||||
"reactiveOmit": true,
|
||||
"reactivePick": true,
|
||||
"readonly": true,
|
||||
"ref": true,
|
||||
"refAutoReset": true,
|
||||
"refDebounced": true,
|
||||
"refDefault": true,
|
||||
"refThrottled": true,
|
||||
"refWithControl": true,
|
||||
"resolveComponent": true,
|
||||
"resolveDirective": true,
|
||||
"resolveRef": true,
|
||||
"resolveUnref": true,
|
||||
"shallowReactive": true,
|
||||
"shallowReadonly": true,
|
||||
"shallowRef": true,
|
||||
"syncRef": true,
|
||||
"syncRefs": true,
|
||||
"templateRef": true,
|
||||
"throttledRef": true,
|
||||
"throttledWatch": true,
|
||||
"toRaw": true,
|
||||
"toReactive": true,
|
||||
"toRef": true,
|
||||
"toRefs": true,
|
||||
"triggerRef": true,
|
||||
"tryOnBeforeMount": true,
|
||||
"tryOnBeforeUnmount": true,
|
||||
"tryOnMounted": true,
|
||||
"tryOnScopeDispose": true,
|
||||
"tryOnUnmounted": true,
|
||||
"unref": true,
|
||||
"unrefElement": true,
|
||||
"until": true,
|
||||
"useActiveElement": true,
|
||||
"useArrayEvery": true,
|
||||
"useArrayFilter": true,
|
||||
"useArrayFind": true,
|
||||
"useArrayFindIndex": true,
|
||||
"useArrayFindLast": true,
|
||||
"useArrayJoin": true,
|
||||
"useArrayMap": true,
|
||||
"useArrayReduce": true,
|
||||
"useArraySome": true,
|
||||
"useArrayUnique": true,
|
||||
"useAsyncQueue": true,
|
||||
"useAsyncState": true,
|
||||
"useAttrs": true,
|
||||
"useBase64": true,
|
||||
"useBattery": true,
|
||||
"useBluetooth": true,
|
||||
"useBreakpoints": true,
|
||||
"useBroadcastChannel": true,
|
||||
"useBrowserLocation": true,
|
||||
"useCached": true,
|
||||
"useClipboard": true,
|
||||
"useCloned": true,
|
||||
"useColorMode": true,
|
||||
"useConfirmDialog": true,
|
||||
"useCounter": true,
|
||||
"useCssModule": true,
|
||||
"useCssVar": true,
|
||||
"useCssVars": true,
|
||||
"useCurrentElement": true,
|
||||
"useCycleList": true,
|
||||
"useDark": true,
|
||||
"useDateFormat": true,
|
||||
"useDebounce": true,
|
||||
"useDebounceFn": true,
|
||||
"useDebouncedRefHistory": true,
|
||||
"useDeviceMotion": true,
|
||||
"useDeviceOrientation": true,
|
||||
"useDevicePixelRatio": true,
|
||||
"useDevicesList": true,
|
||||
"useDisplayMedia": true,
|
||||
"useDocumentVisibility": true,
|
||||
"useDraggable": true,
|
||||
"useDropZone": true,
|
||||
"useElementBounding": true,
|
||||
"useElementByPoint": true,
|
||||
"useElementHover": true,
|
||||
"useElementSize": true,
|
||||
"useElementVisibility": true,
|
||||
"useEventBus": true,
|
||||
"useEventListener": true,
|
||||
"useEventSource": true,
|
||||
"useEyeDropper": true,
|
||||
"useFavicon": true,
|
||||
"useFetch": true,
|
||||
"useFileDialog": true,
|
||||
"useFileSystemAccess": true,
|
||||
"useFocus": true,
|
||||
"useFocusWithin": true,
|
||||
"useFps": true,
|
||||
"useFullscreen": true,
|
||||
"useGamepad": true,
|
||||
"useGeolocation": true,
|
||||
"useIdle": true,
|
||||
"useImage": true,
|
||||
"useInfiniteScroll": true,
|
||||
"useIntersectionObserver": true,
|
||||
"useInterval": true,
|
||||
"useIntervalFn": true,
|
||||
"useKeyModifier": true,
|
||||
"useLastChanged": true,
|
||||
"useLocalStorage": true,
|
||||
"useMagicKeys": true,
|
||||
"useManualRefHistory": true,
|
||||
"useMediaControls": true,
|
||||
"useMediaQuery": true,
|
||||
"useMemoize": true,
|
||||
"useMemory": true,
|
||||
"useMounted": true,
|
||||
"useMouse": true,
|
||||
"useMouseInElement": true,
|
||||
"useMousePressed": true,
|
||||
"useMutationObserver": true,
|
||||
"useNavigatorLanguage": true,
|
||||
"useNetwork": true,
|
||||
"useNow": true,
|
||||
"useObjectUrl": true,
|
||||
"useOffsetPagination": true,
|
||||
"useOnline": true,
|
||||
"usePageLeave": true,
|
||||
"useParallax": true,
|
||||
"usePermission": true,
|
||||
"usePointer": true,
|
||||
"usePointerLock": true,
|
||||
"usePointerSwipe": true,
|
||||
"usePreferredColorScheme": true,
|
||||
"usePreferredContrast": true,
|
||||
"usePreferredDark": true,
|
||||
"usePreferredLanguages": true,
|
||||
"usePreferredReducedMotion": true,
|
||||
"usePrevious": true,
|
||||
"useRafFn": true,
|
||||
"useRefHistory": true,
|
||||
"useResizeObserver": true,
|
||||
"useScreenOrientation": true,
|
||||
"useScreenSafeArea": true,
|
||||
"useScriptTag": true,
|
||||
"useScroll": true,
|
||||
"useScrollLock": true,
|
||||
"useSessionStorage": true,
|
||||
"useShare": true,
|
||||
"useSlots": true,
|
||||
"useSorted": true,
|
||||
"useSpeechRecognition": true,
|
||||
"useSpeechSynthesis": true,
|
||||
"useStepper": true,
|
||||
"useStorage": true,
|
||||
"useStorageAsync": true,
|
||||
"useStyleTag": true,
|
||||
"useSupported": true,
|
||||
"useSwipe": true,
|
||||
"useTemplateRefsList": true,
|
||||
"useTextDirection": true,
|
||||
"useTextSelection": true,
|
||||
"useTextareaAutosize": true,
|
||||
"useThrottle": true,
|
||||
"useThrottleFn": true,
|
||||
"useThrottledRefHistory": true,
|
||||
"useTimeAgo": true,
|
||||
"useTimeout": true,
|
||||
"useTimeoutFn": true,
|
||||
"useTimeoutPoll": true,
|
||||
"useTimestamp": true,
|
||||
"useTitle": true,
|
||||
"useToNumber": true,
|
||||
"useToString": true,
|
||||
"useToggle": true,
|
||||
"useTransition": true,
|
||||
"useUrlSearchParams": true,
|
||||
"useUserMedia": true,
|
||||
"useVModel": true,
|
||||
"useVModels": true,
|
||||
"useVibrate": true,
|
||||
"useVirtualList": true,
|
||||
"useWakeLock": true,
|
||||
"useWebNotification": true,
|
||||
"useWebSocket": true,
|
||||
"useWebWorker": true,
|
||||
"useWebWorkerFn": true,
|
||||
"useWindowFocus": true,
|
||||
"useWindowScroll": true,
|
||||
"useWindowSize": true,
|
||||
"watch": true,
|
||||
"watchArray": true,
|
||||
"watchAtMost": true,
|
||||
"watchDebounced": true,
|
||||
"watchEffect": true,
|
||||
"watchIgnorable": true,
|
||||
"watchOnce": true,
|
||||
"watchPausable": true,
|
||||
"watchPostEffect": true,
|
||||
"watchSyncEffect": true,
|
||||
"watchThrottled": true,
|
||||
"watchTriggerable": true,
|
||||
"watchWithFilter": true,
|
||||
"whenever": true,
|
||||
"ImportOption": true,
|
||||
"TreeType": true,
|
||||
"FieldOption": true,
|
||||
"PageData": true,
|
||||
"storeToRefs": true,
|
||||
"DictDataOption": true,
|
||||
"UploadOption": true
|
||||
}
|
||||
}
|
29
.gitignore
vendored
Normal file
29
.gitignore
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
.DS_Store
|
||||
.history
|
||||
node_modules/
|
||||
dist/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
**/*.log
|
||||
|
||||
tests/**/coverage/
|
||||
tests/e2e/reports
|
||||
selenium-debug.log
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.local
|
||||
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
pnpm-lock.yaml
|
||||
|
||||
# 编译生成的文件
|
||||
auto-imports.d.ts
|
||||
components.d.ts
|
9
.prettierignore
Normal file
9
.prettierignore
Normal file
@ -0,0 +1,9 @@
|
||||
/dist/*
|
||||
.local
|
||||
.output.js
|
||||
/node_modules/**
|
||||
|
||||
**/*.svg
|
||||
**/*.sh
|
||||
|
||||
/public/*
|
20
.prettierrc
Normal file
20
.prettierrc
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"printWidth": 150,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"quoteProps": "preserve",
|
||||
"jsxSingleQuote": false,
|
||||
"bracketSameLine": false,
|
||||
"trailingComma": "none",
|
||||
"bracketSpacing": true,
|
||||
"embeddedLanguageFormatting": "auto",
|
||||
"arrowParens": "always",
|
||||
"requirePragma": false,
|
||||
"insertPragma": false,
|
||||
"proseWrap": "preserve",
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"vueIndentScriptAndStyle": false,
|
||||
"endOfLine": "auto"
|
||||
}
|
12
bin/build.bat
Normal file
12
bin/build.bat
Normal file
@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 打包Web工程,生成dist文件。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
yarn build:prod
|
||||
|
||||
pause
|
12
bin/package.bat
Normal file
12
bin/package.bat
Normal file
@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 安装Web工程,生成node_modules文件。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
yarn --registry=https://registry.npmmirror.com
|
||||
|
||||
pause
|
12
bin/run-web.bat
Normal file
12
bin/run-web.bat
Normal file
@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用 Vite 命令运行 Web 工程。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
yarn dev
|
||||
|
||||
pause
|
86
eslint.config.js
Normal file
86
eslint.config.js
Normal file
@ -0,0 +1,86 @@
|
||||
import globals from 'globals';
|
||||
import pluginJs from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import pluginVue from 'eslint-plugin-vue';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import prettier from 'eslint-plugin-prettier';
|
||||
|
||||
/**
|
||||
* https://blog.csdn.net/sayUonly/article/details/123482912
|
||||
* 自动导入的配置
|
||||
*/
|
||||
const autoImportFile = new URL('./.eslintrc-auto-import.json', import.meta.url);
|
||||
const autoImportGlobals = JSON.parse(await readFile(autoImportFile, 'utf8'));
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
{
|
||||
/**
|
||||
* 不需要.eslintignore文件 而是在这里配置
|
||||
*/
|
||||
ignores: [
|
||||
'*.sh',
|
||||
'node_modules',
|
||||
'*.md',
|
||||
'*.woff',
|
||||
'*.ttf',
|
||||
'.vscode',
|
||||
'.idea',
|
||||
'dist',
|
||||
'/public',
|
||||
'/docs',
|
||||
'.husky',
|
||||
'.local',
|
||||
'/bin',
|
||||
'.eslintrc.cjs',
|
||||
'prettier.config.js',
|
||||
'src/assets',
|
||||
'tailwind.config.js'
|
||||
]
|
||||
},
|
||||
{ files: ['**/*.{js,mjs,cjs,ts,vue}'] },
|
||||
{
|
||||
languageOptions: {
|
||||
globals: globals.browser
|
||||
}
|
||||
},
|
||||
pluginJs.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
...pluginVue.configs['flat/essential'],
|
||||
{
|
||||
files: ['**/*.vue'],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
parser: tseslint.parser
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
// 自动导入的配置 undef
|
||||
...autoImportGlobals.globals,
|
||||
DialogOption: 'readonly',
|
||||
LayoutSetting: 'readonly'
|
||||
}
|
||||
},
|
||||
plugins: { prettier },
|
||||
rules: {
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'@typescript-eslint/no-this-alias': 'off',
|
||||
|
||||
// vue
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/valid-define-props': 'off',
|
||||
'vue/no-v-model-argument': 'off',
|
||||
'prefer-rest-params': 'off',
|
||||
// prettier
|
||||
'prettier/prettier': 'error',
|
||||
// 允许使用空Object类型 {}
|
||||
'@typescript-eslint/no-empty-object-type': 'off',
|
||||
'@typescript-eslint/no-unused-expressions': 'off'
|
||||
}
|
||||
}
|
||||
];
|
242
html/ie.html
Normal file
242
html/ie.html
Normal file
File diff suppressed because one or more lines are too long
@ -24,6 +24,7 @@
|
||||
"@highlightjs/vue-plugin": "2.1.0",
|
||||
"@vueup/vue-quill": "1.2.0",
|
||||
"@vueuse/core": "11.3.0",
|
||||
"ag-grid-vue3": "^33.1.1",
|
||||
"animate.css": "4.1.1",
|
||||
"await-to-js": "3.0.0",
|
||||
"axios": "1.7.8",
|
||||
|
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
@ -29,9 +29,24 @@ export const getInquiryRequest = (id: string | number): AxiosPromise<InquiryRequ
|
||||
});
|
||||
};
|
||||
|
||||
export const createWithDesAndChannel = (destination: string, channelId: string): AxiosPromise<void> => {
|
||||
export const createWithDesAndChannel = (destination: string, channelId: string, date: string): AxiosPromise<void> => {
|
||||
return request({
|
||||
url: '/amz/inquiryRequest/create/' + destination + '/' + channelId,
|
||||
url: '/amz/inquiryRequest/create/' + destination + '/' + channelId + '/' + date,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据目的地仓库和渠道查询物流询价列表
|
||||
* @returns {*}
|
||||
* @param destination
|
||||
* @param channelId
|
||||
* @param date
|
||||
*/
|
||||
|
||||
export const queryWithDesAndChannel = (destination: string, channelId: string, date: string): AxiosPromise<LogisticsQuoteVO[]> => {
|
||||
return request({
|
||||
url: '/amz/inquiryRequest/query/' + destination + '/' + channelId + '/' + date,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
@ -58,7 +58,6 @@ export interface InquiryRequestVO {
|
||||
* 报价有效的结束日期
|
||||
*/
|
||||
effectiveEndTime: string;
|
||||
|
||||
}
|
||||
|
||||
export interface InquiryRequestForm extends BaseEntity {
|
||||
@ -121,11 +120,9 @@ export interface InquiryRequestForm extends BaseEntity {
|
||||
* 报价有效的结束日期
|
||||
*/
|
||||
effectiveEndTime?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface InquiryRequestQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 询价单号(规则:INQ+年月+6位序列)
|
||||
*/
|
||||
@ -181,11 +178,8 @@ export interface InquiryRequestQuery extends PageQuery {
|
||||
*/
|
||||
effectiveEndTime?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
75
src/api/amz/logisticsOrder/index.ts
Normal file
75
src/api/amz/logisticsOrder/index.ts
Normal file
@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { LogisticsOrderVO, LogisticsOrderForm, LogisticsOrderQuery, createOrderForm } from '@/api/amz/logisticsOrder/types';
|
||||
|
||||
/**
|
||||
* 查询物流订单列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listLogisticsOrder = (query?: LogisticsOrderQuery): AxiosPromise<LogisticsOrderVO[]> => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrder/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询物流订单详细
|
||||
* @param id
|
||||
*/
|
||||
export const getLogisticsOrder = (id: string | number): AxiosPromise<LogisticsOrderVO> => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrder/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增物流订单
|
||||
* @param data
|
||||
*/
|
||||
export const addLogisticsOrder = (data: LogisticsOrderForm) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 创建物流订单
|
||||
* @param data
|
||||
*/
|
||||
export const createLogisticsOrder = (data: createOrderForm) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrder/createOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改物流订单
|
||||
* @param data
|
||||
*/
|
||||
export const updateLogisticsOrder = (data: LogisticsOrderForm) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrder',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除物流订单
|
||||
* @param id
|
||||
*/
|
||||
export const delLogisticsOrder = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrder/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
179
src/api/amz/logisticsOrder/types.ts
Normal file
179
src/api/amz/logisticsOrder/types.ts
Normal file
@ -0,0 +1,179 @@
|
||||
export interface LogisticsOrderVO {
|
||||
/**
|
||||
* 主键(应用层生成的全局唯一ID,如雪花算法)
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||
*/
|
||||
fbaShipmentId: string | number;
|
||||
|
||||
/**
|
||||
* 订单编号(应用层生成的唯一业务流水号)
|
||||
*/
|
||||
orderId: string;
|
||||
|
||||
/**
|
||||
* 物流商ID(关联物流商信息表)
|
||||
*/
|
||||
logisticsProviderId: string | number;
|
||||
|
||||
/**
|
||||
* 物流商名称(冗余存储,避免高频联表查询)
|
||||
*/
|
||||
logisticsProviderName: string | number;
|
||||
|
||||
/**
|
||||
* 物流渠道(如空运/海运/快递等)
|
||||
*/
|
||||
logisticsChannel: string;
|
||||
|
||||
/**
|
||||
* 目的地仓库名称或编码
|
||||
*/
|
||||
destination: string;
|
||||
|
||||
/**
|
||||
* 总箱子数量(此订单包含的箱子总数)
|
||||
*/
|
||||
boxQuantity: number;
|
||||
|
||||
/**
|
||||
* 总货件数量(商品件数总和)
|
||||
*/
|
||||
shipmentQuantity: number;
|
||||
|
||||
/**
|
||||
* 亚马逊仓库实际上架日期
|
||||
*/
|
||||
amazonShelfDate: string;
|
||||
|
||||
/**
|
||||
* 上架时效(单位:天,从发货到上架的总天数)
|
||||
*/
|
||||
shelfTimeliness: number;
|
||||
}
|
||||
|
||||
export interface LogisticsOrderForm extends BaseEntity {
|
||||
/**
|
||||
* 主键(应用层生成的全局唯一ID,如雪花算法)
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||
*/
|
||||
fbaShipmentId?: string | number;
|
||||
|
||||
/**
|
||||
* 订单编号(应用层生成的唯一业务流水号)
|
||||
*/
|
||||
orderId?: string;
|
||||
|
||||
/**
|
||||
* 物流商ID(关联物流商信息表)
|
||||
*/
|
||||
logisticsProviderId?: string | number;
|
||||
|
||||
/**
|
||||
* 物流商名称(冗余存储,避免高频联表查询)
|
||||
*/
|
||||
logisticsProviderName?: string | number;
|
||||
|
||||
/**
|
||||
* 物流渠道(如空运/海运/快递等)
|
||||
*/
|
||||
logisticsChannel?: string;
|
||||
|
||||
/**
|
||||
* 目的地仓库名称或编码
|
||||
*/
|
||||
destination?: string;
|
||||
|
||||
/**
|
||||
* 总箱子数量(此订单包含的箱子总数)
|
||||
*/
|
||||
boxQuantity?: number;
|
||||
|
||||
/**
|
||||
* 总货件数量(商品件数总和)
|
||||
*/
|
||||
shipmentQuantity?: number;
|
||||
|
||||
/**
|
||||
* 亚马逊仓库实际上架日期
|
||||
*/
|
||||
amazonShelfDate?: string;
|
||||
|
||||
/**
|
||||
* 上架时效(单位:天,从发货到上架的总天数)
|
||||
*/
|
||||
shelfTimeliness?: number;
|
||||
}
|
||||
|
||||
export interface createOrderForm {
|
||||
/**
|
||||
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||
*/
|
||||
fbaShipmentId?: string | number;
|
||||
|
||||
logicQuoteId?: string | number;
|
||||
}
|
||||
|
||||
export interface LogisticsOrderQuery extends PageQuery {
|
||||
/**
|
||||
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||
*/
|
||||
fbaShipmentId?: string | number;
|
||||
|
||||
/**
|
||||
* 订单编号(应用层生成的唯一业务流水号)
|
||||
*/
|
||||
orderId?: string;
|
||||
|
||||
/**
|
||||
* 物流商ID(关联物流商信息表)
|
||||
*/
|
||||
logisticsProviderId?: string | number;
|
||||
|
||||
/**
|
||||
* 物流商名称(冗余存储,避免高频联表查询)
|
||||
*/
|
||||
logisticsProviderName?: string | number;
|
||||
|
||||
/**
|
||||
* 物流渠道(如空运/海运/快递等)
|
||||
*/
|
||||
logisticsChannel?: string;
|
||||
|
||||
/**
|
||||
* 目的地仓库名称或编码
|
||||
*/
|
||||
destination?: string;
|
||||
|
||||
/**
|
||||
* 总箱子数量(此订单包含的箱子总数)
|
||||
*/
|
||||
boxQuantity?: number;
|
||||
|
||||
/**
|
||||
* 总货件数量(商品件数总和)
|
||||
*/
|
||||
shipmentQuantity?: number;
|
||||
|
||||
/**
|
||||
* 亚马逊仓库实际上架日期
|
||||
*/
|
||||
amazonShelfDate?: string;
|
||||
|
||||
/**
|
||||
* 上架时效(单位:天,从发货到上架的总天数)
|
||||
*/
|
||||
shelfTimeliness?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/amz/logisticsOrderDetail/index.ts
Normal file
63
src/api/amz/logisticsOrderDetail/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { LogisticsOrderDetailVO, LogisticsOrderDetailForm, LogisticsOrderDetailQuery } from '@/api/amz/logisticsOrderDetail/types';
|
||||
|
||||
/**
|
||||
* 查询物流订单明细(按箱子维度存储)列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listLogisticsOrderDetail = (query?: LogisticsOrderDetailQuery): AxiosPromise<LogisticsOrderDetailVO[]> => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询物流订单明细(按箱子维度存储)详细
|
||||
* @param id
|
||||
*/
|
||||
export const getLogisticsOrderDetail = (id: string | number): AxiosPromise<LogisticsOrderDetailVO> => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderDetail/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增物流订单明细(按箱子维度存储)
|
||||
* @param data
|
||||
*/
|
||||
export const addLogisticsOrderDetail = (data: LogisticsOrderDetailForm) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改物流订单明细(按箱子维度存储)
|
||||
* @param data
|
||||
*/
|
||||
export const updateLogisticsOrderDetail = (data: LogisticsOrderDetailForm) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除物流订单明细(按箱子维度存储)
|
||||
* @param id
|
||||
*/
|
||||
export const delLogisticsOrderDetail = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderDetail/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
335
src/api/amz/logisticsOrderDetail/types.ts
Normal file
335
src/api/amz/logisticsOrderDetail/types.ts
Normal file
@ -0,0 +1,335 @@
|
||||
export interface LogisticsOrderDetailVO {
|
||||
/**
|
||||
* 主键(应用层生成的全局唯一ID)
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 关联主表ID(biz_logistics_order.id)
|
||||
*/
|
||||
orderId: string | number;
|
||||
|
||||
/**
|
||||
* FBA货件编号(冗余存储,避免联表查询)
|
||||
*/
|
||||
fbaShipmentId: string | number;
|
||||
|
||||
/**
|
||||
* FBA箱号(亚马逊系统中箱子的唯一标识)
|
||||
*/
|
||||
fbaBoxNumber: string;
|
||||
|
||||
/**
|
||||
* 物流商ID(冗余存储)
|
||||
*/
|
||||
logisticsProviderId: string | number;
|
||||
|
||||
/**
|
||||
* 物流商名称(冗余存储)
|
||||
*/
|
||||
logisticsProviderName: string | number;
|
||||
|
||||
/**
|
||||
* 物流渠道(与主表一致)
|
||||
*/
|
||||
logisticsChannel: string;
|
||||
|
||||
/**
|
||||
* 目的地仓库(冗余存储)
|
||||
*/
|
||||
destination: string;
|
||||
|
||||
/**
|
||||
* 计划数量(该箱子预计装载的商品数量)
|
||||
*/
|
||||
plannedQuantity: number;
|
||||
|
||||
/**
|
||||
* 实际货件数量(该箱子实际装载的商品数量)
|
||||
*/
|
||||
shipmentQuantity: number;
|
||||
|
||||
/**
|
||||
* 物流追踪号(物流商提供的唯一包裹标识)
|
||||
*/
|
||||
trackingNumber: string;
|
||||
|
||||
/**
|
||||
* 供应商称重(单位:KG,由供应商提供)
|
||||
*/
|
||||
supplierWeight: number;
|
||||
|
||||
/**
|
||||
* 物流商计重(单位:KG,物流商实际测量值)
|
||||
*/
|
||||
logisticsWeight: number;
|
||||
|
||||
/**
|
||||
* 称重差异(应用层计算:物流商计重 - 供应商称重)
|
||||
*/
|
||||
weightDiff: number;
|
||||
|
||||
/**
|
||||
* 物流单价(单位:元/KG,由合同或报价确定)
|
||||
*/
|
||||
pricePerKg: number;
|
||||
|
||||
/**
|
||||
* 物流计价重量(应用层根据业务规则计算)
|
||||
*/
|
||||
logisticsCalculationPrice: number;
|
||||
|
||||
/**
|
||||
* 其他物流费用(如报关费、保险费等)
|
||||
*/
|
||||
otherFee: number;
|
||||
|
||||
/**
|
||||
* 费用合计(应用层计算:物流计价 + 其他费用)
|
||||
*/
|
||||
totalFee: number;
|
||||
|
||||
/**
|
||||
* 物流状态(pending:待发运/in_transit:运输中/delivered:已签收)
|
||||
*/
|
||||
logisticsStatus: string;
|
||||
|
||||
/**
|
||||
* 预计签收日期(物流商提供的预估日期)
|
||||
*/
|
||||
estimatedDeliveryDate: string;
|
||||
|
||||
/**
|
||||
* 实际签收日期(物流商回传的实际日期)
|
||||
*/
|
||||
actualDeliveryDate: string;
|
||||
|
||||
/**
|
||||
* 运输时效(单位:天,实际签收日期 - 发货日期)
|
||||
*/
|
||||
timeliness: number;
|
||||
}
|
||||
|
||||
export interface LogisticsOrderDetailForm extends BaseEntity {
|
||||
/**
|
||||
* 主键(应用层生成的全局唯一ID)
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 关联主表ID(biz_logistics_order.id)
|
||||
*/
|
||||
orderId?: string | number;
|
||||
|
||||
/**
|
||||
* FBA货件编号(冗余存储,避免联表查询)
|
||||
*/
|
||||
fbaShipmentId?: string | number;
|
||||
|
||||
/**
|
||||
* FBA箱号(亚马逊系统中箱子的唯一标识)
|
||||
*/
|
||||
fbaBoxNumber?: string;
|
||||
|
||||
/**
|
||||
* 物流商ID(冗余存储)
|
||||
*/
|
||||
logisticsProviderId?: string | number;
|
||||
|
||||
/**
|
||||
* 物流商名称(冗余存储)
|
||||
*/
|
||||
logisticsProviderName?: string | number;
|
||||
|
||||
/**
|
||||
* 物流渠道(与主表一致)
|
||||
*/
|
||||
logisticsChannel?: string;
|
||||
|
||||
/**
|
||||
* 目的地仓库(冗余存储)
|
||||
*/
|
||||
destination?: string;
|
||||
|
||||
/**
|
||||
* 计划数量(该箱子预计装载的商品数量)
|
||||
*/
|
||||
plannedQuantity?: number;
|
||||
|
||||
/**
|
||||
* 实际货件数量(该箱子实际装载的商品数量)
|
||||
*/
|
||||
shipmentQuantity?: number;
|
||||
|
||||
/**
|
||||
* 物流追踪号(物流商提供的唯一包裹标识)
|
||||
*/
|
||||
trackingNumber?: string;
|
||||
|
||||
/**
|
||||
* 供应商称重(单位:KG,由供应商提供)
|
||||
*/
|
||||
supplierWeight?: number;
|
||||
|
||||
/**
|
||||
* 物流商计重(单位:KG,物流商实际测量值)
|
||||
*/
|
||||
logisticsWeight?: number;
|
||||
|
||||
/**
|
||||
* 称重差异(应用层计算:物流商计重 - 供应商称重)
|
||||
*/
|
||||
weightDiff?: number;
|
||||
|
||||
/**
|
||||
* 物流单价(单位:元/KG,由合同或报价确定)
|
||||
*/
|
||||
pricePerKg?: number;
|
||||
|
||||
/**
|
||||
* 物流计价重量(应用层根据业务规则计算)
|
||||
*/
|
||||
logisticsCalculationPrice?: number;
|
||||
|
||||
/**
|
||||
* 其他物流费用(如报关费、保险费等)
|
||||
*/
|
||||
otherFee?: number;
|
||||
|
||||
/**
|
||||
* 费用合计(应用层计算:物流计价 + 其他费用)
|
||||
*/
|
||||
totalFee?: number;
|
||||
|
||||
/**
|
||||
* 物流状态(pending:待发运/in_transit:运输中/delivered:已签收)
|
||||
*/
|
||||
logisticsStatus?: string;
|
||||
|
||||
/**
|
||||
* 预计签收日期(物流商提供的预估日期)
|
||||
*/
|
||||
estimatedDeliveryDate?: string;
|
||||
|
||||
/**
|
||||
* 实际签收日期(物流商回传的实际日期)
|
||||
*/
|
||||
actualDeliveryDate?: string;
|
||||
|
||||
/**
|
||||
* 运输时效(单位:天,实际签收日期 - 发货日期)
|
||||
*/
|
||||
timeliness?: number;
|
||||
}
|
||||
|
||||
export interface LogisticsOrderDetailQuery extends PageQuery {
|
||||
/**
|
||||
* 关联主表ID(biz_logistics_order.id)
|
||||
*/
|
||||
orderId?: string | number;
|
||||
|
||||
/**
|
||||
* FBA货件编号(冗余存储,避免联表查询)
|
||||
*/
|
||||
fbaShipmentId?: string | number;
|
||||
|
||||
/**
|
||||
* FBA箱号(亚马逊系统中箱子的唯一标识)
|
||||
*/
|
||||
fbaBoxNumber?: string;
|
||||
|
||||
/**
|
||||
* 物流商ID(冗余存储)
|
||||
*/
|
||||
logisticsProviderId?: string | number;
|
||||
|
||||
/**
|
||||
* 物流商名称(冗余存储)
|
||||
*/
|
||||
logisticsProviderName?: string | number;
|
||||
|
||||
/**
|
||||
* 物流渠道(与主表一致)
|
||||
*/
|
||||
logisticsChannel?: string;
|
||||
|
||||
/**
|
||||
* 目的地仓库(冗余存储)
|
||||
*/
|
||||
destination?: string;
|
||||
|
||||
/**
|
||||
* 计划数量(该箱子预计装载的商品数量)
|
||||
*/
|
||||
plannedQuantity?: number;
|
||||
|
||||
/**
|
||||
* 实际货件数量(该箱子实际装载的商品数量)
|
||||
*/
|
||||
shipmentQuantity?: number;
|
||||
|
||||
/**
|
||||
* 物流追踪号(物流商提供的唯一包裹标识)
|
||||
*/
|
||||
trackingNumber?: string;
|
||||
|
||||
/**
|
||||
* 供应商称重(单位:KG,由供应商提供)
|
||||
*/
|
||||
supplierWeight?: number;
|
||||
|
||||
/**
|
||||
* 物流商计重(单位:KG,物流商实际测量值)
|
||||
*/
|
||||
logisticsWeight?: number;
|
||||
|
||||
/**
|
||||
* 称重差异(应用层计算:物流商计重 - 供应商称重)
|
||||
*/
|
||||
weightDiff?: number;
|
||||
|
||||
/**
|
||||
* 物流单价(单位:元/KG,由合同或报价确定)
|
||||
*/
|
||||
pricePerKg?: number;
|
||||
|
||||
/**
|
||||
* 物流计价重量(应用层根据业务规则计算)
|
||||
*/
|
||||
logisticsCalculationPrice?: number;
|
||||
|
||||
/**
|
||||
* 其他物流费用(如报关费、保险费等)
|
||||
*/
|
||||
otherFee?: number;
|
||||
|
||||
/**
|
||||
* 费用合计(应用层计算:物流计价 + 其他费用)
|
||||
*/
|
||||
totalFee?: number;
|
||||
|
||||
/**
|
||||
* 物流状态(pending:待发运/in_transit:运输中/delivered:已签收)
|
||||
*/
|
||||
logisticsStatus?: string;
|
||||
|
||||
/**
|
||||
* 预计签收日期(物流商提供的预估日期)
|
||||
*/
|
||||
estimatedDeliveryDate?: string;
|
||||
|
||||
/**
|
||||
* 实际签收日期(物流商回传的实际日期)
|
||||
*/
|
||||
actualDeliveryDate?: string;
|
||||
|
||||
/**
|
||||
* 运输时效(单位:天,实际签收日期 - 发货日期)
|
||||
*/
|
||||
timeliness?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
@ -21,11 +21,12 @@ export const listLogisticsQuote = (query?: LogisticsQuoteQuery): AxiosPromise<Lo
|
||||
* @returns {*}
|
||||
* @param destination
|
||||
* @param channelId
|
||||
* @param date
|
||||
*/
|
||||
|
||||
export const queryLogisticsQuote = (destination: string, channelId: string): AxiosPromise<LogisticsQuoteVO[]> => {
|
||||
export const queryLogisticsQuote = (destination: string, channelId: string, date: string): AxiosPromise<LogisticsQuoteVO[]> => {
|
||||
return request({
|
||||
url: '/amz/logisticsQuote/query/' + destination + '/' + channelId,
|
||||
url: '/amz/logisticsQuote/query/' + destination + '/' + channelId + '/' + date,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
@ -53,6 +54,18 @@ export const addLogisticsQuote = (data: LogisticsQuoteForm) => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增物流报价
|
||||
* @param data
|
||||
*/
|
||||
export const addMostLogisticsQuote = (data: LogisticsQuoteForm) => {
|
||||
return request({
|
||||
url: '/amz/logisticsQuote/most',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改物流报价
|
||||
* @param data
|
||||
|
@ -17,7 +17,7 @@ export interface LogisticsQuoteVO {
|
||||
/**
|
||||
* 渠道名称(冗余存储,保证查询效率)
|
||||
*/
|
||||
transportChannel: string;
|
||||
channelName: string;
|
||||
|
||||
/**
|
||||
* 基础价格
|
||||
@ -59,6 +59,15 @@ export interface LogisticsQuoteVO {
|
||||
*/
|
||||
channelId: string | number;
|
||||
|
||||
/**
|
||||
* 是否双清包税(N不是 Y是)
|
||||
*/
|
||||
isDdp: string;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
unit: string;
|
||||
}
|
||||
|
||||
export interface LogisticsQuoteForm extends BaseEntity {
|
||||
@ -122,9 +131,22 @@ export interface LogisticsQuoteForm extends BaseEntity {
|
||||
*/
|
||||
channelId?: string | number;
|
||||
|
||||
/**
|
||||
* 是否双清包税(N不是 Y是)
|
||||
*/
|
||||
isDdp?: string;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
unit?: string;
|
||||
}
|
||||
|
||||
export interface LogisticsQuoteQuery extends PageQuery {
|
||||
export interface LogisticsMostQuoteForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 物流商用户ID(关联sys_user表)
|
||||
@ -139,7 +161,84 @@ export interface LogisticsQuoteQuery extends PageQuery {
|
||||
/**
|
||||
* 渠道名称(冗余存储,保证查询效率)
|
||||
*/
|
||||
transportChannel?: string;
|
||||
channelName?: string;
|
||||
|
||||
/**
|
||||
* 基础价格
|
||||
*/
|
||||
price?: number;
|
||||
|
||||
/**
|
||||
* 时效(单位:天)
|
||||
*/
|
||||
leadTime?: number;
|
||||
|
||||
/**
|
||||
* 附加费
|
||||
*/
|
||||
surcharge?: number;
|
||||
|
||||
/**
|
||||
* 报价生效日期
|
||||
*/
|
||||
quoteDate?: string;
|
||||
|
||||
/**
|
||||
* 报价生效开始日期
|
||||
*/
|
||||
quoteStartDate?: string;
|
||||
|
||||
/**
|
||||
* 报价生效结束日期
|
||||
*/
|
||||
quoteEndDate?: string;
|
||||
|
||||
/**
|
||||
* 提交状态(Y已提交 N未提交)
|
||||
*/
|
||||
isSubmitted?: string;
|
||||
|
||||
/**
|
||||
* 报价备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 渠道类型(system=系统/custom=自定义)
|
||||
*/
|
||||
channelType?: string;
|
||||
|
||||
/**
|
||||
* 渠道ID(system=dict_code,custom=自定义渠道ID)
|
||||
*/
|
||||
channelId?: string | number;
|
||||
|
||||
/**
|
||||
* 是否双清包税(N不是 Y是)
|
||||
*/
|
||||
isDdp?: string;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
unit?: string;
|
||||
}
|
||||
|
||||
export interface LogisticsQuoteQuery extends PageQuery {
|
||||
/**
|
||||
* 物流商用户ID(关联sys_user表)
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 目的地(建议使用ISO国家代码如CN/US/GB)
|
||||
*/
|
||||
destination?: string;
|
||||
|
||||
/**
|
||||
* 渠道名称(冗余存储,保证查询效率)
|
||||
*/
|
||||
channelName?: string;
|
||||
|
||||
/**
|
||||
* 基础价格
|
||||
@ -176,11 +275,18 @@ export interface LogisticsQuoteQuery extends PageQuery {
|
||||
*/
|
||||
channelId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
/**
|
||||
* 是否双清包税(N不是 Y是)
|
||||
*/
|
||||
isDdp?: string;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
unit?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ export interface ShipmentPlanVO {
|
||||
/**
|
||||
* 物流中心编码
|
||||
*/
|
||||
destinationFulfillmentCenterId: string | number;
|
||||
destination: string | number;
|
||||
|
||||
/**
|
||||
* 运输模式
|
||||
@ -136,7 +136,7 @@ export interface ShipmentPlanForm extends BaseEntity {
|
||||
/**
|
||||
* 物流中心编码
|
||||
*/
|
||||
destinationFulfillmentCenterId?: string | number;
|
||||
destination?: string | number;
|
||||
|
||||
/**
|
||||
* 运输模式
|
||||
@ -235,7 +235,7 @@ export interface ShipmentPlanQuery extends PageQuery {
|
||||
/**
|
||||
* 物流中心编码
|
||||
*/
|
||||
destinationFulfillmentCenterId?: string | number;
|
||||
destination?: string | number;
|
||||
|
||||
/**
|
||||
* 运输模式
|
||||
|
@ -17,11 +17,16 @@
|
||||
@change="dynamicTenantEvent"
|
||||
@clear="dynamicClearEvent"
|
||||
>
|
||||
<el-option v-for="item in tenantList" :key="item.tenantId" :label="item.companyName" :value="item.tenantId"> </el-option>
|
||||
<template #prefix><svg-icon icon-class="company" class="el-input__icon input-icon" /></template>
|
||||
<el-option v-for="item in tenantList" :key="item.tenantId" :label="item.companyName" :value="item.tenantId"></el-option>
|
||||
<template #prefix>
|
||||
<svg-icon icon-class="company" class="el-input__icon input-icon" />
|
||||
</template>
|
||||
</el-select>
|
||||
|
||||
<!-- <header-search id="header-search" class="right-menu-item" /> -->
|
||||
<div class="pull-right">
|
||||
<el-tag type="warning" class="role-name">{{ roleNmae }}</el-tag>
|
||||
</div>
|
||||
<search-menu ref="searchMenuRef" />
|
||||
<el-tooltip content="搜索" effect="dark" placement="bottom">
|
||||
<div class="right-menu-item hover-effect" @click="openSearchMenu">
|
||||
@ -60,7 +65,9 @@
|
||||
<el-dropdown class="right-menu-item hover-effect" trigger="click" @command="handleCommand">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="userStore.avatar" class="user-avatar" />
|
||||
<el-icon><caret-bottom /></el-icon>
|
||||
<el-icon>
|
||||
<caret-bottom />
|
||||
</el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
@ -92,6 +99,7 @@ import { dynamicClear, dynamicTenant } from '@/api/system/tenant';
|
||||
import { TenantVO } from '@/api/types';
|
||||
import notice from './notice/index.vue';
|
||||
import router from '@/router';
|
||||
import { UserVO } from '@/api/system/user/types';
|
||||
|
||||
const appStore = useAppStore();
|
||||
const userStore = useUserStore();
|
||||
@ -102,6 +110,7 @@ const newNotice = ref(<number>0);
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const userId = ref(userStore.userId);
|
||||
const roles = userStore.roles;
|
||||
const companyName = ref(undefined);
|
||||
const tenantList = ref<TenantVO[]>([]);
|
||||
// 是否切换了租户
|
||||
@ -111,6 +120,19 @@ const tenantEnabled = ref(false);
|
||||
// 搜索菜单
|
||||
const searchMenuRef = ref<InstanceType<typeof SearchMenu>>();
|
||||
|
||||
console.log('roles', roles);
|
||||
|
||||
const roleNmae = computed(() => {
|
||||
if (roles.includes('superadmin')) {
|
||||
return '超级管理员';
|
||||
} else if (roles.includes('wuliu')) {
|
||||
return '物流商';
|
||||
} else if (roles.includes('yunying')) {
|
||||
return '运营';
|
||||
} else {
|
||||
return '普通用户';
|
||||
}
|
||||
});
|
||||
const openSearchMenu = () => {
|
||||
searchMenuRef.value?.openSearch();
|
||||
};
|
||||
|
@ -62,20 +62,44 @@
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['amz:inquiryRequest:add']"> 新增 </el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasRoles="['superadmin']" v-hasPermi="['amz:inquiryRequest:add']">
|
||||
新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['amz:inquiryRequest:edit']"
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
v-hasRoles="['superadmin']"
|
||||
@click="handleUpdate()"
|
||||
v-hasPermi="['amz:inquiryRequest:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['amz:inquiryRequest:remove']"
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
v-hasRoles="['superadmin']"
|
||||
@click="handleDelete()"
|
||||
v-hasPermi="['amz:inquiryRequest:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['amz:inquiryRequest:export']">导出 </el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasRoles="['superadmin']"
|
||||
v-hasPermi="['amz:inquiryRequest:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@ -120,7 +144,7 @@
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasRoles="['yunying']"
|
||||
v-hasRoles="['superadmin']"
|
||||
v-hasPermi="['amz:inquiryRequest:remove']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
@ -193,18 +217,26 @@
|
||||
<el-form-item label="目的地" prop="destination">
|
||||
<el-input v-model="quoteForm.destination" placeholder="请输入目的地" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道名称" prop="transportChannel">
|
||||
<el-input v-model="quoteForm.transportChannel" placeholder="请输入渠道名称" disabled />
|
||||
<el-form-item label="渠道名称" prop="channelName">
|
||||
<el-input v-model="quoteForm.channelName" placeholder="请输入渠道名称" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="基础价格" prop="price">
|
||||
<el-input v-model="quoteForm.price" placeholder="请输入基础价格" />
|
||||
<div class="kgprice">
|
||||
<el-input-number v-model="quoteForm.price" :precision="2" :step="0.1" :min="1" :max="100">
|
||||
<template #suffix>
|
||||
<span>元每公斤</span>
|
||||
</template>
|
||||
</el-input-number>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="时效" prop="leadTime">
|
||||
<el-input-number v-model="quoteForm.leadTime" :min="1" :max="100">
|
||||
<template #suffix>
|
||||
<span>天</span>
|
||||
</template>
|
||||
</el-input-number>
|
||||
<div class="kgprice">
|
||||
<el-input-number v-model="quoteForm.leadTime" :min="1" :max="100">
|
||||
<template #suffix>
|
||||
<span>天</span>
|
||||
</template>
|
||||
</el-input-number>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="附加费" prop="surcharge">
|
||||
<el-input v-model="quoteForm.surcharge" placeholder="请输入附加费" />
|
||||
@ -226,6 +258,11 @@
|
||||
<el-form-item label="渠道ID" prop="channelId">
|
||||
<el-input v-model="quoteForm.channelId" placeholder="请输入渠道ID" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否双清包税" prop="channelId">
|
||||
<el-select v-model="quoteForm.isDdp" placeholder="选择是否双清包税" size="large" style="width: 240px">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@ -241,7 +278,8 @@
|
||||
<script setup name="InquiryRequest" lang="ts">
|
||||
import { listInquiryRequest, getInquiryRequest, delInquiryRequest, addInquiryRequest, updateInquiryRequest } from '@/api/amz/inquiryRequest';
|
||||
import { InquiryRequestVO, InquiryRequestQuery, InquiryRequestForm } from '@/api/amz/inquiryRequest/types';
|
||||
import { LogisticsQuoteForm } from '@/api/amz/logisticsQuote/types';
|
||||
import { LogisticsMostQuoteForm, LogisticsQuoteForm } from '@/api/amz/logisticsQuote/types';
|
||||
import { addMostLogisticsQuote } from '@/api/amz/logisticsQuote';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
@ -281,12 +319,12 @@ const initFormData: InquiryRequestForm = {
|
||||
effectiveStartTime: undefined,
|
||||
effectiveEndTime: undefined
|
||||
};
|
||||
const initQuoteForm: LogisticsQuoteForm = {
|
||||
const initQuoteForm: LogisticsMostQuoteForm = {
|
||||
userId: undefined,
|
||||
destination: undefined,
|
||||
transportChannel: undefined,
|
||||
price: undefined,
|
||||
leadTime: undefined,
|
||||
price: 10,
|
||||
leadTime: 10,
|
||||
surcharge: undefined,
|
||||
quoteStartDate: undefined,
|
||||
quoteEndDate: undefined,
|
||||
@ -294,7 +332,9 @@ const initQuoteForm: LogisticsQuoteForm = {
|
||||
isSubmitted: undefined,
|
||||
remark: undefined,
|
||||
channelType: undefined,
|
||||
channelId: undefined
|
||||
channelId: undefined,
|
||||
isDdp: 'Y',
|
||||
unit: 'kg'
|
||||
};
|
||||
const data = reactive<PageData<InquiryRequestForm, InquiryRequestQuery>>({
|
||||
form: { ...initFormData },
|
||||
@ -331,6 +371,17 @@ const data = reactive<PageData<InquiryRequestForm, InquiryRequestQuery>>({
|
||||
|
||||
const { queryParams, form, rules, quoteForm } = toRefs(data);
|
||||
|
||||
const options = ref([
|
||||
{
|
||||
value: 'Y',
|
||||
label: '是'
|
||||
},
|
||||
{
|
||||
value: 'N',
|
||||
label: '否'
|
||||
}
|
||||
]);
|
||||
|
||||
/** 查询物流询价列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
@ -410,14 +461,13 @@ const submitForm = () => {
|
||||
}
|
||||
});
|
||||
};
|
||||
const submitQuoteForm = () => {
|
||||
quoteForm.value.isSubmitted = false;
|
||||
quoteForm.value.quoteDate = [quoteForm.value.quoteStartDate, quoteForm.value.quoteEndDate];
|
||||
quoteForm.value.quoteStartDate = undefined;
|
||||
quoteForm.value.quoteEndDate = undefined;
|
||||
quoteForm.value.remark = undefined;
|
||||
quoteForm.value.channelType = undefined;
|
||||
quoteForm.value.channelId = undefined;
|
||||
const submitQuoteForm = async () => {
|
||||
data.quoteForm.quoteStartDate = data.quoteForm.quoteDate[0];
|
||||
data.quoteForm.quoteEndDate = data.quoteForm.quoteDate[1];
|
||||
data.quoteForm.isSubmitted = 'Y';
|
||||
console.log('submitQuoteForm', data.quoteForm);
|
||||
const res = await addMostLogisticsQuote(data.quoteForm);
|
||||
console.log('submitQuoteForm', res);
|
||||
};
|
||||
|
||||
const saveQuoteForm = () => {
|
||||
@ -473,3 +523,8 @@ onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.kgprice .el-input-number {
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
|
@ -29,20 +29,42 @@
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['amz:logisticsChannel:add']">新增</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['amz:logisticsChannel:add']"> 新增 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['amz:logisticsChannel:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate()"
|
||||
v-hasRoles="['superadmin']"
|
||||
v-hasPermi="['amz:logisticsChannel:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['amz:logisticsChannel:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete()"
|
||||
v-hasRoles="['superadmin']"
|
||||
v-hasPermi="['amz:logisticsChannel:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['amz:logisticsChannel:export']">导出</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasRoles="['superadmin']"
|
||||
v-hasPermi="['amz:logisticsChannel:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
336
src/views/amz/logisticsOrder/index.vue
Normal file
336
src/views/amz/logisticsOrder/index.vue
Normal file
@ -0,0 +1,336 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="FBA货件编号" prop="fbaShipmentId">
|
||||
<el-input v-model="queryParams.fbaShipmentId" placeholder="请输入FBA货件编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderId">
|
||||
<el-input v-model="queryParams.orderId" placeholder="请输入订单编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商ID" prop="logisticsProviderId">
|
||||
<el-input v-model="queryParams.logisticsProviderId" placeholder="请输入物流商ID" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商名称" prop="logisticsProviderName">
|
||||
<el-input v-model="queryParams.logisticsProviderName" placeholder="请输入物流商名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流渠道" prop="logisticsChannel">
|
||||
<el-input v-model="queryParams.logisticsChannel" placeholder="请输入物流渠道" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地仓库名称或编码" prop="destination">
|
||||
<el-input v-model="queryParams.destination" placeholder="请输入目的地仓库名称或编码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总箱子数量" prop="boxQuantity">
|
||||
<el-input v-model="queryParams.boxQuantity" placeholder="请输入总箱子数量" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总货件数量" prop="shipmentQuantity">
|
||||
<el-input v-model="queryParams.shipmentQuantity" placeholder="请输入总货件数量" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="亚马逊仓库实际上架日期" prop="amazonShelfDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="queryParams.amazonShelfDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择亚马逊仓库实际上架日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="上架时效" prop="shelfTimeliness">
|
||||
<el-input v-model="queryParams.shelfTimeliness" placeholder="请输入上架时效" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['amz:logisticsOrder:add']"> 新增 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['amz:logisticsOrder:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['amz:logisticsOrder:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['amz:logisticsOrder:export']">导出 </el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="logisticsOrderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="FBA货件编号" align="center" prop="fbaShipmentId" />
|
||||
<el-table-column label="订单编号" align="center" prop="orderId" />
|
||||
<el-table-column label="物流商ID" align="center" prop="logisticsProviderId" />
|
||||
<el-table-column label="物流商名称" align="center" prop="logisticsProviderName" />
|
||||
<el-table-column label="物流渠道" align="center" prop="logisticsChannel" />
|
||||
<el-table-column label="目的地仓库名称或编码" align="center" prop="destination" />
|
||||
<el-table-column label="总箱子数量" align="center" prop="boxQuantity" />
|
||||
<el-table-column label="总货件数量" align="center" prop="shipmentQuantity" />
|
||||
<el-table-column label="亚马逊仓库实际上架日期" align="center" prop="amazonShelfDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.amazonShelfDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上架时效" align="center" prop="shelfTimeliness" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['amz:logisticsOrder:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['amz:logisticsOrder:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改物流订单对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="logisticsOrderFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="主键" prop="id">
|
||||
<el-input v-model="form.id" placeholder="请输入主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="FBA货件编号" prop="fbaShipmentId">
|
||||
<el-input v-model="form.fbaShipmentId" placeholder="请输入FBA货件编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderId">
|
||||
<el-input v-model="form.orderId" placeholder="请输入订单编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商ID" prop="logisticsProviderId">
|
||||
<el-input v-model="form.logisticsProviderId" placeholder="请输入物流商ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商名称" prop="logisticsProviderName">
|
||||
<el-input v-model="form.logisticsProviderName" placeholder="请输入物流商名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流渠道" prop="logisticsChannel">
|
||||
<el-input v-model="form.logisticsChannel" placeholder="请输入物流渠道" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地仓库名称或编码" prop="destination">
|
||||
<el-input v-model="form.destination" placeholder="请输入目的地仓库名称或编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总箱子数量" prop="boxQuantity">
|
||||
<el-input v-model="form.boxQuantity" placeholder="请输入总箱子数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总货件数量" prop="shipmentQuantity">
|
||||
<el-input v-model="form.shipmentQuantity" placeholder="请输入总货件数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="亚马逊仓库实际上架日期" prop="amazonShelfDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.amazonShelfDate"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择亚马逊仓库实际上架日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="上架时效" prop="shelfTimeliness">
|
||||
<el-input v-model="form.shelfTimeliness" placeholder="请输入上架时效" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="LogisticsOrder" lang="ts">
|
||||
import {
|
||||
listLogisticsOrder,
|
||||
getLogisticsOrder,
|
||||
delLogisticsOrder,
|
||||
addLogisticsOrder,
|
||||
updateLogisticsOrder,
|
||||
createOrder
|
||||
} from '@/api/amz/logisticsOrder';
|
||||
import { LogisticsOrderVO, LogisticsOrderQuery, LogisticsOrderForm } from '@/api/amz/logisticsOrder/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const logisticsOrderList = ref<LogisticsOrderVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const logisticsOrderFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: LogisticsOrderForm = {
|
||||
id: undefined,
|
||||
fbaShipmentId: undefined,
|
||||
orderId: undefined,
|
||||
logisticsProviderId: undefined,
|
||||
logisticsProviderName: undefined,
|
||||
logisticsChannel: undefined,
|
||||
destination: undefined,
|
||||
boxQuantity: undefined,
|
||||
shipmentQuantity: undefined,
|
||||
amazonShelfDate: undefined,
|
||||
shelfTimeliness: undefined
|
||||
};
|
||||
const data = reactive<PageData<LogisticsOrderForm, LogisticsOrderQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
fbaShipmentId: undefined,
|
||||
orderId: undefined,
|
||||
logisticsProviderId: undefined,
|
||||
logisticsProviderName: undefined,
|
||||
logisticsChannel: undefined,
|
||||
destination: undefined,
|
||||
boxQuantity: undefined,
|
||||
shipmentQuantity: undefined,
|
||||
amazonShelfDate: undefined,
|
||||
shelfTimeliness: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键不能为空', trigger: 'blur' }],
|
||||
fbaShipmentId: [{ required: true, message: 'FBA货件编号不能为空', trigger: 'blur' }],
|
||||
orderId: [{ required: true, message: '订单编号不能为空', trigger: 'blur' }],
|
||||
logisticsProviderId: [{ required: true, message: '物流商ID不能为空', trigger: 'blur' }],
|
||||
logisticsProviderName: [{ required: true, message: '物流商名称不能为空', trigger: 'blur' }],
|
||||
logisticsChannel: [{ required: true, message: '物流渠道不能为空', trigger: 'blur' }],
|
||||
destination: [{ required: true, message: '目的地仓库名称或编码不能为空', trigger: 'blur' }],
|
||||
boxQuantity: [{ required: true, message: '总箱子数量不能为空', trigger: 'blur' }],
|
||||
shipmentQuantity: [{ required: true, message: '总货件数量不能为空', trigger: 'blur' }],
|
||||
amazonShelfDate: [{ required: true, message: '亚马逊仓库实际上架日期不能为空', trigger: 'blur' }],
|
||||
shelfTimeliness: [{ required: true, message: '上架时效不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
|
||||
|
||||
/** 查询物流订单列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listLogisticsOrder(queryParams.value);
|
||||
logisticsOrderList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
logisticsOrderFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: LogisticsOrderVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加物流订单';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: LogisticsOrderVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getLogisticsOrder(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改物流订单';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
logisticsOrderFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateLogisticsOrder(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addLogisticsOrder(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: LogisticsOrderVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除物流订单编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delLogisticsOrder(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'amz/logisticsOrder/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`logisticsOrder_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
456
src/views/amz/logisticsOrderDetail/index.vue
Normal file
456
src/views/amz/logisticsOrderDetail/index.vue
Normal file
@ -0,0 +1,456 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="订单号" prop="orderId">
|
||||
<el-input v-model="queryParams.orderId" placeholder="请输入订单号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="FBA货件编号" prop="fbaShipmentId">
|
||||
<el-input v-model="queryParams.fbaShipmentId" placeholder="请输入FBA货件编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="FBA箱号" prop="fbaBoxNumber">
|
||||
<el-input v-model="queryParams.fbaBoxNumber" placeholder="请输入FBA箱号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商ID" prop="logisticsProviderId">
|
||||
<el-input v-model="queryParams.logisticsProviderId" placeholder="请输入物流商ID" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商名称" prop="logisticsProviderName">
|
||||
<el-input v-model="queryParams.logisticsProviderName" placeholder="请输入物流商名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流渠道" prop="logisticsChannel">
|
||||
<el-input v-model="queryParams.logisticsChannel" placeholder="请输入物流渠道" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地仓库" prop="destination">
|
||||
<el-input v-model="queryParams.destination" placeholder="请输入目的地仓库" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划数量" prop="plannedQuantity">
|
||||
<el-input v-model="queryParams.plannedQuantity" placeholder="请输入计划数量" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际货件数量" prop="shipmentQuantity">
|
||||
<el-input v-model="queryParams.shipmentQuantity" placeholder="请输入实际货件数量" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流追踪号" prop="trackingNumber">
|
||||
<el-input v-model="queryParams.trackingNumber" placeholder="请输入物流追踪号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商称重" prop="supplierWeight">
|
||||
<el-input v-model="queryParams.supplierWeight" placeholder="请输入供应商称重" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商计重" prop="logisticsWeight">
|
||||
<el-input v-model="queryParams.logisticsWeight" placeholder="请输入物流商计重" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="称重差异" prop="weightDiff">
|
||||
<el-input v-model="queryParams.weightDiff" placeholder="请输入称重差异" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流单价" prop="pricePerKg">
|
||||
<el-input v-model="queryParams.pricePerKg" placeholder="请输入物流单价" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流计价重量" prop="logisticsCalculationPrice">
|
||||
<el-input v-model="queryParams.logisticsCalculationPrice" placeholder="请输入物流计价重量" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="其他物流费用" prop="otherFee">
|
||||
<el-input v-model="queryParams.otherFee" placeholder="请输入其他物流费用" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="费用合计" prop="totalFee">
|
||||
<el-input v-model="queryParams.totalFee" placeholder="请输入费用合计" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预计签收日期" prop="estimatedDeliveryDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="queryParams.estimatedDeliveryDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择预计签收日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="实际签收日期" prop="actualDeliveryDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="queryParams.actualDeliveryDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择实际签收日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="运输时效" prop="timeliness">
|
||||
<el-input v-model="queryParams.timeliness" placeholder="请输入运输时效" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['amz:logisticsOrderDetail:add']">新增 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['amz:logisticsOrderDetail:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['amz:logisticsOrderDetail:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['amz:logisticsOrderDetail:export']">导出 </el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="logisticsOrderDetailList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="订单号" align="center" prop="orderId" />
|
||||
<el-table-column label="FBA货件编号" align="center" prop="fbaShipmentId" />
|
||||
<el-table-column label="FBA箱号" align="center" prop="fbaBoxNumber" />
|
||||
<el-table-column label="物流商ID" align="center" prop="logisticsProviderId" />
|
||||
<el-table-column label="物流商名称" align="center" prop="logisticsProviderName" />
|
||||
<el-table-column label="物流渠道" align="center" prop="logisticsChannel" />
|
||||
<el-table-column label="目的地仓库" align="center" prop="destination" />
|
||||
<el-table-column label="计划数量" align="center" prop="plannedQuantity" />
|
||||
<el-table-column label="实际货件数量" align="center" prop="shipmentQuantity" />
|
||||
<el-table-column label="物流追踪号" align="center" prop="trackingNumber" />
|
||||
<el-table-column label="供应商称重" align="center" prop="supplierWeight" />
|
||||
<el-table-column label="物流商计重" align="center" prop="logisticsWeight" />
|
||||
<el-table-column label="称重差异" align="center" prop="weightDiff" />
|
||||
<el-table-column label="物流单价" align="center" prop="pricePerKg" />
|
||||
<el-table-column label="物流计价重量" align="center" prop="logisticsCalculationPrice" />
|
||||
<el-table-column label="其他物流费用" align="center" prop="otherFee" />
|
||||
<el-table-column label="费用合计" align="center" prop="totalFee" />
|
||||
<el-table-column label="物流状态" align="center" prop="logisticsStatus" />
|
||||
<el-table-column label="预计签收日期" align="center" prop="estimatedDeliveryDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.estimatedDeliveryDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际签收日期" align="center" prop="actualDeliveryDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.actualDeliveryDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="运输时效" align="center" prop="timeliness" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['amz:logisticsOrderDetail:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['amz:logisticsOrderDetail:remove']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改物流订单明细(按箱子维度存储)对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="logisticsOrderDetailFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="订单号" prop="orderId">
|
||||
<el-input v-model="form.orderId" placeholder="请输入订单号" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="FBA货件编号" prop="fbaShipmentId">
|
||||
<el-input v-model="form.fbaShipmentId" placeholder="请输入FBA货件编号" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="FBA箱号" prop="fbaBoxNumber">
|
||||
<el-input v-model="form.fbaBoxNumber" placeholder="请输入FBA箱号" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商ID" prop="logisticsProviderId">
|
||||
<el-input v-model="form.logisticsProviderId" placeholder="请输入物流商ID" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商名称" prop="logisticsProviderName">
|
||||
<el-input v-model="form.logisticsProviderName" placeholder="请输入物流商名称" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流渠道" prop="logisticsChannel">
|
||||
<el-input v-model="form.logisticsChannel" placeholder="请输入物流渠道" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地仓库" prop="destination">
|
||||
<el-input v-model="form.destination" placeholder="请输入目的地仓库" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划数量" prop="plannedQuantity">
|
||||
<el-input v-model="form.plannedQuantity" placeholder="请输入计划数量" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际货件数量" prop="shipmentQuantity">
|
||||
<el-input v-model="form.shipmentQuantity" placeholder="请输入实际货件数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流追踪号" prop="trackingNumber">
|
||||
<el-input v-model="form.trackingNumber" placeholder="请输入物流追踪号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商称重" prop="supplierWeight">
|
||||
<el-input v-model="form.supplierWeight" placeholder="请输入供应商称重" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商计重" prop="logisticsWeight">
|
||||
<el-input v-model="form.logisticsWeight" placeholder="请输入物流商计重" />
|
||||
</el-form-item>
|
||||
<el-form-item label="称重差异" prop="weightDiff">
|
||||
<el-input v-model="form.weightDiff" placeholder="请输入称重差异" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流单价" prop="pricePerKg">
|
||||
<el-input v-model="form.pricePerKg" placeholder="请输入物流单价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流计价重量" prop="logisticsCalculationPrice">
|
||||
<el-input v-model="form.logisticsCalculationPrice" placeholder="请输入物流计价重量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="其他物流费用" prop="otherFee">
|
||||
<el-input v-model="form.otherFee" placeholder="请输入其他物流费用" />
|
||||
</el-form-item>
|
||||
<el-form-item label="费用合计" prop="totalFee">
|
||||
<el-input v-model="form.totalFee" placeholder="请输入费用合计" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预计签收日期" prop="estimatedDeliveryDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.estimatedDeliveryDate"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择预计签收日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="实际签收日期" prop="actualDeliveryDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.actualDeliveryDate"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择实际签收日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="运输时效" prop="timeliness">
|
||||
<el-input v-model="form.timeliness" placeholder="请输入运输时效" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="LogisticsOrderDetail" lang="ts">
|
||||
import {
|
||||
listLogisticsOrderDetail,
|
||||
getLogisticsOrderDetail,
|
||||
delLogisticsOrderDetail,
|
||||
addLogisticsOrderDetail,
|
||||
updateLogisticsOrderDetail
|
||||
} from '@/api/amz/logisticsOrderDetail';
|
||||
import { LogisticsOrderDetailVO, LogisticsOrderDetailQuery, LogisticsOrderDetailForm } from '@/api/amz/logisticsOrderDetail/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const logisticsOrderDetailList = ref<LogisticsOrderDetailVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const logisticsOrderDetailFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: LogisticsOrderDetailForm = {
|
||||
id: undefined,
|
||||
orderId: undefined,
|
||||
fbaShipmentId: undefined,
|
||||
fbaBoxNumber: undefined,
|
||||
logisticsProviderId: undefined,
|
||||
logisticsProviderName: undefined,
|
||||
logisticsChannel: undefined,
|
||||
destination: undefined,
|
||||
plannedQuantity: undefined,
|
||||
shipmentQuantity: undefined,
|
||||
trackingNumber: undefined,
|
||||
supplierWeight: undefined,
|
||||
logisticsWeight: undefined,
|
||||
weightDiff: undefined,
|
||||
pricePerKg: undefined,
|
||||
logisticsCalculationPrice: undefined,
|
||||
otherFee: undefined,
|
||||
totalFee: undefined,
|
||||
logisticsStatus: undefined,
|
||||
estimatedDeliveryDate: undefined,
|
||||
actualDeliveryDate: undefined,
|
||||
timeliness: undefined
|
||||
};
|
||||
const data = reactive<PageData<LogisticsOrderDetailForm, LogisticsOrderDetailQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderId: undefined,
|
||||
fbaShipmentId: undefined,
|
||||
fbaBoxNumber: undefined,
|
||||
logisticsProviderId: undefined,
|
||||
logisticsProviderName: undefined,
|
||||
logisticsChannel: undefined,
|
||||
destination: undefined,
|
||||
plannedQuantity: undefined,
|
||||
shipmentQuantity: undefined,
|
||||
trackingNumber: undefined,
|
||||
supplierWeight: undefined,
|
||||
logisticsWeight: undefined,
|
||||
weightDiff: undefined,
|
||||
pricePerKg: undefined,
|
||||
logisticsCalculationPrice: undefined,
|
||||
otherFee: undefined,
|
||||
totalFee: undefined,
|
||||
logisticsStatus: undefined,
|
||||
estimatedDeliveryDate: undefined,
|
||||
actualDeliveryDate: undefined,
|
||||
timeliness: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键不能为空', trigger: 'blur' }],
|
||||
orderId: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
|
||||
fbaShipmentId: [{ required: true, message: 'FBA货件编号不能为空', trigger: 'blur' }],
|
||||
fbaBoxNumber: [{ required: true, message: 'FBA箱号不能为空', trigger: 'blur' }],
|
||||
logisticsProviderId: [{ required: true, message: '物流商ID不能为空', trigger: 'blur' }],
|
||||
logisticsProviderName: [{ required: true, message: '物流商名称不能为空', trigger: 'blur' }],
|
||||
logisticsChannel: [{ required: true, message: '物流渠道不能为空', trigger: 'blur' }],
|
||||
destination: [{ required: true, message: '目的地仓库不能为空', trigger: 'blur' }],
|
||||
plannedQuantity: [{ required: true, message: '计划数量不能为空', trigger: 'blur' }],
|
||||
shipmentQuantity: [{ required: true, message: '实际货件数量不能为空', trigger: 'blur' }],
|
||||
trackingNumber: [{ required: true, message: '物流追踪号不能为空', trigger: 'blur' }],
|
||||
supplierWeight: [{ required: true, message: '供应商称重不能为空', trigger: 'blur' }],
|
||||
logisticsWeight: [{ required: true, message: '物流商计重不能为空', trigger: 'blur' }],
|
||||
weightDiff: [{ required: true, message: '称重差异不能为空', trigger: 'blur' }],
|
||||
pricePerKg: [{ required: true, message: '物流单价不能为空', trigger: 'blur' }],
|
||||
logisticsCalculationPrice: [{ required: true, message: '物流计价重量不能为空', trigger: 'blur' }],
|
||||
otherFee: [{ required: true, message: '其他物流费用不能为空', trigger: 'blur' }],
|
||||
totalFee: [{ required: true, message: '费用合计不能为空', trigger: 'blur' }],
|
||||
logisticsStatus: [{ required: true, message: '物流状态不能为空', trigger: 'change' }],
|
||||
estimatedDeliveryDate: [{ required: true, message: '预计签收日期不能为空', trigger: 'blur' }],
|
||||
actualDeliveryDate: [{ required: true, message: '实际签收日期不能为空', trigger: 'blur' }],
|
||||
timeliness: [{ required: true, message: '运输时效不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询物流订单明细(按箱子维度存储)列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listLogisticsOrderDetail(queryParams.value);
|
||||
logisticsOrderDetailList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
logisticsOrderDetailFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: LogisticsOrderDetailVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加物流订单明细(按箱子维度存储)';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: LogisticsOrderDetailVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getLogisticsOrderDetail(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改物流订单明细(按箱子维度存储)';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
logisticsOrderDetailFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateLogisticsOrderDetail(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addLogisticsOrderDetail(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: LogisticsOrderDetailVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除物流订单明细(按箱子维度存储)编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delLogisticsOrderDetail(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'amz/logisticsOrderDetail/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`logisticsOrderDetail_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
@ -10,8 +10,8 @@
|
||||
<el-form-item label="目的地" prop="destination">
|
||||
<el-input v-model="queryParams.destination" placeholder="请输入目的地" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道名称" prop="transportChannel">
|
||||
<el-input v-model="queryParams.transportChannel" placeholder="请输入渠道名称" clearable @keyup.enter="handleQuery" />
|
||||
<el-form-item label="渠道名称" prop="channelName">
|
||||
<el-input v-model="queryParams.channelName" placeholder="请输入渠道名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="基础价格" prop="price">
|
||||
<el-input v-model="queryParams.price" placeholder="请输入基础价格" clearable @keyup.enter="handleQuery" />
|
||||
@ -28,6 +28,9 @@
|
||||
<el-form-item label="渠道ID" prop="channelId">
|
||||
<el-input v-model="queryParams.channelId" placeholder="请输入渠道ID" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="queryParams.unit" placeholder="请输入单位" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@ -41,20 +44,44 @@
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['amz:logisticsQuote:add']"> 新增 </el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasRoles="['superadmin']" v-hasPermi="['amz:logisticsQuote:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['amz:logisticsQuote:edit']"
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate()"
|
||||
v-hasRoles="['superadmin']"
|
||||
v-hasPermi="['amz:logisticsQuote:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['amz:logisticsQuote:remove']"
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete()"
|
||||
v-hasRoles="['superadmin']"
|
||||
v-hasPermi="['amz:logisticsQuote:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['amz:logisticsQuote:export']">导出 </el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasRoles="['superadmin']"
|
||||
v-hasPermi="['amz:logisticsQuote:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@ -65,7 +92,7 @@
|
||||
<el-table-column label="主键ID" align="center" prop="id" />
|
||||
<el-table-column label="物流商用户ID" align="center" prop="userId" />
|
||||
<el-table-column label="目的地" align="center" prop="destination" />
|
||||
<el-table-column label="渠道名称" align="center" prop="transportChannel" />
|
||||
<el-table-column label="渠道名称" align="center" prop="channelName" />
|
||||
<el-table-column label="基础价格" align="center" prop="price" />
|
||||
<el-table-column label="时效" align="center" prop="leadTime" />
|
||||
<el-table-column label="附加费" align="center" prop="surcharge" />
|
||||
@ -78,13 +105,15 @@
|
||||
<el-table-column label="报价备注" align="center" prop="remark" />
|
||||
<el-table-column label="渠道类型" align="center" prop="channelType" />
|
||||
<el-table-column label="渠道ID" align="center" prop="channelId" />
|
||||
<el-table-column label="是否双清包税" align="center" prop="isDdp" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['amz:logisticsQuote:edit']"></el-button>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasRoles="['wuliu']" v-hasPermi="['amz:logisticsQuote:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['amz:logisticsQuote:remove']"></el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasRoles="['superadmin']" v-hasPermi="['amz:logisticsQuote:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -92,7 +121,51 @@
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
<!-- 添加或修改物流报价对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="logisticsQuoteFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="主键ID" prop="id">
|
||||
<el-input v-model="form.id" placeholder="请输入主键ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商用户ID" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入物流商用户ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地" prop="destination">
|
||||
<el-input v-model="form.destination" placeholder="请输入目的地" />
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道名称" prop="channelName">
|
||||
<el-input v-model="form.channelName" placeholder="请输入渠道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="基础价格" prop="price">
|
||||
<el-input v-model="form.price" placeholder="请输入基础价格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="时效" prop="leadTime">
|
||||
<el-input v-model="form.leadTime" placeholder="请输入时效" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附加费" prop="surcharge">
|
||||
<el-input v-model="form.surcharge" placeholder="请输入附加费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报价生效日期" prop="quoteDate">
|
||||
<el-date-picker clearable v-model="form.quoteDate" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择报价生效日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报价备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入报价备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道ID" prop="channelId">
|
||||
<el-input v-model="form.channelId" placeholder="请输入渠道ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -123,7 +196,7 @@ const initFormData: LogisticsQuoteForm = {
|
||||
id: undefined,
|
||||
userId: undefined,
|
||||
destination: undefined,
|
||||
transportChannel: undefined,
|
||||
channelName: undefined,
|
||||
price: undefined,
|
||||
leadTime: undefined,
|
||||
surcharge: undefined,
|
||||
@ -131,7 +204,9 @@ const initFormData: LogisticsQuoteForm = {
|
||||
isSubmitted: undefined,
|
||||
remark: undefined,
|
||||
channelType: undefined,
|
||||
channelId: undefined
|
||||
channelId: undefined,
|
||||
isDdp: undefined,
|
||||
unit: undefined
|
||||
};
|
||||
const data = reactive<PageData<LogisticsQuoteForm, LogisticsQuoteQuery>>({
|
||||
form: { ...initFormData },
|
||||
@ -140,7 +215,7 @@ const data = reactive<PageData<LogisticsQuoteForm, LogisticsQuoteQuery>>({
|
||||
pageSize: 10,
|
||||
userId: undefined,
|
||||
destination: undefined,
|
||||
transportChannel: undefined,
|
||||
channelName: undefined,
|
||||
price: undefined,
|
||||
leadTime: undefined,
|
||||
surcharge: undefined,
|
||||
@ -148,13 +223,15 @@ const data = reactive<PageData<LogisticsQuoteForm, LogisticsQuoteQuery>>({
|
||||
isSubmitted: undefined,
|
||||
channelType: undefined,
|
||||
channelId: undefined,
|
||||
isDdp: undefined,
|
||||
unit: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
userId: [{ required: true, message: '物流商用户ID不能为空', trigger: 'blur' }],
|
||||
destination: [{ required: true, message: '目的地不能为空', trigger: 'blur' }],
|
||||
transportChannel: [{ required: true, message: '渠道名称不能为空', trigger: 'blur' }],
|
||||
channelName: [{ required: true, message: '渠道名称不能为空', trigger: 'blur' }],
|
||||
price: [{ required: true, message: '基础价格不能为空', trigger: 'blur' }],
|
||||
leadTime: [{ required: true, message: '时效不能为空', trigger: 'blur' }],
|
||||
surcharge: [{ required: true, message: '附加费不能为空', trigger: 'blur' }],
|
||||
@ -162,7 +239,9 @@ const data = reactive<PageData<LogisticsQuoteForm, LogisticsQuoteQuery>>({
|
||||
isSubmitted: [{ required: true, message: '提交状态不能为空', trigger: 'blur' }],
|
||||
remark: [{ required: true, message: '报价备注不能为空', trigger: 'blur' }],
|
||||
channelType: [{ required: true, message: '渠道类型不能为空', trigger: 'change' }],
|
||||
channelId: [{ required: true, message: '渠道ID不能为空', trigger: 'blur' }]
|
||||
channelId: [{ required: true, message: '渠道ID不能为空', trigger: 'blur' }],
|
||||
isDdp: [{ required: true, message: '是否双清包税不能为空', trigger: 'blur' }],
|
||||
unit: [{ required: true, message: '单位不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
<el-form-item label="货件名称" prop="shipmentName">
|
||||
<el-input v-model="queryParams.shipmentName" placeholder="请输入货件名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流中心编码" prop="destinationFulfillmentCenterId">
|
||||
<el-input v-model="queryParams.destinationFulfillmentCenterId" placeholder="请输入物流中心编码" clearable @keyup.enter="handleQuery" />
|
||||
<el-form-item label="物流中心编码" prop="destination">
|
||||
<el-input v-model="queryParams.destination" placeholder="请输入物流中心编码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="运输模式" prop="shippingMode">
|
||||
<el-input v-model="queryParams.shippingMode" placeholder="请输入运输模式" clearable @keyup.enter="handleQuery" />
|
||||
@ -99,20 +99,25 @@
|
||||
<el-table v-loading="loading" :data="shipmentPlanList" @current-change="handleCurrentChange" highlight-current-row ref="singleTableRef">
|
||||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
<div m="4">
|
||||
<p m="t-0 b-2">货件名称: {{ props.row.shipmentName }}</p>
|
||||
<p m="t-0 b-2">是否关闭: {{ props.row.isClosed }}</p>
|
||||
<p m="t-0 b-2">货件状态: {{ props.row.shipmentStatus }}</p>
|
||||
<p m="t-0 b-2">运输模式: {{ props.row.shippingMode }}</p>
|
||||
<p m="t-0 b-2">运输方案: {{ props.row.shippingSolution }}</p>
|
||||
<p m="t-0 b-2">入库计划ID: {{ props.row.staInboundPlanId }}</p>
|
||||
</div>
|
||||
<el-descriptions size="small" border title="货件详情">
|
||||
<el-descriptions-item label="货件名称">{{ props.row.shipmentName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否关闭">{{ props.row.isClosed }}</el-descriptions-item>
|
||||
<el-descriptions-item label="货件状态">{{ props.row.shipmentStatus }}</el-descriptions-item>
|
||||
<el-descriptions-item label="运输模式">{{ props.row.shippingMode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="运输方案">{{ props.row.shippingSolution }}</el-descriptions-item>
|
||||
<el-descriptions-item label="入库计划ID">{{ props.row.staInboundPlanId }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="同步时间">{{ parseTime(props.row.gmtCreate, '{y}-{m}-{d}') }} </el-descriptions-item>
|
||||
<el-descriptions-item label="计划发货日期">{{ parseTime(props.row.staShipmentDate, '{y}-{m}-{d}') }} </el-descriptions-item>
|
||||
<el-descriptions-item label="预计到货开始日">{{ parseTime(props.row.staDeliveryStartDate, '{y}-{m}-{d}') }} </el-descriptions-item>
|
||||
<el-descriptions-item label="预计到货截止日">{{ parseTime(props.row.staDeliveryEndDate, '{y}-{m}-{d}') }} </el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领星ID" align="center" prop="sid" />
|
||||
<el-table-column label="货件编号" align="center" prop="shipmentId" />
|
||||
|
||||
<el-table-column label="物流中心编码" align="center" prop="destinationFulfillmentCenterId" />
|
||||
<el-table-column label="物流中心编码" align="center" prop="destination" />
|
||||
|
||||
<el-table-column label="最后更新时间" align="center" prop="gmtModified" width="180">
|
||||
<template #default="scope">
|
||||
@ -124,26 +129,6 @@
|
||||
<span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="同步时间" align="center" prop="syncTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.syncTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划发货日期" align="center" prop="staShipmentDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.staShipmentDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预计到货开始日" align="center" prop="staDeliveryStartDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.staDeliveryStartDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预计到货截止日" align="center" prop="staDeliveryEndDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.staDeliveryEndDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150" label="发货地址" align="center" prop="shipFromAddress">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="openAddressDialog(row.shipFromAddress)"> 查看详情</el-button>
|
||||
@ -188,8 +173,8 @@
|
||||
<el-form-item label="货件名称" prop="shipmentName">
|
||||
<el-input v-model="form.shipmentName" placeholder="请输入货件名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流中心编码" prop="destinationFulfillmentCenterId">
|
||||
<el-input v-model="form.destinationFulfillmentCenterId" placeholder="请输入物流中心编码" />
|
||||
<el-form-item label="物流中心编码" prop="destination">
|
||||
<el-input v-model="form.destination" placeholder="请输入物流中心编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="运输模式" prop="shippingMode">
|
||||
<el-input v-model="form.shippingMode" placeholder="请输入运输模式" />
|
||||
@ -261,7 +246,7 @@
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="channelDialogVisible" title="渠道选择" width="60%">
|
||||
<el-dialog v-model="channelDialogVisible" title="查询报价" width="60%">
|
||||
<!-- <el-radio-group v-model="form.status">-->
|
||||
<!-- <el-radio v-for="dict in biz_transport_channel" :key="dict.value" :value="dict.value">-->
|
||||
<!-- {{ dict.label }}-->
|
||||
@ -292,45 +277,142 @@
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-radio-group>-->
|
||||
|
||||
<el-collapse v-model="activeCollapse">
|
||||
<!-- 遍历国家分组 -->
|
||||
<el-collapse-item v-for="(countryGroup, country) in groupedChannels" :key="country" :title="getCountryName(country)" :name="country">
|
||||
<!-- 遍历运输方式 -->
|
||||
<div v-for="(methodGroup, method) in countryGroup" :key="method">
|
||||
<div class="shipping-method-title">
|
||||
{{ getShippingMethodName(method) }}
|
||||
</div>
|
||||
<el-radio-group v-model="selectedChannel" @change="handleChannelSelect">
|
||||
<!-- 遍历具体渠道 -->
|
||||
<div v-for="channel in methodGroup" :key="channel.id" class="channel-item">
|
||||
<el-radio :label="channel.id">
|
||||
{{ getChannelLabel(channel.channelName) }}
|
||||
</el-radio>
|
||||
<div class="channel-description">{{ channel.description }}</div>
|
||||
<el-form :model="form" label-width="auto" style="max-width: 600px">
|
||||
<el-form-item label="目的地仓库">
|
||||
<el-input v-model="currentDes" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道选择">
|
||||
<el-collapse v-model="activeCollapse">
|
||||
<!-- 遍历国家分组 -->
|
||||
<el-collapse-item v-for="(countryGroup, country) in groupedChannels" :key="country" :title="getCountryName(country)" :name="country">
|
||||
<!-- 遍历运输方式 -->
|
||||
<div v-for="(methodGroup, method) in countryGroup" :key="method">
|
||||
<div class="shipping-method-title">
|
||||
{{ getShippingMethodName(method) }}
|
||||
</div>
|
||||
<el-radio-group v-model="selectedChannel" @change="handleChannelSelect">
|
||||
<!-- 遍历具体渠道 -->
|
||||
<div v-for="channel in methodGroup" :key="channel.id" class="channel-item">
|
||||
<el-radio :label="channel.id">
|
||||
{{ getChannelLabel(channel.channelName) }}
|
||||
</el-radio>
|
||||
<div class="channel-description">{{ channel.description }}</div>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
|
||||
<div v-if="selectedChannel" class="selected-info">已选择渠道ID: {{ selectedChannel }}</div>
|
||||
|
||||
<el-button :loading="buttonLoading" type="primary" @click="checkPrice()">查询报价</el-button>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期选择">
|
||||
<el-date-picker v-model="shipDate" type="date" placeholder="Pick a day" value-format="YYYY-MM-DD" :size="size" />
|
||||
</el-form-item>
|
||||
<el-button :loading="buttonLoading" type="primary" @click="checkPrice()">查询报价</el-button>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="dialogTableVisible" title="已经存在的询价单" width="1800">
|
||||
<el-table :data="tableData" style="width: 100%" border stripe>
|
||||
<!-- 基础文本列 -->
|
||||
<el-table-column prop="inquiryNo" label="询价编号" width="180" />
|
||||
<el-table-column prop="channelName" label="渠道名称" width="200" />
|
||||
<el-table-column prop="transportChannel" label="运输方式" width="120" />
|
||||
<el-table-column prop="quoteDate" label="询价日期" width="200" />
|
||||
<!-- 时间格式化列 -->
|
||||
<el-table-column prop="deadline" label="截止时间" width="180">
|
||||
<template #default="{ row }">
|
||||
{{ formatTime(row.deadline) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="effectiveStartTime" label="生效开始时间" width="180">
|
||||
<template #default="{ row }">
|
||||
{{ formatTime(row.effectiveStartTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="effectiveEndTime" label="生效结束时间" width="180">
|
||||
<template #default="{ row }">
|
||||
{{ formatTime(row.effectiveEndTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 状态标签列 -->
|
||||
<el-table-column prop="inquiryStatus" label="询价状态" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="statusTagType(row.inquiryStatus)" effect="light">
|
||||
{{ row.inquiryStatus }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 其他信息列 -->
|
||||
<el-table-column prop="destination" label="目的地" width="120" />
|
||||
|
||||
<el-table-column prop="requesterId" label="请求方ID" width="120" />
|
||||
|
||||
<!-- 空值处理 -->
|
||||
<el-table-column prop="targetProviders" label="目标供应商">
|
||||
<template #default="{ row }">
|
||||
{{ row.targetProviders || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-drawer size="60%" v-model="drawer" :direction="direction">
|
||||
<template #header>
|
||||
<h4>物流商报价</h4>
|
||||
</template>
|
||||
<template #default>
|
||||
<el-table v-loading="loading" :data="logisticsQuoteList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="物流商用户ID" align="center" prop="userId" />
|
||||
<el-table-column label="目的地" align="center" prop="destination" />
|
||||
<el-table-column label="渠道名称" align="center" prop="channelName" />
|
||||
<el-table-column label="基础价格" align="center" prop="price" />
|
||||
<el-table-column label="时效" align="center" prop="leadTime" />
|
||||
<el-table-column label="附加费" align="center" prop="surcharge" />
|
||||
<el-table-column label="报价生效日期" align="center" prop="quoteDate" width="80">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.quoteDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交状态" align="center" prop="isSubmitted" />
|
||||
<el-table-column label="报价备注" align="center" prop="remark" />
|
||||
<el-table-column label="渠道类型" align="center" prop="channelType" />
|
||||
<el-table-column label="是否双清包税" align="center" prop="isDdp" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button text size="small" type="primary" @click="createOrder(scope.row)" v-hasPermi="['amz:logisticsQuote:edit']">
|
||||
创建货运订单
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div style="flex: auto">
|
||||
<el-button @click="cancelClick">取消</el-button>
|
||||
<el-button type="primary" @click="confirmClick">确认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ShipmentPlan" lang="ts">
|
||||
import { listShipmentPlan, getShipmentPlan, delShipmentPlan, addShipmentPlan, updateShipmentPlan } from '@/api/amz/shipmentPlan';
|
||||
import { listAllLogisticsChannel } from '@/api/amz/logisticsChannel';
|
||||
|
||||
import { createWithDesAndChannel } from '@/api/amz/inquiryRequest';
|
||||
import type { DrawerProps } from 'element-plus';
|
||||
import { createWithDesAndChannel, queryWithDesAndChannel } from '@/api/amz/inquiryRequest';
|
||||
|
||||
import { queryLogisticsQuote } from '@/api/amz/logisticsQuote';
|
||||
|
||||
import { ShipmentPlanVO, ShipmentPlanQuery, ShipmentPlanForm } from '@/api/amz/shipmentPlan/types';
|
||||
import { ElTable } from 'element-plus';
|
||||
import { LogisticsQuoteVO } from '@/api/amz/logisticsQuote/types';
|
||||
import { createOrderForm } from '@/api/amz/logisticsOrder/types';
|
||||
import { createLogisticsOrder } from '@/api/amz/logisticsOrder';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { biz_transport_channel } = toRefs<any>(proxy?.useDict('biz_transport_channel'));
|
||||
@ -359,7 +441,7 @@ const initFormData: ShipmentPlanForm = {
|
||||
shipmentName: undefined,
|
||||
isClosed: undefined,
|
||||
shipmentStatus: undefined,
|
||||
destinationFulfillmentCenterId: undefined,
|
||||
destination: undefined,
|
||||
shippingMode: undefined,
|
||||
shippingSolution: undefined,
|
||||
gmtModified: undefined,
|
||||
@ -384,7 +466,7 @@ const data = reactive<PageData<ShipmentPlanForm, ShipmentPlanQuery>>({
|
||||
shipmentName: undefined,
|
||||
isClosed: undefined,
|
||||
shipmentStatus: undefined,
|
||||
destinationFulfillmentCenterId: undefined,
|
||||
destination: undefined,
|
||||
shippingMode: undefined,
|
||||
shippingSolution: undefined,
|
||||
gmtModified: undefined,
|
||||
@ -407,7 +489,7 @@ const data = reactive<PageData<ShipmentPlanForm, ShipmentPlanQuery>>({
|
||||
shipmentName: [{ required: true, message: '货件名称不能为空', trigger: 'blur' }],
|
||||
isClosed: [{ required: true, message: '是否关闭不能为空', trigger: 'blur' }],
|
||||
shipmentStatus: [{ required: true, message: '货件状态不能为空', trigger: 'change' }],
|
||||
destinationFulfillmentCenterId: [{ required: true, message: '物流中心编码不能为空', trigger: 'blur' }],
|
||||
destination: [{ required: true, message: '物流中心编码不能为空', trigger: 'blur' }],
|
||||
shippingMode: [{ required: true, message: '运输模式不能为空', trigger: 'blur' }],
|
||||
shippingSolution: [{ required: true, message: '运输方案不能为空', trigger: 'blur' }],
|
||||
gmtModified: [{ required: true, message: '最后更新时间不能为空', trigger: 'blur' }],
|
||||
@ -426,6 +508,102 @@ const data = reactive<PageData<ShipmentPlanForm, ShipmentPlanQuery>>({
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const createOrderData = ref<createOrderForm>({
|
||||
fbaShipmentId: undefined,
|
||||
logicQuoteId: undefined
|
||||
});
|
||||
|
||||
const createOrder = async (row: ShipmentPlanVO) => {
|
||||
// 创建货运订单
|
||||
console.log('row', row);
|
||||
console.log('currentFBAData', currentFBAData.value);
|
||||
createOrderData.value.fbaShipmentId = currentFBAData.value.shipmentId;
|
||||
createOrderData.value.logicQuoteId = row.id;
|
||||
const res = await createLogisticsOrder(createOrderData.value);
|
||||
console.log('res', res);
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('创建成功');
|
||||
} else {
|
||||
ElMessage.error('创建失败');
|
||||
}
|
||||
};
|
||||
|
||||
const dialogTableVisible = ref(false);
|
||||
|
||||
const logisticsQuoteList = ref<LogisticsQuoteVO[]>([]);
|
||||
|
||||
const tableData = ref([
|
||||
{
|
||||
channelId: '1902912289404719106',
|
||||
channelName: '美国-海运-美森正班船',
|
||||
deadline: '2025-03-22 11:00:00',
|
||||
destination: 'LGB8',
|
||||
effectiveEndTime: '2025-03-30 15:30:19',
|
||||
effectiveStartTime: '2025-03-23 15:30:19',
|
||||
id: '1903348528587018242',
|
||||
inquiryNo: 'INQ20250322000004',
|
||||
inquiryStatus: 'OPEN',
|
||||
quoteDate: '2025-03-22 00:00:00',
|
||||
requesterId: 1,
|
||||
targetProviders: null,
|
||||
transportChannel: 'sea'
|
||||
}
|
||||
]);
|
||||
|
||||
// 时间格式化方法
|
||||
const formatTime = (timeString) => {
|
||||
return timeString.replace(' ', '\n'); // 换行显示日期时间
|
||||
};
|
||||
|
||||
// 状态标签样式
|
||||
const statusTagType = (status) => {
|
||||
switch (status) {
|
||||
case 'OPEN':
|
||||
return 'success';
|
||||
case 'CLOSED':
|
||||
return 'info';
|
||||
case 'EXPIRED':
|
||||
return 'warning';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
const drawer = ref(false);
|
||||
const direction = ref<DrawerProps['direction']>('ltr');
|
||||
const radio1 = ref('Option 1');
|
||||
const handleClose = (done: () => void) => {
|
||||
ElMessageBox.confirm('Are you sure you want to close this?')
|
||||
.then(() => {
|
||||
done();
|
||||
})
|
||||
.catch(() => {
|
||||
// catch error
|
||||
});
|
||||
};
|
||||
|
||||
function cancelClick() {
|
||||
drawer.value = false;
|
||||
}
|
||||
|
||||
function confirmClick() {
|
||||
ElMessageBox.confirm(`Are you confirm to chose ${radio1.value} ?`)
|
||||
.then(() => {
|
||||
drawer.value = false;
|
||||
})
|
||||
.catch(() => {
|
||||
// catch error
|
||||
});
|
||||
}
|
||||
|
||||
const getLocalDate = () => {
|
||||
const today = new Date();
|
||||
const year = today.getFullYear();
|
||||
const month = String(today.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(today.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
};
|
||||
const shipDate = ref(getLocalDate());
|
||||
/** 查询货件计划列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
@ -457,6 +635,7 @@ const shippingMethodMap = {
|
||||
};
|
||||
|
||||
const currentDes = ref('');
|
||||
const currentFBAData = ref('');
|
||||
|
||||
// 分组后的渠道数据
|
||||
const groupedChannels = computed(() => {
|
||||
@ -536,28 +715,48 @@ const handleAdd = () => {
|
||||
|
||||
const checkPrice = async () => {
|
||||
console.log('checkPrice', currentDes.value, selectedChannel.value);
|
||||
const res = await queryLogisticsQuote(currentDes.value, selectedChannel.value);
|
||||
console.log('checkPriceEnd', res);
|
||||
//查询报价单
|
||||
console.log('sshipDate.value', shipDate.value);
|
||||
const res = await queryLogisticsQuote(currentDes.value, selectedChannel.value, shipDate.value);
|
||||
console.log('查询报价单', res);
|
||||
if (res.total == 0) {
|
||||
ElMessageBox.confirm('未查询到价格信息,是否要向物流商发布询价?', 'Warning', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: 'Delete completed'
|
||||
});
|
||||
const res2 = await createWithDesAndChannel(currentDes.value, selectedChannel.value);
|
||||
console.log('checkPriceEnd2', res2);
|
||||
//查询询价单
|
||||
const requestQuote = await queryWithDesAndChannel(currentDes.value, selectedChannel.value, shipDate.value);
|
||||
console.log('查询询价单', requestQuote);
|
||||
if (requestQuote.total == 0) {
|
||||
console.log('询价单也没数据');
|
||||
ElMessageBox.confirm('未查询到价格信息,是否要向物流商发布询价?', 'Warning', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: 'Delete canceled'
|
||||
.then(async () => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: 'Delete completed'
|
||||
});
|
||||
const res2 = await createWithDesAndChannel(currentDes.value, selectedChannel.value, shipDate.value);
|
||||
console.log('checkPriceEnd2', res2);
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: 'Delete canceled'
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
//显示询价单
|
||||
channelDialogVisible.value = false;
|
||||
dialogTableVisible.value = true;
|
||||
tableData.value = requestQuote.rows;
|
||||
console.log('requestQuote.rows', requestQuote.rows);
|
||||
console.log('tableData', tableData.value);
|
||||
}
|
||||
} else {
|
||||
//显示报价单
|
||||
channelDialogVisible.value = false;
|
||||
drawer.value = true;
|
||||
logisticsQuoteList.value = res.rows;
|
||||
}
|
||||
};
|
||||
|
||||
@ -575,8 +774,8 @@ const handleSend = async (row?: ShipmentPlanVO) => {
|
||||
reset();
|
||||
channelDialogVisible.value = true;
|
||||
console.log(row);
|
||||
|
||||
currentDes.value = row.destinationFulfillmentCenterId;
|
||||
currentFBAData.value = row;
|
||||
currentDes.value = row.destination;
|
||||
};
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
|
31
tsconfig.json
Normal file
31
tsconfig.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
// "useDefineForClassFields": true,
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
"strictNullChecks": false,
|
||||
"sourceMap": true,
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"strictFunctionTypes": false,
|
||||
"lib": ["esnext", "dom"],
|
||||
"noImplicitAny": false,
|
||||
"baseUrl": ".",
|
||||
"allowJs": true,
|
||||
"experimentalDecorators": true,
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
},
|
||||
"types": ["vite/client"],
|
||||
"skipLibCheck": true,
|
||||
"removeComments": true,
|
||||
// 允许默认导入
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.vue", "src/types/**/*.d.ts", "vite.config.ts"],
|
||||
"exclude": ["node_modules", "dist", "**/*.js", "**/*.md", "src/**/*.md"]
|
||||
}
|
33
uno.config.ts
Normal file
33
uno.config.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import {
|
||||
defineConfig,
|
||||
presetAttributify,
|
||||
presetIcons,
|
||||
presetTypography,
|
||||
presetUno,
|
||||
presetWebFonts,
|
||||
transformerDirectives,
|
||||
transformerVariantGroup
|
||||
} from 'unocss';
|
||||
|
||||
export default defineConfig({
|
||||
shortcuts: {
|
||||
'panel-title':
|
||||
'pb-[5px] font-sans leading-[1.1] font-medium text-base text-[#6379bb] border-b border-b-solid border-[var(--el-border-color-light)] mb-5 mt-0'
|
||||
},
|
||||
theme: {
|
||||
colors: {
|
||||
primary: 'var(--el-color-primary)',
|
||||
primary_dark: 'var(--el-color-primary-light-5)'
|
||||
}
|
||||
},
|
||||
presets: [
|
||||
presetUno(),
|
||||
presetAttributify(),
|
||||
presetIcons(),
|
||||
presetTypography(),
|
||||
presetWebFonts({
|
||||
fonts: {}
|
||||
})
|
||||
],
|
||||
transformers: [transformerDirectives(), transformerVariantGroup()]
|
||||
});
|
24
vite/plugins/auto-import.ts
Normal file
24
vite/plugins/auto-import.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import AutoImport from 'unplugin-auto-import/vite';
|
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
|
||||
import IconsResolver from 'unplugin-icons/resolver';
|
||||
|
||||
export default (path: any) => {
|
||||
return AutoImport({
|
||||
// 自动导入 Vue 相关函数
|
||||
imports: ['vue', 'vue-router', '@vueuse/core', 'pinia'],
|
||||
eslintrc: {
|
||||
enabled: false,
|
||||
filepath: './.eslintrc-auto-import.json',
|
||||
globalsPropValue: true
|
||||
},
|
||||
resolvers: [
|
||||
// 自动导入 Element Plus 相关函数ElMessage, ElMessageBox... (带样式)
|
||||
ElementPlusResolver(),
|
||||
IconsResolver({
|
||||
prefix: 'Icon'
|
||||
})
|
||||
],
|
||||
vueTemplate: true, // 是否在 vue 模板中自动导入
|
||||
dts: path.resolve(path.resolve(__dirname, '../../src'), 'types', 'auto-imports.d.ts')
|
||||
});
|
||||
};
|
17
vite/plugins/components.ts
Normal file
17
vite/plugins/components.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
|
||||
import IconsResolver from 'unplugin-icons/resolver';
|
||||
|
||||
export default (path: any) => {
|
||||
return Components({
|
||||
resolvers: [
|
||||
// 自动导入 Element Plus 组件
|
||||
ElementPlusResolver(),
|
||||
// 自动注册图标组件
|
||||
IconsResolver({
|
||||
enabledCollections: ['ep']
|
||||
})
|
||||
],
|
||||
dts: path.resolve(path.resolve(__dirname, '../../src'), 'types', 'components.d.ts')
|
||||
});
|
||||
};
|
8
vite/plugins/icons.ts
Normal file
8
vite/plugins/icons.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import Icons from 'unplugin-icons/vite';
|
||||
|
||||
export default () => {
|
||||
return Icons({
|
||||
// 自动安装图标库
|
||||
autoInstall: true
|
||||
});
|
||||
};
|
22
vite/plugins/index.ts
Normal file
22
vite/plugins/index.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import createUnoCss from './unocss';
|
||||
import createAutoImport from './auto-import';
|
||||
import createComponents from './components';
|
||||
import createIcons from './icons';
|
||||
import createSvgIconsPlugin from './svg-icon';
|
||||
import createCompression from './compression';
|
||||
import createSetupExtend from './setup-extend';
|
||||
import path from 'path';
|
||||
|
||||
export default (viteEnv: any, isBuild = false): [] => {
|
||||
const vitePlugins: any = [];
|
||||
vitePlugins.push(vue());
|
||||
vitePlugins.push(createUnoCss());
|
||||
vitePlugins.push(createAutoImport(path));
|
||||
vitePlugins.push(createComponents(path));
|
||||
vitePlugins.push(createCompression(viteEnv));
|
||||
vitePlugins.push(createIcons());
|
||||
vitePlugins.push(createSvgIconsPlugin(path, isBuild));
|
||||
vitePlugins.push(createSetupExtend());
|
||||
return vitePlugins;
|
||||
};
|
5
vite/plugins/setup-extend.ts
Normal file
5
vite/plugins/setup-extend.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import setupExtend from 'unplugin-vue-setup-extend-plus/vite';
|
||||
|
||||
export default () => {
|
||||
return setupExtend({});
|
||||
};
|
10
vite/plugins/svg-icon.ts
Normal file
10
vite/plugins/svg-icon.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
|
||||
export default (path: any, isBuild: boolean) => {
|
||||
return createSvgIconsPlugin({
|
||||
// 指定需要缓存的图标文件夹
|
||||
iconDirs: [path.resolve(path.resolve(__dirname, '../../src'), 'assets/icons/svg')],
|
||||
// 指定symbolId格式
|
||||
symbolId: 'icon-[dir]-[name]',
|
||||
svgoOptions: isBuild
|
||||
});
|
||||
};
|
7
vite/plugins/unocss.ts
Normal file
7
vite/plugins/unocss.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import UnoCss from 'unocss/vite';
|
||||
|
||||
export default () => {
|
||||
return UnoCss({
|
||||
hmrTopLevelAwait: false // unocss默认是true,低版本浏览器是不支持的,启动后会报错
|
||||
});
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user