ll
liukangdong
2024-11-23 3a1a4f95f3d07f669139ab1158d1e304be6d6a26
ll
已添加10个文件
已删除1个文件
已修改15个文件
1978 ■■■■ 文件已修改
admin/src/api/client/staff.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/client/ywCustomer.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/project/ywRoom.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/common/CommonHeader.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/client/category.vue 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/client/clientList.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/client/components/OperaCategoryWindow.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/client/components/OperaYwCustomerWindow.vue 175 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/client/components/config.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/client/components/staffEdit.vue 177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/client/staffList.vue 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/contract/components/contractEdit.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/bull.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/components/bullDetail.vue 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/components/bullEdit.vue 370 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/components/config.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/components/deviceEdit.vue 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/components/paymentsEdit.vue 204 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/finance/payments.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/login.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/project/buildingList.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/project/components/OperaYwBuildingWindow.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/project/components/floorLevel.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/workorder/components/OperaYwWorkorderWindow.vue 133 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/workorder/components/config.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/client/staff.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
import request from '../../utils/request'
// æŸ¥è¯¢
export function fetchList (data) {
  return request.post('/visitsAdmin/cloudService/business/member/ywFindPage', data, {
    trim: true
  })
}
// å¯¼å‡ºExcel
export function exportExcel (data) {
  return request.post('/visitsAdmin/cloudService/business/member/exportExcel', data, {
    trim: true,
    download: true
  })
}
// åˆ›å»º
export function create (data) {
  return request.post('/visitsAdmin/cloudService/business/member/ywCreate', data)
}
// ä¿®æ”¹
export function updateById (data) {
  return request.post('/visitsAdmin/cloudService/business/member/ywUpdateById', data)
}
// åˆ é™¤
export function deleteById (id) {
  return request.get(`/visitsAdmin/cloudService/business/member/delete/${id}`)
}
export function detailById (id) {
  return request.get(`/visitsAdmin/cloudService/business/member/${id}`)
}
// æ‰¹é‡åˆ é™¤
export function deleteByIdInBatch (ids) {
  return request.get('/visitsAdmin/cloudService/business/member/delete/batch', {
    params: {
      ids
    }
  })
}
admin/src/api/client/ywCustomer.js
@@ -30,6 +30,9 @@
  return request.get(`/visitsAdmin/cloudService/business/ywCustomer/delete/${id}`)
}
export function detailById (id) {
  return request.get(`/visitsAdmin/cloudService/business/ywCustomer/${id}`)
}
// æ‰¹é‡åˆ é™¤
export function deleteByIdInBatch (ids) {
  return request.get('/visitsAdmin/cloudService/business/ywCustomer/delete/batch', {
admin/src/api/project/ywRoom.js
@@ -6,7 +6,11 @@
    trim: true
  })
}
export function getRoomList (data) {
  return request.post('/visitsAdmin/cloudService/business/ywRoom/list', data, {
    trim: true
  })
}
// å¯¼å‡ºExcel
export function exportExcel (data) {
  return request.post('/visitsAdmin/cloudService/business/ywRoom/exportExcel', data, {
admin/src/components/common/CommonHeader.vue
@@ -3,7 +3,7 @@
    <div class="header">
      <div class="logo">
        <div class="title">{{ title }}</div>
        <div class="list">
        <!-- <div class="list">
          <div class="item active">
            <div>服务中心</div>
            <div class="linellae"></div>
@@ -12,7 +12,7 @@
          <div class="item" @click="getHeaderNav('1')">消控中心</div>
          <div class="item" @click="getHeaderNav('2')">能管中心</div>
          <div class="item" @click="getHeaderNav('3')">驾驶舱</div>
        </div>
        </div> -->
        <!-- <div class="title-en">Diagnosis of Intelligent Manufacturing Integrated Service Platfrom</div> -->
      </div>
      <div class="user">
admin/src/views/client/category.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,107 @@
<template>
  <TableLayout>
    <template v-slot:table-wrap>
      <ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']">
        <li><el-button type="primary" @click="handleEdit()" icon="el-icon-plus"
            v-permissions="['business:category:create']">新建</el-button></li>
        <li v-permissions="['business:category:exportExcel']"><el-button type="primary"
            @click="exportExcel">导出</el-button></li>
      </ul>
      <el-table v-loading="isWorking.search"
        :data="dataList" stripe @selection-change="handleSelectionChange">
        <el-table-column prop="name" label="行业名称" min-width="100px"></el-table-column>
        <el-table-column prop="sortnum" label="排序码" min-width="80px"></el-table-column>
        <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete'])" label="操作"
          min-width="120" fixed="right">
          <template slot-scope="{row}">
            <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit"
              v-permissions="['business:category:update']">编辑</el-button>
            <el-button type="text" @click="deleteById(row)" icon="el-icon-delete"
              v-permissions="['business:category:delete']">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination @size-change="handleSizeChange" @current-change="getList" :pagination="tableData.pagination">
      </pagination>
    </template>
    <!-- æ–°å»º/修改 -->
    <OperaCategoryWindow v-if="isShowEdit" @close="isShowEdit = false" ref="operaCategoryWindow" @success="getList" />
  </TableLayout>
</template>
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaCategoryWindow from './components/OperaCategoryWindow'
import { fetchList, deleteById } from '@/api/business/category.js'
export default {
  name: 'Category',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaCategoryWindow },
  data() {
    return {
      // æœç´¢
      filters: {
        parentId: ''
      },
      isShowEdit: false,
      loading: false,
      pagination: {
        pageSize: 10,
        page: 1,
        total: 0,
      },
      dataList: []
    }
  },
  created() {
    this.config({
      module: '车辆信息表',
      api: '/business/category',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.getList()
  },
  methods: {
    handleEdit(row) {
      this.isShowEdit = true
      let str = row && row.id ? '编辑行业' : '新建行业'
      this.$nextTick(() => {
        this.$refs.operaCategoryWindow.open(str)
        if (row && row.id) {
          this.$refs.operaCategoryWindow.getDetail(row.id)
        }
      })
    },
    deleteById(row) {
      this.$confirm(`您确认要删除该行业吗`, '温馨提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteById(row.id).then(res => {
          this.getList()
        })
      })
    },
    getList() {
      const { pagination, filters } = this
      this.loading = true
      fetchList({
        model: { ...filters, type: 6 },
        capacity: pagination.pageSize,
        page: pagination.page,
      }).then(res => {
        this.loading = false
        this.dataList = res.records || []
        this.pagination.total = res.total || 0
      }, () => {
        this.loading = false
      })
    },
  }
}
</script>
admin/src/views/client/clientList.vue
@@ -22,12 +22,26 @@
      </ul>
      <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="type" label="类型 0个人 1企业" min-width="100px"></el-table-column>
        <el-table-column prop="type" label="客户类型" min-width="80px">
          <template slot-scope="{row}">
            <span>{{ row.type == '0' ? '个人' : '企业' }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="name" label="客户名称" min-width="100px"></el-table-column>
        <el-table-column prop="memberName" label="联系人" min-width="100px"></el-table-column>
        <el-table-column prop="phone" label="手机号" min-width="100px"></el-table-column>
        <el-table-column prop="idcardNo" label="身份证号(加密)" min-width="100px"></el-table-column>
        <el-table-column prop="memberPhone" label="联系电话" min-width="100px"></el-table-column>
        <!-- <el-table-column prop="idcardNo" label="身份证号" min-width="100px"></el-table-column> -->
        <el-table-column prop="creditCard" label="统一信用代码" min-width="100px"></el-table-column>
        <el-table-column prop="validity" label="营业期限" min-width="100px">
          <template slot-scope="{row}">
            <span>{{ row.validity == '2099-12-31' ? '长期' : row.validity }}</span>
          </template>
        </el-table-column>
        <el-table-column label="默认发票类型" min-width="100px">
          <template slot-scope="{row}">
            <span>{{ row.fpType == '0' ? '增值税普通发票' : row.fpType == '1' ? '增值税专用发票' : '-' }}</span>
          </template>
        </el-table-column>
        <el-table-column v-if="containPermissions(['business:ywcustomer:update', 'business:ywcustomer:delete'])"
          label="操作" min-width="120" fixed="right">
          <template slot-scope="{row}">
admin/src/views/client/components/OperaCategoryWindow.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
<template>
  <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" width="600px" @close="close" @confirm="confirm">
    <el-form :model="form" ref="form" :rules="rules">
      <el-form-item label="行业名称" prop="name">
        <el-input v-model="form.name" placeholder="请输入行业名称" v-trim />
      </el-form-item>
      <el-form-item label="排序码(升序)" prop="sortnum">
        <el-input v-model="form.sortnum" oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 6)" v-trim />
      </el-form-item>
    </el-form>
  </GlobalWindow>
</template>
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { create, fetchCateList, getInfoById } from '@/api/business/category.js'
export default {
  name: 'OperaCategoryWindow',
  extends: BaseOpera,
  components: { GlobalWindow },
  data() {
    return {
      // è¡¨å•数据
      form: {
        parentId: null,
        name: '',
        remark: '',
        status: '',
        sortnum: '',
        type: 6
      },
      // éªŒè¯è§„则
      rules: {
        name: [
          { required: true, message: '请输入二级分类名称', trigger: 'blur' }
        ],
        status: [
          { required: true, message: '请选择是否启用', trigger: 'change' }
        ]
      },
      dataList: []
    }
  },
  created() {
    this.config({
      api: '/business/category',
      'field.id': 'id'
    })
  },
  methods: {
    close() {
      this.visible = false
      this.$emit('close')
    },
    getDetail(id) {
      getInfoById(id).then(res => {
        this.form = res
      })
    },
  }
}
</script>
admin/src/views/client/components/OperaYwCustomerWindow.vue
@@ -1,65 +1,80 @@
<template>
  <GlobalWindow
    :title="title"
    :visible.sync="visible"
    :confirm-working="isWorking"
    @confirm="confirm"
  >
  <GlobalWindow :title="title" width="900px" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm">
    <el-form :model="form" ref="form" :rules="rules">
      <el-form-item label="类型 0个人 1企业" prop="type">
        <el-input v-model="form.type" placeholder="请输入类型 0个人 1企业" v-trim/>
      </el-form-item>
      <div class="list">
        <div class="title">基础信息</div>
      <el-form-item label="客户" prop="name">
          <div class="df">
        <el-input v-model="form.name" placeholder="请输入客户" v-trim/>
            <el-checkbox v-model="form.type" class="ml10" true-label="0" false-label="1">个人</el-checkbox>
          </div>
      </el-form-item>
      <el-form-item label="手机号" prop="phone">
        <el-input v-model="form.phone" placeholder="请输入手机号" v-trim/>
        <el-form-item label="行业分类" prop="industryId">
          <el-select v-model="form.industryId" clearable filterable>
            <el-option v-for="item in cateList" :value="item.id" :label="item.name" />
          </el-select>
      </el-form-item>
      <el-form-item label="身份证号(加密)" prop="idcardNo">
        <el-input v-model="form.idcardNo" placeholder="请输入身份证号(加密)" v-trim/>
        <el-form-item label="客户编号" prop="code">
          <el-input v-model="form.code" placeholder="请输入" v-trim />
      </el-form-item>
      <el-form-item label="证件显示信息" prop="idcardDecode">
        <el-input v-model="form.idcardDecode" placeholder="请输入证件显示信息" v-trim/>
        <div class="title">默认联系人</div>
        <el-form-item label="姓名" prop="member.name">
          <el-input v-model="form.member.name" placeholder="请输入" v-trim />
      </el-form-item>
      <el-form-item label="客户编码" prop="code">
        <el-input v-model="form.code" placeholder="请输入客户编码" v-trim/>
        <el-form-item label="手机号" prop="member.phone">
          <el-input v-model="form.member.phone" placeholder="请输入手机号" v-trim />
      </el-form-item>
      <el-form-item label="状态 0正常 1禁用" prop="status">
        <el-input v-model="form.status" placeholder="请输入状态 0正常 1禁用" v-trim/>
        <el-form-item label="身份">
          <el-select v-model="form.member.highCheckor" filterable>
            <el-option :value="0" label="老板/超级管理员" />
            <el-option :value="1" label="人事/管理员" />
            <el-option :value="2" label="员工/普通员工" />
          </el-select>
      </el-form-item>
      <el-form-item label="身份 0老板 1超级管理员" prop="highCheckor">
        <el-input v-model="form.highCheckor" placeholder="请输入身份 0老板 1超级管理员" v-trim/>
        <el-form-item label="证件类型">
          <el-select v-model="form.member.idcardType" filterable>
            <el-option :value="0" label="身份证" />
            <el-option :value="1" label="港澳证件" />
            <el-option :value="2" label="护照" />
          </el-select>
      </el-form-item>
      <el-form-item label="证件类型 0身份证 1港澳证件 2护照" prop="idcardType">
        <el-input v-model="form.idcardType" placeholder="请输入证件类型 0身份证 1港澳证件 2护照" v-trim/>
        <el-form-item label="证件号码" prop="member.idcardNo">
          <el-input v-model="form.member.idcardNo" placeholder="请输入" v-trim />
      </el-form-item>
        <el-form-item label="邮箱" prop="email">
          <el-input v-model="form.member.email" placeholder="请输入邮箱" v-trim />
        </el-form-item>
        <div class="title">账户信息</div>
      <el-form-item label="开户银行" prop="accountBank">
        <el-input v-model="form.accountBank" placeholder="请输入开户银行" v-trim/>
      </el-form-item>
      <el-form-item label="账号" prop="accountNo">
        <el-input v-model="form.accountNo" placeholder="请输入账号" v-trim/>
      </el-form-item>
      <el-form-item label="账户电话" prop="accountPhone">
        <el-form-item label="电话" prop="accountPhone">
        <el-input v-model="form.accountPhone" placeholder="请输入账户电话" v-trim/>
      </el-form-item>
      <el-form-item label="统一信用代码" prop="creditCard">
        <el-input v-model="form.creditCard" placeholder="请输入统一信用代码" v-trim/>
      </el-form-item>
      <el-form-item label="默认发票类型 0增值税普通发票 1增值税专用发票" prop="fpType">
        <el-input v-model="form.fpType" placeholder="请输入默认发票类型 0增值税普通发票 1增值税专用发票" v-trim/>
        <el-form-item label="默认发票类型" prop="fpType">
          <el-select v-model="form.fpType" clearable filterable>
            <el-option :value="0" label="增值税普通发票" />
            <el-option :value="1" label="增值税专用发票" />
          </el-select>
      </el-form-item>
      <el-form-item label="账号注册地址" prop="accountAddr">
        <el-form-item label="注册地址" prop="accountAddr">
        <el-input v-model="form.accountAddr" placeholder="请输入账号注册地址" v-trim/>
      </el-form-item>
      <el-form-item label="身份类型0老板超级管理员;1=人事管理员;2=员工" prop="identityType">
        <el-input v-model="form.identityType" placeholder="请输入身份类型0老板超级管理员;1=人事管理员;2=员工" v-trim/>
        <el-form-item label="营业期限">
          <div class="df">
            <el-date-picker type="date" v-model="form.validity" value-format="yyyy-MM-dd" placeholder="请选择" />
            <el-checkbox v-model="form.selLangTime" @change="changeValid" class="ml10">长期</el-checkbox>
          </div>
      </el-form-item>
      <el-form-item label="邮箱" prop="email">
        <el-input v-model="form.email" placeholder="请输入邮箱" v-trim/>
      </el-form-item>
      <el-form-item label="联系人编码(关联member)" prop="memberId">
        <el-input v-model="form.memberId" placeholder="请输入联系人编码(关联member)" v-trim/>
      </el-form-item>
      </div>
    </el-form>
  </GlobalWindow>
</template>
@@ -67,6 +82,9 @@
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { fetchCateList } from '@/api/business/category'
import { rules } from './config'
import { detailById } from '@/api/client/ywCustomer'
export default {
  name: 'OperaYwCustomerWindow',
  extends: BaseOpera,
@@ -76,6 +94,7 @@
      // è¡¨å•数据
      form: {
        id: null,
        validity: '',
        creator: '',
        createDate: '',
        editor: '',
@@ -83,31 +102,40 @@
        isdeleted: '',
        remark: '',
        industryId: '',
        type: '',
        type: '1',
        name: '',
        phone: '',
        idcardNo: '',
        idcardDecode: '',
        code: '',
        status: '',
        highCheckor: '',
        memberName: '',
        lastLoginDate: '',
        loginNum: '',
        userId: '',
        idcardType: '',
        accountBank: '',
        accountNo: '',
        accountPhone: '',
        creditCard: '',
        fpType: '',
        accountAddr: '',
        identityType: '',
        // identityType: '0',
        email: '',
        memberId: ''
      },
      // éªŒè¯è§„则
      rules: {
        memberId: '',
        member: {
          name: "",
          phone: "",
          highCheckor: 0,
          idcardType: 0,
          idcardNo: '',
          email: '',
      }
      },
      cateList: [],
      // éªŒè¯è§„则
      rules
    }
  },
  created () {
@@ -115,6 +143,67 @@
      api: '/client/ywCustomer',
      'field.id': 'id'
    })
  },
  methods: {
    initData() {
      fetchCateList({ type: 6 }).then(res => {
        this.cateList = res
      })
    },
    open (title, target) {
      this.title = title
      this.visible = true
      this.initData()
      // æ–°å»º
      if (target == null) {
        this.$nextTick(() => {
          this.$refs.form.resetFields()
        })
        return
      }
      // ç¼–辑
      this.$nextTick(() => {
        if(title == '编辑客户'){
          detailById(target.id).then(res => {
            this.form = res
          })
        }
      })
    },
    changeValid(e) {
      this.$set(this.form, 'validity', e ? '2099-12-31' : '')
    },
  }
}
</script>
<style lang='scss' scoped>
@import '@/assets/style/variables.scss';
div {
  box-sizing: border-box;
}
.title {
  width: 100%;
  font-weight: 500;
  font-size: 15px;
  margin-top: 16px;
}
.list {
  /* padding-top: 14px; */
  display: flex;
  flex-wrap: wrap;
  .el-form-item {
    width: 33.33%;
    margin-bottom: 12px;
    padding: 0 12px;
    .la {
      color: #7f7f7f;
      margin-top: 2px;
    }
  }
}
</style>
admin/src/views/client/components/config.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
export const rules = {
  name: [{ required: true, message: '请输入' }],
  'member.name': [{ required: true, message: '请输入' }],
  'member.phone': [{ required: true, message: '请输入' }],
}
export const staffRules = {
  name: [{ required: true, message: '请输入' }],
  'member.name': [{ required: true, message: '请输入' }],
  phone: [{ required: true, message: '请输入' }],
}
admin/src/views/client/components/staffEdit.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,177 @@
<template>
  <GlobalWindow :title="title" width="900px" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm">
    <el-form :model="form" ref="form" :rules="rules">
      <div class="list">
        <el-form-item label="客户名称" prop="customerId">
          <el-select v-model="form.customerId" clearable filterable>
            <el-option v-for="item in clientList" :value="item.id" :label="item.name" />
          </el-select>
        </el-form-item>
        <el-form-item label="姓名" prop="name">
          <div class="df">
            <el-input v-model="form.name" placeholder="请输入" v-trim />
          </div>
        </el-form-item>
        <el-form-item label="手机号" prop="phone">
          <el-input v-model="form.phone" placeholder="请输入手机号" v-trim />
        </el-form-item>
        <el-form-item label="身份">
          <el-select v-model="form.highCheckor" filterable>
            <el-option :value="0" label="老板/超级管理员" />
            <el-option :value="1" label="人事/管理员" />
            <el-option :value="2" label="员工/普通员工" />
          </el-select>
        </el-form-item>
        <el-form-item label="证件类型">
          <el-select v-model="form.idcardType" filterable>
            <el-option :value="0" label="身份证" />
            <el-option :value="1" label="港澳证件" />
            <el-option :value="2" label="护照" />
          </el-select>
        </el-form-item>
        <el-form-item label="证件号码" prop="member.idcardNo">
          <el-input v-model="form.idcardNo" placeholder="请输入" v-trim />
        </el-form-item>
        <el-form-item label="邮箱" prop="email">
          <el-input v-model="form.email" placeholder="请输入邮箱" v-trim />
        </el-form-item>
        <el-form-item label="性别">
          <el-select v-model="form.sex" filterable>
            <el-option :value="1" label="男" />
            <el-option :value="2" label="女" />
          </el-select>
        </el-form-item>
        <el-form-item label="出生日期">
          <el-date-picker type="date" v-model="form.birthday" value-format="yyyy-MM-dd" placeholder="请选择" />
        </el-form-item>
      </div>
    </el-form>
  </GlobalWindow>
</template>
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { fetchCateList } from '@/api/business/category'
import { staffRules } from './config'
import { detailById } from '@/api/client/ywCustomer'
import { fetchList } from '@/api/client/ywCustomer'
export default {
  name: 'OperaYwCustomerWindow',
  extends: BaseOpera,
  components: { GlobalWindow },
  data() {
    return {
      // è¡¨å•数据
      form: {
        id: null,
        customerId: '',
        creator: '',
        createDate: '',
        editor: '',
        editDate: '',
        isdeleted: '',
        birthday: '',
        industryId: '',
        type: '1',
        idcardDecode: '',
        sex: '',
        status: '',
        memberName: '',
        lastLoginDate: '',
        loginNum: '',
        userId: '',
        accountBank: '',
        accountNo: '',
        accountPhone: '',
        creditCard: '',
        fpType: '',
        accountAddr: '',
        // identityType: '0',
        name: "",
        phone: "",
        highCheckor: 0,
        idcardType: 0,
        idcardNo: '',
        email: '',
      },
      clientList: [],
      // éªŒè¯è§„则
      rules: staffRules
    }
  },
  created() {
    this.config({
      api: '/client/staff',
      'field.id': 'id'
    })
  },
  methods: {
    initData() {
      fetchList({
        capacity: 9000,
        model: {},
        page: 1
      }).then(res => {
        this.clientList = res.records || []
      })
    },
    open(title, target) {
      this.title = title
      this.visible = true
      this.initData()
      // æ–°å»º
      if (target == null) {
        this.$nextTick(() => {
          this.$refs.form.resetFields()
        })
        return
      }
      // ç¼–辑
      this.$nextTick(() => {
        for (const key in this.form) {
          this.form[key] = target[key]
        }
      })
    },
    changeValid(e) {
      this.$set(this.form, 'validity', e ? '2099-12-31' : '')
    },
  }
}
</script>
<style lang='scss' scoped>
@import '@/assets/style/variables.scss';
div {
  box-sizing: border-box;
}
.title {
  width: 100%;
  font-weight: 500;
  font-size: 15px;
  margin-top: 16px;
}
.list {
  /* padding-top: 14px; */
  display: flex;
  flex-wrap: wrap;
  .el-form-item {
    width: 33.33%;
    margin-bottom: 12px;
    padding: 0 12px;
    .la {
      color: #7f7f7f;
      margin-top: 2px;
    }
  }
}
</style>
admin/src/views/client/staffList.vue
@@ -2,8 +2,10 @@
  <TableLayout :permissions="['business:ywcustomer:query']">
    <!-- æœç´¢è¡¨å• -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
      <el-form-item label="客户名称" prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入客户名称" @keypress.enter.native="search"></el-input>
      <el-form-item label="客户名称" prop="customerId">
        <el-select v-model="searchForm.customerId" clearable filterable>
          <el-option v-for="item in clientList" :value="item.id" :label="item.name" />
        </el-select>
      </el-form-item>
      <el-form-item prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入人员姓名/手机号" @keypress.enter.native="search"></el-input>
@@ -18,21 +20,31 @@
    <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
    <template v-slot:table-wrap>
      <ul class="toolbar" v-permissions="['business:ywcustomer:create', 'business:ywcustomer:delete']">
        <li><el-button type="primary" @click="$refs.operaYwCustomerWindow.open('新建客户')" icon="el-icon-plus"
        <li><el-button type="primary" @click="$refs.operaYwCustomerWindow.open('新建人员')" icon="el-icon-plus"
            v-permissions="['business:ywcustomer:create']">新建</el-button></li>
        <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete"
            v-permissions="['business:ywcustomer:delete']">删除</el-button></li>
      </ul>
      <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange">
        <el-table-column prop="name" label="客户名称" min-width="100px"></el-table-column>
        <el-table-column prop="memberName" label="联系人" min-width="100px"></el-table-column>
        <el-table-column prop="customerName" label="客户名称" min-width="100px"></el-table-column>
        <el-table-column prop="name" label="联系人" min-width="100px"></el-table-column>
        <el-table-column prop="phone" label="联系电话" min-width="100px"></el-table-column>
        <el-table-column prop="" label="身份" min-width="100px"></el-table-column>
        <el-table-column prop="" label="状态" min-width="100px"></el-table-column>
        <el-table-column prop="" label="身份" min-width="100px">
          <template slot-scope="{row}">
            <span v-if="row.highCheckor == 0">老板/超级管理员</span>
            <span v-if="row.highCheckor == 1">人事/管理员</span>
            <span v-if="row.highCheckor == 2">员工/普通员工</span>
          </template>
        </el-table-column>
        <el-table-column prop="status" label="状态" min-width="100px">
          <template slot-scope="{row}">
            <span :class="{ red: row.status == 1 }">{{ row.status == '0' ? '正常' : '禁用' }}</span>
          </template>
        </el-table-column>
        <el-table-column v-if="containPermissions(['business:ywcustomer:update', 'business:ywcustomer:delete'])"
          label="操作" min-width="120" fixed="right">
          <template slot-scope="{row}">
            <el-button type="text" @click="$refs.operaYwCustomerWindow.open('编辑客户', row)" icon="el-icon-edit"
            <el-button type="text" @click="$refs.operaYwCustomerWindow.open('编辑人员', row)" icon="el-icon-edit"
              v-permissions="['business:ywcustomer:update']">编辑</el-button>
            <el-button type="text" @click="deleteById(row)" icon="el-icon-delete"
              v-permissions="['business:ywcustomer:delete']">删除</el-button>
@@ -51,7 +63,8 @@
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaYwCustomerWindow from './components/OperaYwCustomerWindow'
import OperaYwCustomerWindow from './components/staffEdit.vue'
import { fetchList } from '@/api/client/ywCustomer'
export default {
  name: 'YwCustomer',
  extends: BaseTable,
@@ -60,46 +73,32 @@
    return {
      // æœç´¢
      searchForm: {
        id: '',
        creator: '',
        createDate: '',
        editor: '',
        editDate: '',
        isdeleted: '',
        remark: '',
        industryId: '',
        type: '',
        customerId: '',
        name: '',
        phone: '',
        idcardNo: '',
        idcardDecode: '',
        code: '',
        status: '',
        highCheckor: '',
        lastLoginDate: '',
        loginNum: '',
        userId: '',
        idcardType: '',
        accountBank: '',
        accountNo: '',
        accountPhone: '',
        creditCard: '',
        fpType: '',
        accountAddr: '',
        identityType: '',
        email: '',
        memberId: ''
      }
      },
      clientList: []
    }
  },
  created() {
    this.config({
      module: '运维客户信息表',
      api: '/client/ywCustomer',
      api: '/client/staff',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
    this.initData()
  },
  methods: {
    initData() {
      fetchList({
        capacity: 9000,
        model: {},
        page: 1
      }).then(res => {
        this.clientList = res.records || []
      })
    },
  }
}
</script>
admin/src/views/contract/components/contractEdit.vue
@@ -1,5 +1,6 @@
<template>
  <GlobalWindow width="1000px" :title="title" :visible.sync="showModal" :confirm-working="isWorking" @close="close" @confirm="confirm">
  <GlobalWindow width="1000px" :title="title" :visible.sync="showModal" :confirm-working="isWorking" @close="close"
    @confirm="confirm">
    <div class="tabs">
      <div class="tab" :class="{ active: activeTabs == 0 }" @click="tabsClick(0)">1、基本信息</div>
      <div class="tab" :class="{ active: activeTabs == 1 }" @click="tabsClick(1)">2、费用条款</div>
@@ -74,7 +75,10 @@
      <div class="file_wrap">
        <div class="head">
          <div>合同附件</div>
          <el-upload class="upload-demo" :show-file-list="false" :data="uploadData" :action="uploadImgUrl"
            :on-success="uploadAvatarSuccess" :before-upload="beforeUpload" :on-error="uploadError">
          <el-button icon="el-icon-plus" plain>添加附件</el-button>
          </el-upload>
        </div>
        <el-table :data="param.list" stripe>
          <el-table-column prop="" label="附件名称" align="center" min-width="100" show-overflow-tooltip />
@@ -153,6 +157,7 @@
import BaseOpera from '@/components/base/BaseOpera'
import MemberSearch from '@/components/common/MemberSearch'
import { rules } from './config'
import { Message, Loading } from 'element-ui'
export default {
  components: {
    GlobalWindow,
@@ -166,6 +171,13 @@
      activeTabs: '0',
      param: {},
      rules,
      loadingInstance: null,
      uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/uploadBatch',
      fileList: [],
      uploadData: {
        folder: 'HIDDEN_DANGER_FILE'
      },
      types: [
        { name: '物业+租赁合同', value: 0 },
@@ -265,6 +277,50 @@
      console.log(this.value)
    },
    beforeUpload(file) {
      // if (['video/mp4', 'video/ogg', 'video/flv', 'video/avi', 'video/wmv', 'video/rmvb', 'image/jpeg', 'image/jpg', 'image/png', 'image/gif'].indexOf(file.type) == -1) {
      //   this.$message.error('请上传正确的视频/图片格式')
      //   return false
      // }
      this.loadingInstance = Loading.service({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
    },
    uploadError() {
      this.$nextTick(() => { // ä»¥æœåŠ¡çš„æ–¹å¼è°ƒç”¨çš„ Loading éœ€è¦å¼‚步关闭
        if (this.loadingInstance) {
          this.loadingInstance.close()
        }
      })
    },
    uploadAvatarSuccess(file) {
      this.$nextTick(() => { // ä»¥æœåŠ¡çš„æ–¹å¼è°ƒç”¨çš„ Loading éœ€è¦å¼‚步关闭
        if (this.loadingInstance) {
          this.loadingInstance.close()
        }
      })
      console.log('file', file)
      const item = file.data[0]
      if (['.mp4', '.avi', '.flv', '.wmv'].some(char => item.imgaddr.includes(char))) {
        this.fileList.push({
          type: 1,
          fileurl: item.imgaddr,
          fileurlFull: item.url
        })
      } else {
        this.fileList.push({
          type: 0,
          fileurl: item.imgaddr,
          fileurlFull: item.url
        })
      }
      console.log('file', this.fileList)
      // this.$set(this.param, 'faceImg', file.imgurl)
      // this.$set(this.param, 'faceImgUrl', file.imgurlfull)
    },
    close() {
      this.showModal = false
      this.$emit('close')
@@ -331,7 +387,7 @@
  }
  .main_house {
    width: 420px;
    width: 320px;
    padding: 24px 12px;
    border: 1px solid #c3c6cd;
    border-radius: 2px;
@@ -344,17 +400,20 @@
  }
}
.total{
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
  background-color: #e7e9f5;
  span{
    width: 160px;
    text-align: center;
  }
}
.file_wrap {
  padding: 20px 16px;
  border: 1px solid #c3c6cd;
admin/src/views/finance/bull.vue
@@ -13,16 +13,18 @@
      </div>
    </div>
    <el-table v-loading="loading" :data="list" stripe>
      <el-table-column prop="" label="运维人" min-width="100" show-overflow-tooltip />
      <el-table-column prop="code" label="设备编号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="name" label="设备名称" min-width="100" show-overflow-tooltip />
      <el-table-column prop="stautsName" label="设备状态" min-width="100" show-overflow-tooltip />
      <el-table-column prop="remark" label="运维备注" min-width="100" show-overflow-tooltip />
      <el-table-column prop="createTime" label="创建时间" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" label="客户名称" min-width="100" show-overflow-tooltip />
      <el-table-column prop="code" label="楼宇名称" min-width="100" show-overflow-tooltip />
      <el-table-column prop="name" label="房间号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="stautsName" label="合同编号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="remark" label="结清状态" min-width="100" show-overflow-tooltip />
      <el-table-column prop="createTime" label="账单金额" min-width="100" show-overflow-tooltip />
      <el-table-column prop="createTime" label="应收金额" min-width="100" show-overflow-tooltip />
      <el-table-column prop="createTime" label="合同状态" min-width="100" show-overflow-tooltip />
      <el-table-column label="操作" min-width="120" fixed="right">
        <template slot-scope="{row}">
          <el-button type="text" @click="handleDetail(row)" icon="el-icon-edit"
            v-permissions="['business:category:update']">查看</el-button>
            v-permissions="['business:category:update']">查看详情</el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -30,19 +32,22 @@
      <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
    </div>
    <Edit v-if="showEdit" ref="EditRef" @success="getList" @close="showEdit = false" />
    <Detail ref="DetailRef" @success="getList" @close="showEdit = false" />
  </div>
</template>
<script>
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
import Edit from './components/deviceEdit.vue'
import Edit from './components/bullEdit.vue'
import Detail from './components/bullDetail.vue'
import { fetchList, deleteById } from '@/api/Inspection/device'
export default {
  components: {
    Pagination,
    QueryForm,
    Edit
    Edit,
    Detail
  },
  data() {
    return {
admin/src/views/finance/components/bullDetail.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,231 @@
<template>
  <GlobalWindow :title="'账单详情'" :visible.sync="visible" :confirm-working="isWorking" @close="close"
    @confirm="confirm">
    <div class="home_title">
      <div class="left">
        <span class="mr10">付款方:xxx</span>
        <span class="status">status</span>
      </div>
      <el-button plain type="primary">新建收支流水</el-button>
    </div>
    <div class="remark">
      <div class="item">
        <div class="la">账单状态</div>
        <div class="val">已结清</div>
      </div>
    </div>
    <div class="tabs">
      <div class="tab" :class="{ active: activeTabs == 0 }" @click="tabsClick(0)">合同信息</div>
      <div class="tab" :class="{ active: activeTabs == 1 }" @click="tabsClick(1)">关联账单</div>
      <div class="tab" :class="{ active: activeTabs == 2 }" @click="tabsClick(2)">操作记录</div>
    </div>
    <div class="main">
      <div class="title">基础信息</div>
      <div class="list">
        <div class="item">
          <div class="la">账单类型</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">计费周期</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">账单金额(元)</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">账单编号</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">合同编号</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">创建时间</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">付款方</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">经办人</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">所属公司</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">账单备注</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
      </div>
      <div class="title">房源信息</div>
      <div class="list">
        <div class="item">
          <div class="la">项目名称</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">楼宇名称</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">楼层/房号</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">面积</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
      </div>
      <div class="title">租客信息</div>
      <div class="list">
        <div class="item">
          <div class="la">租客</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">经办人</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
      </div>
      <div class="title">租赁条款</div>
      <div class="list">
        <div class="item">
          <div class="la">押金金额</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">付款方式</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
        <div class="item">
          <div class="la">免租期</div>
          <div class="val">{{ info.aaa }}</div>
        </div>
      </div>
      <el-table :data="info.list" stripe>
        <el-table-column prop="" label="开始日期" min-width="100" show-overflow-tooltip />
        <el-table-column prop="" label="结束日期" min-width="100" show-overflow-tooltip />
        <el-table-column prop="" label="合同单价" min-width="100" show-overflow-tooltip />
        <el-table-column prop="" label="付款提前天数" min-width="100" show-overflow-tooltip />
      </el-table>
    </div>
  </GlobalWindow>
</template>
<script>
import GlobalWindow from '@/components/common/GlobalWindow'
import BaseOpera from '@/components/base/BaseOpera'
export default {
  components: {
    GlobalWindow
  },
  extends: BaseOpera,
  data() {
    return {
      id: '',
      visible: true,
      activeTabs: '',
      info: {}
    }
  },
  methods: {
    tabsClick(val) {
      this.activeTabs = val
    },
    getDetail() {
    }
  }
}
</script>
<style lang="scss" scoped>
@import '@/assets/style/variables.scss';
.home_title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  .left {
    font-weight: 500;
    font-size: 16px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    .status {
      padding: 0 6px;
      height: 22px;
      line-height: 22px;
      border-radius: 2px;
      border: 1px solid #00BA92;
      color: #00BA92;
      font-weight: 400;
      font-size: 12px;
      color: #00BA92;
    }
  }
}
.remark {
  background: #E8EBF7;
  border-radius: 2px;
  padding: 10px 20px;
  font-size: 16px;
  margin: 20px 0
}
.tabs {
  border-bottom: 1px solid #DFE2E8;
  display: flex;
  margin-bottom: 20px;
  .tab {
    height: 58px;
    line-height: 58px;
    font-size: 16px;
    color: #666666;
    margin-right: 30px;
    cursor: pointer;
  }
  .active {
    font-weight: 500;
    color: $primary-color;
    border-bottom: 2px solid $primary-color;
  }
}
.main {
  .title {
    font-weight: 500;
    font-size: 18px;
    color: $primary-color;
    margin-bottom: 15px;
  }
  .list {
    display: flex;
    flex-wrap: wrap;
    background: #F7F7F7;
    border-radius: 2px;
    padding: 15px 20px;
    margin-bottom: 20px;
    .item {
      width: 25%;
      margin-bottom: 16px;
      .la {
        color: #7f7f7f;
        margin-top: 2px;
      }
    }
  }
}
</style>
admin/src/views/finance/components/bullEdit.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,370 @@
<template>
  <GlobalWindow width="1100px" :title="title" :visible.sync="isShowModal" :confirm-working="isWorking" @close="close"
    @confirm="confirm">
    <template v-if="activeTabs == 0">
      <div class="main">
        <div class="main_content">
          <el-form :model="param" label-position="top" ref="paramRef" :rules="rules">
            <div class="head">
              <div class="m_title">基础信息</div>
              <div class="tabs">
                <div class="tab" :class="{ active: timeTab == 0 }" @click="timeTabClick('0')">周期费用</div>
                <div class="tab" :class="{ active: timeTab == 1 }" @click="timeTabClick('1')">一次性费用</div>
              </div>
            </div>
            <div class="list">
              <el-form-item label="关联合同" prop="type">
                <el-select v-model="param.type" placeholder="请选择" clearable>
                  <el-option v-for="item in types" :value="item.value" :label="item.name"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="付款方" prop="code">
                <el-input v-model="param.code" placeholder="请输入合同编号" v-trim />
              </el-form-item>
              <el-form-item label="费用类型" prop="aaa">
                <el-select v-model="param.aaa" placeholder="请选择" clearable>
                  <el-option v-for="item in agentList" :value="item.id" :label="item.name"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="计费周期" prop="">
                <el-date-picker type="date" v-model="param.getDate" value-format="yyyy-MM-dd" placeholder="请选择" />
              </el-form-item>
              <el-form-item label="应收金额" prop="">
                <el-date-picker type="date" v-model="param.getDate" value-format="yyyy-MM-dd" placeholder="请选择" />
              </el-form-item>
              <el-form-item label="应收日期" prop="">
                <el-date-picker type="date" v-model="param.getDate" value-format="yyyy-MM-dd" placeholder="请选择" />
              </el-form-item>
              <el-form-item label="所属公司" prop="">
                <el-select v-model="param.aaa" placeholder="请选择" clearable>
                  <el-option v-for="item in comparyList" :value="item.id" :label="item.name"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item style="width: 100%;" label="账单备注" prop="">
                <el-input type="textarea" :rows="4" v-model="param.content" placeholder="请输入" />
              </el-form-item>
            </div>
          </el-form>
        </div>
        <div class="main_house">
          <div class="title">请选择房源</div>
          <el-cascader style="width: 300px" v-model="value" @change="houseChange" :options="options"
            :props="{ multiple: true }" collapse-tags clearable />
        </div>
      </div>
      <div class="file_wrap">
        <div class="head">
          <div>账单附件</div>
          <el-upload class="upload-demo" :show-file-list="false" :data="uploadData" :action="uploadImgUrl"
            :on-success="uploadAvatarSuccess" :before-upload="beforeUpload" :on-error="uploadError">
            <el-button icon="el-icon-plus" plain>添加附件</el-button>
          </el-upload>
        </div>
        <el-table :data="param.list" stripe>
          <el-table-column prop="" label="附件名称" align="center" min-width="100" show-overflow-tooltip />
          <el-table-column prop="" label="操作人" align="center" min-width="100" show-overflow-tooltip />
          <el-table-column prop="" label="操作时间" align="center" min-width="100" show-overflow-tooltip />
          <el-table-column prop="" label="操作" align="center" min-width="100">
            <template v-slot="scope">
              <span class="cu red">删除</span>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </template>
    <!--  -->
    <MemberSearch ref="MemberSearchRef" />
  </GlobalWindow>
</template>
<script>
import GlobalWindow from '@/components/common/GlobalWindow'
import BaseOpera from '@/components/base/BaseOpera'
import MemberSearch from '@/components/common/MemberSearch'
import { rules } from './config'
import { Message, Loading } from 'element-ui'
export default {
  components: {
    GlobalWindow,
    MemberSearch
  },
  extends: BaseOpera,
  data() {
    return {
      isShowModal: false,
      title: '',
      activeTabs: '0',
      param: {},
      rules,
      timeTab: '0',
      loadingInstance: null,
      uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/uploadBatch',
      fileList: [],
      uploadData: {
        folder: 'HIDDEN_DANGER_FILE'
      },
      types: [
        { name: '物业+租赁合同', value: 0 },
        { name: '租赁合同', value: 1 },
        { name: '物业合同', value: 2 },
      ],
      agentList: [], //经办人
      projectList: [],
      comparyList: [], // å…¬å¸
      renterList: [], // ç§Ÿå®¢
      contacts: [], // è”系人
      value: [],
      options: [
        {
          value: 1,
          label: '东南',
          children: [{
            value: 2,
            label: '上海',
            children: [
              { value: 3, label: '普陀' },
              { value: 4, label: '黄埔' },
              { value: 5, label: '徐汇' }
            ]
          }, {
            value: 7,
            label: '江苏',
            children: [
              { value: 8, label: '南京' },
              { value: 9, label: '苏州' },
              { value: 10, label: '无锡' }
            ]
          }, {
            value: 12,
            label: '浙江',
            children: [
              { value: 13, label: '杭州' },
              { value: 14, label: '宁波' },
              { value: 15, label: '嘉兴' }
            ]
          }]
        },
        {
          value: 17,
          label: '西北',
          children: [{
            value: 18,
            label: '陕西',
            children: [
              { value: 19, label: '西安' },
              { value: 20, label: '延安' }
            ]
          }, {
            value: 21,
            label: '新疆维吾尔族自治区',
            children: [
              { value: 22, label: '乌鲁木齐' },
              { value: 23, label: '克拉玛依' }
            ]
          }]
        }
      ],
      cactiveTabs: 0,
      paramCost: {},
      payMethods: [
        { name: '一次性付款', value: 0 },
        { name: '3个月一付', value: 1 },
        { name: '6个月一付', value: 2 },
        { name: '1年一付', value: 2 },
      ],
      unitOps: [
        { name: '元/m²·天', value: 0 },
        { name: '元/m²·月', value: 1 },
        { name: '元/天', value: 2 },
        { name: '元/月', value: 3 },
        { name: '元/å¹´', value: 4 },
        { name: '元/m²·年', value: 5 },
        { name: '元/场', value: 6 },
      ],
    }
  },
  created() {
    const { param } = this
    this.title = param.id ? '编辑收款账单' : '创建收款账单'
  },
  methods: {
    tabsClick(val) {
      this.activeTabs = val
    },
    timeTabClick(val) {
      this.timeTab = val
    },
    getDetail() {
    },
    handleRent() {
      this.$refs.MemberSearchRef.openModal()
    },
    houseChange(e) {
      console.log(e)
      console.log(this.value)
    },
    beforeUpload(file) {
      // if (['video/mp4', 'video/ogg', 'video/flv', 'video/avi', 'video/wmv', 'video/rmvb', 'image/jpeg', 'image/jpg', 'image/png', 'image/gif'].indexOf(file.type) == -1) {
      //   this.$message.error('请上传正确的视频/图片格式')
      //   return false
      // }
      this.loadingInstance = Loading.service({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
    },
    uploadError() {
      this.$nextTick(() => { // ä»¥æœåŠ¡çš„æ–¹å¼è°ƒç”¨çš„ Loading éœ€è¦å¼‚步关闭
        if (this.loadingInstance) {
          this.loadingInstance.close()
        }
      })
    },
    uploadAvatarSuccess(file) {
      this.$nextTick(() => { // ä»¥æœåŠ¡çš„æ–¹å¼è°ƒç”¨çš„ Loading éœ€è¦å¼‚步关闭
        if (this.loadingInstance) {
          this.loadingInstance.close()
        }
      })
      console.log('file', file)
      const item = file.data[0]
      if (['.mp4', '.avi', '.flv', '.wmv'].some(char => item.imgaddr.includes(char))) {
        this.fileList.push({
          type: 1,
          fileurl: item.imgaddr,
          fileurlFull: item.url
        })
      } else {
        this.fileList.push({
          type: 0,
          fileurl: item.imgaddr,
          fileurlFull: item.url
        })
      }
      console.log('file', this.fileList)
      // this.$set(this.param, 'faceImg', file.imgurl)
      // this.$set(this.param, 'faceImgUrl', file.imgurlfull)
    },
    close() {
      this.isShowModal = false
      this.$emit('close')
    }
  }
}
</script>
<style lang="scss" scoped>
@import '@/assets/style/variables.scss';
.cost_tabs {
  justify-content: flex-start;
  border: none;
  .tab {
    height: 36px;
    line-height: 36px;
    font-size: 14px;
  }
}
.main {
  display: flex;
  margin-bottom: 20px;
  .main_content {
    flex: 1;
    margin-right: 20px;
    .head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      .tabs {
        display: flex;
        margin-bottom: 20px;
        display: flex;
        justify-content: center;
        .tab {
          height: 14px;
          line-height: 14px;
          cursor: pointer;
          border: 1px solid #ebebeb;
          padding: 12px 24px;
        }
        .active {
          font-weight: 500;
          color: $primary-color;
          border: 1px solid $primary-color;
        }
      }
    }
    .list {
      display: flex;
      flex-wrap: wrap;
      .el-form-item {
        width: 33.33%;
        box-sizing: border-box;
        padding: 0 12px;
      }
    }
  }
  .main_house {
    width: 320px;
    padding: 24px 12px;
    border: 1px solid #c3c6cd;
    border-radius: 2px;
    .title {
      font-size: 16px;
      font-weight: 500;
      margin-bottom: 30px;
    }
  }
}
.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
  background-color: #e7e9f5;
  span {
    width: 160px;
    text-align: center;
  }
}
.file_wrap {
  padding: 20px 16px;
  border: 1px solid #c3c6cd;
  border-radius: 2px;
  .head {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}
.m_title {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 15px;
  margin-top: 10px;
}
</style>
admin/src/views/finance/components/config.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,3 @@
export const rules = {
  name: [{ required: true, message: '请输入' }]
}
admin/src/views/finance/components/deviceEdit.vue
ÎļþÒÑɾ³ý
admin/src/views/finance/components/paymentsEdit.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,204 @@
<template>
  <GlobalWindow :title="param.id ? '编辑公司' : '新建公司'" :confirmWorking="subLoading" :visible.sync="isShowModal"
    width="600px" @close="close" @confirm="handleSub">
    <div class="main">
      <div class="main_content">
        <el-form :model="param" ref="paramRef" :rules="rules">
          <div class="m_title">流水信息</div>
          <div class="list">
            <el-form-item label="关联合同" prop="type">
              <el-select v-model="param.type" placeholder="请选择" clearable>
                <el-option v-for="item in types" :value="item.value" :label="item.name"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="费用类型" prop="code">
              <el-select v-model="param.type" placeholder="请选择" clearable>
                <el-option v-for="item in types" :value="item.value" :label="item.name"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="费用周期" prop="aaa">
              <el-date-picker type="daterange" v-model="param.getDate" value-format="yyyy-MM-dd" placeholder="请选择" />
            </el-form-item>
            <el-form-item label="账单编号" prop="">
              <el-input type="text" v-model="param.content" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="应收金额" prop="">
              <el-input type="text" v-model="param.content" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="实收金额" prop="">
              <el-input type="text" v-model="param.content" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="所属公司" prop="">
              <el-select v-model="param.type" placeholder="请选择" clearable>
                <el-option v-for="item in types" :value="item.value" :label="item.name"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="收支账户" prop="">
              <el-select v-model="param.aaa" placeholder="请选择" clearable>
                <el-option :value="0" label="否"></el-option>
                <el-option :value="1" label="是"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="入账日期" prop="">
              <el-date-picker type="date" v-model="param.aaa" value-format="yyyy-MM-dd" placeholder="请选择" />
            </el-form-item>
            <el-form-item label="备注" prop="">
              <el-input type="textarea" :rows="4" class="w400" v-model="param.content" placeholder="请输入" />
            </el-form-item>
          </div>
        </el-form>
      </div>
    </div>
    <!--  -->
    <div class="table_wrap">
      <div class="head">
        <div class="title">账单附件</div>
        <el-button type="primary">添加附件</el-button>
      </div>
      <el-table :data="list" stripe>
        <el-table-column prop="code" label="附件名称" min-width="100px"></el-table-column>
        <el-table-column prop="pointName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="name" label="操作时间" min-width="100px"></el-table-column>
        <el-table-column prop="name" label="操作" min-width="100px">
          <template v-slot="scope">
            <span class="red cu" @click="handleDel(scope)">删除</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </GlobalWindow>
</template>
<script>
import GlobalWindow from '@/components/common/GlobalWindow'
import UploadAvatarImage from '@/components/common/UploadAvatarImage'
import { create, updateById } from '@/api/business/company'
import { Message } from 'element-ui'
export default {
  components: { GlobalWindow, UploadAvatarImage },
  data() {
    return {
      isShowModal: false,
      subLoading: false,
      param: {
        type: 2,
        status: '0'
      },
      cateList: [],
      list: [],
      rules: {
        name: [{ required: true, message: '请输入' }],
        desc: [{ required: true, message: '请输入' }]
      },
      types: []
    }
  },
  created() {
  },
  methods: {
    handleSub() {
      const { param, subLoading } = this
      this.$refs['paramRef'].validate((valid) => {
        if (valid) {
          let fn = param.id ? updateById : create
          this.subLoading = true
          fn(param).then(res => {
            this.subLoading = false
            this.$emit('success')
            Message.success('保存成功')
            this.close()
          }).catch(() => {
            this.subLoading = false
          })
        }
      })
    },
    changeSel(e) {
      if (e && e.length == 1) {
        this.$set(this.param, 'catePId', e[0])
        this.$set(this.param, 'cateId', '')
      } else if (e && e.length == 2) {
        this.$set(this.param, 'catePId', e[0])
        this.$set(this.param, 'cateId', e[1])
      } else {
        this.$set(this.param, 'catePId', '')
        this.$set(this.param, 'cateId', '')
      }
      this.search()
    },
    uploadAvatarSuccess(file) {
      this.$set(this.param, 'imgurl', file.imgurl)
      this.$set(this.param, 'imgurlfull', file.imgurlfull)
    },
    handleDel(row) {
      this.list.splice(row.$index, 1)
    },
    close() {
      this.isShowModal = false
      this.$emit('close')
    }
  }
}
</script>
<style lang="scss" scoped>
.main {
  display: flex;
  margin-bottom: 20px;
  padding-top: 20px;
  .main_content {
    flex: 1;
    margin-right: 20px;
    .m_title {
      font-weight: 500;
      margin-bottom: 12px;
      margin-top: 10px;
    }
    .list {
      display: flex;
      flex-wrap: wrap;
      .el-form-item {
        width: 33.33%;
        box-sizing: border-box;
        padding: 0 12px;
      }
    }
  }
  .main_house {
    width: 420px;
    padding: 24px 12px;
    border: 1px solid #c3c6cd;
    border-radius: 2px;
    .title {
      font-size: 16px;
      font-weight: 500;
      margin-bottom: 30px;
    }
  }
}
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  div {
    font-weight: 500;
  }
}
.table_wrap{
  border: 1px solid #e2e2e2;
  border-radius: 2px;
  padding: 12px;
}
</style>
admin/src/views/finance/payments.vue
@@ -4,14 +4,18 @@
    <div class="mt20">
      <el-button type="primary" @click="handleEdit()" icon="el-icon-plus"
        v-permissions="['business:ywpatrolline:create']">新建</el-button>
      <el-button @click="handleEdit()" v-permissions="['business:ywpatrolline:create']">导出</el-button>
    </div>
    <el-table v-loading="loading" :data="list" stripe>
      <el-table-column prop="code" label="shou" min-width="100" show-overflow-tooltip />
      <el-table-column prop="name" label="公司简介" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" label="纳税识别号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="modelNo" label="公司地址" min-width="100" show-overflow-tooltip />
      <el-table-column prop="realName" label="收支账户数量" min-width="100" show-overflow-tooltip />
      <el-table-column prop="status" label="状态" min-width="100" show-overflow-tooltip>
      <el-table-column prop="" label="客户名称" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" label="合同编号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" label="序号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" label="账号编号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" label="收支类型" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" label="发生金额" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" label="收款方式" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" label="入账日期" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" label="状态" min-width="100" show-overflow-tooltip>
        <template v-slot="scope">
          <el-switch v-model="scope.row.status" active-value="0" inactive-value="1">
          </el-switch>
@@ -19,10 +23,10 @@
      </el-table-column>
      <el-table-column label="操作" min-width="120" fixed="right">
        <template slot-scope="{row}">
          <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit"
            v-permissions="['business:category:update']">编辑</el-button>
          <!-- <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit"
            v-permissions="['business:category:update']">编辑</el-button> -->
          <el-button type="text" @click="deleteById(row)" icon="el-icon-delete"
            v-permissions="['business:category:delete']">删除</el-button>
            v-permissions="['business:category:delete']">退款</el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -36,7 +40,7 @@
<script>
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
import Edit from './components/companyEdit.vue'
import Edit from './components/paymentsEdit.vue'
import { companyGetList, deleteById } from '@/api/business/company'
export default {
  components: {
@@ -61,12 +65,22 @@
          {
            filed: 'name',
            type: 'input',
            label: '收支条目'
            label: '客户名称'
          },
          {
            filed: 'name',
            type: 'select',
            label: '收款公司'
            label: '收支类型'
          },
          {
            filed: 'name',
            type: 'select',
            label: '收款方式'
          },
          {
            filed: 'name',
            type: 'daterange',
            label: '入账日期'
          },
        ],
        online: true
admin/src/views/index.vue
@@ -227,13 +227,13 @@
    }
  },
  created() {
    this.updateDate()
    setInterval(() => {
      this.updateDate()
    }, 1000 * 60 * 60)
    // this.updateDate()
    // setInterval(() => {
    //   this.updateDate()
    // }, 1000 * 60 * 60)
  },
  mounted() {
    this.initData()
    // this.initData()
  },
  methods: {
    SubSuccess(str) {
admin/src/views/login.vue
@@ -3,8 +3,8 @@
    <img src="@/assets/images/bg@2x.png" class="main_bg" alt="">
    <div class="login_wrap">
      <div class="login_img">
        <div class="h2">阜宁文体中心</div>
        <div class="h3">智慧物流园区安消一体化系统</div>
        <!-- <div class="h2">阜宁文体中心</div> -->
        <div class="h3">智慧场馆运维管理系统</div>
      </div>
      <div class="form_wrap">
        <div class="tabs">
admin/src/views/project/buildingList.vue
@@ -36,8 +36,8 @@
        <el-table-column prop="code" label="楼宇编码" min-width="80px"></el-table-column>
        <el-table-column prop="area" label="建筑面积(m²)" min-width="80px"></el-table-column>
        <el-table-column prop="cqArea" label="管理面积(m²)" min-width="80px"></el-table-column>
        <el-table-column prop="" label="房间总数(间)" min-width="80px"></el-table-column>
        <el-table-column prop="" label="可招商房源数量(间)" min-width="100px"></el-table-column>
        <el-table-column prop="roomNum" label="房间总数(间)" min-width="80px"></el-table-column>
        <el-table-column prop="roomeRentNum" label="可招商房源数量(间)" min-width="100px"></el-table-column>
        <el-table-column v-if="containPermissions(['business:ywbuilding:update', 'business:ywbuilding:delete'])"
          label="操作" min-width="120" fixed="right">
          <template slot-scope="{row}">
@@ -107,7 +107,8 @@
      this.$refs.operaYwBuildingWindow.getProject()
    },
    editFloor(row) {
      this.$refs.FloorLevelRef.getList(row.id)
      this.$refs.FloorLevelRef.id = row.id
      this.$refs.FloorLevelRef.getList()
      this.$refs.FloorLevelRef.visible = true
    },
    handleDetail(row) {
admin/src/views/project/components/OperaYwBuildingWindow.vue
@@ -1,5 +1,5 @@
<template>
  <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm">
  <GlobalWindow width="900px" :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm">
    <el-form :model="form" ref="form" :rules="rules">
      <el-form-item label="所属项目" prop="projectId" clearable placeholder="请选择项目">
        <el-select v-model="form.projectId" filterable clearable>
admin/src/views/project/components/floorLevel.vue
@@ -1,21 +1,20 @@
<template>
  <GlobalWindow title="楼层管理" :showConfirm="false" :visible.sync="visible" width="800px">
  <GlobalWindow title="楼层管理" @close="close" :showConfirm="false" :visible.sync="visible" width="800px">
    <div class="head">
      <div class="title">楼层列表</div>
      <el-button type="primary" @click="editClick()">新建楼层</el-button>
    </div>
    <el-table :data="list" stripe>
      <el-table-column prop="id" label="楼层编码" min-width="100px"></el-table-column>
      <el-table-column prop="code" label="楼层编码" min-width="100px"></el-table-column>
      <el-table-column prop="name" label="楼层名称" min-width="100px"></el-table-column>
      <el-table-column label="操作" min-width="100px">
        <template slot-scope="{row}">
          <el-button type="text" @click="$refs.operaYwBuildingWindow.open('编辑楼宇', row)" icon="el-icon-edit"
          <el-button type="text" @click="editClick(row)" icon="el-icon-edit"
            v-permissions="['business:ywbuilding:update']">编辑</el-button>
          <el-button type="text" @click="deleteById(row)" icon="el-icon-delete"
          <el-button type="text" @click="handleDel(row)" icon="el-icon-delete"
            v-permissions="['business:ywbuilding:delete']">删除</el-button>
        </template>
      </el-table-column>
      <el-table-column prop="projectName" label="所属项目" min-width="100px"></el-table-column>
    </el-table>
    <div class="mt20">
      <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
@@ -33,7 +32,7 @@
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="showModal = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="showModal = false">ç¡® å®š</el-button>
        <el-button type="primary" :loading="subLoading" @click="onSubmit">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </GlobalWindow>
@@ -42,8 +41,9 @@
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { fetchList, detailById, deleteById, create } from '@/api/project/yeFloor'
import { fetchList, detailById, deleteById, create, updateById } from '@/api/project/yeFloor'
import Pagination from '@/components/common/Pagination'
import { Message } from 'element-ui'
export default {
  extends: BaseOpera,
  components: { GlobalWindow, Pagination },
@@ -54,6 +54,7 @@
      id: '',
      visible: false,
      showModal: false,
      subLoading: false,
      list: [],
      pagination: {
        pageSize: 10,
@@ -65,29 +66,63 @@
      param: {},
      rules: {
        name: [{ required: true, message: '请输入楼层名称' }],
        area: [{ required: true, message: '请输入楼层编码' }],
        code: [{ required: true, message: '请输入楼层编码' }],
      },
    }
  },
  created() {
  },
  methods: {
    onSubmit() {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          const { param, id } = this
          this.subLoading = true
          let fn = param.id ? updateById : create
          fn({ ...param, buildingId: id }).then(res => {
            this.showModal = false
            this.subLoading = false
            Message.success('提交成功')
            this.getList()
          }, () => {
            this.subLoading = false
          })
        }
      })
    },
    getList(buildingId) {
      const { pagination } = this
      const { pagination, id } = this
      // this.buildingId =
      let capacity = pagination.pageSize
      let page = pagination.page
      fetchList({ capacity, page, model: { buildingId } }).then(res => {
        this.list = res
      fetchList({ capacity, page, model: { buildingId: id } }).then(res => {
        this.list = res.records
      })
    },
    editClick(row) {
      if(row && row.id){
        this.title = '编辑楼层'
        this.param = { ...row }
      }else{
        this.title = '新建楼层'
        this.param = {}
      }
      this.showModal = true
    },
    handleDel(row) {
      this.$confirm('确定删除该楼层, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteById(row.id).then(res => {
          Message.success('删除成功')
          this.getList()
        })
      })
    },
    close() {
      this.$emit('success')
    },
    handleSizeChange(capacity) {
      this.pagination.pageSize = capacity
admin/src/views/workorder/components/OperaYwWorkorderWindow.vue
@@ -1,5 +1,5 @@
<template>
  <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm">
  <GlobalWindow width="800px" :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm">
    <el-form :model="form" ref="form" :rules="rules">
      <el-form-item label="位置类型" prop="areaType">
        <el-select v-model="form.areaType">
@@ -7,17 +7,38 @@
          <el-option label="公共维修" value="1"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="报修区域">
      </el-form-item>
      <el-form-item label="分类" prop="cateId">
        <el-select v-model="form.cateId">
          <el-option label="" value=""></el-option>
      <el-form-item label="选择项目" prop="projectId">
        <el-select v-model="form.projectId" clearable filterable @change="getBuild">
          <el-option v-for="item in projectList" :label="item.name" :value="item.id" />
        </el-select>
      </el-form-item>
      <el-form-item label="上门时间" prop="getDate">
        <el-date-picker type="datetime" v-model="form.getDate" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm:ss"
          placeholder="请选择上门时间"></el-date-picker>
      <el-form-item label="选择楼宇" prop="buildingId">
        <el-select v-model="form.buildingId" clearable filterable @change="changeBuild">
          <el-option v-for="item in buildList" :label="item.name" :value="item.id" />
        </el-select>
      </el-form-item>
      <el-form-item label="选择楼层" prop="floorId">
        <el-select v-model="form.floorId">
          <el-option v-for="item in levelList" clearable filterable :label="item.name" :value="item.id" />
        </el-select>
      </el-form-item>
      <el-form-item v-if="form.areaType == 0" label="选择房间" prop="roomId">
        <el-select v-model="form.roomId" clearable filterable>
          <el-option v-for="item in roomList" :label="item.name" :value="item.id" />
        </el-select>
      </el-form-item>
      <el-form-item label="分类" prop="cateId">
        <el-cascader v-model="form.areaIds" @change="changeSel" placeholder="请选择巡检区域" clearable :options="cateList"
          :props="{
            label: 'name',
            value: 'id',
            children: 'childCategoryList'
          }"></el-cascader>
      </el-form-item>
      <el-form-item label="上门时间" v-if="form.areaType == 0" prop="getDate">
        <el-date-picker type="datetime" v-model="form.getDate" format="yyyy-MM-dd HH:mm"
          value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择上门时间"></el-date-picker>
      </el-form-item>
      <el-form-item label="现场图片">
        <div class="file_list">
@@ -37,8 +58,8 @@
          </div>
        </div>
      </el-form-item>
      <el-form-item label="情况说明" prop="content">
        <el-input type="textarea" :rows="4" v-model="form.content" placeholder="请输入情况说明" v-trim />
      <el-form-item label="描述" prop="content">
        <el-input type="textarea" :rows="4" v-model="form.content" placeholder="请输入" :maxlength="300" v-trim />
      </el-form-item>
    </el-form>
    <!--  -->
@@ -49,7 +70,13 @@
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { Loading } from 'element-ui'
import { Loading, Message } from 'element-ui'
import { getProjectList } from '@/api/project/ywProject'
import { getBuildList } from '@/api/project/ywBuilding'
import { getRoomList } from '@/api/project/ywRoom'
import { fetchList } from '@/api/project/yeFloor'
import { fetchList as getCateList } from '@/api/business/category.js'
import { rules } from './config'
export default {
  name: 'OperaYwWorkorderWindow',
  extends: BaseOpera,
@@ -63,6 +90,7 @@
        createDate: '',
        editor: '',
        editDate: '',
        floor: '',
        isdeleted: '',
        title: '',
        remark: '',
@@ -72,6 +100,7 @@
        getDate: '',
        projectId: '',
        buildingId: '',
        floorId: '',
        roomId: '',
        userId: '',
        phone: '',
@@ -90,8 +119,12 @@
      },
      loadingInstance: null,
      // éªŒè¯è§„则
      rules: {
      },
      rules,
      projectList: [],
      buildList: [],
      levelList: [],
      roomList: [],
      cateList: [],
      uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/uploadBatch',
      fileList: [],
      uploadData: {
@@ -106,11 +139,79 @@
    })
  },
  methods: {
    open(title, target) {
      this.title = title
      this.visible = true
      this.getProject()
      this.getCate()
      // æ–°å»º
      if (target == null) {
        this.$nextTick(() => {
          this.$refs.form.resetFields()
          this.form[this.configData['field.id']] = null
        })
        return
      }
      // ç¼–辑
      this.$nextTick(() => {
        for (const key in this.form) {
          this.form[key] = target[key]
        }
      })
    },
    getProject() {
      getProjectList({}).then(res => {
        this.projectList = res
      })
    },
    getBuild(projectId) {
      this.$set(this.form, 'buildingId', '')
      this.$set(this.form, 'floorId', '')
      this.$set(this.form, 'roomId', '')
      getBuildList({ projectId }).then(res => {
        this.buildList = res
      })
    },
    changeBuild(e) {
      this.$set(this.form, 'floorId', '')
      this.$set(this.form, 'roomId', '')
      this.getLevel(e)
      this.getRoom(e)
    },
    getLevel(buildingId) {
      fetchList({ model: { buildingId }, capacity: 9999, page: 1 }).then(res => {
        this.levelList = res.records
      })
    },
    getRoom(buildingId) {
      const { form } = this
      getRoomList({ buildingId }).then(res => {
        this.roomList = res
      })
    },
    changeSel(e) {
      if(e && e.length == 2){
        this.$set(this.form, 'cateId', e[1])
      }else{
        this.$set(this.form, 'cateId', '')
      }
    },
    getCate() {
      getCateList({
        model: { type: 3 },
        capacity: 1000,
        page: 1,
      }).then(res => {
        this.cateList = res.records || []
      })
    },
    beforeUpload (file) {
      if (['video/mp4', 'video/ogg', 'video/flv', 'video/avi', 'video/wmv', 'video/rmvb', 'image/jpeg','image/jpg', 'image/png', 'image/gif'].indexOf(file.type) == -1) {
        this.$message.error('请上传正确的视频/图片格式')
        return false
      }
      if (this.fileList.length > 8) return Message.warning('现场图片不能超过9å¼ ')
      this.loadingInstance = Loading.service({
        lock: true,
        text: 'Loading',
@@ -164,6 +265,7 @@
.file_list {
  display: flex;
  flex-wrap: wrap;
  .avatar-uploader{
    width: 92px;
    height: 92px;
@@ -172,6 +274,7 @@
    align-items: center;
    border: 1px dashed #d9d9d9;
  }
  .item {
    width: 92px;
    max-height: 92px;
admin/src/views/workorder/components/config.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
export const rules = {
  content: [{ required: true, message: '请输入' }],
  areaType: [{ required: true, message: '请选择' }],
  projectId: [{ required: true, message: '请选择' }],
  buildingId: [{ required: true, message: '请选择' }],
  floorId: [{ required: true, message: '请选择' }],
  roomId: [{ required: true, message: '请选择' }],
}