Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3m1s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3m1s
This commit is contained in:
commit
171d3ef133
@ -3,21 +3,35 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
Explore-Gitea-Actions:
|
Explore-Gitea-Actions:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: http://127.0.0.1:3000/bichangxiong/checkout@v4 # 使用 Gitea 镜像
|
uses: http://47.109.37.87:3000/bichangxiong/checkout@v4 # 使用 Gitea 镜像
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1 # 只拉取最新一次提交
|
fetch-depth: 1 # 只拉取最新一次提交
|
||||||
|
|
||||||
|
- name: Set up Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 20.x
|
||||||
|
- name: pnpm
|
||||||
|
run: npm i pnpm -g
|
||||||
- name: node
|
- name: node
|
||||||
run: pnpm i
|
run: pnpm i
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm build:antd
|
run: pnpm build:antd
|
||||||
- name: cp
|
- name: copy file via ssh password
|
||||||
# run: robocopy ./apps/web-antd/dist C:\devtool\nginx-1.28.0\html\propety /E
|
uses: appleboy/scp-action@v0.1.7
|
||||||
run: Copy-Item -Path "./apps/web-antd/dist" -Destination "C:\devtool\nginx-1.28.0\html\property" -Recurse -Force -ErrorAction SilentlyContinue
|
with:
|
||||||
|
host: 192.168.1.3
|
||||||
|
username: root
|
||||||
|
password: by@2025!
|
||||||
|
port: 22
|
||||||
|
source: "./apps/web-antd/dist"
|
||||||
|
target: "/project/wl/web/dist"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,6 +76,11 @@ export interface RentalOrderVO {
|
|||||||
*/
|
*/
|
||||||
contractStatus: number;
|
contractStatus: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编号
|
||||||
|
*/
|
||||||
|
contractCode: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签署时间
|
* 签署时间
|
||||||
*/
|
*/
|
||||||
@ -159,6 +164,11 @@ export interface RentalOrderForm extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
contractStatus?: number;
|
contractStatus?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编号
|
||||||
|
*/
|
||||||
|
contractCode?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签署时间
|
* 签署时间
|
||||||
*/
|
*/
|
||||||
@ -236,6 +246,10 @@ export interface RentalOrderQuery extends PageQuery {
|
|||||||
* 合同状态
|
* 合同状态
|
||||||
*/
|
*/
|
||||||
contractStatus?: number;
|
contractStatus?: number;
|
||||||
|
/**
|
||||||
|
* 合同编号
|
||||||
|
*/
|
||||||
|
contractCode?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签署时间
|
* 签署时间
|
||||||
|
@ -99,12 +99,6 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
},
|
},
|
||||||
width: 100
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '租赁商品',
|
|
||||||
field: 'planId',
|
|
||||||
// slots: {default: 'planId'},
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '支付状态',
|
title: '支付状态',
|
||||||
field: 'paymentStatus',
|
field: 'paymentStatus',
|
||||||
@ -135,11 +129,6 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
},
|
},
|
||||||
width: 100
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '签署时间',
|
|
||||||
field: 'signTime',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@ -175,3 +164,30 @@ export const planInfoColumns: VxeGridProps['columns'] = [
|
|||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
export const rentalColumns: VxeGridProps['columns'] = [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
field: 'id',
|
||||||
|
width: 100,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '产品名称',
|
||||||
|
field: 'plantName',
|
||||||
|
minWidth: 100,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '产品租金(元)',
|
||||||
|
field: 'rent',
|
||||||
|
width: 180,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '租赁数量',
|
||||||
|
field: 'planProNumber',
|
||||||
|
width: 180,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ import type { RentalOrderForm } from '#/api/property/rentalOrder/model';
|
|||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
import { commonDownloadExcel } from '#/utils/file/download';
|
||||||
|
|
||||||
import rentalOrderModal from './rentalOrder-modal.vue';
|
import rentalOrderModal from './rentalOrder-modal.vue';
|
||||||
|
import orderDetailModal from './order-detail.vue';
|
||||||
import { columns, querySchema } from './data';
|
import { columns, querySchema } from './data';
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
const formOptions: VbenFormProps = {
|
||||||
@ -31,15 +32,6 @@ const formOptions: VbenFormProps = {
|
|||||||
},
|
},
|
||||||
schema: querySchema(),
|
schema: querySchema(),
|
||||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||||
// 处理区间选择器RangePicker时间格式 将一个字段映射为两个字段 搜索/导出会用到
|
|
||||||
// 不需要直接删除
|
|
||||||
// fieldMappingTime: [
|
|
||||||
// [
|
|
||||||
// 'createTime',
|
|
||||||
// ['params[beginTime]', 'params[endTime]'],
|
|
||||||
// ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
|
|
||||||
// ],
|
|
||||||
// ],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const gridOptions: VxeGridProps = {
|
const gridOptions: VxeGridProps = {
|
||||||
@ -51,8 +43,6 @@ const gridOptions: VxeGridProps = {
|
|||||||
// 点击行选中
|
// 点击行选中
|
||||||
// trigger: 'row',
|
// trigger: 'row',
|
||||||
},
|
},
|
||||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
||||||
// columns: columns(),
|
|
||||||
columns,
|
columns,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
keepSource: true,
|
keepSource: true,
|
||||||
@ -84,15 +74,19 @@ const [RentalOrderModal, modalApi] = useVbenModal({
|
|||||||
connectedComponent: rentalOrderModal,
|
connectedComponent: rentalOrderModal,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const [OrderDetail, detailApi] = useVbenModal({
|
||||||
|
connectedComponent: orderDetailModal,
|
||||||
|
});
|
||||||
|
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
modalApi.setData({});
|
modalApi.setData({});
|
||||||
modalApi.open();
|
modalApi.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
// async function handleEdit(row: Required<RentalOrderForm>) {
|
async function handleInfo(row: Required<RentalOrderForm>) {
|
||||||
// modalApi.setData({ id: row.id });
|
detailApi.setData({ id: row.id });
|
||||||
// modalApi.open();
|
detailApi.open();
|
||||||
// }
|
}
|
||||||
|
|
||||||
async function handleDelete(row: Required<RentalOrderForm>) {
|
async function handleDelete(row: Required<RentalOrderForm>) {
|
||||||
await rentalOrderRemove(row.id);
|
await rentalOrderRemove(row.id);
|
||||||
@ -150,13 +144,13 @@ function handleDownloadExcel() {
|
|||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
<!-- <ghost-button-->
|
<ghost-button
|
||||||
<!-- v-access:code="['property:rentalOrder:edit']"-->
|
v-access:code="['property:rentalOrder:info']"
|
||||||
<!-- @click.stop="handleEdit(row)"-->
|
@click.stop="handleInfo(row)">
|
||||||
<!-- >-->
|
{{ $t('pages.common.info') }}
|
||||||
<!-- {{ $t('pages.common.edit') }}-->
|
</ghost-button>
|
||||||
<!-- </ghost-button>-->
|
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
|
:disabled="row.paymentStatus==1&&row.contractStatus==1"
|
||||||
:get-popup-container="getVxePopupContainer"
|
:get-popup-container="getVxePopupContainer"
|
||||||
placement="left"
|
placement="left"
|
||||||
title="确认删除?"
|
title="确认删除?"
|
||||||
@ -174,5 +168,6 @@ function handleDownloadExcel() {
|
|||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<RentalOrderModal @reload="tableApi.query()" />
|
<RentalOrderModal @reload="tableApi.query()" />
|
||||||
|
<OrderDetail></OrderDetail>
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
@ -0,0 +1,116 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
import {ref, shallowRef} from 'vue';
|
||||||
|
|
||||||
|
import {useVbenModal} from '@vben/common-ui';
|
||||||
|
|
||||||
|
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import duration from 'dayjs/plugin/duration';
|
||||||
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||||
|
|
||||||
|
import {renderDict} from "#/utils/render";
|
||||||
|
import type {RentalOrderVO} from "#/api/property/rentalOrder/model";
|
||||||
|
import {rentalOrderInfo} from "#/api/property/rentalOrder";
|
||||||
|
import {rentalColumns} from "./data";
|
||||||
|
import {Table} from "ant-design-vue";
|
||||||
|
|
||||||
|
dayjs.extend(duration);
|
||||||
|
dayjs.extend(relativeTime);
|
||||||
|
|
||||||
|
const planProducts=ref([]);
|
||||||
|
|
||||||
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
|
onOpenChange: handleOpenChange,
|
||||||
|
onClosed() {
|
||||||
|
orderDetail.value = null;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const orderDetail = shallowRef<null |RentalOrderVO>(null);
|
||||||
|
|
||||||
|
async function handleOpenChange(open: boolean) {
|
||||||
|
if (!open) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
modalApi.modalLoading(true);
|
||||||
|
|
||||||
|
const {id} = modalApi.getData() as { id: number | string };
|
||||||
|
// 赋值
|
||||||
|
orderDetail.value = await rentalOrderInfo(id);
|
||||||
|
planProducts.value=orderDetail.value?.productList
|
||||||
|
|
||||||
|
modalApi.modalLoading(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<BasicModal :footer="false" :fullscreen-button="false" title="租赁订单信息" class="w-[70%]">
|
||||||
|
<Descriptions v-if="orderDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||||
|
<DescriptionsItem label="订单号">
|
||||||
|
{{ orderDetail.orderNo }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="客户名称">
|
||||||
|
{{ orderDetail.customerName }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="客户类型" v-if="orderDetail.type!=null">
|
||||||
|
<component
|
||||||
|
:is="renderDict(orderDetail.customerType,'wy_khlx')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="租赁周期">
|
||||||
|
{{ orderDetail.rentalPeriod}}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="租赁时间" :span="2">
|
||||||
|
{{dayjs(orderDetail.startTime).format("YYYY-MM-DD")+' 至 '+dayjs(orderDetail.endTime).format("YYYY-MM-DD")}}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="总金额">
|
||||||
|
{{ orderDetail.totalAmount +"元"}}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="租赁方式">
|
||||||
|
<component
|
||||||
|
:is="renderDict(orderDetail.rentalType,'wy_zlfs')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="支付状态">
|
||||||
|
<component
|
||||||
|
:is="renderDict(orderDetail.paymentStatus,'pro_charging_status')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="是否续租">
|
||||||
|
<component
|
||||||
|
:is="renderDict(orderDetail.isRelet,'wy_sf')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="合同状态">
|
||||||
|
<component
|
||||||
|
:is="renderDict(orderDetail.contractStatus,'wy_htzt')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="合同编号" v-if="orderDetail.contractStatus!='1'">
|
||||||
|
{{ orderDetail.contractCode ?? '无' }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="签署时间" v-if="orderDetail.contractStatus!='1'">
|
||||||
|
{{ orderDetail.signTime ?? '无' }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
</Descriptions>
|
||||||
|
<div v-if="planProducts.length">
|
||||||
|
<div style="margin: 10px 0;font-weight: 500">
|
||||||
|
订单产品详情
|
||||||
|
</div>
|
||||||
|
<Table :dataSource="planProducts" :columns="rentalColumns" :pagination="false"
|
||||||
|
bordered size="small">
|
||||||
|
<template #bodyCell="{ column, record, index }">
|
||||||
|
<template v-if="column.field === 'id'">
|
||||||
|
{{ index + 1 }}
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ record[column.field] }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</Table>
|
||||||
|
</div>
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
@ -28,7 +28,7 @@ const planList = ref<RentalPlanVO[]>([]);
|
|||||||
const plantsList = ref<PropertyVO[]>([]);
|
const plantsList = ref<PropertyVO[]>([]);
|
||||||
const planProducts = ref<any[]>([]);
|
const planProducts = ref<any[]>([]);
|
||||||
const totalAmount = ref(0);
|
const totalAmount = ref(0);
|
||||||
const singleAmount = ref(0);
|
const singleAmount = ref('0');
|
||||||
const plantInfo = ref<PropertyVO>();
|
const plantInfo = ref<PropertyVO>();
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||||
@ -141,7 +141,7 @@ const modalSchema = [
|
|||||||
formItemClass: 'col-span-2',
|
formItemClass: 'col-span-2',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: async () => {
|
api: async () => {
|
||||||
const res = await plantsProductList({pageNum: 1, pageSize: 1000, inventory: 1});
|
const res = await plantsProductList({pageNum: 1, pageSize: 1000, inventory: 0});
|
||||||
plantsList.value = res.rows || [];
|
plantsList.value = res.rows || [];
|
||||||
return plantsList.value.map(item => ({
|
return plantsList.value.map(item => ({
|
||||||
label: item.plantName + '-' + item.plantCode + '\xa0\xa0租金(元):' + item.rent + '\xa0\xa0库存数量:' + item.inventory,
|
label: item.plantName + '-' + item.plantCode + '\xa0\xa0租金(元):' + item.rent + '\xa0\xa0库存数量:' + item.inventory,
|
||||||
@ -151,10 +151,20 @@ const modalSchema = [
|
|||||||
onChange: async (value: string) => {
|
onChange: async (value: string) => {
|
||||||
plantInfo.value = plantsList.value.find(item => item.id === value);
|
plantInfo.value = plantsList.value.find(item => item.id === value);
|
||||||
if (plantInfo.value) {
|
if (plantInfo.value) {
|
||||||
|
formApi.updateSchema([{
|
||||||
|
componentProps: () => ({
|
||||||
|
min: 1,
|
||||||
|
max: plantInfo.value?.inventory,
|
||||||
|
precision: 0,
|
||||||
|
onChange:async ()=>{
|
||||||
const formValues = await formApi.getValues();
|
const formValues = await formApi.getValues();
|
||||||
if (formValues.productNum) {
|
if (formValues.productNum&&plantInfo.value?.rent) {
|
||||||
singleAmount.value = (plantInfo.value.rent * formValues.productNum).toFixed(2);
|
singleAmount.value = (plantInfo.value.rent * formValues.productNum).toFixed(2);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
fieldName: 'productNum',
|
||||||
|
}])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
@ -172,6 +182,7 @@ const modalSchema = [
|
|||||||
step: 1,
|
step: 1,
|
||||||
placeholder: '租赁数量不可超出绿植产品库存数量',
|
placeholder: '租赁数量不可超出绿植产品库存数量',
|
||||||
onChange: async (value: number) => {
|
onChange: async (value: number) => {
|
||||||
|
console.log(value,'================vvvv')
|
||||||
if (plantInfo.value) {
|
if (plantInfo.value) {
|
||||||
singleAmount.value = (plantInfo.value.rent * value).toFixed(2);
|
singleAmount.value = (plantInfo.value.rent * value).toFixed(2);
|
||||||
}
|
}
|
||||||
@ -313,7 +324,7 @@ async function handleConfirm() {
|
|||||||
data.startTime = data.rentalTime[0];
|
data.startTime = data.rentalTime[0];
|
||||||
data.endTime = data.rentalTime[1];
|
data.endTime = data.rentalTime[1];
|
||||||
}
|
}
|
||||||
|
data.paymentStatus=0
|
||||||
await (isUpdate.value ? rentalOrderUpdate(data) : rentalOrderAdd(data));
|
await (isUpdate.value ? rentalOrderUpdate(data) : rentalOrderAdd(data));
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
emit('reload');
|
emit('reload');
|
||||||
@ -329,16 +340,6 @@ async function handleConfirm() {
|
|||||||
async function getPlanProducts(id: string) {
|
async function getPlanProducts(id: string) {
|
||||||
const res = await rentalPlanInfo(id)
|
const res = await rentalPlanInfo(id)
|
||||||
plantsList.value=res.productList;
|
plantsList.value=res.productList;
|
||||||
// planProducts.value = [{
|
|
||||||
// plantName: '发财树',
|
|
||||||
// inventory: 3,
|
|
||||||
// rent: 10,
|
|
||||||
// }, {
|
|
||||||
// plantName: '绿萝',
|
|
||||||
// inventory: 5,
|
|
||||||
// rent: 3,
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
totalAmount.value = planProducts.value?.reduce((sum, item: any) => sum + (item.rent * item.inventory), 0).toFixed(2)
|
totalAmount.value = planProducts.value?.reduce((sum, item: any) => sum + (item.rent * item.inventory), 0).toFixed(2)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -354,7 +355,7 @@ async function handleClosed() {
|
|||||||
<BasicModal :title="title">
|
<BasicModal :title="title">
|
||||||
<BasicForm>
|
<BasicForm>
|
||||||
<template #planInfo="slotProps">
|
<template #planInfo="slotProps">
|
||||||
<div v-if="planProducts.length" style="width: 100%">
|
<div v-if="planProducts.length" style="width: 100%" v-bind="slotProps">
|
||||||
<Table :dataSource="planProducts" :columns="planInfoColumns" :pagination="false"
|
<Table :dataSource="planProducts" :columns="planInfoColumns" :pagination="false"
|
||||||
bordered size="small">
|
bordered size="small">
|
||||||
<template #bodyCell="{ column, record, index }">
|
<template #bodyCell="{ column, record, index }">
|
||||||
@ -375,7 +376,7 @@ async function handleClosed() {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #totalAmount="slotProps">
|
<template #totalAmount="slotProps">
|
||||||
<div>{{ singleAmount }}</div>
|
<div v-bind="slotProps">{{ singleAmount }}</div>
|
||||||
</template>
|
</template>
|
||||||
</BasicForm>
|
</BasicForm>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
|
Loading…
Reference in New Issue
Block a user