feat 添加客户登录逻辑1.0
This commit is contained in:
parent
dd3b354f4d
commit
3a2a7379bf
46
src/api/business/Custom/CustomerAddresses/customeraddress.js
Normal file
46
src/api/business/Custom/CustomerAddresses/customeraddress.js
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Descripttion: 客户收货地址Api接口
|
||||||
|
* @version: (1.0)
|
||||||
|
* @Author: (admin)
|
||||||
|
* @Date: (2023-06-05)
|
||||||
|
* @LastEditors: (admin)
|
||||||
|
* @LastEditTime: (2023-06-05)
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 客户收货地址分页查询列表
|
||||||
|
export function customerAddressList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/business/CustomerAddress/getCustomerAddressList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 客户收货地址新增或修改
|
||||||
|
export function addOrUpdateCustomerAddress(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/CustomerAddress/addOrUpdateCustomerAddress',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 客户收货地址删除
|
||||||
|
export function delCustomerAddress(ids) {
|
||||||
|
return request({
|
||||||
|
url: '/business/CustomerAddress/'+ ids,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 客户收货地址导出
|
||||||
|
export function exportCustomerAddress(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/CustomerAddress/exportCustomerAddress',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,172 @@
|
|||||||
|
<!--
|
||||||
|
* @Descripttion: (客户收货地址/tb_customer_address 添加弹窗)
|
||||||
|
* @version: (1.0)
|
||||||
|
* @Author: (admin)
|
||||||
|
* @Date: (2023-06-05)
|
||||||
|
* @LastEditors: (admin)
|
||||||
|
* @LastEditTime: (2023-06-05)
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="props.modelValue" title="添加客户收货地址信息" width="900px" @closed="closeDialog" @open="openDialog">
|
||||||
|
<el-form ref="formRef" :model="formData" :rules="rules">
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="客户" prop="customerNickname">
|
||||||
|
<el-input v-model='formData.customerNickname' disabled type="text" placeholder='点击选择客户'>
|
||||||
|
<template #append>
|
||||||
|
<div @click="handleChooseCustomer">选择</div>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="所在地区" prop="customerAddressAreaId">
|
||||||
|
<el-cascader class="w100" :options="dataList"
|
||||||
|
:props="{ checkStrictly: false, value: 'regionId', label: 'regionName', emitPath: true }"
|
||||||
|
placeholder="请选择所在地区" clearable v-model="formData.customerAddressAreaId" @change="handleCascaderChange">
|
||||||
|
<template #default="{ node, data }">
|
||||||
|
<span>{{ data.regionName }}</span>
|
||||||
|
<!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
|
||||||
|
</template>
|
||||||
|
</el-cascader>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="收货人名称" prop="customerAddressName">
|
||||||
|
<el-input v-model="formData.customerAddressName" placeholder="请输入收货人名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="收货电话" prop="customerAddressPhone">
|
||||||
|
<el-input v-model="formData.customerAddressPhone" placeholder="请输入收货电话" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="24">
|
||||||
|
<el-form-item :label-width="labelWidth" label="详细地址" prop="customerAddressDetailed">
|
||||||
|
<el-input v-model="formData.customerAddressDetailed" type="textarea" :rows="8" placeholder="请输入详细地址" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<div key="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleAddClick(formRef)">添加</el-button>
|
||||||
|
<el-button @click="handleResetClick(formRef)">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 选择客户 -->
|
||||||
|
<ChooseCustomerDialog v-model="ChooseCustomerDialogVisible" :data="ChooseCustomerDialogRow"></ChooseCustomerDialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, ref, watch } from "vue";
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import modal from '@/plugins/modal.js'
|
||||||
|
import { addOrUpdateCustomerAddress } from '@/api/business/Custom/CustomerAddresses/customerAddress.js';
|
||||||
|
import { regionTreeList } from '@/api/business/Custom/Regions/region.js';
|
||||||
|
import ChooseCustomerDialog from './ChooseCustomerDialog.vue';
|
||||||
|
|
||||||
|
|
||||||
|
// 打开弹窗时回调
|
||||||
|
const openDialog = async () => {
|
||||||
|
await getTreeList()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// -业务参数
|
||||||
|
const dataList = ref([])
|
||||||
|
const ChooseCustomerDialogVisible = ref(false);
|
||||||
|
const ChooseCustomerDialogRow = ref({});
|
||||||
|
|
||||||
|
|
||||||
|
// -业务方法
|
||||||
|
|
||||||
|
// 获取省市区数据
|
||||||
|
async function getTreeList() {
|
||||||
|
regionTreeList().then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
dataList.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开选择客户弹窗
|
||||||
|
const handleChooseCustomer = () => {
|
||||||
|
ChooseCustomerDialogVisible.value = true
|
||||||
|
ChooseCustomerDialogRow.value = formData
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理所在地区,省市区传值
|
||||||
|
function handleCascaderChange(selectedValues) {
|
||||||
|
formData.customerAddressProvinceId = selectedValues[0]
|
||||||
|
formData.customerAddressCityId = selectedValues[1]
|
||||||
|
formData.customerAddressAreaId = selectedValues[2]
|
||||||
|
console.log(formData, '表单');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// -基础参数
|
||||||
|
const labelWidth = 100;
|
||||||
|
const formRef = ref();
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
|
const emits = defineEmits(["update:modelValue"]);
|
||||||
|
const formData = reactive({
|
||||||
|
});
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: Boolean,
|
||||||
|
done: Function,
|
||||||
|
});
|
||||||
|
const imgData = ref({
|
||||||
|
fileDir: "CustomerAddress"
|
||||||
|
})
|
||||||
|
|
||||||
|
// 验证
|
||||||
|
const rules = reactive({
|
||||||
|
customerNickname: [{ required: true, message: "客户不能为空", trigger: "blur" }],
|
||||||
|
customerAddressAreaId: [{ required: true, message: "所在地区不能为空", trigger: "blur" }],
|
||||||
|
customerAddressName: [{ required: true, message: "收货人名称不能为空", trigger: "blur" }],
|
||||||
|
customerAddressPhone: [{ required: true, message: "收货电话不能为空", trigger: "blur" }],
|
||||||
|
customerAddressDetailed: [{ required: true, message: "详细地址不能为空", trigger: "blur" }],
|
||||||
|
});
|
||||||
|
|
||||||
|
// -基础方法
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
const handleAddClick = async (formEl) => {
|
||||||
|
if (!formEl) return;
|
||||||
|
formEl.validate(async (valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const { code } = await addOrUpdateCustomerAddress(formData);
|
||||||
|
if (code == 200) {
|
||||||
|
modal.msgSuccess('添加成功')
|
||||||
|
closeDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const closeDialog = () => {
|
||||||
|
formData.customerNickname = ""
|
||||||
|
handleResetClick(formRef.value);
|
||||||
|
props.done();
|
||||||
|
emits("update:modelValue", false);
|
||||||
|
};
|
||||||
|
const handleResetClick = async (formEl) => {
|
||||||
|
if (!formEl) return;
|
||||||
|
formEl.resetFields();
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,117 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="props.modelValue" title="选择客户" width="900px" @closed="closeDialog" @open="openDialog">
|
||||||
|
|
||||||
|
<el-form inline :model="queryParams">
|
||||||
|
<el-form-item label="客户名称">
|
||||||
|
<el-input v-model='queryParams.customerNickname' placeholder='请输入客户名称'></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="tableRef.reload()" icon="ElIconSearch">
|
||||||
|
搜索
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<!-- 表格渲染 prop="对应的字段"-->
|
||||||
|
<el-table v-loading="loading" :data="customersList" ref="tableRef" border highlight-current-row
|
||||||
|
@row-click="handleRowClick">
|
||||||
|
<el-table-column prop="customerNickname" label="客户名称" align="left" :show-overflow-tooltip="true" />
|
||||||
|
</el-table>
|
||||||
|
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getCustomerListFun" />
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleEditClick()">添加</el-button>
|
||||||
|
<el-button @click="handleResetClick()">重置</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, ref, watch, nextTick } from 'vue';
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { customerList } from '@/api/business/Custom/Customers/customer.js'
|
||||||
|
|
||||||
|
// 业务参数
|
||||||
|
const total = ref(0)
|
||||||
|
const loading = ref(false)
|
||||||
|
|
||||||
|
// 基础参数
|
||||||
|
const tableRef = ref(null);
|
||||||
|
// 查询参数
|
||||||
|
const queryParams = reactive({
|
||||||
|
customerNickname: "",
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10
|
||||||
|
});
|
||||||
|
|
||||||
|
const emits = defineEmits(['update:modelValue']);
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: Boolean,
|
||||||
|
data: Object,
|
||||||
|
});
|
||||||
|
const formData = ref({
|
||||||
|
...props.data
|
||||||
|
});
|
||||||
|
|
||||||
|
let customersList = ref([]);
|
||||||
|
// 打开窗口时运行
|
||||||
|
const openDialog = async () => {
|
||||||
|
await getCustomerListFun()
|
||||||
|
}
|
||||||
|
|
||||||
|
const getCustomerListFun = async () => {
|
||||||
|
loading.value = true
|
||||||
|
await customerList(queryParams).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
customersList.value = res.data.result
|
||||||
|
total.value = res.totalNum
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(props, (v) => {
|
||||||
|
formData.value = v.data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// -业务方法
|
||||||
|
let customerNickname = ref("");
|
||||||
|
let customerGuid = ref("");
|
||||||
|
|
||||||
|
|
||||||
|
// -基础方法
|
||||||
|
|
||||||
|
// 点击行
|
||||||
|
const handleRowClick = (row) => {
|
||||||
|
customerNickname.value = row.customerNickname
|
||||||
|
customerGuid.value = row.customerGuid
|
||||||
|
}
|
||||||
|
|
||||||
|
const closeDialog = () => {
|
||||||
|
customerNickname.value = ""
|
||||||
|
emits('update:modelValue', false);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
const handleEditClick = async () => {
|
||||||
|
if (customerNickname.value !== "") {
|
||||||
|
|
||||||
|
formData.value.customerNickname = customerNickname.value
|
||||||
|
formData.value.customerAddressCustomerGuid = customerGuid.value
|
||||||
|
if (formData.value.customerNickname != null) {
|
||||||
|
closeDialog();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ElMessage.error("请选择客户")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleResetClick = async formEl => {
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,124 @@
|
|||||||
|
<!--
|
||||||
|
* @Descripttion: (客户收货地址/tb_customer_address 详情弹窗)
|
||||||
|
* @version: (1.0)
|
||||||
|
* @Author: (admin)
|
||||||
|
* @Date: (2023-06-05)
|
||||||
|
* @LastEditors: (admin)
|
||||||
|
* @LastEditTime: (2023-06-05)
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="props.modelValue" title="客户收货地址信息详情" width="900px" @closed="closeDialog" @open="openDialog">
|
||||||
|
<el-form ref="formRef" :model="formData" :disabled="true">
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="客户" prop="customerNickname">
|
||||||
|
<div>{{ formData.customerName }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="所在地区" prop="region">
|
||||||
|
<el-cascader class="w100" :options="dataList"
|
||||||
|
:props="{ checkStrictly: false, value: 'regionId', label: 'regionName', emitPath: true }"
|
||||||
|
clearable v-model="region[2]" @change="handleCascaderChange">
|
||||||
|
<template #default="{ node, data }">
|
||||||
|
<span>{{ data.regionName }}</span>
|
||||||
|
<!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
|
||||||
|
</template>
|
||||||
|
</el-cascader>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20">
|
||||||
|
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="收货人名称" prop="customerAddressName">
|
||||||
|
<el-input v-model="formData.customerAddressName" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="收货电话" prop="customerAddressPhone">
|
||||||
|
<el-input v-model="formData.customerAddressPhone" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :lg="24">
|
||||||
|
<el-form-item :label-width="labelWidth" label="详细地址" prop="customerAddressDetailed">
|
||||||
|
<el-input v-model="formData.customerAddressDetailed" type="textarea" :rows="5" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { reactive, ref, watch } from "vue";
|
||||||
|
import { regionTreeList } from '@/api/business/Custom/Regions/region.js';
|
||||||
|
|
||||||
|
|
||||||
|
// 打开弹窗时回调
|
||||||
|
const openDialog = async () => {
|
||||||
|
await getTreeList()
|
||||||
|
|
||||||
|
region.value.push(formData.value.customerAddressProvinceId)
|
||||||
|
region.value.push(formData.value.customerAddressCityId)
|
||||||
|
region.value.push(formData.value.customerAddressAreaId)
|
||||||
|
}
|
||||||
|
|
||||||
|
const formData = ref({
|
||||||
|
...props.data,
|
||||||
|
});
|
||||||
|
watch(props, async (v) => {
|
||||||
|
formData.value = v.data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// -业务参数
|
||||||
|
const region = ref([])
|
||||||
|
const dataList = ref([])
|
||||||
|
|
||||||
|
// -业务方法
|
||||||
|
|
||||||
|
// 获取省市区数据
|
||||||
|
async function getTreeList() {
|
||||||
|
regionTreeList().then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
dataList.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理所在地区,省市区传值
|
||||||
|
function handleCascaderChange(selectedValues) {
|
||||||
|
formData.value.customerAddressProvinceId = selectedValues[0]
|
||||||
|
formData.value.customerAddressCityId = selectedValues[1]
|
||||||
|
formData.value.customerAddressAreaId = selectedValues[2]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 基础参数
|
||||||
|
const formRef = ref();
|
||||||
|
const labelWidth = 100;
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: Boolean,
|
||||||
|
data: Object,
|
||||||
|
done: Function,
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:modelValue"]);
|
||||||
|
|
||||||
|
|
||||||
|
// -基础方法
|
||||||
|
const closeDialog = () => {
|
||||||
|
emits("update:modelValue", false);
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
@ -0,0 +1,170 @@
|
|||||||
|
<!--
|
||||||
|
* @Descripttion: (客户收货地址/tb_customer_address 编辑弹窗)
|
||||||
|
* @version: (1.0)
|
||||||
|
* @Author: (admin)
|
||||||
|
* @Date: (2023-06-05)
|
||||||
|
* @LastEditors: (admin)
|
||||||
|
* @LastEditTime: (2023-06-05)
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="props.modelValue" title="修改客户收货地址信息" width="900px" @closed="closeDialog" @open="openDialog">
|
||||||
|
<el-form ref="formRef" :model="formData" :rules="rules">
|
||||||
|
<el-row>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="客户">
|
||||||
|
<div>{{ formData.customerName }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="所在地区" prop="customerAddressAreaId">
|
||||||
|
<el-cascader class="w100" :options="dataList"
|
||||||
|
:props="{ checkStrictly: false, value: 'regionId', label: 'regionName', emitPath: true }"
|
||||||
|
placeholder="请选择所在地区" clearable v-model="region[2]" @change="handleCascaderChange">
|
||||||
|
<template #default="{ node, data }">
|
||||||
|
<span>{{ data.regionName }}</span>
|
||||||
|
<!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
|
||||||
|
</template>
|
||||||
|
</el-cascader>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20">
|
||||||
|
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="收货人名称" prop="customerAddressName">
|
||||||
|
<el-input v-model="formData.customerAddressName" placeholder="请输入收货人名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-form-item :label-width="labelWidth" label="收货电话" prop="customerAddressPhone">
|
||||||
|
<el-input v-model="formData.customerAddressPhone" placeholder="请输入收货电话" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :lg="24">
|
||||||
|
<el-form-item :label-width="labelWidth" label="详细地址" prop="customerAddressDetailed">
|
||||||
|
<el-input v-model="formData.customerAddressDetailed" type="textarea" :rows="5" placeholder="请输入详细地址" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleEditClick(formRef)">编辑</el-button>
|
||||||
|
<el-button @click="handleResetClick(formRef)">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import modal from '@/plugins/modal.js'
|
||||||
|
import { reactive, ref, watch } from "vue";
|
||||||
|
import { addOrUpdateCustomerAddress } from "@/api/business/Custom/CustomerAddresses/customerAddress.js";
|
||||||
|
import { regionTreeList } from '@/api/business/Custom/Regions/region.js';
|
||||||
|
|
||||||
|
|
||||||
|
// 打开弹窗时回调
|
||||||
|
const openDialog = async () => {
|
||||||
|
await getTreeList()
|
||||||
|
|
||||||
|
region.value.push(formData.value.customerAddressProvinceId)
|
||||||
|
region.value.push(formData.value.customerAddressCityId)
|
||||||
|
region.value.push(formData.value.customerAddressAreaId)
|
||||||
|
}
|
||||||
|
|
||||||
|
const formData = ref({
|
||||||
|
...props.data,
|
||||||
|
});
|
||||||
|
watch(props, async (v) => {
|
||||||
|
formData.value = v.data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 业务参数
|
||||||
|
const region = ref([])
|
||||||
|
const dataList = ref([])
|
||||||
|
|
||||||
|
|
||||||
|
// -业务方法
|
||||||
|
|
||||||
|
// 获取省市区数据
|
||||||
|
async function getTreeList() {
|
||||||
|
regionTreeList().then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
dataList.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理所在地区,省市区传值
|
||||||
|
function handleCascaderChange(selectedValues) {
|
||||||
|
formData.value.customerAddressProvinceId = selectedValues[0]
|
||||||
|
formData.value.customerAddressCityId = selectedValues[1]
|
||||||
|
formData.value.customerAddressAreaId = selectedValues[2]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// -基础参数
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: Boolean,
|
||||||
|
data: Object,
|
||||||
|
done: Function,
|
||||||
|
});
|
||||||
|
|
||||||
|
const labelWidth = 100;
|
||||||
|
const formRef = ref();
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
|
const emits = defineEmits(["update:modelValue"]);
|
||||||
|
const imgData = ref({
|
||||||
|
fileDir: "CustomerAddress"
|
||||||
|
})
|
||||||
|
|
||||||
|
// 验证
|
||||||
|
const rules = reactive({
|
||||||
|
customerAddressAreaId: [{ required: true, message: "所在地区不能为空", trigger: "blur" }],
|
||||||
|
customerAddressName: [{ required: true, message: "收货人名称不能为空", trigger: "blur" }],
|
||||||
|
customerAddressPhone: [{ required: true, message: "收货电话不能为空", trigger: "blur" }],
|
||||||
|
customerAddressDetailed: [{ required: true, message: "详细地址不能为空", trigger: "blur" }],
|
||||||
|
});
|
||||||
|
|
||||||
|
// -基础方法
|
||||||
|
// 提交
|
||||||
|
const handleEditClick = async (formEl) => {
|
||||||
|
if (!formEl) return;
|
||||||
|
formEl.validate(async (valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const { code } = await addOrUpdateCustomerAddress(formData.value);
|
||||||
|
if (code == 200) {
|
||||||
|
modal.msgSuccess('修改成功')
|
||||||
|
closeDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleResetClick = async (formEl) => {
|
||||||
|
if (!formEl) return;
|
||||||
|
formEl.resetFields();
|
||||||
|
}
|
||||||
|
const closeDialog = () => {
|
||||||
|
props.done();
|
||||||
|
emits("update:modelValue", false);
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
252
src/views/business/Custom/CustomerAddresses/index.vue
Normal file
252
src/views/business/Custom/CustomerAddresses/index.vue
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
<!--
|
||||||
|
* @Descripttion: (客户收货地址/tb_customer_address)
|
||||||
|
* @version: (1.0)
|
||||||
|
* @Author: (admin)
|
||||||
|
* @Date: (2023-06-05)
|
||||||
|
* @LastEditors: (admin)
|
||||||
|
* @LastEditTime: (2023-06-05)
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<!-- 搜索框 queryParams.需要搜索的字段 -->
|
||||||
|
<el-form :model="queryParams" label-position="left" style="margin:15px;" inline ref="queryForm" v-show="showSearch"
|
||||||
|
@submit.prevent>
|
||||||
|
<!-- <el-form-item label="所在地区">
|
||||||
|
<el-cascader class="w100" :options="dataTreeList"
|
||||||
|
:props="{ checkStrictly: true, value: 'regionId', label: 'regionName', emitPath: true }"
|
||||||
|
placeholder="请选择所在地区" clearable v-model="queryParams.customerAddress" @change="handleCascaderChange">
|
||||||
|
<template #default="{ data }">
|
||||||
|
<span>{{ data.regionName }}</span>
|
||||||
|
</template>
|
||||||
|
</el-cascader>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="收货人名称" prop="customerAddressName">
|
||||||
|
<el-input v-model="queryParams.customerAddressName" placeholder="请输入收货人名称" clearable
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="收货电话" prop="customerAddressPhone">
|
||||||
|
<el-input v-model="queryParams.customerAddressPhone" placeholder="请输入收货电话" clearable
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
|
||||||
|
<el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 工具按钮 -->
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" v-hasPermi="['business:customeraddress:addOrUpdateKey']" plain icon="plus"
|
||||||
|
@click="AddDialogVisible = true">
|
||||||
|
{{ $t('btn.add') }}
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" :disabled="multiple" v-hasPermi="['business:customeraddress:delete']" plain icon="delete"
|
||||||
|
@click="handleDelete">
|
||||||
|
{{ $t('btn.delete') }}
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="download" @click="handleExport"
|
||||||
|
v-hasPermi="['business:customeraddress:export']">
|
||||||
|
{{ $t('btn.export') }}
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格渲染 prop="对应的字段"-->
|
||||||
|
<el-table v-loading="loading" :data="dataList" ref="tableRef" border highlight-current-row
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
|
||||||
|
<el-table-column prop="customerName" label="客户" align="center" />
|
||||||
|
<el-table-column prop="customerAddress" label="所在地区" align="center" />
|
||||||
|
<el-table-column prop="customerAddressName" label="收货人名称" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="customerAddressPhone" label="收货电话" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="customerAddressDetailed" label="详细地址" align="center" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="350" fixed="right">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="primary" size="small" icon="edit" @click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['business:customeraddress:addOrUpdateKey']">编辑</el-button>
|
||||||
|
<el-button type="danger" size="small" icon="delete" @click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['business:customeraddress:delete']">删除</el-button>
|
||||||
|
<el-button size="small" icon="view" @click="handleDetail(scope.row)">查看</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 添加 -->
|
||||||
|
<AddDialog v-model="AddDialogVisible" :done="() => resetQuery()"></AddDialog>
|
||||||
|
<!-- 编辑 -->
|
||||||
|
<EditDialog v-model="EditDialogVisible" :data="EditDialogRow" :done="() => resetQuery()"></EditDialog>
|
||||||
|
<!-- 详情 -->
|
||||||
|
<DetailDialog v-model="DetailDialogVisible" :data="DetailDialogRow" :done="() => resetQuery()"></DetailDialog>
|
||||||
|
</template>
|
||||||
|
<script setup name="customeraddress">
|
||||||
|
import { ElMessageBox } from 'element-plus'
|
||||||
|
import modal from '@/plugins/modal.js'
|
||||||
|
import { exportCustomerAddress, customerAddressList, delCustomerAddress } from '@/api/business/Custom/CustomerAddresses/customerAddress.js'
|
||||||
|
import { regionTreeList } from '@/api/business/Custom/Regions/region.js';
|
||||||
|
import AddDialog from "./components/AddDialog.vue";
|
||||||
|
import EditDialog from "./components/EditDialog.vue";
|
||||||
|
import DetailDialog from "./components/DetailDialog.vue";
|
||||||
|
|
||||||
|
const AddDialogVisible = ref(false);
|
||||||
|
const EditDialogVisible = ref(false);
|
||||||
|
const EditDialogRow = ref({});
|
||||||
|
const DetailDialogVisible = ref(false);
|
||||||
|
const DetailDialogRow = ref({});
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
|
// 选中categoryId数组数组
|
||||||
|
const ids = ref([])
|
||||||
|
// 非单选禁用
|
||||||
|
const single = ref(true)
|
||||||
|
// 非多个禁用
|
||||||
|
const multiple = ref(true)
|
||||||
|
// 显示搜索条件
|
||||||
|
const showSearch = ref(true)
|
||||||
|
// 数据列表
|
||||||
|
const dataList = ref([])
|
||||||
|
// 总记录数
|
||||||
|
const total = ref(0)
|
||||||
|
// 是否加载
|
||||||
|
const loading = ref(true)
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
})
|
||||||
|
const { queryParams } = toRefs(data)
|
||||||
|
|
||||||
|
// 业务参数
|
||||||
|
const dataTreeList = ref([])
|
||||||
|
|
||||||
|
|
||||||
|
// 业务方法
|
||||||
|
|
||||||
|
// 获取省市区数据
|
||||||
|
async function getTreeList() {
|
||||||
|
regionTreeList().then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
dataTreeList.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理所在地区,省市区传值
|
||||||
|
function handleCascaderChange(selectedValues) {
|
||||||
|
console.log(selectedValues, '传参');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//基础方法
|
||||||
|
|
||||||
|
// 查询数据
|
||||||
|
function getList() {
|
||||||
|
loading.value = true
|
||||||
|
|
||||||
|
|
||||||
|
customerAddressList(queryParams.value).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
loading.value = false;
|
||||||
|
dataList.value = res.data.result;
|
||||||
|
total.value = res.data.totalNum;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 多选框选中数据
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
ids.value = selection.map((item) => item.customerAddressId)
|
||||||
|
single.value = selection.length != 1
|
||||||
|
multiple.value = !selection.length
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置查询操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
proxy.resetForm('queryForm')
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
getList()
|
||||||
|
// getTreeList()
|
||||||
|
}
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(row) {
|
||||||
|
const Ids = row.customerAddressId || ids.value
|
||||||
|
|
||||||
|
ElMessageBox.confirm("是否确认删除?", "系统提示", {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(function () {
|
||||||
|
return delCustomerAddress(Ids)
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
handleQuery()
|
||||||
|
modal.msgSuccess("删除成功")
|
||||||
|
})
|
||||||
|
.catch(() => { })
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
function handleExport(row) {
|
||||||
|
const Ids = row.customerAddressId || ids.value
|
||||||
|
const name = ref("所有")
|
||||||
|
|
||||||
|
if (Ids.length != 0) {
|
||||||
|
let str = ''
|
||||||
|
for (const key in Ids) {
|
||||||
|
str += Ids[key] + ','
|
||||||
|
}
|
||||||
|
str = str.slice(0, str.length - 1)
|
||||||
|
queryParams.value.ids = str
|
||||||
|
name.value = "选中"
|
||||||
|
}
|
||||||
|
|
||||||
|
ElMessageBox.confirm('是否确认导出' + name.value + '数据?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(function () {
|
||||||
|
return exportCustomerAddress(queryParams.value)
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
proxy.download(response.data.path)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
function handleUpdate(row) {
|
||||||
|
EditDialogVisible.value = true
|
||||||
|
EditDialogRow.value = row
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
function handleDetail(row) {
|
||||||
|
DetailDialogVisible.value = true
|
||||||
|
DetailDialogRow.value = row
|
||||||
|
}
|
||||||
|
|
||||||
|
handleQuery()
|
||||||
|
</script>
|
@ -10,7 +10,7 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<!-- 搜索框 queryParams.需要搜索的字段 -->
|
<!-- 搜索框 queryParams.需要搜索的字段 -->
|
||||||
<el-form :model="queryParams" label-position="left" style="margin:15px;" inline ref="queryForm" label-width="68px" v-show="showSearch"
|
<el-form :model="queryParams" label-position="left" style="margin:15px;" inline ref="queryForm" v-show="showSearch"
|
||||||
@submit.prevent>
|
@submit.prevent>
|
||||||
<el-form-item label="小程序openid" prop="customerXcxOpenid">
|
<el-form-item label="小程序openid" prop="customerXcxOpenid">
|
||||||
<el-input v-model="queryParams.customerXcxOpenid" placeholder="请输入小程序openid" clearable @keyup.enter="handleQuery"/>
|
<el-input v-model="queryParams.customerXcxOpenid" placeholder="请输入小程序openid" clearable @keyup.enter="handleQuery"/>
|
||||||
@ -44,16 +44,16 @@
|
|||||||
|
|
||||||
<!-- 工具按钮 -->
|
<!-- 工具按钮 -->
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" v-hasPermi="['business:customer:addOrUpdateKey']" plain icon="plus" @click="AddDialogVisible = true">
|
<el-button type="primary" v-hasPermi="['business:customer:addOrUpdateKey']" plain icon="plus" @click="AddDialogVisible = true">
|
||||||
{{ $t('btn.add') }}
|
{{ $t('btn.add') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="danger" :disabled="multiple" v-hasPermi="['business:customer:delete']" plain icon="delete" @click="handleDelete">
|
<el-button type="danger" :disabled="multiple" v-hasPermi="['business:customer:delete']" plain icon="delete" @click="handleDelete">
|
||||||
{{ $t('btn.delete') }}
|
{{ $t('btn.delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="download" @click="handleExport" v-hasPermi="['business:customer:export']">
|
<el-button type="warning" plain icon="download" @click="handleExport" v-hasPermi="['business:customer:export']">
|
||||||
{{ $t('btn.export') }}
|
{{ $t('btn.export') }}
|
||||||
@ -63,12 +63,9 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 表格渲染 prop="对应的字段"-->
|
<!-- 表格渲染 prop="对应的字段"-->
|
||||||
<el-table v-loading="loading" :data="dataList" ref="tableRef" border highlight-current-row @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="dataList" ref="tableRef" highlight-current-row @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
|
||||||
<el-table-column prop="customerXcxOpenid" label="小程序openid" align="center" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column prop="customerNickname" label="昵称" align="center" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column prop="customerMobilePhoneNumber" label="手机号" align="center" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column prop="customerAvatar" label="头像" align="center">
|
<el-table-column prop="customerAvatar" label="头像" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image preview-teleported :hide-on-click-modal="true" lazy class="table-td-thumb" fit="contain" :src="scope.row.customerAvatar.split(',')[0]" :preview-src-list="scope.row.customerAvatar.split(',')">
|
<el-image preview-teleported :hide-on-click-modal="true" lazy class="table-td-thumb" fit="contain" :src="scope.row.customerAvatar.split(',')[0]" :preview-src-list="scope.row.customerAvatar.split(',')">
|
||||||
@ -76,6 +73,9 @@
|
|||||||
</el-image>
|
</el-image>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="customerXcxOpenid" label="小程序openid" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="customerNickname" label="昵称" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="customerMobilePhoneNumber" label="手机号" align="center" :show-overflow-tooltip="true" />
|
||||||
<el-table-column prop="customerGender" label="性别(字典)" align="center">
|
<el-table-column prop="customerGender" label="性别(字典)" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options=" sys_user_sex " :value="scope.row.customerGender" />
|
<dict-tag :options=" sys_user_sex " :value="scope.row.customerGender" />
|
||||||
@ -85,14 +85,14 @@
|
|||||||
<el-table-column prop="customerAvailablePoints" label="可用积分" align="center" sortable />
|
<el-table-column prop="customerAvailablePoints" label="可用积分" align="center" sortable />
|
||||||
<el-table-column prop="customerTotalPaymentAmount" label="总支付金额" align="center" sortable />
|
<el-table-column prop="customerTotalPaymentAmount" label="总支付金额" align="center" sortable />
|
||||||
<el-table-column prop="customerActualConsumptionAmount" label="实际消费金额" align="center" sortable />
|
<el-table-column prop="customerActualConsumptionAmount" label="实际消费金额" align="center" sortable />
|
||||||
<el-table-column prop="customerLastLoginTime" label="最后登录时间" align="center" :show-overflow-tooltip="true" sortable />
|
<el-table-column prop="customerLastLoginTime" width="200" label="最后登录时间" align="center" :show-overflow-tooltip="true" sortable />
|
||||||
|
|
||||||
<el-table-column label="操作" width="350" fixed="right">
|
<el-table-column label="操作" width="250" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" size="small" icon="edit" @click="handleUpdate(scope.row)"
|
<el-button type="primary" size="small" icon="edit" @click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['business:customer:addOrUpdateKey']">编辑</el-button>
|
v-hasPermi="['business:customer:addOrUpdateKey']">编辑</el-button>
|
||||||
<el-button type="danger" size="small" icon="delete" @click="handleDelete(scope.row)"
|
<!-- <el-button type="danger" size="small" icon="delete" @click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['business:customer:delete']">删除</el-button>
|
v-hasPermi="['business:customer:delete']">删除</el-button> -->
|
||||||
<el-button size="small" icon="view" @click="handleDetail(scope.row)">查看</el-button>
|
<el-button size="small" icon="view" @click="handleDetail(scope.row)">查看</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -103,7 +103,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 添加 -->
|
<!-- 添加 -->
|
||||||
<AddDialog v-model="AddDialogVisible" :done="() => resetQuery()"></AddDialog>
|
<!-- <AddDialog v-model="AddDialogVisible" :done="() => resetQuery()"></AddDialog> -->
|
||||||
<!-- 编辑 -->
|
<!-- 编辑 -->
|
||||||
<EditDialog v-model="EditDialogVisible" :data="EditDialogRow" :done="() => resetQuery()"></EditDialog>
|
<EditDialog v-model="EditDialogVisible" :data="EditDialogRow" :done="() => resetQuery()"></EditDialog>
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
|
Loading…
Reference in New Issue
Block a user