代码更新
This commit is contained in:
parent
a32750bfd8
commit
1c3b963936
|
@ -1,4 +0,0 @@
|
|||
NODE_ENV = 'development'
|
||||
|
||||
# Base API
|
||||
VITE_APP_BASE_URL=''
|
|
@ -1,3 +0,0 @@
|
|||
NODE_ENV = 'production'
|
||||
# Base API
|
||||
VITE_APP_BASE_URL=''
|
|
@ -0,0 +1,26 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// app更新列表
|
||||
export function apiAppUpdateLists(params: any) {
|
||||
return request.get({ url: '/appUpdate/lists', params })
|
||||
}
|
||||
|
||||
// 添加app更新
|
||||
export function apiAppUpdateAdd(params: any) {
|
||||
return request.post({ url: '/appUpdate/add', params })
|
||||
}
|
||||
|
||||
// 编辑app更新
|
||||
export function apiAppUpdateEdit(params: any) {
|
||||
return request.post({ url: '/appUpdate/edit', params })
|
||||
}
|
||||
|
||||
// 删除app更新
|
||||
export function apiAppUpdateDelete(params: any) {
|
||||
return request.post({ url: '/appUpdate/delete', params })
|
||||
}
|
||||
|
||||
// app更新详情
|
||||
export function apiAppUpdateDetail(params: any) {
|
||||
return request.get({ url: '/appUpdate/detail', params })
|
||||
}
|
|
@ -1,14 +1,14 @@
|
|||
import request from "@/utils/request";
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 订单列表
|
||||
|
||||
export function orderList(params: any) {
|
||||
return request.get({ url: "/logistics.logistics/lists", params });
|
||||
return request.get({ url: '/logistic.Logistic/lists', params })
|
||||
}
|
||||
|
||||
// http://logistics.lihaink.cn/adminapi/logistics.logistics/detail
|
||||
|
||||
// D订单详情
|
||||
export function orderDetil(params: any) {
|
||||
return request.get({ url: "/logistics.logistics/detail", params });
|
||||
return request.get({ url: '/logistic.Logistic/detail', params })
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
const config = {
|
||||
terminal: 1, //终端
|
||||
title: "后台管理系统", //网站默认标题
|
||||
version: "1.6.0", //版本号
|
||||
baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ""}/`, //请求接口域名
|
||||
urlPrefix: "adminapi", //请求默认前缀
|
||||
timeout: 10 * 1000, //请求超时时
|
||||
};
|
||||
export default config;
|
||||
title: '后台管理系统', //网站默认标题
|
||||
version: '1.6.0', //版本号
|
||||
baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名
|
||||
urlPrefix: 'adminapi', //请求默认前缀
|
||||
timeout: 10 * 1000 //请求超时时
|
||||
}
|
||||
export default config
|
||||
// const config = {
|
||||
// terminal: 1, //终端
|
||||
// title: "后台管理系统", //网站默认标题
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="formData.title" clearable placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" prop="content">
|
||||
<el-input v-model="formData.content" clearable placeholder="请输入内容" type="textarea" autosize />
|
||||
</el-form-item>
|
||||
<el-form-item label="APP类型" prop="type">
|
||||
<el-radio-group v-model="formData.type" placeholder="请选择APP类型">
|
||||
<el-radio v-for="(item, index) in dictData.app_type" :key="index" :label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本" prop="version">
|
||||
<el-input v-model="formData.version" clearable placeholder="请输入版本,例如1.0.1" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="更新包文件" prop="dow_url">
|
||||
<el-upload class="upload-demo" style="width: 100%" drag accept=".apk, .ipa, .wgt" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :limit="1" :on-success="handleFile" :on-exceed="handleExceed" :before-upload="handleBeforeUpload" ref="upload">
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">文件拖入或点击上传</div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">请上传APK/IPA/WGT文件</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="下载地址" prop="dow_url">
|
||||
<el-input v-model="formData.dow_url" placeholder="请输入文件地址" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否强制更新" prop="force">
|
||||
<el-radio-group v-model="formData.force" placeholder="请选择是否强制更新">
|
||||
<el-radio v-for="(item, index) in dictData.app_force_quiet" :key="index" :label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否静默更新" prop="quiet">
|
||||
<el-radio-group v-model="formData.quiet" placeholder="请选择是否静默更新">
|
||||
<el-radio v-for="(item, index) in dictData.app_force_quiet" :key="index" :label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="appUpdateEdit">
|
||||
import type { FormInstance } from "element-plus";
|
||||
import { genFileId } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import {
|
||||
apiAppUpdateAdd,
|
||||
apiAppUpdateEdit,
|
||||
apiAppUpdateDetail,
|
||||
} from "@/api/app_update";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import type { PropType } from "vue";
|
||||
import { inject } from "vue";
|
||||
const base_url: any = inject("base_url");
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["success", "close"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const userStore = useUserStore();
|
||||
|
||||
const handleFile = (e: any) => {
|
||||
formData.dow_url = e.data.uri;
|
||||
};
|
||||
|
||||
const upload = ref(null);
|
||||
const handleExceed = (files: any) => {
|
||||
upload.value!.clearFiles();
|
||||
const file = files[0] as UploadRawFile;
|
||||
file.uid = genFileId();
|
||||
upload.value!.handleStart(file);
|
||||
upload.value!.submit();
|
||||
};
|
||||
|
||||
const appTypeList = [".apk", ".ipa", ".wgt"];
|
||||
const handleBeforeUpload = (e: any) => {
|
||||
const a = appTypeList.find((item: any) => {
|
||||
return item == e?.name?.substring(e.name.length - 4, e.name.length);
|
||||
});
|
||||
if (a) return true;
|
||||
else {
|
||||
ElMessage.error("仅支持上传APK/IPA/WGT文件");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == "edit" ? "编辑app更新" : "新增app更新";
|
||||
});
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
title: "",
|
||||
content: "",
|
||||
type: "",
|
||||
version: "",
|
||||
dow_url: "",
|
||||
force: "",
|
||||
quiet: "",
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({});
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiAppUpdateDetail({
|
||||
id: row.id,
|
||||
});
|
||||
setFormData(data);
|
||||
};
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
const data = { ...formData };
|
||||
mode.value == "edit"
|
||||
? await apiAppUpdateEdit(data)
|
||||
: await apiAppUpdateAdd(data);
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
};
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
};
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit("close");
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail,
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,144 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['app_update/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['app_update/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="标题" prop="title" show-overflow-tooltip />
|
||||
<el-table-column label="内容" prop="content" show-overflow-tooltip />
|
||||
<el-table-column label="APP类型" prop="type">
|
||||
<template #default="{ row }">
|
||||
{{ row.force == 1 ? 'IOS' : '安卓' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="版本" prop="version" show-overflow-tooltip />
|
||||
<el-table-column label="app链接" prop="dow_url" show-overflow-tooltip />
|
||||
<el-table-column label="是否强制更新" prop="force">
|
||||
<template #default="{ row }">
|
||||
{{ row.force == 1 ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否静默更新" prop="quiet">
|
||||
<template #default="{ row }">
|
||||
{{ row.quiet == 1 ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['app_update/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['app_update/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</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" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="appUpdateLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import { apiAppUpdateLists, apiAppUpdateDelete } from "@/api/app_update";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./edit.vue";
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
title: "",
|
||||
content: "",
|
||||
type: "",
|
||||
version: "",
|
||||
dow_url: "",
|
||||
force: "",
|
||||
quiet: "",
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
const { dictData } = {
|
||||
dictData: {
|
||||
app_force_quiet: [
|
||||
{
|
||||
name: "是",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: "否",
|
||||
value: 0,
|
||||
},
|
||||
],
|
||||
app_type: [
|
||||
{
|
||||
name: "IOS",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: "安卓",
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
// 获取字典数据
|
||||
// const { dictData } = useDictData("app_type,app_force_quiet");
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiAppUpdateLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("add");
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("edit");
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm("确定要删除?");
|
||||
await apiAppUpdateDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
|
||||
getLists();
|
||||
</script>
|
|
@ -1,14 +1,25 @@
|
|||
<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">
|
||||
<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.user_name" 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="status">
|
||||
<el-select class="flex-1" v-model="queryParams.status" clearable placeholder="请选择岗位">
|
||||
<el-option v-for="(item, index) in optionsData" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</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">
|
||||
|
@ -20,58 +31,53 @@
|
|||
|
||||
<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-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-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="下单时间" sortable prop="create_time" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="下单时间" sortable prop="create_time" 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="订单状态" :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>
|
||||
<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">
|
||||
|
@ -80,49 +86,75 @@ import { useDictData } from "@/hooks/useDictOptions";
|
|||
import { orderList } from "@/api/logistics";
|
||||
import EditPopup from "./edit.vue";
|
||||
interface User {
|
||||
date: string;
|
||||
name: string;
|
||||
address: string;
|
||||
tag: string;
|
||||
date: string;
|
||||
name: string;
|
||||
address: string;
|
||||
tag: string;
|
||||
}
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
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: "",
|
||||
|
||||
user_name: "",
|
||||
shop_address: "",
|
||||
courier_name: "",
|
||||
status,
|
||||
// receiver_address: "",
|
||||
// receiver_phone: "",
|
||||
// courier_name: "",
|
||||
// courier_company: "",
|
||||
});
|
||||
|
||||
const optionsData = reactive([
|
||||
{
|
||||
name: "待揽件",
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "配送中",
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: "已配送",
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: "已完成",
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: "已取消",
|
||||
id: 4,
|
||||
},
|
||||
]);
|
||||
|
||||
// 选中数据
|
||||
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>
|
||||
|
|
Loading…
Reference in New Issue