LAPTOP-FO2T5SIU\35838 8 月之前
父节点
当前提交
62d39571cc

+ 91 - 15
src/views/receiveRefundsManagement/refundManagement/addRefund.vue

@@ -23,7 +23,24 @@
               <el-col :span="3" class="col-txt"><span>*身份证号</span></el-col>
               <el-col :span="9" class="col-input">
                 <el-form-item prop="identityCard">
-                  <el-input v-model="form.identityCard" />
+                  <el-select
+                    v-model="form.identityCard"
+                    :popper-append-to-body="false"
+                    popper-class="statistic_base"
+                    placeholder=""
+                    filterable
+                    clearable
+                    @change="getHouseList"
+                  >
+                    <el-option
+                      v-for="item in idNumberOption"
+                      :key="item.value"
+                      popper-class="statistic_base"
+                      :popper-append-to-body="false"
+                      :label="item.label"
+                      :value="item.value"
+                    />
+                  </el-select>
                 </el-form-item>
               </el-col>
             </el-row>
@@ -60,14 +77,15 @@
                     placeholder=""
                     filterable
                     clearable
+                    @change="houseChange"
                   >
                     <el-option
-                      v-for="item in dc_data.houseOption"
+                      v-for="item in houseOption"
                       :key="item.value"
                       popper-class="statistic_base"
                       :popper-append-to-body="false"
                       :label="item.label"
-                      :value="item.value"
+                      :value="item"
                     />
                   </el-select>
                 </el-form-item>
@@ -184,7 +202,10 @@
 import Base from '@/views/base/base'
 import BaseData from '@/views/base/baseData'
 import { upload } from '@/static/utils/channel'
-
+const form = {
+    houseId: null,
+    buyerName: null
+}
 export default {
     name: 'PaymentRegistration',
     components: { },
@@ -192,9 +213,7 @@ export default {
     data() {
         return {
             dc_key: ['CHECK_OUT_REASON'],
-            form: {
-
-            },
+            form: { ...form },
             rules: {
 
             },
@@ -202,10 +221,9 @@ export default {
             loading: false,
             dialogVisible: false,
             contractId: '',
-            houseId: '',
-            customerManagementId: '',
             isView: false,
             houseOption: [],
+            idNumberOption: [],
             fileList: [],
             dateStr: '',
             username: ''
@@ -224,14 +242,65 @@ export default {
     methods: {
         initData(data) {
             this.isView = data.isView
-            this.contractId = data.id
-            this.customerManagementId = data.customerManagementId
+            this.contractId = data.contractId
             this.initDict(this.dc_key).then(res => {
-                this.getData()
+                this.getIdentityCardList()
             })
         },
-        getData() {
-
+        getIdentityCardList() {
+            const _this = this
+            _this.idNumberOption = []
+            this.baseBuyerRequest('numberList').then((res) => {
+                if (res.data) {
+                    res.data.forEach(item => {
+                        const obj = {
+                            label: item,
+                            value: item
+                        }
+                        _this.idNumberOption.push(obj)
+                    })
+                }
+            }).catch((e) => {
+            })
+        },
+        getHouseList() {
+            const _this = this
+            _this.houseOption = []
+            _this.form.houseId = ''
+            _this.form.customerManagementId = ''
+            _this.form.buyerName = ''
+            const postData = {
+                identityCard: this.form.identityCard
+            }
+            this.baseRequest('getHouseListByIdCard', postData).then((res) => {
+                if (res.data) {
+                    res.data.forEach(item => {
+                        const obj = {
+                            label: item.groupName + '-' + item.discName + '-' + item.buildName + '-' + item.roomNo,
+                            value: item.id,
+                            customerManagementId: item.customerManagementId
+                        }
+                        _this.houseOption.push(obj)
+                    })
+                }
+                _this.loading = false
+            }).catch((e) => {
+            })
+        },
+        houseChange(val) {
+            this.form.customerManagementId = val.customerManagementId
+            this.getBuyerName()
+        },
+        getBuyerName() {
+            const postData = {
+                id: this.form.customerManagementId
+            }
+            this.baseCustomerManagementRequest('getById', postData).then((res) => {
+                if (res.data) {
+                    this.form.buyerName = res.data.buyerName
+                }
+            }).catch((e) => {
+            })
         },
         getItemJson: function(item) {
             return item
@@ -245,8 +314,15 @@ export default {
             })
         },
         baseRequest(opUrl, postData) {
-            return this.$channel.globeRequest('PayLogController', opUrl, postData, 'project')
+            return this.$channel.globeRequest('RefundManageController', opUrl, postData, 'project')
+        },
+        baseCustomerManagementRequest(opUrl, postData) {
+            return this.$channel.globeRequest('CustomerManagementController', opUrl, postData, 'project')
+        },
+        baseBuyerRequest(opUrl, postData) {
+            return this.$channel.globeRequest('BuyerController', opUrl, postData, 'project')
         }
+
     }
 }
 </script>

+ 0 - 2
src/views/receiveRefundsManagement/refundManagement/index.vue

@@ -131,9 +131,7 @@ export default {
                 }
                 _this.loading = false
             }).catch((e) => {
-                // console.log(e)
             })
-            // this.initOutData()
         },
         handleSearch: function() {
             this.getData()

+ 3 - 1
src/views/signingManagement/contractManagement/index.vue

@@ -178,7 +178,9 @@ export default {
             this.handleSearch()
         },
         getItemJson: function(item) {
-            item.buyerProportionStr = item.buyerProportion + '%'
+            if (item.buyerProportion) {
+                item.buyerProportionStr = item.buyerProportion + '%'
+            }
             item.paymentMethodStr = this.dc_map.PAYMENT_METHODS[item.paymentMethod]
             item.contractStatusStr = this.dc_map.CONTRACT_STATUS[item.contractStatus]
             return item