Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
@@ -9,11 +9,13 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
component: 'Input',
|
||||
fieldName: 'planName',
|
||||
label: '方案名称',
|
||||
labelWidth: 120
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
fieldName: 'rentalPeriod',
|
||||
label: '租赁周期',
|
||||
labelWidth: 120,
|
||||
componentProps: {
|
||||
options:[
|
||||
{ label: '月', value: 0 },
|
||||
@@ -121,7 +123,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '基础服务项',
|
||||
fieldName: 'price',
|
||||
component: 'Select',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '优惠活动',
|
||||
|
@@ -21,9 +21,9 @@ const title = computed(() => {
|
||||
const [BasicForm, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
// 默认占满两列
|
||||
formItemClass: 'col-span-2',
|
||||
formItemClass: 'col-span-1',
|
||||
// 默认label宽度 px
|
||||
labelWidth: 80,
|
||||
labelWidth: 120,
|
||||
// 通用配置项 会影响到所有表单项
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
@@ -43,7 +43,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
// 在这里更改宽度
|
||||
class: 'w-[550px]',
|
||||
class: 'w-[70%]',
|
||||
fullscreenButton: false,
|
||||
onBeforeClose,
|
||||
onClosed: handleClosed,
|
||||
@@ -91,11 +91,67 @@ async function handleClosed() {
|
||||
await formApi.resetForm();
|
||||
resetInitialized();
|
||||
}
|
||||
const detailColumns = [
|
||||
{ title: '序号', key: 'index' },
|
||||
{ title: '产品编号', dataIndex: 'plantCode', key: 'plantCode' },
|
||||
{ title: '产品名称', dataIndex: 'plantName', key: 'plantName' },
|
||||
{ title: '产品分类', dataIndex: 'plantType', key: 'plantType' },
|
||||
{
|
||||
title: '图片',
|
||||
dataIndex: 'imgPath',
|
||||
key: 'imgPath',
|
||||
},
|
||||
{
|
||||
title: '规格',
|
||||
dataIndex: 'specification',
|
||||
key: 'specification',
|
||||
},
|
||||
{ title: '租金', dataIndex: 'rent', key: 'rent' },
|
||||
{ title: '备注', dataIndex: 'remark', key: 'remark' },
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'state',
|
||||
key: 'state',
|
||||
customRender: ({ value }: { value: number }) =>
|
||||
value === 1 ? '上架' : '下架',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
fixed: 'right' as const,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :title="title">
|
||||
<BasicForm />
|
||||
<!-- 添加订单详情部分、 -->
|
||||
<div class="mt-4">
|
||||
<div class="mb-2 flex items-center justify-between">
|
||||
<h3 class="text-lg font-medium">添加保洁订单详情</h3>
|
||||
<a-button type="primary" @click="handleAddDetail">
|
||||
{{ $t('pages.common.add') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<Table
|
||||
:data-source="detailTable"
|
||||
:columns="detailColumns"
|
||||
:pagination="false"
|
||||
>
|
||||
<template #bodyCell="{ column, index, record }">
|
||||
<template v-if="column.key === 'index'">
|
||||
{{ index + 1 }}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'action'">
|
||||
<Button danger @click="handleDeleteDetail(record, index)">
|
||||
删除
|
||||
</Button>
|
||||
</template>
|
||||
</template>
|
||||
</Table>
|
||||
<div>费用合计:{{ totalSumPeices }}元</div>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
|
@@ -7,7 +7,7 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'orderNo',
|
||||
label: '订单编号',
|
||||
label: '订单号',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
@@ -17,6 +17,7 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options:getDictOptions('wy_khlx')
|
||||
},
|
||||
fieldName: 'customerType',
|
||||
label: '客户类型',
|
||||
@@ -42,76 +43,84 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '订单号',
|
||||
field: 'id',
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
field: 'orderNo',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '客户名称',
|
||||
field: 'customerName',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '客户类型',
|
||||
field: 'customerType',
|
||||
slots: {default: 'customerType'},
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '租赁周期',
|
||||
field: 'rentalPeriod',
|
||||
slots: {default: 'rentalPeriod'},
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '租赁开始时间',
|
||||
field: 'startTime',
|
||||
width:120
|
||||
},
|
||||
{
|
||||
title: '租赁结束时间',
|
||||
field: 'endTime',
|
||||
width:120
|
||||
},
|
||||
{
|
||||
title: '应付总额',
|
||||
field: 'totalAmount',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '租赁方式',
|
||||
field: 'rentalType',
|
||||
slots: {default: 'rentalType'},
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '租赁方案id',
|
||||
title: '租赁商品',
|
||||
field: 'planId',
|
||||
},
|
||||
{
|
||||
title: '绿植产品id',
|
||||
field: 'productId',
|
||||
},
|
||||
{
|
||||
title: '租赁产品数量',
|
||||
field: 'productNum',
|
||||
slots: {default: 'planId'},
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '支付状态',
|
||||
field: 'paymentStatus',
|
||||
slots: {default: 'paymentStatus'},
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '是否续租',
|
||||
field: 'isRelet',
|
||||
slots: {default: 'isRelet'},
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '合同状态',
|
||||
field: 'contractStatus',
|
||||
slots: {default: 'contractStatus'},
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '签署时间',
|
||||
field: 'signTime',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: { default: 'action' },
|
||||
title: '操作',
|
||||
width: 180,
|
||||
minWidth: 180,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -142,6 +151,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'customerType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options:getDictOptions('wy_khlx')
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
@@ -150,30 +160,20 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'rentalPeriod',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options:getDictOptions('wy_time_unit')
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '租赁开始时间',
|
||||
fieldName: 'startTime',
|
||||
component: 'DatePicker',
|
||||
label: '租赁时间',
|
||||
fieldName: 'rentalTime',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '租赁结束时间',
|
||||
fieldName: 'endTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '应付总额',
|
||||
@@ -186,6 +186,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'rentalType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options:getDictOptions('wy_sf')
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
@@ -193,16 +194,34 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '租赁方案id',
|
||||
fieldName: 'planId',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
// 仅当 租赁方式 为 2(套餐) 时显示
|
||||
show: (formValues) => formValues.rentalType === '2',
|
||||
triggerFields: ['rentalType'],
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '绿植产品id',
|
||||
fieldName: 'productId',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
// 仅当 租赁方式 为 1(单点) 时显示
|
||||
show: (formValues) => formValues.rentalType === '1',
|
||||
triggerFields: ['rentalType'],
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '租赁产品数量',
|
||||
fieldName: 'productNum',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
// 仅当 租赁方式 为 1(单点) 时显示
|
||||
show: (formValues) => formValues.rentalType === '1',
|
||||
triggerFields: ['rentalType'],
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '支付状态',
|
||||
@@ -219,6 +238,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
componentProps: {
|
||||
buttonStyle: 'solid',
|
||||
optionType: 'button',
|
||||
options: getDictOptions('wy_sf'),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@@ -122,7 +122,7 @@ function handleDownloadExcel() {
|
||||
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable table-title="绿植租赁-订单管理列表">
|
||||
<BasicTable table-title="租赁订单列表">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
|
@@ -21,7 +21,7 @@ const title = computed(() => {
|
||||
const [BasicForm, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
// 默认占满两列
|
||||
formItemClass: 'col-span-2',
|
||||
formItemClass: 'col-span-1',
|
||||
// 默认label宽度 px
|
||||
labelWidth: 80,
|
||||
// 通用配置项 会影响到所有表单项
|
||||
@@ -43,7 +43,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
// 在这里更改宽度
|
||||
class: 'w-[550px]',
|
||||
class: 'w-[70%]',
|
||||
fullscreenButton: false,
|
||||
onBeforeClose,
|
||||
onClosed: handleClosed,
|
||||
|
@@ -214,7 +214,16 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="row"></div>
|
||||
<div class="row">
|
||||
<div class="box">
|
||||
<div class="title">总订单数</div>
|
||||
<div class="number">13,132</div>
|
||||
<div class="percent">8.9%</div>
|
||||
</div>
|
||||
<div class="box"></div>
|
||||
<div class="box"></div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<div class="row-first">
|
||||
<div class="item1">
|
||||
<EchartsUI
|
||||
@@ -304,11 +313,26 @@ onMounted(() => {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
background-color: #962020;
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.box{
|
||||
width: 300px;
|
||||
height: 120px;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
margin: 40px 0px;
|
||||
padding: 10px;
|
||||
.title{
|
||||
font-size: 20px;
|
||||
}
|
||||
.number{
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.percent{
|
||||
font-size: 15px; }
|
||||
}
|
||||
}
|
||||
|
||||
.row-first {
|
||||
|
Reference in New Issue
Block a user