Przeglądaj źródła

更新租房合同管理收据模块新增电费收费输入入口

丁烨烨 6 miesięcy temu
rodzic
commit
983fbfa7b1

+ 3 - 3
src/stores/permissionStore.ts

@@ -20,9 +20,9 @@ export const usePermissionStore = defineStore('permission', () => {
   const params = new URLSearchParams(search)
   const getUserPermission = async () => {
 
-    // if (!params.get('appId') || !params.get('appToken')) {
-    //   return
-    // }
+    if (!params.get('appId') || !params.get('appToken')) {
+      return
+    }
     const res = await clientPost<null, PermissionReponse>(
       '/userPermissions/queryUserPermissions',
       null,

+ 3 - 3
src/views/zf/zflb.vue

@@ -397,10 +397,10 @@ onMounted(() => {
 
                 <el-col :xs="24" :sm="12" :md="2">
                   <div class="mb-4">
-                    <label class="block text-sm font-medium text-gray-700 mb-2">房</label>
-                    <el-input-number
+                    <label class="block text-sm font-medium text-gray-700 mb-2">房间名称</label>
+                    <el-input
                       v-model="filters.houseName"
-                      placeholder="房"
+                      placeholder="房间名称"
                       :min="1"
                       :max="9999"
                       class="w-full"

+ 78 - 5
src/views/zfgl/zfhtgl.vue

@@ -72,7 +72,7 @@ interface CanBeReceiptDataReponse extends BaseResponse {
   }
 }
 
-type paymentReasonType = '房屋租赁费用' | '押金' | '物业费' | '水费'
+type paymentReasonType = '房屋租赁费用' | '押金' | '物业费' | '水费' | '电费'
 
 interface ReceiptDto {
   paymentUnit: string // 交款单位
@@ -82,6 +82,7 @@ interface ReceiptDto {
   zj: number // 租金
   wyf: number // 物业费
   sf: number // 水费
+  df: number // 电费
   paymentReason: paymentReasonType[] // 付款事由
   rzrq: string //入账日期
   operator: string
@@ -137,6 +138,9 @@ const MINIO_URL = import.meta.env.VITE_MINIO_BASE_URL
 // 搜索表单
 const searchForm = reactive({
   contractNumber: '',
+  houseName: '',
+  assetType: '',
+  building: '',
 })
 
 // 预览相关
@@ -179,6 +183,7 @@ const receiptForm = reactive<ReceiptDto>({
   zj: 0,
   wyf: 0,
   sf: 0,
+  df: 0,
   paymentReason: ['房屋租赁费用', '押金'],
   rzrq: '',
   operator: userInfo.value?.personName,
@@ -209,6 +214,9 @@ const receiptFormRules = computed(() => {
   if (receiptForm.paymentReason.includes('水费')) {
     rules.sf = [{ required: true, message: '请填写水费金额', trigger: 'blur' }]
   }
+  if (receiptForm.paymentReason.includes('电费')) {
+    rules.df = [{ required: true, message: '请填写电费金额', trigger: 'blur' }]
+  }
 
   return rules
 })
@@ -253,6 +261,7 @@ const paymentReasons = [
   { label: '押金', value: '押金' },
   { label: '物业费', value: '物业费' },
   { label: '水费', value: '水费' },
+  { label: '电费', value: '电费' },
 ]
 
 // 获取文件类型
@@ -290,6 +299,9 @@ const getList = async () => {
         pageNum: number
         pageSize: number
         contractNumber: string
+        houseName:string
+        assetType: string
+        building: string
       },
       AContractInfoListResponse
     >('/acontractInfo/findByPage', {
@@ -297,6 +309,9 @@ const getList = async () => {
         pageNum: currentPage.value,
         pageSize: pageSize.value,
         contractNumber: searchForm.contractNumber,
+        houseName: searchForm.houseName,
+        assetType: searchForm.assetType,
+        building: searchForm.building,
       },
     })
     if (response.code === 200 && response.data) {
@@ -359,6 +374,7 @@ const handleSearch = () => {
 // 重置搜索
 const handleReset = () => {
   searchForm.contractNumber = ''
+  searchForm.houseName = ''
   currentPage.value = 1
   getList()
 }
@@ -706,6 +722,7 @@ const openReceiptDialog = async (contractId: string, contractNumber: string) =>
     zj: 0,
     wyf: 0,
     sf: 0,
+    df: 0,
     paymentReason: ['房屋租赁费用', '押金'],
     rzrq: '',
     operator: userInfo.value?.personName,
@@ -751,6 +768,11 @@ const calculateTotalAmount = () => {
   if (receiptForm.paymentReason.includes('水费')) {
     total += receiptForm.sf
   }
+  if (receiptForm.paymentReason.includes('电费')) {
+    total += receiptForm.df
+  }
+
+
 
   receiptForm.rmb = total
 }
@@ -780,6 +802,8 @@ watch(
           receiptForm.wyf = 0
         } else if (reason === '水费') {
           receiptForm.sf = 0
+        } else if (reason === '电费') {
+          receiptForm.df = 0
         }
       })
     }
@@ -876,6 +900,7 @@ const closeReceiptDialog = () => {
     zj: 0,
     wyf: 0,
     sf: 0,
+    df: 0,
     paymentReason: ['房屋租赁费用', '押金'],
     rzrq: '',
     operator: userInfo.value?.personName,
@@ -1105,19 +1130,52 @@ onMounted(() => {
     <!-- 搜索区域 -->
     <ElCard class="mb-6" shadow="never">
       <ElForm :model="searchForm" inline class="bg-gray-50 p-5 rounded-lg">
-        <ElFormItem label="合同编号">
+        <ElFormItem label="合同编号:" size="default">
           <ElInput
             v-model="searchForm.contractNumber"
             placeholder="请输入合同编号"
             clearable
             class="w-50"
+            size="default"
             @keyup.enter="handleSearch"
           />
         </ElFormItem>
+          <ElFormItem label="资产类型" size="default">
+            <el-select
+              v-model="searchForm.assetType"
+              placeholder="请选择资产类型"
+              clearable
+              style="width: 10rem"
+              size="default"
+            >
+              <el-option label="公租房" value="公租房" />
+              <el-option label="厂房" value="厂房" />
+              <el-option label="创新创业基地" value="创新创业基地" />
+            </el-select>
+          </ElFormItem>
+          <ElFormItem label="楼栋" size="default">
+            <el-input
+              v-model="searchForm.building"
+              style="width: 240px"
+              size="default"
+              placeholder="请输入楼栋"
+              clearable
+            />
+          </ElFormItem>
+
+          <ElFormItem label="房间名称" size="default">
+            <el-input
+              v-model="searchForm.houseName"
+              style="width: 240px"
+              size="default"
+              placeholder="请输入房间名称"
+              clearable
+            />
+          </ElFormItem>
         <ElFormItem>
           <ElSpace>
-            <ElButton type="primary" :icon="Search" @click="handleSearch">搜索</ElButton>
-            <ElButton :icon="RefreshCw" @click="handleReset">重置</ElButton>
+            <ElButton type="primary" :icon="Search" @click="handleSearch" size="default">搜索</ElButton>
+            <ElButton :icon="RefreshCw" @click="handleReset" size="default">重置</ElButton>
           </ElSpace>
         </ElFormItem>
       </ElForm>
@@ -1569,6 +1627,21 @@ onMounted(() => {
                 @change="handleAmountChange"
               />
             </ElFormItem>
+
+            <ElFormItem
+              label="电费(元)"
+              v-if="receiptForm.paymentReason.includes('电费')"
+              prop="df"
+            >
+              <ElInputNumber
+                v-model="receiptForm.df"
+                :min="0"
+                :precision="2"
+                style="width: 100%"
+                @change="handleAmountChange"
+              />
+            </ElFormItem>
+
             <ElFormItem label="入账日期" prop="rzrq">
               <ElDatePicker
                 v-model="receiptForm.rzrq"
@@ -1589,7 +1662,7 @@ onMounted(() => {
               readonly
               class="total-amount"
             />
-            <div class="text-sm text-gray-500 mt-1">总金额 = 押金 + 租金 + 物业费 + 水费</div>
+            <div class="text-sm text-gray-500 mt-1">总金额 = 押金 + 租金 + 物业费 + 水费 + 电费</div>
           </ElFormItem>
         </ElForm>
       </div>

+ 2 - 2
vite.config.ts

@@ -31,8 +31,8 @@ export default defineConfig({
   server: {
     proxy: {
       '/api': {
-        target: 'http://192.168.110.93:8801',
-        // target: 'http://192.168.110.235:8801',
+        // target: 'http://192.168.110.93:8801',
+        target: 'http://192.168.110.235:8801',
 
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/api/, ''),