diff --git a/.eslintrc.js b/.eslintrc.js index f096e463..db41b891 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,19 +5,19 @@ module.exports = { es2021: true, node: true, }, - parser: 'vue-eslint-parser', + parser: "vue-eslint-parser", parserOptions: { ecmaVersion: 12, - parser: '@typescript-eslint/parser', - sourceType: 'module', + parser: "@typescript-eslint/parser", + sourceType: "module", }, - extends: ['plugin:vue/vue3-essential', 'plugin:vue/essential', 'eslint:recommended'], - plugins: ['vue', '@typescript-eslint'], + extends: ["plugin:vue/vue3-essential", "plugin:vue/essential", "eslint:recommended"], + plugins: ["vue", "@typescript-eslint"], overrides: [ { - files: ['*.ts', '*.tsx', '*.vue'], + files: ["*.ts", "*.tsx", "*.vue"], rules: { - 'no-undef': 'off', + "no-undef": "off", }, }, ], @@ -25,54 +25,54 @@ module.exports = { // http://eslint.cn/docs/rules/ // https://eslint.vuejs.org/rules/ // https://typescript-eslint.io/rules/no-unused-vars/ - '@typescript-eslint/ban-ts-ignore': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-var-requires': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-redeclare': 'error', - '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', - '@typescript-eslint/no-unused-vars': [2], - 'vue/custom-event-name-casing': 'off', - 'vue/attributes-order': 'off', - 'vue/one-component-per-file': 'off', - 'vue/html-closing-bracket-newline': 'off', - 'vue/max-attributes-per-line': 'off', - 'vue/multiline-html-element-content-newline': 'off', - 'vue/singleline-html-element-content-newline': 'off', - 'vue/attribute-hyphenation': 'off', - 'vue/html-self-closing': 'off', - 'vue/no-multiple-template-root': 'off', - 'vue/require-default-prop': 'off', - 'vue/no-v-model-argument': 'off', - 'vue/no-arrow-functions-in-watch': 'off', - 'vue/no-template-key': 'off', - 'vue/no-v-html': 'off', - 'vue/comment-directive': 'off', - 'vue/no-mutating-props': 'off', - 'vue/no-parsing-error': 'off', - 'vue/no-deprecated-v-on-native-modifier': 'off', - 'vue/multi-word-component-names': 'off', - 'no-useless-escape': 'off', - 'no-sparse-arrays': 'off', - 'no-prototype-builtins': 'off', - 'no-constant-condition': 'off', - 'no-use-before-define': 'off', - 'no-restricted-globals': 'off', - 'no-restricted-syntax': 'off', - 'generator-star-spacing': 'off', - 'no-unreachable': 'off', - 'no-multiple-template-root': 'off', - 'no-unused-vars': 'error', - 'no-v-model-argument': 'off', - 'no-case-declarations': 'off', - 'no-console': 'error', - 'no-redeclare': 'off', - 'no-mixed-spaces-and-tabs': 'off', + "@typescript-eslint/ban-ts-ignore": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-redeclare": "error", + "@typescript-eslint/no-non-null-asserted-optional-chain": "off", + "@typescript-eslint/no-unused-vars": [2], + "vue/custom-event-name-casing": "off", + "vue/attributes-order": "off", + "vue/one-component-per-file": "off", + "vue/html-closing-bracket-newline": "off", + "vue/max-attributes-per-line": "off", + "vue/multiline-html-element-content-newline": "off", + "vue/singleline-html-element-content-newline": "off", + "vue/attribute-hyphenation": "off", + "vue/html-self-closing": "off", + "vue/no-multiple-template-root": "off", + "vue/require-default-prop": "off", + "vue/no-v-model-argument": "off", + "vue/no-arrow-functions-in-watch": "off", + "vue/no-template-key": "off", + "vue/no-v-html": "off", + "vue/comment-directive": "off", + "vue/no-mutating-props": "off", + "vue/no-parsing-error": "off", + "vue/no-deprecated-v-on-native-modifier": "off", + "vue/multi-word-component-names": "off", + "no-useless-escape": "off", + "no-sparse-arrays": "off", + "no-prototype-builtins": "off", + "no-constant-condition": "off", + "no-use-before-define": "off", + "no-restricted-globals": "off", + "no-restricted-syntax": "off", + "generator-star-spacing": "off", + "no-unreachable": "off", + "no-multiple-template-root": "off", + "no-unused-vars": "error", + "no-v-model-argument": "off", + "no-case-declarations": "off", + "no-console": "off", + "no-redeclare": "off", + "no-mixed-spaces-and-tabs": "off", }, -}; +} diff --git a/src/api/wallet/mch-dept-user.ts b/src/api/wallet/mch-dept.ts similarity index 100% rename from src/api/wallet/mch-dept-user.ts rename to src/api/wallet/mch-dept.ts diff --git a/src/api/wallet/wallet-rule-mch-config.ts b/src/api/wallet/mch-rule-join.ts similarity index 69% rename from src/api/wallet/wallet-rule-mch-config.ts rename to src/api/wallet/mch-rule-join.ts index a30ea298..48ea6011 100644 --- a/src/api/wallet/wallet-rule-mch-config.ts +++ b/src/api/wallet/mch-rule-join.ts @@ -2,7 +2,7 @@ import request from "/@/utils/request" export function pageJoin(query?: Object) { return request({ - url: "/wallet/wallet-rule-mch-config/page-join", + url: "/wallet/mch-rule-join/page-join", method: "get", params: query, }) @@ -10,7 +10,7 @@ export function pageJoin(query?: Object) { export function fetchList(query?: Object) { return request({ - url: "/wallet/wallet-rule-mch-config/page", + url: "/wallet/mch-rule-join/page", method: "get", params: query, }) @@ -18,7 +18,7 @@ export function fetchList(query?: Object) { export function addObj(obj?: Object) { return request({ - url: "/wallet/wallet-rule-mch-config", + url: "/wallet/mch-rule-join", method: "post", data: obj, }) @@ -26,14 +26,14 @@ export function addObj(obj?: Object) { export function getObj(id?: string) { return request({ - url: "/wallet/wallet-rule-mch-config/" + id, + url: "/wallet/mch-rule-join/" + id, method: "get", }) } export function delObjs(ids?: Object) { return request({ - url: "/wallet/wallet-rule-mch-config", + url: "/wallet/mch-rule-join", method: "delete", data: ids, }) @@ -41,7 +41,7 @@ export function delObjs(ids?: Object) { export function putObj(obj?: Object) { return request({ - url: "/wallet/wallet-rule-mch-config", + url: "/wallet/mch-rule-join", method: "put", data: obj, }) diff --git a/src/api/wallet/wallet-rule-price-config.ts b/src/api/wallet/mch-rule-price-config.ts similarity index 58% rename from src/api/wallet/wallet-rule-price-config.ts rename to src/api/wallet/mch-rule-price-config.ts index d7ee3c97..746f738d 100644 --- a/src/api/wallet/wallet-rule-price-config.ts +++ b/src/api/wallet/mch-rule-price-config.ts @@ -2,7 +2,15 @@ import request from "/@/utils/request" export function fetchList(query?: Object) { return request({ - url: "/wallet/wallet-rule-price-config/page", + url: "/wallet/mch-rule-price-config/page", + method: "get", + params: query, + }) +} + +export function pageSelect(query?: Object) { + return request({ + url: "/wallet/mch-rule-price-config/page-select", method: "get", params: query, }) @@ -10,7 +18,7 @@ export function fetchList(query?: Object) { export function addObj(obj?: Object) { return request({ - url: "/wallet/wallet-rule-price-config", + url: "/wallet/mch-rule-price-config", method: "post", data: obj, }) @@ -18,14 +26,14 @@ export function addObj(obj?: Object) { export function getObj(id?: string) { return request({ - url: "/wallet/wallet-rule-price-config/" + id, + url: "/wallet/mch-rule-price-config/" + id, method: "get", }) } export function delObjs(ids?: Object) { return request({ - url: "/wallet/wallet-rule-price-config", + url: "/wallet/mch-rule-price-config", method: "delete", data: ids, }) @@ -33,7 +41,7 @@ export function delObjs(ids?: Object) { export function putObj(obj?: Object) { return request({ - url: "/wallet/wallet-rule-price-config", + url: "/wallet/mch-rule-price-config", method: "put", data: obj, }) diff --git a/src/components/Select/SelectMchRule.vue b/src/components/Select/SelectMchRule.vue new file mode 100644 index 00000000..d09b8537 --- /dev/null +++ b/src/components/Select/SelectMchRule.vue @@ -0,0 +1,105 @@ + + e && getOptions()" + > + + + + + + 超过 + {{ displayPrice(v.basePrice) }} + 额外支付 + {{ v.multiple }}% + + + + + + + + diff --git a/src/components/index.ts b/src/components/index.ts index 632d9f05..bc6a59f6 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -24,6 +24,7 @@ import SelectCtcgol from "/@/components/Select/SelectCtcgol.vue" import SelectHardGroup from "/@/components/Select/selectHardGroup.vue" import SelectHandlerUser from "/@/components/Select/SelectHandlerUser.vue" import SelectSupplier from "/@/components/Select/SelectSupplier.vue" +import SelectMchRule from "/@/components/Select/SelectMchRule.vue" // 第三方组件 import ElementPlus from "element-plus" @@ -70,6 +71,7 @@ export default { app.component("SelectHardGroup", SelectHardGroup) app.component("SelectHandlerUser", SelectHandlerUser) app.component("SelectSupplier", SelectSupplier) + app.component("SelectMchRule", SelectMchRule) // 导入全部的elmenet-plus的图标 for (const [key, component] of Object.entries(ElementPlusIconsVue)) { diff --git a/src/views/mch/mch-dept-user/form.vue b/src/views/mch/mch-dept/form.vue similarity index 95% rename from src/views/mch/mch-dept-user/form.vue rename to src/views/mch/mch-dept/form.vue index 75b03316..385fcd5e 100644 --- a/src/views/mch/mch-dept-user/form.vue +++ b/src/views/mch/mch-dept/form.vue @@ -30,10 +30,10 @@ -