LAPTOP-FO2T5SIU\35838 6 mesi fa
parent
commit
96beaffad3

+ 309 - 0
src/views/buyingBack/buyingBackAdd.vue

@@ -0,0 +1,309 @@
+<template>
+  <div class="addInvoice">
+    <el-form ref="form" :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-top: 10px">
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>*增购编号</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.serialNumber" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>*原签约信息</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-button type="text" @click="handleContract()">去选择</el-button>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>买受人</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.buyerName" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>房屋</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.houseName" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>实测建筑面积(㎡)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.actualBuildArea" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>签约日期</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-date-picker
+                    v-model="form.signingDate"
+                    type="date"
+                    placeholder="年月日"
+                    value-format="yyyy-MM-dd"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>房屋买卖单价(元/㎡)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.housePrice" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>买受人产权份额占比为(%)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.buyerProportion" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>转让份额</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item prop="invoiceTax">
+                  <el-select
+                    v-model="form.transferProportion"
+                    filterable
+                    placeholder="请选择"
+                    @change="proportionChange"
+                  >
+                    <el-option
+                      v-for="item in dc_data.TRANSFER_PROPORTION"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"
+                    />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>转让后买受人产权份额占比为(%)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.transferBuyerProportion" readonly />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>转让后安居公司产权份额占比为(%)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.transferCompanyProportion" readonly />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>转让单价(元/每平方)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.transferPrice" oninput="value=value.replace(/[^\d.]/g,'')"/>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>转让金(元)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.transferMoney" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>登记日期</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-date-picker
+                    v-model="form.registrationDate"
+                    type="date"
+                    placeholder="年月日"
+                    value-format="yyyy-MM-dd"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>相关资料</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-upload
+                    class="upload-demo"
+                    action="/server/wx/fileController/uploadImage"
+                    :http-request="uploadFile"
+                    :before-remove="beforeRemove"
+                    multiple
+                    :file-list="fileList"
+                  >
+                    <el-button v-if="!isView" size="small" type="primary">点击上传</el-button>
+                    <div slot="file" slot-scope="{file}">
+                      <a :href="file.url">{{ file.name }}</a>
+                      <span v-show="!isView" 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-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>登记人</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="username" readonly />
+                </el-form-item>
+              </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" :loading="loadingFlag" type="primary" @click="confirmSubmit()">确 定</el-button>
+    </div>
+
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :title="dialogTitle"
+      width="90%"
+      top="20px"
+      class="statistic_base"
+      :append-to-body="true"
+      :modal-append-to-body="true"
+      custom-class="tagdialog"
+      @close="getData"
+    >
+      <contract-index v-if="dialogVisible" ref="contractIndex" from-address="addInvoice" @getChildrenData="getChildrenData" />
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import Base from '@/views/base/base.vue'
+import BaseData from '@/views/base/baseData.vue'
+import { upload } from '@/static/utils/channel'
+import ContractIndex from '@/views/signingManagement/contractManagement/index.vue'
+
+export default {
+    name: 'BuyingMoreAdd',
+    components: { ContractIndex },
+    mixins: [Base, BaseData],
+    data() {
+        return {
+            dc_key: ['TRANSFER_PROPORTION'],
+            form: {},
+            rules: {},
+            dialogVisible: false,
+            dialogTitle: '',
+            isView: false,
+            bankOptions: [],
+            loadingFlag: false,
+            fileList: [],
+            username: ''
+        }
+    },
+    mounted() {
+        const username = this.$common.currUser().username
+        this.username = username
+        this.initDict(this.dc_key).then((res) => {
+        })
+    },
+    methods: {
+        initData(data) {
+            this.isView = data.isView
+            this.getBankOptions()
+            if (data) {
+                this.getData(data)
+            }
+        },
+        getData(data) {
+            const postData = {
+                id: data.id
+            }
+            this.baseRequest('getById', postData).then(res => {
+                if (res.data) {
+                    this.form = res.data
+                    this.username = this.form.createdName
+                }
+            }).catch(err => {
+                this.$message.error(err)
+            })
+        },
+        cancel() {
+            this.$emit('cancel')
+        },
+        confirmSubmit() {
+            const _this = this
+            _this.loadingFlag = true
+            const soaUrl = 'add'
+            const extraData = {
+                type: '1'
+            }
+            const postData = Object.assign({}, _this.form, extraData)
+            this.baseRequest(soaUrl, postData).then(res => {
+                if (res.data.code === 200) {
+                    this.$message.success('保存成功')
+                    this.cancel()
+                } else {
+                    this.$message.error(res.data.msg)
+                }
+                _this.loadingFlag = false
+            }).catch(err => {
+                // this.$message.error(err)
+                _this.loadingFlag = false
+            })
+        },
+        handleContract() {
+            this.dialogVisible = true
+            this.dialogTitle = ''
+        },
+        getChildrenData(data) {
+            console.log('data', data)
+            this.dialogVisible = false
+            const postData = {
+                contractId: data
+            }
+            this.baseRequest('getByContractId', postData).then(res => {
+                if (res.data) {
+                    this.form = res.data
+                }
+            })
+        },
+        uploadFile: function(param) {
+            upload(param, true).then((res) => {
+                this.fileList.push(res)
+            })
+        },
+        proportionChange() {
+            const buyerProportion = Number(this.form.buyerProportion)
+            this.form.transferBuyerProportion = buyerProportion + Number(this.form.transferProportion)
+            this.form.transferCompanyProportion = buyerProportion - Number(this.form.transferProportion)
+        },
+        baseRequest(opUrl, postData) {
+            return this.$channel.globeRequest('BuyingMoreController', opUrl, postData, 'project')
+        }
+    }
+}
+</script>
+
+<style lang="scss">
+
+</style>

+ 234 - 0
src/views/buyingBack/index.vue

@@ -0,0 +1,234 @@
+<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()" />
+        <span>房屋&nbsp;</span>
+        <el-input v-model="search.houseName" 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" size="small" style="float: right;margin-left: 10px" @click="handleAdd()"><i class="el-icon-search" />&nbsp;新增</el-button>
+        <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"
+          border
+          :header-cell-style="{background:'#f2f2f2'}"
+        >
+          <el-table-column type="index" width="60" />
+          <el-table-column label="增购编号" prop="serialNumber" />
+          <el-table-column label="买受人" prop="buyerName" width="200" />
+          <el-table-column label="房屋" prop="houseName" width="200" />
+          <el-table-column label="转让份额" prop="transferProportionStr" />
+          <el-table-column label="转让前份额" prop="transferProportionBeforeStr" width="200" />
+          <el-table-column label="转让后份额" prop="transferProportionAfterStr" width="200" />
+          <el-table-column label="转让金(元)" prop="transferMoney" width="110" />
+          <el-table-column label="转让金单价(元/每平方)" prop="transferPrice" />
+          <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="handleView(scope.row)">查看</el-button>
+              <el-button size="mini" type="text" @click="handleDelete(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"
+    >
+      <buying-back-add v-if="dialogVisible" ref="buyingBackAdd" @cancel="cancel" />
+    </el-dialog>
+
+  </div>
+</template>
+<script>
+import Base from '@/views/base/base'
+import BaseData from '@/views/base/baseData'
+import BuyingBackAdd from '@/views/buyingBack/buyingBackAdd.vue'
+export default {
+    name: 'BuyingBack',
+    components: { BuyingBackAdd },
+    mixins: [Base, BaseData],
+    data() {
+        return {
+            dc_key: [''],
+            // 列表相关
+            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.transferProportionStr = item.transferProportion + '%'
+            return item
+        },
+        handleAdd(val) {
+            this.dialogVisible = true
+            this.dialogTitle = '新增'
+            val.isView = true
+            // 新vue时调用的方法
+            this.$nextTick(() => {
+                this.$refs.buyingMoreAdd.initData(val)
+            })
+        },
+        handleView(val) {
+            this.dialogVisible = true
+            this.dialogTitle = '查看'
+            val.isView = true
+            // 新vue时调用的方法
+            this.$nextTick(() => {
+                this.$refs.buyingMoreAdd.initData(val)
+            })
+        },
+        handleDelete(val) {
+            this.$confirm('确认删除该数据,删除后将无法恢复,确认删除吗?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.baseRequest('delete', { id: val.id }).then(res => {
+                    if (res.data.code == 200) {
+                        this.getData()
+                        this.getTreeData()
+                        this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        })
+                    } else {
+                        this.$message({
+                            type: 'error',
+                            message: res.data.msg
+                        })
+                    }
+                }).catch((err) => {
+                    this.$message({
+                        type: 'error',
+                        message: err
+                    })
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消删除'
+                })
+            })
+        },
+        cancel: function() {
+            this.dialogVisible = false
+        },
+        baseRequest(opUrl, postData) {
+            return this.$channel.globeRequest('BuyingMoreController', 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>

+ 299 - 0
src/views/buyingMore/buyingMoreAdd.vue

@@ -0,0 +1,299 @@
+<template>
+  <div class="addInvoice">
+    <el-form ref="form" :model="form" style="width: 100%;padding: 5px" :rules="rules">
+      <el-row>
+        <el-col style="padding-bottom: 10px">
+          <span class="card_title">增购登记</span>
+          <span v-if="!form.id">&nbsp;&nbsp;&nbsp;&nbsp;买受人当前最新产权份额占比为(%):</span>
+          <span v-if="!form.id">{{ form.buyerProportion }}</span>
+          <el-card shadow="always" style="padding-top: 10px">
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>*增购编号</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.serialNumber" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row v-if="!form.id">
+              <el-col :span="4" class="col-txt"><span>*原签约信息</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-button type="text" @click="handleContract()">去选择</el-button>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>买受人</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.buyerName" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>房屋</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.houseName" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>实测建筑面积(㎡)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.actualBuildArea" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>签约日期</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-date-picker
+                    v-model="form.signingDate"
+                    type="date"
+                    placeholder="年月日"
+                    value-format="yyyy-MM-dd"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>房屋买卖单价(元/㎡)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.housePrice" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+<!--            <el-row>-->
+<!--              <el-col :span="4" class="col-txt"><span>买受人产权份额占比为(%)</span></el-col>-->
+<!--              <el-col :span="20" class="col-input">-->
+<!--                <el-form-item>-->
+<!--                  <el-input v-model="form.buyerProportion" />-->
+<!--                </el-form-item>-->
+<!--              </el-col>-->
+<!--            </el-row>-->
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>转让份额</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.transferProportion" @input="proportionChange"/>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>转让后买受人产权份额占比为(%)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.transferBuyerProportion" readonly />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>转让后安居公司产权份额占比为(%)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.transferCompanyProportion" readonly />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>转让单价(元/每平方)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.transferPrice" oninput="value=value.replace(/[^\d.]/g,'')" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>转让金(元)</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="form.transferMoney" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>登记日期</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-date-picker
+                    v-model="form.registrationDate"
+                    type="date"
+                    placeholder="年月日"
+                    value-format="yyyy-MM-dd"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>相关资料</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-upload
+                    class="upload-demo"
+                    action="/server/wx/fileController/uploadImage"
+                    :http-request="uploadFile"
+                    :before-remove="beforeRemove"
+                    multiple
+                    :file-list="fileList"
+                  >
+                    <el-button v-if="!isView" size="small" type="primary">点击上传</el-button>
+                    <div slot="file" slot-scope="{file}">
+                      <a :href="file.url">{{ file.name }}</a>
+                      <span v-show="!isView" 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-row>
+            <el-row>
+              <el-col :span="4" class="col-txt"><span>登记人</span></el-col>
+              <el-col :span="20" class="col-input">
+                <el-form-item>
+                  <el-input v-model="username" readonly />
+                </el-form-item>
+              </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" :loading="loadingFlag" type="primary" @click="confirmSubmit()">确 定</el-button>
+    </div>
+
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :title="dialogTitle"
+      width="90%"
+      top="20px"
+      class="statistic_base"
+      :append-to-body="true"
+      :modal-append-to-body="true"
+      custom-class="tagdialog"
+      @close="getData"
+    >
+      <contract-index v-if="dialogVisible" ref="contractIndex" from-address="addInvoice" @getChildrenData="getChildrenData" />
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import Base from '@/views/base/base.vue'
+import BaseData from '@/views/base/baseData.vue'
+import { upload } from '@/static/utils/channel'
+import ContractIndex from '@/views/signingManagement/contractManagement/index.vue'
+
+export default {
+    name: 'BuyingMoreAdd',
+    components: { ContractIndex },
+    mixins: [Base, BaseData],
+    data() {
+        return {
+            dc_key: ['TRANSFER_PROPORTION'],
+            form: {},
+            rules: {},
+            dialogVisible: false,
+            dialogTitle: '',
+            isView: false,
+            bankOptions: [],
+            loadingFlag: false,
+            fileList: [],
+            username: ''
+        }
+    },
+    mounted() {
+        const username = this.$common.currUser().username
+        this.username = username
+        this.initDict(this.dc_key).then((res) => {
+        })
+    },
+    methods: {
+        initData(data) {
+            this.isView = data.isView
+            this.getBankOptions()
+            if (data) {
+                this.getData(data)
+            }
+        },
+        getData(data) {
+            const postData = {
+                id: data.id
+            }
+            this.baseRequest('getById', postData).then(res => {
+                if (res.data) {
+                    this.form = res.data
+                    this.username = this.form.createdName
+                }
+            }).catch(err => {
+                this.$message.error(err)
+            })
+        },
+        cancel() {
+            this.$emit('cancel')
+        },
+        confirmSubmit() {
+            const _this = this
+            _this.loadingFlag = true
+            const soaUrl = 'add'
+            const extraData = {
+                type: '1'
+            }
+            const postData = Object.assign({}, _this.form, extraData)
+            this.baseRequest(soaUrl, postData).then(res => {
+                if (res.data.code === 200) {
+                    this.$message.success('保存成功')
+                    this.cancel()
+                } else {
+                    this.$message.error(res.data.msg)
+                }
+                _this.loadingFlag = false
+            }).catch(err => {
+                // this.$message.error(err)
+                _this.loadingFlag = false
+            })
+        },
+        handleContract() {
+            this.dialogVisible = true
+            this.dialogTitle = ''
+        },
+        getChildrenData(data) {
+            console.log('data', data)
+            this.dialogVisible = false
+            const postData = {
+                contractId: data
+            }
+            this.baseRequest('getByContractId', postData).then(res => {
+                if (res.data) {
+                    this.form = res.data
+                }
+            })
+        },
+        uploadFile: function(param) {
+            upload(param, true).then((res) => {
+                this.fileList.push(res)
+            })
+        },
+        proportionChange() {
+            const buyerProportion = Number(this.form.buyerProportion)
+            this.form.transferBuyerProportion = buyerProportion + Number(this.form.transferProportion)
+            this.form.transferCompanyProportion = buyerProportion - Number(this.form.transferProportion)
+        },
+        baseRequest(opUrl, postData) {
+            return this.$channel.globeRequest('BuyingMoreController', opUrl, postData, 'project')
+        }
+    }
+}
+</script>
+
+<style lang="scss">
+
+</style>

+ 50 - 51
src/views/buyingMore/index.vue

@@ -10,6 +10,7 @@
     </el-row>
     <el-row class="handle-box" style="margin-bottom: 10px">
       <el-col :span="24" style="margin-top: 20px">
+        <el-button class="ch-button" size="small" style="float: right;margin-left: 10px" @click="handleAdd()"><i class="el-icon-search" />&nbsp;新增</el-button>
         <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>
@@ -26,20 +27,18 @@
           <el-table-column type="index" width="60" />
           <el-table-column label="增购编号" prop="serialNumber" />
           <el-table-column label="买受人" prop="buyerName" width="200" />
-          <el-table-column label="房屋" prop="houseName" />
-          <el-table-column label="转让份额" prop="transferProportion" />
-          <el-table-column label="转让前份额" prop="transferProportionBefore" width="200" />
-          <el-table-column label="转让后份额" prop="transferProportionAfter" width="200" />
+          <el-table-column label="房屋" prop="houseName" width="200" />
+          <el-table-column label="转让份额" prop="transferProportionStr" />
+          <el-table-column label="转让前份额" prop="transferProportionBeforeStr" width="200" />
+          <el-table-column label="转让后份额" prop="transferProportionAfterStr" width="200" />
           <el-table-column label="转让金(元)" prop="transferMoney" width="110" />
           <el-table-column label="转让金单价(元/每平方)" prop="transferPrice" />
           <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 :disabled="scope.row.status !== 1" size="mini" type="text" @click="handleEdit(scope.row)">转定金</el-button>
               <el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button>
-              <el-button :disabled="scope.row.status === 1" size="mini" type="text" @click="downLoad(scope.row)">意向金收据</el-button>
-              <el-button :disabled="scope.row.status === 2" size="mini" type="text" @click="handleRefund(scope.row)">退意向金</el-button>
+              <el-button size="mini" type="text" @click="handleDelete(scope.row)">删除</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -58,7 +57,7 @@
       </el-col>
     </el-row>
 
-    <!-- 转定金 -->
+    <!-- 增购 -->
     <el-dialog
       :visible.sync="dialogVisible"
       :close-on-click-modal="false"
@@ -72,24 +71,7 @@
       custom-class="tagdialog"
       @close="getData"
     >
-      <to-deposit v-if="dialogVisible" ref="toDeposit" @cancel="cancel" />
-    </el-dialog>
-
-    <!-- 退意向金 -->
-    <el-dialog
-      :visible.sync="dialogRefundVisible"
-      :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"
-    >
-      <refund-intentional-deposit v-if="dialogRefundVisible" ref="refund" @cancel="cancel" />
+      <buying-more-add v-if="dialogVisible" ref="buyingMoreAdd" @cancel="cancel" />
     </el-dialog>
 
   </div>
@@ -97,17 +79,15 @@
 <script>
 import Base from '@/views/base/base'
 import BaseData from '@/views/base/baseData'
-import ToDeposit from '@/views/receiveRefundsManagement/intentionalDepositManagement/toDeposit.vue'
-import RefundIntentionalDeposit from '@/views/receiveRefundsManagement/intentionalDepositManagement/refundIntentionalDeposit.vue'
-import constant from '@/static/utils/constant'
+import BuyingMoreAdd from '@/views/buyingMore/buyingMoreAdd.vue'
 
 export default {
     name: 'BuyingMoreIndex',
-    components: { ToDeposit, RefundIntentionalDeposit },
+    components: { BuyingMoreAdd },
     mixins: [Base, BaseData],
     data() {
         return {
-            dc_key: ['INTENTIONAL_DEPOSIT_STATUS'],
+            dc_key: [''],
             // 列表相关
             search: {
             },
@@ -115,8 +95,7 @@ export default {
             loading: false,
             // 弹框相关
             dialogVisible: false,
-            dialogTitle: '新增',
-            dialogRefundVisible: false
+            dialogTitle: '新增'
         }
     },
     mounted() {
@@ -159,16 +138,16 @@ export default {
             this.handleSearch()
         },
         getItemJson: function(item) {
-            item.statusStr = this.dc_map.INTENTIONAL_DEPOSIT_STATUS[item.status]
+            item.transferProportionStr = item.transferProportion + '%'
             return item
         },
-        /* 编辑*/
-        handleEdit: function(val) {
+        handleAdd(val) {
             this.dialogVisible = true
-            val.isView = false
+            this.dialogTitle = '新增'
+            val.isView = true
             // 新vue时调用的方法
             this.$nextTick(() => {
-                this.$refs.toDeposit.initData(val)
+                this.$refs.buyingMoreAdd.initData(val)
             })
         },
         handleView(val) {
@@ -177,27 +156,47 @@ export default {
             val.isView = true
             // 新vue时调用的方法
             this.$nextTick(() => {
-                this.$refs.toDeposit.initData(val)
+                this.$refs.buyingMoreAdd.initData(val)
             })
         },
-        downLoad(row) {
-            const url = constant.BASE_URI + '/IntentionalDepositController/downLoadReceipt?id=' + row.id
-            window.open(url, '_blank')
-        },
-        handleRefund(val) {
-            this.dialogRefundVisible = true
-            val.isView = false
-            // 新vue时调用的方法
-            this.$nextTick(() => {
-                this.$refs.refund.initData(val)
+        handleDelete(val) {
+            this.$confirm('确认删除该数据,删除后将无法恢复,确认删除吗?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.baseRequest('delete', { id: val.id }).then(res => {
+                    if (res.data.code == 200) {
+                        this.getData()
+                        this.getTreeData()
+                        this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        })
+                    } else {
+                        this.$message({
+                            type: 'error',
+                            message: res.data.msg
+                        })
+                    }
+                }).catch((err) => {
+                    this.$message({
+                        type: 'error',
+                        message: err
+                    })
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消删除'
+                })
             })
         },
         cancel: function() {
             this.dialogVisible = false
-            this.dialogRefundVisible = false
         },
         baseRequest(opUrl, postData) {
-            return this.$channel.globeRequest('IntentionalDepositController', opUrl, postData, '')
+            return this.$channel.globeRequest('BuyingMoreController', opUrl, postData, '')
         }
     }
 }

+ 0 - 1
src/views/invoice/components/addInvoice.vue

@@ -77,7 +77,6 @@
                     v-model="form.invoiceSellerBank"
                     filterable
                     placeholder="请选择"
-                    popper-class="statistic_base"
                   >
                     <el-option
                       v-for="item in bankOptions"

+ 0 - 1
src/views/invoice/components/formalInvoiceManageEdit.vue

@@ -69,7 +69,6 @@
                     v-model="form.invoiceSellerBank"
                     filterable
                     placeholder="请选择"
-                    popper-class="statistic_base"
                   >
                     <el-option
                       v-for="item in bankOptions"

+ 0 - 4
src/views/invoice/components/invoiceBankEdit.vue

@@ -65,16 +65,12 @@
                         :disabled="!scope.row.isSelected"
                         size="mini"
                         placeholder="请选择"
-                        popper-class="statistic_base"
-                        :popper-append-to-body="false"
                       >
                         <el-option
                           v-for="item in dc_data.invoice_tax"
                           :key="item.value"
                           :label="item.label"
                           :value="item.value"
-                          popper-class="statistic_base"
-                          :popper-append-to-body="false"
                         />
                       </el-select>
                     </template>

+ 6 - 6
src/views/invoice/formalInvoiceManage.vue

@@ -17,7 +17,7 @@
         <span>推送状态</span>
       </el-col>
       <el-col :span="4" class="col-input">
-        <el-select v-model="search.sendStatus" style="width: 100%" placeholder="请选择" popper-class="statistic_base">
+        <el-select v-model="search.sendStatus" style="width: 100%" placeholder="请选择" >
           <el-option
             v-for="item in dc_data.SEND_STATUS"
             :key="item.value"
@@ -34,7 +34,7 @@
           v-model="search.invoiceStatus"
           style="width: 100%"
           filterable
-          popper-class="statistic_base"
+
         >
           <el-option
             v-for="item in dc_data.INVOICE_STATUS"
@@ -53,7 +53,7 @@
         <el-date-picker
           v-model="search.sendDateFrom"
           style="width: 100%"
-          popper-class="statistic_base"
+
           type="date"
           placeholder="年月日"
           value-format="yyyy-MM-dd"
@@ -66,7 +66,7 @@
         <el-date-picker
           v-model="search.sendDateTo"
           style="width: 100%"
-          popper-class="statistic_base"
+
           type="date"
           placeholder="年月日"
           value-format="yyyy-MM-dd"
@@ -79,7 +79,7 @@
         <el-date-picker
           v-model="search.invoiceDateFrom"
           style="width: 100%"
-          popper-class="statistic_base"
+
           type="date"
           placeholder="年月日"
           value-format="yyyy-MM-dd"
@@ -92,7 +92,7 @@
         <el-date-picker
           v-model="search.invoiceDateTo"
           style="width: 100%"
-          popper-class="statistic_base"
+
           type="date"
           placeholder="年月日"
           value-format="yyyy-MM-dd"

+ 6 - 6
src/views/invoice/invoiceManage.vue

@@ -17,7 +17,7 @@
         <span>推送状态</span>
       </el-col>
       <el-col :span="4" class="col-input">
-        <el-select v-model="search.sendStatus" style="width: 100%" placeholder="请选择" popper-class="statistic_base">
+        <el-select v-model="search.sendStatus" style="width: 100%" placeholder="请选择" >
           <el-option
             v-for="item in dc_data.SEND_STATUS"
             :key="item.value"
@@ -34,7 +34,7 @@
           v-model="search.invoiceStatus"
           style="width: 100%"
           filterable
-          popper-class="statistic_base"
+
         >
           <el-option
             v-for="item in dc_data.INVOICE_STATUS"
@@ -53,7 +53,7 @@
         <el-date-picker
           v-model="search.sendDateFrom"
           style="width: 100%"
-          popper-class="statistic_base"
+
           type="date"
           placeholder="年月日"
           value-format="yyyy-MM-dd"
@@ -67,7 +67,7 @@
           v-model="search.sendDateTo"
 
           style="width: 100%"
-          popper-class="statistic_base"
+
           type="date"
           placeholder="年月日"
           value-format="yyyy-MM-dd"
@@ -79,7 +79,7 @@
       <el-col :span="4" class="col-input">
         <el-date-picker
           v-model="search.invoiceDateFrom"
-          popper-class="statistic_base"
+
           type="date"
           style="width: 100%"
           placeholder="年月日"
@@ -92,7 +92,7 @@
       <el-col :span="4" class="col-input">
         <el-date-picker
           v-model="search.invoiceDateTo"
-          popper-class="statistic_base"
+
           type="date"
           style="width: 100%"
           placeholder="年月日"