@@ -59,8 +62,8 @@
{{ displayPrice(row.balance) }}
-
-
+
+
删除
diff --git a/src/views/wallet/wallet-tk/index.vue b/src/views/wallet/wallet-tk/index.vue
index 2716e1b..36a4985 100644
--- a/src/views/wallet/wallet-tk/index.vue
+++ b/src/views/wallet/wallet-tk/index.vue
@@ -8,15 +8,18 @@
-
-
-
+
+
+
- {{ $t('common.queryBtn')
- }}
- {{ $t('common.resetBtn') }}
+
+ {{ $t('common.queryBtn') }}
+
+
+ {{ $t('common.resetBtn') }}
+
@@ -39,12 +42,31 @@
+
+
+
+
{{ row.walletTypeName }}
+
+
+
+
+
+
+
+
+ {{ displayPrice(row.price) }}
+
+
+
-
- 编辑
- 删除
+
+
+ 详情
+
+ 编辑
+ 删除
@@ -62,11 +84,13 @@ import { BasicTableProps, useTable } from "/@/hooks/table";
import { pageTk } from "/@/api/wallet/wallet-transaction";
import { useMessage, useMessageBox } from "/@/hooks/message";
import { useDict } from '/@/hooks/dict';
+import * as hardAfterSaleApi from '/@/api/hard/hard-after-sale'
+import { displayPrice } from "/@/utils/formatMoney"
// 引入组件
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
// 定义查询字典
-
+const { wallet_type } = useDict('wallet_type');
// 定义变量内容
const formDialogRef = ref()
// 搜索变量
@@ -76,6 +100,8 @@ const showSearch = ref(true)
const selectObjs = ref([]) as any
const multiple = ref(true)
+const { push } = useRouter()
+
const state: BasicTableProps = reactive({
queryForm: {},
pageList: pageTk
@@ -100,6 +126,14 @@ const resetQuery = () => {
getDataList()
}
+const doRefund = async (row: any) => {
+ const { data } = await hardAfterSaleApi.getObj(row.bizId)
+ if (!data) {
+ useMessage().error("查看错误")
+ }
+ push({ path: '/hard/hard-after-sale/order-refund', query: { id: data.orderId, type: "view" } })
+}
+
// 导出excel
const exportExcel = () => {
downBlobFile('/wallet/walletRecharge/export', Object.assign(state.queryForm, { ids: selectObjs }), 'walletRecharge.xlsx')
diff --git a/src/views/wallet/wallet-xf/index.vue b/src/views/wallet/wallet-xf/index.vue
index ac12074..edca1db 100644
--- a/src/views/wallet/wallet-xf/index.vue
+++ b/src/views/wallet/wallet-xf/index.vue
@@ -8,15 +8,18 @@
-
-
-
+
+
+
- {{ $t('common.queryBtn')
- }}
- {{ $t('common.resetBtn') }}
+
+ {{ $t('common.queryBtn') }}
+
+
+ {{ $t('common.resetBtn') }}
+
@@ -39,12 +42,31 @@
+
+
+
+
{{ row.walletTypeName }}
+
+
+
+
+
+
+
+
+ {{ displayPrice(row.price) }}
+
+
+
-
- 编辑
- 删除
+
+
+ 详情
+
+ 编辑
+ 删除
@@ -62,11 +84,14 @@ import { BasicTableProps, useTable } from "/@/hooks/table";
import { pageXf } from "/@/api/wallet/wallet-transaction";
import { useMessage, useMessageBox } from "/@/hooks/message";
import { useDict } from '/@/hooks/dict';
+import { displayPrice } from "/@/utils/formatMoney"
+
+const { push } = useRouter()
// 引入组件
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
// 定义查询字典
-
+const { wallet_type } = useDict('wallet_type');
// 定义变量内容
const formDialogRef = ref()
// 搜索变量
@@ -105,6 +130,10 @@ const exportExcel = () => {
downBlobFile('/wallet/walletRecharge/export', Object.assign(state.queryForm, { ids: selectObjs }), 'walletRecharge.xlsx')
}
+const doRefund = (row: any) => {
+ push({ path: '/hard/hard-after-sale/order-refund', query: { id: row.bizId, type: "view" } })
+}
+
// 多选事件
const selectionChangHandle = (objs: { id: string }[]) => {
selectObjs.value = objs.map(({ id }) => id);
From 5f757796c804fc2b4ca14e7a324010dea3d988ab Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Fri, 10 Jan 2025 11:23:44 +0800
Subject: [PATCH 2/4] =?UTF-8?q?feat:=E5=95=86=E6=88=B7=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 8 +--
.prettierrc | 8 +++
src/api/wallet/mch-manage.ts | 52 +++++++++----------
src/components/Select/SelectMch.vue | 63 +++++++++++++----------
vite.config.ts | 78 ++++++++++++++---------------
5 files changed, 113 insertions(+), 96 deletions(-)
create mode 100644 .prettierrc
diff --git a/.env.development b/.env.development
index 639afc5..84d07a4 100644
--- a/.env.development
+++ b/.env.development
@@ -8,15 +8,15 @@ VITE_OPEN = true
ENV = 'development'
# ADMIN 服务地址
-VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/
+# VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/
# VITE_ADMIN_PROXY_PATH = http://pjcloud.center.takin.cc/
-# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
+VITE_ADMIN_PROXY_PATH = http://localhost:9999/
# VITE_ADMIN_PROXY_PATH = http://192.168.101.29:9999/ # 邓-本地
# 图片访问基础地址
-VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api
+# VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api
# VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc
-# VITE_IMAGE_BASE_PATH = http://localhost:9999
+VITE_IMAGE_BASE_PATH = http://localhost:9999
# VITE_IMAGE_BASE_PATH = http://192.168.101.29:9999 # 邓-本地
# 代码生成服务地址
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..5e07d0e
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,8 @@
+{
+ "tabWidth": 2,
+ "useTabs": true,
+ "trailingComma": "all",
+ "semi": false,
+ "singleQuote": false,
+ "printWidth": 120
+}
\ No newline at end of file
diff --git a/src/api/wallet/mch-manage.ts b/src/api/wallet/mch-manage.ts
index 864d6cd..fd9bf27 100644
--- a/src/api/wallet/mch-manage.ts
+++ b/src/api/wallet/mch-manage.ts
@@ -1,58 +1,58 @@
-import request from '/@/utils/request';
+import request from "/@/utils/request"
-export function pageJoinSelect(query?: Object) {
+export function select(query?: Object) {
return request({
- url: '/wallet/mch-manage/page-join-select',
- method: 'get',
+ url: "/wallet/mch-manage/select",
+ method: "get",
params: query,
- });
+ })
}
export function pageJoin(query?: Object) {
return request({
- url: '/wallet/mch-manage/page-join',
- method: 'get',
+ url: "/wallet/mch-manage/page-join",
+ method: "get",
params: query,
- });
+ })
}
export function fetchList(query?: Object) {
return request({
- url: '/wallet/mch-manage/page',
- method: 'get',
+ url: "/wallet/mch-manage/page",
+ method: "get",
params: query,
- });
+ })
}
export function addObj(obj?: Object) {
return request({
- url: '/wallet/mch-manage',
- method: 'post',
+ url: "/wallet/mch-manage",
+ method: "post",
data: obj,
- });
+ })
}
export function getObj(id?: string) {
return request({
- url: '/wallet/mch-manage/' + id,
- method: 'get',
- });
+ url: "/wallet/mch-manage/" + id,
+ method: "get",
+ })
}
export function delObjs(ids?: Object) {
return request({
- url: '/wallet/mch-manage',
- method: 'delete',
+ url: "/wallet/mch-manage",
+ method: "delete",
data: ids,
- });
+ })
}
export function putObj(obj?: Object) {
return request({
- url: '/wallet/mch-manage',
- method: 'put',
+ url: "/wallet/mch-manage",
+ method: "put",
data: obj,
- });
+ })
}
/**
@@ -61,10 +61,10 @@ export function putObj(obj?: Object) {
*/
export function selectMerchantList(type?: string) {
return request({
- url: '/wallet/mch-manage/selectMerchantList',
- method: 'get',
+ url: "/wallet/mch-manage/selectMerchantList",
+ method: "get",
params: {
type: type,
},
- });
+ })
}
diff --git a/src/components/Select/SelectMch.vue b/src/components/Select/SelectMch.vue
index 307856d..509095e 100644
--- a/src/components/Select/SelectMch.vue
+++ b/src/components/Select/SelectMch.vue
@@ -1,7 +1,16 @@
- e && getOptions()">
+ e && getOptions()"
+ >
{{ v.name }}
@@ -16,62 +25,62 @@
diff --git a/vite.config.ts b/vite.config.ts
index 8fbe8e0..c7048f0 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,44 +1,44 @@
-import vue from '@vitejs/plugin-vue';
-import { resolve } from 'path';
-import { defineConfig, loadEnv, ConfigEnv } from 'vite';
-import vueSetupExtend from 'vite-plugin-vue-setup-extend';
-import AutoImport from 'unplugin-auto-import/vite';
-import topLevelAwait from 'vite-plugin-top-level-await';
-import { createStyleImportPlugin, VxeTableResolve } from 'vite-plugin-style-import';
-import viteCompression from 'vite-plugin-compression';
+import vue from "@vitejs/plugin-vue"
+import { resolve } from "path"
+import { defineConfig, loadEnv, ConfigEnv } from "vite"
+import vueSetupExtend from "vite-plugin-vue-setup-extend"
+import AutoImport from "unplugin-auto-import/vite"
+import topLevelAwait from "vite-plugin-top-level-await"
+import { createStyleImportPlugin, VxeTableResolve } from "vite-plugin-style-import"
+import viteCompression from "vite-plugin-compression"
// @ts-ignore
-import { svgBuilder } from '/@/components/IconSelector/index';
+import { svgBuilder } from "/@/components/IconSelector/index"
-import dns from 'node:dns';
-dns.setDefaultResultOrder('verbatim');
+import dns from "node:dns"
+dns.setDefaultResultOrder("verbatim")
const pathResolve = (dir: string) => {
- return resolve(__dirname, '.', dir);
-};
+ return resolve(__dirname, ".", dir)
+}
const alias: Record
= {
- '/@': pathResolve('./src/'),
- 'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
-};
+ "/@": pathResolve("./src/"),
+ "vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js",
+}
const viteConfig = defineConfig((mode: ConfigEnv) => {
- const env = loadEnv(mode.mode, process.cwd());
+ const env = loadEnv(mode.mode, process.cwd())
// 判断是否开发环境
- const isDev = env.ENV === 'development';
+ const isDev = env.ENV === "development"
return {
plugins: [
vue(), // Vue 插件
- svgBuilder('./src/assets/icons/'), // 将 SVG 文件转换成 Vue 组件
+ svgBuilder("./src/assets/icons/"), // 将 SVG 文件转换成 Vue 组件
vueSetupExtend(), // setup语法糖增强插件
AutoImport({
- imports: ['vue', 'vue-router', 'pinia'], // 自动导入的依赖库数组
- dts: './auto-imports.d.ts', // 自动导入类型定义文件路径
+ imports: ["vue", "vue-router", "pinia"], // 自动导入的依赖库数组
+ dts: "./auto-imports.d.ts", // 自动导入类型定义文件路径
}),
createStyleImportPlugin({
resolves: [VxeTableResolve()], // 配置vxetable 按需加载
}),
topLevelAwait({
- promiseExportName: '__tla', // TLA Promise 变量名
+ promiseExportName: "__tla", // TLA Promise 变量名
promiseImportName: (i) => `__tla_${i}`, // TLA Promise 导入名
}),
viteCompression({
@@ -47,29 +47,29 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
],
root: process.cwd(), // 项目根目录
resolve: { alias }, // 路径别名配置
- base: mode.command === 'serve' ? './' : env.VITE_PUBLIC_PATH,
+ base: mode.command === "serve" ? "./" : env.VITE_PUBLIC_PATH,
optimizeDeps: {
- include: ['element-plus/es/locale/lang/zh-cn', 'element-plus/es/locale/lang/en'],
+ include: ["element-plus/es/locale/lang/zh-cn", "element-plus/es/locale/lang/en"],
},
server: {
- host: '0.0.0.0', // 服务器地址
+ host: "0.0.0.0", // 服务器地址
port: env.VITE_PORT as unknown as number, // 服务器端口号
- open: env.VITE_OPEN === 'true', // 是否自动打开浏览器
+ open: env.VITE_OPEN === "true", // 是否自动打开浏览器
hmr: true, // 启用热更新
proxy: {
- '/api/gen': {
+ "/api/gen": {
//单体架构下特殊处理代码生成模块代理
- target: env.VITE_IS_MICRO === 'true' ? env.VITE_ADMIN_PROXY_PATH : env.VITE_GEN_PROXY_PATH,
+ target: env.VITE_IS_MICRO === "true" ? env.VITE_ADMIN_PROXY_PATH : env.VITE_GEN_PROXY_PATH,
changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, ''),
+ rewrite: (path) => path.replace(/^\/api/, ""),
},
- '/api': {
+ "/api": {
target: env.VITE_ADMIN_PROXY_PATH, // 目标服务器地址
ws: true, // 是否启用 WebSocket
changeOrigin: true, // 是否修改请求头中的 Origin 字段
- rewrite: (path) => path.replace(/^\/api/, ''),
+ rewrite: (path) => path.replace(/^\/api/, ""),
},
- '^/ws/info/.*': {
+ "^/ws/info/.*": {
target: env.VITE_ADMIN_PROXY_PATH, // 目标服务器地址
ws: true, // 是否启用 WebSocket
changeOrigin: true,
@@ -77,10 +77,10 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
},
},
build: {
- outDir: 'dist', // 打包输出目录//
+ outDir: "dist", // 打包输出目录//
chunkSizeWarningLimit: 1500, // 代码分包阈值
// 开发使用 esbuild 更快,生产环境打包使用 terser 可以删除更多注释
- minify: isDev ? 'esbuild' : 'terser',
+ minify: isDev ? "esbuild" : "terser",
terserOptions: {
compress: {
drop_console: true, // 删除 console
@@ -97,8 +97,8 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
assetFileNames: `assets/[name].[hash].[ext]`,
compact: true,
manualChunks: {
- vue: ['vue', 'vue-router', 'pinia'],
- echarts: ['echarts'],
+ vue: ["vue", "vue-router", "pinia"],
+ echarts: ["echarts"],
},
},
},
@@ -111,7 +111,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
__VERSION__: JSON.stringify(process.env.npm_package_version),
__NEXT_NAME__: JSON.stringify(process.env.npm_package_name),
},
- };
-});
+ }
+})
-export default viteConfig;
+export default viteConfig
From 7ffa55a2d6126559a6e82ad4d9da22429c3abc38 Mon Sep 17 00:00:00 2001
From: zjf <1799650030@qq.com>
Date: Fri, 10 Jan 2025 12:35:24 +0800
Subject: [PATCH 3/4] env
---
.env.development | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.env.development b/.env.development
index 577906e..37ede4b 100644
--- a/.env.development
+++ b/.env.development
@@ -10,14 +10,14 @@ ENV = 'development'
# ADMIN 服务地址
# VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/
# VITE_ADMIN_PROXY_PATH = http://pjcloud.center.takin.cc/
-# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
-VITE_ADMIN_PROXY_PATH = http://192.168.101.29:9999/ # 邓-本地
+VITE_ADMIN_PROXY_PATH = http://localhost:9999/
+#VITE_ADMIN_PROXY_PATH = http://192.168.101.29:9999/ # 邓-本地
# 图片访问基础地址
# VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089
# VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc
-# VITE_IMAGE_BASE_PATH = http://localhost:9999
-VITE_IMAGE_BASE_PATH = http://192.168.101.29:9999 # 邓-本地
+VITE_IMAGE_BASE_PATH = http://localhost:9999
+#VITE_IMAGE_BASE_PATH = http://192.168.101.29:9999 # 邓-本地
# 代码生成服务地址
VITE_GEN_PROXY_PATH = http://192.168.110.156:5003
From 4d2494aab0dad0b4e7eab87a97018f2b74350a9a Mon Sep 17 00:00:00 2001
From: zjf <1799650030@qq.com>
Date: Fri, 10 Jan 2025 13:22:43 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E6=95=B4=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/supermarketUnit/form.vue | 27 ++++---
src/views/supermarket/supermarketSpu/form.vue | 75 ++++++++++---------
.../supermarketerp/smErpSupplier/form.vue | 3 +-
3 files changed, 53 insertions(+), 52 deletions(-)
diff --git a/src/views/supermarket/supermarketSpu/components/supermarketUnit/form.vue b/src/views/supermarket/supermarketSpu/components/supermarketUnit/form.vue
index 78dd8eb..215e507 100644
--- a/src/views/supermarket/supermarketSpu/components/supermarketUnit/form.vue
+++ b/src/views/supermarket/supermarketSpu/components/supermarketUnit/form.vue
@@ -34,25 +34,23 @@
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
@@ -96,12 +94,13 @@ const form = reactive({
// 定义校验规则
const dataRules = ref({
barCode: [{ required: true, message: '条码不能为空', trigger: 'blur' }],
- spec: [{ required: true, message: 'spec不能为空', trigger: 'blur' }],
+ spec: [{ required: true, message: '规格不能为空', trigger: 'blur' }],
unit: [{ required: true, message: '单位不能为空', trigger: 'blur' }],
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }],
packageNum: [{ required: true, message: '内装数量不能为空', trigger: 'blur' }],
- purchasePrice: [{ required: true, message: '进价不能为空', trigger: 'blur' }],
+ // purchasePrice: [{ required: true, message: '进价不能为空', trigger: 'blur' }],
retailPrice: [{ required: true, message: '零售价不能为空', trigger: 'blur' }],
+ promotionPrice: [{ required: true, message: '促销价不能为空', trigger: 'blur' }],
});
// 打开弹窗
diff --git a/src/views/supermarket/supermarketSpu/form.vue b/src/views/supermarket/supermarketSpu/form.vue
index faf0b54..88760ad 100644
--- a/src/views/supermarket/supermarketSpu/form.vue
+++ b/src/views/supermarket/supermarketSpu/form.vue
@@ -50,6 +50,13 @@
+
+
+
+
+
+
+
@@ -72,11 +79,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -87,31 +94,31 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -142,18 +149,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+