feat: 电池回收 汽车回收 申请列表
This commit is contained in:
parent
ba1f0964d2
commit
1e6f8f2b3f
|
@ -8,9 +8,9 @@ class AuthAPI {
|
|||
/** 登录 接口*/
|
||||
static login(data: LoginData) {
|
||||
return request<any, LoginResult>({
|
||||
url: `/api/user/loginPhone`,
|
||||
method: "get",
|
||||
params: data,
|
||||
url: `/api/admin/login`,
|
||||
method: "post",
|
||||
data: { userName: data.phone, password: data.code },
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
import request from "@/utils/request";
|
||||
|
||||
class BatteryAPI {
|
||||
static queryPage(data: PageParams) {
|
||||
return request<any, PageResult<BatteryDTO[]>>({
|
||||
url: `/api/v1/batteryInquiry/findPage`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
static updateById(data: BatteryDTO) {
|
||||
return request({
|
||||
url: `/api/v1/batteryInquiry/updateById`,
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
static queryRegis(data: PageParams) {
|
||||
return request<any, PageResult<BatteryDTO[]>>({
|
||||
url: `/api/v1/batteryRegistration/findPage`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
static updateRegisById(data: BatteryDTO) {
|
||||
return request({
|
||||
url: `/api/v1/batteryRegistration/updateById`,
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default BatteryAPI;
|
||||
|
||||
export interface PageParams {
|
||||
inquiryNo?: string;
|
||||
contactInfo?: string;
|
||||
status?: number; // 1=已联系 0=待联系
|
||||
startTime?: string | null;
|
||||
endTime?: string | null;
|
||||
pageSize?: number;
|
||||
pageNum?: number;
|
||||
range?: string[];
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface BatteryDTO {
|
||||
id?: number;
|
||||
status?: number; // 1=已联系 0=待联系
|
||||
remarks?: string;
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
import request from "@/utils/request";
|
||||
|
||||
class SteelAPI {
|
||||
static queryRegis(data: PageParams) {
|
||||
return request<any, PageResult<SteelDTO[]>>({
|
||||
url: `/api/v1/trialApplication/findPage`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
static updateRegisById(data: SteelDTO) {
|
||||
return request({
|
||||
url: `/api/v1/trialApplication/updateById`,
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default SteelAPI;
|
||||
|
||||
export interface PageParams {
|
||||
inquiryNo?: string;
|
||||
contactInfo?: string;
|
||||
status?: number; // 1=已联系 0=待联系
|
||||
startTime?: string | null;
|
||||
endTime?: string | null;
|
||||
pageSize?: number;
|
||||
pageNum?: number;
|
||||
range?: string[];
|
||||
companyName?: string;
|
||||
}
|
||||
|
||||
export interface SteelDTO {
|
||||
id?: number;
|
||||
status?: number; // 1=已联系 0=待联系
|
||||
remarks?: string;
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
import request from "@/utils/request";
|
||||
|
||||
class VehicleAPI {
|
||||
static queryPage(data: PageParams) {
|
||||
return request<any, PageResult<VehicleDTO[]>>({
|
||||
url: `/api/v1/vehicleInfo/findPage`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
static updateById(data: VehicleDTO) {
|
||||
return request({
|
||||
url: `/api/v1/vehicleInfo/updateById`,
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
static queryRegis(data: PageParams) {
|
||||
return request<any, PageResult<VehicleDTO[]>>({
|
||||
url: `/api/v1/vehicleRegistration/findPage`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
static updateRegisById(data: VehicleDTO) {
|
||||
return request({
|
||||
url: `/api/v1/vehicleRegistration/updateById`,
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default VehicleAPI;
|
||||
|
||||
export interface PageParams {
|
||||
inquiryNo?: string;
|
||||
contactInfo?: string;
|
||||
status?: number; // 1=已联系 0=待联系
|
||||
startTime?: string | null;
|
||||
endTime?: string | null;
|
||||
pageSize?: number;
|
||||
pageNum?: number;
|
||||
range?: string[];
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface VehicleDTO {
|
||||
id?: number;
|
||||
status?: number; // 1=已联系 0=待联系
|
||||
remarks?: string;
|
||||
}
|
|
@ -50,9 +50,9 @@
|
|||
},
|
||||
"children": [
|
||||
{
|
||||
"path": "v-inquiry",
|
||||
"component": "self/vehicle/v-inquiry",
|
||||
"name": "v-inquiry",
|
||||
"path": "inquiry",
|
||||
"component": "self/vehicle/inquiry",
|
||||
"name": "inquiry",
|
||||
"meta": {
|
||||
"title": "询价管理",
|
||||
"icon": "",
|
||||
|
@ -62,9 +62,9 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "v-regis",
|
||||
"component": "self/vehicle/v-regis",
|
||||
"name": "v-regis",
|
||||
"path": "regis",
|
||||
"component": "self/vehicle/regis",
|
||||
"name": "regis",
|
||||
"meta": {
|
||||
"title": "登记列表",
|
||||
"icon": "",
|
||||
|
@ -88,9 +88,9 @@
|
|||
},
|
||||
"children": [
|
||||
{
|
||||
"path": "s-regis",
|
||||
"component": "self/steel/s-regis",
|
||||
"name": "s-regis",
|
||||
"path": "steel-regis",
|
||||
"component": "self/steel/steel-regis",
|
||||
"name": "steel-regis",
|
||||
"meta": {
|
||||
"title": "申请列表",
|
||||
"icon": "",
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
:src="userStore.user.avatar + '?imageView2/1/w/80/h/80'"
|
||||
class="rounded-full mr-10px w24px w24px"
|
||||
/> -->
|
||||
<!-- userStore.user.userInfo.name -->
|
||||
<!-- {{ userStore.user.userInfo.name }} -->
|
||||
<span>admin</span>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
|
|
|
@ -15,25 +15,20 @@ export function setupPermission() {
|
|||
router.beforeEach(async (to, from, next) => {
|
||||
NProgress.start();
|
||||
const hasToken = localStorage.getItem(TOKEN_KEY);
|
||||
|
||||
if (true) {
|
||||
if (to.path === "/login") {
|
||||
// 如果已登录,跳转到首页
|
||||
next({ path: "/" });
|
||||
NProgress.done();
|
||||
} else {
|
||||
debugger;
|
||||
// const userStore = useUserStore();
|
||||
|
||||
// await userStore.getUserInfo();
|
||||
const permissionStore = usePermissionStore();
|
||||
const dynamicRoutes = permissionStore.routes;
|
||||
const dynamicRoutes = await permissionStore.routes;
|
||||
dynamicRoutes.forEach((route: RouteRecordRaw) =>
|
||||
router.addRoute(route)
|
||||
);
|
||||
|
||||
next();
|
||||
|
||||
// const permissionStore = usePermissionStore();
|
||||
// if (permissionStore.routes.length === 0) {
|
||||
// const dynamicRoutes = await permissionStore.generateRoutes();
|
||||
// dynamicRoutes.forEach((route: RouteRecordRaw) =>
|
||||
|
|
|
@ -39,16 +39,16 @@ service.interceptors.request.use(
|
|||
if (accessToken) {
|
||||
config.headers["x-userToken"] = accessToken;
|
||||
}
|
||||
if (config.url && config.url.indexOf("/api/db/getCommonDbPhone") === -1) {
|
||||
const codeKey = localStorage.getItem(CODE_KEY);
|
||||
if (codeKey) {
|
||||
config.headers[CODE_KEY] = codeKey;
|
||||
}
|
||||
const codeName = localStorage.getItem(CODE_NAME);
|
||||
if (codeName) {
|
||||
config.headers[CODE_NAME] = codeName;
|
||||
}
|
||||
}
|
||||
// if (config.url && config.url.indexOf("/api/db/getCommonDbPhone") === -1) {
|
||||
// const codeKey = localStorage.getItem(CODE_KEY);
|
||||
// if (codeKey) {
|
||||
// config.headers[CODE_KEY] = codeKey;
|
||||
// }
|
||||
// const codeName = localStorage.getItem(CODE_NAME);
|
||||
// if (codeName) {
|
||||
// config.headers[CODE_NAME] = codeName;
|
||||
// }
|
||||
// }
|
||||
return config;
|
||||
},
|
||||
(error: any) => {
|
||||
|
|
|
@ -1,177 +1,13 @@
|
|||
<template>
|
||||
<div class="dashboard-container">
|
||||
<el-card shadow="never">
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="24" :xs="24">
|
||||
<div>
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item>
|
||||
<el-radio-group
|
||||
v-model="queryParams.type"
|
||||
@change="
|
||||
(v: any) => {
|
||||
handleChange(v);
|
||||
}
|
||||
"
|
||||
size="large"
|
||||
>
|
||||
<el-radio-button
|
||||
v-for="item in timeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-row :gutter="15">
|
||||
<el-col
|
||||
v-for="(item, index) in summaryList"
|
||||
:key="index"
|
||||
:span="6"
|
||||
v-hasPerm="[item.key]"
|
||||
>
|
||||
<el-card shadow="never">
|
||||
<div class="text-center">
|
||||
<div>{{ item.title }}</div>
|
||||
<div class="mt-3">{{ formatMoney(item.num, 2) }}</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class="chart-box">
|
||||
<BaseEcharts
|
||||
v-if="inList.length > 0 || outList.length > 0"
|
||||
:options="getOptions()"
|
||||
height="100%"
|
||||
/>
|
||||
<div v-else class="w-full mt-36">
|
||||
<el-empty description="暂无数据" />
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
<div class="dashboard-container">欢迎登陆</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { formatMoney, timeList, timeRange } from "@/utils/index";
|
||||
|
||||
const summaryList = reactive([
|
||||
{
|
||||
title: "总收货/KG",
|
||||
num: 0,
|
||||
key: "dashboard:indicator:totalReceive",
|
||||
},
|
||||
{
|
||||
title: "收货总付款/元",
|
||||
num: 0,
|
||||
key: "dashboard:indicator:totalAmountForReceive",
|
||||
},
|
||||
{
|
||||
title: "总出货/KG",
|
||||
num: 0,
|
||||
key: "dashboard:indicator:totalShipment",
|
||||
},
|
||||
{
|
||||
title: "出货总收款/元",
|
||||
num: 0,
|
||||
key: "dashboard:indicator:totalAmountForShipment",
|
||||
},
|
||||
]);
|
||||
/** 查询参数 */
|
||||
const queryParams = reactive({
|
||||
type: 3,
|
||||
startTime: timeRange(3).startTime + " 00:00:00",
|
||||
endTime: timeRange(3).endTime + " 23:59:59",
|
||||
});
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
const inList = ref<any>([]);
|
||||
const outList = ref<any>([]);
|
||||
|
||||
let y = ref([100, 200, 300]);
|
||||
|
||||
const getOptions = () => {
|
||||
return {
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "cross",
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
data: ["收货总付款(元)", "出货总付款(元)"],
|
||||
orient: "horizontal",
|
||||
bottom: "0px",
|
||||
},
|
||||
grid: {
|
||||
left: "30px",
|
||||
right: "40px",
|
||||
top: "10px",
|
||||
bottom: "30px",
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: {
|
||||
type: "category",
|
||||
boundaryGap: false,
|
||||
},
|
||||
yAxis: {
|
||||
type: "value",
|
||||
boundaryGap: [0, "100%"],
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "收货总付款(元)",
|
||||
data: inList.value,
|
||||
type: "bar",
|
||||
areaStyle: {
|
||||
show: true,
|
||||
},
|
||||
barWidth: 24,
|
||||
},
|
||||
{
|
||||
name: "出货总付款(元)",
|
||||
data: outList.value,
|
||||
type: "bar",
|
||||
areaStyle: {
|
||||
show: true,
|
||||
},
|
||||
barWidth: 24,
|
||||
},
|
||||
],
|
||||
color: ["#409eff", "#00D2E3"],
|
||||
};
|
||||
};
|
||||
|
||||
/** 查询 */
|
||||
function handleQuery() {
|
||||
loading.value = true;
|
||||
}
|
||||
|
||||
const handleChange = (v: number) => {
|
||||
console.log(v);
|
||||
const range = timeRange(v);
|
||||
queryParams.startTime = range.startTime + " 00:00:00";
|
||||
queryParams.endTime = range.endTime + " 23:59:59";
|
||||
getSummery();
|
||||
};
|
||||
// H获取数据面板信息
|
||||
const getSummery = () => {};
|
||||
|
||||
onMounted(() => {
|
||||
getSummery();
|
||||
});
|
||||
</script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.chart-box {
|
||||
height: calc(100vh - 300px);
|
||||
margin-top: 20px;
|
||||
.dashboard-container {
|
||||
text-align: center;
|
||||
padding-top: 200px;
|
||||
font-size: 50px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
size="large"
|
||||
class="h-[48px] pr-2"
|
||||
>
|
||||
<template #suffix>
|
||||
<!-- <template #suffix>
|
||||
<el-text
|
||||
v-if="seconds === 0"
|
||||
class="mx-1 cursor-pointer"
|
||||
|
@ -63,7 +63,7 @@
|
|||
<el-text v-else class="mx-1 cursor-pointer" type="primary">
|
||||
{{ seconds }}s后重新发送
|
||||
</el-text>
|
||||
</template>
|
||||
</template> -->
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
@ -134,7 +134,7 @@ const loginFormRef = ref<FormInstance>();
|
|||
|
||||
const loginData = ref<LoginData>({
|
||||
phone: "13100000006",
|
||||
code: "0000",
|
||||
code: "a12345678",
|
||||
} as LoginData);
|
||||
|
||||
const seconds = ref(0);
|
||||
|
@ -210,7 +210,7 @@ function handleLoginSubmit() {
|
|||
loginFormRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
router.push({ path: "/" });
|
||||
// loading.value = true;
|
||||
loading.value = true;
|
||||
// userStore
|
||||
// .login(loginData.value)
|
||||
// .then(() => {
|
||||
|
|
|
@ -1 +1,283 @@
|
|||
<template><div>111</div></template>
|
||||
<!-- 明细 -->
|
||||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!-- 列表 -->
|
||||
<el-col :lg="24" :xs="24">
|
||||
<div class="search-container">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item prop="createdTime">
|
||||
<el-date-picker
|
||||
v-model="range"
|
||||
placeholder="时间"
|
||||
type="datetimerange"
|
||||
:shortcuts="shortcuts"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
clearable
|
||||
style="width: 350px"
|
||||
@keyup.enter="handleQuery"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inquiryNo">
|
||||
<el-input
|
||||
v-model="queryParams.inquiryNo"
|
||||
placeholder="请输入询价单号"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入联系人"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="status">
|
||||
<el-select
|
||||
placeholder="请选择状态"
|
||||
style="width: 150px"
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<i-ep-search />
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="handleResetQuery">
|
||||
<i-ep-refresh />
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-card shadow="never" class="table-container">
|
||||
<el-table v-loading="loading" :data="pageData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
v-for="item in tableTitleList"
|
||||
:key="item.prop"
|
||||
:label="item.label"
|
||||
align="center"
|
||||
:prop="item.prop"
|
||||
>
|
||||
<template #default="scope">
|
||||
<text v-if="item.prop === 'status'">
|
||||
{{ scope.row[item.prop] ? "已联系" : "待联系" }}
|
||||
</text>
|
||||
|
||||
<text v-else>
|
||||
{{ scope.row[item.prop] }}
|
||||
</text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="220">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleOpenDialog(scope.row.id, scope.row, '备注')"
|
||||
>
|
||||
{{ scope.row.status ? "备注" : "标记为已联系" }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.photoUrl"
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleOpenDialog(scope.row.id, scope.row, '照片')"
|
||||
>
|
||||
照片
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-if="total > 0"
|
||||
v-model:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="handleQuery"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 表单弹窗 -->
|
||||
<el-drawer
|
||||
v-model="dialog.visible"
|
||||
:title="dialog.title"
|
||||
append-to-body
|
||||
@close="handleCloseDialog"
|
||||
size="800"
|
||||
>
|
||||
<!-- 照片 -->
|
||||
<photo v-if="dialog.title === '照片'" :formData="formData" />
|
||||
|
||||
<!-- 备注 -->
|
||||
<remarkDialog
|
||||
v-if="dialog.title === '备注'"
|
||||
:type="'询价'"
|
||||
:obj="formData"
|
||||
@handle-close-dialog="handleCloseDialog"
|
||||
@handle-reset-query="handleResetQuery"
|
||||
/>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import BatteryAPI, { PageParams, BatteryDTO } from "@/api/battery";
|
||||
import {
|
||||
timeShortcuts,
|
||||
formatDate,
|
||||
getCurrentMonthStartAndEnd,
|
||||
} from "@/utils/index";
|
||||
import photo from "./components/photo.vue";
|
||||
import remarkDialog from "./components/remarkDialog.vue";
|
||||
const shortcuts = timeShortcuts();
|
||||
|
||||
const statusOptions = [
|
||||
{
|
||||
id: 1,
|
||||
name: "已联系",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
name: "待联系",
|
||||
},
|
||||
];
|
||||
|
||||
const tableTitleList = ref([
|
||||
{
|
||||
label: "询价单号",
|
||||
prop: "trackingNumber",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "询价时间",
|
||||
prop: "createdTime",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系人",
|
||||
prop: "name",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系电话",
|
||||
prop: "contactInfo",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "回收种类",
|
||||
prop: "recyclingType",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "回收重量(KG)",
|
||||
prop: "recyclingWeight",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "status",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
prop: "remarks",
|
||||
align: "center",
|
||||
},
|
||||
]);
|
||||
|
||||
/** 弹窗对象 */
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
title: "",
|
||||
});
|
||||
|
||||
const queryFormRef = ref(ElForm);
|
||||
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const pageData = ref<BatteryDTO[]>();
|
||||
|
||||
const range = ref([
|
||||
formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}") + " 00:00:00",
|
||||
formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}") + " 23:59:59",
|
||||
]);
|
||||
/** 查询参数 */
|
||||
const queryParams = reactive<PageParams>({});
|
||||
|
||||
// 表单数据
|
||||
let formData = reactive<any>({});
|
||||
|
||||
/** 查询 */
|
||||
function handleQuery() {
|
||||
loading.value = true;
|
||||
BatteryAPI.queryPage({
|
||||
...queryParams,
|
||||
startTime: range.value ? range.value[0] : null,
|
||||
endTime: range.value ? range.value[1] : null,
|
||||
})
|
||||
.then((data) => {
|
||||
pageData.value = data.list;
|
||||
total.value = data.total;
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 重置查询 */
|
||||
function handleResetQuery() {
|
||||
queryFormRef.value.resetFields();
|
||||
queryParams.pageNum = 1;
|
||||
queryParams.pageSize = 10;
|
||||
range.value = [
|
||||
formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}") + " 00:00:00",
|
||||
formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}") + " 23:59:59",
|
||||
];
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
async function handleOpenDialog(id: number, item?: any, title?: string) {
|
||||
dialog.visible = true;
|
||||
dialog.title = title || "";
|
||||
formData = item;
|
||||
}
|
||||
|
||||
/** 关闭弹窗 */
|
||||
function handleCloseDialog() {
|
||||
dialog.visible = false;
|
||||
formData = {};
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
@ -1 +1,293 @@
|
|||
<template><div>222</div></template>
|
||||
<!-- 明细 -->
|
||||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!-- 列表 -->
|
||||
<el-col :lg="24" :xs="24">
|
||||
<div class="search-container">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item prop="createdTime">
|
||||
<el-date-picker
|
||||
v-model="range"
|
||||
placeholder="时间"
|
||||
type="datetimerange"
|
||||
:shortcuts="shortcuts"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
clearable
|
||||
style="width: 350px"
|
||||
@keyup.enter="handleQuery"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inquiryNo">
|
||||
<el-input
|
||||
v-model="queryParams.inquiryNo"
|
||||
placeholder="请输入登记单号"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入联系人"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="status">
|
||||
<el-select
|
||||
placeholder="请选择状态"
|
||||
style="width: 150px"
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<i-ep-search />
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="handleResetQuery">
|
||||
<i-ep-refresh />
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-card shadow="never" class="table-container">
|
||||
<el-table v-loading="loading" :data="pageData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
v-for="item in tableTitleList"
|
||||
:key="item.prop"
|
||||
:label="item.label"
|
||||
align="center"
|
||||
:prop="item.prop"
|
||||
>
|
||||
<template #default="scope">
|
||||
<text v-if="item.prop === 'status'">
|
||||
{{ scope.row[item.prop] ? "已联系" : "待联系" }}
|
||||
</text>
|
||||
|
||||
<text v-else>
|
||||
{{ scope.row[item.prop] }}
|
||||
</text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="220">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleOpenDialog(scope.row.id, scope.row, '备注')"
|
||||
>
|
||||
{{ scope.row.status ? "备注" : "标记为已联系" }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.photoUrl"
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleOpenDialog(scope.row.id, scope.row, '照片')"
|
||||
>
|
||||
照片
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-if="total > 0"
|
||||
v-model:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="handleQuery"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 表单弹窗 -->
|
||||
<el-drawer
|
||||
v-model="dialog.visible"
|
||||
:title="dialog.title"
|
||||
append-to-body
|
||||
@close="handleCloseDialog"
|
||||
size="800"
|
||||
>
|
||||
<!-- 照片 -->
|
||||
<photo v-if="dialog.title === '照片'" :formData="formData" />
|
||||
|
||||
<!-- 备注 -->
|
||||
<remarkDialog
|
||||
v-if="dialog.title === '备注'"
|
||||
:type="'登记'"
|
||||
:obj="formData"
|
||||
@handle-close-dialog="handleCloseDialog"
|
||||
@handle-reset-query="handleResetQuery"
|
||||
/>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import BatteryAPI, { PageParams, BatteryDTO } from "@/api/battery";
|
||||
import {
|
||||
timeShortcuts,
|
||||
formatDate,
|
||||
getCurrentMonthStartAndEnd,
|
||||
} from "@/utils/index";
|
||||
import photo from "./components/photo.vue";
|
||||
import remarkDialog from "./components/remarkDialog.vue";
|
||||
const shortcuts = timeShortcuts();
|
||||
|
||||
const statusOptions = [
|
||||
{
|
||||
id: 1,
|
||||
name: "已联系",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
name: "待联系",
|
||||
},
|
||||
];
|
||||
|
||||
const tableTitleList = ref([
|
||||
{
|
||||
label: "登记单号",
|
||||
prop: "trackingNumber",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "登记时间",
|
||||
prop: "createdTime",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系人",
|
||||
prop: "name",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系电话",
|
||||
prop: "contactInfo",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系地址",
|
||||
prop: "contactAddress",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "回收种类",
|
||||
prop: "recyclingType",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "回收重量(KG)",
|
||||
prop: "recyclingWeight",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "期望上门时间",
|
||||
prop: "preferredVisitTime",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "status",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
prop: "remarks",
|
||||
align: "center",
|
||||
},
|
||||
]);
|
||||
|
||||
/** 弹窗对象 */
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
title: "",
|
||||
});
|
||||
|
||||
const queryFormRef = ref(ElForm);
|
||||
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const pageData = ref<BatteryDTO[]>();
|
||||
|
||||
const range = ref([
|
||||
formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}") + " 00:00:00",
|
||||
formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}") + " 23:59:59",
|
||||
]);
|
||||
/** 查询参数 */
|
||||
const queryParams = reactive<PageParams>({});
|
||||
|
||||
// 表单数据
|
||||
let formData = reactive<any>({});
|
||||
|
||||
/** 查询 */
|
||||
function handleQuery() {
|
||||
loading.value = true;
|
||||
BatteryAPI.queryRegis({
|
||||
...queryParams,
|
||||
startTime: range.value ? range.value[0] : null,
|
||||
endTime: range.value ? range.value[1] : null,
|
||||
})
|
||||
.then((data) => {
|
||||
pageData.value = data.list;
|
||||
total.value = data.total;
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 重置查询 */
|
||||
function handleResetQuery() {
|
||||
queryFormRef.value.resetFields();
|
||||
queryParams.pageNum = 1;
|
||||
queryParams.pageSize = 10;
|
||||
range.value = [
|
||||
formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}") + " 00:00:00",
|
||||
formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}") + " 23:59:59",
|
||||
];
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
async function handleOpenDialog(id: number, item?: any, title?: string) {
|
||||
dialog.visible = true;
|
||||
dialog.title = title || "";
|
||||
formData = item;
|
||||
}
|
||||
|
||||
/** 关闭弹窗 */
|
||||
function handleCloseDialog() {
|
||||
dialog.visible = false;
|
||||
formData = {};
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<template>
|
||||
<text>
|
||||
{{ formData }}
|
||||
<el-row :gutter="8" class="flex flex-wrap">
|
||||
<el-col
|
||||
v-for="(item, index) in [{ id: 1, url: formData.photoUrl }]"
|
||||
:key="item.id"
|
||||
:span="24"
|
||||
>
|
||||
<el-image
|
||||
:src="item.url"
|
||||
:preview-src-list="[formData.photoUrl]"
|
||||
:initial-index="index"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</text>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
formData: any;
|
||||
}>(),
|
||||
{
|
||||
formData: {},
|
||||
}
|
||||
);
|
||||
</script>
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-row :gutter="8">
|
||||
<el-col :lg="24" :xs="24">
|
||||
<div>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="90px"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
v-for="(item, index) in formAttrList"
|
||||
:key="index"
|
||||
:prop="item.key"
|
||||
:label="item.name"
|
||||
:required="item.required"
|
||||
>
|
||||
<el-input
|
||||
v-if="item.type === 'textarea'"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入内容"
|
||||
v-model="formData[item.key]"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<div class="w-full text-right">
|
||||
<el-button @click="handleCancel()">取消</el-button>
|
||||
<el-button type="primary" @click="handleOk()">确定</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import BatteryAPI, { PageParams, BatteryDTO } from "@/api/battery";
|
||||
const emit = defineEmits(["handleCloseDialog", "handleResetQuery"]);
|
||||
const formRef = ref(ElForm);
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
obj: any;
|
||||
type: string;
|
||||
}>(),
|
||||
{
|
||||
obj: {},
|
||||
type: "询价",
|
||||
}
|
||||
);
|
||||
|
||||
const formData = reactive<any>({});
|
||||
|
||||
const formAttrList = reactive<any>([
|
||||
{
|
||||
name: "备注",
|
||||
key: "remarks",
|
||||
type: "textarea",
|
||||
},
|
||||
]);
|
||||
|
||||
const rules = reactive({});
|
||||
|
||||
function handleCancel() {
|
||||
formData.remarks = "";
|
||||
emit("handleCloseDialog");
|
||||
}
|
||||
|
||||
function handleOk() {
|
||||
if (props.type === "询价") {
|
||||
BatteryAPI.updateById({
|
||||
id: props.obj.id,
|
||||
status: 1,
|
||||
remarks: formData.remarks,
|
||||
}).then((res) => {
|
||||
formData.remarks = "";
|
||||
emit("handleCloseDialog");
|
||||
emit("handleResetQuery");
|
||||
});
|
||||
} else if (props.type === "登记") {
|
||||
BatteryAPI.updateRegisById({
|
||||
id: props.obj.id,
|
||||
status: 1,
|
||||
remarks: formData.remarks,
|
||||
}).then((res) => {
|
||||
formData.remarks = "";
|
||||
emit("handleCloseDialog");
|
||||
emit("handleResetQuery");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.obj,
|
||||
() => {
|
||||
formData.remarks = props.obj.remarks;
|
||||
}
|
||||
);
|
||||
</script>
|
|
@ -0,0 +1,90 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-row :gutter="8">
|
||||
<el-col :lg="24" :xs="24">
|
||||
<div>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="90px"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
v-for="(item, index) in formAttrList"
|
||||
:key="index"
|
||||
:prop="item.key"
|
||||
:label="item.name"
|
||||
:required="item.required"
|
||||
>
|
||||
<el-input
|
||||
v-if="item.type === 'textarea'"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入内容"
|
||||
v-model="formData[item.key]"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<div class="w-full text-right">
|
||||
<el-button @click="handleCancel()">取消</el-button>
|
||||
<el-button type="primary" @click="handleOk()">确定</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import SteelAPI, { PageParams, SteelDTO } from "@/api/steel";
|
||||
const emit = defineEmits(["handleCloseDialog", "handleResetQuery"]);
|
||||
const formRef = ref(ElForm);
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
obj: any;
|
||||
type: string;
|
||||
}>(),
|
||||
{
|
||||
obj: {},
|
||||
type: "询价",
|
||||
}
|
||||
);
|
||||
|
||||
const formData = reactive<any>({});
|
||||
|
||||
const formAttrList = reactive<any>([
|
||||
{
|
||||
name: "备注",
|
||||
key: "remarks",
|
||||
type: "textarea",
|
||||
},
|
||||
]);
|
||||
|
||||
const rules = reactive({});
|
||||
|
||||
function handleCancel() {
|
||||
formData.remarks = "";
|
||||
emit("handleCloseDialog");
|
||||
}
|
||||
|
||||
function handleOk() {
|
||||
SteelAPI.updateRegisById({
|
||||
id: props.obj.id,
|
||||
status: 1,
|
||||
remarks: formData.remarks,
|
||||
}).then((res) => {
|
||||
formData.remarks = "";
|
||||
emit("handleCloseDialog");
|
||||
emit("handleResetQuery");
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.obj,
|
||||
() => {
|
||||
formData.remarks = props.obj.remarks;
|
||||
}
|
||||
);
|
||||
</script>
|
|
@ -1 +0,0 @@
|
|||
<template><div>333</div></template>
|
|
@ -0,0 +1,285 @@
|
|||
<!-- 明细 -->
|
||||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!-- 列表 -->
|
||||
<el-col :lg="24" :xs="24">
|
||||
<div class="search-container">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item prop="createdTime">
|
||||
<el-date-picker
|
||||
v-model="range"
|
||||
placeholder="时间"
|
||||
type="datetimerange"
|
||||
:shortcuts="shortcuts"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
clearable
|
||||
style="width: 350px"
|
||||
@keyup.enter="handleQuery"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inquiryNo">
|
||||
<el-input
|
||||
v-model="queryParams.inquiryNo"
|
||||
placeholder="请输入申请单号"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="companyName">
|
||||
<el-input
|
||||
v-model="queryParams.companyName"
|
||||
placeholder="请输入公司名称"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="status">
|
||||
<el-select
|
||||
placeholder="请选择状态"
|
||||
style="width: 150px"
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<i-ep-search />
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="handleResetQuery">
|
||||
<i-ep-refresh />
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-card shadow="never" class="table-container">
|
||||
<el-table v-loading="loading" :data="pageData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
v-for="item in tableTitleList"
|
||||
:key="item.prop"
|
||||
:label="item.label"
|
||||
align="center"
|
||||
:prop="item.prop"
|
||||
>
|
||||
<template #default="scope">
|
||||
<text v-if="item.prop === 'status'">
|
||||
{{ scope.row[item.prop] ? "已联系" : "待联系" }}
|
||||
</text>
|
||||
<text v-else-if="item.prop === 'ownerType'">
|
||||
{{ scope.row[item.prop] ? "单位" : "个人" }}
|
||||
</text>
|
||||
|
||||
<text v-else>
|
||||
{{ scope.row[item.prop] }}
|
||||
</text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="220">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleOpenDialog(scope.row.id, scope.row, '备注')"
|
||||
>
|
||||
{{ scope.row.status ? "备注" : "标记为已联系" }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.photoUrl"
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleOpenDialog(scope.row.id, scope.row, '照片')"
|
||||
>
|
||||
照片
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-if="total > 0"
|
||||
v-model:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="handleQuery"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 表单弹窗 -->
|
||||
<el-drawer
|
||||
v-model="dialog.visible"
|
||||
:title="dialog.title"
|
||||
append-to-body
|
||||
@close="handleCloseDialog"
|
||||
size="800"
|
||||
>
|
||||
<!-- 照片 -->
|
||||
<photo v-if="dialog.title === '照片'" :formData="formData" />
|
||||
|
||||
<!-- 备注 -->
|
||||
<remarkDialog
|
||||
v-if="dialog.title === '备注'"
|
||||
:type="'登记'"
|
||||
:obj="formData"
|
||||
@handle-close-dialog="handleCloseDialog"
|
||||
@handle-reset-query="handleResetQuery"
|
||||
/>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import SteelAPI, { PageParams, SteelDTO } from "@/api/steel";
|
||||
import {
|
||||
timeShortcuts,
|
||||
formatDate,
|
||||
getCurrentMonthStartAndEnd,
|
||||
} from "@/utils/index";
|
||||
import remarkDialog from "./components/remarkDialog.vue";
|
||||
const shortcuts = timeShortcuts();
|
||||
|
||||
const statusOptions = [
|
||||
{
|
||||
id: 1,
|
||||
name: "已联系",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
name: "待联系",
|
||||
},
|
||||
];
|
||||
|
||||
const tableTitleList = ref([
|
||||
{
|
||||
label: "申请单号",
|
||||
prop: "inquiryNo",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "申请时间",
|
||||
prop: "createdTime",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "公司名称",
|
||||
prop: "companyName",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系人",
|
||||
prop: "contactPerson",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系电话",
|
||||
prop: "contactPhone",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系地址",
|
||||
prop: "address",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "status",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
prop: "remarks",
|
||||
align: "center",
|
||||
},
|
||||
]);
|
||||
|
||||
/** 弹窗对象 */
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
title: "",
|
||||
});
|
||||
|
||||
const queryFormRef = ref(ElForm);
|
||||
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const pageData = ref<SteelDTO[]>();
|
||||
|
||||
const range = ref([
|
||||
formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}") + " 00:00:00",
|
||||
formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}") + " 23:59:59",
|
||||
]);
|
||||
/** 查询参数 */
|
||||
const queryParams = reactive<PageParams>({});
|
||||
|
||||
// 表单数据
|
||||
let formData = reactive<any>({});
|
||||
|
||||
/** 查询 */
|
||||
function handleQuery() {
|
||||
loading.value = true;
|
||||
SteelAPI.queryRegis({
|
||||
...queryParams,
|
||||
startTime: range.value ? range.value[0] : null,
|
||||
endTime: range.value ? range.value[1] : null,
|
||||
})
|
||||
.then((data) => {
|
||||
pageData.value = data.list;
|
||||
total.value = data.total;
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 重置查询 */
|
||||
function handleResetQuery() {
|
||||
queryFormRef.value.resetFields();
|
||||
queryParams.pageNum = 1;
|
||||
queryParams.pageSize = 10;
|
||||
range.value = [
|
||||
formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}") + " 00:00:00",
|
||||
formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}") + " 23:59:59",
|
||||
];
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
async function handleOpenDialog(id: number, item?: any, title?: string) {
|
||||
dialog.visible = true;
|
||||
dialog.title = title || "";
|
||||
formData = item;
|
||||
}
|
||||
|
||||
/** 关闭弹窗 */
|
||||
function handleCloseDialog() {
|
||||
dialog.visible = false;
|
||||
formData = {};
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<text>
|
||||
<el-row :gutter="8" class="flex flex-wrap">
|
||||
<el-col
|
||||
v-for="(item, index) in [{ id: 1, url: formData.licensePhotoUrl }]"
|
||||
:key="item.id"
|
||||
:span="24"
|
||||
>
|
||||
<el-image
|
||||
:src="item.url"
|
||||
:preview-src-list="[formData.licensePhotoUrl]"
|
||||
:initial-index="index"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</text>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
formData: any;
|
||||
}>(),
|
||||
{
|
||||
formData: {},
|
||||
}
|
||||
);
|
||||
</script>
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-row :gutter="8">
|
||||
<el-col :lg="24" :xs="24">
|
||||
<div>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="90px"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
v-for="(item, index) in formAttrList"
|
||||
:key="index"
|
||||
:prop="item.key"
|
||||
:label="item.name"
|
||||
:required="item.required"
|
||||
>
|
||||
<el-input
|
||||
v-if="item.type === 'textarea'"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入内容"
|
||||
v-model="formData[item.key]"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<div class="w-full text-right">
|
||||
<el-button @click="handleCancel()">取消</el-button>
|
||||
<el-button type="primary" @click="handleOk()">确定</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import VehicleAPI, { PageParams, VehicleDTO } from "@/api/vehicle";
|
||||
const emit = defineEmits(["handleCloseDialog", "handleResetQuery"]);
|
||||
const formRef = ref(ElForm);
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
obj: any;
|
||||
type: string;
|
||||
}>(),
|
||||
{
|
||||
obj: {},
|
||||
type: "询价",
|
||||
}
|
||||
);
|
||||
|
||||
const formData = reactive<any>({});
|
||||
|
||||
const formAttrList = reactive<any>([
|
||||
{
|
||||
name: "备注",
|
||||
key: "remarks",
|
||||
type: "textarea",
|
||||
},
|
||||
]);
|
||||
|
||||
const rules = reactive({});
|
||||
|
||||
function handleCancel() {
|
||||
formData.remarks = "";
|
||||
emit("handleCloseDialog");
|
||||
}
|
||||
|
||||
function handleOk() {
|
||||
if (props.type === "询价") {
|
||||
VehicleAPI.updateById({
|
||||
id: props.obj.id,
|
||||
status: 1,
|
||||
remarks: formData.remarks,
|
||||
}).then((res) => {
|
||||
formData.remarks = "";
|
||||
emit("handleCloseDialog");
|
||||
emit("handleResetQuery");
|
||||
});
|
||||
} else if (props.type === "登记") {
|
||||
VehicleAPI.updateRegisById({
|
||||
id: props.obj.id,
|
||||
status: 1,
|
||||
remarks: formData.remarks,
|
||||
}).then((res) => {
|
||||
formData.remarks = "";
|
||||
emit("handleCloseDialog");
|
||||
emit("handleResetQuery");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.obj,
|
||||
() => {
|
||||
formData.remarks = props.obj.remarks;
|
||||
}
|
||||
);
|
||||
</script>
|
|
@ -0,0 +1,308 @@
|
|||
<!-- 明细 -->
|
||||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!-- 列表 -->
|
||||
<el-col :lg="24" :xs="24">
|
||||
<div class="search-container">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item prop="createdTime">
|
||||
<el-date-picker
|
||||
v-model="range"
|
||||
placeholder="时间"
|
||||
type="datetimerange"
|
||||
:shortcuts="shortcuts"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
clearable
|
||||
style="width: 350px"
|
||||
@keyup.enter="handleQuery"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inquiryNo">
|
||||
<el-input
|
||||
v-model="queryParams.inquiryNo"
|
||||
placeholder="请输入询价单号"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入联系人"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="status">
|
||||
<el-select
|
||||
placeholder="请选择状态"
|
||||
style="width: 150px"
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<i-ep-search />
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="handleResetQuery">
|
||||
<i-ep-refresh />
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-card shadow="never" class="table-container">
|
||||
<el-table v-loading="loading" :data="pageData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
v-for="item in tableTitleList"
|
||||
:key="item.prop"
|
||||
:label="item.label"
|
||||
align="center"
|
||||
:prop="item.prop"
|
||||
>
|
||||
<template #default="scope">
|
||||
<text v-if="item.prop === 'status'">
|
||||
{{ scope.row[item.prop] ? "已联系" : "待联系" }}
|
||||
</text>
|
||||
|
||||
<text v-else>
|
||||
{{ scope.row[item.prop] }}
|
||||
</text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="220">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleOpenDialog(scope.row.id, scope.row, '备注')"
|
||||
>
|
||||
{{ scope.row.status ? "备注" : "标记为已联系" }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.licensePhotoUrl"
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleOpenDialog(scope.row.id, scope.row, '照片')"
|
||||
>
|
||||
照片
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-if="total > 0"
|
||||
v-model:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="handleQuery"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 表单弹窗 -->
|
||||
<el-drawer
|
||||
v-model="dialog.visible"
|
||||
:title="dialog.title"
|
||||
append-to-body
|
||||
@close="handleCloseDialog"
|
||||
size="800"
|
||||
>
|
||||
<!-- 照片 -->
|
||||
<photo v-if="dialog.title === '照片'" :formData="formData" />
|
||||
|
||||
<!-- 备注 -->
|
||||
<remarkDialog
|
||||
v-if="dialog.title === '备注'"
|
||||
:type="'询价'"
|
||||
:obj="formData"
|
||||
@handle-close-dialog="handleCloseDialog"
|
||||
@handle-reset-query="handleResetQuery"
|
||||
/>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import VehicleAPI, { PageParams, VehicleDTO } from "@/api/vehicle";
|
||||
import {
|
||||
timeShortcuts,
|
||||
formatDate,
|
||||
getCurrentMonthStartAndEnd,
|
||||
} from "@/utils/index";
|
||||
import photo from "./components/photo.vue";
|
||||
import remarkDialog from "./components/remarkDialog.vue";
|
||||
const shortcuts = timeShortcuts();
|
||||
|
||||
const statusOptions = [
|
||||
{
|
||||
id: 1,
|
||||
name: "已联系",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
name: "待联系",
|
||||
},
|
||||
];
|
||||
|
||||
const tableTitleList = ref([
|
||||
{
|
||||
label: "申请单号",
|
||||
prop: "inquiryNo",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "询价时间",
|
||||
prop: "createdTime",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系人",
|
||||
prop: "name",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系电话",
|
||||
prop: "contactInfo",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "车辆类型",
|
||||
prop: "vehicleType",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "燃油类型",
|
||||
prop: "fuelType",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "钢圈材质",
|
||||
prop: "wheelMaterial",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "整备质量(KG)",
|
||||
prop: "curbWeight",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "车架号",
|
||||
prop: "vin",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "品牌型号",
|
||||
prop: "brandModel",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "系列",
|
||||
prop: "series",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "status",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
prop: "remarks",
|
||||
align: "center",
|
||||
},
|
||||
]);
|
||||
|
||||
/** 弹窗对象 */
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
title: "",
|
||||
});
|
||||
|
||||
const queryFormRef = ref(ElForm);
|
||||
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const pageData = ref<VehicleDTO[]>();
|
||||
|
||||
const range = ref([
|
||||
formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}") + " 00:00:00",
|
||||
formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}") + " 23:59:59",
|
||||
]);
|
||||
/** 查询参数 */
|
||||
const queryParams = reactive<PageParams>({});
|
||||
|
||||
// 表单数据
|
||||
let formData = reactive<any>({});
|
||||
|
||||
/** 查询 */
|
||||
function handleQuery() {
|
||||
loading.value = true;
|
||||
VehicleAPI.queryPage({
|
||||
...queryParams,
|
||||
startTime: range.value ? range.value[0] : null,
|
||||
endTime: range.value ? range.value[1] : null,
|
||||
})
|
||||
.then((data) => {
|
||||
pageData.value = data.list;
|
||||
total.value = data.total;
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 重置查询 */
|
||||
function handleResetQuery() {
|
||||
queryFormRef.value.resetFields();
|
||||
queryParams.pageNum = 1;
|
||||
queryParams.pageSize = 10;
|
||||
range.value = [
|
||||
formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}") + " 00:00:00",
|
||||
formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}") + " 23:59:59",
|
||||
];
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
async function handleOpenDialog(id: number, item?: any, title?: string) {
|
||||
dialog.visible = true;
|
||||
dialog.title = title || "";
|
||||
formData = item;
|
||||
}
|
||||
|
||||
/** 关闭弹窗 */
|
||||
function handleCloseDialog() {
|
||||
dialog.visible = false;
|
||||
formData = {};
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
|
@ -0,0 +1,286 @@
|
|||
<!-- 明细 -->
|
||||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!-- 列表 -->
|
||||
<el-col :lg="24" :xs="24">
|
||||
<div class="search-container">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item prop="createdTime">
|
||||
<el-date-picker
|
||||
v-model="range"
|
||||
placeholder="时间"
|
||||
type="datetimerange"
|
||||
:shortcuts="shortcuts"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
clearable
|
||||
style="width: 350px"
|
||||
@keyup.enter="handleQuery"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inquiryNo">
|
||||
<el-input
|
||||
v-model="queryParams.inquiryNo"
|
||||
placeholder="请输入登记单号"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="contactInfo">
|
||||
<el-input
|
||||
v-model="queryParams.contactInfo"
|
||||
placeholder="请输入电话"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="status">
|
||||
<el-select
|
||||
placeholder="请选择状态"
|
||||
style="width: 150px"
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<i-ep-search />
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="handleResetQuery">
|
||||
<i-ep-refresh />
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-card shadow="never" class="table-container">
|
||||
<el-table v-loading="loading" :data="pageData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
v-for="item in tableTitleList"
|
||||
:key="item.prop"
|
||||
:label="item.label"
|
||||
align="center"
|
||||
:prop="item.prop"
|
||||
>
|
||||
<template #default="scope">
|
||||
<text v-if="item.prop === 'status'">
|
||||
{{ scope.row[item.prop] ? "已联系" : "待联系" }}
|
||||
</text>
|
||||
<text v-else-if="item.prop === 'ownerType'">
|
||||
{{ scope.row[item.prop] ? "单位" : "个人" }}
|
||||
</text>
|
||||
|
||||
<text v-else>
|
||||
{{ scope.row[item.prop] }}
|
||||
</text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="220">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleOpenDialog(scope.row.id, scope.row, '备注')"
|
||||
>
|
||||
{{ scope.row.status ? "备注" : "标记为已联系" }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.photoUrl"
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleOpenDialog(scope.row.id, scope.row, '照片')"
|
||||
>
|
||||
照片
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-if="total > 0"
|
||||
v-model:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="handleQuery"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 表单弹窗 -->
|
||||
<el-drawer
|
||||
v-model="dialog.visible"
|
||||
:title="dialog.title"
|
||||
append-to-body
|
||||
@close="handleCloseDialog"
|
||||
size="800"
|
||||
>
|
||||
<!-- 照片 -->
|
||||
<photo v-if="dialog.title === '照片'" :formData="formData" />
|
||||
|
||||
<!-- 备注 -->
|
||||
<remarkDialog
|
||||
v-if="dialog.title === '备注'"
|
||||
:type="'登记'"
|
||||
:obj="formData"
|
||||
@handle-close-dialog="handleCloseDialog"
|
||||
@handle-reset-query="handleResetQuery"
|
||||
/>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import VehicleAPI, { PageParams, VehicleDTO } from "@/api/vehicle";
|
||||
import {
|
||||
timeShortcuts,
|
||||
formatDate,
|
||||
getCurrentMonthStartAndEnd,
|
||||
} from "@/utils/index";
|
||||
import photo from "./components/photo.vue";
|
||||
import remarkDialog from "./components/remarkDialog.vue";
|
||||
const shortcuts = timeShortcuts();
|
||||
|
||||
const statusOptions = [
|
||||
{
|
||||
id: 1,
|
||||
name: "已联系",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
name: "待联系",
|
||||
},
|
||||
];
|
||||
|
||||
const tableTitleList = ref([
|
||||
{
|
||||
label: "登记单号",
|
||||
prop: "inquiryNo",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "登记时间",
|
||||
prop: "createdTime",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系电话",
|
||||
prop: "contactInfo",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "联系地址",
|
||||
prop: "location",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "车辆所属",
|
||||
prop: "ownerType",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "车牌号",
|
||||
prop: "licensePlate",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "status",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
prop: "remarks",
|
||||
align: "center",
|
||||
},
|
||||
]);
|
||||
|
||||
/** 弹窗对象 */
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
title: "",
|
||||
});
|
||||
|
||||
const queryFormRef = ref(ElForm);
|
||||
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const pageData = ref<VehicleDTO[]>();
|
||||
|
||||
const range = ref([
|
||||
formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}") + " 00:00:00",
|
||||
formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}") + " 23:59:59",
|
||||
]);
|
||||
/** 查询参数 */
|
||||
const queryParams = reactive<PageParams>({});
|
||||
|
||||
// 表单数据
|
||||
let formData = reactive<any>({});
|
||||
|
||||
/** 查询 */
|
||||
function handleQuery() {
|
||||
loading.value = true;
|
||||
VehicleAPI.queryRegis({
|
||||
...queryParams,
|
||||
startTime: range.value ? range.value[0] : null,
|
||||
endTime: range.value ? range.value[1] : null,
|
||||
})
|
||||
.then((data) => {
|
||||
pageData.value = data.list;
|
||||
total.value = data.total;
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 重置查询 */
|
||||
function handleResetQuery() {
|
||||
queryFormRef.value.resetFields();
|
||||
queryParams.pageNum = 1;
|
||||
queryParams.pageSize = 10;
|
||||
range.value = [
|
||||
formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}") + " 00:00:00",
|
||||
formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}") + " 23:59:59",
|
||||
];
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
async function handleOpenDialog(id: number, item?: any, title?: string) {
|
||||
dialog.visible = true;
|
||||
dialog.title = title || "";
|
||||
formData = item;
|
||||
}
|
||||
|
||||
/** 关闭弹窗 */
|
||||
function handleCloseDialog() {
|
||||
dialog.visible = false;
|
||||
formData = {};
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
|
@ -1 +0,0 @@
|
|||
<template><div>444</div></template>
|
|
@ -1 +0,0 @@
|
|||
<template><div>555</div></template>
|
|
@ -560,7 +560,6 @@ function handleOpenDialog(parentId?: number, menuId?: number) {
|
|||
|
||||
// 菜单类型切换
|
||||
function handleMenuTypeChange() {
|
||||
debugger;
|
||||
// 如果菜单类型改变
|
||||
if (formData.value.type !== initialMenuFormData.value.type) {
|
||||
if (formData.value.type === MenuTypeEnum.MENU) {
|
||||
|
|
|
@ -69,7 +69,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
|||
// path.replace(new RegExp("^" + env.VITE_APP_BASE_API), ""),
|
||||
// },
|
||||
"^/api": {
|
||||
target: "https://ifanda.52zaisheng.cn/test",
|
||||
target: "https://ifanda.52zaisheng.cn/dy",
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, "/api"),
|
||||
|
|
Loading…
Reference in New Issue