jiangping
2024-12-05 4b3bf67505b0ecd38c432dc0fb2036fdd4d3c1e4
Merge remote-tracking branch 'origin/master'
已修改13个文件
273 ■■■■■ 文件已修改
admin/.env 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/.env.test 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/business/company.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/contract.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/layouts/AppLayout.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/contract/components/contractDetail.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/contract/components/contractEdit.vue 108 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/contract/components/terminateLease.vue 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/contract/contractList.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/components/bullDetail.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/components/companyEdit.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/components/flowingWater.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/payments.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/.env
@@ -3,8 +3,8 @@
# 路由方式
VUE_APP_ROUTER_MODE = 'hash'
# 项目上下文路径
VUE_APP_CONTEXT_PATH = '/fn_admin/#/'
# 项目上下文路径 fn_admin/#/
VUE_APP_CONTEXT_PATH = '/'
# 接口前缀
VUE_APP_API_PREFIX = '/gateway_interface'
admin/.env.test
@@ -3,6 +3,11 @@
# VUE_APP_API_URL  = 'http://192.168.5.13/gateway_interface'
VUE_APP_API_URL  = 'http://192.168.0.163:10010/'
# 任康
# VUE_APP_API_URL  = 'http://192.168.0.163:10010/'
# VUE_APP_API_URL  = 'http://192.168.0.108:10030/'
# 萍姐
VUE_APP_API_URL  = 'http://192.168.0.105:10010/'
# 测试服务
# VUE_APP_API_URL  = 'https://dmtest.ahapp.net/gateway_interface'
admin/src/api/business/company.js
@@ -74,3 +74,8 @@
    }
  })
}
// 根据ID查询
export function getById (id) {
  return request.get(`/visitsAdmin/cloudService/business/company/${id}`)
}
admin/src/api/contract.js
@@ -42,3 +42,7 @@
  return request.post('/visitsAdmin/cloudService/business/ywContractBill/getCanBackBill', data)
}
// 查询账单
export function findForBills (data) {
  return request.post('/visitsAdmin/cloudService/business/ywContract/findForBills', data)
}
admin/src/layouts/AppLayout.vue
@@ -58,7 +58,7 @@
  display: flex;
  // overflow: hidden;
  overflow: scroll;
  /*overflow: scroll;*/
  // 左边菜单
  .el-aside {
    width: $menu-width !important;
admin/src/views/contract/components/contractDetail.vue
@@ -113,12 +113,17 @@
        </div>
        <div class="item">
          <div class="la">免租期</div>
          <div class="val">{{ info.zlFreeStartDate }} ~ {{ info.zlFreeEndDate }}</div>
          <div class="val" v-if="info.zlFreeStartDate && info.zlFreeEndDate">
            {{ info.zlFreeStartDate }} ~ {{ info.zlFreeEndDate }}
          </div>
          <div class="val" v-else>
            -
          </div>
        </div>
      </div>
      <el-table :data="info.zlDetailList" stripe style="margin-bottom: 20px;" v-if="info.type === 2 || info.type === 0">
        <el-table-column prop="startDate" label="开始日期" min-width="100" show-overflow-tooltip />
        <el-table-column prop="endDate" label="结束日期" min-width="100" show-overflow-tooltip />
        <el-table-column prop="startDate" label="开始日期" :key="Date.now()" min-width="100" show-overflow-tooltip />
        <el-table-column prop="endDate" label="结束日期" :key="Date.now()" min-width="100" show-overflow-tooltip />
        <el-table-column label="合同单价" min-width="100" show-overflow-tooltip>
          <template slot-scope="{row}">
            {{row.price}} {{returnUnit(row.circleType)}}
@@ -126,7 +131,9 @@
        </el-table-column>
        <el-table-column label="付款提前天数" min-width="100" show-overflow-tooltip>
          <template slot-scope="{row}">
            <template v-if="row.advanceDays">
            {{row.advanceDays}}天
            </template>
          </template>
        </el-table-column>
      </el-table>
@@ -149,8 +156,8 @@
        </div>
      </div>
      <el-table :data="info.wyDetailList" stripe style="margin-bottom: 20px;" v-if="info.type === 1 || info.type === 0">
        <el-table-column prop="startDate" label="开始日期" min-width="100" show-overflow-tooltip />
        <el-table-column prop="endDate" label="结束日期" min-width="100" show-overflow-tooltip />
        <el-table-column prop="startDate" label="开始日期" :key="Date.now()" min-width="100" show-overflow-tooltip />
        <el-table-column prop="endDate" label="结束日期" :key="Date.now()" min-width="100" show-overflow-tooltip />
        <el-table-column label="合同单价" min-width="100" show-overflow-tooltip>
          <template slot-scope="{row}">
            {{row.price}} {{returnUnit(row.circleType)}}
@@ -402,7 +409,6 @@
      })
    },
    changeType (e) {
      console.log(e)
      this.type = e
      this.page = 1
      this.pageSize = 10
admin/src/views/contract/components/contractEdit.vue
@@ -127,7 +127,7 @@
                  <el-input v-model="form.zlDeposit" @input="clearzl" placeholder="请输入" v-trim />
                </el-form-item>
                <el-form-item label="付款方式" prop="zlPayType">
                  <el-select v-model="form.zlPayType" @change="clearzl" placeholder="请选择">
                  <el-select v-model="form.zlPayType" @change="changePayType" placeholder="请选择">
                    <el-option v-for="(item, index) in payMethods" :key="index" :value="item.value" :label="item.name"></el-option>
                  </el-select>
                </el-form-item>
@@ -216,7 +216,7 @@
                  <el-input v-model="form.wyDeposit" @input="clearwy" placeholder="请输入" v-trim />
                </el-form-item>
                <el-form-item label="付款方式" prop="wyPayType">
                  <el-select v-model="form.wyPayType" @change="clearwy" placeholder="请选择">
                  <el-select v-model="form.wyPayType" @change="changePayType1" placeholder="请选择">
                    <el-option v-for="(item, index) in payMethods" :key="index" :value="item.value" :label="item.name"></el-option>
                  </el-select>
                </el-form-item>
@@ -241,7 +241,7 @@
                  }">
                    <el-input placeholder="请输入" @input="clearwy" v-model="wyDetailList.price">
                      <el-select v-model="wyDetailList.circleType" @change="clearwy" style="width: 150px;" slot="append" placeholder="请选择">
                        <el-option v-for="(item, index) in unitOps" :key="index" :value="item.value" :label="item.name"></el-option>
                        <el-option v-for="(item, index) in unitOps1" :key="index" :value="item.value" :label="item.name"></el-option>
                      </el-select>
                    </el-input>
                  </el-form-item>
@@ -340,7 +340,7 @@
        startDate: '',
        endDate: '',
        projectId: '',
        roundedUp: '',
        roundedUp: 0,
        companyId: '',
        renterId: '',
        renterName: '',
@@ -423,6 +423,15 @@
        { name: '元/m²·年', value: 2 },
        { name: '元/场', value: 6 },
      ],
      unitOps1: [
        { name: '元/m²·天', value: 0 },
        { name: '元/m²·月', value: 1 },
        { name: '元/天', value: 3 },
        { name: '元/月', value: 4 },
        { name: '元/年', value: 5 },
        { name: '元/m²·年', value: 2 },
        { name: '元/场', value: 6 },
      ],
      
      houseLvThree: []
    }
@@ -473,8 +482,65 @@
            advanceDays: ''
          }
        ]
        this.form.roundedUp = 0
        // this.getHouseTree()
      })
    },
    changePayType (e) {
      if (e === 0) {
        this.unitOps = [
          { name: '元/m²·天', value: 0 },
          { name: '元/m²·月', value: 1 },
          { name: '元/天', value: 3 },
          { name: '元/月', value: 4 },
          { name: '元/年', value: 5 },
          { name: '元/m²·年', value: 2 },
          { name: '元/场', value: 6 },
        ]
      } else {
        this.form.zlDetailList.forEach(item => {
          if (item.circleType === 6) {
            item.circleType = 0
          }
        })
        this.unitOps = [
          { name: '元/m²·天', value: 0 },
          { name: '元/m²·月', value: 1 },
          { name: '元/天', value: 3 },
          { name: '元/月', value: 4 },
          { name: '元/年', value: 5 },
          { name: '元/m²·年', value: 2 }
        ]
      }
      this.clearzl()
    },
    changePayType1 (e) {
      if (e === 0) {
        this.unitOps1 = [
          { name: '元/m²·天', value: 0 },
          { name: '元/m²·月', value: 1 },
          { name: '元/天', value: 3 },
          { name: '元/月', value: 4 },
          { name: '元/年', value: 5 },
          { name: '元/m²·年', value: 2 },
          { name: '元/场', value: 6 },
        ]
      } else {
        this.form.wyDetailList.forEach(item => {
          if (item.circleType === 6) {
            item.circleType = 0
          }
        })
        this.unitOps1 = [
          { name: '元/m²·天', value: 0 },
          { name: '元/m²·月', value: 1 },
          { name: '元/天', value: 3 },
          { name: '元/月', value: 4 },
          { name: '元/年', value: 5 },
          { name: '元/m²·年', value: 2 }
        ]
      }
      this.clearwy()
    },
    // 获取联系人
    getYwList () {
@@ -487,6 +553,16 @@
    getHouseData () {
      if (this.form.startDate && this.form.endDate) {
        this.getHouseTree()
        if (this.form.zlDetailList.length === 1) {
          this.form.zlDetailList[0].startDate = this.form.startDate
          this.form.zlDetailList[0].endDate = this.form.endDate
          this.form.zlDetailList[0].time = [this.form.startDate, this.form.endDate]
        }
        if (this.form.wyDetailList.length === 1) {
          this.form.wyDetailList[0].startDate = this.form.startDate
          this.form.wyDetailList[0].endDate = this.form.endDate
          this.form.wyDetailList[0].time = [this.form.startDate, this.form.endDate]
        }
      }
    },
    changeType (e) {
@@ -499,35 +575,13 @@
    getDayTime (num) {
      const today = new Date();
      const year = today.getFullYear();
      const month = today.getMonth() + 1; // 月份是从 0 开始的,因此需要加 1
      const month = today.getMonth() + 1;
      const day = today.getDate();
      if (!num) {
        return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
      } else {
        return `${year + 1}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day - 1 : day - 1}`;
      }
    },
    clearData () {
      this.form.zlDetailList = [
        {
          circleType: 0,
          startDate: this.form.startDate,
          endDate: this.form.endDate,
          time: [this.form.startDate, this.form.endDate],
          price: '',
          advanceDays: ''
        }
      ]
      this.form.wyDetailList = [
        {
          circleType: 0,
          startDate: this.form.startDate,
          endDate: this.form.endDate,
          time: [this.form.startDate, this.form.endDate],
          price: '',
          advanceDays: ''
        }
      ]
    },
    clearzl () {
      this.zlList = []
admin/src/views/contract/components/terminateLease.vue
@@ -121,7 +121,7 @@
                        <div style="display: flex; align-items: center;">
                            <el-tag type="success" v-if="row.billType === 0">收</el-tag>
                            <el-tag type="warning" v-if="row.billType === 1">付</el-tag>
                            <span style="margin-left: 10px;">{{row.price}}</span>
                            <span style="margin-left: 10px;">{{Math.abs(row.price)}}</span>
                        </div>
                    </template>
                </el-table-column>
@@ -155,9 +155,12 @@
                        {{row.startDate}} ~ {{row.endDate}}
                    </template>
                </el-table-column>
<!--                prop="receivableFee"-->
                <el-table-column
                    prop="receivableFee"
                    label="应收金额">
                    <template slot-scope="{row}">
                        0
                    </template>
                </el-table-column>
                <el-table-column
                    prop="actReceivableFee"
@@ -197,7 +200,7 @@
  import AddCollectionBill from './addCollectionBill'
  import AddPaymentBill from './addPaymentBill'
  import { getUserList } from '@/api/system/user'
  import { backRent, getCanBackBill } from '@/api/contract'
  import { backRent, getCanBackBill, findForBills } from '@/api/contract'
  import { mapState } from 'vuex'
  export default {
    name: "terminateLease",
@@ -255,36 +258,24 @@
        this.info = info
        this.form.id = info.id
        this.form.btSignDate = this.getDay()
        console.log(this.userInfo)
        this.form.btUserId = this.userInfo.id
        this.$nextTick(() => {
          this.$refs.form.resetFields()
        })
        this.info.canBackRentBills.forEach(item => {
          if ([2,3,7].includes(item.costType)) {
            this.$set(item, 'billType', 1)
            this.$set(item, 'price', item.actReceivableFee)
          } else {
            this.$set(item, 'receivableFeeCopy', item.receivableFee)
            this.$set(item, 'receivableFee', item.needReceivableFee)
            this.$set(item, 'price', item.needReceivableFee)
          }
        })
        this.info.terminateList = this.info.canBackRentBills.filter(item => {
          if ([0,1,4,5,6].includes(item.costType)) {
            item.billTypeCopy = JSON.parse(JSON.stringify(item.billType))
            return item
          }
        })
        this.info.depositList = this.info.canBackRentBills.filter(item => {
          if ([2,3,7].includes(item.costType)) {
            item.billTypeCopy = JSON.parse(JSON.stringify(item.billType))
            return item
          }
        })
        this.info.terminateList = []
        this.info.depositList = []
        this.form.btDate = this.getDay()
        this.countData()
        this.getUser()
        this.changeBtDate(this.form.btDate)
        this.visible = true
      },
      getDayTime () {
        const today = new Date();
        const year = today.getFullYear();
        const month = today.getMonth() + 1;
        const day = today.getDate();
        return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
      },
      countData () {
        const arr = [...this.info.terminateList, ...this.info.depositList]
@@ -292,9 +283,9 @@
        let total2 = 0
        arr.forEach(item => {
          if (item.billType === 0) {
            total1 += Number(item.price)
            total1 += Math.abs(Number(item.price))
          } else if (item.billType === 1) {
            total2 += Number(item.price)
            total2 += Math.abs(Number(item.price))
          }
        })
        this.receivable = total1.toFixed(2)
@@ -303,7 +294,7 @@
      getDay () {
        const today = new Date();
        const year = today.getFullYear();
        const month = today.getMonth() + 1; // 月份是从 0 开始的,因此需要加 1
        const month = today.getMonth() + 1;
        const day = today.getDate();
        return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
      },
@@ -331,19 +322,33 @@
          billTypeCopy: 1
        }, { startDate: this.info.startDate, endDate: this.form.btDate })
      },
      changeBtDate (planPayDateEnd) {
      changeBtDate (btDate) {
        this.loading = true
        getCanBackBill({
          contractId: this.info.id,
          planPayDateEnd
        findForBills({
          id: this.info.id,
          btDate
        }).then(res => {
          res.forEach(item => {
          res.canBackRentBills.forEach(item => {
            if ([2,3,7].includes(item.costType)) {
              this.$set(item, 'billType', 1)
              this.$set(item, 'price', item.actReceivableFee)
            } else {
            this.$set(item, 'receivableFeeCopy', item.receivableFee)
            this.$set(item, 'receivableFee', item.needReceivableFee)
            this.$set(item, 'price', item.needReceivableFee)
              this.$set(item, 'price', (item.needReceivableFee - item.actReceivableFee).toFixed(2))
            }
          })
          this.info.terminateList = res.filter(item => {
          this.info.terminateList = res.canBackRentBills.filter(item => {
            if ([0,1,4,5,6].includes(item.costType)) {
              item.billTypeCopy = JSON.parse(JSON.stringify(item.billType))
              if (Number(item.price) < 0) {
                item.billType = 1
              }
              return item
            }
          })
          this.info.depositList = res.canBackRentBills.filter(item => {
            if ([2,3,7].includes(item.costType)) {
              item.billTypeCopy = JSON.parse(JSON.stringify(item.billType))
              return item
            }
@@ -354,11 +359,10 @@
        })
      },
      getObjS (obj) {
        console.log(obj)
        obj.startDate = obj.startDate.substring(0, 10)
        obj.endDate = obj.endDate.substring(0, 10)
        this.info.terminateList.push(obj)
        // this.info.terminateList.forEach(item => {
        //   item.receivableFee = Number(item.receivableFee) + 1
        //   item.receivableFee = Number(item.receivableFee) - 1
        // })
        this.countData()
      },
      confirm () {
admin/src/views/contract/contractList.vue
@@ -20,7 +20,11 @@
                </div>
            </template>
        </el-table-column>
      <el-table-column prop="totalArea" label="租赁面积" min-width="100" show-overflow-tooltip />
        <el-table-column label="租赁面积" min-width="100" show-overflow-tooltip>
            <template slot-scope="{row}">
                {{row.totalArea}}㎡
            </template>
        </el-table-column>
      <el-table-column prop="signDate" label="签订日" min-width="100" show-overflow-tooltip />
      <el-table-column prop="code" label="合同编号" min-width="100" show-overflow-tooltip />
      <el-table-column label="合同状态" min-width="90" fixed="right" show-overflow-tooltip>
admin/src/views/finance/components/bullDetail.vue
@@ -1,5 +1,5 @@
<template>
  <GlobalWindow :title="'账单详情'" :visible.sync="visible" :confirm-working="isWorking" @close="close"
  <GlobalWindow :title="'账单详情'" :withFooter="false" :visible.sync="visible" :confirm-working="isWorking" @close="close"
    @confirm="confirm">
    <div style="width: 100%; position: sticky; top: 0; left: 0; z-index: 999; background: #ffffff;">
      <div class="home_title">
admin/src/views/finance/components/companyEdit.vue
@@ -25,7 +25,7 @@
<script>
import GlobalWindow from '@/components/common/GlobalWindow'
import UploadAvatarImage from '@/components/common/UploadAvatarImage'
import { createFinanceCompany, updateFinanceCompany } from '@/api/business/company'
import { createFinanceCompany, updateFinanceCompany, getById } from '@/api/business/company'
import { Message } from 'element-ui'
export default {
  components: { GlobalWindow, UploadAvatarImage },
@@ -34,6 +34,11 @@
      isShowModal: false,
      subLoading: false,
      param: {
        id: null,
        name: '',
        shortName: '',
        code: '',
        address: '',
        type: 2,
        status: '0'
      },
@@ -45,9 +50,15 @@
    }
  },
  created() {
  },
  methods: {
    getDetail (id) {
      getById(id)
        .then(res => {
          for (const key in this.param) {
            this.param[key] = res[key]
          }
        })
    },
    handleSub() {
      const { param, subLoading } = this
      this.$refs['paramRef'].validate((valid) => {
admin/src/views/finance/components/flowingWater.vue
@@ -23,10 +23,10 @@
                        <el-form-item :label="`实${form.needReceivableFeeCopy > 0 ? '收' : '付'}金额`" prop="actReceivableFee">
                            <el-input v-model="form.actReceivableFee" placeholder="请输入" v-trim />
                        </el-form-item>
                        <el-form-item label="入账日期" prop="actPayDate">
                        <el-form-item :label="`${form.needReceivableFeeCopy > 0 ? '入' : '出'}账日期`" prop="actPayDate">
                            <el-date-picker type="date" v-model="form.actPayDate" value-format="yyyy-MM-dd" placeholder="请选择" />
                        </el-form-item>
                        <el-form-item label="收款方式" prop="payType">
                        <el-form-item :label="`${form.needReceivableFeeCopy > 0 ? '收' : '付'}款方式`" prop="payType">
                            <el-select v-model="form.payType" placeholder="请选择">
                                <el-option label="现金" :value="1"></el-option>
                                <el-option label="网银转账" :value="2"></el-option>
@@ -136,6 +136,13 @@
      }
    },
    methods: {
      getDayTime () {
        const today = new Date();
        const year = today.getFullYear();
        const month = today.getMonth() + 1;
        const day = today.getDate();
        return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
      },
      confirm () {
        this.$refs.form.validate((valid) => {
          if (!valid) return
@@ -220,6 +227,7 @@
          for (const key in this.form) {
            this.form[key] = target[key]
          }
          this.form.actPayDate = this.getDayTime()
        })
        this.getDates(target.companyId)
      }
admin/src/views/finance/payments.vue
@@ -45,7 +45,7 @@
      <el-table-column label="操作" min-width="190" fixed="right">
        <template slot-scope="{row}">
          <el-button type="text" @click="$refs.details.open('收支流水详情', row.id)">查看详情</el-button>
          <el-button type="text" @click="closeDW(row.id)" v-if="row.status !== 1">关闭流水</el-button>
          <el-button type="text" @click="closeDW(row.id)" v-if="row.status !== 1 || !['3','4'].includes(row.contractStatus)">关闭流水</el-button>
        </template>
      </el-table-column>
    </el-table>