From c38065b732ac716f59fc5c6513e254ed3894b9f4 Mon Sep 17 00:00:00 2001 From: bichangxiong <3057647414@qq.com> Date: Sat, 5 Jul 2025 14:24:40 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/dev.y?= =?UTF-8?q?ml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index 2bcbbde2..6424ac0a 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -8,16 +8,22 @@ jobs: steps: - 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: fetch-depth: 1 # 只拉取最新一次提交 - name: node run: pnpm i - name: Build run: pnpm build:antd - - name: cp -# run: robocopy ./apps/web-antd/dist C:\devtool\nginx-1.28.0\html\propety /E - run: Copy-Item -Path "./apps/web-antd/dist" -Destination "C:\devtool\nginx-1.28.0\html\property" -Recurse -Force -ErrorAction SilentlyContinue - + - name: copy file via ssh password + uses: appleboy/scp-action@v0.1.7 + with: + host: 192.168.1.3 + username: root + password: by@2025! + port: 22 + source: "./apps/web-antd/dist" + target: "/project/runner/plus/antd/" + From 505bed4383e053a5bbb70f62afb4b0e7fb030004 Mon Sep 17 00:00:00 2001 From: bichangxiong <3057647414@qq.com> Date: Sat, 5 Jul 2025 14:36:56 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/dev.y?= =?UTF-8?q?ml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index 6424ac0a..99c25868 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -3,6 +3,7 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 on: [push] jobs: + Explore-Gitea-Actions: runs-on: ubuntu-22.04 steps: @@ -11,6 +12,11 @@ jobs: uses: http://47.109.37.87:3000/bichangxiong/checkout@v4 # 使用 Gitea 镜像 with: fetch-depth: 1 # 只拉取最新一次提交 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: 20.x - name: node run: pnpm i - name: Build From cfdb404ddc3793e7191800b26c5c9e81a491a191 Mon Sep 17 00:00:00 2001 From: bichangxiong <3057647414@qq.com> Date: Sat, 5 Jul 2025 17:03:15 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/dev.y?= =?UTF-8?q?ml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index 99c25868..5586602a 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -29,7 +29,7 @@ jobs: password: by@2025! port: 22 source: "./apps/web-antd/dist" - target: "/project/runner/plus/antd/" + target: "/project/wl/web/dist" From 50bc728ffb38a64b7d8c401e97374a2c6c8b32bb Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Sat, 5 Jul 2025 17:42:37 +0800 Subject: [PATCH 4/5] =?UTF-8?q?1=E3=80=81=E7=A7=9F=E8=B5=81=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/property/rentalOrder/model.d.ts | 14 +++ .../orderManagement/data.ts | 38 ++++-- .../orderManagement/index.vue | 37 +++--- .../orderManagement/order-detail.vue | 116 ++++++++++++++++++ .../orderManagement/rentalOrder-modal.vue | 39 +++--- 5 files changed, 193 insertions(+), 51 deletions(-) create mode 100644 apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/order-detail.vue diff --git a/apps/web-antd/src/api/property/rentalOrder/model.d.ts b/apps/web-antd/src/api/property/rentalOrder/model.d.ts index 4a6841a1..745d03d0 100644 --- a/apps/web-antd/src/api/property/rentalOrder/model.d.ts +++ b/apps/web-antd/src/api/property/rentalOrder/model.d.ts @@ -76,6 +76,11 @@ export interface RentalOrderVO { */ contractStatus: number; + /** + * 合同编号 + */ + contractCode: string; + /** * 签署时间 */ @@ -159,6 +164,11 @@ export interface RentalOrderForm extends BaseEntity { */ contractStatus?: number; + /** + * 合同编号 + */ + contractCode?: string; + /** * 签署时间 */ @@ -236,6 +246,10 @@ export interface RentalOrderQuery extends PageQuery { * 合同状态 */ contractStatus?: number; + /** + * 合同编号 + */ + contractCode?: string; /** * 签署时间 diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts index 812bcc3d..911dbb83 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts @@ -99,12 +99,6 @@ export const columns: VxeGridProps['columns'] = [ }, width: 100 }, - { - title: '租赁商品', - field: 'planId', - // slots: {default: 'planId'}, - width: 100 - }, { title: '支付状态', field: 'paymentStatus', @@ -135,11 +129,6 @@ export const columns: VxeGridProps['columns'] = [ }, width: 100 }, - { - title: '签署时间', - field: 'signTime', - width: 100 - }, { field: 'action', fixed: 'right', @@ -175,3 +164,30 @@ export const planInfoColumns: VxeGridProps['columns'] = [ 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' + }, +] + diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/index.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/index.vue index b8bbc44b..bf23817e 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/index.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/index.vue @@ -20,6 +20,7 @@ import type { RentalOrderForm } from '#/api/property/rentalOrder/model'; import { commonDownloadExcel } from '#/utils/file/download'; import rentalOrderModal from './rentalOrder-modal.vue'; +import orderDetailModal from './order-detail.vue'; import { columns, querySchema } from './data'; const formOptions: VbenFormProps = { @@ -31,15 +32,6 @@ const formOptions: VbenFormProps = { }, schema: querySchema(), 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 = { @@ -51,8 +43,6 @@ const gridOptions: VxeGridProps = { // 点击行选中 // trigger: 'row', }, - // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 - // columns: columns(), columns, height: 'auto', keepSource: true, @@ -84,15 +74,19 @@ const [RentalOrderModal, modalApi] = useVbenModal({ connectedComponent: rentalOrderModal, }); +const [OrderDetail, detailApi] = useVbenModal({ + connectedComponent: orderDetailModal, +}); + function handleAdd() { modalApi.setData({}); modalApi.open(); } -// async function handleEdit(row: Required) { -// modalApi.setData({ id: row.id }); -// modalApi.open(); -// } +async function handleInfo(row: Required) { + detailApi.setData({ id: row.id }); + detailApi.open(); +} async function handleDelete(row: Required) { await rentalOrderRemove(row.id); @@ -150,13 +144,13 @@ function handleDownloadExcel() { diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/order-detail.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/order-detail.vue new file mode 100644 index 00000000..a3175078 --- /dev/null +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/order-detail.vue @@ -0,0 +1,116 @@ + + + diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/rentalOrder-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/rentalOrder-modal.vue index b693c65c..4eb97d4b 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/rentalOrder-modal.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/rentalOrder-modal.vue @@ -28,7 +28,7 @@ const planList = ref([]); const plantsList = ref([]); const planProducts = ref([]); const totalAmount = ref(0); -const singleAmount = ref(0); +const singleAmount = ref('0'); const plantInfo = ref(); const title = computed(() => { return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add'); @@ -141,7 +141,7 @@ const modalSchema = [ formItemClass: 'col-span-2', componentProps: { 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 || []; return plantsList.value.map(item => ({ label: item.plantName + '-' + item.plantCode + '\xa0\xa0租金(元):' + item.rent + '\xa0\xa0库存数量:' + item.inventory, @@ -151,10 +151,20 @@ const modalSchema = [ onChange: async (value: string) => { plantInfo.value = plantsList.value.find(item => item.id === value); if (plantInfo.value) { - const formValues = await formApi.getValues(); - if (formValues.productNum) { - singleAmount.value = (plantInfo.value.rent * formValues.productNum).toFixed(2); - } + formApi.updateSchema([{ + componentProps: () => ({ + min: 1, + max: plantInfo.value?.inventory, + precision: 0, + onChange:async ()=>{ + const formValues = await formApi.getValues(); + if (formValues.productNum&&plantInfo.value?.rent) { + singleAmount.value = (plantInfo.value.rent * formValues.productNum).toFixed(2); + } + }, + }), + fieldName: 'productNum', + }]) } }, showSearch: true, @@ -172,6 +182,7 @@ const modalSchema = [ step: 1, placeholder: '租赁数量不可超出绿植产品库存数量', onChange: async (value: number) => { + console.log(value,'================vvvv') if (plantInfo.value) { singleAmount.value = (plantInfo.value.rent * value).toFixed(2); } @@ -313,7 +324,7 @@ async function handleConfirm() { data.startTime = data.rentalTime[0]; data.endTime = data.rentalTime[1]; } - + data.paymentStatus=0 await (isUpdate.value ? rentalOrderUpdate(data) : rentalOrderAdd(data)); resetInitialized(); emit('reload'); @@ -329,16 +340,6 @@ async function handleConfirm() { async function getPlanProducts(id: string) { const res = await rentalPlanInfo(id) 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) } @@ -354,7 +355,7 @@ async function handleClosed() {