| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323 |
- <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="!isView"> 买受人当前最新产权份额占比为(%):</span>
- <span v-if="!isView">{{ form.buyerProportion }}</span>
- <el-card shadow="always" style="padding-top: 10px">
- <el-row>
- <el-col :span="4" class="col-txt"><span><span class="red-asterisk">*</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="!isView&&!id">
- <el-col :span="4" class="col-txt"><span><span class="red-asterisk">*</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.transferBuyerProportionAfter" 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.transferCompanyProportionAfter" 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"
- :limit="6"
- :before-upload="$common.beforeUploadJustWordExcel"
- >
- <el-button v-if="!isView" size="small" type="primary">点击上传</el-button>
- <div slot="tip" class="el-upload__tip">只能上传pdf、doc、docx、xls、xlsx文件,且不超过5MB,数量不超过6</div>
- <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"
- >
- <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: 'BuyingBackAdd',
- components: { ContractIndex },
- mixins: [Base, BaseData],
- data() {
- return {
- dc_key: ['TRANSFER_PROPORTION'],
- form: {},
- rules: {},
- dialogVisible: false,
- dialogTitle: '',
- isView: false,
- bankOptions: [],
- loadingFlag: false,
- fileList: [],
- username: '',
- id: ''
- }
- },
- 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.id = data.id
- if (data.id) {
- this.getData(data)
- }
- },
- getData(data) {
- console.log(data)
- const postData = {
- id: data.id
- }
- this.baseRequest('getById', postData).then(res => {
- if (res.data) {
- this.form = res.data
- this.username = this.form.createdName
- this.fileList = JSON.parse(this.form.fileList)
- }
- }).catch(err => {
- this.$message.error(err)
- })
- },
- cancel() {
- this.$emit('cancel')
- },
- confirmSubmit() {
- const _this = this
- if (!_this.form.contractId) {
- _this.$message.warning('请选择合同')
- return
- }
- this.$refs.form.validate(valid => {
- if (valid) {
- _this.loadingFlag = true
- let soaUrl = 'add'
- if (_this.form.id) {
- soaUrl = 'edit'
- }
- const extraData = {
- type: '2',
- fileList: JSON.stringify(_this.fileList)
- }
- 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) {
- this.dialogVisible = false
- if (!data) return
- 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.transferBuyerProportionAfter = buyerProportion - this.form.transferProportion
- this.form.transferCompanyProportionAfter = 100 - Number(this.form.transferBuyerProportionAfter)
- },
- baseRequest(opUrl, postData) {
- return this.$channel.globeRequest('BuyingMoreController', opUrl, postData, 'project')
- }
- }
- }
- </script>F
- <style lang="scss">
- </style>
- <style scoped>
- .red-asterisk {
- color: red;
- }
- </style>
|