2
0
Fork 0

页面修改

This commit is contained in:
zmj 2023-11-08 18:04:28 +08:00
parent d774ecd43e
commit a32750bfd8
4 changed files with 177 additions and 375 deletions

View File

@ -2,7 +2,7 @@ const config = {
terminal: 1, //终端
title: "后台管理系统", //网站默认标题
version: "1.6.0", //版本号
baseUrl: `${import.meta.env.VITE_APP_BASE_URL || "https://preview-logistics.lihaink.cn"}/`, //请求接口域名
baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ""}/`, //请求接口域名
urlPrefix: "adminapi", //请求默认前缀
timeout: 10 * 1000, //请求超时时
};

View File

@ -1,100 +1,44 @@
<template>
<div>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-form class="mb-[-16px]" inline>
<el-form-item label="公司名称" prop="company_name">
<el-input
class="w-[280px]"
v-model="queryParams.company_name"
clearable
placeholder="请输入公司名称"
/>
</el-form-item>
<el-form-item label="联系人" prop="contract_no">
<el-input
class="w-[280px]"
v-model="queryParams.company_b_user"
clearable
placeholder="请输入联系人"
/> </el-form-item
><el-form-item label="联系方式" prop="status">
<el-input
class="w-[280px]"
v-model="queryParams.company_b_phone"
clearable
placeholder="请输入联系方式"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
<div class="mt-4">
<el-table
:data="pager.lists"
:default-sort="{ prop: 'create_time', order: 'descending' }"
>
<el-table-column
label="公司名称"
:width="250"
prop="company_b_name"
show-overflow-tooltip
/>
<el-table-column
label="社会代码"
prop="company_b_code"
show-overflow-tooltip
/>
<el-table-column
label="主要联系人"
prop="company_b_user"
show-overflow-tooltip
/>
<el-table-column
label="联系方式"
prop="company_b_phone"
align="center"
show-overflow-tooltip
/>
<el-table-column
label="租车数量"
prop="num"
align="center"
show-overflow-tooltip
/>
<el-table-column
label="合同状态"
prop="num"
align="center"
show-overflow-tooltip
>
<template #default="{ row }">
{{ row.status >= 3 ? "已签约" : "未签约" }}
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="auto"
fixed="right"
>
<template #default="{ row }">
<el-button type="primary" link>
<router-link
:to="{
path: '/contract/detail',
query: {
id: row.id,
},
}"
>查看</router-link
>
</el-button>
<!-- <el-button type="primary" link @click="test(row.id)">
查看
</el-button> -->
<el-button
<div>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-form class="mb-[-16px]" inline>
<el-form-item label="公司名称" prop="company_name">
<el-input class="w-[280px]" v-model="queryParams.company_name" clearable placeholder="请输入公司名称" />
</el-form-item>
<el-form-item label="联系人" prop="contract_no">
<el-input class="w-[280px]" v-model="queryParams.company_b_user" clearable placeholder="请输入联系人" />
</el-form-item><el-form-item label="" prop="status">
<el-input class="w-[280px]" v-model="queryParams.company_b_phone" clearable placeholder="请输入联系方式" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
<div class="mt-4">
<el-table :data="pager.lists" :default-sort="{ prop: 'create_time', order: 'descending' }">
<el-table-column label="公司名称" :width="250" prop="company_b_name" show-overflow-tooltip />
<el-table-column label="社会代码" prop="company_b_code" show-overflow-tooltip />
<el-table-column label="主要联系人" prop="company_b_user" show-overflow-tooltip />
<el-table-column label="联系方式" prop="company_b_phone" align="center" show-overflow-tooltip />
<el-table-column label="租车数量" prop="num" align="center" show-overflow-tooltip />
<el-table-column label="合同状态" prop="num" align="center" show-overflow-tooltip>
<template #default="{ row }">
{{ row.status >= 3 ? "已签约" : "未签约" }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="auto" fixed="right">
<template #default="{ row }">
<el-button type="primary" link>
<router-link :to="{
path: '/contract/detail',
query: {
id: row.id,
},
}">查看</router-link>
</el-button>
<!-- <el-button
v-if="row.status == 1"
type="primary"
link
@ -108,22 +52,17 @@
link
type="primary"
>重新发送{{ row.nums ? row.nums + "s" : "" }}</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup
v-if="showEdit"
ref="editRef"
@success="getLists"
@close="showEdit = false"
/>
</div>
> -->
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" @success="getLists" @close="showEdit = false" />
</div>
</template>
<script lang="ts" setup name="flowTypeLists">
@ -133,62 +72,62 @@ import { contractList, sendContract, sendMsg } from "@/api/contract";
import feedback from "@/utils/feedback";
const sendAgain = (id: number) => {
feedback.msgSuccess("发送成功");
sendMsg({ id }).then((res) => {
var inde = pager.lists.findIndex(function (element) {
return element.id === id;
feedback.msgSuccess("发送成功");
sendMsg({ id }).then((res) => {
var inde = pager.lists.findIndex(function (element) {
return element.id === id;
});
index.value = inde;
pager.lists[index.value].nums = 10;
timeFn(index.value);
});
index.value = inde;
pager.lists[index.value].nums = 10;
timeFn(index.value);
});
};
const timeFn = (i: number) => {
const timers = setInterval(() => {
pager.lists[i].nums--;
if (pager.lists[i].nums <= 0) {
clearInterval(timers);
}
}, 1000);
const timers = setInterval(() => {
pager.lists[i].nums--;
if (pager.lists[i].nums <= 0) {
clearInterval(timers);
}
}, 1000);
};
const index = ref(0);
const sendContractFn = (id: number) => {
sendContract({ id }).then((res) => {
feedback.msgSuccess("发送成功");
var inde = pager.lists.findIndex(function (element) {
return element.id === id;
sendContract({ id }).then((res) => {
feedback.msgSuccess("发送成功");
var inde = pager.lists.findIndex(function (element) {
return element.id === id;
});
index.value = inde;
pager.lists[index.value].status = 2;
pager.lists[index.value].nums = 10;
timeFn(index.value);
});
index.value = inde;
pager.lists[index.value].status = 2;
pager.lists[index.value].nums = 10;
timeFn(index.value);
});
};
const test = () => {
// console.log(5454);
// console.log(5454);
};
//
const queryParams = reactive({
company_name: "",
company_b_user: "",
company_b_phone: "",
company_name: "",
company_b_user: "",
company_b_phone: "",
});
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: contractList,
params: queryParams,
fetchFun: contractList,
params: queryParams,
});
// console.log(pager.lists);
const handleView = async (data: any) => {
showEdit.value = true;
await nextTick();
editRef.value?.open(data.id);
showEdit.value = true;
await nextTick();
editRef.value?.open(data.id);
};
getLists().then((res) => {
pager.lists.forEach((item, index) => {
item.nums = 0;
});
pager.lists.forEach((item, index) => {
item.nums = 0;
});
});
</script>

View File

@ -1,184 +1,77 @@
<template>
<div>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-form class="mb-[-16px]" inline>
<el-form-item label="订单编号" prop="company_id">
<el-input
class="w-[280px]"
v-model="queryParams.order_sn"
clearable
placeholder="请输入订单编号"
/>
</el-form-item>
<el-form-item label="商家名称" prop="company_id">
<el-input
class="w-[280px]"
v-model="queryParams.shop_name"
clearable
placeholder="请输入商家名称"
/>
</el-form-item>
<el-form-item label="商家电话" prop="company_id">
<el-input
class="w-[280px]"
v-model="queryParams.shop_phone"
clearable
placeholder="请输入商家电话"
/>
</el-form-item>
<el-form-item label="商家地址" prop="company_id">
<el-input
class="w-[280px]"
v-model="queryParams.shop_address"
clearable
placeholder="请输入商家地址"
/>
</el-form-item>
<el-form-item label="收件人" prop="company_id">
<el-input
class="w-[280px]"
v-model="queryParams.receiver_name"
clearable
placeholder="请输入收件人"
/>
</el-form-item>
<div>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-form class="mb-[-16px]" inline>
<el-form-item label="订单编号" prop="company_id">
<el-input class="w-[280px]" v-model="queryParams.order_sn" clearable placeholder="请输入订单编号" />
</el-form-item>
<el-form-item label="商家名称" prop="company_id">
<el-input class="w-[280px]" v-model="queryParams.shop_name" clearable placeholder="请输入商家名称" />
</el-form-item>
<el-form-item label="商家电话" prop="company_id">
<el-input class="w-[280px]" v-model="queryParams.shop_phone" clearable placeholder="请输入商家电话" />
</el-form-item>
<el-form-item label="商家地址" prop="company_id">
<el-input class="w-[280px]" v-model="queryParams.shop_address" clearable placeholder="请输入商家地址" />
</el-form-item>
<el-form-item label="收件人" prop="company_id">
<el-input class="w-[280px]" v-model="queryParams.receiver_name" clearable placeholder="请输入收件人" />
</el-form-item>
<el-form-item label="收件人电话" prop="company_id">
<el-input
class="w-[280px]"
v-model="queryParams.receiver_phone"
clearable
placeholder="请输入收件人电话"
/>
</el-form-item>
<el-form-item label="配送人员" prop="company_id">
<el-input
class="w-[280px]"
v-model="queryParams.courier_name"
clearable
placeholder="请输入配送人员姓名"
/>
</el-form-item>
<el-form-item label="所属公司" prop="company_id">
<el-input
class="w-[280px]"
v-model="queryParams.courier_company"
clearable
placeholder="请输入所属公司地址"
/>
</el-form-item>
<el-form-item label="村/镇/小队" prop="company_id">
<el-input
class="w-[280px]"
v-model="queryParams.receiver_address"
clearable
placeholder="请输入村/镇/小队"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
<div class="mt-4">
<el-table
:data="pager.lists"
:default-sort="{ prop: 'create_time', order: 'descending' }"
@selection-change="handleSelectionChange"
>
<el-table-column
label="订单编号"
:width="250"
prop="order_sn"
show-overflow-tooltip
/>
<el-table-column
label="商户名称"
prop="shop_name"
show-overflow-tooltip
/>
<el-table-column
label="收货人"
prop="receiver_name"
show-overflow-tooltip
/>
<el-table-column
label="收货人号码"
prop="receiver_phone"
show-overflow-tooltip
/>
<el-table-column
label="收货地址"
prop="receiver_address"
show-overflow-tooltip
/>
<el-table-column
label="商品数量"
prop="product_count"
align="center"
show-overflow-tooltip
/>
<el-form-item label="收件人电话" prop="company_id">
<el-input class="w-[280px]" v-model="queryParams.receiver_phone" clearable placeholder="请输入收件人电话" />
</el-form-item>
<el-form-item label="配送人员" prop="company_id">
<el-input class="w-[280px]" v-model="queryParams.courier_name" clearable placeholder="请输入配送人员姓名" />
</el-form-item>
<el-form-item label="所属公司" prop="company_id">
<el-input class="w-[280px]" v-model="queryParams.courier_company" clearable placeholder="请输入所属公司地址" />
</el-form-item>
<el-form-item label="村/镇/小队" prop="company_id">
<el-input class="w-[280px]" v-model="queryParams.receiver_address" clearable placeholder="请输入村/镇/小队" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
<div class="mt-4">
<el-table :data="pager.lists" :default-sort="{ prop: 'create_time', order: 'descending' }"
@selection-change="handleSelectionChange">
<el-table-column
label="下单时间"
sortable
prop="create_time"
show-overflow-tooltip
/>
<el-table-column label="订单编号" :width="250" prop="order_sn" show-overflow-tooltip />
<el-table-column label="商户名称" prop="shop_name" show-overflow-tooltip />
<el-table-column label="收货人" prop="receiver_name" show-overflow-tooltip />
<el-table-column label="收货人号码" prop="receiver_phone" show-overflow-tooltip />
<el-table-column label="收货地址" prop="receiver_address" show-overflow-tooltip />
<el-table-column label="商品数量" prop="product_count" align="center" show-overflow-tooltip />
<el-table-column
label="订单状态"
:filters="[
{ text: '待取货', value: '0' },
{ text: '配送中', value: '1' },
{ text: '已配送', value: '2' },
{ text: '已取消', value: '3' },
]"
:filter-method="filterHandler"
prop="status_name"
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="下单时间" sortable prop="create_time" show-overflow-tooltip />
<el-table-column
label="配送人员"
prop="courier_name"
show-overflow-tooltip
/>
<el-table-column
label="配送人员所属公司"
prop="courier_company"
show-overflow-tooltip
/>
<el-table-column
label="操作"
align="center"
width="auto"
fixed="right"
>
<template #default="{ row }">
<el-button
type="primary"
v-perms="['logistics.logistics/detail']"
link
@click="handleView(row)"
>查看</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup
v-if="showEdit"
ref="editRef"
@success="getLists"
@close="showEdit = false"
/>
</div>
<el-table-column label="订单状态" :filters="[
{ text: '待取货', value: '0' },
{ text: '配送中', value: '1' },
{ text: '已配送', value: '2' },
{ text: '已取消', value: '3' },
]" :filter-method="filterHandler" prop="status_name" show-overflow-tooltip>
</el-table-column>
<el-table-column label="配送人员" prop="courier_name" show-overflow-tooltip />
<el-table-column label="配送人员所属公司" prop="courier_company" show-overflow-tooltip />
<el-table-column label="操作" align="center" width="auto" fixed="right">
<template #default="{ row }">
<el-button type="primary" v-perms="['logistics.logistics/detail']" link
@click="handleView(row)">查看</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" @success="getLists" @close="showEdit = false" />
</div>
</template>
<script lang="ts" setup name="flowTypeLists">
@ -186,41 +79,11 @@ import { usePaging } from "@/hooks/usePaging";
import { useDictData } from "@/hooks/useDictOptions";
import { orderList } from "@/api/logistics";
import EditPopup from "./edit.vue";
// let obj = [
// {
// cunid: 1,
// zhgn: [
// {
// zhengid: 1,
// dui: [1, 2, 3],
// },
// {
// zhengid: 2,
// dui: [1, 2, 3],
// },
// ],
// },
// {
// cunid: 3,
// zhgn: [
// {
// zhengid: 1,
// dui: [1, 2, 3],
// },
// {
// zhengid: 2,
// dui: [1, 2, 3],
// },
// ],
// },
// ];
interface User {
date: string;
name: string;
address: string;
tag: string;
date: string;
name: string;
address: string;
tag: string;
}
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
//
@ -228,15 +91,15 @@ const showEdit = ref(false);
//
// 'order_sn' =>,'shop_name'=> ,'shop_phone' => ,'shop_address' => ,'user_name' => ,'user_address' => ,'user_phone' =>
const queryParams = reactive({
order_sn: "",
shop_name: "",
shop_phone: "",
shop_address: "",
receiver_name: "",
receiver_address: "",
receiver_phone: "",
courier_name: "",
courier_company: "",
order_sn: "",
shop_name: "",
shop_phone: "",
shop_address: "",
receiver_name: "",
receiver_address: "",
receiver_phone: "",
courier_name: "",
courier_company: "",
});
//
@ -244,22 +107,22 @@ const selectData = ref<any[]>([]);
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id);
selectData.value = val.map(({ id }) => id);
};
const filterHandler = (value: string, row: any, column: any) => {
return row.status == value;
return row.status == value;
};
//
const { dictData } = useDictData("");
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: orderList,
params: queryParams,
fetchFun: orderList,
params: queryParams,
});
const handleView = async (data: any) => {
showEdit.value = true;
await nextTick();
editRef.value?.open(data.id);
showEdit.value = true;
await nextTick();
editRef.value?.open(data.id);
};
getLists();
</script>

View File

@ -43,7 +43,7 @@
<el-table-column label="当前使用人" prop="rent_info.use_user_name" show-overflow-tooltip />
<el-table-column label="联系方式" prop="rent_info.use_user_phone" show-overflow-tooltip />
<el-table-column label="车辆使用情况" prop="status_name" show-overflow-tooltip />
<el-table-column label="车辆使用情况" align="center" prop="status_name" show-overflow-tooltip />
<el-table-column label="当前运载货物" prop="create_time" show-overflow-tooltip />
<el-table-column label="车辆类型" prop="type_name" show-overflow-tooltip />