Commit c5260599bb945b70208feb8dcb01a1df0c41609e

Authored by 杨鑫
2 parents 2067568a 9ffe7fd7

'租金缴费'

admin-web-master/src/components/add/addht.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 - <TitleWithCircle title="模版" style="margin-bottom: 20px;" />  
4 - <el-form :model="mbinfo" :rules="rulesmbinfo" ref="rulesmbinfoForm" label-width="130px" class="demo-ruleForm">  
5 - <el-row :gutter="20">  
6 - <el-col :span="12">  
7 - <el-form-item label="模板" prop="type">  
8 - <el-select filterable v-model="mbinfo.type" placeholder="请选择" style="width: 100%;" @change="changeRelatedMerchants">  
9 - <el-option :label="item.templateName" :value="index" v-for="(item,index) in mbData" :key="index"></el-option>  
10 - </el-select>  
11 - </el-form-item>  
12 - </el-col>  
13 - </el-row>  
14 - </el-form>  
15 - <TitleWithCircle title="合同信息" style="margin-bottom: 20px;" />  
16 - <mbadd v-if="isshow" ref="rulesallForm" :list1="list1" />  
17 - <div style="margin-top: 20px;margin-left: 65px;">  
18 - <el-button @click="close()" class="buttonHover" style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button>  
19 - <el-button @click="add()" style="background-color: #3F9B6A;color: #fff;">确定</el-button>  
20 - <el-button @click="ylht()" style="background-color: #3F9B6A;color: #fff;">预览</el-button> 3 + <div v-if="contractChangeReason == ''">
  4 + <TitleWithCircle title="模版" style="margin-bottom: 20px;" />
  5 + <el-form :model="mbinfo" :rules="rulesmbinfo" ref="rulesmbinfoForm" label-width="130px" class="demo-ruleForm">
  6 + <el-row :gutter="20">
  7 + <el-col :span="12">
  8 + <el-form-item label="模板" prop="type">
  9 + <el-select filterable v-model="mbinfo.type" placeholder="请选择" style="width: 100%;" @change="changeRelatedMerchants">
  10 + <el-option :label="item.templateName" :value="index" v-for="(item,index) in mbData" :key="index"></el-option>
  11 + </el-select>
  12 + </el-form-item>
  13 + </el-col>
  14 + </el-row>
  15 + </el-form>
  16 + <TitleWithCircle title="合同信息" style="margin-bottom: 20px;" />
  17 + <mbadd v-if="isshow" ref="rulesallForm" :list1="list1" />
  18 + <div style="margin-top: 20px;margin-left: 65px;">
  19 + <el-button @click="close()" class="buttonHover" style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button>
  20 + <el-button @click="add()" style="background-color: #3F9B6A;color: #fff;">确定</el-button>
  21 + <el-button @click="ylht()" style="background-color: #3F9B6A;color: #fff;">预览</el-button>
  22 + </div>
  23 + </div>
  24 + <div v-else>
  25 + <TitleWithCircle title="合同信息" style="margin-bottom: 20px;" />
  26 + <mbadd v-if="isshow" ref="rulesallForm" :list1="list1" />
  27 + <div style="margin-top: 20px;margin-left: 65px;">
  28 + <el-button @click="close()" class="buttonHover" style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button>
  29 + <el-button @click="add1()" style="background-color: #3F9B6A;color: #fff;">确定</el-button>
  30 + <el-button @click="ylht()" style="background-color: #3F9B6A;color: #fff;">预览</el-button>
  31 + </div>
21 </div> 32 </div>
22 </div> 33 </div>
23 </template> 34 </template>
@@ -31,7 +42,15 @@ @@ -31,7 +42,15 @@
31 import { 42 import {
32 dataInprotDocument 43 dataInprotDocument
33 } from '@/api/newly.js' 44 } from '@/api/newly.js'
34 -import { add } from '@/api/activityBz'; 45 +import {
  46 + msgedit
  47 + } from '@/api/cereBusinessInfo'
  48 + import {
  49 + AdvertiserInfoEdit
  50 + } from '@/api/advertisement.js'
  51 + import {
  52 + cereContractInformation
  53 + } from '@/api/commodityLease.js'
35 export default { 54 export default {
36 components: { 55 components: {
37 TitleWithCircle, 56 TitleWithCircle,
@@ -91,21 +110,167 @@ import { add } from &#39;@/api/activityBz&#39;; @@ -91,21 +110,167 @@ import { add } from &#39;@/api/activityBz&#39;;
91 //合同状态 110 //合同状态
92 dataStatus: '1', 111 dataStatus: '1',
93 //模版信息 112 //模版信息
94 - templateInformation:'' 113 + templateInformation:'',
  114 + //模版url
  115 + templateInformationUrl:''
95 }, 116 },
  117 + templateAttachment:'',
  118 + AddData:[]
96 } 119 }
97 }, 120 },
  121 + props: {
  122 + info: {
  123 + type: Object,
  124 + default: {}
  125 + },
  126 + contractChangeReason: {
  127 + type: String,
  128 + default: ''
  129 + },
  130 + },
98 async created() { 131 async created() {
99 this.getmb() 132 this.getmb()
  133 + console.error({...this.info})
  134 + // console.error(this.templateInformation)
  135 + if(this.info.id) {
  136 + if(this.info.cereBasicInformationShop && this.info.cereBasicInformationShop.id) {
  137 + this.AddData.push(this.info.cereBasicInformationShop)
  138 + }
  139 + if(this.info.cereAdvertisingInformation && this.info.cereAdvertisingInformation.id) {
  140 + this.AddData.push(this.info.cereAdvertisingInformation)
  141 + }
  142 + if(this.info.cereBasicInformationVenue && this.info.cereBasicInformationVenue.id) {
  143 + this.AddData.push(this.info.cereBasicInformationVenue)
  144 + }
  145 + // for (let index = 0; index < this.shopList.length; index++) {
  146 + // const element = this.shopList[index];
  147 + // console.error(element)
  148 + // if(element.phone == this.info.applicant) {
  149 + // this.shopId = element.id+''
  150 + // this.formInline.relatedMerchants = element.id+''
  151 + // this.formInline.tenantName = element.name
  152 + // this.formInline.tenantTelephone = element.phone
  153 + // }
  154 + // }
  155 + }
  156 + if(this.info.templateInformation) {
  157 + let listall = JSON.parse(this.info.templateInformation)
  158 + console.error(listall)
  159 + let listallcl = listall.map((item) => {
  160 + if(item.type != '资源' && item.type != '商家' && item.key != 'tenantName' && item.key != 'tenantTelephone') {
  161 + item.value = ''
  162 + return item;
  163 + } else {
  164 + item.ishow = true
  165 + return item
  166 + }
  167 + });
  168 + // console.error(listallcl)
  169 + this.list1 = listallcl
  170 + this.isshow = true
  171 + }
  172 + if(this.info.templateInformationUrl){
  173 + this.templateAttachment = this.info.templateInformationUrl
  174 + }
100 }, 175 },
101 methods: { 176 methods: {
  177 + async add1() {
  178 + // this.addinfo1()
  179 + // return
  180 + let isjx = await this.$refs.rulesallForm.yanzhen()
  181 + console.error(isjx)
  182 + if(isjx) {
  183 + console.error(']]]]]')
  184 + this.addinfo1()
  185 + }
  186 + },
  187 + async addinfo1() {
  188 + let dataStatus = this.contractChangeReason == '合同变更' ? '2' : this.contractChangeReason == '合同续约' ? '2' : this.contractChangeReason == '合同终止' ? '3' : '1'
  189 + let info1 = {}
  190 + for (let index = 0; index < this.list1.length; index++) {
  191 + const element = this.list1[index];
  192 + console.error({...element})
  193 + if(element.type == '资源') {
  194 + if(element.value && typeof element.value == 'object') {
  195 + if (element.value.shopName) {
  196 + info1.shopNumber = 'sp' + element.value.id
  197 + } else if (element.value.advertisingType) {
  198 + info1.shopNumber = 'gg' + element.value.id
  199 + } else {
  200 + info1.shopNumber = 'cd' + element.value.id
  201 + }
  202 + }
  203 + }else if(element.type == '商家') {
  204 + info1.relatedMerchants = element.value
  205 + } else{
  206 + info1[element.key] = element.value+''
  207 + }
  208 +
  209 + }
  210 + console.error(info1)
  211 + for (let key in info1) {
  212 + if (this.formInline.hasOwnProperty(key)) {
  213 + this.formInline[key] = info1[key];
  214 + }
  215 + }
  216 + this.formInline.templateInformation = JSON.stringify(this.list1)
  217 + let from = {
  218 + ...this.formInline,
  219 + contractChangeReason: this.contractChangeReason,
  220 + dataStatus: dataStatus,
  221 + contractNumber: this.info.contractNumber,
  222 + newContractCode:this.formInline.contractNumber,
  223 + originalContractCode: this.info.originalContractCode?this.info.originalContractCode:this.info.contractNumber,
  224 + updateDate: this.updateCurrentTime(),
  225 + contractChangeTime: this.updateCurrentTime(),
  226 + updateUser:localStorage.getItem('roleName'),
  227 + relatedMerchants: this.info.relatedMerchants,
  228 + tenantName: this.info.tenantName,
  229 + tenantTelephone: this.info.tenantTelephone,
  230 + shopNumber: this.info.shopNumber,
  231 + templateInformationUrl:this.templateAttachment,
  232 + }
  233 + console.error(from)
  234 + let info = await this.culfj()
  235 + console.error(info)
  236 + let c1 = {
  237 + documentAddress: "http://172.16.61.237:9000" + this.templateAttachment,
  238 + insertData: JSON.stringify(info)
  239 + }
  240 + dataInprotDocument(c1).then(res => {
  241 + console.error(res)
  242 + if(res.code == 200 && res.data) {
  243 + from.appendicesContract = res.data
  244 + cereContractInformation(from).then(res => {
  245 + console.error(res)
  246 + if (res.code == 200) {
  247 + this.$message({
  248 + message: '添加成功',
  249 + type: 'success'
  250 + })
  251 + this.$emit('removeonaction', '1')
  252 + } else {
  253 + this.$message({
  254 + message: res.msg,
  255 + type: 'error'
  256 + })
  257 + }
  258 + })
  259 + } else {
  260 + this.$message({
  261 + type: 'error',
  262 + message: '附件生成失败'
  263 + })
  264 +
  265 + }
  266 + })
  267 +
  268 + },
102 async add() { 269 async add() {
103 let ismb = false 270 let ismb = false
104 await this.$refs.rulesmbinfoForm.validate((valid) => { 271 await this.$refs.rulesmbinfoForm.validate((valid) => {
105 if (valid) { 272 if (valid) {
106 ismb = true 273 ismb = true
107 -  
108 -  
109 } else { 274 } else {
110 this.$message({ 275 this.$message({
111 message: '请填写完整信息', 276 message: '请填写完整信息',
@@ -155,9 +320,8 @@ import { add } from &#39;@/api/activityBz&#39;; @@ -155,9 +320,8 @@ import { add } from &#39;@/api/activityBz&#39;;
155 this.formInline.templateInformation = JSON.stringify(this.list1) 320 this.formInline.templateInformation = JSON.stringify(this.list1)
156 let info = await this.culfj() 321 let info = await this.culfj()
157 console.error(info) 322 console.error(info)
158 - // return  
159 let c1 = { 323 let c1 = {
160 - documentAddress: "http://172.16.61.237:9000" + this.onmbinfo.templateAttachment, 324 + documentAddress: "http://172.16.61.237:9000" + this.templateAttachment,
161 insertData: JSON.stringify(info) 325 insertData: JSON.stringify(info)
162 } 326 }
163 dataInprotDocument(c1).then(res => { 327 dataInprotDocument(c1).then(res => {
@@ -166,8 +330,11 @@ import { add } from &#39;@/api/activityBz&#39;; @@ -166,8 +330,11 @@ import { add } from &#39;@/api/activityBz&#39;;
166 this.formInline.appendicesContract = res.data 330 this.formInline.appendicesContract = res.data
167 contractinsertAdd({ 331 contractinsertAdd({
168 ...this.formInline, 332 ...this.formInline,
  333 + templateInformationUrl:this.templateAttachment,
169 createDate:this.updateCurrentTime(), 334 createDate:this.updateCurrentTime(),
170 - createUser: localStorage.getItem('roleName') 335 + createUser: localStorage.getItem('roleName'),
  336 + updateDate: this.updateCurrentTime(),
  337 + updateUser:localStorage.getItem('roleName'),
171 }).then(res => { 338 }).then(res => {
172 console.error(res) 339 console.error(res)
173 if (res.code == 200) { 340 if (res.code == 200) {
@@ -175,6 +342,31 @@ import { add } from &#39;@/api/activityBz&#39;; @@ -175,6 +342,31 @@ import { add } from &#39;@/api/activityBz&#39;;
175 message: '添加成功', 342 message: '添加成功',
176 type: 'success' 343 type: 'success'
177 }) 344 })
  345 + if(this.info.id) {
  346 + if(this.info.cereBasicInformationShop && this.info.cereBasicInformationShop.id) {
  347 + msgedit({
  348 + auditStatus: '4',
  349 + id: this.info.id,
  350 + contractNumber: this.formInline.contractNumber
  351 + })
  352 + }
  353 + if(this.info.cereAdvertisingInformation && this.info.cereAdvertisingInformation.id) {
  354 + AdvertiserInfoEdit({
  355 + auditStatus: '4',
  356 + id: this.info.id,
  357 + contractId: this.formInline.contractNumber
  358 + }).then(item => {
  359 + this.getAll()
  360 + })
  361 + }
  362 + if(this.info.cereBasicInformationVenue && this.info.cereBasicInformationVenue.id) {
  363 + msgedit({
  364 + auditStatus: '4',
  365 + id: this.info.id,
  366 + contractNumber: this.formInline.contractNumber
  367 + })
  368 + }
  369 + }
178 this.$emit('removeonaction', '1') 370 this.$emit('removeonaction', '1')
179 } else { 371 } else {
180 this.$message({ 372 this.$message({
@@ -193,9 +385,10 @@ import { add } from &#39;@/api/activityBz&#39;; @@ -193,9 +385,10 @@ import { add } from &#39;@/api/activityBz&#39;;
193 }) 385 })
194 console.error({...this.formInline}) 386 console.error({...this.formInline})
195 }, 387 },
196 - changeRelatedMerchants(e) { 388 + async changeRelatedMerchants(e) {
197 console.error(e) 389 console.error(e)
198 this.isshow = false 390 this.isshow = false
  391 + this.templateAttachment = this.mbData[e].templateAttachment
199 console.error(this.mbData[e]) 392 console.error(this.mbData[e])
200 this.onmbinfo = this.mbData[e] 393 this.onmbinfo = this.mbData[e]
201 //判断是否是字符串 394 //判断是否是字符串
@@ -204,6 +397,26 @@ import { add } from &#39;@/api/activityBz&#39;; @@ -204,6 +397,26 @@ import { add } from &#39;@/api/activityBz&#39;;
204 } else { 397 } else {
205 this.list1 = this.mbData[e].otherInfo 398 this.list1 = this.mbData[e].otherInfo
206 } 399 }
  400 + for (let i = 0; i < this.list1.length; i++) {
  401 + if(this.list1[i].type == '资源'){
  402 + if(this.AddData.length>0){
  403 + this.list1[i].list = this.AddData
  404 + this.list1[i].value = this.list1[i].list[0]
  405 + }
  406 + } else if(this.list1[i].type == '商家'){
  407 + if(this.info.applicant) {
  408 + await cerePlatformMerchant({
  409 + checkState: '2',
  410 + pageNumber: 0,
  411 + pageSize: 1000,
  412 + phone: this.info.applicant
  413 + }).then(res => {
  414 + console.error(res)
  415 + this.list1[i].value = res.data.content.length>0?res.data.content[0].id+'':''
  416 + })
  417 + }
  418 + }
  419 + }
207 //延迟2秒 420 //延迟2秒
208 setTimeout(() => { 421 setTimeout(() => {
209 this.isshow = true 422 this.isshow = true
@@ -239,10 +452,10 @@ import { add } from &#39;@/api/activityBz&#39;; @@ -239,10 +452,10 @@ import { add } from &#39;@/api/activityBz&#39;;
239 id: element.value 452 id: element.value
240 }).then(res => { 453 }).then(res => {
241 console.error(res) 454 console.error(res)
242 - info[element.name] = res.data.content.length>0?res.data.content[0].name:'暂无' 455 + info['商家'] = res.data.content.length>0?res.data.content[0].name:'暂无'
243 }) 456 })
244 } else { 457 } else {
245 - info[element.name] = '暂无' 458 + info['商家'] = '暂无'
246 } 459 }
247 460
248 } else{ 461 } else{
@@ -256,7 +469,7 @@ import { add } from &#39;@/api/activityBz&#39;; @@ -256,7 +469,7 @@ import { add } from &#39;@/api/activityBz&#39;;
256 let info = await this.culfj() 469 let info = await this.culfj()
257 console.error(info) 470 console.error(info)
258 let c1 = { 471 let c1 = {
259 - documentAddress: "http://172.16.61.237:9000" + this.onmbinfo.templateAttachment, 472 + documentAddress: "http://172.16.61.237:9000" + this.templateAttachment,
260 insertData: JSON.stringify(info) 473 insertData: JSON.stringify(info)
261 } 474 }
262 dataInprotDocument(c1).then(res => { 475 dataInprotDocument(c1).then(res => {
admin-web-master/src/components/buscha/busCha.vue
@@ -230,6 +230,11 @@ @@ -230,6 +230,11 @@
230 </div> 230 </div>
231 <div v-show="type == '2'"> 231 <div v-show="type == '2'">
232 <oneht ref="onhet"></oneht> 232 <oneht ref="onhet"></oneht>
  233 + <div>
  234 + <el-button class="buttonHover"
  235 + style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;margin-top: 20px;"
  236 + @click="changetype">返回</el-button>
  237 + </div>
233 </div> 238 </div>
234 <div v-show="type == '3'"> 239 <div v-show="type == '3'">
235 <div v-if="detailstype == '商铺'"> 240 <div v-if="detailstype == '商铺'">
admin-web-master/src/components/change/mbadd.vue
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div v-if="isshow"> 2 <div v-if="isshow">
3 <el-form ref="ruleForm" :model="forminfo" :rules="ruleAddData" label-width="130px" class="demo-ruleForm"> 3 <el-form ref="ruleForm" :model="forminfo" :rules="ruleAddData" label-width="130px" class="demo-ruleForm">
4 <el-row :gutter="20"> 4 <el-row :gutter="20">
5 - <el-col :style="iscopy?'display: flex;align-items: center;':''" :span="item.width == '50%(半行)'?12:item.width == '100%(一行)'?24:12" v-for="(item,index) in list1" 5 + <el-col v-if="!item.ishow" :style="iscopy?'display: flex;align-items: center;':''" :span="item.width == '50%(半行)'?12:item.width == '100%(一行)'?24:12" v-for="(item,index) in list1"
6 :key="index"> 6 :key="index">
7 <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '单行文本'" :style="iscopy?'width: calc(100% - 35px)':''"> 7 <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '单行文本'" :style="iscopy?'width: calc(100% - 35px)':''">
8 <el-input v-model="item.value" placeholder="请输入" :maxlength="item.length?item.length:200" @input="e=>inputvalue(e,item.key)"></el-input> 8 <el-input v-model="item.value" placeholder="请输入" :maxlength="item.length?item.length:200" @input="e=>inputvalue(e,item.key)"></el-input>
admin-web-master/src/utils/request.js
@@ -19,7 +19,11 @@ if(host === &#39;localhost:8080&#39; || host === &#39;localhost:8081&#39; || host === &#39;localhost @@ -19,7 +19,11 @@ if(host === &#39;localhost:8080&#39; || host === &#39;localhost:8081&#39; || host === &#39;localhost
19 // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; 19 // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1;
20 // baseURL = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server'; 20 // baseURL = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server';
21 // baseURL = 'http://172.16.61.125:9003'; 21 // baseURL = 'http://172.16.61.125:9003';
  22 +<<<<<<< HEAD
22 baseURL = 'http://192.168.2.107:9003'; 23 baseURL = 'http://192.168.2.107:9003';
  24 +=======
  25 + baseURL = 'http://10.0.0.51:9003';
  26 +>>>>>>> 9ffe7fd70c4f3476b43d932385794fadee51b6f0
23 // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; 27 // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1;
24 // baseURL = 'http://192.168.2.225:9003'; 28 // baseURL = 'http://192.168.2.225:9003';
25 29
admin-web-master/src/views/shopRental/manage/index.vue
@@ -142,8 +142,9 @@ @@ -142,8 +142,9 @@
142 </div> 142 </div>
143 143
144 <div style="padding: 20px 20px 20px 0;"> 144 <div style="padding: 20px 20px 20px 0;">
145 - <addremove :info="detailsinfo" :contractChangeReason="contractChangeReason" @removeonaction="removeonaction">  
146 - </addremove> 145 + <!-- <addremove :info="detailsinfo" :contractChangeReason="contractChangeReason" @removeonaction="removeonaction">
  146 + </addremove> -->
  147 + <add :info="detailsinfo" :contractChangeReason="contractChangeReason" @removeonaction="removeonaction"></add>
147 </div> 148 </div>
148 </div> 149 </div>
149 </div> 150 </div>
@@ -175,40 +176,7 @@ @@ -175,40 +176,7 @@
175 tableData: [], 176 tableData: [],
176 total: 0, 177 total: 0,
177 onaction: '1', 178 onaction: '1',
178 - formInline: {  
179 - // 合同类型  
180 - contractType: '',  
181 - // 合同编号  
182 - contractNumber: '',  
183 - // 标段号  
184 - sectionNumber: '',  
185 - // 合同名称  
186 - contractName: '',  
187 - // 押金  
188 - earnestMoney: '',  
189 - // 合同签订日期  
190 - contractSigningDate: '',  
191 - // 合同终止日期  
192 - contractTerminationDate: '',  
193 - // 起租日期  
194 - leaseStartDate: '',  
195 - // 付款周期  
196 - paymentCycle: '',  
197 - // 合同金额(租金)  
198 - contractAmount: '',  
199 - // 付款日  
200 - paymentDay: '',  
201 - // 承租人名称  
202 - tenantName: '',  
203 - // 承租人联系电话  
204 - tenantTelephone: '',  
205 - // 承租人银行账号  
206 - tenantBankAccount: '',  
207 - // 关联商家  
208 - relatedMerchants: '',  
209 - // 商铺编号(绑定资源)  
210 - shopNumber: ''  
211 - }, 179 + formInline: {},
212 } 180 }
213 }, 181 },
214 components: { 182 components: {
@@ -298,6 +266,7 @@ @@ -298,6 +266,7 @@
298 }, 266 },
299 removeinfo(row, e) { 267 removeinfo(row, e) {
300 this.contractChangeReason = e 268 this.contractChangeReason = e
  269 + // console.error(this.contractChangeReason)
301 this.detailsinfo = row 270 this.detailsinfo = row
302 this.onaction = '4' 271 this.onaction = '4'
303 }, 272 },