LAPTOP-FO2T5SIU\35838 8 meses atrás
pai
commit
6618db674f

+ 36 - 7
src/views/customerManagement/roomChose/addHouse.vue

@@ -63,7 +63,8 @@
     </div>
     <div style="text-align: right;margin-top: 50px">
       <el-button @click="cancel">取 消</el-button>
-      <el-button type="primary" @click="confirmSubmit()">提交选房</el-button>
+      <el-button v-if="fromAddress!== 'intentionalDepositManagement'" type="primary" @click="confirmSubmit()">提交选房</el-button>
+      <el-button v-if="fromAddress=== 'intentionalDepositManagement'" type="primary" @click="intentionalDepositConfirmSubmit()">意向金提交选房</el-button>
     </div>
 
     <!--选房-->
@@ -94,6 +95,13 @@ export default {
     name: 'AddHouse',
     components: { ParkRoom },
     mixins: [Base, BaseData],
+    props: {
+        // 确认从哪个页面跳转过来的,这样可以做相应的操作
+        fromAddress: {
+            type: String,
+            default: ''
+        }
+    },
     data() {
         return {
             dc_key: ['DECORATION_SITUATION'],
@@ -108,7 +116,6 @@ export default {
         }
     },
     mounted() {
-        console.log('this.$common.currUser()', this.$common.currUser())
         const myDate = new Date()
         const dateStr = myDate.getFullYear() + '-' + (myDate.getMonth() + 1) + '-' + myDate.getDate()
         const username = this.$common.currUser().username
@@ -183,8 +190,33 @@ export default {
                 })
             })
         },
-        cancel() {
-            this.$emit('cancel')
+        intentionalDepositConfirmSubmit: function() {
+            if (!this.AllData) {
+                if (this.AllData.length === 0) {
+                    this.$message({
+                        message: '请选择房间',
+                        type: 'warning'
+                    })
+                }
+                if (this.AllData.length > 1) {
+                    this.$message({
+                        message: '只能选择一个房间',
+                        type: 'warning'
+                    })
+                }
+                return
+            }
+            const obj = this.AllData[0]
+            const data = {
+                houseId: obj.id,
+                customerManagementId: this.customerManagementId,
+                buildName: obj.buildName,
+                roomNo: obj.roomNo
+            }
+            this.cancel(data)
+        },
+        cancel(data) {
+            this.$emit('cancel', data)
         },
         // 删除单个行
         handleDelete(index) {
@@ -211,9 +243,6 @@ export default {
         },
         baseRequest(opUrl, postData) {
             return this.$channel.globeRequest('RoomSelectionInfoController', opUrl, postData, 'project')
-        },
-        baseInfoRequest: function(opUrl, postData) {
-            return this.$channel.baseRequest('ParkInfoController', opUrl, postData, 'User')
         }
 
     }

+ 207 - 0
src/views/receiveRefundsManagement/intentionalDepositManagement/index.vue

@@ -0,0 +1,207 @@
+<template>
+  <div>
+    <el-row class="handle-box" style="margin-bottom: 10px">
+      <el-col :span="24">
+        <span>姓名&nbsp;</span>
+        <el-input v-model="search.buyerName" class="ch-input ch-input-size" placeholder="买受人" size="small" @keyup.enter.native="handleSearch()" />
+      </el-col>
+    </el-row>
+    <el-row class="handle-box" style="margin-bottom: 10px">
+      <el-col :span="24" style="margin-top: 20px">
+        <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" />&nbsp;重置</el-button>
+        <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
+      </el-col>
+    </el-row>
+    <el-row class="handle-box">
+      <el-col :span="24">
+        <el-table
+          v-loading="loading"
+          :data="AllData"
+          row-class-name="g_table_row"
+          stripe
+          border
+          :header-cell-style="{background:'#f2f2f2'}"
+        >
+          <el-table-column type="index" width="60" />
+          <el-table-column label="小区-分期" prop="groupDiscName" />
+          <el-table-column label="意向金流水号" prop="serialNumber" />
+          <el-table-column label="买受人" prop="buyerName" width="200" />
+          <el-table-column label="意向金金额" prop="receivableMoney" width="200" />
+          <el-table-column label="状态" prop="statusStr" width="110" />
+          <el-table-column label="定金编号" prop="depositSerialNumber" />
+          <el-table-column label="认购房屋" prop="houseName" />
+          <el-table-column label="经办时间" prop="createdName" />
+          <el-table-column label="经办人" prop="createdAt" />
+          <el-table-column header-align="center" label="操作" width="380">
+            <template scope="scope">
+              <el-button size="mini" type="text" @click="handleEdit(scope.row)">转定金</el-button>
+              <el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button>
+              <el-button size="mini" type="text" @click="downLoad(scope.row)">意向金收据</el-button>
+              <el-button size="mini" type="text" @click="handleRefund(scope.row)">退意向金</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="table-page">
+          <el-pagination
+            :current-page.sync="currentPage"
+            :page-sizes="[10, 20, 50, 100]"
+            :page-size="pageSize"
+            background
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="allpage"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+          />
+        </div>
+      </el-col>
+    </el-row>
+
+    <!--意向金-->
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      title=""
+      width="90%"
+      top="20px"
+      class="statistic_base"
+      :append-to-body="true"
+      :modal-append-to-body="true"
+      custom-class="tagdialog"
+      @close="getData"
+    >
+      <to-deposit v-if="dialogVisible" ref="toDeposit" @cancel="cancel" />
+    </el-dialog>
+
+  </div>
+</template>
+<script>
+import Base from '@/views/base/base'
+import BaseData from '@/views/base/baseData'
+import ToDeposit from '@/views/receiveRefundsManagement/intentionalDepositManagement/toDeposit.vue'
+
+export default {
+    name: 'Index',
+    components: { ToDeposit },
+    mixins: [Base, BaseData],
+    data() {
+        return {
+            dc_key: ['INTENTIONAL_DEPOSIT_STATUS'],
+            // 列表相关
+            search: {
+            },
+            AllData: [],
+            loading: false,
+            // 弹框相关
+            dialogVisible: false,
+            dialogTitle: '新增'
+        }
+    },
+    mounted() {
+        this.initDict(this.dc_key).then((res) => {
+            this.getData()
+        })
+    },
+    methods: {
+
+        getData: function() {
+            const _this = this
+            _this.loading = true
+            _this.AllData = []
+
+            this.search.pageNum = this.currentPage
+            this.search.pageSize = this.pageSize
+            this.baseRequest('list', this.search).then((res) => {
+                if (res.data.rows) {
+                    res.data.rows.forEach(function(item) {
+                        const json = _this.getItemJson(item)
+                        _this.AllData.push(json)
+                    })
+                    _this.allpage = res.data.total
+                }
+                _this.loading = false
+            }).catch((e) => {
+                // console.log(e)
+            })
+            // this.initOutData()
+        },
+        handleSearch: function() {
+            this.getData()
+        },
+        handleReset: function() {
+            for (const i in this.search) {
+                if (i !== 'pageNum' && i !== 'pageSize') {
+                    this.search[i] = ''
+                }
+            }
+            this.handleSearch()
+        },
+        getItemJson: function(item) {
+            item.statusStr = this.dc_map.INTENTIONAL_DEPOSIT_STATUS[item.status]
+            return item
+        },
+        /* 编辑*/
+        handleEdit: function(val) {
+            this.dialogVisible = true
+            val.isView = false
+            // 新vue时调用的方法
+            this.$nextTick(() => {
+                this.$refs.toDeposit.initData(val)
+            })
+        },
+        handleView(val) {
+            this.dialogVisible = true
+            this.dialogTitle = '查看'
+            val.isView = true
+            // 新vue时调用的方法
+            this.$nextTick(() => {
+                this.$refs.toDeposit.initData(val)
+            })
+        },
+        downLoad(val) {
+
+        },
+        handleRefund(val) {
+
+        },
+        cancel: function() {
+            this.dialogVisible = false
+        },
+        baseRequest(opUrl, postData) {
+            return this.$channel.globeRequest('IntentionalDepositController', opUrl, postData, '')
+        }
+    }
+}
+</script>
+
+<style scoped>
+  .ch-input .el-input__inner {
+      border-color: #32323A;
+  }
+  .ch-input-size {
+      width: 150px;
+  }
+  .ch-button {
+      border-color: #32323A;
+      background-color: #32323A;
+      color: #fff;
+  }
+  .ch-button-warning {
+      margin-left: 10px;
+      border-color: #E6A23C;
+      background-color: #E6A23C;
+      color: #fff;
+  }
+  .ch-button-export {
+      margin-left: 10px;
+      border-color: #98CC1F;
+      background-color: #98CC1F;
+      color: #fff;
+  }
+  /deep/.el-dialog__header {
+      padding: 10px 20px;
+  }
+  /deep/.el-dialog__body {
+      padding: 10px 20px;
+  }
+</style>

+ 259 - 0
src/views/receiveRefundsManagement/intentionalDepositManagement/toDeposit.vue

@@ -0,0 +1,259 @@
+<template>
+  <div>
+    <el-form ref="form" v-loading="addLoading" :model="form" style="width: 100%;padding: 5px" :rules="rules">
+      <el-row>
+        <el-col style="padding-bottom: 10px">
+          <span class="card_title">转定金</span>
+          <el-card shadow="always" style="padding: 15px 5px 5px 15px">
+            <el-row>
+              <el-col :span="3" class="col-txt"><span>购房人</span></el-col>
+              <el-col :span="9" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.buyerName" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="3" class="col-txt"><span>已缴纳意向金金额(元)</span></el-col>
+              <el-col :span="9" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.receivedAmount" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="3" class="col-txt"><span>意向金编号</span></el-col>
+              <el-col :span="9" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.serialNumber" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="3" class="col-txt"><span>定金编号</span></el-col>
+              <el-col :span="9" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.depositSerialNumber" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="3" class="col-txt"><span>认购房屋</span></el-col>
+              <el-col :span="9" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.houseName" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="3" class="col-txt">
+                <el-form-item>
+                  <el-button type="text" @click="handleHouse()">去选房</el-button>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="3" class="col-txt"><span>备注</span></el-col>
+              <el-col :span="21" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.depositRemark" type="textarea" :autosize="{ minRows: 2, maxRows: 100}" placeholder="请输入内容" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="3" class="col-txt"><span>原纸质收据</span></el-col>
+              <el-col :span="15" class="col-input">
+                <el-form-item>
+                  <el-upload
+                    class="upload-demo"
+                    action="/server/wx/fileController/uploadImage"
+                    :http-request="uploadPhoto"
+                    :before-remove="beforeRemove"
+                    multiple
+                    :file-list="fileList"
+                  >
+                    <el-button v-if="!isView" size="small" type="primary">点击上传</el-button>
+                    <div slot="file" slot-scope="{file}" style="overflow:hidden;white-space: nowrap;text-overflow:ellipsis">
+                      <el-tooltip class="item" effect="dark" :content="file.name" placement="top-start">
+                        <a :href="file.url">{{ file.name }}</a>
+                      </el-tooltip>
+                      <span class="el-upload-list__item-actions">
+                        <i class="el-icon-delete" @click="handlePictureRemove(file,fileList)" />
+                      </span>
+                    </div>
+                  </el-upload>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6" class="col-input">
+                <el-button type="text" style="float: right">意向金收据下载</el-button>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="3" class="col-txt"><span>经办时间</span></el-col>
+              <el-col :span="3" class="col-input"><span>{{ dateStr }}</span></el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="3" class="col-txt"><span>经办人</span></el-col>
+              <el-col :span="3" class="col-input"><span>{{ username }}</span></el-col>
+            </el-row>
+          </el-card>
+        </el-col>
+      </el-row>
+    </el-form>
+    <div style="text-align: right">
+      <el-button @click="cancel">取 消</el-button>
+      <el-button v-if="!isView" type="primary" @click="confirmSubmit()">提 交</el-button>
+    </div>
+
+    <!--选房-->
+    <el-dialog
+      :visible.sync="dialogHouseVisible"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      title="选房"
+      width="90%"
+      top="20px"
+      class="statistic_base"
+      :append-to-body="true"
+      :modal-append-to-body="true"
+      custom-class="tagdialog"
+    >
+      <add-house v-if="dialogHouseVisible" ref="addHouse" from-address="intentionalDepositManagement" @cancel="handleRoomCancel" />
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import Base from '@/views/base/base'
+import BaseData from '@/views/base/baseData'
+import { upload } from '@/static/utils/channel'
+import AddHouse from '@/views/customerManagement/roomChose/addHouse.vue'
+
+export default {
+    name: 'ToDeposit',
+    components: { AddHouse },
+    mixins: [Base, BaseData],
+    data() {
+        return {
+            dc_key: ['PAYMENT_METHODS', 'COLLECTION_METHODS'],
+            form: {
+
+            },
+            rules: {
+            },
+            addLoading: false,
+            serialNumber: '',
+            fileList: [],
+            dateStr: '',
+            username: '',
+            dialogHouseVisible: false,
+            isView: false
+        }
+    },
+    mounted() {
+        const myDate = new Date()
+        const dateStr = myDate.getFullYear() + '-' + (myDate.getMonth() + 1) + '-' + myDate.getDate()
+        const username = this.$common.currUser().username
+        this.dateStr = dateStr
+        this.username = username
+    },
+    methods: {
+        initData(data) {
+            this.isView = data.isView
+            this.initDict(this.dc_key).then(res => {
+                this.getById(data)
+            })
+        },
+        getById(data) {
+            this.baseRequest('getById', data).then(res => {
+                this.form = res.data
+                this.form.buyerName = data.buyerName
+                if (this.form.paperReceipts) {
+                    this.fileList = JSON.parse(this.form.paperReceipts)
+                }
+                if (res.data.handleName) {
+                    this.username = res.data.handleName
+                }
+                if (res.data.handleDate) {
+                    this.dateStr = res.data.handleDate
+                }
+                if (!this.form.depositSerialNumber) {
+                    this.getDepositSerialNumber(data)
+                }
+            })
+        },
+        getDepositSerialNumber(val) {
+            const data = {
+                id: val.id
+            }
+            this.baseRequest('getDepositSerialNumber', data).then(res => {
+                this.form.depositSerialNumber = res.data
+            })
+        },
+        confirmSubmit: function() {
+            const _this = this
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    const soaUrl = 'toDeposit'
+                    const extraData = {
+                        paperReceipts: JSON.stringify(_this.fileList)
+                    }
+                    const postData = Object.assign({}, _this.form, extraData)
+                    this.baseRequest(soaUrl, postData).then(res => {
+                        if (res.data.code === 200) {
+                            _this.$message({
+                                message: '新增成功',
+                                type: 'success'
+                            })
+                            _this.cancel()
+                        } else {
+                            _this.$message({
+                                message: res.msg,
+                                type: 'warning'
+                            })
+                        }
+                    }).catch(err => {
+                        _this.$message({
+                            message: err,
+                            type: 'warning'
+                        })
+                    })
+                } else {
+                    console.log('error submit!!')
+                    return false
+                }
+            })
+        },
+        cancel() {
+            this.$emit('cancel')
+        },
+        handleRoomCancel(data) {
+            this.form.houseName = data.buildName + '-' + data.roomNo
+            this.form.houseId = data.houseId
+            this.dialogHouseVisible = false
+        },
+
+        uploadPhoto: function(param) {
+            upload(param, true).then((res) => {
+                this.fileList.push(res)
+            })
+        },
+        /* 选房*/
+        handleHouse: function() {
+            this.dialogHouseVisible = true
+            const data = {
+                id: this.form.customerManagementId,
+                groupId: this.form.groupId,
+                discId: this.form.discId
+            }
+            // 新vue时调用的方法
+            this.$nextTick(() => {
+                this.$refs.addHouse.initData(data)
+            })
+        },
+        baseRequest(opUrl, postData) {
+            return this.$channel.globeRequest('IntentionalDepositController', opUrl, postData, 'project')
+        }
+
+    }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 4
src/views/signingManagement/contractManagement/index.vue

@@ -45,7 +45,7 @@
       </el-col>
     </el-row>
     <el-row class="handle-box" style="margin-bottom: 10px">
-      <el-col :span="24">
+      <el-col :span="24" style="margin-top: 20px">
         <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" />&nbsp;重置</el-button>
         <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
       </el-col>
@@ -121,10 +121,8 @@ import Base from '@/views/base/base'
 import BaseData from '@/views/base/baseData'
 import contractAdd from '@/views/signingManagement/contractManagement/contractAdd.vue'
 
-import Speech from 'speak-tts'
-
 export default {
-    name: 'DemoStudent',
+    name: 'ContractIndex',
     components: { contractAdd },
     mixins: [Base, BaseData],
     data() {