LAPTOP-GC5B4H2B\35838 6 months ago
parent
commit
24ffd048e8

+ 2 - 1
src/views/customerManagement/roomChose/addHouse.vue

@@ -242,7 +242,7 @@ export default {
             }
             const obj = this.AllData[0]
             const data = {
-                houseId: obj.id,
+                houseId: obj.houseId,
                 customerManagementId: this.customerManagementId,
                 buildName: obj.buildName,
                 roomNo: obj.roomNo
@@ -262,6 +262,7 @@ export default {
             window.open(url, '_blank')
         },
         getChildrenData(data) {
+            console.log('data', data)
             if (data) {
                 data.forEach(item => {
                     item.createdName = this.username

+ 93 - 5
src/views/customerManagement/subscribe/subscribeIndex.vue

@@ -1,6 +1,38 @@
 <template>
   <div>
     <div>
+      <el-row class="handle-box">
+        <el-col :span="24">
+          <span class="card_title">客户信息</span>
+        </el-col>
+      </el-row>
+      <el-row class="handle-box">
+        <el-col :span="4">
+          <span>小区-分期:</span>
+          <span>{{ form.groupDiscName }}</span>
+        </el-col>
+        <el-col :span="4">
+          <span>批次号:</span>
+          <span>{{ form.batchNumber }}</span>
+        </el-col>
+        <el-col :span="4">
+          <span>选房号:</span>
+          <span>{{ form.roomSelectionNumber }}</span>
+        </el-col>
+        <el-col :span="4">
+          <span>买受人:</span>
+          <span>{{ form.buyerName }}</span>
+        </el-col>
+        <el-col :span="4">
+          <span>选房日期:</span>
+          <span>{{ form.roomSelectionDate }}</span>
+        </el-col>
+        <el-col :span="4">
+          <span>意向金余额:</span>
+          <span>{{ form.intentionalDepositMoney }}</span>
+          <span>元</span>
+        </el-col>
+      </el-row>
       <el-row class="handle-box">
         <el-col :span="24">
           <span class="card_title">认购</span>
@@ -37,24 +69,31 @@
                 <el-button
                   size="mini"
                   type="text"
-                  :disabled="scope.row.status !== 1"
+                  :disabled="!(scope.row.status === 1 && form.intentionalDepositStatus !== 1)"
                   @click="handleAdd(scope.row)"
                 >登记
                 </el-button>
                 <el-button
                   size="mini"
                   type="text"
-                  :disabled="scope.row.status === 1 || scope.row.status === 4 || scope.row.status === 5"
+                  :disabled="!((scope.row.status === 2 || scope.row.status === 3) && form.intentionalDepositStatus === 0)"
                   @click="handleEdit(scope.row)"
                 > 修改
                 </el-button>
                 <el-button
                   size="mini"
                   type="text"
-                  :disabled="scope.row.status == '1'"
+                  :disabled="scope.row.status === 1"
                   @click="downLoad(scope.row)"
                 > 定金收据
                 </el-button>
+                <el-button
+                  size="mini"
+                  type="text"
+                  :disabled="!(scope.row.status === 1 && form.intentionalDepositStatus === 1)"
+                  @click="handleToDeposit(scope.row)"
+                > 意向金转定金
+                </el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -83,6 +122,23 @@
       <add-subscribe v-if="dialogAddVisible" ref="addSubscribe" @cancel="addSubscribeCancel" />
     </el-dialog>
 
+    <!-- 转定金 -->
+    <el-dialog
+      :visible.sync="dialogToDepositVisible"
+      :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="dialogToDepositVisible" ref="toDeposit" @cancel="toDepositCancel" />
+    </el-dialog>
+
   </div>
 </template>
 
@@ -91,10 +147,11 @@ import Base from '@/views/base/base.vue'
 import BaseData from '@/views/base/baseData.vue'
 import AddSubscribe from '@/views/customerManagement/subscribe/addSubscribe.vue'
 import constant from '@/static/utils/constant'
+import ToDeposit from '@/views/receiveRefundsManagement/intentionalDepositManagement/toDeposit.vue'
 
 export default {
     name: 'AddHouse',
-    components: { AddSubscribe },
+    components: { ToDeposit, AddSubscribe },
     mixins: [Base, BaseData],
     data() {
         return {
@@ -104,7 +161,9 @@ export default {
             customerManagementId: '',
             dateStr: '',
             username: '',
-            dialogAddVisible: false
+            dialogAddVisible: false,
+            dialogToDepositVisible: false,
+            form: {}
         }
     },
     mounted() {
@@ -116,6 +175,7 @@ export default {
     },
     methods: {
         initData(data) {
+            this.getByCustomerManagementId(data.id)
             this.initDict(this.dc_key).then(res => {
                 this.customerManagementId = data.id
                 this.getData(data.id)
@@ -137,6 +197,20 @@ export default {
                 this.$refs.addSubscribe.initData(val)
             })
         },
+        /* 转定金*/
+        handleToDeposit: function(val) {
+            this.dialogToDepositVisible = true
+            const data = {
+                isView: false,
+                id: val.intentionalDepositId,
+                buyerName: val.buyerName
+            }
+
+            // 新vue时调用的方法
+            this.$nextTick(() => {
+                this.$refs.toDeposit.initData(data)
+            })
+        },
         getData: function() {
             const _this = this
             _this.loading = true
@@ -193,15 +267,29 @@ export default {
         addSubscribeCancel() {
             this.dialogAddVisible = false
         },
+        toDepositCancel() {
+            this.dialogToDepositVisible = false
+        },
         downLoad(row) {
             const url = constant.BASE_URI + '/RoomSelectionInfoController/downLoadReceipt?id=' + row.id
             window.open(url, '_blank')
         },
+        getByCustomerManagementId(val) {
+            this.form = {}
+            this.baseCustomerRequest('getById', { id: val }).then(res => {
+                this.form = res.data
+                this.roomSelectionCount = res.data.roomSelectionCount
+            }).catch((err) => {
+            })
+        },
         baseRequest(opUrl, postData) {
             return this.$channel.globeRequest('RoomSelectionInfoController', opUrl, postData, 'project')
         },
         baseInfoRequest: function(opUrl, postData) {
             return this.$channel.baseRequest('ParkInfoController', opUrl, postData, 'User')
+        },
+        baseCustomerRequest(opUrl, postData) {
+            return this.$channel.globeRequest('CustomerManagementController', opUrl, postData, 'project')
         }
 
     }