diff --git a/admin-web-master/src/components/add/addht.vue b/admin-web-master/src/components/add/addht.vue index 923db0b..51a7be8 100644 --- a/admin-web-master/src/components/add/addht.vue +++ b/admin-web-master/src/components/add/addht.vue @@ -1,23 +1,34 @@ @@ -31,7 +42,15 @@ import { dataInprotDocument } from '@/api/newly.js' -import { add } from '@/api/activityBz'; +import { + msgedit + } from '@/api/cereBusinessInfo' + import { + AdvertiserInfoEdit + } from '@/api/advertisement.js' + import { + cereContractInformation + } from '@/api/commodityLease.js' export default { components: { TitleWithCircle, @@ -91,21 +110,167 @@ import { add } from '@/api/activityBz'; //合同状态 dataStatus: '1', //模版信息 - templateInformation:'' + templateInformation:'', + //模版url + templateInformationUrl:'' }, + templateAttachment:'', + AddData:[] } }, + props: { + info: { + type: Object, + default: {} + }, + contractChangeReason: { + type: String, + default: '' + }, + }, async created() { this.getmb() + console.error({...this.info}) + // console.error(this.templateInformation) + if(this.info.id) { + if(this.info.cereBasicInformationShop && this.info.cereBasicInformationShop.id) { + this.AddData.push(this.info.cereBasicInformationShop) + } + if(this.info.cereAdvertisingInformation && this.info.cereAdvertisingInformation.id) { + this.AddData.push(this.info.cereAdvertisingInformation) + } + if(this.info.cereBasicInformationVenue && this.info.cereBasicInformationVenue.id) { + this.AddData.push(this.info.cereBasicInformationVenue) + } + // for (let index = 0; index < this.shopList.length; index++) { + // const element = this.shopList[index]; + // console.error(element) + // if(element.phone == this.info.applicant) { + // this.shopId = element.id+'' + // this.formInline.relatedMerchants = element.id+'' + // this.formInline.tenantName = element.name + // this.formInline.tenantTelephone = element.phone + // } + // } + } + if(this.info.templateInformation) { + let listall = JSON.parse(this.info.templateInformation) + console.error(listall) + let listallcl = listall.map((item) => { + if(item.type != '资源' && item.type != '商家' && item.key != 'tenantName' && item.key != 'tenantTelephone') { + item.value = '' + return item; + } else { + item.ishow = true + return item + } + }); + // console.error(listallcl) + this.list1 = listallcl + this.isshow = true + } + if(this.info.templateInformationUrl){ + this.templateAttachment = this.info.templateInformationUrl + } }, methods: { + async add1() { + // this.addinfo1() + // return + let isjx = await this.$refs.rulesallForm.yanzhen() + console.error(isjx) + if(isjx) { + console.error(']]]]]') + this.addinfo1() + } + }, + async addinfo1() { + let dataStatus = this.contractChangeReason == '合同变更' ? '2' : this.contractChangeReason == '合同续约' ? '2' : this.contractChangeReason == '合同终止' ? '3' : '1' + let info1 = {} + for (let index = 0; index < this.list1.length; index++) { + const element = this.list1[index]; + console.error({...element}) + if(element.type == '资源') { + if(element.value && typeof element.value == 'object') { + if (element.value.shopName) { + info1.shopNumber = 'sp' + element.value.id + } else if (element.value.advertisingType) { + info1.shopNumber = 'gg' + element.value.id + } else { + info1.shopNumber = 'cd' + element.value.id + } + } + }else if(element.type == '商家') { + info1.relatedMerchants = element.value + } else{ + info1[element.key] = element.value+'' + } + + } + console.error(info1) + for (let key in info1) { + if (this.formInline.hasOwnProperty(key)) { + this.formInline[key] = info1[key]; + } + } + this.formInline.templateInformation = JSON.stringify(this.list1) + let from = { + ...this.formInline, + contractChangeReason: this.contractChangeReason, + dataStatus: dataStatus, + contractNumber: this.info.contractNumber, + newContractCode:this.formInline.contractNumber, + originalContractCode: this.info.originalContractCode?this.info.originalContractCode:this.info.contractNumber, + updateDate: this.updateCurrentTime(), + contractChangeTime: this.updateCurrentTime(), + updateUser:localStorage.getItem('roleName'), + relatedMerchants: this.info.relatedMerchants, + tenantName: this.info.tenantName, + tenantTelephone: this.info.tenantTelephone, + shopNumber: this.info.shopNumber, + templateInformationUrl:this.templateAttachment, + } + console.error(from) + let info = await this.culfj() + console.error(info) + let c1 = { + documentAddress: "http://172.16.61.237:9000" + this.templateAttachment, + insertData: JSON.stringify(info) + } + dataInprotDocument(c1).then(res => { + console.error(res) + if(res.code == 200 && res.data) { + from.appendicesContract = res.data + cereContractInformation(from).then(res => { + console.error(res) + if (res.code == 200) { + this.$message({ + message: '添加成功', + type: 'success' + }) + this.$emit('removeonaction', '1') + } else { + this.$message({ + message: res.msg, + type: 'error' + }) + } + }) + } else { + this.$message({ + type: 'error', + message: '附件生成失败' + }) + + } + }) + + }, async add() { let ismb = false await this.$refs.rulesmbinfoForm.validate((valid) => { if (valid) { ismb = true - - } else { this.$message({ message: '请填写完整信息', @@ -155,9 +320,8 @@ import { add } from '@/api/activityBz'; this.formInline.templateInformation = JSON.stringify(this.list1) let info = await this.culfj() console.error(info) - // return let c1 = { - documentAddress: "http://172.16.61.237:9000" + this.onmbinfo.templateAttachment, + documentAddress: "http://172.16.61.237:9000" + this.templateAttachment, insertData: JSON.stringify(info) } dataInprotDocument(c1).then(res => { @@ -166,8 +330,11 @@ import { add } from '@/api/activityBz'; this.formInline.appendicesContract = res.data contractinsertAdd({ ...this.formInline, + templateInformationUrl:this.templateAttachment, createDate:this.updateCurrentTime(), - createUser: localStorage.getItem('roleName') + createUser: localStorage.getItem('roleName'), + updateDate: this.updateCurrentTime(), + updateUser:localStorage.getItem('roleName'), }).then(res => { console.error(res) if (res.code == 200) { @@ -175,6 +342,31 @@ import { add } from '@/api/activityBz'; message: '添加成功', type: 'success' }) + if(this.info.id) { + if(this.info.cereBasicInformationShop && this.info.cereBasicInformationShop.id) { + msgedit({ + auditStatus: '4', + id: this.info.id, + contractNumber: this.formInline.contractNumber + }) + } + if(this.info.cereAdvertisingInformation && this.info.cereAdvertisingInformation.id) { + AdvertiserInfoEdit({ + auditStatus: '4', + id: this.info.id, + contractId: this.formInline.contractNumber + }).then(item => { + this.getAll() + }) + } + if(this.info.cereBasicInformationVenue && this.info.cereBasicInformationVenue.id) { + msgedit({ + auditStatus: '4', + id: this.info.id, + contractNumber: this.formInline.contractNumber + }) + } + } this.$emit('removeonaction', '1') } else { this.$message({ @@ -193,9 +385,10 @@ import { add } from '@/api/activityBz'; }) console.error({...this.formInline}) }, - changeRelatedMerchants(e) { + async changeRelatedMerchants(e) { console.error(e) this.isshow = false + this.templateAttachment = this.mbData[e].templateAttachment console.error(this.mbData[e]) this.onmbinfo = this.mbData[e] //判断是否是字符串 @@ -204,6 +397,26 @@ import { add } from '@/api/activityBz'; } else { this.list1 = this.mbData[e].otherInfo } + for (let i = 0; i < this.list1.length; i++) { + if(this.list1[i].type == '资源'){ + if(this.AddData.length>0){ + this.list1[i].list = this.AddData + this.list1[i].value = this.list1[i].list[0] + } + } else if(this.list1[i].type == '商家'){ + if(this.info.applicant) { + await cerePlatformMerchant({ + checkState: '2', + pageNumber: 0, + pageSize: 1000, + phone: this.info.applicant + }).then(res => { + console.error(res) + this.list1[i].value = res.data.content.length>0?res.data.content[0].id+'':'' + }) + } + } + } //延迟2秒 setTimeout(() => { this.isshow = true @@ -239,10 +452,10 @@ import { add } from '@/api/activityBz'; id: element.value }).then(res => { console.error(res) - info[element.name] = res.data.content.length>0?res.data.content[0].name:'暂无' + info['商家'] = res.data.content.length>0?res.data.content[0].name:'暂无' }) } else { - info[element.name] = '暂无' + info['商家'] = '暂无' } } else{ @@ -256,7 +469,7 @@ import { add } from '@/api/activityBz'; let info = await this.culfj() console.error(info) let c1 = { - documentAddress: "http://172.16.61.237:9000" + this.onmbinfo.templateAttachment, + documentAddress: "http://172.16.61.237:9000" + this.templateAttachment, insertData: JSON.stringify(info) } dataInprotDocument(c1).then(res => { diff --git a/admin-web-master/src/components/buscha/busCha.vue b/admin-web-master/src/components/buscha/busCha.vue index bec160d..d105718 100644 --- a/admin-web-master/src/components/buscha/busCha.vue +++ b/admin-web-master/src/components/buscha/busCha.vue @@ -230,6 +230,11 @@
+
+ 返回 +
diff --git a/admin-web-master/src/components/change/mbadd.vue b/admin-web-master/src/components/change/mbadd.vue index d400ce5..a4e5dad 100644 --- a/admin-web-master/src/components/change/mbadd.vue +++ b/admin-web-master/src/components/change/mbadd.vue @@ -2,7 +2,7 @@
- diff --git a/admin-web-master/src/utils/request.js b/admin-web-master/src/utils/request.js index e5e121e..0ef10f7 100644 --- a/admin-web-master/src/utils/request.js +++ b/admin-web-master/src/utils/request.js @@ -19,7 +19,11 @@ if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; // baseURL = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server'; // baseURL = 'http://172.16.61.125:9003'; +<<<<<<< HEAD baseURL = 'http://192.168.2.107:9003'; +======= + baseURL = 'http://10.0.0.51:9003'; +>>>>>>> 9ffe7fd70c4f3476b43d932385794fadee51b6f0 // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; // baseURL = 'http://192.168.2.225:9003'; diff --git a/admin-web-master/src/views/shopRental/manage/index.vue b/admin-web-master/src/views/shopRental/manage/index.vue index 20ad71b..54d73a2 100644 --- a/admin-web-master/src/views/shopRental/manage/index.vue +++ b/admin-web-master/src/views/shopRental/manage/index.vue @@ -142,8 +142,9 @@
- - + +
@@ -175,40 +176,7 @@ tableData: [], total: 0, onaction: '1', - formInline: { - // 合同类型 - contractType: '', - // 合同编号 - contractNumber: '', - // 标段号 - sectionNumber: '', - // 合同名称 - contractName: '', - // 押金 - earnestMoney: '', - // 合同签订日期 - contractSigningDate: '', - // 合同终止日期 - contractTerminationDate: '', - // 起租日期 - leaseStartDate: '', - // 付款周期 - paymentCycle: '', - // 合同金额(租金) - contractAmount: '', - // 付款日 - paymentDay: '', - // 承租人名称 - tenantName: '', - // 承租人联系电话 - tenantTelephone: '', - // 承租人银行账号 - tenantBankAccount: '', - // 关联商家 - relatedMerchants: '', - // 商铺编号(绑定资源) - shopNumber: '' - }, + formInline: {}, } }, components: { @@ -298,6 +266,7 @@ }, removeinfo(row, e) { this.contractChangeReason = e + // console.error(this.contractChangeReason) this.detailsinfo = row this.onaction = '4' },