|
@@ -24,71 +24,63 @@
|
|
|
<el-col :span="5" class="col-txt"><span>出卖人</span></el-col>
|
|
|
<el-col :span="18" class="col-input">
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="form.seller" readonly />
|
|
|
+ <el-input value="无锡市安居投资发展有限公司" readonly />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row>
|
|
|
- <!-- 特殊表单 -->
|
|
|
- <div v-for="(item, index) in form.dynamicItem" :key="index">
|
|
|
- <el-row style="margin-top: 10px">
|
|
|
- <el-col :span="2" class="col-txt"><span>购房人{{ index + 1 }}</span></el-col>
|
|
|
- <el-col :span="4" class="col-input">
|
|
|
- <el-form-item :prop="'dynamicItem.' + index + '.name'">
|
|
|
- <el-input
|
|
|
- v-model="item.name"
|
|
|
- placeholder="请填写姓名"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="4" class="col-input">
|
|
|
- <el-form-item :prop="'dynamicItem.' + index + '.identityCard'">
|
|
|
- <el-input
|
|
|
- v-model="item.identityCard"
|
|
|
- placeholder="请填写身份证号"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="4" class="col-input">
|
|
|
- <el-form-item :prop="'dynamicItem.' + index + '.phone'">
|
|
|
- <el-input
|
|
|
- v-model="item.phone"
|
|
|
- placeholder="请填写手机号"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col v-if="index !== 0" :span="6" class="col-input">
|
|
|
- <el-form-item :prop="'dynamicItem.' + index + '.relationship'">
|
|
|
- <el-select
|
|
|
- v-model="item.relationship"
|
|
|
- placeholder="与1的关系"
|
|
|
- filterable
|
|
|
- :popper-append-to-body="false"
|
|
|
- popper-class="statistic_base"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="relationship in dc_data.RELATIONSHIP"
|
|
|
- :key="relationship.value"
|
|
|
- :label="relationship.label"
|
|
|
- :value="relationship.value"
|
|
|
- :popper-append-to-body="false"
|
|
|
- popper-class="statistic_base"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="2" class="col-input">
|
|
|
- <el-button v-if="index !== 0" type="danger" size="mini" @click="deleteItem(item, index)">-</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
+ <el-row v-for="(item, index) in form.dynamicItem" :key="index">
|
|
|
+ <el-col :span="5 " class="col-txt"><span>购房人{{ index + 1 }}</span></el-col>
|
|
|
+ <el-col :span="4" class="col-input">
|
|
|
+ <el-form-item :prop="'dynamicItem.' + index + '.name'">
|
|
|
+ <el-input
|
|
|
+ v-model="item.name"
|
|
|
+ placeholder="请填写姓名"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" class="col-input">
|
|
|
+ <el-form-item :prop="'dynamicItem.' + index + '.identityCard'">
|
|
|
+ <el-input
|
|
|
+ v-model="item.identityCard"
|
|
|
+ placeholder="请填写身份证号"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" class="col-input">
|
|
|
+ <el-form-item :prop="'dynamicItem.' + index + '.phone'">
|
|
|
+ <el-input
|
|
|
+ v-model="item.phone"
|
|
|
+ placeholder="请填写手机号"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col v-if="index !== 0" :span="6" class="col-input">
|
|
|
+ <el-form-item :prop="'dynamicItem.' + index + '.relationship'">
|
|
|
+ <el-select
|
|
|
+ v-model="item.relationship"
|
|
|
+ placeholder="与1的关系"
|
|
|
+ filterable
|
|
|
+ :popper-append-to-body="false"
|
|
|
+ popper-class="statistic_base"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="relationship in dc_data.RELATIONSHIP"
|
|
|
+ :key="relationship.value"
|
|
|
+ :label="relationship.label"
|
|
|
+ :value="relationship.value"
|
|
|
+ :popper-append-to-body="false"
|
|
|
+ popper-class="statistic_base"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="5" class="col-txt"><span>房屋</span></el-col>
|
|
|
<el-col :span="18" class="col-input">
|
|
|
<el-form-item>
|
|
|
<el-cascader
|
|
|
- v-model="form.houseIds"
|
|
|
+ v-model="form.houseId"
|
|
|
:append-to-body="false"
|
|
|
:disabled="isView"
|
|
|
style="width: 100%;"
|
|
@@ -183,7 +175,7 @@
|
|
|
<el-col :span="5" class="col-txt"><span>总价款(元)</span></el-col>
|
|
|
<el-col :span="18" class="col-input">
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="form.totalPrice" />
|
|
|
+ <el-input v-model="form.totalPrice" @input="totalPriceChange" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -191,7 +183,7 @@
|
|
|
<el-col :span="5" class="col-txt"><span>买受人产权份额占比为</span></el-col>
|
|
|
<el-col :span="18" class="col-input">
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="form.buyerProportion" />
|
|
|
+ <el-input v-model="form.buyerProportion" @input="proportionChange" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -216,7 +208,7 @@
|
|
|
popper-class="statistic_base"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in dc_data.PAYMENT_METHOD"
|
|
|
+ v-for="item in dc_data.PAYMENT_METHODS"
|
|
|
:key="item.value"
|
|
|
:popper-append-to-body="false"
|
|
|
popper-class="statistic_base"
|
|
@@ -227,7 +219,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row>
|
|
|
+ <el-row v-if="form.paymentMethod == '2'">
|
|
|
<el-col :span="5" class="col-txt"><span>首付比例</span></el-col>
|
|
|
<el-col :span="18" class="col-input">
|
|
|
<el-form-item>
|
|
@@ -274,12 +266,7 @@
|
|
|
<el-col :span="5" class="col-txt"><span>住宅专项维修资金(元/㎡)</span></el-col>
|
|
|
<el-col :span="18" class="col-input">
|
|
|
<el-form-item>
|
|
|
- <el-date-picker
|
|
|
- v-model="form.maintenanceFunds"
|
|
|
- type="date"
|
|
|
- placeholder="年月日"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- />
|
|
|
+ <el-input v-model="form.maintenanceFunds" @input="maintenanceFundsChange"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -342,7 +329,7 @@
|
|
|
<div slot="footer" style="text-align: right">
|
|
|
<el-button @click="cancel()">关 闭</el-button>
|
|
|
<el-button type="primary" @click="confirmSubmit()">暂 存</el-button>
|
|
|
- <el-button type="primary" @click="confirmSubmit()">签 约</el-button>
|
|
|
+ <el-button type="primary" @click="confirmSubmit('signing')">签 约</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -369,11 +356,10 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- dc_key: ['CONTRACT_STATUS', 'MAPPING_INSTITUTION', 'PAYMENT_METHOD', 'DOWN_PAYMENT_PROPORTION'],
|
|
|
+ dc_key: ['CONTRACT_STATUS', 'MAPPING_INSTITUTION', 'PAYMENT_METHODS', 'DOWN_PAYMENT_PROPORTION', 'RELATIONSHIP'],
|
|
|
// 弹框相关
|
|
|
dialogVisible: false,
|
|
|
dialogTitle: '新增',
|
|
|
- isAdd: true,
|
|
|
form: {
|
|
|
dynamicItem: [
|
|
|
{
|
|
@@ -396,8 +382,7 @@ export default {
|
|
|
contractId: '',
|
|
|
TreeData: [],
|
|
|
isView: false, // 查看按钮权限,
|
|
|
- searchTreeData: [],
|
|
|
- effectFlag: false
|
|
|
+ searchTreeData: []
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -410,71 +395,50 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
initData(val) {
|
|
|
+ console.log('111')
|
|
|
const _this = this
|
|
|
- _this.effectFlag = false
|
|
|
// 查看或编辑
|
|
|
if (val.id) {
|
|
|
_this.isView = val.isView
|
|
|
- _this.isAdd = false
|
|
|
const postData = {
|
|
|
id: val.id
|
|
|
}
|
|
|
this.baseRequest('getById', postData).then((res) => {
|
|
|
if (res.data) {
|
|
|
- const { data } = res
|
|
|
+ const data = res.data
|
|
|
_this.form = Object.assign({}, _this.form, res.data)
|
|
|
// 合同原件
|
|
|
- _this.contractOriginalList = data.contractOriginal ? _this.$common.castEval(data.contractOriginal) : []
|
|
|
+ _this.contractOriginalList = data.contractOriginal ? JSON.parse(data.contractOriginal) : []
|
|
|
// 其他附件
|
|
|
- _this.contractOtherList = data.contractOther ? _this.$common.castEval(data.contractOther) : []
|
|
|
- // 签约资料
|
|
|
- _this.signingMaterialsList = data.projectSigningMaterials ? _this.$common.castEval(data.projectSigningMaterials) : []
|
|
|
- // 判断合同是否生效
|
|
|
- if (_this.form.contractStatus == '1') {
|
|
|
- // 未生效 可编辑
|
|
|
- _this.effectFlag = false
|
|
|
- } else {
|
|
|
- _this.effectFlag = true
|
|
|
+ _this.contractOtherList = data.contractOther ? JSON.parse(data.contractOther) : []
|
|
|
+ if (data.institution) {
|
|
|
+ _this.form.institution = data.institution + ''
|
|
|
}
|
|
|
- console.log('_this.effectFlag', _this.effectFlag)
|
|
|
- _this.form.preparationPeriodType = data.preparationPeriodType + ''
|
|
|
- _this.form.contractCategory = data.contractCategory + ''
|
|
|
- // 项目名称
|
|
|
- _this.projectObject = data.projectName
|
|
|
- _this.form.projectId = data.projectId
|
|
|
- _this.form.projectName = data.projectName
|
|
|
- // 乙方
|
|
|
- _this.enterpriseObject = data.enterpriseName
|
|
|
- _this.form.enterpriseName = data.enterpriseName
|
|
|
- _this.form.enterpriseId = data.enterpriseId
|
|
|
- // 签约日期
|
|
|
- _this.form.signingDate = data.signingDate
|
|
|
-
|
|
|
- if (_this.form.isRentingOut == '1') {
|
|
|
- this.retreatFlag = true
|
|
|
+ if (data.paymentMethod) {
|
|
|
+ _this.form.paymentMethod = data.paymentMethod + ''
|
|
|
+ }
|
|
|
+ if (data.downPaymentsProportion) {
|
|
|
+ _this.form.downPaymentsProportion = data.downPaymentsProportion + ''
|
|
|
+ }
|
|
|
+ // 初始化专项维修资金总价款
|
|
|
+ const price = _this.form.maintenanceFunds
|
|
|
+ const area = _this.form.actualBuildArea
|
|
|
+ if (price && area) {
|
|
|
+ _this.form.maintenanceTotalPrice = price * area
|
|
|
}
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
})
|
|
|
- this.baseRequest('getHouseList', { contractId: val.id }).then(res => {
|
|
|
+ this.baseBuyerRequest('listAll', { customerManagementId: val.customerManagementId }).then(res => {
|
|
|
const data = res.data
|
|
|
_this.form.dynamicItem = data
|
|
|
- _this.form.dynamicItem.forEach((item) => {
|
|
|
- item.estateBuildingRoomNoList = []
|
|
|
- item.estateBuildingRoomNoList.push(item.groupId)
|
|
|
- item.estateBuildingRoomNoList.push(item.discId)
|
|
|
- item.estateBuildingRoomNoList.push(item.buildId)
|
|
|
- item.estateBuildingRoomNoList.push(item.houseId)
|
|
|
- item.priceType = item.priceType + ''
|
|
|
- })
|
|
|
- console.log('_this.form.dynamicItem', _this.form.dynamicItem)
|
|
|
this.$forceUpdate()
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
findRoomTree: function() {
|
|
|
const _this = this
|
|
|
- this.pubRequest('getTreeData4', '').then((res) => {
|
|
|
+ this.pubRequest('getTreeData1', '').then((res) => {
|
|
|
_this.TreeData = res.data.data
|
|
|
}).catch(() => {
|
|
|
})
|
|
@@ -489,101 +453,8 @@ export default {
|
|
|
this.contractOtherList.push(res)
|
|
|
})
|
|
|
},
|
|
|
- initForm: function() {
|
|
|
- return {
|
|
|
- id: '',
|
|
|
- enterpriseId: '',
|
|
|
- enterpriseName: '',
|
|
|
- creditCode: '',
|
|
|
- projectId: '',
|
|
|
- projectName: '',
|
|
|
- contractNo: '',
|
|
|
- contractNoLease: '',
|
|
|
- contractNoProperty: '',
|
|
|
- estateBuildingRoomNo: '',
|
|
|
- templateType: '1',
|
|
|
- contractType: '1',
|
|
|
- area: '',
|
|
|
- payType: '',
|
|
|
- startDate: '',
|
|
|
- endDate: '',
|
|
|
- limitDate: '',
|
|
|
- limitMonth: '',
|
|
|
- preparationPeriod: '',
|
|
|
- signingDate: '',
|
|
|
- signingName: '',
|
|
|
- partyC: '',
|
|
|
- remark: '',
|
|
|
- price: '',
|
|
|
- monthPrice: '',
|
|
|
- leaseCycle: '',
|
|
|
- totalRent: '',
|
|
|
- firstRent: '',
|
|
|
- propertyManagementFeePrice: '',
|
|
|
- monthlyPropertyManagementFee: '',
|
|
|
- propertyCycle: '',
|
|
|
- totalPropertyCost: '',
|
|
|
- signing_name: '',
|
|
|
- bond: '',
|
|
|
- firstPropertyManagementFee: '',
|
|
|
- settlementPayment: '',
|
|
|
- settlementPaymentDeadline: '',
|
|
|
- dynamicItem: [
|
|
|
- // 默认显示一条
|
|
|
- {
|
|
|
- estateBuildingRoomNoList: [],
|
|
|
- area: '',
|
|
|
- priceType: '',
|
|
|
- price: '',
|
|
|
- monthPrice: '',
|
|
|
- propertyManagementFeePrice: '',
|
|
|
- monthlyPropertyManagementFee: '',
|
|
|
- cycle: ''
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- confirmSubmit: function() {
|
|
|
+ confirmSubmit: function(type) {
|
|
|
const _this = this
|
|
|
- const dynamicItem = _this.form.dynamicItem
|
|
|
- console.log('dynamicItem', dynamicItem)
|
|
|
- for (let i = 0; i < dynamicItem.length; i++) {
|
|
|
- if (dynamicItem[i].estateBuildingRoomNoList.length != 4) {
|
|
|
- _this.$message.warning('请选择至房间')
|
|
|
- return
|
|
|
- }
|
|
|
- if (!dynamicItem[i].area && dynamicItem[i].area != '0') {
|
|
|
- _this.$message.warning('请填写面积')
|
|
|
- return
|
|
|
- }
|
|
|
- if (!dynamicItem[i].priceType) {
|
|
|
- _this.$message.warning('请选择租金单价类型')
|
|
|
- return
|
|
|
- }
|
|
|
- if (!dynamicItem[i].price) {
|
|
|
- _this.$message.warning('请填写租金单价')
|
|
|
- return
|
|
|
- }
|
|
|
- if (!dynamicItem[i].monthPrice) {
|
|
|
- _this.$message.warning('请填写月租金')
|
|
|
- return
|
|
|
- }
|
|
|
- // if (!dynamicItem[i].propertyManagementFeePrice) {
|
|
|
- // _this.$message.warning('请填写物业费单价')
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!dynamicItem[i].monthlyPropertyManagementFee) {
|
|
|
- // _this.$message.warning('请填写月物业费')
|
|
|
- // return
|
|
|
- // }
|
|
|
- if (!dynamicItem[i].cycle) {
|
|
|
- _this.$message.warning('请填写租期')
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- // dynamicItem.forEach(item => {
|
|
|
- //
|
|
|
- // })
|
|
|
const p1 = new Promise((resolve, reject) => {
|
|
|
this.$refs['form'].validate((valid) => {
|
|
|
if (valid) resolve()
|
|
@@ -594,38 +465,18 @@ export default {
|
|
|
|
|
|
Promise.all([p1, p2])
|
|
|
.then(() => {
|
|
|
- let soaUrl = 'edit'
|
|
|
+ const soaUrl = 'edit'
|
|
|
const extraData = {
|
|
|
// 合同原件
|
|
|
contractOriginal: JSON.stringify(this.contractOriginalList),
|
|
|
// 其他附件
|
|
|
contractOther: JSON.stringify(this.contractOtherList),
|
|
|
- // 合同分段
|
|
|
- contractHouses: JSON.stringify(this.form.dynamicItem),
|
|
|
- // 签约资料
|
|
|
- projectSigningMaterials: JSON.stringify(this.signingMaterialsList)
|
|
|
+ // 合同状态
|
|
|
+ contractStatus: type === 'signing' ? 2 : ''
|
|
|
}
|
|
|
|
|
|
- // 房间号
|
|
|
- let estateBuildingRoomNo = ''
|
|
|
- _this.form.dynamicItem.forEach((item) => {
|
|
|
- const estateBuildingRoomNoList = item.estateBuildingRoomNoList
|
|
|
- // 载体是单选
|
|
|
- estateBuildingRoomNoList.forEach(item1 => {
|
|
|
- estateBuildingRoomNo = estateBuildingRoomNo + item1 + '/'
|
|
|
- })
|
|
|
- estateBuildingRoomNo = estateBuildingRoomNo.substring(0, estateBuildingRoomNo.length - 1)
|
|
|
- estateBuildingRoomNo = estateBuildingRoomNo + ','
|
|
|
- })
|
|
|
- estateBuildingRoomNo = estateBuildingRoomNo.substring(0, estateBuildingRoomNo.length - 1)
|
|
|
- _this.form.estateBuildingRoomNo = estateBuildingRoomNo
|
|
|
const postData = Object.assign({}, _this.form, extraData)
|
|
|
|
|
|
- if (this.isAdd) {
|
|
|
- soaUrl = 'add'
|
|
|
- } else {
|
|
|
- soaUrl = 'edit'
|
|
|
- }
|
|
|
this.baseRequest(soaUrl, postData).then(res => {
|
|
|
if (res.data.code === 200) {
|
|
|
this.$message.success('保存成功')
|
|
@@ -639,33 +490,48 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
cancel() {
|
|
|
- this.$emit('contractAddClose')
|
|
|
- },
|
|
|
- // 计算面积
|
|
|
- getArea(val, index) {
|
|
|
- console.log('val', val.estateBuildingRoomNoList)
|
|
|
- if (val.estateBuildingRoomNoList) {
|
|
|
- const postData = {
|
|
|
- ids: val.estateBuildingRoomNoList[3]
|
|
|
- }
|
|
|
- this.baseRoomRequest('getAreaByIds', postData).then(res => {
|
|
|
- // this.$set(obj, key, value)
|
|
|
- this.form.dynamicItem[index].area = res.data
|
|
|
- // this.$forceUpdate()
|
|
|
- })
|
|
|
- }
|
|
|
+ this.$emit('cancel')
|
|
|
},
|
|
|
houseChange() {
|
|
|
|
|
|
+ },
|
|
|
+ totalPriceChange() {
|
|
|
+ const _this = this
|
|
|
+ const total = _this.form.totalPrice
|
|
|
+ const area = _this.form.actualBuildArea
|
|
|
+ if (total && area) {
|
|
|
+ _this.form.housePrice = (total / area).toFixed(2)
|
|
|
+ }
|
|
|
+ // 触发买受人产权占比
|
|
|
+ _this.proportionChange()
|
|
|
+ },
|
|
|
+ proportionChange() {
|
|
|
+ const _this = this
|
|
|
+ const total = _this.form.totalPrice
|
|
|
+ const proportion = _this.form.buyerProportion / 100
|
|
|
+ if (total && proportion) {
|
|
|
+ _this.form.buyerMoney = total * proportion
|
|
|
+ }
|
|
|
+ },
|
|
|
+ maintenanceFundsChange() {
|
|
|
+ const _this = this
|
|
|
+ const price = _this.form.maintenanceFunds
|
|
|
+ const area = _this.form.actualBuildArea
|
|
|
+ if (price && area) {
|
|
|
+ _this.form.maintenanceTotalPrice = price * area
|
|
|
+ }
|
|
|
},
|
|
|
baseRequest(opUrl, postData) {
|
|
|
- return this.$channel.globeRequest('ParkContractManageController', opUrl, postData, 'project')
|
|
|
+ return this.$channel.globeRequest('ContractManageController', opUrl, postData, 'project')
|
|
|
},
|
|
|
pubRequest(opUrl, postData) {
|
|
|
return this.$channel.globeRequest('ParkInfoController', opUrl, postData, 'project')
|
|
|
},
|
|
|
baseRoomRequest(opUrl, postData) {
|
|
|
return this.$channel.globeRequest('ParkRoomController', opUrl, postData, 'project')
|
|
|
+ },
|
|
|
+ baseBuyerRequest(opUrl, postData) {
|
|
|
+ return this.$channel.globeRequest('BuyerController', opUrl, postData, 'project')
|
|
|
}
|
|
|
}
|
|
|
}
|