add
This commit is contained in:
parent
5158894cff
commit
e929ed45ad
126
package.json
126
package.json
|
@ -1,65 +1,65 @@
|
||||||
{
|
{
|
||||||
"name": "vue-project",
|
"name": "vue-project",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"preview": "vite preview --port 4173",
|
"preview": "vite preview --port 4173",
|
||||||
"build": "vite build && node scripts/release.mjs",
|
"build": "vite build && node scripts/release.mjs",
|
||||||
"type-check": "vue-tsc --noEmit",
|
"type-check": "vue-tsc --noEmit",
|
||||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "^2.0.6",
|
"@element-plus/icons-vue": "^2.0.6",
|
||||||
"@highlightjs/vue-plugin": "^2.1.0",
|
"@highlightjs/vue-plugin": "^2.1.0",
|
||||||
"@wangeditor/editor": "^5.1.12",
|
"@wangeditor/editor": "^5.1.12",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"css-color-function": "^1.3.3",
|
"css-color-function": "^1.3.3",
|
||||||
"echarts": "^5.3.3",
|
"echarts": "^5.3.3",
|
||||||
"element-plus": "^2.2.9",
|
"element-plus": "^2.2.9",
|
||||||
"highlight.js": "^11.6.0",
|
"highlight.js": "^11.6.0",
|
||||||
"mavon-editor": "3.0.1",
|
"mavon-editor": "3.0.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.0.14",
|
"pinia": "^2.0.14",
|
||||||
"vditor": "^3.9.9",
|
"vditor": "^3.9.9",
|
||||||
"vue": "^3.2.37",
|
"vue": "^3.2.37",
|
||||||
"vue-clipboard3": "^2.0.0",
|
"vue-clipboard3": "^2.0.0",
|
||||||
"vue-echarts": "^6.2.3",
|
"vue-echarts": "^6.2.3",
|
||||||
"vue-router": "^4.0.16",
|
"vue-router": "^4.0.16",
|
||||||
"vue3-video-play": "^1.3.2",
|
"vue3-video-play": "^1.3.2",
|
||||||
"vuedraggable": "^4.1.0"
|
"vuedraggable": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rushstack/eslint-patch": "^1.1.0",
|
"@rushstack/eslint-patch": "^1.1.0",
|
||||||
"@tailwindcss/line-clamp": "^0.4.2",
|
"@tailwindcss/line-clamp": "^0.4.2",
|
||||||
"@types/lodash-es": "^4.17.6",
|
"@types/lodash-es": "^4.17.6",
|
||||||
"@types/node": "^16.11.41",
|
"@types/node": "^16.11.41",
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.0",
|
||||||
"@vitejs/plugin-legacy": "^2.3.1",
|
"@vitejs/plugin-legacy": "^2.3.1",
|
||||||
"@vitejs/plugin-vue": "^3.0.0",
|
"@vitejs/plugin-vue": "^3.0.0",
|
||||||
"@vitejs/plugin-vue-jsx": "^2.0.0",
|
"@vitejs/plugin-vue-jsx": "^2.0.0",
|
||||||
"@vue/eslint-config-prettier": "^7.0.0",
|
"@vue/eslint-config-prettier": "^7.0.0",
|
||||||
"@vue/eslint-config-typescript": "^11.0.0",
|
"@vue/eslint-config-typescript": "^11.0.0",
|
||||||
"@vue/tsconfig": "^0.1.3",
|
"@vue/tsconfig": "^0.1.3",
|
||||||
"autoprefixer": "^10.4.7",
|
"autoprefixer": "^10.4.7",
|
||||||
"consola": "^2.15.3",
|
"consola": "^2.15.3",
|
||||||
"eslint": "^8.5.0",
|
"eslint": "^8.5.0",
|
||||||
"eslint-plugin-vue": "^9.0.0",
|
"eslint-plugin-vue": "^9.0.0",
|
||||||
"execa": "^6.1.0",
|
"execa": "^6.1.0",
|
||||||
"fs-extra": "^10.1.0",
|
"fs-extra": "^10.1.0",
|
||||||
"postcss": "^8.4.14",
|
"postcss": "^8.4.14",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"sass": "^1.53.0",
|
"sass": "^1.53.0",
|
||||||
"tailwindcss": "^3.0.24",
|
"tailwindcss": "^3.0.24",
|
||||||
"terser": "^5.15.1",
|
"terser": "^5.15.1",
|
||||||
"typescript": "~4.7.4",
|
"typescript": "~4.7.4",
|
||||||
"unplugin-auto-import": "^0.9.2",
|
"unplugin-auto-import": "^0.9.2",
|
||||||
"unplugin-vue-components": "^0.19.9",
|
"unplugin-vue-components": "^0.19.9",
|
||||||
"vite": "^3.0.0",
|
"vite": "^3.0.0",
|
||||||
"vite-plugin-style-import": "^2.0.0",
|
"vite-plugin-style-import": "^2.0.0",
|
||||||
"vite-plugin-svg-icons": "^2.0.1",
|
"vite-plugin-svg-icons": "^2.0.1",
|
||||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||||
"vue-tsc": "^0.38.1"
|
"vue-tsc": "^0.38.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
11
src/App.vue
11
src/App.vue
|
@ -59,7 +59,16 @@ watch(
|
||||||
/* .el-select__wrapper{
|
/* .el-select__wrapper{
|
||||||
width: 280px;
|
width: 280px;
|
||||||
} */
|
} */
|
||||||
.el-select.w-\[280px\]{
|
.el-select.w-\[280px\] {
|
||||||
width: 280px;
|
width: 280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-table th.el-table__cell>.cell {
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table td.el-table__cell div {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -4,15 +4,8 @@
|
||||||
<!-- 触发弹窗 -->
|
<!-- 触发弹窗 -->
|
||||||
<slot name="trigger"></slot>
|
<slot name="trigger"></slot>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
<el-dialog v-model="visible" :custom-class="customClass" :center="center" :append-to-body="true" :width="width"
|
||||||
v-model="visible"
|
:close-on-click-modal="clickModalClose" @closed="close">
|
||||||
:custom-class="customClass"
|
|
||||||
:center="center"
|
|
||||||
:append-to-body="true"
|
|
||||||
:width="width"
|
|
||||||
:close-on-click-modal="clickModalClose"
|
|
||||||
@closed="close"
|
|
||||||
>
|
|
||||||
<!-- 弹窗内容 -->
|
<!-- 弹窗内容 -->
|
||||||
<template v-if="title" #header>{{ title }}</template>
|
<template v-if="title" #header>{{ title }}</template>
|
||||||
|
|
||||||
|
@ -24,11 +17,7 @@
|
||||||
<el-button v-if="cancelButtonText" @click="handleEvent('cancel')">
|
<el-button v-if="cancelButtonText" @click="handleEvent('cancel')">
|
||||||
{{ cancelButtonText }}
|
{{ cancelButtonText }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-if="confirmButtonText" type="primary" @click="handleEvent('confirm')">
|
||||||
v-if="confirmButtonText"
|
|
||||||
type="primary"
|
|
||||||
@click="handleEvent('confirm')"
|
|
||||||
>
|
|
||||||
{{ confirmButtonText }}
|
{{ confirmButtonText }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -78,7 +67,7 @@ export default defineComponent({
|
||||||
clickModalClose: {
|
clickModalClose: {
|
||||||
// 点击遮罩层关闭对话窗口
|
// 点击遮罩层关闭对话窗口
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: true
|
||||||
},
|
},
|
||||||
center: {
|
center: {
|
||||||
// 是否居中布局
|
// 是否居中布局
|
||||||
|
|
|
@ -1,124 +1,152 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose">
|
||||||
ref="popupRef"
|
<el-form ref="formRef" :model="formData" label-width="160px" :rules="formRules">
|
||||||
:title="popupTitle"
|
<el-row>
|
||||||
:async="true"
|
<el-col :span="24">
|
||||||
width="550px"
|
<el-form-item label="商户头像" prop="mer_avatar">
|
||||||
@confirm="handleSubmit"
|
<material-picker v-model="formData.mer_avatar" />
|
||||||
@close="handleClose"
|
</el-form-item>
|
||||||
>
|
</el-col>
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-col :span="8">
|
||||||
<el-form-item label="商户分类" prop="category_id">
|
<el-form-item label="商户名称" prop="mer_name">
|
||||||
<el-select class="flex-1" v-model="formData.category_id" clearable placeholder="请选择商户分类">
|
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" />
|
||||||
<el-option
|
</el-form-item>
|
||||||
v-for="(item, index) in dictData.mer_category_type"
|
</el-col>
|
||||||
:key="index"
|
<el-col :span="8">
|
||||||
:label="item.name"
|
<el-form-item label="商户分类" prop="category_id">
|
||||||
:value="parseInt(item.value)"
|
<el-select class="flex-1" v-model="formData.category_id" clearable placeholder="请选择商户分类">
|
||||||
/>
|
<el-option v-for="(item, index) in dictData.mer_category_type" :key="index"
|
||||||
</el-select>
|
:label="item.name" :value="parseInt(item.value)" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
<el-form-item label="店铺类型" prop="type_id">
|
</el-form-item>
|
||||||
<el-select class="flex-1" v-model="formData.type_id" clearable placeholder="请选择店铺类型">
|
</el-col>
|
||||||
<el-option
|
<el-col :span="8">
|
||||||
v-for="(item, index) in dictData.merchat_type"
|
<el-form-item label="店铺类型" prop="type_id">
|
||||||
:key="index"
|
<el-select class="flex-1" v-model="formData.type_id" clearable placeholder="请选择店铺类型">
|
||||||
:label="item.name"
|
<el-option v-for="(item, index) in dictData.merchat_type" :key="index" :label="item.name"
|
||||||
:value="parseInt(item.value)"
|
:value="parseInt(item.value)" />
|
||||||
/>
|
</el-select>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="商户名称" prop="mer_name">
|
|
||||||
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" />
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="是否支持先货后款" prop="credit_buy">
|
||||||
<el-form-item label="是否支持先货后款" prop="credit_buy">
|
<el-radio-group v-model="formData.credit_buy" placeholder="请选择是否支持先货后款">
|
||||||
<el-radio-group v-model="formData.credit_buy" placeholder="请选择是否支持先货后款">
|
<el-radio v-for="(item, index) in dictData.show_status" :key="index"
|
||||||
<el-radio
|
:label="parseInt(item.value)">
|
||||||
v-for="(item, index) in dictData.show_status"
|
{{ item.name }}
|
||||||
:key="index"
|
</el-radio>
|
||||||
:label="parseInt(item.value)"
|
</el-radio-group>
|
||||||
>
|
</el-form-item>
|
||||||
{{ item.name }}
|
</el-col>
|
||||||
</el-radio>
|
<el-col :span="8">
|
||||||
</el-radio-group>
|
<el-form-item label="结算周期(天)" prop="settle_cycle">
|
||||||
</el-form-item>
|
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期,单位天" />
|
||||||
<el-form-item label="结算周期,单位天" prop="settle_cycle">
|
</el-form-item>
|
||||||
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期,单位天" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="8">
|
||||||
<el-form-item label="利率" prop="interest_rate">
|
<el-form-item label="利率" prop="interest_rate">
|
||||||
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" />
|
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="城市code" prop="city_id">
|
</el-col>
|
||||||
<el-input v-model="formData.city_id" clearable placeholder="请输入城市code" />
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="城市" prop="city_id">
|
||||||
<el-form-item label="区县code" prop="area_id">
|
<el-input v-model="formData.city_id" clearable placeholder="请输入城市" />
|
||||||
<el-input v-model="formData.area_id" clearable placeholder="请输入区县code" />
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="镇街表code" prop="street_id">
|
<el-col :span="8">
|
||||||
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表code" />
|
<el-form-item label="区县" prop="area_id">
|
||||||
</el-form-item>
|
<el-input v-model="formData.area_id" clearable placeholder="请输入区县" />
|
||||||
<el-form-item label="村主键code" prop="village_id">
|
</el-form-item>
|
||||||
<el-input v-model="formData.village_id" clearable placeholder="请输入村主键code" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="8">
|
||||||
<el-form-item label="商户地址" prop="mer_address">
|
<el-form-item label="镇街" prop="street_id">
|
||||||
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" />
|
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户头像" prop="mer_avatar">
|
</el-col>
|
||||||
<el-input v-model="formData.mer_avatar" clearable placeholder="请输入商户头像" />
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="村" prop="village_id">
|
||||||
<el-form-item label="商户备注" prop="mark">
|
<el-input v-model="formData.village_id" clearable placeholder="请输入村" />
|
||||||
<el-input v-model="formData.mark" clearable placeholder="请输入商户备注" />
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="" prop="sort">
|
<el-col :span="8">
|
||||||
<el-input v-model="formData.sort" clearable placeholder="请输入" />
|
<el-form-item label="商户地址" prop="mer_address">
|
||||||
</el-form-item>
|
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" />
|
||||||
<el-form-item label="商户是否禁用0锁定,1正常" prop="status">
|
</el-form-item>
|
||||||
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用0锁定,1正常">
|
</el-col>
|
||||||
<el-radio
|
|
||||||
v-for="(item, index) in dictData.off_status"
|
<!-- <el-col :span="8">
|
||||||
:key="index"
|
<el-form-item label="" prop="sort">
|
||||||
:label="parseInt(item.value)"
|
<el-input v-model="formData.sort" clearable placeholder="请输入" />
|
||||||
>
|
</el-form-item>
|
||||||
{{ item.name }}
|
</el-col> -->
|
||||||
</el-radio>
|
<el-col :span="8">
|
||||||
</el-radio-group>
|
<el-form-item label="商户是否禁用" prop="status">
|
||||||
</el-form-item>
|
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用">
|
||||||
<el-form-item label="提成比例" prop="commission_rate">
|
<el-radio v-for="(item, index) in dictData.off_status" :key="index"
|
||||||
<el-input v-model="formData.commission_rate" clearable placeholder="请输入提成比例" />
|
:label="parseInt(item.value)">
|
||||||
</el-form-item>
|
{{ item.name }}
|
||||||
<el-form-item label="商户手续费单独设置" prop="commission_switch">
|
</el-radio>
|
||||||
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置">
|
</el-radio-group>
|
||||||
<el-radio
|
</el-form-item>
|
||||||
v-for="(item, index) in dictData.off_status"
|
</el-col>
|
||||||
:key="index"
|
<el-col :span="8">
|
||||||
:label="parseInt(item.value)"
|
<el-form-item label="提成比例" prop="commission_rate">
|
||||||
>
|
<el-input v-model="formData.commission_rate" clearable placeholder="请输入提成比例" />
|
||||||
{{ item.name }}
|
</el-form-item>
|
||||||
</el-radio>
|
</el-col>
|
||||||
</el-radio-group>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="商户手续费单独设置" prop="commission_switch">
|
||||||
<el-form-item label="经度" prop="long">
|
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置">
|
||||||
<el-input v-model="formData.long" clearable placeholder="请输入经度" />
|
<el-radio v-for="(item, index) in dictData.off_status" :key="index"
|
||||||
</el-form-item>
|
:label="parseInt(item.value)">
|
||||||
<el-form-item label="纬度" prop="lat">
|
{{ item.name }}
|
||||||
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" />
|
</el-radio>
|
||||||
</el-form-item>
|
</el-radio-group>
|
||||||
<el-form-item label="店铺电话" prop="service_phone">
|
</el-form-item>
|
||||||
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="8">
|
||||||
<el-form-item label="商户余额" prop="mer_money">
|
<el-form-item label="经度" prop="long">
|
||||||
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" />
|
<el-input v-model="formData.long" clearable placeholder="请输入经度" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
</el-col>
|
||||||
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" />
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="纬度" prop="lat">
|
||||||
<el-form-item label="微信转账信息" prop="financial_wechat">
|
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" />
|
||||||
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" />
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
<el-col :span="8">
|
||||||
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" />
|
<el-form-item label="店铺电话" prop="service_phone">
|
||||||
</el-form-item>
|
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="商户余额" prop="mer_money">
|
||||||
|
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="商户备注" prop="mark">
|
||||||
|
<el-input v-model="formData.mark" type="textarea" clearable placeholder="请输入商户备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
||||||
|
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="微信转账信息" prop="financial_wechat">
|
||||||
|
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
||||||
|
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
</div>
|
</div>
|
||||||
|
@ -260,7 +288,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
const data = { ...formData, }
|
const data = { ...formData, }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await apiMerchantEdit(data)
|
? await apiMerchantEdit(data)
|
||||||
: await apiMerchantAdd(data)
|
: await apiMerchantAdd(data)
|
||||||
|
|
|
@ -1,84 +1,95 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form
|
<el-form class="mb-[-16px]" :model="queryParams" label-width="160px">
|
||||||
class="mb-[-16px]"
|
<el-row>
|
||||||
:model="queryParams"
|
<el-col :span="6">
|
||||||
inline
|
<el-form-item label="商户分类" prop="category_id">
|
||||||
>
|
<el-select class="w-[280px]" v-model="queryParams.category_id" clearable placeholder="请选择商户分类">
|
||||||
<el-form-item label="商户分类" prop="category_id">
|
<el-option label="全部" value=""></el-option>
|
||||||
<el-select class="w-[280px]"
|
<el-option v-for="(item, index) in dictData.mer_category_type" :key="index"
|
||||||
v-model="queryParams.category_id" clearable placeholder="请选择商户分类">
|
:label="item.name" :value="item.value" />
|
||||||
<el-option label="全部" value=""></el-option>
|
</el-select>
|
||||||
<el-option
|
</el-form-item>
|
||||||
v-for="(item, index) in dictData.mer_category_type"
|
</el-col>
|
||||||
:key="index"
|
<el-col :span="6">
|
||||||
:label="item.name"
|
<el-form-item label="店铺类型" prop="type_id">
|
||||||
:value="item.value"
|
<el-select class="w-[280px]" v-model="queryParams.type_id" clearable placeholder="请选择店铺类型">
|
||||||
/>
|
<el-option label="全部" value=""></el-option>
|
||||||
</el-select>
|
<el-option v-for="(item, index) in dictData.merchat_type" :key="index" :label="item.name"
|
||||||
</el-form-item>
|
:value="item.value" />
|
||||||
<el-form-item label="店铺类型" prop="type_id">
|
</el-select>
|
||||||
<el-select class="w-[280px]"
|
</el-form-item>
|
||||||
v-model="queryParams.type_id" clearable placeholder="请选择店铺类型">
|
</el-col>
|
||||||
<el-option label="全部" value=""></el-option>
|
<el-col :span="6">
|
||||||
<el-option
|
<el-form-item label="商户名称" prop="mer_name">
|
||||||
v-for="(item, index) in dictData.merchat_type"
|
<el-input class="w-[280px]" v-model="queryParams.mer_name" clearable placeholder="请输入商户名称" />
|
||||||
:key="index"
|
</el-form-item>
|
||||||
:label="item.name"
|
</el-col>
|
||||||
:value="item.value"
|
<el-col :span="6">
|
||||||
/>
|
<el-form-item label="是否支持先货后款" prop="credit_buy">
|
||||||
</el-select>
|
<el-select class="w-[280px]" v-model="queryParams.credit_buy" clearable
|
||||||
</el-form-item>
|
placeholder="请选择是否支持先货后款">
|
||||||
<el-form-item label="商户名称" prop="mer_name">
|
<el-option label="全部" value=""></el-option>
|
||||||
<el-input class="w-[280px]" v-model="queryParams.mer_name" clearable placeholder="请输入商户名称" />
|
<el-option v-for="(item, index) in dictData.show_status" :key="index" :label="item.name"
|
||||||
</el-form-item>
|
:value="item.value" />
|
||||||
<el-form-item label="是否支持先货后款" prop="credit_buy">
|
</el-select>
|
||||||
<el-select class="w-[280px]"
|
</el-form-item>
|
||||||
v-model="queryParams.credit_buy" clearable placeholder="请选择是否支持先货后款">
|
</el-col>
|
||||||
<el-option label="全部" value=""></el-option>
|
<el-col :span="6">
|
||||||
<el-option
|
<el-form-item label="商户是否禁用" prop="status">
|
||||||
v-for="(item, index) in dictData.show_status"
|
<el-select class="w-[280px]" v-model="queryParams.status" clearable placeholder="请选择商户是否禁用">
|
||||||
:key="index"
|
<el-option label="全部" value=""></el-option>
|
||||||
:label="item.name"
|
<el-option v-for="(item, index) in dictData.off_status" :key="index" :label="item.name"
|
||||||
:value="item.value"
|
:value="item.value" />
|
||||||
/>
|
</el-select>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="商户是否禁用0锁定,1正常" prop="status">
|
<el-col :span="6">
|
||||||
<el-select class="w-[280px]"
|
<el-form-item label="提成比例" prop="commission_rate">
|
||||||
v-model="queryParams.status" clearable placeholder="请选择商户是否禁用0锁定,1正常">
|
<el-input class="w-[280px]" v-model="queryParams.commission_rate" clearable
|
||||||
<el-option label="全部" value=""></el-option>
|
placeholder="请输入提成比例" />
|
||||||
<el-option
|
</el-form-item>
|
||||||
v-for="(item, index) in dictData.off_status"
|
</el-col>
|
||||||
:key="index"
|
<el-col :span="6">
|
||||||
:label="item.name"
|
<el-form-item label="店铺电话" prop="service_phone">
|
||||||
:value="item.value"
|
<el-input class="w-[280px]" v-model="queryParams.service_phone" clearable
|
||||||
/>
|
placeholder="请输入店铺电话" />
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="提成比例" prop="commission_rate">
|
<el-col :span="6">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.commission_rate" clearable placeholder="请输入提成比例" />
|
<el-form-item label="商户余额" prop="mer_money">
|
||||||
</el-form-item>
|
<el-input class="w-[280px]" v-model="queryParams.mer_money" clearable placeholder="请输入商户余额" />
|
||||||
<el-form-item label="店铺电话" prop="service_phone">
|
</el-form-item>
|
||||||
<el-input class="w-[280px]" v-model="queryParams.service_phone" clearable placeholder="请输入店铺电话" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="6">
|
||||||
<el-form-item label="商户余额" prop="mer_money">
|
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.mer_money" clearable placeholder="请输入商户余额" />
|
<el-input class="w-[280px]" v-model="queryParams.financial_bank" clearable
|
||||||
</el-form-item>
|
placeholder="请输入银行卡转账信息" />
|
||||||
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
</el-form-item>
|
||||||
<el-input class="w-[280px]" v-model="queryParams.financial_bank" clearable placeholder="请输入银行卡转账信息" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="6">
|
||||||
<el-form-item label="微信转账信息" prop="financial_wechat">
|
<el-form-item label="微信转账信息" prop="financial_wechat">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.financial_wechat" clearable placeholder="请输入微信转账信息" />
|
<el-input class="w-[280px]" v-model="queryParams.financial_wechat" clearable
|
||||||
</el-form-item>
|
placeholder="请输入微信转账信息" />
|
||||||
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
</el-form-item>
|
||||||
<el-input class="w-[280px]" v-model="queryParams.financial_alipay" clearable placeholder="请输入支付宝转账信息" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="6">
|
||||||
<el-form-item>
|
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-input class="w-[280px]" v-model="queryParams.financial_alipay" clearable
|
||||||
<el-button @click="resetParams">重置</el-button>
|
placeholder="请输入支付宝转账信息" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
|
<el-button @click="resetParams">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
|
@ -88,11 +99,8 @@
|
||||||
</template>
|
</template>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['merchat.merchant/delete']" :disabled="!selectData.length"
|
||||||
v-perms="['merchat.merchant/delete']"
|
@click="handleDelete(selectData)">
|
||||||
:disabled="!selectData.length"
|
|
||||||
@click="handleDelete(selectData)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
|
@ -115,12 +123,12 @@
|
||||||
<dict-value :options="dictData.show_status" :value="row.credit_buy" />
|
<dict-value :options="dictData.show_status" :value="row.credit_buy" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="结算周期,单位天" prop="settle_cycle" show-overflow-tooltip />
|
<el-table-column label="结算周期(天)" prop="settle_cycle" show-overflow-tooltip />
|
||||||
<el-table-column label="利率" prop="interest_rate" show-overflow-tooltip />
|
<el-table-column label="利率" prop="interest_rate" show-overflow-tooltip />
|
||||||
<el-table-column label="城市code" prop="city_id" show-overflow-tooltip />
|
<el-table-column label="城市" prop="city_id" show-overflow-tooltip />
|
||||||
<el-table-column label="区县code" prop="area_id" show-overflow-tooltip />
|
<el-table-column label="区县" prop="area_id" show-overflow-tooltip />
|
||||||
<el-table-column label="镇街表code" prop="street_id" show-overflow-tooltip />
|
<el-table-column label="镇街表" prop="street_id" show-overflow-tooltip />
|
||||||
<el-table-column label="村主键code" prop="village_id" show-overflow-tooltip />
|
<el-table-column label="村主键" prop="village_id" show-overflow-tooltip />
|
||||||
<el-table-column label="商户地址" prop="mer_address" show-overflow-tooltip />
|
<el-table-column label="商户地址" prop="mer_address" show-overflow-tooltip />
|
||||||
<el-table-column label="商户头像" prop="mer_avatar" show-overflow-tooltip />
|
<el-table-column label="商户头像" prop="mer_avatar" show-overflow-tooltip />
|
||||||
<el-table-column label="商户备注" prop="mark" show-overflow-tooltip />
|
<el-table-column label="商户备注" prop="mark" show-overflow-tooltip />
|
||||||
|
@ -132,20 +140,11 @@
|
||||||
<el-table-column label="支付宝转账信息" prop="financial_alipay" show-overflow-tooltip />
|
<el-table-column label="支付宝转账信息" prop="financial_alipay" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
<el-table-column label="操作" width="120" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button v-perms="['merchat.merchant/edit']" type="primary" link @click="handleEdit(row)">
|
||||||
v-perms="['merchat.merchant/edit']"
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
@click="handleEdit(row)"
|
|
||||||
>
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['merchat.merchant/delete']" type="danger" link
|
||||||
v-perms="['merchat.merchant/delete']"
|
@click="handleDelete(row.mer_id)">
|
||||||
type="danger"
|
|
||||||
link
|
|
||||||
@click="handleDelete(row.mer_id)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,101 +1,87 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup
|
<popup ref="popupRef" title="详情" :async="true" width="550px" :cancelButtonText="false" :confirmButtonText="false">
|
||||||
ref="popupRef"
|
|
||||||
title="详情"
|
|
||||||
:async="true"
|
|
||||||
width="550px"
|
|
||||||
:cancelButtonText="false"
|
|
||||||
:confirmButtonText="false"
|
|
||||||
>
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px">
|
<el-form ref="formRef" :model="formData" label-width="90px">
|
||||||
<el-form-item label="商户分类 id" prop="category_id">
|
<el-form-item label="商户分类 id" prop="category_id">
|
||||||
<el-input v-model="formData.category_id" clearable placeholder="请输入商户分类 id" :readonly="true"/>
|
<el-input v-model="formData.category_id" clearable placeholder="请输入商户分类 id" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="店铺类型 id" prop="type_id">
|
<el-form-item label="店铺类型 id" prop="type_id">
|
||||||
<el-input v-model="formData.type_id" clearable placeholder="请输入店铺类型 id" :readonly="true"/>
|
<el-input v-model="formData.type_id" clearable placeholder="请输入店铺类型 id" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户名称" prop="mer_name">
|
<el-form-item label="商户名称" prop="mer_name">
|
||||||
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" :readonly="true"/>
|
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="结算周期,单位天" prop="settle_cycle">
|
<el-form-item label="结算周期,单位天" prop="settle_cycle">
|
||||||
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期,单位天" :readonly="true"/>
|
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期(天)" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="利率" prop="interest_rate">
|
<el-form-item label="利率" prop="interest_rate">
|
||||||
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" :readonly="true"/>
|
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标签" prop="sys_labels">
|
<el-form-item label="标签" prop="sys_labels">
|
||||||
<el-input v-model="formData.sys_labels" clearable placeholder="请输入标签" :readonly="true"/>
|
<el-input v-model="formData.sys_labels" clearable placeholder="请输入标签" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="城市code" prop="city_id">
|
<el-form-item label="城市code" prop="city_id">
|
||||||
<el-input v-model="formData.city_id" clearable placeholder="请输入城市code" :readonly="true"/>
|
<el-input v-model="formData.city_id" clearable placeholder="请输入城市code" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="区县code" prop="area_id">
|
<el-form-item label="区县code" prop="area_id">
|
||||||
<el-input v-model="formData.area_id" clearable placeholder="请输入区县code" :readonly="true"/>
|
<el-input v-model="formData.area_id" clearable placeholder="请输入区县code" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="镇街表code" prop="street_id">
|
<el-form-item label="镇街表code" prop="street_id">
|
||||||
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表code" :readonly="true"/>
|
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表code" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="村code" prop="village_id">
|
<el-form-item label="村code" prop="village_id">
|
||||||
<el-input v-model="formData.village_id" clearable placeholder="请输入村code" :readonly="true"/>
|
<el-input v-model="formData.village_id" clearable placeholder="请输入村code" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户地址" prop="mer_address">
|
<el-form-item label="商户地址" prop="mer_address">
|
||||||
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" :readonly="true"/>
|
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户头像" prop="mer_avatar">
|
<el-form-item label="商户头像" prop="mer_avatar">
|
||||||
<el-input v-model="formData.mer_avatar" clearable placeholder="请输入商户头像" :readonly="true"/>
|
<el-input v-model="formData.mer_avatar" clearable placeholder="请输入商户头像" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户备注" prop="mark">
|
<el-form-item label="商户备注" prop="mark">
|
||||||
<el-input v-model="formData.mark" clearable placeholder="请输入商户备注" :readonly="true"/>
|
<el-input v-model="formData.mark" clearable placeholder="请输入商户备注" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户是否禁用0锁定,1正常" prop="status">
|
<el-form-item label="商户是否禁用0锁定,1正常" prop="status">
|
||||||
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用0锁定,1正常" :disabled="true">
|
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用" :disabled="true">
|
||||||
<el-radio
|
<el-radio v-for="(item, index) in dictData.show_status" :key="index" :label="parseInt(item.value)">
|
||||||
v-for="(item, index) in dictData.show_status"
|
|
||||||
:key="index"
|
|
||||||
:label="parseInt(item.value)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提成比例" prop="commission_rate">
|
<el-form-item label="提成比例" prop="commission_rate">
|
||||||
<el-input v-model="formData.commission_rate" clearable placeholder="请输入提成比例" :readonly="true"/>
|
<el-input v-model="formData.commission_rate" clearable placeholder="请输入提成比例" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户手续费单独设置 0 关闭 1 开启" prop="commission_switch">
|
<el-form-item label="商户手续费单独设置 0 关闭 1 开启" prop="commission_switch">
|
||||||
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置 0 关闭 1 开启" :disabled="true">
|
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置 0 关闭 1 开启"
|
||||||
<el-radio
|
:disabled="true">
|
||||||
v-for="(item, index) in dictData.show_status"
|
<el-radio v-for="(item, index) in dictData.show_status" :key="index" :label="parseInt(item.value)">
|
||||||
:key="index"
|
|
||||||
:label="parseInt(item.value)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="经度" prop="long">
|
<el-form-item label="经度" prop="long">
|
||||||
<el-input v-model="formData.long" clearable placeholder="请输入经度" :readonly="true"/>
|
<el-input v-model="formData.long" clearable placeholder="请输入经度" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="纬度" prop="lat">
|
<el-form-item label="纬度" prop="lat">
|
||||||
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" :readonly="true"/>
|
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="店铺电话" prop="service_phone">
|
<el-form-item label="店铺电话" prop="service_phone">
|
||||||
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" :readonly="true"/>
|
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户余额" prop="mer_money">
|
<el-form-item label="商户余额" prop="mer_money">
|
||||||
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" :readonly="true"/>
|
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
||||||
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" :readonly="true"/>
|
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="微信转账信息" prop="financial_wechat">
|
<el-form-item label="微信转账信息" prop="financial_wechat">
|
||||||
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" :readonly="true"/>
|
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
||||||
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" :readonly="true"/>
|
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="默认使用类型" prop="financial_type">
|
<el-form-item label="默认使用类型" prop="financial_type">
|
||||||
<el-input v-model="formData.financial_type" clearable placeholder="请输入默认使用类型" :readonly="true"/>
|
<el-input v-model="formData.financial_type" clearable placeholder="请输入默认使用类型" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
|
|
|
@ -1,102 +1,156 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose">
|
||||||
ref="popupRef"
|
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||||
:title="popupTitle"
|
<el-row>
|
||||||
:async="true"
|
<el-col :span="24">
|
||||||
width="550px"
|
<el-form-item label="商户头像" prop="mer_avatar">
|
||||||
@confirm="handleSubmit"
|
<material-picker v-model="formData.mer_avatar" />
|
||||||
@close="handleClose"
|
</el-form-item>
|
||||||
>
|
</el-col>
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-col :span="8">
|
||||||
<el-form-item label="商户分类 id" prop="category_id">
|
<el-form-item label="商户名称" prop="mer_name">
|
||||||
<el-input v-model="formData.category_id" clearable placeholder="请输入商户分类 id" :readonly="false"/>
|
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="店铺类型 id" prop="type_id">
|
</el-col>
|
||||||
<el-input v-model="formData.type_id" clearable placeholder="请输入店铺类型 id" :readonly="false"/>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="商户分类" prop="category_id">
|
||||||
<el-form-item label="商户名称" prop="mer_name">
|
<el-select class="flex-1" v-model="formData.category_id" clearable placeholder="请选择店铺类型">
|
||||||
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" :readonly="false"/>
|
<el-option v-for="(item, index) in dictData.mer_category_type" :key="index"
|
||||||
</el-form-item>
|
:label="item.name" :value="parseInt(item.value)" />
|
||||||
<el-form-item label="结算周期,单位天" prop="settle_cycle">
|
</el-select>
|
||||||
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期,单位天" :readonly="false"/>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="利率" prop="interest_rate">
|
<el-col :span="8">
|
||||||
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" :readonly="false"/>
|
<el-form-item label="店铺类型" prop="type_id">
|
||||||
</el-form-item>
|
<el-select class="flex-1" v-model="formData.type_id" clearable placeholder="请选择店铺类型">
|
||||||
<el-form-item label="标签" prop="sys_labels">
|
<el-option v-for="(item, index) in dictData.merchat_type" :key="index" :label="item.name"
|
||||||
<el-input v-model="formData.sys_labels" clearable placeholder="请输入标签" :readonly="false"/>
|
:value="parseInt(item.value)" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
<el-form-item label="城市code" prop="city_id">
|
</el-form-item>
|
||||||
<el-input v-model="formData.city_id" clearable placeholder="请输入城市code" :readonly="false"/>
|
</el-col>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="区县code" prop="area_id">
|
<el-col :span="8">
|
||||||
<el-input v-model="formData.area_id" clearable placeholder="请输入区县code" :readonly="false"/>
|
<el-form-item label="结算周期(天)" prop="settle_cycle">
|
||||||
</el-form-item>
|
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期,单位天"
|
||||||
<el-form-item label="镇街表code" prop="street_id">
|
:readonly="false" />
|
||||||
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表code" :readonly="false"/>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="村code" prop="village_id">
|
<el-col :span="8">
|
||||||
<el-input v-model="formData.village_id" clearable placeholder="请输入村code" :readonly="false"/>
|
<el-form-item label="利率" prop="interest_rate">
|
||||||
</el-form-item>
|
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" :readonly="false" />
|
||||||
<el-form-item label="商户地址" prop="mer_address">
|
</el-form-item>
|
||||||
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" :readonly="false"/>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="8">
|
||||||
<el-form-item label="商户头像" prop="mer_avatar">
|
<el-form-item label="标签" prop="sys_labels">
|
||||||
<el-input v-model="formData.mer_avatar" clearable placeholder="请输入商户头像" :readonly="false"/>
|
<el-input v-model="formData.sys_labels" clearable placeholder="请输入标签" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户备注" prop="mark">
|
</el-col>
|
||||||
<el-input v-model="formData.mark" clearable placeholder="请输入商户备注" :readonly="false"/>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="城市" prop="city_id">
|
||||||
<el-form-item label="商户是否禁用0锁定,1正常" prop="status">
|
<el-input v-model="formData.city_id" clearable placeholder="请输入城市" :readonly="false" />
|
||||||
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用0锁定,1正常" :disabled="false">
|
</el-form-item>
|
||||||
<el-radio
|
</el-col>
|
||||||
v-for="(item, index) in dictData.show_status"
|
<el-col :span="8">
|
||||||
:key="index"
|
<el-form-item label="区县" prop="area_id">
|
||||||
:label="parseInt(item.value)"
|
<el-input v-model="formData.area_id" clearable placeholder="请输入区县" :readonly="false" />
|
||||||
>
|
</el-form-item>
|
||||||
{{ item.name }}
|
</el-col>
|
||||||
</el-radio>
|
<el-col :span="8">
|
||||||
</el-radio-group>
|
<el-form-item label="镇街" prop="street_id">
|
||||||
</el-form-item>
|
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表" :readonly="false" />
|
||||||
<el-form-item label="提成比例" prop="commission_rate">
|
</el-form-item>
|
||||||
<el-input v-model="formData.commission_rate" clearable placeholder="请输入提成比例" :readonly="false"/>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="8">
|
||||||
<el-form-item label="商户手续费单独设置 0 关闭 1 开启" prop="commission_switch">
|
<el-form-item label="村" prop="village_id">
|
||||||
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置 0 关闭 1 开启" :disabled="false">
|
<el-input v-model="formData.village_id" clearable placeholder="请输入村" :readonly="false" />
|
||||||
<el-radio
|
</el-form-item>
|
||||||
v-for="(item, index) in dictData.show_status"
|
</el-col>
|
||||||
:key="index"
|
<el-col :span="8">
|
||||||
:label="parseInt(item.value)"
|
<el-form-item label="商户地址" prop="mer_address">
|
||||||
>
|
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" :readonly="false" />
|
||||||
{{ item.name }}
|
</el-form-item>
|
||||||
</el-radio>
|
</el-col>
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="经度" prop="long">
|
<el-col :span="8">
|
||||||
<el-input v-model="formData.long" clearable placeholder="请输入经度" :readonly="false"/>
|
<el-form-item label="商户是否禁用" prop="status">
|
||||||
</el-form-item>
|
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用" :disabled="false">
|
||||||
<el-form-item label="纬度" prop="lat">
|
<el-radio v-for="(item, index) in dictData.show_status" :key="index"
|
||||||
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" :readonly="false"/>
|
:label="parseInt(item.value)">
|
||||||
</el-form-item>
|
{{ item.name }}
|
||||||
<el-form-item label="店铺电话" prop="service_phone">
|
</el-radio>
|
||||||
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" :readonly="false"/>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户余额" prop="mer_money">
|
</el-col>
|
||||||
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" :readonly="false"/>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="提成比例" prop="commission_rate">
|
||||||
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
<el-input v-model="formData.commission_rate" type="number" clearable placeholder="请输入提成比例"
|
||||||
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" :readonly="false"/>
|
:readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="微信转账信息" prop="financial_wechat">
|
</el-col>
|
||||||
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" :readonly="false"/>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="商户手续费单独设置" prop="commission_switch" label-width="180px">
|
||||||
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置"
|
||||||
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" :readonly="false"/>
|
:disabled="false">
|
||||||
</el-form-item>
|
<el-radio v-for="(item, index) in dictData.show_status" :key="index"
|
||||||
<el-form-item label="默认使用类型" prop="financial_type">
|
:label="parseInt(item.value)">
|
||||||
<el-input v-model="formData.financial_type" clearable placeholder="请输入默认使用类型" :readonly="false"/>
|
{{ item.name }}
|
||||||
</el-form-item>
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="经度" prop="long">
|
||||||
|
<el-input v-model="formData.long" clearable placeholder="请输入经度" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="纬度" prop="lat">
|
||||||
|
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="店铺电话" prop="service_phone">
|
||||||
|
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="商户余额" prop="mer_money">
|
||||||
|
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="商户备注" prop="mark">
|
||||||
|
<el-input v-model="formData.mark" clearable placeholder="请输入商户备注" type="textarea"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
||||||
|
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="微信转账信息" prop="financial_wechat">
|
||||||
|
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
||||||
|
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="默认使用类型" prop="financial_type">
|
||||||
|
<el-input v-model="formData.financial_type" clearable placeholder="请输入默认使用类型"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
</div>
|
</div>
|
||||||
|
@ -106,7 +160,6 @@
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { apiSupplierAdd, apiSupplierEdit, apiSupplierDetail } from '@/api/supplier'
|
import { apiSupplierAdd, apiSupplierEdit, apiSupplierDetail } from '@/api/supplier'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
|
@ -228,7 +281,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
const data = { ...formData, }
|
const data = { ...formData, }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await apiSupplierEdit(data)
|
? await apiSupplierEdit(data)
|
||||||
: await apiSupplierAdd(data)
|
: await apiSupplierAdd(data)
|
||||||
|
@ -249,6 +302,16 @@ const handleClose = () => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 地址
|
||||||
|
const address = reactive({
|
||||||
|
cityList: [],
|
||||||
|
areaList: [],
|
||||||
|
townList: [],
|
||||||
|
villlageList: []
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
setFormData,
|
setFormData,
|
||||||
|
|
|
@ -1,24 +1,38 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form
|
<el-form class="mb-[-16px]" :model="queryParams" label-width="120px">
|
||||||
class="mb-[-16px]"
|
<el-row>
|
||||||
:model="queryParams"
|
<el-col :span="6">
|
||||||
inline
|
<el-form-item label="商户分类" prop="category_id">
|
||||||
>
|
<el-select v-model="queryParams.category_id" clearable placeholder="请选择店铺类型">
|
||||||
<el-form-item label="商户分类 id" prop="category_id">
|
<el-option v-for="(item, index) in dictData.mer_category_type" :key="index"
|
||||||
<el-input class="w-[280px]" v-model="queryParams.category_id" clearable placeholder="请输入商户分类 id" />
|
:label="item.name" :value="parseInt(item.value)" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
<el-form-item label="店铺类型 id" prop="type_id">
|
</el-form-item>
|
||||||
<el-input class="w-[280px]" v-model="queryParams.type_id" clearable placeholder="请输入店铺类型 id" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="6">
|
||||||
<el-form-item label="商户名称" prop="mer_name">
|
<el-form-item label="店铺类型" prop="type_id">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.mer_name" clearable placeholder="请输入商户名称" />
|
<el-select v-model="queryParams.type_id" clearable placeholder="请选择店铺类型">
|
||||||
</el-form-item>
|
<el-option v-for="(item, index) in dictData.merchat_type" :key="index" :label="item.name"
|
||||||
<el-form-item>
|
:value="parseInt(item.value)" />
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
</el-select>
|
||||||
<el-button @click="resetParams">重置</el-button>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="商户名称" prop="mer_name">
|
||||||
|
<el-input v-model="queryParams.mer_name" clearable placeholder="请输入商户名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
|
<el-button @click="resetParams">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
|
@ -28,51 +42,48 @@
|
||||||
</template>
|
</template>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['supplier.supplier/delete']" :disabled="!selectData.length"
|
||||||
v-perms="['supplier.supplier/delete']"
|
@click="handleDelete(selectData)">
|
||||||
:disabled="!selectData.length"
|
|
||||||
@click="handleDelete(selectData)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="商户分类 id" prop="category_id" show-overflow-tooltip />
|
<el-table-column label="商户分类" prop="category_id" show-overflow-tooltip>
|
||||||
<el-table-column label="店铺类型 id" prop="type_id" show-overflow-tooltip />
|
<template #default="{ row }">
|
||||||
|
<dict-value :options="dictData.mer_category_type" :value="row.category_id" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="店铺类型" prop="type_id" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<dict-value :options="dictData.merchat_type" :value="row.type_id" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="商户名称" prop="mer_name" show-overflow-tooltip />
|
<el-table-column label="商户名称" prop="mer_name" show-overflow-tooltip />
|
||||||
<el-table-column label="结算周期,单位天" prop="settle_cycle" show-overflow-tooltip />
|
<el-table-column label="结算周期(天)" prop="settle_cycle" show-overflow-tooltip />
|
||||||
<el-table-column label="利率" prop="interest_rate" show-overflow-tooltip />
|
<el-table-column label="利率" prop="interest_rate" show-overflow-tooltip />
|
||||||
<el-table-column label="标签" prop="sys_labels" show-overflow-tooltip />
|
<el-table-column label="标签" prop="sys_labels" show-overflow-tooltip />
|
||||||
<el-table-column label="商户地址" prop="mer_address" show-overflow-tooltip />
|
<el-table-column label="商户地址" prop="mer_address" show-overflow-tooltip />
|
||||||
<el-table-column label="商户是否禁用0锁定,1正常" prop="status">
|
<el-table-column label="商户是否禁用" prop="status">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.show_status" :value="row.status" />
|
<dict-value :options="dictData.show_status" :value="row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="提成比例" prop="commission_rate" show-overflow-tooltip />
|
<el-table-column label="提成比例" prop="commission_rate" show-overflow-tooltip />
|
||||||
<el-table-column label="商户手续费单独设置 0 关闭 1 开启" prop="commission_switch">
|
<el-table-column label="商户手续费单独设置" width="200" prop="commission_switch">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.show_status" :value="row.commission_switch" />
|
<!-- <dict-value :options="dictData.show_status" :value="row.commission_switch" /> -->
|
||||||
|
{{ row.commission_switch ? "开启" : "关闭" }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商户余额" prop="mer_money" show-overflow-tooltip />
|
<el-table-column label="商户余额" prop="mer_money" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
<el-table-column label="操作" width="120" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button v-perms="['supplier.supplier/edit']" type="primary" link @click="handleEdit(row)">
|
||||||
v-perms="['supplier.supplier/edit']"
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
@click="handleEdit(row)"
|
|
||||||
>
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['supplier.supplier/delete']" type="danger" link
|
||||||
v-perms="['supplier.supplier/delete']"
|
@click="handleDelete(row.id)">
|
||||||
type="danger"
|
|
||||||
link
|
|
||||||
@click="handleDelete(row.id)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -116,7 +127,7 @@ const handleSelectionChange = (val: any[]) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取字典数据
|
// 获取字典数据
|
||||||
const { dictData } = useDictData('show_status')
|
const { dictData } = useDictData('show_status,mer_category_type,merchat_type')
|
||||||
|
|
||||||
// 分页相关
|
// 分页相关
|
||||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
|
|
@ -1,56 +1,43 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||||
ref="popupRef"
|
|
||||||
:title="popupTitle"
|
|
||||||
:async="true"
|
|
||||||
width="550px"
|
|
||||||
@confirm="handleSubmit"
|
|
||||||
@close="handleClose"
|
|
||||||
>
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||||
<el-form-item label="头像" prop="avatar">
|
<el-form-item label="头像" prop="avatar">
|
||||||
<el-input v-model="formData.avatar" clearable placeholder="请输入头像" :readonly="false"/>
|
<material-picker v-model="formData.avatar" />
|
||||||
|
<!-- <avaterUpload :formData="formData" value="avatar"></avaterUpload> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="真实姓名" prop="real_name">
|
<el-form-item label="真实姓名" prop="real_name">
|
||||||
<el-input v-model="formData.real_name" clearable placeholder="请输入真实姓名" :readonly="false"/>
|
<el-input v-model="formData.real_name" clearable placeholder="请输入真实姓名" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户昵称" prop="nickname">
|
<el-form-item label="用户昵称" prop="nickname">
|
||||||
<el-input v-model="formData.nickname" clearable placeholder="请输入用户昵称" :readonly="false"/>
|
<el-input v-model="formData.nickname" clearable placeholder="请输入用户昵称" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户账号" prop="account">
|
<el-form-item label="用户账号" prop="account">
|
||||||
<el-input v-model="formData.account" clearable placeholder="请输入用户账号" :readonly="false"/>
|
<el-input v-model="formData.account" clearable placeholder="请输入用户账号" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户密码" prop="password">
|
<el-form-item label="用户密码" prop="password">
|
||||||
<el-input v-model="formData.password" clearable placeholder="请输入用户密码" :readonly="false"/>
|
<el-input v-model="formData.password" clearable placeholder="请输入用户密码" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户电话" prop="mobile">
|
<el-form-item label="用户电话" prop="mobile">
|
||||||
<el-input v-model="formData.mobile" clearable placeholder="请输入用户电话" :readonly="false"/>
|
<el-input v-model="formData.mobile" clearable placeholder="请输入用户电话" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户性别" prop="sex">
|
<el-form-item label="用户性别" prop="sex">
|
||||||
<el-radio-group v-model="formData.sex" placeholder="请选择用户性别" :disabled="false">
|
<el-radio-group v-model="formData.sex" placeholder="请选择用户性别" :disabled="false">
|
||||||
<el-radio
|
<el-radio v-for="(item, index) in dictData.sex_type" :key="index" :label="parseInt(item.value)">
|
||||||
v-for="(item, index) in dictData.sex_type"
|
|
||||||
:key="index"
|
|
||||||
:label="parseInt(item.value)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否禁用" prop="is_disable">
|
<el-form-item label="是否禁用" prop="is_disable">
|
||||||
<el-radio-group v-model="formData.is_disable" placeholder="请选择是否禁用" :disabled="false">
|
<el-radio-group v-model="formData.is_disable" placeholder="请选择是否禁用" :disabled="false">
|
||||||
<el-radio
|
<el-radio v-for="(item, index) in dictData.system_disable" :key="index"
|
||||||
v-for="(item, index) in dictData.system_disable"
|
:label="parseInt(item.value)">
|
||||||
:key="index"
|
|
||||||
:label="parseInt(item.value)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户余额" prop="user_money">
|
<el-form-item label="用户余额" prop="user_money">
|
||||||
<el-input v-model="formData.user_money" clearable placeholder="请输入用户余额" :readonly="false"/>
|
<el-input v-model="formData.user_money" clearable placeholder="请输入用户余额" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
|
@ -148,7 +135,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
const data = { ...formData, }
|
const data = { ...formData, }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await apiUserEdit(data)
|
? await apiUserEdit(data)
|
||||||
: await apiUserAdd(data)
|
: await apiUserAdd(data)
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
class="mb-[-16px]"
|
|
||||||
:model="queryParams"
|
|
||||||
inline
|
|
||||||
>
|
|
||||||
<el-form-item label="用户昵称" prop="nickname">
|
<el-form-item label="用户昵称" prop="nickname">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.nickname" clearable placeholder="请输入用户昵称" />
|
<el-input class="w-[280px]" v-model="queryParams.nickname" clearable placeholder="请输入用户昵称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -16,15 +12,10 @@
|
||||||
<el-input class="w-[280px]" v-model="queryParams.mobile" clearable placeholder="请输入用户电话" />
|
<el-input class="w-[280px]" v-model="queryParams.mobile" clearable placeholder="请输入用户电话" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否禁用" prop="is_disable">
|
<el-form-item label="是否禁用" prop="is_disable">
|
||||||
<el-select class="w-[280px]"
|
<el-select class="w-[280px]" v-model="queryParams.is_disable" clearable placeholder="请选择是否禁用">
|
||||||
v-model="queryParams.is_disable" clearable placeholder="请选择是否禁用">
|
|
||||||
<el-option label="全部" value=""></el-option>
|
<el-option label="全部" value=""></el-option>
|
||||||
<el-option
|
<el-option v-for="(item, index) in dictData.system_disable" :key="index" :label="item.name"
|
||||||
v-for="(item, index) in dictData.system_disable"
|
:value="item.value" />
|
||||||
:key="index"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -40,20 +31,16 @@
|
||||||
</template>
|
</template>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['user.user/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||||
v-perms="['user.user/delete']"
|
|
||||||
:disabled="!selectData.length"
|
|
||||||
@click="handleDelete(selectData)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="主键" prop="id" show-overflow-tooltip />
|
<el-table-column label="主键" prop="id" show-overflow-tooltip />
|
||||||
<el-table-column label="头像" prop="avatar" show-overflow-tooltip >
|
<el-table-column label="头像" prop="avatar" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-image :src="row.avatar" style="width: 50px;height: 50px"/>
|
<el-image :src="row.avatar" style="width: 50px;height: 50px" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="真实姓名" prop="real_name" show-overflow-tooltip />
|
<el-table-column label="真实姓名" prop="real_name" show-overflow-tooltip />
|
||||||
|
@ -62,25 +49,15 @@
|
||||||
<el-table-column label="用户电话" prop="mobile" show-overflow-tooltip />
|
<el-table-column label="用户电话" prop="mobile" show-overflow-tooltip />
|
||||||
<el-table-column label="用户性别" prop="sex">
|
<el-table-column label="用户性别" prop="sex">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span>{{ row.sex==1?'男':'女' }}</span>
|
<span>{{ row.sex == 1 ? '男' : '女' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
<el-table-column label="操作" width="120" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button v-perms="['user.user/edit']" type="primary" link @click="handleEdit(row)">
|
||||||
v-perms="['user.user/edit']"
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
@click="handleEdit(row)"
|
|
||||||
>
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['user.user/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||||
v-perms="['user.user/delete']"
|
|
||||||
type="danger"
|
|
||||||
link
|
|
||||||
@click="handleDelete(row.id)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,82 +1,63 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup
|
<popup ref="popupRef" title="详情" :async="true" width="550px" :cancelButtonText="false" :confirmButtonText="false">
|
||||||
ref="popupRef"
|
|
||||||
title="详情"
|
|
||||||
:async="true"
|
|
||||||
width="550px"
|
|
||||||
:cancelButtonText="false"
|
|
||||||
:confirmButtonText="false"
|
|
||||||
>
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||||
<el-form-item label="所属商户" prop="merchant">
|
<el-form-item label="所属商户" prop="merchant">
|
||||||
<el-input v-model="formData.merchant" clearable placeholder="请输入所属商户" :readonly="true"/>
|
<el-input v-model="formData.merchant" clearable placeholder="请输入所属商户" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="归属门店" prop="store_id">
|
<el-form-item label="归属门店" prop="store_id">
|
||||||
<el-input v-model="formData.store_id" clearable placeholder="请输入归属门店" :readonly="true"/>
|
<el-input v-model="formData.store_id" clearable placeholder="请输入归属门店" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="客户ID" prop="customer">
|
<el-form-item label="客户ID" prop="customer">
|
||||||
<el-input v-model="formData.customer" clearable placeholder="请输入客户ID" :readonly="true"/>
|
<el-input v-model="formData.customer" clearable placeholder="请输入客户ID" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单据时间" prop="time">
|
<el-form-item label="单据时间" prop="time">
|
||||||
<el-input v-model="formData.time" clearable placeholder="请输入单据时间" :readonly="true"/>
|
<el-input v-model="formData.time" clearable placeholder="请输入单据时间" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单据编号" prop="number">
|
<el-form-item label="单据编号" prop="number">
|
||||||
<el-input v-model="formData.number" clearable placeholder="请输入单据编号" :readonly="true"/>
|
<el-input v-model="formData.number" clearable placeholder="请输入单据编号" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单据金额" prop="total">
|
<el-form-item label="单据金额" prop="total">
|
||||||
<el-input v-model="formData.total" clearable placeholder="请输入单据金额" :readonly="true"/>
|
<el-input v-model="formData.total" clearable placeholder="请输入单据金额" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="抵扣金额" prop="deduction_price">
|
<el-form-item label="抵扣金额" prop="deduction_price">
|
||||||
<el-input v-model="formData.deduction_price" clearable placeholder="请输入抵扣金额" :readonly="true"/>
|
<el-input v-model="formData.deduction_price" clearable placeholder="请输入抵扣金额" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="实际金额" prop="actual">
|
<el-form-item label="实际金额" prop="actual">
|
||||||
<el-input v-model="formData.actual" clearable placeholder="请输入实际金额" :readonly="true"/>
|
<el-input v-model="formData.actual" clearable placeholder="请输入实际金额" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="实收金额" prop="money">
|
<el-form-item label="实收金额" prop="money">
|
||||||
<el-input v-model="formData.money" clearable placeholder="请输入实收金额" :readonly="true"/>
|
<el-input v-model="formData.money" clearable placeholder="请输入实收金额" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" prop="pay_type">
|
<el-form-item label="支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" prop="pay_type">
|
||||||
<el-select class="flex-1" v-model="formData.pay_type" clearable placeholder="请选择支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" :disabled="true">
|
<el-select class="flex-1" v-model="formData.pay_type" clearable
|
||||||
<el-option
|
placeholder="请选择支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" :disabled="true">
|
||||||
v-for="(item, index) in dictData.pay_type"
|
<el-option v-for="(item, index) in dictData.pay_type" :key="index" :label="item.name"
|
||||||
:key="index"
|
:value="parseInt(item.value)" />
|
||||||
:label="item.name"
|
|
||||||
:value="parseInt(item.value)"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注信息" prop="data">
|
<el-form-item label="备注信息" prop="data">
|
||||||
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" :readonly="true"/>
|
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核状态[0:未审核|1:已审核]" prop="type">
|
<el-form-item label="审核状态[0:未审核|1:已审核]" prop="type">
|
||||||
<el-radio-group v-model="formData.type" placeholder="请选择审核状态[0:未审核|1:已审核]" :disabled="true">
|
<el-radio-group v-model="formData.type" placeholder="请选择审核状态[0:未审核|1:已审核]" :disabled="true">
|
||||||
<el-radio
|
<el-radio v-for="(item, index) in dictData.auditing_type" :key="index"
|
||||||
v-for="(item, index) in dictData.auditing_type"
|
:label="parseInt(item.value)">
|
||||||
:key="index"
|
|
||||||
:label="parseInt(item.value)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核人" prop="auditinguser">
|
<el-form-item label="审核人" prop="auditinguser">
|
||||||
<el-input v-model="formData.auditinguser" clearable placeholder="请输入审核人" :readonly="true"/>
|
<el-input v-model="formData.auditinguser" clearable placeholder="请输入审核人" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核时间" prop="auditingtime">
|
<el-form-item label="审核时间" prop="auditingtime">
|
||||||
<el-date-picker
|
<el-date-picker :readonly="true" class="flex-1 !flex" v-model="formData.auditingtime" clearable
|
||||||
:readonly="true"
|
type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择审核时间">
|
||||||
class="flex-1 !flex"
|
|
||||||
v-model="formData.auditingtime"
|
|
||||||
clearable
|
|
||||||
type="datetime"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
placeholder="选择审核时间">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="扩展信息" prop="more">
|
<el-form-item label="扩展信息" prop="more">
|
||||||
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" :readonly="true"/>
|
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
|
@ -134,7 +115,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
formData.auditingtime = timeFormat(formData.auditingtime,'yyyy-mm-dd hh:MM:ss')
|
formData.auditingtime = timeFormat(formData.auditingtime, 'yyyy-mm-dd hh:MM:ss')
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
const getDetail = async (row: Record<string, any>) => {
|
||||||
|
|
|
@ -1,83 +1,110 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose">
|
||||||
ref="popupRef"
|
|
||||||
:title="popupTitle"
|
|
||||||
:async="true"
|
|
||||||
width="550px"
|
|
||||||
@confirm="handleSubmit"
|
|
||||||
@close="handleClose"
|
|
||||||
>
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||||
<el-form-item label="所属商户" prop="merchant">
|
|
||||||
<el-input v-model="formData.merchant" clearable placeholder="请输入所属商户" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="归属门店" prop="store_id">
|
|
||||||
<el-input v-model="formData.store_id" clearable placeholder="请输入归属门店" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="客户ID" prop="customer">
|
|
||||||
<el-input v-model="formData.customer" clearable placeholder="请输入客户ID" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据时间" prop="time">
|
|
||||||
<el-input v-model="formData.time" clearable placeholder="请输入单据时间" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据编号" prop="number">
|
|
||||||
<el-input v-model="formData.number" clearable placeholder="请输入单据编号" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据金额" prop="total">
|
|
||||||
<el-input v-model="formData.total" clearable placeholder="请输入单据金额" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="抵扣金额" prop="deduction_price">
|
|
||||||
<el-input v-model="formData.deduction_price" clearable placeholder="请输入抵扣金额" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="实际金额" prop="actual">
|
|
||||||
<el-input v-model="formData.actual" clearable placeholder="请输入实际金额" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="实收金额" prop="money">
|
|
||||||
<el-input v-model="formData.money" clearable placeholder="请输入实收金额" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" prop="pay_type">
|
|
||||||
<el-select class="flex-1" v-model="formData.pay_type" clearable placeholder="请选择支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" :disabled="false">
|
|
||||||
<el-option
|
|
||||||
v-for="(item, index) in dictData.pay_type"
|
|
||||||
:key="index"
|
|
||||||
:label="item.name"
|
|
||||||
:value="parseInt(item.value)"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注信息" prop="data">
|
|
||||||
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="审核状态[0:未审核|1:已审核]" prop="type">
|
|
||||||
<el-radio-group v-model="formData.type" placeholder="请选择审核状态[0:未审核|1:已审核]" :disabled="false">
|
|
||||||
<el-radio
|
|
||||||
v-for="(item, index) in dictData.auditing_type"
|
|
||||||
:key="index"
|
|
||||||
:label="parseInt(item.value)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="审核人" prop="auditinguser">
|
|
||||||
<el-input v-model="formData.auditinguser" clearable placeholder="请输入审核人" :readonly="false"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="审核时间" prop="auditingtime">
|
|
||||||
<el-date-picker
|
|
||||||
:readonly="false"
|
|
||||||
class="flex-1 !flex"
|
|
||||||
v-model="formData.auditingtime"
|
|
||||||
clearable
|
|
||||||
type="datetime"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
placeholder="选择审核时间">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="扩展信息" prop="more">
|
<el-row>
|
||||||
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" :readonly="false"/>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="所属商户" prop="merchant">
|
||||||
|
<el-input v-model="formData.merchant" clearable placeholder="请输入所属商户" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="归属门店" prop="store_id">
|
||||||
|
<el-input v-model="formData.store_id" clearable placeholder="请输入归属门店" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="客户ID" prop="customer">
|
||||||
|
<el-input v-model="formData.customer" clearable placeholder="请输入客户ID" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="单据时间" prop="time">
|
||||||
|
<!-- <el-input v-model="formData.time" clearable placeholder="请输入单据时间" :readonly="false" /> -->
|
||||||
|
<el-date-picker :readonly="false" class="flex-1 !flex" v-model="formData.time" clearable
|
||||||
|
type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择单据时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="单据编号" prop="number">
|
||||||
|
<el-input v-model="formData.number" clearable placeholder="请输入单据编号" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="单据金额" prop="total">
|
||||||
|
<el-input v-model="formData.total" type="number" clearable placeholder="请输入单据金额"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="抵扣金额" prop="deduction_price">
|
||||||
|
<el-input v-model="formData.deduction_price" clearable placeholder="请输入抵扣金额"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="实际金额" prop="actual">
|
||||||
|
<el-input v-model="formData.actual" type="number" clearable placeholder="请输入实际金额"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="实收金额" prop="money">
|
||||||
|
<el-input v-model="formData.money" type="number" clearable placeholder="请输入实收金额"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="支付方式 " prop="pay_type">
|
||||||
|
<el-select class="flex-1" v-model="formData.pay_type" clearable placeholder="请选择支付方式"
|
||||||
|
:disabled="false">
|
||||||
|
<el-option v-for="(item, index) in dictData.pay_type" :key="index" :label="item.name"
|
||||||
|
:value="parseInt(item.value)" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="备注信息" prop="data">
|
||||||
|
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" type="textarea"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="审核状态" prop="type">
|
||||||
|
<el-radio-group v-model="formData.type" placeholder="请选择审核状态" :disabled="false">
|
||||||
|
<el-radio v-for="(item, index) in dictData.auditing_type" :key="index"
|
||||||
|
:label="parseInt(item.value)">
|
||||||
|
{{ item.name }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="审核人" prop="auditinguser">
|
||||||
|
<el-input v-model="formData.auditinguser" clearable placeholder="请输入审核人" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="审核时间" prop="auditingtime">
|
||||||
|
<el-date-picker :readonly="false" class="flex-1 !flex" v-model="formData.auditingtime" clearable
|
||||||
|
type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择审核时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="扩展信息" prop="more">
|
||||||
|
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" type="textarea"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
</div>
|
</div>
|
||||||
|
@ -182,7 +209,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
formData.auditingtime = timeFormat(formData.auditingtime,'yyyy-mm-dd hh:MM:ss')
|
formData.auditingtime = timeFormat(formData.auditingtime, 'yyyy-mm-dd hh:MM:ss')
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
const getDetail = async (row: Record<string, any>) => {
|
||||||
|
@ -196,7 +223,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
const data = { ...formData, }
|
const data = { ...formData, }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await apiCashierclassEdit(data)
|
? await apiCashierclassEdit(data)
|
||||||
: await apiCashierclassAdd(data)
|
: await apiCashierclassAdd(data)
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
class="mb-[-16px]"
|
|
||||||
:model="queryParams"
|
|
||||||
inline
|
|
||||||
>
|
|
||||||
<el-form-item label="所属商户" prop="merchant">
|
<el-form-item label="所属商户" prop="merchant">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.merchant" clearable placeholder="请输入所属商户" />
|
<el-input class="w-[280px]" v-model="queryParams.merchant" clearable placeholder="请输入所属商户" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -25,27 +21,17 @@
|
||||||
<el-input class="w-[280px]" v-model="queryParams.user" clearable placeholder="请输入制单人" />
|
<el-input class="w-[280px]" v-model="queryParams.user" clearable placeholder="请输入制单人" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="支付方式" prop="pay_type" tips=" 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账">
|
<el-form-item label="支付方式" prop="pay_type" tips=" 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账">
|
||||||
<el-select class="w-[280px]"
|
<el-select class="w-[280px]" v-model="queryParams.pay_type" clearable placeholder="请选择支付方式">
|
||||||
v-model="queryParams.pay_type" clearable placeholder="请选择支付方式">
|
|
||||||
<el-option label="全部" value=""></el-option>
|
<el-option label="全部" value=""></el-option>
|
||||||
<el-option
|
<el-option v-for="(item, index) in dictData.pay_type" :key="index" :label="item.name"
|
||||||
v-for="(item, index) in dictData.pay_type"
|
:value="item.value" />
|
||||||
:key="index"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核状态" prop="type">
|
<el-form-item label="审核状态" prop="type">
|
||||||
<el-select class="w-[280px]"
|
<el-select class="w-[280px]" v-model="queryParams.type" clearable placeholder="请选择审核状态">
|
||||||
v-model="queryParams.type" clearable placeholder="请选择审核状态">
|
|
||||||
<el-option label="全部" value=""></el-option>
|
<el-option label="全部" value=""></el-option>
|
||||||
<el-option
|
<el-option v-for="(item, index) in dictData.auditing_type" :key="index" :label="item.name"
|
||||||
v-for="(item, index) in dictData.auditing_type"
|
:value="item.value" />
|
||||||
:key="index"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核人" prop="auditinguser">
|
<el-form-item label="审核人" prop="auditinguser">
|
||||||
|
@ -64,11 +50,8 @@
|
||||||
</template>
|
</template>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['retail.cashierclass/delete']" :disabled="!selectData.length"
|
||||||
v-perms="['retail.cashierclass/delete']"
|
@click="handleDelete(selectData)">
|
||||||
:disabled="!selectData.length"
|
|
||||||
@click="handleDelete(selectData)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
|
@ -98,27 +81,22 @@
|
||||||
<el-table-column label="审核人" prop="auditinguser" show-overflow-tooltip />
|
<el-table-column label="审核人" prop="auditinguser" show-overflow-tooltip />
|
||||||
<el-table-column label="审核时间" prop="auditingtime">
|
<el-table-column label="审核时间" prop="auditingtime">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span>{{ row.auditingtime ? timeFormat(row.auditingtime, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
<span>{{ row.auditingtime ? timeFormat(row.auditingtime, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button v-perms="['retail.cashierclass/edit']" type="primary" link @click="handleEdit(row)">
|
||||||
v-perms="['retail.cashierclass/edit']"
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
@click="handleEdit(row)"
|
|
||||||
>
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['retail.cashierclass/delete']" type="danger" link
|
||||||
v-perms="['retail.cashierclass/delete']"
|
@click="handleDelete(row.id)">
|
||||||
type="danger"
|
|
||||||
link
|
|
||||||
@click="handleDelete(row.id)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-perms="['retail.cashierclass/edit']" type="primary" link
|
||||||
|
@click="handleDetail(row)">
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -128,6 +106,8 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
|
<detail-popup v-if="showDetail" ref="detailRef" :dict-data="dictData" @success="getLists"
|
||||||
|
@close="showDetail = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -138,10 +118,13 @@ import { apiCashierclassLists, apiCashierclassDelete } from '@/api/cashierclass'
|
||||||
import { timeFormat } from '@/utils/util'
|
import { timeFormat } from '@/utils/util'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
|
import DetailPopup from './details.vue'
|
||||||
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
|
const showDetail = ref(false)
|
||||||
|
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
|
@ -189,6 +172,14 @@ const handleEdit = async (data: any) => {
|
||||||
editRef.value?.setFormData(data)
|
editRef.value?.setFormData(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
const handleDetail = async (data: any) => {
|
||||||
|
showDetail.value = true
|
||||||
|
await nextTick()
|
||||||
|
detailRef.value?.open('edit')
|
||||||
|
detailRef.value?.setFormData(data)
|
||||||
|
}
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const handleDelete = async (id: number | any[]) => {
|
const handleDelete = async (id: number | any[]) => {
|
||||||
await feedback.confirm('确定要删除?')
|
await feedback.confirm('确定要删除?')
|
||||||
|
|
|
@ -14,7 +14,8 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: '/admin/',
|
base: '/admin/',
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0'
|
host: '0.0.0.0',
|
||||||
|
open:true
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
|
|
Loading…
Reference in New Issue