|
@@ -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>
|