Commit 6abe03169eff82d40ff2a3aef9947b8eb9367481
1 parent
4a242f6a
1
Showing
14 changed files
with
3512 additions
and
1228 deletions
admin-web-master/src/api/newly.js
| 1 | 1 | import request from '@/utils/request' |
| 2 | 2 | import requestnew from '@/utils/request2' |
| 3 | +// 生成合同附件 | |
| 4 | +export function dataInprotDocument(data) { | |
| 5 | + return request({ | |
| 6 | + url: '/cereContractTemplate/dataInprotDocument ', | |
| 7 | + method: 'post', | |
| 8 | + data | |
| 9 | + }) | |
| 10 | +} | |
| 11 | +// ******模版****** | |
| 12 | +// 列表 | |
| 13 | +export function cereContractTemplate(data) { | |
| 14 | + return request({ | |
| 15 | + url: '/cereContractTemplate/queryByPage', | |
| 16 | + method: 'post', | |
| 17 | + data | |
| 18 | + }) | |
| 19 | +} | |
| 20 | +// 添加 | |
| 21 | +export function cereContractTemplateadd(data) { | |
| 22 | + return request({ | |
| 23 | + url: '/cereContractTemplate/add', | |
| 24 | + method: 'post', | |
| 25 | + data | |
| 26 | + }) | |
| 27 | +} | |
| 28 | +// 删除 | |
| 29 | +export function cereContractTemplatedeleteById(data) { | |
| 30 | + return request({ | |
| 31 | + url: '/cereContractTemplate/deleteById', | |
| 32 | + method: 'post', | |
| 33 | + data | |
| 34 | + }) | |
| 35 | +} | |
| 36 | + | |
| 37 | + | |
| 3 | 38 | // 获取方案资源 |
| 4 | 39 | export function cereBusinessPlanqueryById(data) { |
| 5 | 40 | return request({ | ... | ... |
admin-web-master/src/components/add/addht copy.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div> | |
| 3 | + <el-form :model="formInline" :rules="rulesHetong" ref="heForm" label-width="130px" class="demo-ruleForm"> | |
| 4 | + <el-row :gutter="20"> | |
| 5 | + <el-col :span="12"> | |
| 6 | + <el-form-item label="合同类型" prop="contractType"> | |
| 7 | + <el-select v-model="formInline.contractType" placeholder="请选择" style="width: 100%;"> | |
| 8 | + <el-option label="商铺合同" value="商铺合同"></el-option> | |
| 9 | + <el-option label="广告位合同" value="广告位合同"></el-option> | |
| 10 | + <el-option label="场地合同" value="场地合同"></el-option> | |
| 11 | + </el-select> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="12"> | |
| 15 | + <el-form-item label="合同编号" prop="contractNumber"> | |
| 16 | + <el-input v-model="formInline.contractNumber" placeholder="请输入" maxlength="20"></el-input> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + </el-row> | |
| 20 | + <el-row :gutter="20"> | |
| 21 | + <el-col :span="12"> | |
| 22 | + <el-form-item label="标段号" prop="sectionNumber"> | |
| 23 | + <el-input v-model="formInline.sectionNumber" placeholder="请输入" maxlength="20"></el-input> | |
| 24 | + </el-form-item> | |
| 25 | + </el-col> | |
| 26 | + <el-col :span="12"> | |
| 27 | + <el-form-item label="合同名称" prop="contractName"> | |
| 28 | + <el-input v-model="formInline.contractName" placeholder="请输入" maxlength="50"></el-input> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + </el-row> | |
| 32 | + <el-row :gutter="20"> | |
| 33 | + <el-col :span="12"> | |
| 34 | + <el-form-item label="合同签订日期" prop="contractSigningDate"> | |
| 35 | + <el-date-picker v-model="formInline.contractSigningDate" type="date" value-format="yyyy-MM-dd" | |
| 36 | + placeholder="选择日期" style="width: 100%;"> | |
| 37 | + </el-date-picker> | |
| 38 | + </el-form-item> | |
| 39 | + </el-col> | |
| 40 | + <el-col :span="12"> | |
| 41 | + <el-form-item label="押金" prop="earnestMoney"> | |
| 42 | + <el-input v-model="formInline.earnestMoney" placeholder="请输入" maxlength="20"></el-input> | |
| 43 | + </el-form-item> | |
| 44 | + | |
| 45 | + </el-col> | |
| 46 | + </el-row> | |
| 47 | + <el-row :gutter="20"> | |
| 48 | + <el-col :span="12"> | |
| 49 | + <el-form-item label="起租日期" prop="leaseStartDate"> | |
| 50 | + <el-date-picker v-model="formInline.leaseStartDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" | |
| 51 | + style="width: 100%;"> | |
| 52 | + </el-date-picker> | |
| 53 | + </el-form-item> | |
| 54 | + | |
| 55 | + </el-col> | |
| 56 | + <el-col :span="12"> | |
| 57 | + <el-form-item label="终止日期" prop="contractTerminationDate"> | |
| 58 | + <el-date-picker v-model="formInline.contractTerminationDate" type="date" value-format="yyyy-MM-dd" | |
| 59 | + placeholder="选择日期" style="width: 100%;"> | |
| 60 | + </el-date-picker> | |
| 61 | + </el-form-item> | |
| 62 | + </el-col> | |
| 63 | + </el-row> | |
| 64 | + <el-row :gutter="20"> | |
| 65 | + <el-col :span="12"> | |
| 66 | + <el-form-item label="付款周期" prop="paymentCycle"> | |
| 67 | + <el-select v-model="formInline.paymentCycle" placeholder="请选择" style="width: 100%;"> | |
| 68 | + <el-option label="按年" value="按年"></el-option> | |
| 69 | + <el-option label="按月" value="按月"></el-option> | |
| 70 | + <el-option label="按日" value="按日"></el-option> | |
| 71 | + <el-option label="季度" value="季度"></el-option> | |
| 72 | + </el-select> | |
| 73 | + </el-form-item> | |
| 74 | + </el-col> | |
| 75 | + <el-col :span="12"> | |
| 76 | + <el-form-item label="租金" prop="contractAmount"> | |
| 77 | + <el-input v-model="formInline.contractAmount" placeholder="请输入" maxlength="20"></el-input> | |
| 78 | + </el-form-item> | |
| 79 | + </el-col> | |
| 80 | + </el-row> | |
| 81 | + <el-row :gutter="20"> | |
| 82 | + <el-col :span="12"> | |
| 83 | + <el-form-item label="付款日" prop="paymentDay"> | |
| 84 | + <el-select v-model="formInline.paymentDay" placeholder="请选择" style="width: 100%;"> | |
| 85 | + <el-option :label="val+'号'" :value="val+'号'" v-for="val in 31"></el-option> | |
| 86 | + </el-select> | |
| 87 | + </el-form-item> | |
| 88 | + </el-col> | |
| 89 | + <el-col :span="12"> | |
| 90 | + <el-form-item label="承租人银行账号" prop="tenantBankAccount"> | |
| 91 | + <el-input v-model="formInline.tenantBankAccount" placeholder="请输入" maxlength="20"></el-input> | |
| 92 | + </el-form-item> | |
| 93 | + </el-col> | |
| 94 | + </el-row> | |
| 95 | + <el-form-item label="绑定商家" prop="relatedMerchants"> | |
| 96 | + <el-select style="width: 100%;" v-model="formInline.relatedMerchants" placeholder="请输入关键词搜索" filterable | |
| 97 | + @change="changeRelatedMerchants"> | |
| 98 | + <el-option v-for="(item,index) in shopList" :key="index" :label="item.name+ ' ' + item.phone" | |
| 99 | + :value="item.id+''" /> | |
| 100 | + </el-select> | |
| 101 | + </el-form-item> | |
| 102 | + <el-row :gutter="20"> | |
| 103 | + <el-col :span="12"> | |
| 104 | + <el-form-item label="承租人名称" prop="tenantName"> | |
| 105 | + <el-input v-model="formInline.tenantName" placeholder="请输入" maxlength="20"></el-input> | |
| 106 | + </el-form-item> | |
| 107 | + </el-col> | |
| 108 | + <el-col :span="12"> | |
| 109 | + <el-form-item label="联系电话" prop="tenantTelephone"> | |
| 110 | + <el-input v-model="formInline.tenantTelephone" placeholder="请输入" maxlength="20"></el-input> | |
| 111 | + </el-form-item> | |
| 112 | + | |
| 113 | + </el-col> | |
| 114 | + | |
| 115 | + </el-row> | |
| 116 | + <el-form-item label="附件信息" prop="appendicesContract"> | |
| 117 | + | |
| 118 | + <el-upload :auto-upload="false" class="video-uploader" :action="uploadFileUrl" :on-remove="hefuRemove" | |
| 119 | + :on-change="hefuSuccess" :file-list="hefuData"> | |
| 120 | + <el-button style="background-color: #fff;color: #3F9B6A;border: 1px solid #dcdfe6;" class="buttonHover" | |
| 121 | + v-if="hefuData.length==0">+点击上传</el-button> | |
| 122 | + <div v-if="hefuData.length==0" slot="tip" class="el-upload__tip">(不超过50M,格式支持word、excel、ppt、pdf)</div> | |
| 123 | + </el-upload> | |
| 124 | + | |
| 125 | + </el-form-item> | |
| 126 | + <el-row :gutter="20"> | |
| 127 | + <el-col :span="24"> | |
| 128 | + <el-form-item label="绑定资源" prop="shopNumber"> | |
| 129 | + <div style="border: 1px solid #E5E5E5;padding: 1px" id="huodong"> | |
| 130 | + <div | |
| 131 | + style="font-size: 14px;border-bottom: 1px solid #E5E5E5;display: flex;justify-content: space-between;line-height:20px;background:#F2F3F5;"> | |
| 132 | + <div></div> | |
| 133 | + <div v-if="AddData.length != 1" style="color: #3F9B6A;padding:10px;" @click="mingShow"> | |
| 134 | + 添加 | |
| 135 | + </div> | |
| 136 | + </div> | |
| 137 | + <div style="padding: 15px;"> | |
| 138 | + <div style="padding: 0px 20px 0px 0px"> | |
| 139 | + <el-table :data="AddData" | |
| 140 | + :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"> | |
| 141 | + <el-table-column label="序号" min-width="5%"> | |
| 142 | + <template slot-scope="scope"> | |
| 143 | + {{scope.$index + 1}} | |
| 144 | + </template> | |
| 145 | + </el-table-column> | |
| 146 | + <el-table-column label="资源名称" min-width="20%" show-overflow-tooltip> | |
| 147 | + <template slot-scope="scope"> | |
| 148 | + {{scope.row.shopName ? scope.row.shopName : scope.row.advertisingName?scope.row.advertisingName:scope.row.venueName}} | |
| 149 | + </template> | |
| 150 | + </el-table-column> | |
| 151 | + <el-table-column label="资源类型" min-width="10%"> | |
| 152 | + <template slot-scope="scope"> | |
| 153 | + {{scope.row.shopName ? '商铺' : scope.row.advertisingType?scope.row.advertisingType:'场地'}} | |
| 154 | + </template> | |
| 155 | + </el-table-column> | |
| 156 | + | |
| 157 | + <el-table-column label="详细地址" min-width="20%"> | |
| 158 | + <template slot-scope="scope"> | |
| 159 | + {{scope.row.detailedLocation}} | |
| 160 | + </template> | |
| 161 | + </el-table-column> | |
| 162 | + | |
| 163 | + <el-table-column prop="notes" label="实际使用面积" min-width="25%"> | |
| 164 | + <template slot-scope="scope"> | |
| 165 | + {{scope.row.actualArea ? scope.row.actualArea : scope.row.actualUsableArea?scope.row.actualUsableArea:'-'}} | |
| 166 | + </template> | |
| 167 | + | |
| 168 | + </el-table-column> | |
| 169 | + | |
| 170 | + <el-table-column label="操作" min-width="15%"> | |
| 171 | + <template slot-scope="scope"> | |
| 172 | + <div @click="MingDelete(scope.$index)" class="tableBtn greens">删除</div> | |
| 173 | + </template> | |
| 174 | + </el-table-column> | |
| 175 | + </el-table> | |
| 176 | + </div> | |
| 177 | + </div> | |
| 178 | + </div> | |
| 179 | + </el-form-item> | |
| 180 | + </el-col> | |
| 181 | + </el-row> | |
| 182 | + <el-row :gutter="20"> | |
| 183 | + <el-col :span="12"> | |
| 184 | + <el-form-item> | |
| 185 | + <div style="margin-top: 20px"> | |
| 186 | + <el-button @click="add()" style="background-color: #3F9B6A;color: #fff;">确定</el-button> | |
| 187 | + <el-button @click="close()" class="buttonHover" | |
| 188 | + style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button> | |
| 189 | + </div> | |
| 190 | + </el-form-item> | |
| 191 | + </el-col> | |
| 192 | + </el-row> | |
| 193 | + </el-form> | |
| 194 | + <el-dialog :visible.sync="addMing" title="选择资源" style="padding: 0;" width="65%" append-to-body center | |
| 195 | + :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"> | |
| 196 | + <div style="max-height:50vh;overflow-y: auto;"> | |
| 197 | + <el-table :data="ziyuanData" tooltip-effect="dark" @row-click="handleSelectionChange" | |
| 198 | + :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" highlight-current-row> | |
| 199 | + <!-- <el-table-column label="选择" type="selection" width="55"> | |
| 200 | + </el-table-column> --> | |
| 201 | + <el-table-column label="序号"> | |
| 202 | + <template slot-scope="scope"> | |
| 203 | + {{scope.$index + 1}} | |
| 204 | + </template> | |
| 205 | + </el-table-column> | |
| 206 | + <el-table-column label="编号" prop="id"> | |
| 207 | + | |
| 208 | + </el-table-column> | |
| 209 | + <el-table-column label="资源名称"> | |
| 210 | + <template slot-scope="scope"> | |
| 211 | + {{scope.row.shopName ? scope.row.shopName : scope.row.advertisingName?scope.row.advertisingName:scope.row.venueName}} | |
| 212 | + </template> | |
| 213 | + </el-table-column> | |
| 214 | + <el-table-column label="资源类型"> | |
| 215 | + <template slot-scope="scope"> | |
| 216 | + {{scope.row.shopName ? '商铺' : scope.row.advertisingType?scope.row.advertisingType:'场地'}} | |
| 217 | + </template> | |
| 218 | + </el-table-column> | |
| 219 | + </el-table> | |
| 220 | + </div> | |
| 221 | + <template #footer> | |
| 222 | + <div style="display: flex; justify-content: flex-end; align-items: center;"> | |
| 223 | + <el-button @click="minSev" style="background-color: #3F9B6A;color: #fff;">确定</el-button> | |
| 224 | + <el-button @click="mingClose" class="buttonHover" | |
| 225 | + style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">取消</el-button> | |
| 226 | + </div> | |
| 227 | + </template> | |
| 228 | + </el-dialog> | |
| 229 | + </div> | |
| 230 | +</template> | |
| 231 | + | |
| 232 | +<script> | |
| 233 | + import { | |
| 234 | + businessListGetAll, | |
| 235 | + } from '@/api/business' | |
| 236 | + import upimg from "@/components/ImageUpload/index" | |
| 237 | + import { | |
| 238 | + uploadUrl | |
| 239 | + } from '@/utils/request' | |
| 240 | + import { | |
| 241 | + getAlls, | |
| 242 | + changAlls | |
| 243 | + } from '@/api/information.js' | |
| 244 | + import { | |
| 245 | + getAlls as map1 | |
| 246 | + } from '@/api/map1.js' | |
| 247 | + import { | |
| 248 | + miniioupload | |
| 249 | + } from '@/api/commodityLease.js' | |
| 250 | + import { | |
| 251 | + | |
| 252 | + contractinsertAdd | |
| 253 | + } from '@/api/manage.js' | |
| 254 | + import { | |
| 255 | + cerePlatformMerchant | |
| 256 | + } from '@/api/newly.js' | |
| 257 | + import { | |
| 258 | + msgedit | |
| 259 | + } from '@/api/cereBusinessInfo' | |
| 260 | + import { | |
| 261 | + AdvertiserInfoEdit | |
| 262 | + } from '@/api/advertisement.js' | |
| 263 | + export default { | |
| 264 | + components: { | |
| 265 | + upimg | |
| 266 | + }, | |
| 267 | + data() { | |
| 268 | + return { | |
| 269 | + list1: [ | |
| 270 | + { | |
| 271 | + name: '合同类型', | |
| 272 | + key: 'contractType', | |
| 273 | + type: '下拉选择', | |
| 274 | + isrequired: '是', | |
| 275 | + width: '50%(半行)', | |
| 276 | + length: '20', | |
| 277 | + value: '', | |
| 278 | + list: [{ | |
| 279 | + label: '商铺合同', | |
| 280 | + value: '商铺合同', | |
| 281 | + }, | |
| 282 | + { | |
| 283 | + label: '广告位合同', | |
| 284 | + value: '广告位合同', | |
| 285 | + }, | |
| 286 | + { | |
| 287 | + label: '场地合同', | |
| 288 | + value: '场地合同', | |
| 289 | + }, | |
| 290 | + ] | |
| 291 | + }, | |
| 292 | + { | |
| 293 | + name: '合同编号', | |
| 294 | + key: 'contractNumber', | |
| 295 | + type: '单行文本', | |
| 296 | + isrequired: '是', | |
| 297 | + width: '50%(半行)', | |
| 298 | + length: '20', | |
| 299 | + value: '', | |
| 300 | + }, | |
| 301 | + { | |
| 302 | + name: '标段号', | |
| 303 | + key: 'sectionNumber', | |
| 304 | + type: '单行文本', | |
| 305 | + isrequired: '是', | |
| 306 | + width: '50%(半行)', | |
| 307 | + length: '20', | |
| 308 | + value: '', | |
| 309 | + }, | |
| 310 | + { | |
| 311 | + name: '合同名称', | |
| 312 | + key: 'contractName', | |
| 313 | + type: '单行文本', | |
| 314 | + isrequired: '是', | |
| 315 | + width: '50%(半行)', | |
| 316 | + length: '50', | |
| 317 | + value: '', | |
| 318 | + }, | |
| 319 | + { | |
| 320 | + name: '合同签订日期', | |
| 321 | + key: 'contractSigningDate', | |
| 322 | + type: '日期', | |
| 323 | + isrequired: '是', | |
| 324 | + width: '50%(半行)', | |
| 325 | + length: '', | |
| 326 | + value: '', | |
| 327 | + }, | |
| 328 | + { | |
| 329 | + name: '押金', | |
| 330 | + key: 'earnestMoney', | |
| 331 | + type: '单行数字文本', | |
| 332 | + isrequired: '是', | |
| 333 | + width: '50%(半行)', | |
| 334 | + length: '20', | |
| 335 | + value: '', | |
| 336 | + }, | |
| 337 | + { | |
| 338 | + name: '起租日期', | |
| 339 | + key: 'leaseStartDate', | |
| 340 | + type: '日期', | |
| 341 | + isrequired: '是', | |
| 342 | + width: '50%(半行)', | |
| 343 | + length: '', | |
| 344 | + value: '', | |
| 345 | + }, | |
| 346 | + { | |
| 347 | + name: '终止日期', | |
| 348 | + key: 'contractTerminationDate', | |
| 349 | + type: '日期', | |
| 350 | + isrequired: '是', | |
| 351 | + width: '50%(半行)', | |
| 352 | + length: '', | |
| 353 | + value: '', | |
| 354 | + }, | |
| 355 | + { | |
| 356 | + name: '付款周期', | |
| 357 | + key: 'paymentCycle', | |
| 358 | + type: '下拉选择', | |
| 359 | + isrequired: '是', | |
| 360 | + width: '50%(半行)', | |
| 361 | + length: '20', | |
| 362 | + value: '', | |
| 363 | + list: [{ | |
| 364 | + label: '按年', | |
| 365 | + value: '按年', | |
| 366 | + }, | |
| 367 | + { | |
| 368 | + label: '按月', | |
| 369 | + value: '按月', | |
| 370 | + }, | |
| 371 | + { | |
| 372 | + label: '按日', | |
| 373 | + value: '按日', | |
| 374 | + }, | |
| 375 | + { | |
| 376 | + label: '季度', | |
| 377 | + value: '季度', | |
| 378 | + }, | |
| 379 | + ] | |
| 380 | + }, | |
| 381 | + { | |
| 382 | + name: '租金', | |
| 383 | + key: 'contractAmount', | |
| 384 | + type: '单行数字文本', | |
| 385 | + isrequired: '是', | |
| 386 | + width: '50%(半行)', | |
| 387 | + length: '20', | |
| 388 | + value: '', | |
| 389 | + }, | |
| 390 | + { | |
| 391 | + name: '付款日', | |
| 392 | + key: 'paymentDay', | |
| 393 | + type: '付款日', | |
| 394 | + isrequired: '是', | |
| 395 | + width: '50%(半行)', | |
| 396 | + length: '20', | |
| 397 | + value: '', | |
| 398 | + }, | |
| 399 | + { | |
| 400 | + name: '承租人银行账号', | |
| 401 | + key: 'tenantBankAccount', | |
| 402 | + type: '单行数字文本', | |
| 403 | + isrequired: '是', | |
| 404 | + width: '50%(半行)', | |
| 405 | + length: '20', | |
| 406 | + value: '', | |
| 407 | + }, | |
| 408 | + { | |
| 409 | + name: '绑定商家', | |
| 410 | + key: 'relatedMerchants', | |
| 411 | + type: '商家', | |
| 412 | + isrequired: '是', | |
| 413 | + width: '100%(一行)', | |
| 414 | + length: '', | |
| 415 | + value: '', | |
| 416 | + }, | |
| 417 | + { | |
| 418 | + name: '承租人名称', | |
| 419 | + key: 'tenantName', | |
| 420 | + type: '单行文本', | |
| 421 | + isrequired: '是', | |
| 422 | + width: '50%(半行)', | |
| 423 | + length: '20', | |
| 424 | + value: '', | |
| 425 | + }, | |
| 426 | + { | |
| 427 | + name: '联系电话', | |
| 428 | + key: 'tenantTelephone', | |
| 429 | + type: '单行数字文本', | |
| 430 | + isrequired: '是', | |
| 431 | + width: '50%(半行)', | |
| 432 | + length: '20', | |
| 433 | + value: '', | |
| 434 | + }, | |
| 435 | + { | |
| 436 | + name: '附件信息', | |
| 437 | + key: 'appendicesContract', | |
| 438 | + type: '附件', | |
| 439 | + isrequired: '是', | |
| 440 | + width: '100%(一行)', | |
| 441 | + length: '', | |
| 442 | + value: '', | |
| 443 | + }, | |
| 444 | + { | |
| 445 | + name: '绑定资源', | |
| 446 | + key: 'shopNumber', | |
| 447 | + type: '资源', | |
| 448 | + isrequired: '是', | |
| 449 | + width: '100%(一行)', | |
| 450 | + length: '', | |
| 451 | + value: '', | |
| 452 | + list:[] | |
| 453 | + }, | |
| 454 | + ], | |
| 455 | + AddData: [], //最后资源 | |
| 456 | + multipleSelection: [], //资源 | |
| 457 | + addMing: false, | |
| 458 | + ziyuanData: [], | |
| 459 | + shopId: null, | |
| 460 | + hefuData: [], //合同附件 | |
| 461 | + uploadFileUrl: uploadUrl, // 请求地址 | |
| 462 | + shopList: [], | |
| 463 | + formInline: { | |
| 464 | + // 合同类型 | |
| 465 | + contractType: '', | |
| 466 | + // 合同编号 | |
| 467 | + contractNumber: '', | |
| 468 | + // 标段号 | |
| 469 | + sectionNumber: '', | |
| 470 | + // 合同名称 | |
| 471 | + contractName: '', | |
| 472 | + // 押金 | |
| 473 | + earnestMoney: '', | |
| 474 | + // 合同签订日期 | |
| 475 | + contractSigningDate: '', | |
| 476 | + // 合同终止日期 | |
| 477 | + contractTerminationDate: '', | |
| 478 | + // 起租日期 | |
| 479 | + leaseStartDate: '', | |
| 480 | + // 付款周期 | |
| 481 | + paymentCycle: '', | |
| 482 | + // 合同金额(租金) | |
| 483 | + contractAmount: '', | |
| 484 | + // 付款日 | |
| 485 | + paymentDay: '', | |
| 486 | + // 承租人名称 | |
| 487 | + tenantName: '', | |
| 488 | + // 承租人联系电话 | |
| 489 | + tenantTelephone: '', | |
| 490 | + // 承租人银行账号 | |
| 491 | + tenantBankAccount: '', | |
| 492 | + // 关联商家 | |
| 493 | + relatedMerchants: '', | |
| 494 | + // 商铺编号(绑定资源) | |
| 495 | + shopNumber: '', | |
| 496 | + // 合同附件 | |
| 497 | + appendicesContract: '', | |
| 498 | + //合同状态 | |
| 499 | + dataStatus: '1' | |
| 500 | + }, | |
| 501 | + rulesHetong: { | |
| 502 | + contractType: [{ | |
| 503 | + required: true, | |
| 504 | + message: '请选择合同类型', | |
| 505 | + trigger: 'change' | |
| 506 | + }], | |
| 507 | + contractNumber: [{ | |
| 508 | + required: true, | |
| 509 | + message: '请输入合同编号', | |
| 510 | + trigger: 'blur' | |
| 511 | + }], | |
| 512 | + sectionNumber: [{ | |
| 513 | + required: true, | |
| 514 | + message: '请输入标段号', | |
| 515 | + trigger: 'blur' | |
| 516 | + }], | |
| 517 | + contractName: [{ | |
| 518 | + required: true, | |
| 519 | + message: '请输入合同名称', | |
| 520 | + trigger: 'blur' | |
| 521 | + }], | |
| 522 | + earnestMoney: [{ | |
| 523 | + required: true, | |
| 524 | + message: '请输入押金', | |
| 525 | + trigger: 'blur' | |
| 526 | + }], | |
| 527 | + contractSigningDate: [{ | |
| 528 | + required: true, | |
| 529 | + message: '请选择签订日期', | |
| 530 | + trigger: 'change' | |
| 531 | + }], | |
| 532 | + contractTerminationDate: [{ | |
| 533 | + required: true, | |
| 534 | + message: '请选择终止日期', | |
| 535 | + trigger: 'change' | |
| 536 | + }], | |
| 537 | + leaseStartDate: [{ | |
| 538 | + required: true, | |
| 539 | + message: '请选择起租日期', | |
| 540 | + trigger: 'change' | |
| 541 | + }], | |
| 542 | + paymentCycle: [{ | |
| 543 | + required: true, | |
| 544 | + message: '请选择付款周期', | |
| 545 | + trigger: 'change' | |
| 546 | + }], | |
| 547 | + contractAmount: [{ | |
| 548 | + required: true, | |
| 549 | + message: '请输入租金', | |
| 550 | + trigger: 'blur' | |
| 551 | + }], | |
| 552 | + paymentDay: [{ | |
| 553 | + required: true, | |
| 554 | + message: '请选择付款日', | |
| 555 | + trigger: 'change' | |
| 556 | + }], | |
| 557 | + tenantName: [{ | |
| 558 | + required: true, | |
| 559 | + message: '请输入承租人名称', | |
| 560 | + trigger: 'blur' | |
| 561 | + }], | |
| 562 | + tenantTelephone: [{ | |
| 563 | + required: true, | |
| 564 | + message: '请输入联系电话', | |
| 565 | + trigger: 'blur' | |
| 566 | + }], | |
| 567 | + tenantBankAccount: [{ | |
| 568 | + required: true, | |
| 569 | + message: '请输入承租人银行账号', | |
| 570 | + trigger: 'blur' | |
| 571 | + }], | |
| 572 | + relatedMerchants: [{ | |
| 573 | + required: true, | |
| 574 | + message: '请选择绑定商家', | |
| 575 | + trigger: 'change' | |
| 576 | + }], | |
| 577 | + shopNumber: [{ | |
| 578 | + required: true, | |
| 579 | + message: '请选择绑定资源', | |
| 580 | + trigger: 'change' | |
| 581 | + }], | |
| 582 | + appendicesContract: [{ | |
| 583 | + required: true, | |
| 584 | + message: '请上传合同附件', | |
| 585 | + trigger: 'blur' | |
| 586 | + }], | |
| 587 | + }, | |
| 588 | + shopfrom: { | |
| 589 | + checkState:'2', | |
| 590 | + pageNumber: 0, | |
| 591 | + pageSize: 1000, | |
| 592 | + }, | |
| 593 | + pageindex: { | |
| 594 | + pageNumber: 0, | |
| 595 | + pageSize: 20, | |
| 596 | + }, | |
| 597 | + baseURL: 'http://192.168.2.38:9003', | |
| 598 | + uploadFiles: [], | |
| 599 | + filesLength: 1 | |
| 600 | + }; | |
| 601 | + }, | |
| 602 | + props: { | |
| 603 | + info: { | |
| 604 | + type: Object, | |
| 605 | + default: {} | |
| 606 | + } | |
| 607 | + }, | |
| 608 | + async created() { | |
| 609 | + console.error({...this.info}) | |
| 610 | + await cerePlatformMerchant(this.shopfrom).then(res => { | |
| 611 | + this.shopList = res.data.content | |
| 612 | + console.error(this.shopList) | |
| 613 | + }) | |
| 614 | + if(this.info.id) { | |
| 615 | + if(this.info.cereBasicInformationShop && this.info.cereBasicInformationShop.id) { | |
| 616 | + this.AddData.push(this.info.cereBasicInformationShop) | |
| 617 | + } | |
| 618 | + if(this.info.cereAdvertisingInformation && this.info.cereAdvertisingInformation.id) { | |
| 619 | + this.AddData.push(this.info.cereAdvertisingInformation) | |
| 620 | + } | |
| 621 | + if(this.info.cereBasicInformationVenue && this.info.cereBasicInformationVenue.id) { | |
| 622 | + this.AddData.push(this.info.cereBasicInformationVenue) | |
| 623 | + } | |
| 624 | + for (let index = 0; index < this.shopList.length; index++) { | |
| 625 | + const element = this.shopList[index]; | |
| 626 | + console.error(element) | |
| 627 | + if(element.phone == this.info.applicant) { | |
| 628 | + this.shopId = element.id+'' | |
| 629 | + this.formInline.relatedMerchants = element.id+'' | |
| 630 | + this.formInline.tenantName = element.name | |
| 631 | + this.formInline.tenantTelephone = element.phone | |
| 632 | + } | |
| 633 | + } | |
| 634 | + } | |
| 635 | + }, | |
| 636 | + methods: { | |
| 637 | + add() { | |
| 638 | + console.error({ | |
| 639 | + ...this.formInline | |
| 640 | + }) | |
| 641 | + // return | |
| 642 | + console.error(this.AddData) | |
| 643 | + console.error(this.hefuData) | |
| 644 | + // console.error() | |
| 645 | + let c1 = '' | |
| 646 | + for (let i = 0; i < this.hefuData.length; i++) { | |
| 647 | + if (i == 0) { | |
| 648 | + c1 = this.hefuData[i].url | |
| 649 | + } else { | |
| 650 | + c1 = c1 + ',' + this.hefuData[i].url | |
| 651 | + } | |
| 652 | + } | |
| 653 | + let c2 = '' | |
| 654 | + for (let i = 0; i < this.AddData.length; i++) { | |
| 655 | + let cnet = '' | |
| 656 | + if (this.AddData[i].shopName) { | |
| 657 | + cnet = 'sp' + this.AddData[i].id | |
| 658 | + } else if (this.AddData[i].advertisingType) { | |
| 659 | + cnet = 'gg' + this.AddData[i].id | |
| 660 | + } else { | |
| 661 | + cnet = 'cd' + this.AddData[i].id | |
| 662 | + } | |
| 663 | + if (i == 0) { | |
| 664 | + c2 = cnet | |
| 665 | + } else { | |
| 666 | + c2 = c2 + ',' + cnet | |
| 667 | + } | |
| 668 | + } | |
| 669 | + | |
| 670 | + if (this.formInline.id) { | |
| 671 | + // this.$refs[formName].validate((valid) => { | |
| 672 | + // console.log(valid) | |
| 673 | + // if (valid) { | |
| 674 | + // contractinsertAdd(this.formInline).then(res => { | |
| 675 | + | |
| 676 | + // }) | |
| 677 | + // } else { | |
| 678 | + // this.$message({ | |
| 679 | + // message: '请填写完整信息', | |
| 680 | + // type: 'error' | |
| 681 | + // }) | |
| 682 | + // return false; | |
| 683 | + // } | |
| 684 | + // }) | |
| 685 | + } else { | |
| 686 | + | |
| 687 | + this.formInline.appendicesContract = c1 | |
| 688 | + this.formInline.shopNumber = c2 | |
| 689 | + console.error({ | |
| 690 | + ...this.formInline | |
| 691 | + }) | |
| 692 | + this.$refs.heForm.validate((valid) => { | |
| 693 | + console.log(valid) | |
| 694 | + if (valid) { | |
| 695 | + contractinsertAdd({ | |
| 696 | + ...this.formInline, | |
| 697 | + relatedMerchants: this.shopId, | |
| 698 | + updateUser: localStorage.getItem('roleName') | |
| 699 | + }).then(res => { | |
| 700 | + console.error(res) | |
| 701 | + if (res.code == 200) { | |
| 702 | + this.$message({ | |
| 703 | + message: '添加成功', | |
| 704 | + type: 'success' | |
| 705 | + }) | |
| 706 | + if(this.info.id) { | |
| 707 | + if(this.info.cereBasicInformationShop && this.info.cereBasicInformationShop.id) { | |
| 708 | + msgedit({ | |
| 709 | + auditStatus: '4', | |
| 710 | + id: this.info.id, | |
| 711 | + contractNumber: this.formInline.contractNumber | |
| 712 | + }) | |
| 713 | + } | |
| 714 | + if(this.info.cereAdvertisingInformation && this.info.cereAdvertisingInformation.id) { | |
| 715 | + AdvertiserInfoEdit({ | |
| 716 | + auditStatus: '4', | |
| 717 | + id: this.info.id, | |
| 718 | + contractId: this.formInline.contractNumber | |
| 719 | + }).then(item => { | |
| 720 | + this.getAll() | |
| 721 | + }) | |
| 722 | + } | |
| 723 | + if(this.info.cereBasicInformationVenue && this.info.cereBasicInformationVenue.id) { | |
| 724 | + msgedit({ | |
| 725 | + auditStatus: '4', | |
| 726 | + id: this.info.id, | |
| 727 | + contractNumber: this.formInline.contractNumber | |
| 728 | + }) | |
| 729 | + } | |
| 730 | + | |
| 731 | + } | |
| 732 | + this.$emit('removeonaction', '1') | |
| 733 | + } else { | |
| 734 | + this.$message({ | |
| 735 | + message: res.msg, | |
| 736 | + type: 'error' | |
| 737 | + }) | |
| 738 | + } | |
| 739 | + | |
| 740 | + }) | |
| 741 | + } else { | |
| 742 | + this.$message({ | |
| 743 | + message: '请填写完整信息', | |
| 744 | + type: 'error' | |
| 745 | + }) | |
| 746 | + return false; | |
| 747 | + } | |
| 748 | + }) | |
| 749 | + | |
| 750 | + } | |
| 751 | + }, | |
| 752 | + close() { | |
| 753 | + this.$emit('removeonaction', '1') | |
| 754 | + }, | |
| 755 | + MingDelete(item) { | |
| 756 | + this.AddData.splice(item, 1); | |
| 757 | + }, | |
| 758 | + async mingShow() { | |
| 759 | + const ziyuan = await getAlls(this.pageindex) | |
| 760 | + const ggw = await map1(this.pageindex) | |
| 761 | + const changdi = await changAlls(this.pageindex) | |
| 762 | + this.ziyuanData = [...ziyuan.data.content, ...ggw.data.content, ...changdi.data.content] | |
| 763 | + console.error(this.ziyuanData) | |
| 764 | + this.addMing = true | |
| 765 | + }, | |
| 766 | + handleSelectionChange(selection) { | |
| 767 | + // 处理选择变化的逻辑 | |
| 768 | + console.error(selection) | |
| 769 | + this.multipleSelection= [] | |
| 770 | + this.multipleSelection.push(selection) | |
| 771 | + }, | |
| 772 | + minSev() { | |
| 773 | + // this.AddData = this.multipleSelection | |
| 774 | + const filteredAddData = this.AddData.filter(itemAdd => { | |
| 775 | + // 使用 some 方法检查 this.multipleSelection 中是否存在具有相同 id 的元素 | |
| 776 | + return !this.multipleSelection.some(itemMultiple => itemMultiple.id === itemAdd.id); | |
| 777 | + }); | |
| 778 | + this.AddData = filteredAddData.concat(this.multipleSelection) | |
| 779 | + this.addMing = false | |
| 780 | + this.multipleSelection = [] | |
| 781 | + | |
| 782 | + }, | |
| 783 | + mingClose() { | |
| 784 | + this.multipleSelection = [] | |
| 785 | + this.ziyuanData = [] | |
| 786 | + this.addMing = false | |
| 787 | + }, | |
| 788 | + changeRelatedMerchants(e) { | |
| 789 | + console.error(e) | |
| 790 | + this.shopId = this.shopList[e].id | |
| 791 | + this.formInline.tenantName = this.shopList[e].name | |
| 792 | + this.formInline.tenantTelephone = this.shopList[e].phone | |
| 793 | + }, | |
| 794 | + hefuRemove() { | |
| 795 | + this.hefuData = [] | |
| 796 | + }, | |
| 797 | + hefuSuccess(response, file, fileList) { | |
| 798 | + this.hefuData = [] | |
| 799 | + console.error(response) | |
| 800 | + let fd = new FormData() | |
| 801 | + fd.append('file', response.raw) | |
| 802 | + fd.append('filePath', 'hetong') | |
| 803 | + miniioupload(fd).then(res => { | |
| 804 | + console.error(res) | |
| 805 | + const fileMsg = { | |
| 806 | + name: response.name, | |
| 807 | + url: res.data, | |
| 808 | + } | |
| 809 | + this.hefuData.push(fileMsg) | |
| 810 | + }) | |
| 811 | + }, | |
| 812 | + | |
| 813 | + | |
| 814 | + }, | |
| 815 | + }; | |
| 816 | +</script> | |
| 817 | +<style lang="css"> | |
| 818 | + .el-upload { | |
| 819 | + display: block; | |
| 820 | + text-align: left; | |
| 821 | + } | |
| 822 | + | |
| 823 | + .el-dialog__header { | |
| 824 | + background-color: #F2F3F5; | |
| 825 | + text-align: left; | |
| 826 | + } | |
| 827 | + | |
| 828 | + .el-dialog__title { | |
| 829 | + line-height: 30px; | |
| 830 | + font-size: 15px; | |
| 831 | + color: #303133; | |
| 832 | + } | |
| 833 | +</style> | ... | ... |
admin-web-master/src/components/add/addht.vue
| 1 | 1 | <template> |
| 2 | 2 | <div> |
| 3 | - <el-form :model="formInline" :rules="rulesHetong" ref="heForm" label-width="130px" class="demo-ruleForm"> | |
| 3 | + <TitleWithCircle title="模版" style="margin-bottom: 20px;" /> | |
| 4 | + <el-form :model="mbinfo" :rules="rulesmbinfo" ref="rulesmbinfoForm" label-width="130px" class="demo-ruleForm"> | |
| 4 | 5 | <el-row :gutter="20"> |
| 5 | 6 | <el-col :span="12"> |
| 6 | - <el-form-item label="合同类型" prop="contractType"> | |
| 7 | - <el-select v-model="formInline.contractType" placeholder="请选择" style="width: 100%;"> | |
| 8 | - <el-option label="商铺合同" value="商铺合同"></el-option> | |
| 9 | - <el-option label="广告位合同" value="广告位合同"></el-option> | |
| 10 | - <el-option label="场地合同" value="场地合同"></el-option> | |
| 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> | |
| 11 | 10 | </el-select> |
| 12 | 11 | </el-form-item> |
| 13 | 12 | </el-col> |
| 14 | - <el-col :span="12"> | |
| 15 | - <el-form-item label="合同编号" prop="contractNumber"> | |
| 16 | - <el-input v-model="formInline.contractNumber" placeholder="请输入" maxlength="20"></el-input> | |
| 17 | - </el-form-item> | |
| 18 | - </el-col> | |
| 19 | - </el-row> | |
| 20 | - <el-row :gutter="20"> | |
| 21 | - <el-col :span="12"> | |
| 22 | - <el-form-item label="标段号" prop="sectionNumber"> | |
| 23 | - <el-input v-model="formInline.sectionNumber" placeholder="请输入" maxlength="20"></el-input> | |
| 24 | - </el-form-item> | |
| 25 | - </el-col> | |
| 26 | - <el-col :span="12"> | |
| 27 | - <el-form-item label="合同名称" prop="contractName"> | |
| 28 | - <el-input v-model="formInline.contractName" placeholder="请输入" maxlength="50"></el-input> | |
| 29 | - </el-form-item> | |
| 30 | - </el-col> | |
| 31 | - </el-row> | |
| 32 | - <el-row :gutter="20"> | |
| 33 | - <el-col :span="12"> | |
| 34 | - <el-form-item label="合同签订日期" prop="contractSigningDate"> | |
| 35 | - <el-date-picker v-model="formInline.contractSigningDate" type="date" value-format="yyyy-MM-dd" | |
| 36 | - placeholder="选择日期" style="width: 100%;"> | |
| 37 | - </el-date-picker> | |
| 38 | - </el-form-item> | |
| 39 | - </el-col> | |
| 40 | - <el-col :span="12"> | |
| 41 | - <el-form-item label="押金" prop="earnestMoney"> | |
| 42 | - <el-input v-model="formInline.earnestMoney" placeholder="请输入" maxlength="20"></el-input> | |
| 43 | - </el-form-item> | |
| 44 | - | |
| 45 | - </el-col> | |
| 46 | - </el-row> | |
| 47 | - <el-row :gutter="20"> | |
| 48 | - <el-col :span="12"> | |
| 49 | - <el-form-item label="起租日期" prop="leaseStartDate"> | |
| 50 | - <el-date-picker v-model="formInline.leaseStartDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" | |
| 51 | - style="width: 100%;"> | |
| 52 | - </el-date-picker> | |
| 53 | - </el-form-item> | |
| 54 | - | |
| 55 | - </el-col> | |
| 56 | - <el-col :span="12"> | |
| 57 | - <el-form-item label="终止日期" prop="contractTerminationDate"> | |
| 58 | - <el-date-picker v-model="formInline.contractTerminationDate" type="date" value-format="yyyy-MM-dd" | |
| 59 | - placeholder="选择日期" style="width: 100%;"> | |
| 60 | - </el-date-picker> | |
| 61 | - </el-form-item> | |
| 62 | - </el-col> | |
| 63 | - </el-row> | |
| 64 | - <el-row :gutter="20"> | |
| 65 | - <el-col :span="12"> | |
| 66 | - <el-form-item label="付款周期" prop="paymentCycle"> | |
| 67 | - <el-select v-model="formInline.paymentCycle" placeholder="请选择" style="width: 100%;"> | |
| 68 | - <el-option label="按年" value="按年"></el-option> | |
| 69 | - <el-option label="按月" value="按月"></el-option> | |
| 70 | - <el-option label="按日" value="按日"></el-option> | |
| 71 | - <el-option label="季度" value="季度"></el-option> | |
| 72 | - </el-select> | |
| 73 | - </el-form-item> | |
| 74 | - </el-col> | |
| 75 | - <el-col :span="12"> | |
| 76 | - <el-form-item label="租金" prop="contractAmount"> | |
| 77 | - <el-input v-model="formInline.contractAmount" placeholder="请输入" maxlength="20"></el-input> | |
| 78 | - </el-form-item> | |
| 79 | - </el-col> | |
| 80 | - </el-row> | |
| 81 | - <el-row :gutter="20"> | |
| 82 | - <el-col :span="12"> | |
| 83 | - <el-form-item label="付款日" prop="paymentDay"> | |
| 84 | - <el-select v-model="formInline.paymentDay" placeholder="请选择" style="width: 100%;"> | |
| 85 | - <el-option :label="val+'号'" :value="val+'号'" v-for="val in 31"></el-option> | |
| 86 | - </el-select> | |
| 87 | - </el-form-item> | |
| 88 | - </el-col> | |
| 89 | - <el-col :span="12"> | |
| 90 | - <el-form-item label="承租人银行账号" prop="tenantBankAccount"> | |
| 91 | - <el-input v-model="formInline.tenantBankAccount" placeholder="请输入" maxlength="20"></el-input> | |
| 92 | - </el-form-item> | |
| 93 | - </el-col> | |
| 94 | - </el-row> | |
| 95 | - <el-form-item label="绑定商家" prop="relatedMerchants"> | |
| 96 | - <el-select style="width: 100%;" v-model="formInline.relatedMerchants" placeholder="请输入关键词搜索" filterable | |
| 97 | - @change="changeRelatedMerchants"> | |
| 98 | - <el-option v-for="(item,index) in shopList" :key="index" :label="item.name+ ' ' + item.phone" | |
| 99 | - :value="item.id+''" /> | |
| 100 | - </el-select> | |
| 101 | - </el-form-item> | |
| 102 | - <el-row :gutter="20"> | |
| 103 | - <el-col :span="12"> | |
| 104 | - <el-form-item label="承租人名称" prop="tenantName"> | |
| 105 | - <el-input v-model="formInline.tenantName" placeholder="请输入" maxlength="20"></el-input> | |
| 106 | - </el-form-item> | |
| 107 | - </el-col> | |
| 108 | - <el-col :span="12"> | |
| 109 | - <el-form-item label="联系电话" prop="tenantTelephone"> | |
| 110 | - <el-input v-model="formInline.tenantTelephone" placeholder="请输入" maxlength="20"></el-input> | |
| 111 | - </el-form-item> | |
| 112 | - | |
| 113 | - </el-col> | |
| 114 | - | |
| 115 | - </el-row> | |
| 116 | - <el-form-item label="附件信息" prop="appendicesContract"> | |
| 117 | - | |
| 118 | - <el-upload :auto-upload="false" class="video-uploader" :action="uploadFileUrl" :on-remove="hefuRemove" | |
| 119 | - :on-change="hefuSuccess" :file-list="hefuData"> | |
| 120 | - <el-button style="background-color: #fff;color: #3F9B6A;border: 1px solid #dcdfe6;" class="buttonHover" | |
| 121 | - v-if="hefuData.length==0">+点击上传</el-button> | |
| 122 | - <div v-if="hefuData.length==0" slot="tip" class="el-upload__tip">(不超过50M,格式支持word、excel、ppt、pdf)</div> | |
| 123 | - </el-upload> | |
| 124 | - | |
| 125 | - </el-form-item> | |
| 126 | - <el-row :gutter="20"> | |
| 127 | - <el-col :span="24"> | |
| 128 | - <el-form-item label="绑定资源" prop="shopNumber"> | |
| 129 | - <div style="border: 1px solid #E5E5E5;padding: 1px" id="huodong"> | |
| 130 | - <div | |
| 131 | - style="font-size: 14px;border-bottom: 1px solid #E5E5E5;display: flex;justify-content: space-between;line-height:20px;background:#F2F3F5;"> | |
| 132 | - <div></div> | |
| 133 | - <div v-if="AddData.length != 1" style="color: #3F9B6A;padding:10px;" @click="mingShow"> | |
| 134 | - 添加 | |
| 135 | - </div> | |
| 136 | - </div> | |
| 137 | - <div style="padding: 15px;"> | |
| 138 | - <div style="padding: 0px 20px 0px 0px"> | |
| 139 | - <el-table :data="AddData" | |
| 140 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"> | |
| 141 | - <el-table-column label="序号" min-width="5%"> | |
| 142 | - <template slot-scope="scope"> | |
| 143 | - {{scope.$index + 1}} | |
| 144 | - </template> | |
| 145 | - </el-table-column> | |
| 146 | - <el-table-column label="资源名称" min-width="20%" show-overflow-tooltip> | |
| 147 | - <template slot-scope="scope"> | |
| 148 | - {{scope.row.shopName ? scope.row.shopName : scope.row.advertisingName?scope.row.advertisingName:scope.row.venueName}} | |
| 149 | - </template> | |
| 150 | - </el-table-column> | |
| 151 | - <el-table-column label="资源类型" min-width="10%"> | |
| 152 | - <template slot-scope="scope"> | |
| 153 | - {{scope.row.shopName ? '商铺' : scope.row.advertisingType?scope.row.advertisingType:'场地'}} | |
| 154 | - </template> | |
| 155 | - </el-table-column> | |
| 156 | - | |
| 157 | - <el-table-column label="详细地址" min-width="20%"> | |
| 158 | - <template slot-scope="scope"> | |
| 159 | - {{scope.row.detailedLocation}} | |
| 160 | - </template> | |
| 161 | - </el-table-column> | |
| 162 | - | |
| 163 | - <el-table-column prop="notes" label="实际使用面积" min-width="25%"> | |
| 164 | - <template slot-scope="scope"> | |
| 165 | - {{scope.row.actualArea ? scope.row.actualArea : scope.row.actualUsableArea?scope.row.actualUsableArea:'-'}} | |
| 166 | - </template> | |
| 167 | - | |
| 168 | - </el-table-column> | |
| 169 | - | |
| 170 | - <el-table-column label="操作" min-width="15%"> | |
| 171 | - <template slot-scope="scope"> | |
| 172 | - <div @click="MingDelete(scope.$index)" class="tableBtn greens">删除</div> | |
| 173 | - </template> | |
| 174 | - </el-table-column> | |
| 175 | - </el-table> | |
| 176 | - </div> | |
| 177 | - </div> | |
| 178 | - </div> | |
| 179 | - </el-form-item> | |
| 180 | - </el-col> | |
| 181 | - </el-row> | |
| 182 | - <el-row :gutter="20"> | |
| 183 | - <el-col :span="12"> | |
| 184 | - <el-form-item> | |
| 185 | - <div style="margin-top: 20px"> | |
| 186 | - <el-button @click="add()" style="background-color: #3F9B6A;color: #fff;">确定</el-button> | |
| 187 | - <el-button @click="close()" class="buttonHover" | |
| 188 | - style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button> | |
| 189 | - </div> | |
| 190 | - </el-form-item> | |
| 191 | - </el-col> | |
| 192 | 13 | </el-row> |
| 193 | 14 | </el-form> |
| 194 | - <el-dialog :visible.sync="addMing" title="选择资源" style="padding: 0;" width="65%" append-to-body center | |
| 195 | - :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"> | |
| 196 | - <div style="max-height:50vh;overflow-y: auto;"> | |
| 197 | - <el-table :data="ziyuanData" tooltip-effect="dark" @row-click="handleSelectionChange" | |
| 198 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" highlight-current-row> | |
| 199 | - <!-- <el-table-column label="选择" type="selection" width="55"> | |
| 200 | - </el-table-column> --> | |
| 201 | - <el-table-column label="序号"> | |
| 202 | - <template slot-scope="scope"> | |
| 203 | - {{scope.$index + 1}} | |
| 204 | - </template> | |
| 205 | - </el-table-column> | |
| 206 | - <el-table-column label="编号" prop="id"> | |
| 207 | - | |
| 208 | - </el-table-column> | |
| 209 | - <el-table-column label="资源名称"> | |
| 210 | - <template slot-scope="scope"> | |
| 211 | - {{scope.row.shopName ? scope.row.shopName : scope.row.advertisingName?scope.row.advertisingName:scope.row.venueName}} | |
| 212 | - </template> | |
| 213 | - </el-table-column> | |
| 214 | - <el-table-column label="资源类型"> | |
| 215 | - <template slot-scope="scope"> | |
| 216 | - {{scope.row.shopName ? '商铺' : scope.row.advertisingType?scope.row.advertisingType:'场地'}} | |
| 217 | - </template> | |
| 218 | - </el-table-column> | |
| 219 | - </el-table> | |
| 220 | - </div> | |
| 221 | - <template #footer> | |
| 222 | - <div style="display: flex; justify-content: flex-end; align-items: center;"> | |
| 223 | - <el-button @click="minSev" style="background-color: #3F9B6A;color: #fff;">确定</el-button> | |
| 224 | - <el-button @click="mingClose" class="buttonHover" | |
| 225 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">取消</el-button> | |
| 226 | - </div> | |
| 227 | - </template> | |
| 228 | - </el-dialog> | |
| 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> | |
| 21 | + </div> | |
| 229 | 22 | </div> |
| 230 | 23 | </template> |
| 231 | - | |
| 232 | 24 | <script> |
| 25 | + import TitleWithCircle from '@/components/top/index'; | |
| 26 | + import mbadd from '@/components/change/mbadd'; | |
| 27 | + import {contractinsertAdd} from '@/api/manage.js' | |
| 233 | 28 | import { |
| 234 | - businessListGetAll, | |
| 235 | - } from '@/api/business' | |
| 236 | - import upimg from "@/components/ImageUpload/index" | |
| 237 | - import { | |
| 238 | - uploadUrl | |
| 239 | - } from '@/utils/request' | |
| 240 | - import { | |
| 241 | - getAlls, | |
| 242 | - changAlls | |
| 243 | - } from '@/api/information.js' | |
| 244 | - import { | |
| 245 | - getAlls as map1 | |
| 246 | - } from '@/api/map1.js' | |
| 247 | - import { | |
| 248 | - miniioupload | |
| 249 | - } from '@/api/commodityLease.js' | |
| 250 | - import { | |
| 251 | - | |
| 252 | - contractinsertAdd | |
| 253 | - } from '@/api/manage.js' | |
| 254 | - import { | |
| 255 | - cerePlatformMerchant | |
| 29 | + cereContractTemplate,cerePlatformMerchant | |
| 256 | 30 | } from '@/api/newly.js' |
| 257 | 31 | import { |
| 258 | - msgedit | |
| 259 | - } from '@/api/cereBusinessInfo' | |
| 260 | - import { | |
| 261 | - AdvertiserInfoEdit | |
| 262 | - } from '@/api/advertisement.js' | |
| 32 | + dataInprotDocument | |
| 33 | + } from '@/api/newly.js' | |
| 34 | +import { add } from '@/api/activityBz'; | |
| 263 | 35 | export default { |
| 264 | 36 | components: { |
| 265 | - upimg | |
| 37 | + TitleWithCircle, | |
| 38 | + mbadd | |
| 266 | 39 | }, |
| 267 | 40 | data() { |
| 268 | 41 | return { |
| 269 | - AddData: [], //最后资源 | |
| 270 | - multipleSelection: [], //资源 | |
| 271 | - addMing: false, | |
| 272 | - ziyuanData: [], | |
| 273 | - shopId: null, | |
| 274 | - hefuData: [], //合同附件 | |
| 275 | - uploadFileUrl: uploadUrl, // 请求地址 | |
| 276 | - shopList: [], | |
| 42 | + mbinfo:{ | |
| 43 | + type:'' | |
| 44 | + }, | |
| 45 | + onmbinfo:{}, | |
| 46 | + mbData:[], | |
| 47 | + list1: [], | |
| 48 | + rulesmbinfo:{ | |
| 49 | + type: [{ | |
| 50 | + required: true, | |
| 51 | + message: '请选择模板', | |
| 52 | + trigger: 'change' | |
| 53 | + }], | |
| 54 | + }, | |
| 55 | + isshow: false, | |
| 277 | 56 | formInline: { |
| 278 | 57 | // 合同类型 |
| 279 | 58 | contractType: '', |
| ... | ... | @@ -310,323 +89,218 @@ |
| 310 | 89 | // 合同附件 |
| 311 | 90 | appendicesContract: '', |
| 312 | 91 | //合同状态 |
| 313 | - dataStatus: '1' | |
| 92 | + dataStatus: '1', | |
| 93 | + //模版信息 | |
| 94 | + templateInformation:'' | |
| 314 | 95 | }, |
| 315 | - rulesHetong: { | |
| 316 | - contractType: [{ | |
| 317 | - required: true, | |
| 318 | - message: '请选择合同类型', | |
| 319 | - trigger: 'change' | |
| 320 | - }], | |
| 321 | - contractNumber: [{ | |
| 322 | - required: true, | |
| 323 | - message: '请输入合同编号', | |
| 324 | - trigger: 'blur' | |
| 325 | - }], | |
| 326 | - sectionNumber: [{ | |
| 327 | - required: true, | |
| 328 | - message: '请输入标段号', | |
| 329 | - trigger: 'blur' | |
| 330 | - }], | |
| 331 | - contractName: [{ | |
| 332 | - required: true, | |
| 333 | - message: '请输入合同名称', | |
| 334 | - trigger: 'blur' | |
| 335 | - }], | |
| 336 | - earnestMoney: [{ | |
| 337 | - required: true, | |
| 338 | - message: '请输入押金', | |
| 339 | - trigger: 'blur' | |
| 340 | - }], | |
| 341 | - contractSigningDate: [{ | |
| 342 | - required: true, | |
| 343 | - message: '请选择签订日期', | |
| 344 | - trigger: 'change' | |
| 345 | - }], | |
| 346 | - contractTerminationDate: [{ | |
| 347 | - required: true, | |
| 348 | - message: '请选择终止日期', | |
| 349 | - trigger: 'change' | |
| 350 | - }], | |
| 351 | - leaseStartDate: [{ | |
| 352 | - required: true, | |
| 353 | - message: '请选择起租日期', | |
| 354 | - trigger: 'change' | |
| 355 | - }], | |
| 356 | - paymentCycle: [{ | |
| 357 | - required: true, | |
| 358 | - message: '请选择付款周期', | |
| 359 | - trigger: 'change' | |
| 360 | - }], | |
| 361 | - contractAmount: [{ | |
| 362 | - required: true, | |
| 363 | - message: '请输入租金', | |
| 364 | - trigger: 'blur' | |
| 365 | - }], | |
| 366 | - paymentDay: [{ | |
| 367 | - required: true, | |
| 368 | - message: '请选择付款日', | |
| 369 | - trigger: 'change' | |
| 370 | - }], | |
| 371 | - tenantName: [{ | |
| 372 | - required: true, | |
| 373 | - message: '请输入承租人名称', | |
| 374 | - trigger: 'blur' | |
| 375 | - }], | |
| 376 | - tenantTelephone: [{ | |
| 377 | - required: true, | |
| 378 | - message: '请输入联系电话', | |
| 379 | - trigger: 'blur' | |
| 380 | - }], | |
| 381 | - tenantBankAccount: [{ | |
| 382 | - required: true, | |
| 383 | - message: '请输入承租人银行账号', | |
| 384 | - trigger: 'blur' | |
| 385 | - }], | |
| 386 | - relatedMerchants: [{ | |
| 387 | - required: true, | |
| 388 | - message: '请选择绑定商家', | |
| 389 | - trigger: 'change' | |
| 390 | - }], | |
| 391 | - shopNumber: [{ | |
| 392 | - required: true, | |
| 393 | - message: '请选择绑定资源', | |
| 394 | - trigger: 'change' | |
| 395 | - }], | |
| 396 | - appendicesContract: [{ | |
| 397 | - required: true, | |
| 398 | - message: '请上传合同附件', | |
| 399 | - trigger: 'blur' | |
| 400 | - }], | |
| 401 | - }, | |
| 402 | - shopfrom: { | |
| 403 | - checkState:'2', | |
| 404 | - pageNumber: 0, | |
| 405 | - pageSize: 1000, | |
| 406 | - }, | |
| 407 | - pageindex: { | |
| 408 | - pageNumber: 0, | |
| 409 | - pageSize: 20, | |
| 410 | - }, | |
| 411 | - baseURL: 'http://192.168.2.38:9003', | |
| 412 | - uploadFiles: [], | |
| 413 | - filesLength: 1 | |
| 414 | - }; | |
| 415 | - }, | |
| 416 | - props: { | |
| 417 | - info: { | |
| 418 | - type: Object, | |
| 419 | - default: {} | |
| 420 | 96 | } |
| 421 | 97 | }, |
| 422 | 98 | async created() { |
| 423 | - console.error({...this.info}) | |
| 424 | - await cerePlatformMerchant(this.shopfrom).then(res => { | |
| 425 | - this.shopList = res.data.content | |
| 426 | - console.error(this.shopList) | |
| 427 | - }) | |
| 428 | - if(this.info.id) { | |
| 429 | - if(this.info.cereBasicInformationShop && this.info.cereBasicInformationShop.id) { | |
| 430 | - this.AddData.push(this.info.cereBasicInformationShop) | |
| 431 | - } | |
| 432 | - if(this.info.cereAdvertisingInformation && this.info.cereAdvertisingInformation.id) { | |
| 433 | - this.AddData.push(this.info.cereAdvertisingInformation) | |
| 434 | - } | |
| 435 | - if(this.info.cereBasicInformationVenue && this.info.cereBasicInformationVenue.id) { | |
| 436 | - this.AddData.push(this.info.cereBasicInformationVenue) | |
| 437 | - } | |
| 438 | - for (let index = 0; index < this.shopList.length; index++) { | |
| 439 | - const element = this.shopList[index]; | |
| 440 | - console.error(element) | |
| 441 | - if(element.phone == this.info.applicant) { | |
| 442 | - this.shopId = element.id+'' | |
| 443 | - this.formInline.relatedMerchants = element.id+'' | |
| 444 | - this.formInline.tenantName = element.name | |
| 445 | - this.formInline.tenantTelephone = element.phone | |
| 446 | - } | |
| 447 | - } | |
| 448 | - } | |
| 99 | + this.getmb() | |
| 449 | 100 | }, |
| 450 | 101 | methods: { |
| 451 | - add() { | |
| 452 | - console.error({ | |
| 453 | - ...this.formInline | |
| 454 | - }) | |
| 455 | - // return | |
| 456 | - console.error(this.AddData) | |
| 457 | - console.error(this.hefuData) | |
| 458 | - // console.error() | |
| 459 | - let c1 = '' | |
| 460 | - for (let i = 0; i < this.hefuData.length; i++) { | |
| 461 | - if (i == 0) { | |
| 462 | - c1 = this.hefuData[i].url | |
| 102 | + async add() { | |
| 103 | + let ismb = false | |
| 104 | + await this.$refs.rulesmbinfoForm.validate((valid) => { | |
| 105 | + if (valid) { | |
| 106 | + ismb = true | |
| 107 | + | |
| 108 | + | |
| 463 | 109 | } else { |
| 464 | - c1 = c1 + ',' + this.hefuData[i].url | |
| 110 | + this.$message({ | |
| 111 | + message: '请填写完整信息', | |
| 112 | + type: 'error' | |
| 113 | + }) | |
| 114 | + ismb = false | |
| 465 | 115 | } |
| 116 | + }) | |
| 117 | + let isjx = await this.$refs.rulesallForm.yanzhen() | |
| 118 | + console.error(ismb,isjx) | |
| 119 | + if(ismb && isjx) { | |
| 120 | + console.error(']]]]]') | |
| 121 | + this.addinfo() | |
| 466 | 122 | } |
| 467 | - let c2 = '' | |
| 468 | - for (let i = 0; i < this.AddData.length; i++) { | |
| 469 | - let cnet = '' | |
| 470 | - if (this.AddData[i].shopName) { | |
| 471 | - cnet = 'sp' + this.AddData[i].id | |
| 472 | - } else if (this.AddData[i].advertisingType) { | |
| 473 | - cnet = 'gg' + this.AddData[i].id | |
| 474 | - } else { | |
| 475 | - cnet = 'cd' + this.AddData[i].id | |
| 123 | + }, | |
| 124 | + close() { | |
| 125 | + this.$emit('removeonaction', '1') | |
| 126 | + }, | |
| 127 | + async addinfo(){ | |
| 128 | + let info1 = {} | |
| 129 | + for (let index = 0; index < this.list1.length; index++) { | |
| 130 | + const element = this.list1[index]; | |
| 131 | + console.error({...element}) | |
| 132 | + if(element.type == '资源') { | |
| 133 | + if(element.value && typeof element.value == 'object') { | |
| 134 | + if (element.value.shopName) { | |
| 135 | + info1.shopNumber = 'sp' + element.value.id | |
| 136 | + } else if (element.value.advertisingType) { | |
| 137 | + info1.shopNumber = 'gg' + element.value.id | |
| 138 | + } else { | |
| 139 | + info1.shopNumber = 'cd' + element.value.id | |
| 140 | + } | |
| 141 | + } | |
| 142 | + }else if(element.type == '商家') { | |
| 143 | + info1.relatedMerchants = element.value | |
| 144 | + } else{ | |
| 145 | + info1[element.key] = element.value+'' | |
| 476 | 146 | } |
| 477 | - if (i == 0) { | |
| 478 | - c2 = cnet | |
| 479 | - } else { | |
| 480 | - c2 = c2 + ',' + cnet | |
| 147 | + | |
| 148 | + } | |
| 149 | + console.error(info1) | |
| 150 | + for (let key in info1) { | |
| 151 | + if (this.formInline.hasOwnProperty(key)) { | |
| 152 | + this.formInline[key] = info1[key]; | |
| 481 | 153 | } |
| 482 | 154 | } |
| 155 | + this.formInline.templateInformation = JSON.stringify(this.list1) | |
| 156 | + let info = await this.culfj() | |
| 157 | + console.error(info) | |
| 158 | + // return | |
| 159 | + let c1 = { | |
| 160 | + documentAddress: "http://172.16.61.237:9000" + this.onmbinfo.templateAttachment, | |
| 161 | + insertData: JSON.stringify(info) | |
| 162 | + } | |
| 163 | + dataInprotDocument(c1).then(res => { | |
| 164 | + console.error(res) | |
| 165 | + if(res.code == 200 && res.data) { | |
| 166 | + this.formInline.appendicesContract = res.data | |
| 167 | + contractinsertAdd({ | |
| 168 | + ...this.formInline, | |
| 169 | + createDate:this.updateCurrentTime(), | |
| 170 | + createUser: localStorage.getItem('roleName') | |
| 171 | + }).then(res => { | |
| 172 | + console.error(res) | |
| 173 | + if (res.code == 200) { | |
| 174 | + this.$message({ | |
| 175 | + message: '添加成功', | |
| 176 | + type: 'success' | |
| 177 | + }) | |
| 178 | + this.$emit('removeonaction', '1') | |
| 179 | + } else { | |
| 180 | + this.$message({ | |
| 181 | + message: res.msg, | |
| 182 | + type: 'error' | |
| 183 | + }) | |
| 184 | + } | |
| 185 | + }) | |
| 186 | + } else { | |
| 187 | + this.$message({ | |
| 188 | + type: 'error', | |
| 189 | + message: '附件生成失败' | |
| 190 | + }) | |
| 483 | 191 | |
| 484 | - if (this.formInline.id) { | |
| 485 | - // this.$refs[formName].validate((valid) => { | |
| 486 | - // console.log(valid) | |
| 487 | - // if (valid) { | |
| 488 | - // contractinsertAdd(this.formInline).then(res => { | |
| 489 | - | |
| 490 | - // }) | |
| 491 | - // } else { | |
| 492 | - // this.$message({ | |
| 493 | - // message: '请填写完整信息', | |
| 494 | - // type: 'error' | |
| 495 | - // }) | |
| 496 | - // return false; | |
| 497 | - // } | |
| 498 | - // }) | |
| 192 | + } | |
| 193 | + }) | |
| 194 | + console.error({...this.formInline}) | |
| 195 | + }, | |
| 196 | + changeRelatedMerchants(e) { | |
| 197 | + console.error(e) | |
| 198 | + this.isshow = false | |
| 199 | + console.error(this.mbData[e]) | |
| 200 | + this.onmbinfo = this.mbData[e] | |
| 201 | + //判断是否是字符串 | |
| 202 | + if (typeof this.mbData[e].otherInfo == 'string') { | |
| 203 | + this.list1 = JSON.parse(this.mbData[e].otherInfo) | |
| 499 | 204 | } else { |
| 500 | - | |
| 501 | - this.formInline.appendicesContract = c1 | |
| 502 | - this.formInline.shopNumber = c2 | |
| 503 | - console.error({ | |
| 504 | - ...this.formInline | |
| 505 | - }) | |
| 506 | - this.$refs.heForm.validate((valid) => { | |
| 507 | - console.log(valid) | |
| 508 | - if (valid) { | |
| 509 | - contractinsertAdd({ | |
| 510 | - ...this.formInline, | |
| 511 | - relatedMerchants: this.shopId, | |
| 512 | - updateUser: localStorage.getItem('roleName') | |
| 205 | + this.list1 = this.mbData[e].otherInfo | |
| 206 | + } | |
| 207 | + //延迟2秒 | |
| 208 | + setTimeout(() => { | |
| 209 | + this.isshow = true | |
| 210 | + }, 100) | |
| 211 | + }, | |
| 212 | + async getmb() { | |
| 213 | + const res = await cereContractTemplate({ pageNumber: 0,pageSize: 100}) | |
| 214 | + this.mbData = res.data.content | |
| 215 | + }, | |
| 216 | + async culfj(){ | |
| 217 | + let info = {} | |
| 218 | + for (let index = 0; index < this.list1.length; index++) { | |
| 219 | + const element = this.list1[index]; | |
| 220 | + // console.error({...element}) | |
| 221 | + if(element.type == '资源') { | |
| 222 | + if(element.value && typeof element.value == 'object') { | |
| 223 | + info['资源名称'] =''+ element.value.shopName?element.value.shopName:element.value.advertisingName?element.value.advertisingName:element.value.venueName?element.value.venueName:'暂无' | |
| 224 | + info['资源类型'] = ''+ element.value.shopName?'商铺':element.value.advertisingType?element.value.advertisingType:element.value.venueName?'场地':'暂无' | |
| 225 | + info['详细地址'] = element.value.detailedLocation?element.value.detailedLocation:'暂无' | |
| 226 | + info['实际使用面积'] = element.value.actualArea?element.value.actualArea:element.value.actualUsableArea?element.value.actualUsableArea:'暂无' | |
| 227 | + } else { | |
| 228 | + info['资源名称'] = '暂无' | |
| 229 | + info['资源类型'] = '暂无' | |
| 230 | + info['详细地址'] = '暂无' | |
| 231 | + info['实际使用面积'] = '暂无' | |
| 232 | + } | |
| 233 | + } else if(element.type == '商家') { | |
| 234 | + if(element.value){ | |
| 235 | + await cerePlatformMerchant({ | |
| 236 | + checkState: '2', | |
| 237 | + pageNumber: 0, | |
| 238 | + pageSize: 1000, | |
| 239 | + id: element.value | |
| 513 | 240 | }).then(res => { |
| 514 | 241 | console.error(res) |
| 515 | - if (res.code == 200) { | |
| 516 | - this.$message({ | |
| 517 | - message: '添加成功', | |
| 518 | - type: 'success' | |
| 519 | - }) | |
| 520 | - if(this.info.id) { | |
| 521 | - if(this.info.cereBasicInformationShop && this.info.cereBasicInformationShop.id) { | |
| 522 | - msgedit({ | |
| 523 | - auditStatus: '4', | |
| 524 | - id: this.info.id, | |
| 525 | - contractNumber: this.formInline.contractNumber | |
| 526 | - }) | |
| 527 | - } | |
| 528 | - if(this.info.cereAdvertisingInformation && this.info.cereAdvertisingInformation.id) { | |
| 529 | - AdvertiserInfoEdit({ | |
| 530 | - auditStatus: '4', | |
| 531 | - id: this.info.id, | |
| 532 | - contractId: this.formInline.contractNumber | |
| 533 | - }).then(item => { | |
| 534 | - this.getAll() | |
| 535 | - }) | |
| 536 | - } | |
| 537 | - if(this.info.cereBasicInformationVenue && this.info.cereBasicInformationVenue.id) { | |
| 538 | - msgedit({ | |
| 539 | - auditStatus: '4', | |
| 540 | - id: this.info.id, | |
| 541 | - contractNumber: this.formInline.contractNumber | |
| 542 | - }) | |
| 543 | - } | |
| 544 | - | |
| 545 | - } | |
| 546 | - this.$emit('removeonaction', '1') | |
| 547 | - } else { | |
| 548 | - this.$message({ | |
| 549 | - message: res.msg, | |
| 550 | - type: 'error' | |
| 551 | - }) | |
| 552 | - } | |
| 553 | - | |
| 242 | + info[element.name] = res.data.content.length>0?res.data.content[0].name:'暂无' | |
| 554 | 243 | }) |
| 555 | 244 | } else { |
| 556 | - this.$message({ | |
| 557 | - message: '请填写完整信息', | |
| 558 | - type: 'error' | |
| 559 | - }) | |
| 560 | - return false; | |
| 245 | + info[element.name] = '暂无' | |
| 561 | 246 | } |
| 562 | - }) | |
| 563 | - | |
| 247 | + | |
| 248 | + } else{ | |
| 249 | + info[element.name] = element.value?element.value+'':'暂无' | |
| 250 | + } | |
| 251 | + | |
| 564 | 252 | } |
| 253 | + return info | |
| 565 | 254 | }, |
| 566 | - close() { | |
| 567 | - this.$emit('removeonaction', '1') | |
| 255 | + async ylht(){ | |
| 256 | + let info = await this.culfj() | |
| 257 | + console.error(info) | |
| 258 | + let c1 = { | |
| 259 | + documentAddress: "http://172.16.61.237:9000" + this.onmbinfo.templateAttachment, | |
| 260 | + insertData: JSON.stringify(info) | |
| 261 | + } | |
| 262 | + dataInprotDocument(c1).then(res => { | |
| 263 | + console.error(res) | |
| 264 | + if(res.code == 200 && res.data) { | |
| 265 | + this.openfile(this.$baseURL+res.data) | |
| 266 | + } else { | |
| 267 | + this.$message({ | |
| 268 | + type: 'error', | |
| 269 | + message: '预览失败' | |
| 270 | + }) | |
| 271 | + | |
| 272 | + } | |
| 273 | + }) | |
| 568 | 274 | }, |
| 569 | - MingDelete(item) { | |
| 570 | - this.AddData.splice(item, 1); | |
| 275 | + openfile(e) { | |
| 276 | + if (e) { | |
| 277 | + const fullUrl = e; | |
| 278 | + try { | |
| 279 | + window.open(fullUrl, '_blank'); // 在新标签页中打开文件 | |
| 280 | + } catch (error) { | |
| 281 | + console.error('打开文件失败:', error); | |
| 282 | + } | |
| 283 | + } else { | |
| 284 | + console.error('无文件可查看'); | |
| 285 | + } | |
| 571 | 286 | }, |
| 572 | 287 | async mingShow() { |
| 573 | - const ziyuan = await getAlls(this.pageindex) | |
| 574 | - const ggw = await map1(this.pageindex) | |
| 575 | - const changdi = await changAlls(this.pageindex) | |
| 576 | - this.ziyuanData = [...ziyuan.data.content, ...ggw.data.content, ...changdi.data.content] | |
| 577 | - console.error(this.ziyuanData) | |
| 578 | - this.addMing = true | |
| 579 | - }, | |
| 580 | - handleSelectionChange(selection) { | |
| 581 | - // 处理选择变化的逻辑 | |
| 582 | - console.error(selection) | |
| 583 | - this.multipleSelection= [] | |
| 584 | - this.multipleSelection.push(selection) | |
| 288 | + this.addzy = true | |
| 585 | 289 | }, |
| 586 | - minSev() { | |
| 587 | - // this.AddData = this.multipleSelection | |
| 588 | - const filteredAddData = this.AddData.filter(itemAdd => { | |
| 589 | - // 使用 some 方法检查 this.multipleSelection 中是否存在具有相同 id 的元素 | |
| 590 | - return !this.multipleSelection.some(itemMultiple => itemMultiple.id === itemAdd.id); | |
| 591 | - }); | |
| 592 | - this.AddData = filteredAddData.concat(this.multipleSelection) | |
| 593 | - this.addMing = false | |
| 594 | - this.multipleSelection = [] | |
| 290 | + //获取当前时间 | |
| 291 | + updateCurrentTime() { | |
| 292 | + const now = new Date(); | |
| 293 | + const year = now.getFullYear(); | |
| 294 | + const month = (now.getMonth() + 1).toString().padStart(2, '0'); | |
| 295 | + const day = now.getDate().toString().padStart(2, '0'); | |
| 296 | + const hours = now.getHours().toString().padStart(2, '0'); | |
| 297 | + const minutes = now.getMinutes().toString().padStart(2, '0'); | |
| 298 | + const seconds = now.getSeconds().toString().padStart(2, '0'); | |
| 595 | 299 | |
| 300 | + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | |
| 596 | 301 | }, |
| 597 | - mingClose() { | |
| 598 | - this.multipleSelection = [] | |
| 599 | - this.ziyuanData = [] | |
| 600 | - this.addMing = false | |
| 601 | - }, | |
| 602 | - changeRelatedMerchants(e) { | |
| 603 | - console.error(e) | |
| 604 | - this.shopId = this.shopList[e].id | |
| 605 | - this.formInline.tenantName = this.shopList[e].name | |
| 606 | - this.formInline.tenantTelephone = this.shopList[e].phone | |
| 607 | - }, | |
| 608 | - hefuRemove() { | |
| 609 | - this.hefuData = [] | |
| 610 | - }, | |
| 611 | - hefuSuccess(response, file, fileList) { | |
| 612 | - this.hefuData = [] | |
| 613 | - console.error(response) | |
| 614 | - let fd = new FormData() | |
| 615 | - fd.append('file', response.raw) | |
| 616 | - fd.append('filePath', 'hetong') | |
| 617 | - miniioupload(fd).then(res => { | |
| 618 | - console.error(res) | |
| 619 | - const fileMsg = { | |
| 620 | - name: response.name, | |
| 621 | - url: res.data, | |
| 622 | - } | |
| 623 | - this.hefuData.push(fileMsg) | |
| 624 | - }) | |
| 625 | - }, | |
| 626 | - | |
| 627 | - | |
| 628 | - }, | |
| 629 | - }; | |
| 302 | + } | |
| 303 | + } | |
| 630 | 304 | </script> |
| 631 | 305 | <style lang="css"> |
| 632 | 306 | .el-upload { |
| ... | ... | @@ -644,4 +318,11 @@ |
| 644 | 318 | font-size: 15px; |
| 645 | 319 | color: #303133; |
| 646 | 320 | } |
| 321 | + | |
| 322 | + .iterem { | |
| 323 | + z-index: 99; | |
| 324 | + margin-left: 10px; | |
| 325 | + height: 40px; | |
| 326 | + line-height: 25px; | |
| 327 | + } | |
| 647 | 328 | </style> | ... | ... |
admin-web-master/src/components/add/addmb copy.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div> | |
| 3 | + <el-form :model="forminfo" :rules="rulesmb" ref="ruleForm1" label-width="130px" class="demo-ruleForm"> | |
| 4 | + <el-row :gutter="20"> | |
| 5 | + <el-col :span="12" > | |
| 6 | + <el-form-item label="模版名称" prop="templateName"> | |
| 7 | + <el-input v-model="forminfo.templateName" placeholder="请输入" maxlength="20"></el-input> | |
| 8 | + </el-form-item> | |
| 9 | + </el-col> | |
| 10 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 11 | + <el-form-item label="word模板" prop="templateAttachment" :style="forminfo.templateAttachment?'width: 100%;':''"> | |
| 12 | + <upfile :accept="'.docx,.doc'" filePath="mb" inputtype="templateAttachment" :value="forminfo.templateAttachment" | |
| 13 | + @changimg="e=>changimg(e,'templateAttachment')"></upfile> | |
| 14 | + | |
| 15 | + </el-form-item> | |
| 16 | + <div v-if="!forminfo.templateAttachment" class="greens tableBtn iterem" @click.stop="openfile($baseURL+'/zsfwzxt/mb/fa0cc984-e1ac-474e-a579-89ea79cc9b8e-ces合同.docx')">模版文件</div> | |
| 17 | + </el-col> | |
| 18 | + </el-row> | |
| 19 | + </el-form> | |
| 20 | + <el-form :model="formInline" :rules="rulesHetong" ref="ruleForm" label-width="130px" class="demo-ruleForm"> | |
| 21 | + <TitleWithCircle title="合同信息" style="margin-left: 65px;margin-bottom: 30px;" /> | |
| 22 | + <el-row :gutter="20"> | |
| 23 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 24 | + <el-form-item label="合同类型" prop="contractType" style="width: calc(100% - 35px)"> | |
| 25 | + <el-select v-model="formInline.contractType" placeholder="请选择" style="width: 100%;"> | |
| 26 | + <el-option label="商铺合同" value="商铺合同"></el-option> | |
| 27 | + <el-option label="广告位合同" value="广告位合同"></el-option> | |
| 28 | + <el-option label="场地合同" value="场地合同"></el-option> | |
| 29 | + </el-select> | |
| 30 | + </el-form-item> | |
| 31 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('合同类型')"></i> | |
| 32 | + </el-col> | |
| 33 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 34 | + <el-form-item label="合同编号" prop="contractNumber" style="width: calc(100% - 35px)"> | |
| 35 | + <el-input v-model="formInline.contractNumber" placeholder="请输入" maxlength="20"></el-input> | |
| 36 | + </el-form-item> | |
| 37 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('合同编号')"></i> | |
| 38 | + </el-col> | |
| 39 | + </el-row> | |
| 40 | + <el-row :gutter="20"> | |
| 41 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 42 | + <el-form-item label="标段号" prop="sectionNumber" style="width: calc(100% - 35px)"> | |
| 43 | + <el-input v-model="formInline.sectionNumber" placeholder="请输入" maxlength="20"></el-input> | |
| 44 | + </el-form-item> | |
| 45 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('标段号')"></i> | |
| 46 | + </el-col> | |
| 47 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 48 | + <el-form-item label="合同名称" prop="contractName" style="width: calc(100% - 35px)"> | |
| 49 | + <el-input v-model="formInline.contractName" placeholder="请输入" maxlength="50"></el-input> | |
| 50 | + </el-form-item> | |
| 51 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('合同名称')"></i> | |
| 52 | + </el-col> | |
| 53 | + </el-row> | |
| 54 | + <el-row :gutter="20"> | |
| 55 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 56 | + <el-form-item label="合同签订日期" prop="contractSigningDate" style="width: calc(100% - 35px)"> | |
| 57 | + <el-date-picker v-model="formInline.contractSigningDate" type="date" value-format="yyyy-MM-dd" | |
| 58 | + placeholder="选择日期" style="width: 100%;"> | |
| 59 | + </el-date-picker> | |
| 60 | + </el-form-item> | |
| 61 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('合同签订日期')"></i> | |
| 62 | + </el-col> | |
| 63 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 64 | + <el-form-item label="押金" prop="earnestMoney" style="width: calc(100% - 35px)"> | |
| 65 | + <el-input v-model="formInline.earnestMoney" placeholder="请输入" maxlength="20"></el-input> | |
| 66 | + </el-form-item> | |
| 67 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('押金')"></i> | |
| 68 | + </el-col> | |
| 69 | + </el-row> | |
| 70 | + <el-row :gutter="20"> | |
| 71 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 72 | + <el-form-item label="起租日期" prop="leaseStartDate" style="width: calc(100% - 35px)"> | |
| 73 | + <el-date-picker v-model="formInline.leaseStartDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" | |
| 74 | + style="width: 100%;"> | |
| 75 | + </el-date-picker> | |
| 76 | + </el-form-item> | |
| 77 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('起租日期')"></i> | |
| 78 | + </el-col> | |
| 79 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 80 | + <el-form-item label="终止日期" prop="contractTerminationDate" style="width: calc(100% - 35px)"> | |
| 81 | + <el-date-picker v-model="formInline.contractTerminationDate" type="date" value-format="yyyy-MM-dd" | |
| 82 | + placeholder="选择日期" style="width: 100%;"> | |
| 83 | + </el-date-picker> | |
| 84 | + </el-form-item> | |
| 85 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('终止日期')"></i> | |
| 86 | + </el-col> | |
| 87 | + </el-row> | |
| 88 | + <el-row :gutter="20"> | |
| 89 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 90 | + <el-form-item label="付款周期" prop="paymentCycle" style="width: calc(100% - 35px)"> | |
| 91 | + <el-select v-model="formInline.paymentCycle" placeholder="请选择" style="width: 100%;"> | |
| 92 | + <el-option label="按年" value="按年"></el-option> | |
| 93 | + <el-option label="按月" value="按月"></el-option> | |
| 94 | + <el-option label="按日" value="按日"></el-option> | |
| 95 | + <el-option label="季度" value="季度"></el-option> | |
| 96 | + </el-select> | |
| 97 | + </el-form-item> | |
| 98 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('付款周期')"></i> | |
| 99 | + </el-col> | |
| 100 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 101 | + <el-form-item label="租金" prop="contractAmount" style="width: calc(100% - 35px)"> | |
| 102 | + <el-input v-model="formInline.contractAmount" placeholder="请输入" maxlength="20"></el-input> | |
| 103 | + </el-form-item> | |
| 104 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('租金')"></i> | |
| 105 | + </el-col> | |
| 106 | + </el-row> | |
| 107 | + <el-row :gutter="20"> | |
| 108 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 109 | + <el-form-item label="付款日" prop="paymentDay" style="width: calc(100% - 35px)"> | |
| 110 | + <el-select v-model="formInline.paymentDay" placeholder="请选择" style="width: 100%;"> | |
| 111 | + <el-option :label="val+'号'" :value="val+'号'" v-for="val in 31"></el-option> | |
| 112 | + </el-select> | |
| 113 | + </el-form-item> | |
| 114 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('付款日')"></i> | |
| 115 | + </el-col> | |
| 116 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 117 | + <el-form-item label="承租人银行账号" prop="tenantBankAccount" style="width: calc(100% - 35px)"> | |
| 118 | + <el-input v-model="formInline.tenantBankAccount" placeholder="请输入" maxlength="20"></el-input> | |
| 119 | + </el-form-item> | |
| 120 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('承租人银行账号')"></i> | |
| 121 | + </el-col> | |
| 122 | + </el-row> | |
| 123 | + <!-- <el-form-item label="绑定商家" prop="relatedMerchants" > | |
| 124 | + <el-select style="width: 100%;" v-model="formInline.relatedMerchants" placeholder="请输入关键词搜索" filterable | |
| 125 | + @change="changeRelatedMerchants "> | |
| 126 | + <el-option v-for="(item,index) in shopList" :key="index" :label="item.name+ ' ' + item.phone" | |
| 127 | + :value="item.id+''" /> | |
| 128 | + </el-select> | |
| 129 | + </el-form-item> --> | |
| 130 | + <el-row :gutter="20"> | |
| 131 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 132 | + <el-form-item label="承租人名称" prop="tenantName" style="width: calc(100% - 35px)"> | |
| 133 | + <el-input v-model="formInline.tenantName" placeholder="请输入" maxlength="20"></el-input> | |
| 134 | + </el-form-item> | |
| 135 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('承租人名称')"></i> | |
| 136 | + </el-col> | |
| 137 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 138 | + <el-form-item label="联系电话" prop="tenantTelephone" style="width: calc(100% - 35px)"> | |
| 139 | + <el-input v-model="formInline.tenantTelephone" placeholder="请输入" maxlength="20"></el-input> | |
| 140 | + </el-form-item> | |
| 141 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit('联系电话')"></i> | |
| 142 | + </el-col> | |
| 143 | + </el-row> | |
| 144 | + <el-row :gutter="20"> | |
| 145 | + <el-col :span="24"> | |
| 146 | + <el-form-item label="绑定资源" prop="shopNumber"> | |
| 147 | + <div style="border: 1px solid #E5E5E5;padding: 1px" id="huodong"> | |
| 148 | + <div | |
| 149 | + style="font-size: 14px;border-bottom: 1px solid #E5E5E5;display: flex;justify-content: space-between;line-height:20px;background:#F2F3F5;"> | |
| 150 | + <div></div> | |
| 151 | + <!-- @click="mingShow" --> | |
| 152 | + <div v-if="AddData.length != 1" style="color: #3F9B6A;padding:10px;" > | |
| 153 | + 添加 | |
| 154 | + </div> | |
| 155 | + </div> | |
| 156 | + <div style="padding: 15px;"> | |
| 157 | + <div style="padding: 0px 20px 0px 0px"> | |
| 158 | + <el-table :data="[{}]" | |
| 159 | + :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"> | |
| 160 | + <el-table-column label="序号"> | |
| 161 | + <template slot-scope="scope"> | |
| 162 | + {{scope.$index + 1}} | |
| 163 | + | |
| 164 | + </template> | |
| 165 | + </el-table-column> | |
| 166 | + <el-table-column label="资源名称"> | |
| 167 | + <template slot-scope="scope"> | |
| 168 | + <div style="display: flex;"> | |
| 169 | + <div>资源名称</div> | |
| 170 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('资源名称')"></i> | |
| 171 | + </div> | |
| 172 | + </template> | |
| 173 | + </el-table-column> | |
| 174 | + <el-table-column label="资源类型"> | |
| 175 | + <template slot-scope="scope"> | |
| 176 | + <div style="display: flex;"> | |
| 177 | + <div>资源类型</div> | |
| 178 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('资源类型')"></i> | |
| 179 | + </div> | |
| 180 | + </template> | |
| 181 | + </el-table-column> | |
| 182 | + | |
| 183 | + <el-table-column label="详细地址"> | |
| 184 | + <template slot-scope="scope"> | |
| 185 | + <div style="display: flex;"> | |
| 186 | + <div>详细地址</div> | |
| 187 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('详细地址')"></i> | |
| 188 | + </div> | |
| 189 | + </template> | |
| 190 | + </el-table-column> | |
| 191 | + | |
| 192 | + <el-table-column prop="notes" label="实际使用面积"> | |
| 193 | + <template slot-scope="scope"> | |
| 194 | + <div style="display: flex;"> | |
| 195 | + <div>实际使用面积</div> | |
| 196 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('实际使用面积')"></i> | |
| 197 | + </div> | |
| 198 | + </template> | |
| 199 | + | |
| 200 | + </el-table-column> | |
| 201 | + <!-- <el-table-column label="操作" min-width="15%"> | |
| 202 | + <template slot-scope="scope"> | |
| 203 | + <div @click="MingDelete(scope.$index)" class="tableBtn greens">删除</div> | |
| 204 | + </template> | |
| 205 | + </el-table-column> --> | |
| 206 | + </el-table> | |
| 207 | + </div> | |
| 208 | + </div> | |
| 209 | + </div> | |
| 210 | + </el-form-item> | |
| 211 | + </el-col> | |
| 212 | + </el-row> | |
| 213 | + </el-form> | |
| 214 | + <TitleWithCircle title="其他信息管理" style="margin-left: 65px;" /> | |
| 215 | + <div > | |
| 216 | + <el-form style="margin-top: 20px;" ref="ruleForm" :rules="ruleAddData" label-width="130px" class="demo-ruleForm"> | |
| 217 | + <el-row :gutter="20"> | |
| 218 | + <el-col :span="item.width == '50%(半行)'?12:item.width == '100%(一行)'?24:12" v-for="(item,index) in AddData" style="display: flex;align-items: center;"> | |
| 219 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '单行文本'" style="width: calc(100% - 35px)"> | |
| 220 | + <el-input v-model="item.value" placeholder="请输入" :maxlength="item.length"></el-input> | |
| 221 | + </el-form-item> | |
| 222 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '多行文本'" style="width: calc(100% - 35px)"> | |
| 223 | + <el-input show-word-limit rows="4" v-model="item.value" placeholder="请输入" type="textarea" :maxlength="item.length"/> | |
| 224 | + </el-form-item> | |
| 225 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '日期'" style="width: calc(100% - 35px)"> | |
| 226 | + <el-date-picker v-model="item.value" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;"></el-date-picker> | |
| 227 | + </el-form-item> | |
| 228 | + <i class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit(item.name)"></i> | |
| 229 | + </el-col> | |
| 230 | + </el-row> | |
| 231 | + </el-form> | |
| 232 | + </div> | |
| 233 | + <div style="margin-left: 65px;"> | |
| 234 | + <el-button @click="mingShow()" style="background-color: #3F9B6A;color: #fff;">添加</el-button> | |
| 235 | + </div> | |
| 236 | + <div style="margin-top: 20px;margin-left: 65px;"> | |
| 237 | + <div style="padding: 0px 20px 0px 0px"> | |
| 238 | + <el-table :data="AddData" | |
| 239 | + :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"> | |
| 240 | + <el-table-column label="字段排序"> | |
| 241 | + <template slot-scope="scope"> | |
| 242 | + {{scope.$index + 1}} | |
| 243 | + </template> | |
| 244 | + </el-table-column> | |
| 245 | + <el-table-column prop="notes" label="字段名称"> | |
| 246 | + <template slot-scope="scope"> | |
| 247 | + {{scope.row.name?scope.row.name : '-'}} | |
| 248 | + </template> | |
| 249 | + </el-table-column> | |
| 250 | + <el-table-column prop="notes" label="字段key"> | |
| 251 | + <template slot-scope="scope"> | |
| 252 | + {{scope.row.key?scope.row.key : '-'}} | |
| 253 | + </template> | |
| 254 | + </el-table-column> | |
| 255 | + <el-table-column prop="notes" label="字段类型"> | |
| 256 | + <template slot-scope="scope"> | |
| 257 | + {{scope.row.type?scope.row.type : '-'}} | |
| 258 | + </template> | |
| 259 | + </el-table-column> | |
| 260 | + <el-table-column prop="notes" label="是否必填"> | |
| 261 | + <template slot-scope="scope"> | |
| 262 | + {{scope.row.isrequired?scope.row.isrequired : '-'}} | |
| 263 | + </template> | |
| 264 | + </el-table-column> | |
| 265 | + <el-table-column prop="notes" label="字段宽度"> | |
| 266 | + <template slot-scope="scope"> | |
| 267 | + {{scope.row.width?scope.row.width : '-'}} | |
| 268 | + </template> | |
| 269 | + </el-table-column> | |
| 270 | + <el-table-column prop="notes" label="限制规则"> | |
| 271 | + <template slot-scope="scope"> | |
| 272 | + {{scope.row.length?scope.row.length : '-'}} | |
| 273 | + </template> | |
| 274 | + </el-table-column> | |
| 275 | + <el-table-column label="操作"> | |
| 276 | + <template slot-scope="scope"> | |
| 277 | + <div @click="MingDelete(scope.$index)" class="tableBtn greens">删除</div> | |
| 278 | + </template> | |
| 279 | + </el-table-column> | |
| 280 | + </el-table> | |
| 281 | + </div> | |
| 282 | + </div> | |
| 283 | + <div v-if="info.id" style="margin-top: 20px;margin-left: 65px;"> | |
| 284 | + <el-button @click="close()" class="buttonHover" | |
| 285 | + style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">返回</el-button> | |
| 286 | + </div> | |
| 287 | + <div v-else style="margin-top: 20px;margin-left: 65px;"> | |
| 288 | + <el-button @click="add()" style="background-color: #3F9B6A;color: #fff;">确定</el-button> | |
| 289 | + <el-button @click="close()" class="buttonHover" | |
| 290 | + style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button> | |
| 291 | + </div> | |
| 292 | + <el-dialog :visible.sync="addMing" title="添加" style="padding: 0;z-index: 9999999;" width="50%" append-to-body center | |
| 293 | + :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"> | |
| 294 | + <div v-if="addMing"> | |
| 295 | + <el-form :model="addmbitem" :rules="ruleaddmbitem" ref="addmbitem" label-width="130px" class="demo-ruleForm"> | |
| 296 | + <el-form-item label="字段名称" prop="name"> | |
| 297 | + <el-input v-model="addmbitem.name" placeholder="请输入" maxlength="20"></el-input> | |
| 298 | + </el-form-item> | |
| 299 | + <el-form-item label="字段key" prop="key"> | |
| 300 | + <el-input v-model="addmbitem.key" placeholder="请输入" maxlength="20"></el-input> | |
| 301 | + </el-form-item> | |
| 302 | + <el-form-item label="字段类型" prop="type"> | |
| 303 | + <el-select v-model="addmbitem.type" placeholder="请选择" style="width: 100%;"> | |
| 304 | + <el-option label="单行文本" value="单行文本"></el-option> | |
| 305 | + <el-option label="多行文本" value="多行文本"></el-option> | |
| 306 | + <el-option label="日期" value="日期"></el-option> | |
| 307 | + </el-select> | |
| 308 | + </el-form-item> | |
| 309 | + <el-form-item label="是否必填" prop="isrequired"> | |
| 310 | + <el-select v-model="addmbitem.isrequired" placeholder="请选择" style="width: 100%;"> | |
| 311 | + <el-option label="是" value="是"></el-option> | |
| 312 | + <el-option label="否" value="否"></el-option> | |
| 313 | + </el-select> | |
| 314 | + </el-form-item> | |
| 315 | + <el-form-item label="字段宽度" prop="width"> | |
| 316 | + <el-select v-model="addmbitem.width" placeholder="请选择" style="width: 100%;"> | |
| 317 | + <el-option label="50%(半行)" value="50%(半行)"></el-option> | |
| 318 | + <el-option label="100%(一行)" value="100%(一行)"></el-option> | |
| 319 | + </el-select> | |
| 320 | + </el-form-item> | |
| 321 | + <el-form-item label="限制规则" prop="length"> | |
| 322 | + <el-input v-model.number="addmbitem.length" placeholder="请输入" maxlength="20"></el-input> | |
| 323 | + </el-form-item> | |
| 324 | + </el-form> | |
| 325 | + </div> | |
| 326 | + <template #footer> | |
| 327 | + <div style="display: flex; justify-content: flex-end; align-items: center;"> | |
| 328 | + <el-button @click="minSev" style="background-color: #3F9B6A;color: #fff;">确定</el-button> | |
| 329 | + <el-button @click="mingClose" class="buttonHover" | |
| 330 | + style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">取消</el-button> | |
| 331 | + </div> | |
| 332 | + </template> | |
| 333 | + </el-dialog> | |
| 334 | + </div> | |
| 335 | +</template> | |
| 336 | + | |
| 337 | +<script> | |
| 338 | + import { | |
| 339 | + businessListGetAll, | |
| 340 | + } from '@/api/business' | |
| 341 | + import upimg from "@/components/ImageUpload/index" | |
| 342 | + import TitleWithCircle from '@/components/top/index'; | |
| 343 | + import { | |
| 344 | + uploadUrl | |
| 345 | + } from '@/utils/request' | |
| 346 | + import { | |
| 347 | + getAlls, | |
| 348 | + changAlls | |
| 349 | + } from '@/api/information.js' | |
| 350 | + import { | |
| 351 | + getAlls as map1 | |
| 352 | + } from '@/api/map1.js' | |
| 353 | + import { | |
| 354 | + miniioupload | |
| 355 | + } from '@/api/commodityLease.js' | |
| 356 | + import { | |
| 357 | + | |
| 358 | + contractinsertAdd | |
| 359 | + } from '@/api/manage.js' | |
| 360 | + import { | |
| 361 | + cerePlatformMerchant, | |
| 362 | + cereContractTemplateadd | |
| 363 | + } from '@/api/newly.js' | |
| 364 | + import { | |
| 365 | + msgedit | |
| 366 | + } from '@/api/cereBusinessInfo' | |
| 367 | + import { | |
| 368 | + AdvertiserInfoEdit | |
| 369 | + } from '@/api/advertisement.js' | |
| 370 | + import upfile from "@/components/fujianUpload/fujianList" | |
| 371 | +import { copy } from '@/api/activityBz'; | |
| 372 | + export default { | |
| 373 | + components: { | |
| 374 | + upfile, | |
| 375 | + upimg, | |
| 376 | + TitleWithCircle | |
| 377 | + }, | |
| 378 | + data() { | |
| 379 | + return { | |
| 380 | + rulesmb:{ | |
| 381 | + templateName: [{ | |
| 382 | + required: true, | |
| 383 | + message: '请填写模版名称', | |
| 384 | + trigger: 'change' | |
| 385 | + }], | |
| 386 | + templateAttachment: [{ | |
| 387 | + required: true, | |
| 388 | + message: '请上传word模板', | |
| 389 | + trigger: 'change' | |
| 390 | + }], | |
| 391 | + }, | |
| 392 | + forminfo:{ | |
| 393 | + templateName: '', // 模板名称 | |
| 394 | + templateAttachment: '', // 模板附件路径或名称 | |
| 395 | + otherInfo: '', // 其他信息 | |
| 396 | + templateType: '', // 模板类型 | |
| 397 | + creator: '', // 创建人 | |
| 398 | + createTime: '', // 创建时间 | |
| 399 | + remark1: '', // 备注1 | |
| 400 | + remark2: '' // 备注2 | |
| 401 | + }, | |
| 402 | + ruleAddData:{}, | |
| 403 | + ruleaddmbitem:{ | |
| 404 | + name: [{ | |
| 405 | + required: true, | |
| 406 | + message: '请填写字段名称', | |
| 407 | + trigger: 'change' | |
| 408 | + }], | |
| 409 | + key: [{ | |
| 410 | + required: true, | |
| 411 | + message: '请填写字段key', | |
| 412 | + trigger: 'change' | |
| 413 | + }], | |
| 414 | + type: [{ | |
| 415 | + required: true, | |
| 416 | + message: '请选择字段类型', | |
| 417 | + trigger: 'change' | |
| 418 | + }], | |
| 419 | + isrequired: [{ | |
| 420 | + required: true, | |
| 421 | + message: '请选择是否必填', | |
| 422 | + trigger: 'change' | |
| 423 | + }], | |
| 424 | + width: [{ | |
| 425 | + required: true, | |
| 426 | + message: '请选择字段宽度', | |
| 427 | + trigger: 'change' | |
| 428 | + }], | |
| 429 | + length: [{ | |
| 430 | + required: true, | |
| 431 | + message: '请填写限制规则', | |
| 432 | + trigger: 'change' | |
| 433 | + }], | |
| 434 | + }, | |
| 435 | + addmbitem: { | |
| 436 | + name: '', | |
| 437 | + key: '', | |
| 438 | + type: '', | |
| 439 | + isrequired: '', | |
| 440 | + width: '', | |
| 441 | + length: '', | |
| 442 | + value: '', | |
| 443 | + }, | |
| 444 | + AddData: [], //最后资源 | |
| 445 | + multipleSelection: [], //资源 | |
| 446 | + addMing: false, | |
| 447 | + ziyuanData: [], | |
| 448 | + shopId: null, | |
| 449 | + hefuData: [], //合同附件 | |
| 450 | + uploadFileUrl: uploadUrl, // 请求地址 | |
| 451 | + shopList: [], | |
| 452 | + formInline: { | |
| 453 | + // 合同类型 | |
| 454 | + contractType: '', | |
| 455 | + // 合同编号 | |
| 456 | + contractNumber: '', | |
| 457 | + // 标段号 | |
| 458 | + sectionNumber: '', | |
| 459 | + // 合同名称 | |
| 460 | + contractName: '', | |
| 461 | + // 押金 | |
| 462 | + earnestMoney: '', | |
| 463 | + // 合同签订日期 | |
| 464 | + contractSigningDate: '', | |
| 465 | + // 合同终止日期 | |
| 466 | + contractTerminationDate: '', | |
| 467 | + // 起租日期 | |
| 468 | + leaseStartDate: '', | |
| 469 | + // 付款周期 | |
| 470 | + paymentCycle: '', | |
| 471 | + // 合同金额(租金) | |
| 472 | + contractAmount: '', | |
| 473 | + // 付款日 | |
| 474 | + paymentDay: '', | |
| 475 | + // 承租人名称 | |
| 476 | + tenantName: '', | |
| 477 | + // 承租人联系电话 | |
| 478 | + tenantTelephone: '', | |
| 479 | + // 承租人银行账号 | |
| 480 | + tenantBankAccount: '', | |
| 481 | + // 关联商家 | |
| 482 | + relatedMerchants: '', | |
| 483 | + // 商铺编号(绑定资源) | |
| 484 | + shopNumber: '', | |
| 485 | + // 合同附件 | |
| 486 | + appendicesContract: '', | |
| 487 | + //合同状态 | |
| 488 | + dataStatus: '1' | |
| 489 | + }, | |
| 490 | + rulesHetong: { | |
| 491 | + contractType: [{ | |
| 492 | + required: true, | |
| 493 | + message: '请选择合同类型', | |
| 494 | + trigger: 'change' | |
| 495 | + }], | |
| 496 | + contractNumber: [{ | |
| 497 | + required: true, | |
| 498 | + message: '请输入合同编号', | |
| 499 | + trigger: 'change' | |
| 500 | + }], | |
| 501 | + sectionNumber: [{ | |
| 502 | + required: true, | |
| 503 | + message: '请输入标段号', | |
| 504 | + trigger: 'change' | |
| 505 | + }], | |
| 506 | + contractName: [{ | |
| 507 | + required: true, | |
| 508 | + message: '请输入合同名称', | |
| 509 | + trigger: 'change' | |
| 510 | + }], | |
| 511 | + earnestMoney: [{ | |
| 512 | + required: true, | |
| 513 | + message: '请输入押金', | |
| 514 | + trigger: 'change' | |
| 515 | + }], | |
| 516 | + contractSigningDate: [{ | |
| 517 | + required: true, | |
| 518 | + message: '请选择签订日期', | |
| 519 | + trigger: 'change' | |
| 520 | + }], | |
| 521 | + contractTerminationDate: [{ | |
| 522 | + required: true, | |
| 523 | + message: '请选择终止日期', | |
| 524 | + trigger: 'change' | |
| 525 | + }], | |
| 526 | + leaseStartDate: [{ | |
| 527 | + required: true, | |
| 528 | + message: '请选择起租日期', | |
| 529 | + trigger: 'change' | |
| 530 | + }], | |
| 531 | + paymentCycle: [{ | |
| 532 | + required: true, | |
| 533 | + message: '请选择付款周期', | |
| 534 | + trigger: 'change' | |
| 535 | + }], | |
| 536 | + contractAmount: [{ | |
| 537 | + required: true, | |
| 538 | + message: '请输入租金', | |
| 539 | + trigger: 'change' | |
| 540 | + }], | |
| 541 | + paymentDay: [{ | |
| 542 | + required: true, | |
| 543 | + message: '请选择付款日', | |
| 544 | + trigger: 'change' | |
| 545 | + }], | |
| 546 | + tenantName: [{ | |
| 547 | + required: true, | |
| 548 | + message: '请输入承租人名称', | |
| 549 | + trigger: 'change' | |
| 550 | + }], | |
| 551 | + tenantTelephone: [{ | |
| 552 | + required: true, | |
| 553 | + message: '请输入联系电话', | |
| 554 | + trigger: 'change' | |
| 555 | + }], | |
| 556 | + tenantBankAccount: [{ | |
| 557 | + required: true, | |
| 558 | + message: '请输入承租人银行账号', | |
| 559 | + trigger: 'change' | |
| 560 | + }], | |
| 561 | + relatedMerchants: [{ | |
| 562 | + required: true, | |
| 563 | + message: '请选择绑定商家', | |
| 564 | + trigger: 'change' | |
| 565 | + }], | |
| 566 | + shopNumber: [{ | |
| 567 | + required: true, | |
| 568 | + message: '请选择绑定资源', | |
| 569 | + trigger: 'change' | |
| 570 | + }], | |
| 571 | + appendicesContract: [{ | |
| 572 | + required: true, | |
| 573 | + message: '请上传合同附件', | |
| 574 | + trigger: 'change' | |
| 575 | + }], | |
| 576 | + }, | |
| 577 | + shopfrom: { | |
| 578 | + checkState: '2', | |
| 579 | + pageNumber: 0, | |
| 580 | + pageSize: 1000, | |
| 581 | + }, | |
| 582 | + pageindex: { | |
| 583 | + pageNumber: 0, | |
| 584 | + pageSize: 20, | |
| 585 | + }, | |
| 586 | + baseURL: 'http://192.168.2.38:9003', | |
| 587 | + uploadFiles: [], | |
| 588 | + filesLength: 1 | |
| 589 | + }; | |
| 590 | + }, | |
| 591 | + props: { | |
| 592 | + info: { | |
| 593 | + type: Object, | |
| 594 | + default: {} | |
| 595 | + } | |
| 596 | + }, | |
| 597 | + async created() { | |
| 598 | + console.error({ | |
| 599 | + ...this.info | |
| 600 | + }) | |
| 601 | + // await cerePlatformMerchant(this.shopfrom).then(res => { | |
| 602 | + // this.shopList = res.data.content | |
| 603 | + // console.error(this.shopList) | |
| 604 | + // }) | |
| 605 | + if (this.info.id) { | |
| 606 | + this.info.otherInfo = JSON.parse(this.info.otherInfo) | |
| 607 | + this.AddData = this.info.otherInfo | |
| 608 | + this.forminfo = this.info | |
| 609 | + } | |
| 610 | + }, | |
| 611 | + methods: { | |
| 612 | + async copytit(content){ | |
| 613 | + // 复制结果 | |
| 614 | + let copyResult = true | |
| 615 | + // 设置想要复制的文本内容 | |
| 616 | + const text = content || '复制内容为空哦~'; | |
| 617 | + // 判断是否支持clipboard方式 | |
| 618 | + if (!!window.navigator.clipboard) { | |
| 619 | + // 利用clipboard将文本写入剪贴板(这是一个异步promise) | |
| 620 | + await window.navigator.clipboard.writeText(text).then((res) => { | |
| 621 | + console.log('复制成功'); | |
| 622 | + }).catch((err) => { | |
| 623 | + console.log('复制失败--采取第二种复制方案', err); | |
| 624 | + // clipboard方式复制失败 则采用document.execCommand()方式进行尝试 | |
| 625 | + copyResult = copyContent2(text) | |
| 626 | + }) | |
| 627 | + } else { | |
| 628 | + // 不支持clipboard方式 则采用document.execCommand()方式 | |
| 629 | + copyResult = copyContent2(text) | |
| 630 | + } | |
| 631 | + // 返回复制操作的最终结果 | |
| 632 | + return copyResult; | |
| 633 | + }, | |
| 634 | + changimg(e, type) { | |
| 635 | + this.forminfo[type] = e | |
| 636 | + }, | |
| 637 | + openfile(e) { | |
| 638 | + if (e) { | |
| 639 | + const fullUrl = e; | |
| 640 | + try { | |
| 641 | + window.open(fullUrl, '_blank'); // 在新标签页中打开文件 | |
| 642 | + } catch (error) { | |
| 643 | + console.error('打开文件失败:', error); | |
| 644 | + } | |
| 645 | + } else { | |
| 646 | + console.error('无文件可查看'); | |
| 647 | + } | |
| 648 | + }, | |
| 649 | + //获取当前时间 | |
| 650 | + updateCurrentTime() { | |
| 651 | + const now = new Date(); | |
| 652 | + const year = now.getFullYear(); | |
| 653 | + const month = (now.getMonth() + 1).toString().padStart(2, '0'); | |
| 654 | + const day = now.getDate().toString().padStart(2, '0'); | |
| 655 | + const hours = now.getHours().toString().padStart(2, '0'); | |
| 656 | + const minutes = now.getMinutes().toString().padStart(2, '0'); | |
| 657 | + const seconds = now.getSeconds().toString().padStart(2, '0'); | |
| 658 | + | |
| 659 | + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | |
| 660 | + }, | |
| 661 | + add() { | |
| 662 | + console.error(this.AddData) | |
| 663 | + this.$refs.ruleForm1.validate((valid) => { | |
| 664 | + console.log(valid) | |
| 665 | + if (valid) { | |
| 666 | + this.forminfo.otherInfo = JSON.stringify(this.AddData) | |
| 667 | + console.log( | |
| 668 | + {...this.forminfo} | |
| 669 | + ) | |
| 670 | + // return | |
| 671 | + cereContractTemplateadd({ | |
| 672 | + ...this.forminfo, | |
| 673 | + creator: localStorage.getItem('roleName'), | |
| 674 | + createTime: this.updateCurrentTime(), | |
| 675 | + }).then(res => { | |
| 676 | + console.error(res) | |
| 677 | + if (res.code == 200) { | |
| 678 | + this.$message({ | |
| 679 | + message: '添加成功', | |
| 680 | + type: 'success' | |
| 681 | + }) | |
| 682 | + this.$emit('removeonaction', '1') | |
| 683 | + } else { | |
| 684 | + this.$message({ | |
| 685 | + message: res.msg, | |
| 686 | + type: 'error' | |
| 687 | + }) | |
| 688 | + } | |
| 689 | + | |
| 690 | + }) | |
| 691 | + } else { | |
| 692 | + this.$message({ | |
| 693 | + message: '请填写完整信息', | |
| 694 | + type: 'error' | |
| 695 | + }) | |
| 696 | + return false; | |
| 697 | + } | |
| 698 | + }) | |
| 699 | + }, | |
| 700 | + close() { | |
| 701 | + this.$emit('removeonaction', '1') | |
| 702 | + }, | |
| 703 | + MingDelete(item) { | |
| 704 | + this.AddData.splice(item, 1); | |
| 705 | + }, | |
| 706 | + async mingShow() { | |
| 707 | + const ziyuan = await getAlls(this.pageindex) | |
| 708 | + const ggw = await map1(this.pageindex) | |
| 709 | + const changdi = await changAlls(this.pageindex) | |
| 710 | + this.ziyuanData = [...ziyuan.data.content, ...ggw.data.content, ...changdi.data.content] | |
| 711 | + console.error(this.ziyuanData) | |
| 712 | + this.addMing = true | |
| 713 | + }, | |
| 714 | + handleSelectionChange(selection) { | |
| 715 | + // 处理选择变化的逻辑 | |
| 716 | + console.error(selection) | |
| 717 | + this.multipleSelection = [] | |
| 718 | + this.multipleSelection.push(selection) | |
| 719 | + }, | |
| 720 | + minSev() { | |
| 721 | + // return | |
| 722 | + this.$refs.addmbitem.validate((valid) => { | |
| 723 | + console.log(valid) | |
| 724 | + if (valid) { | |
| 725 | + this.AddData.push(this.addmbitem) | |
| 726 | + this.addmbitem = { | |
| 727 | + name: '', | |
| 728 | + key: '', | |
| 729 | + type: '', | |
| 730 | + isrequired: '', | |
| 731 | + width: '', | |
| 732 | + length: '', | |
| 733 | + value: '', | |
| 734 | + } | |
| 735 | + this.addMing = false | |
| 736 | + this.multipleSelection = [] | |
| 737 | + this.ruleAddData = {} | |
| 738 | + for (let index = 0; index < this.AddData.length; index++) { | |
| 739 | + const element = this.AddData[index]; | |
| 740 | + if(element.isrequired == '是') { | |
| 741 | + this.ruleAddData[element.key] = [{ | |
| 742 | + required: true, | |
| 743 | + message: '请填写' + element.name, | |
| 744 | + trigger: 'change' | |
| 745 | + }] | |
| 746 | + | |
| 747 | + } | |
| 748 | + | |
| 749 | + } | |
| 750 | + } else { | |
| 751 | + this.$message({ | |
| 752 | + message: '请填写完整信息', | |
| 753 | + type: 'error' | |
| 754 | + }) | |
| 755 | + return false; | |
| 756 | + } | |
| 757 | + }) | |
| 758 | + }, | |
| 759 | + mingClose() { | |
| 760 | + this.multipleSelection = [] | |
| 761 | + this.ziyuanData = [] | |
| 762 | + this.addMing = false | |
| 763 | + }, | |
| 764 | + changeRelatedMerchants(e) { | |
| 765 | + console.error(e) | |
| 766 | + this.shopId = this.shopList[e].id | |
| 767 | + this.formInline.tenantName = this.shopList[e].name | |
| 768 | + this.formInline.tenantTelephone = this.shopList[e].phone | |
| 769 | + }, | |
| 770 | + hefuRemove() { | |
| 771 | + this.hefuData = [] | |
| 772 | + }, | |
| 773 | + hefuSuccess(response, file, fileList) { | |
| 774 | + this.hefuData = [] | |
| 775 | + console.error(response) | |
| 776 | + let fd = new FormData() | |
| 777 | + fd.append('file', response.raw) | |
| 778 | + fd.append('filePath', 'hetong') | |
| 779 | + miniioupload(fd).then(res => { | |
| 780 | + console.error(res) | |
| 781 | + const fileMsg = { | |
| 782 | + name: response.name, | |
| 783 | + url: res.data, | |
| 784 | + } | |
| 785 | + this.hefuData.push(fileMsg) | |
| 786 | + }) | |
| 787 | + }, | |
| 788 | + | |
| 789 | + | |
| 790 | + }, | |
| 791 | + }; | |
| 792 | +</script> | |
| 793 | +<style lang="css"> | |
| 794 | + .el-upload { | |
| 795 | + display: block; | |
| 796 | + text-align: left; | |
| 797 | + } | |
| 798 | + | |
| 799 | + .el-dialog__header { | |
| 800 | + background-color: #F2F3F5; | |
| 801 | + text-align: left; | |
| 802 | + } | |
| 803 | + | |
| 804 | + .el-dialog__title { | |
| 805 | + line-height: 30px; | |
| 806 | + font-size: 15px; | |
| 807 | + color: #303133; | |
| 808 | + } | |
| 809 | + .iterem{ | |
| 810 | + z-index: 99; | |
| 811 | + margin-left: 10px | |
| 812 | + ;height: 40px; | |
| 813 | + line-height: 25px; | |
| 814 | + } | |
| 815 | +</style> | ... | ... |
admin-web-master/src/components/add/addmb.vue
| 1 | 1 | <template> |
| 2 | 2 | <div> |
| 3 | - <el-form :model="formInline" :rules="rulesHetong" ref="ruleForm" label-width="130px" class="demo-ruleForm"> | |
| 4 | - <el-form-item label="word模板" prop="appendicesContract"> | |
| 5 | - <upfile filePath="mb" inputtype="appendicesContract" :value="formInline.appendicesContract" | |
| 6 | - @changimg="e=>changimg(e,'appendicesContract')"></upfile> | |
| 7 | - </el-form-item> | |
| 8 | - <TitleWithCircle title="合同信息" style="margin-left: 65px;margin-bottom: 30px;" /> | |
| 3 | + <TitleWithCircle title="模版" style="margin-bottom: 20px;" /> | |
| 4 | + <el-form :model="forminfo" :rules="rulesmb" ref="ruleForm1" label-width="130px" class="demo-ruleForm"> | |
| 9 | 5 | <el-row :gutter="20"> |
| 10 | - <el-col :span="12"> | |
| 11 | - <el-form-item label="合同类型" prop="contractType"> | |
| 12 | - <el-select v-model="formInline.contractType" placeholder="请选择" style="width: 100%;"> | |
| 13 | - <el-option label="商铺合同" value="商铺合同"></el-option> | |
| 14 | - <el-option label="广告位合同" value="广告位合同"></el-option> | |
| 15 | - <el-option label="场地合同" value="场地合同"></el-option> | |
| 16 | - </el-select> | |
| 17 | - </el-form-item> | |
| 18 | - </el-col> | |
| 19 | - <el-col :span="12"> | |
| 20 | - <el-form-item label="合同编号" prop="contractNumber"> | |
| 21 | - <el-input v-model="formInline.contractNumber" placeholder="请输入" maxlength="20"></el-input> | |
| 22 | - </el-form-item> | |
| 23 | - </el-col> | |
| 24 | - </el-row> | |
| 25 | - <el-row :gutter="20"> | |
| 26 | - <el-col :span="12"> | |
| 27 | - <el-form-item label="标段号" prop="sectionNumber"> | |
| 28 | - <el-input v-model="formInline.sectionNumber" placeholder="请输入" maxlength="20"></el-input> | |
| 6 | + <el-col :span="12" > | |
| 7 | + <el-form-item label="模版名称" prop="templateName"> | |
| 8 | + <el-input v-model="forminfo.templateName" placeholder="请输入" maxlength="20"></el-input> | |
| 29 | 9 | </el-form-item> |
| 30 | 10 | </el-col> |
| 31 | - <el-col :span="12"> | |
| 32 | - <el-form-item label="合同名称" prop="contractName"> | |
| 33 | - <el-input v-model="formInline.contractName" placeholder="请输入" maxlength="50"></el-input> | |
| 34 | - </el-form-item> | |
| 35 | - </el-col> | |
| 36 | - </el-row> | |
| 37 | - <el-row :gutter="20"> | |
| 38 | - <el-col :span="12"> | |
| 39 | - <el-form-item label="合同签订日期" prop="contractSigningDate"> | |
| 40 | - <el-date-picker v-model="formInline.contractSigningDate" type="date" value-format="yyyy-MM-dd" | |
| 41 | - placeholder="选择日期" style="width: 100%;"> | |
| 42 | - </el-date-picker> | |
| 43 | - </el-form-item> | |
| 44 | - </el-col> | |
| 45 | - <el-col :span="12"> | |
| 46 | - <el-form-item label="押金" prop="earnestMoney"> | |
| 47 | - <el-input v-model="formInline.earnestMoney" placeholder="请输入" maxlength="20"></el-input> | |
| 48 | - </el-form-item> | |
| 49 | - | |
| 50 | - </el-col> | |
| 51 | - </el-row> | |
| 52 | - <el-row :gutter="20"> | |
| 53 | - <el-col :span="12"> | |
| 54 | - <el-form-item label="起租日期" prop="leaseStartDate"> | |
| 55 | - <el-date-picker v-model="formInline.leaseStartDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" | |
| 56 | - style="width: 100%;"> | |
| 57 | - </el-date-picker> | |
| 58 | - </el-form-item> | |
| 59 | - | |
| 60 | - </el-col> | |
| 61 | - <el-col :span="12"> | |
| 62 | - <el-form-item label="终止日期" prop="contractTerminationDate"> | |
| 63 | - <el-date-picker v-model="formInline.contractTerminationDate" type="date" value-format="yyyy-MM-dd" | |
| 64 | - placeholder="选择日期" style="width: 100%;"> | |
| 65 | - </el-date-picker> | |
| 66 | - </el-form-item> | |
| 67 | - </el-col> | |
| 68 | - </el-row> | |
| 69 | - <el-row :gutter="20"> | |
| 70 | - <el-col :span="12"> | |
| 71 | - <el-form-item label="付款周期" prop="paymentCycle"> | |
| 72 | - <el-select v-model="formInline.paymentCycle" placeholder="请选择" style="width: 100%;"> | |
| 73 | - <el-option label="按年" value="按年"></el-option> | |
| 74 | - <el-option label="按月" value="按月"></el-option> | |
| 75 | - <el-option label="按日" value="按日"></el-option> | |
| 76 | - <el-option label="季度" value="季度"></el-option> | |
| 77 | - </el-select> | |
| 78 | - </el-form-item> | |
| 79 | - </el-col> | |
| 80 | - <el-col :span="12"> | |
| 81 | - <el-form-item label="租金" prop="contractAmount"> | |
| 82 | - <el-input v-model="formInline.contractAmount" placeholder="请输入" maxlength="20"></el-input> | |
| 83 | - </el-form-item> | |
| 84 | - </el-col> | |
| 85 | - </el-row> | |
| 86 | - <el-row :gutter="20"> | |
| 87 | - <el-col :span="12"> | |
| 88 | - <el-form-item label="付款日" prop="paymentDay"> | |
| 89 | - <el-select v-model="formInline.paymentDay" placeholder="请选择" style="width: 100%;"> | |
| 90 | - <el-option :label="val+'号'" :value="val+'号'" v-for="val in 31"></el-option> | |
| 91 | - </el-select> | |
| 92 | - </el-form-item> | |
| 93 | - </el-col> | |
| 94 | - <el-col :span="12"> | |
| 95 | - <el-form-item label="承租人银行账号" prop="tenantBankAccount"> | |
| 96 | - <el-input v-model="formInline.tenantBankAccount" placeholder="请输入" maxlength="20"></el-input> | |
| 97 | - </el-form-item> | |
| 98 | - </el-col> | |
| 99 | - </el-row> | |
| 100 | - <el-row :gutter="20"> | |
| 101 | - <el-col :span="12"> | |
| 102 | - <el-form-item label="承租人名称" prop="tenantName"> | |
| 103 | - <el-input v-model="formInline.tenantName" placeholder="请输入" maxlength="20"></el-input> | |
| 104 | - </el-form-item> | |
| 105 | - </el-col> | |
| 106 | - <el-col :span="12"> | |
| 107 | - <el-form-item label="联系电话" prop="tenantTelephone"> | |
| 108 | - <el-input v-model="formInline.tenantTelephone" placeholder="请输入" maxlength="20"></el-input> | |
| 11 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 12 | + <el-form-item label="word模板" prop="templateAttachment" :style="forminfo.templateAttachment?'width: 100%;':''"> | |
| 13 | + <upfile :accept="'.docx,.doc'" filePath="mb" inputtype="templateAttachment" :value="forminfo.templateAttachment" | |
| 14 | + @changimg="e=>changimg(e,'templateAttachment')"></upfile> | |
| 15 | + | |
| 109 | 16 | </el-form-item> |
| 17 | + <div v-if="!forminfo.templateAttachment" class="greens tableBtn iterem" @click.stop="openfile($baseURL+'/zsfwzxt/mb/fa0cc984-e1ac-474e-a579-89ea79cc9b8e-ces合同.docx')">模版文件</div> | |
| 110 | 18 | </el-col> |
| 111 | 19 | </el-row> |
| 112 | 20 | </el-form> |
| 113 | - <div> | |
| 114 | - <el-form ref="ruleForm" :rules="ruleAddData" label-width="130px" class="demo-ruleForm"> | |
| 115 | - <el-row :gutter="20"> | |
| 116 | - <el-col :span="item.title5 == '50%(半行)'?12:item.title5 == '100%(一行)'?24:12" v-for="(item,index) in AddData"> | |
| 117 | - <el-form-item :label="item.title1" :prop="item.title2" v-if="item.title3 == '单行文本'"> | |
| 118 | - <el-input v-model="item.value" placeholder="请输入" :maxlength="item.title6"></el-input> | |
| 119 | - </el-form-item> | |
| 120 | - <el-form-item :label="item.title1" :prop="item.title2" v-if="item.title3 == '多行文本'"> | |
| 121 | - <el-input show-word-limit rows="4" v-model="item.value" placeholder="请输入" type="textarea" :maxlength="item.title6"/> | |
| 122 | - </el-form-item> | |
| 123 | - <el-form-item :label="item.title1" :prop="item.title2" v-if="item.title3 == '日期'"> | |
| 124 | - <el-date-picker v-model="item.value" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;"></el-date-picker> | |
| 125 | - </el-form-item> | |
| 126 | - </el-col> | |
| 127 | - </el-row> | |
| 128 | - </el-form> | |
| 129 | - </div> | |
| 130 | - <TitleWithCircle title="其他信息管理" style="margin-left: 65px;" /> | |
| 131 | - <div style="margin-top: 20px;margin-left: 65px;"> | |
| 132 | - <el-button @click="mingShow()" style="background-color: #3F9B6A;color: #fff;">添加</el-button> | |
| 21 | + <TitleWithCircle title="合同信息" style="margin-bottom: 20px;" /> | |
| 22 | + <mbadd :list1="list2" :iscopy="true"/> | |
| 23 | + <TitleWithCircle title="其他信息管理" /> | |
| 24 | + <div style="margin-left: 65px;margin-top: 20px;margin-bottom: 20px;"> | |
| 25 | + <el-button @click="mingShow()" style="background-color: #3F9B6A;color: #fff;">添加</el-button> | |
| 133 | 26 | </div> |
| 27 | + <mbadd :list1="list1" :iscopy="true"/> | |
| 134 | 28 | <div style="margin-top: 20px;margin-left: 65px;"> |
| 135 | 29 | <div style="padding: 0px 20px 0px 0px"> |
| 136 | - <el-table :data="AddData" | |
| 30 | + <el-table :data="list1" | |
| 137 | 31 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"> |
| 138 | 32 | <el-table-column label="字段排序"> |
| 139 | 33 | <template slot-scope="scope"> |
| ... | ... | @@ -142,32 +36,32 @@ |
| 142 | 36 | </el-table-column> |
| 143 | 37 | <el-table-column prop="notes" label="字段名称"> |
| 144 | 38 | <template slot-scope="scope"> |
| 145 | - {{scope.row.title1?scope.row.title1 : '-'}} | |
| 39 | + {{scope.row.name?scope.row.name : '-'}} | |
| 146 | 40 | </template> |
| 147 | 41 | </el-table-column> |
| 148 | 42 | <el-table-column prop="notes" label="字段key"> |
| 149 | 43 | <template slot-scope="scope"> |
| 150 | - {{scope.row.title2?scope.row.title2 : '-'}} | |
| 44 | + {{scope.row.key?scope.row.key : '-'}} | |
| 151 | 45 | </template> |
| 152 | 46 | </el-table-column> |
| 153 | 47 | <el-table-column prop="notes" label="字段类型"> |
| 154 | 48 | <template slot-scope="scope"> |
| 155 | - {{scope.row.title3?scope.row.title3 : '-'}} | |
| 49 | + {{scope.row.type?scope.row.type : '-'}} | |
| 156 | 50 | </template> |
| 157 | 51 | </el-table-column> |
| 158 | 52 | <el-table-column prop="notes" label="是否必填"> |
| 159 | 53 | <template slot-scope="scope"> |
| 160 | - {{scope.row.title4?scope.row.title4 : '-'}} | |
| 54 | + {{scope.row.isrequired?scope.row.isrequired : '-'}} | |
| 161 | 55 | </template> |
| 162 | 56 | </el-table-column> |
| 163 | 57 | <el-table-column prop="notes" label="字段宽度"> |
| 164 | 58 | <template slot-scope="scope"> |
| 165 | - {{scope.row.title5?scope.row.title5 : '-'}} | |
| 59 | + {{scope.row.width?scope.row.width : '-'}} | |
| 166 | 60 | </template> |
| 167 | 61 | </el-table-column> |
| 168 | 62 | <el-table-column prop="notes" label="限制规则"> |
| 169 | 63 | <template slot-scope="scope"> |
| 170 | - {{scope.row.title6?scope.row.title6 : '-'}} | |
| 64 | + {{scope.row.length?scope.row.length : '-'}} | |
| 171 | 65 | </template> |
| 172 | 66 | </el-table-column> |
| 173 | 67 | <el-table-column label="操作"> |
| ... | ... | @@ -178,42 +72,49 @@ |
| 178 | 72 | </el-table> |
| 179 | 73 | </div> |
| 180 | 74 | </div> |
| 181 | - <div style="margin-top: 20px;margin-left: 65px;"> | |
| 75 | + <div v-if="info.id" style="margin-top: 20px;margin-left: 65px;"> | |
| 76 | + <el-button @click="close()" class="buttonHover" | |
| 77 | + style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">返回</el-button> | |
| 78 | + </div> | |
| 79 | + <div v-else style="margin-top: 20px;margin-left: 65px;"> | |
| 182 | 80 | <el-button @click="add()" style="background-color: #3F9B6A;color: #fff;">确定</el-button> |
| 183 | 81 | <el-button @click="close()" class="buttonHover" |
| 184 | 82 | style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button> |
| 185 | 83 | </div> |
| 186 | - <el-dialog :visible.sync="addMing" title="添加" style="padding: 0;" width="50%" append-to-body center | |
| 84 | + <el-dialog :visible.sync="addMing" title="添加" style="padding: 0;z-index: 9999999;" width="50%" append-to-body center | |
| 187 | 85 | :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"> |
| 188 | 86 | <div v-if="addMing"> |
| 189 | 87 | <el-form :model="addmbitem" :rules="ruleaddmbitem" ref="addmbitem" label-width="130px" class="demo-ruleForm"> |
| 190 | - <el-form-item label="字段名称" prop="title1"> | |
| 191 | - <el-input v-model="addmbitem.title1" placeholder="请输入" maxlength="20"></el-input> | |
| 88 | + <el-form-item label="字段名称" prop="name"> | |
| 89 | + <el-input v-model="addmbitem.name" placeholder="请输入" maxlength="20"></el-input> | |
| 192 | 90 | </el-form-item> |
| 193 | - <el-form-item label="字段key" prop="title2"> | |
| 194 | - <el-input v-model="addmbitem.title2" placeholder="请输入" maxlength="20"></el-input> | |
| 91 | + <el-form-item label="字段key" prop="key"> | |
| 92 | + <el-input v-model="addmbitem.key" placeholder="请输入" maxlength="20"></el-input> | |
| 195 | 93 | </el-form-item> |
| 196 | - <el-form-item label="字段类型" prop="title3"> | |
| 197 | - <el-select v-model="addmbitem.title3" placeholder="请选择" style="width: 100%;"> | |
| 198 | - <el-option label="单行文本" value="单行文本"></el-option> | |
| 199 | - <el-option label="多行文本" value="多行文本"></el-option> | |
| 200 | - <el-option label="日期" value="日期"></el-option> | |
| 94 | + <el-form-item label="字段类型" prop="type"> | |
| 95 | + <el-select v-model="addmbitem.type" placeholder="请选择" style="width: 100%;"> | |
| 96 | + <el-option v-for="(item,index) in mobantype" :key="index" :label="item.label" :value="item.value"></el-option> | |
| 201 | 97 | </el-select> |
| 202 | 98 | </el-form-item> |
| 203 | - <el-form-item label="是否必填" prop="title4"> | |
| 204 | - <el-select v-model="addmbitem.title4" placeholder="请选择" style="width: 100%;"> | |
| 99 | + <el-form-item label="选择内容" v-if="addmbitem.type == '下拉选择'"> | |
| 100 | + <el-button @click="additemlist" style="background-color: #3F9B6A;color: #fff;">添加</el-button> | |
| 101 | + <el-input v-for="(item,index) in addmbitem.list" :key="index" v-model="item.label" placeholder="请输入" maxlength="20" @input="e=>inputvalue(e,index)"></el-input> | |
| 102 | + | |
| 103 | + </el-form-item> | |
| 104 | + <el-form-item label="是否必填" prop="isrequired"> | |
| 105 | + <el-select v-model="addmbitem.isrequired" placeholder="请选择" style="width: 100%;"> | |
| 205 | 106 | <el-option label="是" value="是"></el-option> |
| 206 | 107 | <el-option label="否" value="否"></el-option> |
| 207 | 108 | </el-select> |
| 208 | 109 | </el-form-item> |
| 209 | - <el-form-item label="字段宽度" prop="title5"> | |
| 210 | - <el-select v-model="addmbitem.title5" placeholder="请选择" style="width: 100%;"> | |
| 110 | + <el-form-item label="字段宽度" prop="width"> | |
| 111 | + <el-select v-model="addmbitem.width" placeholder="请选择" style="width: 100%;"> | |
| 211 | 112 | <el-option label="50%(半行)" value="50%(半行)"></el-option> |
| 212 | 113 | <el-option label="100%(一行)" value="100%(一行)"></el-option> |
| 213 | 114 | </el-select> |
| 214 | 115 | </el-form-item> |
| 215 | - <el-form-item label="限制规则" prop="title6"> | |
| 216 | - <el-input v-model.number="addmbitem.title6" placeholder="请输入" maxlength="20"></el-input> | |
| 116 | + <el-form-item label="限制规则" prop="length"> | |
| 117 | + <el-input v-model.number="addmbitem.length" placeholder="请输入" maxlength="20"></el-input> | |
| 217 | 118 | </el-form-item> |
| 218 | 119 | </el-form> |
| 219 | 120 | </div> |
| ... | ... | @@ -227,236 +128,282 @@ |
| 227 | 128 | </el-dialog> |
| 228 | 129 | </div> |
| 229 | 130 | </template> |
| 230 | - | |
| 231 | 131 | <script> |
| 232 | - import { | |
| 233 | - businessListGetAll, | |
| 234 | - } from '@/api/business' | |
| 235 | - import upimg from "@/components/ImageUpload/index" | |
| 132 | + import upfile from "@/components/fujianUpload/fujianList" | |
| 236 | 133 | import TitleWithCircle from '@/components/top/index'; |
| 134 | + import mbadd from '@/components/change/mbadd'; | |
| 237 | 135 | import { |
| 238 | - uploadUrl | |
| 239 | - } from '@/utils/request' | |
| 240 | - import { | |
| 241 | - getAlls, | |
| 242 | - changAlls | |
| 243 | - } from '@/api/information.js' | |
| 244 | - import { | |
| 245 | - getAlls as map1 | |
| 246 | - } from '@/api/map1.js' | |
| 247 | - import { | |
| 248 | - miniioupload | |
| 249 | - } from '@/api/commodityLease.js' | |
| 250 | - import { | |
| 251 | - | |
| 252 | - contractinsertAdd | |
| 253 | - } from '@/api/manage.js' | |
| 254 | - import { | |
| 255 | - cerePlatformMerchant | |
| 136 | + cereContractTemplateadd | |
| 256 | 137 | } from '@/api/newly.js' |
| 257 | - import { | |
| 258 | - msgedit | |
| 259 | - } from '@/api/cereBusinessInfo' | |
| 260 | - import { | |
| 261 | - AdvertiserInfoEdit | |
| 262 | - } from '@/api/advertisement.js' | |
| 263 | - import upfile from "@/components/fujianUpload/fujianList" | |
| 138 | +import { Input } from "element-ui"; | |
| 264 | 139 | export default { |
| 265 | 140 | components: { |
| 266 | - upfile, | |
| 267 | - upimg, | |
| 268 | - TitleWithCircle | |
| 141 | + TitleWithCircle, | |
| 142 | + mbadd, | |
| 143 | + upfile | |
| 269 | 144 | }, |
| 270 | 145 | data() { |
| 271 | 146 | return { |
| 147 | + list1:[], | |
| 148 | + list2: [ | |
| 149 | + { | |
| 150 | + name: '合同类型', | |
| 151 | + key: 'contractType', | |
| 152 | + type: '下拉选择', | |
| 153 | + isrequired: '是', | |
| 154 | + width: '50%(半行)', | |
| 155 | + length: '20', | |
| 156 | + value: '', | |
| 157 | + list: [{ | |
| 158 | + label: '商铺合同', | |
| 159 | + value: '商铺合同', | |
| 160 | + }, | |
| 161 | + { | |
| 162 | + label: '广告位合同', | |
| 163 | + value: '广告位合同', | |
| 164 | + }, | |
| 165 | + { | |
| 166 | + label: '场地合同', | |
| 167 | + value: '场地合同', | |
| 168 | + }, | |
| 169 | + ] | |
| 170 | + }, | |
| 171 | + { | |
| 172 | + name: '合同编号', | |
| 173 | + key: 'contractNumber', | |
| 174 | + type: '单行文本', | |
| 175 | + isrequired: '是', | |
| 176 | + width: '50%(半行)', | |
| 177 | + length: '20', | |
| 178 | + value: '', | |
| 179 | + }, | |
| 180 | + { | |
| 181 | + name: '标段号', | |
| 182 | + key: 'sectionNumber', | |
| 183 | + type: '单行文本', | |
| 184 | + isrequired: '是', | |
| 185 | + width: '50%(半行)', | |
| 186 | + length: '20', | |
| 187 | + value: '', | |
| 188 | + }, | |
| 189 | + { | |
| 190 | + name: '合同名称', | |
| 191 | + key: 'contractName', | |
| 192 | + type: '单行文本', | |
| 193 | + isrequired: '是', | |
| 194 | + width: '50%(半行)', | |
| 195 | + length: '50', | |
| 196 | + value: '', | |
| 197 | + }, | |
| 198 | + { | |
| 199 | + name: '合同签订日期', | |
| 200 | + key: 'contractSigningDate', | |
| 201 | + type: '日期', | |
| 202 | + isrequired: '是', | |
| 203 | + width: '50%(半行)', | |
| 204 | + length: '', | |
| 205 | + value: '', | |
| 206 | + }, | |
| 207 | + { | |
| 208 | + name: '押金', | |
| 209 | + key: 'earnestMoney', | |
| 210 | + type: '单行数字文本', | |
| 211 | + isrequired: '是', | |
| 212 | + width: '50%(半行)', | |
| 213 | + length: '20', | |
| 214 | + value: '', | |
| 215 | + }, | |
| 216 | + { | |
| 217 | + name: '起租日期', | |
| 218 | + key: 'leaseStartDate', | |
| 219 | + type: '日期', | |
| 220 | + isrequired: '是', | |
| 221 | + width: '50%(半行)', | |
| 222 | + length: '', | |
| 223 | + value: '', | |
| 224 | + }, | |
| 225 | + { | |
| 226 | + name: '终止日期', | |
| 227 | + key: 'contractTerminationDate', | |
| 228 | + type: '日期', | |
| 229 | + isrequired: '是', | |
| 230 | + width: '50%(半行)', | |
| 231 | + length: '', | |
| 232 | + value: '', | |
| 233 | + }, | |
| 234 | + { | |
| 235 | + name: '付款周期', | |
| 236 | + key: 'paymentCycle', | |
| 237 | + type: '下拉选择', | |
| 238 | + isrequired: '是', | |
| 239 | + width: '50%(半行)', | |
| 240 | + length: '20', | |
| 241 | + value: '', | |
| 242 | + list: [{ | |
| 243 | + label: '按年', | |
| 244 | + value: '按年', | |
| 245 | + }, | |
| 246 | + { | |
| 247 | + label: '按月', | |
| 248 | + value: '按月', | |
| 249 | + }, | |
| 250 | + { | |
| 251 | + label: '按日', | |
| 252 | + value: '按日', | |
| 253 | + }, | |
| 254 | + { | |
| 255 | + label: '季度', | |
| 256 | + value: '季度', | |
| 257 | + }, | |
| 258 | + ] | |
| 259 | + }, | |
| 260 | + { | |
| 261 | + name: '租金', | |
| 262 | + key: 'contractAmount', | |
| 263 | + type: '单行数字文本', | |
| 264 | + isrequired: '是', | |
| 265 | + width: '50%(半行)', | |
| 266 | + length: '20', | |
| 267 | + value: '', | |
| 268 | + }, | |
| 269 | + { | |
| 270 | + name: '付款日', | |
| 271 | + key: 'paymentDay', | |
| 272 | + type: '付款日', | |
| 273 | + isrequired: '是', | |
| 274 | + width: '50%(半行)', | |
| 275 | + length: '20', | |
| 276 | + value: '', | |
| 277 | + }, | |
| 278 | + { | |
| 279 | + name: '承租人银行账号', | |
| 280 | + key: 'tenantBankAccount', | |
| 281 | + type: '单行数字文本', | |
| 282 | + isrequired: '是', | |
| 283 | + width: '50%(半行)', | |
| 284 | + length: '20', | |
| 285 | + value: '', | |
| 286 | + }, | |
| 287 | + { | |
| 288 | + name: '绑定商家', | |
| 289 | + key: 'relatedMerchants', | |
| 290 | + type: '商家', | |
| 291 | + isrequired: '是', | |
| 292 | + width: '100%(一行)', | |
| 293 | + length: '', | |
| 294 | + value: '', | |
| 295 | + }, | |
| 296 | + { | |
| 297 | + name: '承租人名称', | |
| 298 | + key: 'tenantName', | |
| 299 | + type: '单行文本', | |
| 300 | + isrequired: '是', | |
| 301 | + width: '50%(半行)', | |
| 302 | + length: '20', | |
| 303 | + value: '', | |
| 304 | + }, | |
| 305 | + { | |
| 306 | + name: '联系电话', | |
| 307 | + key: 'tenantTelephone', | |
| 308 | + type: '单行数字文本', | |
| 309 | + isrequired: '是', | |
| 310 | + width: '50%(半行)', | |
| 311 | + length: '20', | |
| 312 | + value: '', | |
| 313 | + }, | |
| 314 | + // { | |
| 315 | + // name: '附件信息', | |
| 316 | + // key: 'appendicesContract', | |
| 317 | + // type: '附件', | |
| 318 | + // isrequired: '是', | |
| 319 | + // width: '100%(一行)', | |
| 320 | + // length: '', | |
| 321 | + // value: '', | |
| 322 | + // }, | |
| 323 | + { | |
| 324 | + name: '绑定资源', | |
| 325 | + key: 'shopNumber', | |
| 326 | + type: '资源', | |
| 327 | + isrequired: '是', | |
| 328 | + width: '100%(一行)', | |
| 329 | + length: '', | |
| 330 | + value: '', | |
| 331 | + list:[] | |
| 332 | + }, | |
| 333 | + ], | |
| 334 | + rulesmb:{ | |
| 335 | + templateName: [{ | |
| 336 | + required: true, | |
| 337 | + message: '请填写模版名称', | |
| 338 | + trigger: 'change' | |
| 339 | + }], | |
| 340 | + templateAttachment: [{ | |
| 341 | + required: true, | |
| 342 | + message: '请上传word模板', | |
| 343 | + trigger: 'change' | |
| 344 | + }], | |
| 345 | + }, | |
| 272 | 346 | ruleAddData:{}, |
| 347 | + forminfo:{ | |
| 348 | + templateName: '', // 模板名称 | |
| 349 | + templateAttachment: '', // 模板附件路径或名称 | |
| 350 | + otherInfo: '', // 其他信息 | |
| 351 | + templateType: '', // 模板类型 | |
| 352 | + creator: '', // 创建人 | |
| 353 | + createTime: '', // 创建时间 | |
| 354 | + remark1: '', // 备注1 | |
| 355 | + remark2: '' // 备注2 | |
| 356 | + }, | |
| 273 | 357 | ruleaddmbitem:{ |
| 274 | - title1: [{ | |
| 358 | + name: [{ | |
| 275 | 359 | required: true, |
| 276 | 360 | message: '请填写字段名称', |
| 277 | 361 | trigger: 'change' |
| 278 | 362 | }], |
| 279 | - title2: [{ | |
| 363 | + key: [{ | |
| 280 | 364 | required: true, |
| 281 | 365 | message: '请填写字段key', |
| 282 | 366 | trigger: 'change' |
| 283 | 367 | }], |
| 284 | - title3: [{ | |
| 368 | + type: [{ | |
| 285 | 369 | required: true, |
| 286 | 370 | message: '请选择字段类型', |
| 287 | 371 | trigger: 'change' |
| 288 | 372 | }], |
| 289 | - title4: [{ | |
| 373 | + isrequired: [{ | |
| 290 | 374 | required: true, |
| 291 | 375 | message: '请选择是否必填', |
| 292 | 376 | trigger: 'change' |
| 293 | 377 | }], |
| 294 | - title5: [{ | |
| 378 | + width: [{ | |
| 295 | 379 | required: true, |
| 296 | 380 | message: '请选择字段宽度', |
| 297 | 381 | trigger: 'change' |
| 298 | 382 | }], |
| 299 | - title6: [{ | |
| 300 | - required: true, | |
| 301 | - message: '请填写限制规则', | |
| 302 | - trigger: 'change' | |
| 303 | - }], | |
| 383 | + // length: [{ | |
| 384 | + // required: true, | |
| 385 | + // message: '请填写限制规则', | |
| 386 | + // trigger: 'change' | |
| 387 | + // }], | |
| 304 | 388 | }, |
| 305 | 389 | addmbitem: { |
| 306 | - title1: '', | |
| 307 | - title2: '', | |
| 308 | - title3: '', | |
| 309 | - title4: '', | |
| 310 | - title5: '', | |
| 311 | - title6: '', | |
| 390 | + name: '', | |
| 391 | + key: '', | |
| 392 | + type: '', | |
| 393 | + isrequired: '', | |
| 394 | + width: '', | |
| 395 | + length: '', | |
| 312 | 396 | value: '', |
| 397 | + list:[] | |
| 313 | 398 | }, |
| 314 | - AddData: [], //最后资源 | |
| 315 | - multipleSelection: [], //资源 | |
| 316 | - addMing: false, | |
| 317 | - ziyuanData: [], | |
| 318 | - shopId: null, | |
| 319 | - hefuData: [], //合同附件 | |
| 320 | - uploadFileUrl: uploadUrl, // 请求地址 | |
| 321 | - shopList: [], | |
| 322 | - formInline: { | |
| 323 | - // 合同类型 | |
| 324 | - contractType: '', | |
| 325 | - // 合同编号 | |
| 326 | - contractNumber: '', | |
| 327 | - // 标段号 | |
| 328 | - sectionNumber: '', | |
| 329 | - // 合同名称 | |
| 330 | - contractName: '', | |
| 331 | - // 押金 | |
| 332 | - earnestMoney: '', | |
| 333 | - // 合同签订日期 | |
| 334 | - contractSigningDate: '', | |
| 335 | - // 合同终止日期 | |
| 336 | - contractTerminationDate: '', | |
| 337 | - // 起租日期 | |
| 338 | - leaseStartDate: '', | |
| 339 | - // 付款周期 | |
| 340 | - paymentCycle: '', | |
| 341 | - // 合同金额(租金) | |
| 342 | - contractAmount: '', | |
| 343 | - // 付款日 | |
| 344 | - paymentDay: '', | |
| 345 | - // 承租人名称 | |
| 346 | - tenantName: '', | |
| 347 | - // 承租人联系电话 | |
| 348 | - tenantTelephone: '', | |
| 349 | - // 承租人银行账号 | |
| 350 | - tenantBankAccount: '', | |
| 351 | - // 关联商家 | |
| 352 | - relatedMerchants: '', | |
| 353 | - // 商铺编号(绑定资源) | |
| 354 | - shopNumber: '', | |
| 355 | - // 合同附件 | |
| 356 | - appendicesContract: '', | |
| 357 | - //合同状态 | |
| 358 | - dataStatus: '1' | |
| 359 | - }, | |
| 360 | - rulesHetong: { | |
| 361 | - contractType: [{ | |
| 362 | - required: true, | |
| 363 | - message: '请选择合同类型', | |
| 364 | - trigger: 'change' | |
| 365 | - }], | |
| 366 | - contractNumber: [{ | |
| 367 | - required: true, | |
| 368 | - message: '请输入合同编号', | |
| 369 | - trigger: 'blur' | |
| 370 | - }], | |
| 371 | - sectionNumber: [{ | |
| 372 | - required: true, | |
| 373 | - message: '请输入标段号', | |
| 374 | - trigger: 'blur' | |
| 375 | - }], | |
| 376 | - contractName: [{ | |
| 377 | - required: true, | |
| 378 | - message: '请输入合同名称', | |
| 379 | - trigger: 'blur' | |
| 380 | - }], | |
| 381 | - earnestMoney: [{ | |
| 382 | - required: true, | |
| 383 | - message: '请输入押金', | |
| 384 | - trigger: 'blur' | |
| 385 | - }], | |
| 386 | - contractSigningDate: [{ | |
| 387 | - required: true, | |
| 388 | - message: '请选择签订日期', | |
| 389 | - trigger: 'change' | |
| 390 | - }], | |
| 391 | - contractTerminationDate: [{ | |
| 392 | - required: true, | |
| 393 | - message: '请选择终止日期', | |
| 394 | - trigger: 'change' | |
| 395 | - }], | |
| 396 | - leaseStartDate: [{ | |
| 397 | - required: true, | |
| 398 | - message: '请选择起租日期', | |
| 399 | - trigger: 'change' | |
| 400 | - }], | |
| 401 | - paymentCycle: [{ | |
| 402 | - required: true, | |
| 403 | - message: '请选择付款周期', | |
| 404 | - trigger: 'change' | |
| 405 | - }], | |
| 406 | - contractAmount: [{ | |
| 407 | - required: true, | |
| 408 | - message: '请输入租金', | |
| 409 | - trigger: 'blur' | |
| 410 | - }], | |
| 411 | - paymentDay: [{ | |
| 412 | - required: true, | |
| 413 | - message: '请选择付款日', | |
| 414 | - trigger: 'change' | |
| 415 | - }], | |
| 416 | - tenantName: [{ | |
| 417 | - required: true, | |
| 418 | - message: '请输入承租人名称', | |
| 419 | - trigger: 'blur' | |
| 420 | - }], | |
| 421 | - tenantTelephone: [{ | |
| 422 | - required: true, | |
| 423 | - message: '请输入联系电话', | |
| 424 | - trigger: 'blur' | |
| 425 | - }], | |
| 426 | - tenantBankAccount: [{ | |
| 427 | - required: true, | |
| 428 | - message: '请输入承租人银行账号', | |
| 429 | - trigger: 'blur' | |
| 430 | - }], | |
| 431 | - relatedMerchants: [{ | |
| 432 | - required: true, | |
| 433 | - message: '请选择绑定商家', | |
| 434 | - trigger: 'change' | |
| 435 | - }], | |
| 436 | - shopNumber: [{ | |
| 437 | - required: true, | |
| 438 | - message: '请选择绑定资源', | |
| 439 | - trigger: 'change' | |
| 440 | - }], | |
| 441 | - appendicesContract: [{ | |
| 442 | - required: true, | |
| 443 | - message: '请上传合同附件', | |
| 444 | - trigger: 'blur' | |
| 445 | - }], | |
| 446 | - }, | |
| 447 | - shopfrom: { | |
| 448 | - checkState: '2', | |
| 449 | - pageNumber: 0, | |
| 450 | - pageSize: 1000, | |
| 451 | - }, | |
| 452 | - pageindex: { | |
| 453 | - pageNumber: 0, | |
| 454 | - pageSize: 20, | |
| 455 | - }, | |
| 456 | - baseURL: 'http://192.168.2.38:9003', | |
| 457 | - uploadFiles: [], | |
| 458 | - filesLength: 1 | |
| 459 | - }; | |
| 399 | + addMing:false, | |
| 400 | + | |
| 401 | + } | |
| 402 | + }, | |
| 403 | + computed: { | |
| 404 | + mobantype() { | |
| 405 | + return this.$store.state.app.mobantype; | |
| 406 | + } | |
| 460 | 407 | }, |
| 461 | 408 | props: { |
| 462 | 409 | info: { |
| ... | ... | @@ -465,98 +412,112 @@ |
| 465 | 412 | } |
| 466 | 413 | }, |
| 467 | 414 | async created() { |
| 468 | - console.error({ | |
| 469 | - ...this.info | |
| 470 | - }) | |
| 471 | - await cerePlatformMerchant(this.shopfrom).then(res => { | |
| 472 | - this.shopList = res.data.content | |
| 473 | - console.error(this.shopList) | |
| 474 | - }) | |
| 475 | 415 | if (this.info.id) { |
| 476 | - if (this.info.cereBasicInformationShop && this.info.cereBasicInformationShop.id) { | |
| 477 | - this.AddData.push(this.info.cereBasicInformationShop) | |
| 478 | - } | |
| 479 | - if (this.info.cereAdvertisingInformation && this.info.cereAdvertisingInformation.id) { | |
| 480 | - this.AddData.push(this.info.cereAdvertisingInformation) | |
| 481 | - } | |
| 482 | - if (this.info.cereBasicInformationVenue && this.info.cereBasicInformationVenue.id) { | |
| 483 | - this.AddData.push(this.info.cereBasicInformationVenue) | |
| 484 | - } | |
| 485 | - for (let index = 0; index < this.shopList.length; index++) { | |
| 486 | - const element = this.shopList[index]; | |
| 487 | - console.error(element) | |
| 488 | - if (element.phone == this.info.applicant) { | |
| 489 | - this.shopId = element.id + '' | |
| 490 | - this.formInline.relatedMerchants = element.id + '' | |
| 491 | - this.formInline.tenantName = element.name | |
| 492 | - this.formInline.tenantTelephone = element.phone | |
| 493 | - } | |
| 494 | - } | |
| 416 | + this.info.otherInfo = JSON.parse(this.info.otherInfo) | |
| 417 | + this.list1 = this.info.otherInfo | |
| 418 | + this.forminfo = this.info | |
| 495 | 419 | } |
| 496 | 420 | }, |
| 497 | 421 | methods: { |
| 498 | - add() { | |
| 499 | - console.error({ | |
| 500 | - ...this.formInline | |
| 422 | + inputvalue(e,index){ | |
| 423 | + console.error(e) | |
| 424 | + this.addmbitem.list[index].value = e | |
| 425 | + }, | |
| 426 | + additemlist() { | |
| 427 | + this.addmbitem.list.push({ | |
| 428 | + label: '', | |
| 429 | + value: '' | |
| 501 | 430 | }) |
| 502 | - return | |
| 503 | - console.error(this.AddData) | |
| 504 | - console.error(this.hefuData) | |
| 505 | - // console.error() | |
| 506 | - let c1 = '' | |
| 507 | - for (let i = 0; i < this.hefuData.length; i++) { | |
| 508 | - if (i == 0) { | |
| 509 | - c1 = this.hefuData[i].url | |
| 510 | - } else { | |
| 511 | - c1 = c1 + ',' + this.hefuData[i].url | |
| 431 | + }, | |
| 432 | + async mingShow() { | |
| 433 | + this.addMing = true | |
| 434 | + }, | |
| 435 | + minSev() { | |
| 436 | + // return | |
| 437 | + this.$refs.addmbitem.validate((valid) => { | |
| 438 | + console.log(valid) | |
| 439 | + if (valid) { | |
| 440 | + this.list1.push(this.addmbitem) | |
| 441 | + this.addmbitem = { | |
| 442 | + name: '', | |
| 443 | + key: '', | |
| 444 | + type: '', | |
| 445 | + isrequired: '', | |
| 446 | + width: '', | |
| 447 | + length: '', | |
| 448 | + value: '', | |
| 449 | + list:[] | |
| 450 | + } | |
| 451 | + this.addMing = false | |
| 452 | + } else { | |
| 453 | + this.$message({ | |
| 454 | + message: '请填写完整信息', | |
| 455 | + type: 'error' | |
| 456 | + }) | |
| 457 | + return false; | |
| 458 | + } | |
| 459 | + }) | |
| 460 | + }, | |
| 461 | + mingClose() { | |
| 462 | + this.addMing = false | |
| 463 | + }, | |
| 464 | + openfile(e) { | |
| 465 | + if (e) { | |
| 466 | + const fullUrl = e; | |
| 467 | + try { | |
| 468 | + window.open(fullUrl, '_blank'); // 在新标签页中打开文件 | |
| 469 | + } catch (error) { | |
| 470 | + console.error('打开文件失败:', error); | |
| 512 | 471 | } |
| 472 | + } else { | |
| 473 | + console.error('无文件可查看'); | |
| 513 | 474 | } |
| 514 | - let c2 = '' | |
| 515 | - for (let i = 0; i < this.AddData.length; i++) { | |
| 516 | - let cnet = '' | |
| 517 | - if (this.AddData[i].shopName) { | |
| 518 | - cnet = 'sp' + this.AddData[i].id | |
| 519 | - } else if (this.AddData[i].advertisingType) { | |
| 520 | - cnet = 'gg' + this.AddData[i].id | |
| 521 | - } else { | |
| 522 | - cnet = 'cd' + this.AddData[i].id | |
| 523 | - } | |
| 524 | - if (i == 0) { | |
| 525 | - c2 = cnet | |
| 526 | - } else { | |
| 527 | - c2 = c2 + ',' + cnet | |
| 475 | + }, | |
| 476 | + changimg(e, type) { | |
| 477 | + this.forminfo[type] = e | |
| 478 | + }, | |
| 479 | + changimg(e, type) { | |
| 480 | + this.forminfo[type] = e | |
| 481 | + }, | |
| 482 | + openfile(e) { | |
| 483 | + if (e) { | |
| 484 | + const fullUrl = e; | |
| 485 | + try { | |
| 486 | + window.open(fullUrl, '_blank'); // 在新标签页中打开文件 | |
| 487 | + } catch (error) { | |
| 488 | + console.error('打开文件失败:', error); | |
| 528 | 489 | } |
| 529 | - } | |
| 530 | - | |
| 531 | - if (this.formInline.id) { | |
| 532 | - // this.$refs[formName].validate((valid) => { | |
| 533 | - // console.log(valid) | |
| 534 | - // if (valid) { | |
| 535 | - // contractinsertAdd(this.formInline).then(res => { | |
| 536 | - | |
| 537 | - // }) | |
| 538 | - // } else { | |
| 539 | - // this.$message({ | |
| 540 | - // message: '请填写完整信息', | |
| 541 | - // type: 'error' | |
| 542 | - // }) | |
| 543 | - // return false; | |
| 544 | - // } | |
| 545 | - // }) | |
| 546 | 490 | } else { |
| 491 | + console.error('无文件可查看'); | |
| 492 | + } | |
| 493 | + }, | |
| 494 | + //获取当前时间 | |
| 495 | + updateCurrentTime() { | |
| 496 | + const now = new Date(); | |
| 497 | + const year = now.getFullYear(); | |
| 498 | + const month = (now.getMonth() + 1).toString().padStart(2, '0'); | |
| 499 | + const day = now.getDate().toString().padStart(2, '0'); | |
| 500 | + const hours = now.getHours().toString().padStart(2, '0'); | |
| 501 | + const minutes = now.getMinutes().toString().padStart(2, '0'); | |
| 502 | + const seconds = now.getSeconds().toString().padStart(2, '0'); | |
| 547 | 503 | |
| 548 | - this.formInline.appendicesContract = c1 | |
| 549 | - this.formInline.shopNumber = c2 | |
| 550 | - console.error({ | |
| 551 | - ...this.formInline | |
| 552 | - }) | |
| 553 | - this.$refs.heForm.validate((valid) => { | |
| 504 | + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | |
| 505 | + }, | |
| 506 | + add() { | |
| 507 | + console.error(this.list1) | |
| 508 | + this.$refs.ruleForm1.validate((valid) => { | |
| 554 | 509 | console.log(valid) |
| 555 | 510 | if (valid) { |
| 556 | - contractinsertAdd({ | |
| 557 | - ...this.formInline, | |
| 558 | - relatedMerchants: this.shopId, | |
| 559 | - updateUser: localStorage.getItem('roleName') | |
| 511 | + let allist = [...this.list2,...this.list1] | |
| 512 | + this.forminfo.otherInfo = JSON.stringify(allist) | |
| 513 | + console.log( | |
| 514 | + {...this.forminfo} | |
| 515 | + ) | |
| 516 | + // return | |
| 517 | + cereContractTemplateadd({ | |
| 518 | + ...this.forminfo, | |
| 519 | + creator: localStorage.getItem('roleName'), | |
| 520 | + createTime: this.updateCurrentTime(), | |
| 560 | 521 | }).then(res => { |
| 561 | 522 | console.error(res) |
| 562 | 523 | if (res.code == 200) { |
| ... | ... | @@ -564,32 +525,6 @@ |
| 564 | 525 | message: '添加成功', |
| 565 | 526 | type: 'success' |
| 566 | 527 | }) |
| 567 | - if (this.info.id) { | |
| 568 | - if (this.info.cereBasicInformationShop && this.info.cereBasicInformationShop.id) { | |
| 569 | - msgedit({ | |
| 570 | - auditStatus: '4', | |
| 571 | - id: this.info.id, | |
| 572 | - contractNumber: this.formInline.contractNumber | |
| 573 | - }) | |
| 574 | - } | |
| 575 | - if (this.info.cereAdvertisingInformation && this.info.cereAdvertisingInformation.id) { | |
| 576 | - AdvertiserInfoEdit({ | |
| 577 | - auditStatus: '4', | |
| 578 | - id: this.info.id, | |
| 579 | - contractId: this.formInline.contractNumber | |
| 580 | - }).then(item => { | |
| 581 | - this.getAll() | |
| 582 | - }) | |
| 583 | - } | |
| 584 | - if (this.info.cereBasicInformationVenue && this.info.cereBasicInformationVenue.id) { | |
| 585 | - msgedit({ | |
| 586 | - auditStatus: '4', | |
| 587 | - id: this.info.id, | |
| 588 | - contractNumber: this.formInline.contractNumber | |
| 589 | - }) | |
| 590 | - } | |
| 591 | - | |
| 592 | - } | |
| 593 | 528 | this.$emit('removeonaction', '1') |
| 594 | 529 | } else { |
| 595 | 530 | this.$message({ |
| ... | ... | @@ -607,101 +542,12 @@ |
| 607 | 542 | return false; |
| 608 | 543 | } |
| 609 | 544 | }) |
| 610 | - | |
| 611 | - } | |
| 612 | 545 | }, |
| 613 | 546 | close() { |
| 614 | 547 | this.$emit('removeonaction', '1') |
| 615 | 548 | }, |
| 616 | - MingDelete(item) { | |
| 617 | - this.AddData.splice(item, 1); | |
| 618 | - }, | |
| 619 | - async mingShow() { | |
| 620 | - const ziyuan = await getAlls(this.pageindex) | |
| 621 | - const ggw = await map1(this.pageindex) | |
| 622 | - const changdi = await changAlls(this.pageindex) | |
| 623 | - this.ziyuanData = [...ziyuan.data.content, ...ggw.data.content, ...changdi.data.content] | |
| 624 | - console.error(this.ziyuanData) | |
| 625 | - this.addMing = true | |
| 626 | - }, | |
| 627 | - handleSelectionChange(selection) { | |
| 628 | - // 处理选择变化的逻辑 | |
| 629 | - console.error(selection) | |
| 630 | - this.multipleSelection = [] | |
| 631 | - this.multipleSelection.push(selection) | |
| 632 | - }, | |
| 633 | - minSev() { | |
| 634 | - // return | |
| 635 | - this.$refs.addmbitem.validate((valid) => { | |
| 636 | - console.log(valid) | |
| 637 | - if (valid) { | |
| 638 | - this.AddData.push(this.addmbitem) | |
| 639 | - this.addmbitem = { | |
| 640 | - title1: '', | |
| 641 | - title2: '', | |
| 642 | - title3: '', | |
| 643 | - title4: '', | |
| 644 | - title5: '', | |
| 645 | - title6: '', | |
| 646 | - value: '', | |
| 647 | - } | |
| 648 | - this.addMing = false | |
| 649 | - this.multipleSelection = [] | |
| 650 | - this.ruleAddData = {} | |
| 651 | - for (let index = 0; index < this.AddData.length; index++) { | |
| 652 | - const element = this.AddData[index]; | |
| 653 | - if(element.title4 == '是') { | |
| 654 | - this.ruleAddData[element.title2] = [{ | |
| 655 | - required: true, | |
| 656 | - message: '请填写' + element.title1, | |
| 657 | - trigger: 'change' | |
| 658 | - }] | |
| 659 | - | |
| 660 | - } | |
| 661 | - | |
| 662 | - } | |
| 663 | - } else { | |
| 664 | - this.$message({ | |
| 665 | - message: '请填写完整信息', | |
| 666 | - type: 'error' | |
| 667 | - }) | |
| 668 | - return false; | |
| 669 | - } | |
| 670 | - }) | |
| 671 | - }, | |
| 672 | - mingClose() { | |
| 673 | - this.multipleSelection = [] | |
| 674 | - this.ziyuanData = [] | |
| 675 | - this.addMing = false | |
| 676 | - }, | |
| 677 | - changeRelatedMerchants(e) { | |
| 678 | - console.error(e) | |
| 679 | - this.shopId = this.shopList[e].id | |
| 680 | - this.formInline.tenantName = this.shopList[e].name | |
| 681 | - this.formInline.tenantTelephone = this.shopList[e].phone | |
| 682 | - }, | |
| 683 | - hefuRemove() { | |
| 684 | - this.hefuData = [] | |
| 685 | - }, | |
| 686 | - hefuSuccess(response, file, fileList) { | |
| 687 | - this.hefuData = [] | |
| 688 | - console.error(response) | |
| 689 | - let fd = new FormData() | |
| 690 | - fd.append('file', response.raw) | |
| 691 | - fd.append('filePath', 'hetong') | |
| 692 | - miniioupload(fd).then(res => { | |
| 693 | - console.error(res) | |
| 694 | - const fileMsg = { | |
| 695 | - name: response.name, | |
| 696 | - url: res.data, | |
| 697 | - } | |
| 698 | - this.hefuData.push(fileMsg) | |
| 699 | - }) | |
| 700 | - }, | |
| 701 | - | |
| 702 | - | |
| 703 | - }, | |
| 704 | - }; | |
| 549 | + } | |
| 550 | + } | |
| 705 | 551 | </script> |
| 706 | 552 | <style lang="css"> |
| 707 | 553 | .el-upload { |
| ... | ... | @@ -719,4 +565,11 @@ |
| 719 | 565 | font-size: 15px; |
| 720 | 566 | color: #303133; |
| 721 | 567 | } |
| 568 | + | |
| 569 | + .iterem { | |
| 570 | + z-index: 99; | |
| 571 | + margin-left: 10px; | |
| 572 | + height: 40px; | |
| 573 | + line-height: 25px; | |
| 574 | + } | |
| 722 | 575 | </style> | ... | ... |
admin-web-master/src/components/buscha/busCha.vue
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | <TitleWithCircle title="合同信息" /> |
| 8 | 8 | <div style="padding: 20px;margin-top: 10px;"> |
| 9 | 9 | <el-form :model="info" ref="ruleForm" label-width="140px" class="demo-ruleForm"> |
| 10 | - <el-row :gutter="20"> | |
| 10 | + <!-- <el-row :gutter="20"> | |
| 11 | 11 | <el-col :span="9"> |
| 12 | 12 | <el-form-item label="合同类型" prop="contractType"> |
| 13 | 13 | <div class="duiqi">{{info.contractType}}</div> |
| ... | ... | @@ -90,6 +90,16 @@ |
| 90 | 90 | <div class="duiqi">{{info.tenantTelephone}}</div> |
| 91 | 91 | </el-form-item> |
| 92 | 92 | </el-col> |
| 93 | + </el-row> --> | |
| 94 | + <el-row :gutter="20"> | |
| 95 | + <el-col :span="item.width == '50%(半行)'?12:item.width == '100%(一行)'?24:12" v-for="(item,index) in list1" > | |
| 96 | + <el-form-item :label="item.name" prop="appendicesContract" v-if="item.type == '附件'"> | |
| 97 | + <div class="duiqi greens" @click ="item.value?openfile(item.value):''">{{item.value?'查看详情':'暂无文件'}}</div> | |
| 98 | + </el-form-item> | |
| 99 | + <el-form-item :label="item.name" prop="paymentDay" v-else-if="item.type != '资源' && item.type != '商家'"> | |
| 100 | + <div class="duiqi">{{item.value}}</div> | |
| 101 | + </el-form-item> | |
| 102 | + </el-col> | |
| 93 | 103 | </el-row> |
| 94 | 104 | <el-form-item label="附件信息" prop="appendicesContract"> |
| 95 | 105 | <div class="duiqi greens" @click ="info.appendicesContract?openfile(info.appendicesContract):''">{{info.appendicesContract?'查看详情':'暂无文件'}}</div> |
| ... | ... | @@ -177,19 +187,19 @@ |
| 177 | 187 | <div> |
| 178 | 188 | <el-table :data="tableData" |
| 179 | 189 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"> |
| 180 | - <el-table-column label="商铺名称" min-width="150"> | |
| 190 | + <el-table-column label="商铺名称"> | |
| 181 | 191 | <template slot-scope="scope"> |
| 182 | 192 | {{scope.row.shopName ? scope.row.shopName : scope.row.advertisingName?scope.row.advertisingName:scope.row.venueName}} |
| 183 | 193 | |
| 184 | 194 | </template> |
| 185 | 195 | </el-table-column> |
| 186 | - <el-table-column label="实际使用面积" min-width="300"> | |
| 196 | + <el-table-column label="实际使用面积" > | |
| 187 | 197 | <template slot-scope="scope"> |
| 188 | 198 | {{scope.row.actualArea ? scope.row.actualArea : scope.row.actualUsableArea?scope.row.actualUsableArea:'-'}} |
| 189 | 199 | |
| 190 | 200 | </template> |
| 191 | 201 | </el-table-column> |
| 192 | - <el-table-column label="类型" min-width="100"> | |
| 202 | + <el-table-column label="类型" > | |
| 193 | 203 | <template slot-scope="scope"> |
| 194 | 204 | {{scope.row.shopName ? '商铺' : scope.row.advertisingType?scope.row.advertisingType:'场地'}} |
| 195 | 205 | |
| ... | ... | @@ -201,26 +211,38 @@ |
| 201 | 211 | |
| 202 | 212 | </template> |
| 203 | 213 | </el-table-column> --> |
| 204 | - <!-- <el-table-column label="操作" min-width="300"> | |
| 205 | - <template slot-scope="scope"> | |
| 206 | - <div @click="" class="tableBtn greens">查看</div> | |
| 207 | - </template> | |
| 208 | - </el-table-column> --> | |
| 214 | + <el-table-column label="操作" > | |
| 215 | + <template slot-scope="scope"> | |
| 216 | + <div class="tableBtn greens" @click="details(scope.row)">查看</div> | |
| 217 | + </template> | |
| 218 | + </el-table-column> | |
| 209 | 219 | </el-table> |
| 210 | 220 | |
| 211 | 221 | </div> |
| 212 | 222 | </div> |
| 213 | 223 | </el-tab-pane> |
| 214 | 224 | </el-tabs> |
| 225 | + <div> | |
| 226 | + <el-button class="buttonHover" | |
| 227 | + style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;margin-top: 20px;" | |
| 228 | + @click="changetype">返回</el-button> | |
| 229 | + </div> | |
| 215 | 230 | </div> |
| 216 | 231 | <div v-show="type == '2'"> |
| 217 | 232 | <oneht ref="onhet"></oneht> |
| 218 | 233 | </div> |
| 219 | - <div> | |
| 220 | - <el-button class="buttonHover" | |
| 221 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;margin-top: 20px;" | |
| 222 | - @click="changetype">返回</el-button> | |
| 234 | + <div v-show="type == '3'"> | |
| 235 | + <div v-if="detailstype == '商铺'"> | |
| 236 | + <resourceCommodity :editbgid="detailsinfo" @removeonaction="removeonaction"></resourceCommodity> | |
| 237 | + </div> | |
| 238 | + <div v-if="detailstype == '广告位'"> | |
| 239 | + <chakanmap :editbgid="detailsinfo" @removeonaction="removeonaction"></chakanmap> | |
| 240 | + </div> | |
| 241 | + <div v-if="detailstype == '场地'"> | |
| 242 | + <chakancd :editbgid="detailsinfo" @removeonaction="removeonaction"></chakancd> | |
| 243 | + </div> | |
| 223 | 244 | </div> |
| 245 | + | |
| 224 | 246 | </div> |
| 225 | 247 | </template> |
| 226 | 248 | |
| ... | ... | @@ -236,10 +258,16 @@ |
| 236 | 258 | import { |
| 237 | 259 | cerePlatformMerchantinfo |
| 238 | 260 | } from '../../api/newly.js' |
| 261 | + import resourceCommodity from '@/components/resourceCommodity/index' | |
| 262 | + import chakanmap from '@/components/chakan/map' | |
| 263 | + import chakancd from '@/components/chakan/cd' | |
| 239 | 264 | export default { |
| 240 | 265 | components: { |
| 241 | 266 | oneht, |
| 242 | - TitleWithCircle | |
| 267 | + TitleWithCircle, | |
| 268 | + chakancd, | |
| 269 | + chakanmap, | |
| 270 | + resourceCommodity, | |
| 243 | 271 | }, |
| 244 | 272 | props: { |
| 245 | 273 | info: { |
| ... | ... | @@ -261,11 +289,16 @@ |
| 261 | 289 | shopIds: [], |
| 262 | 290 | shop: {}, |
| 263 | 291 | newshop:{}, |
| 264 | - newinfo:{} | |
| 292 | + newinfo:{}, | |
| 293 | + detailsinfo:{}, | |
| 294 | + detailstype:'', | |
| 295 | + list1:[] | |
| 265 | 296 | } |
| 266 | 297 | }, |
| 267 | 298 | created() { |
| 268 | 299 | console.log(this.info) |
| 300 | + this.list1 = JSON.parse(this.info.templateInformation) | |
| 301 | + console.log(this.list1) | |
| 269 | 302 | this.url = process.env.VUE_APP_DOMAIN_PREFIX_1 |
| 270 | 303 | queryByContractcontractNumber({ |
| 271 | 304 | contractNumber: this.info.contractNumber |
| ... | ... | @@ -287,6 +320,14 @@ |
| 287 | 320 | |
| 288 | 321 | }, |
| 289 | 322 | methods: { |
| 323 | + removeonaction() { | |
| 324 | + this.type = '1' | |
| 325 | + }, | |
| 326 | + details(row) { | |
| 327 | + this.detailstype = row.shopName?'商铺':row.advertisingType?'广告位':'场地' | |
| 328 | + this.detailsinfo = row | |
| 329 | + this.type = '3' | |
| 330 | + }, | |
| 290 | 331 | openfile(e) { |
| 291 | 332 | if (e) { |
| 292 | 333 | const fullUrl = this.$baseURL + e; | ... | ... |
admin-web-master/src/components/chakan/mb.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div> | |
| 3 | + <TitleWithCircle title="模版" style="margin-bottom: 20px;" /> | |
| 4 | + <el-form :model="forminfo" :rules="rulesmb" ref="ruleForm1" label-width="130px" class="demo-ruleForm"> | |
| 5 | + <el-row :gutter="20"> | |
| 6 | + <el-col :span="12" > | |
| 7 | + <el-form-item label="模版名称" prop="templateName"> | |
| 8 | + <div class="duiqi">{{forminfo.templateName || '无'}}</div> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="12" style="display: flex;align-items: center;"> | |
| 12 | + <el-form-item label="word模板" prop="templateAttachment" > | |
| 13 | + <div class="duiqi tableBtn" :class="forminfo.templateAttachment?'greens':''" @click ="forminfo.templateAttachment?openfile($baseURL+forminfo.templateAttachment):''">{{forminfo.templateAttachment?'查看详情':'无'}}</div> | |
| 14 | + </el-form-item> | |
| 15 | + </el-col> | |
| 16 | + </el-row> | |
| 17 | + </el-form> | |
| 18 | + <TitleWithCircle title="合同信息" style="margin-bottom: 20px;" /> | |
| 19 | + <mbadd :list1="list1" /> | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + <div v-if="info.id" style="margin-top: 20px;margin-left: 65px;"> | |
| 24 | + <el-button @click="close()" class="buttonHover" | |
| 25 | + style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">返回</el-button> | |
| 26 | + </div> | |
| 27 | + <div v-else style="margin-top: 20px;margin-left: 65px;"> | |
| 28 | + <el-button @click="add()" style="background-color: #3F9B6A;color: #fff;">确定</el-button> | |
| 29 | + <el-button @click="close()" class="buttonHover" | |
| 30 | + style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button> | |
| 31 | + </div> | |
| 32 | + </div> | |
| 33 | +</template> | |
| 34 | +<script> | |
| 35 | + import upfile from "@/components/fujianUpload/fujianList" | |
| 36 | + import TitleWithCircle from '@/components/top/index'; | |
| 37 | + import mbadd from '@/components/change/mbadd'; | |
| 38 | + import { | |
| 39 | + cereContractTemplateadd | |
| 40 | + } from '@/api/newly.js' | |
| 41 | +import { Input } from "element-ui"; | |
| 42 | + export default { | |
| 43 | + components: { | |
| 44 | + TitleWithCircle, | |
| 45 | + mbadd, | |
| 46 | + upfile | |
| 47 | + }, | |
| 48 | + data() { | |
| 49 | + return { | |
| 50 | + list1: [ | |
| 51 | + { | |
| 52 | + name: '合同名称', | |
| 53 | + key: 'contractName', | |
| 54 | + type: '单行文本', | |
| 55 | + isrequired: '是', | |
| 56 | + width: '50%(半行)', | |
| 57 | + length: '50', | |
| 58 | + value: '', | |
| 59 | + }, | |
| 60 | + ], | |
| 61 | + rulesmb:{ | |
| 62 | + templateName: [{ | |
| 63 | + required: true, | |
| 64 | + message: '请填写模版名称', | |
| 65 | + trigger: 'change' | |
| 66 | + }], | |
| 67 | + templateAttachment: [{ | |
| 68 | + required: true, | |
| 69 | + message: '请上传word模板', | |
| 70 | + trigger: 'change' | |
| 71 | + }], | |
| 72 | + }, | |
| 73 | + ruleAddData:{}, | |
| 74 | + forminfo:{ | |
| 75 | + templateName: '', // 模板名称 | |
| 76 | + templateAttachment: '', // 模板附件路径或名称 | |
| 77 | + otherInfo: '', // 其他信息 | |
| 78 | + templateType: '', // 模板类型 | |
| 79 | + creator: '', // 创建人 | |
| 80 | + createTime: '', // 创建时间 | |
| 81 | + remark1: '', // 备注1 | |
| 82 | + remark2: '' // 备注2 | |
| 83 | + }, | |
| 84 | + ruleaddmbitem:{ | |
| 85 | + name: [{ | |
| 86 | + required: true, | |
| 87 | + message: '请填写字段名称', | |
| 88 | + trigger: 'change' | |
| 89 | + }], | |
| 90 | + key: [{ | |
| 91 | + required: true, | |
| 92 | + message: '请填写字段key', | |
| 93 | + trigger: 'change' | |
| 94 | + }], | |
| 95 | + type: [{ | |
| 96 | + required: true, | |
| 97 | + message: '请选择字段类型', | |
| 98 | + trigger: 'change' | |
| 99 | + }], | |
| 100 | + isrequired: [{ | |
| 101 | + required: true, | |
| 102 | + message: '请选择是否必填', | |
| 103 | + trigger: 'change' | |
| 104 | + }], | |
| 105 | + width: [{ | |
| 106 | + required: true, | |
| 107 | + message: '请选择字段宽度', | |
| 108 | + trigger: 'change' | |
| 109 | + }], | |
| 110 | + // length: [{ | |
| 111 | + // required: true, | |
| 112 | + // message: '请填写限制规则', | |
| 113 | + // trigger: 'change' | |
| 114 | + // }], | |
| 115 | + }, | |
| 116 | + addmbitem: { | |
| 117 | + name: '', | |
| 118 | + key: '', | |
| 119 | + type: '', | |
| 120 | + isrequired: '', | |
| 121 | + width: '', | |
| 122 | + length: '', | |
| 123 | + value: '', | |
| 124 | + list:[] | |
| 125 | + }, | |
| 126 | + addMing:false, | |
| 127 | + | |
| 128 | + } | |
| 129 | + }, | |
| 130 | + computed: { | |
| 131 | + mobantype() { | |
| 132 | + return this.$store.state.app.mobantype; | |
| 133 | + } | |
| 134 | + }, | |
| 135 | + props: { | |
| 136 | + info: { | |
| 137 | + type: Object, | |
| 138 | + default: {} | |
| 139 | + } | |
| 140 | + }, | |
| 141 | + async created() { | |
| 142 | + if (this.info.id) { | |
| 143 | + this.info.otherInfo = JSON.parse(this.info.otherInfo) | |
| 144 | + this.list1 = this.info.otherInfo | |
| 145 | + console.error(this.list1) | |
| 146 | + this.forminfo = this.info | |
| 147 | + } | |
| 148 | + }, | |
| 149 | + methods: { | |
| 150 | + inputvalue(e,index){ | |
| 151 | + console.error(e) | |
| 152 | + this.addmbitem.list[index].value = e | |
| 153 | + }, | |
| 154 | + additemlist() { | |
| 155 | + this.addmbitem.list.push({ | |
| 156 | + label: '', | |
| 157 | + value: '' | |
| 158 | + }) | |
| 159 | + }, | |
| 160 | + async mingShow() { | |
| 161 | + this.addMing = true | |
| 162 | + }, | |
| 163 | + minSev() { | |
| 164 | + // return | |
| 165 | + this.$refs.addmbitem.validate((valid) => { | |
| 166 | + console.log(valid) | |
| 167 | + if (valid) { | |
| 168 | + this.list1.push(this.addmbitem) | |
| 169 | + this.addmbitem = { | |
| 170 | + name: '', | |
| 171 | + key: '', | |
| 172 | + type: '', | |
| 173 | + isrequired: '', | |
| 174 | + width: '', | |
| 175 | + length: '', | |
| 176 | + value: '', | |
| 177 | + } | |
| 178 | + this.addMing = false | |
| 179 | + } else { | |
| 180 | + this.$message({ | |
| 181 | + message: '请填写完整信息', | |
| 182 | + type: 'error' | |
| 183 | + }) | |
| 184 | + return false; | |
| 185 | + } | |
| 186 | + }) | |
| 187 | + }, | |
| 188 | + mingClose() { | |
| 189 | + this.addMing = false | |
| 190 | + }, | |
| 191 | + openfile(e) { | |
| 192 | + if (e) { | |
| 193 | + const fullUrl = e; | |
| 194 | + try { | |
| 195 | + window.open(fullUrl, '_blank'); // 在新标签页中打开文件 | |
| 196 | + } catch (error) { | |
| 197 | + console.error('打开文件失败:', error); | |
| 198 | + } | |
| 199 | + } else { | |
| 200 | + console.error('无文件可查看'); | |
| 201 | + } | |
| 202 | + }, | |
| 203 | + changimg(e, type) { | |
| 204 | + this.forminfo[type] = e | |
| 205 | + }, | |
| 206 | + changimg(e, type) { | |
| 207 | + this.forminfo[type] = e | |
| 208 | + }, | |
| 209 | + openfile(e) { | |
| 210 | + if (e) { | |
| 211 | + const fullUrl = e; | |
| 212 | + try { | |
| 213 | + window.open(fullUrl, '_blank'); // 在新标签页中打开文件 | |
| 214 | + } catch (error) { | |
| 215 | + console.error('打开文件失败:', error); | |
| 216 | + } | |
| 217 | + } else { | |
| 218 | + console.error('无文件可查看'); | |
| 219 | + } | |
| 220 | + }, | |
| 221 | + //获取当前时间 | |
| 222 | + updateCurrentTime() { | |
| 223 | + const now = new Date(); | |
| 224 | + const year = now.getFullYear(); | |
| 225 | + const month = (now.getMonth() + 1).toString().padStart(2, '0'); | |
| 226 | + const day = now.getDate().toString().padStart(2, '0'); | |
| 227 | + const hours = now.getHours().toString().padStart(2, '0'); | |
| 228 | + const minutes = now.getMinutes().toString().padStart(2, '0'); | |
| 229 | + const seconds = now.getSeconds().toString().padStart(2, '0'); | |
| 230 | + | |
| 231 | + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | |
| 232 | + }, | |
| 233 | + add() { | |
| 234 | + console.error(this.list1) | |
| 235 | + this.$refs.ruleForm1.validate((valid) => { | |
| 236 | + console.log(valid) | |
| 237 | + if (valid) { | |
| 238 | + this.forminfo.otherInfo = JSON.stringify(this.list1) | |
| 239 | + console.log( | |
| 240 | + {...this.forminfo} | |
| 241 | + ) | |
| 242 | + // return | |
| 243 | + cereContractTemplateadd({ | |
| 244 | + ...this.forminfo, | |
| 245 | + creator: localStorage.getItem('roleName'), | |
| 246 | + createTime: this.updateCurrentTime(), | |
| 247 | + }).then(res => { | |
| 248 | + console.error(res) | |
| 249 | + if (res.code == 200) { | |
| 250 | + this.$message({ | |
| 251 | + message: '添加成功', | |
| 252 | + type: 'success' | |
| 253 | + }) | |
| 254 | + this.$emit('removeonaction', '1') | |
| 255 | + } else { | |
| 256 | + this.$message({ | |
| 257 | + message: res.msg, | |
| 258 | + type: 'error' | |
| 259 | + }) | |
| 260 | + } | |
| 261 | + | |
| 262 | + }) | |
| 263 | + } else { | |
| 264 | + this.$message({ | |
| 265 | + message: '请填写完整信息', | |
| 266 | + type: 'error' | |
| 267 | + }) | |
| 268 | + return false; | |
| 269 | + } | |
| 270 | + }) | |
| 271 | + }, | |
| 272 | + close() { | |
| 273 | + this.$emit('removeonaction', '1') | |
| 274 | + }, | |
| 275 | + } | |
| 276 | + } | |
| 277 | +</script> | |
| 278 | +<style lang="css"> | |
| 279 | + .el-upload { | |
| 280 | + display: block; | |
| 281 | + text-align: left; | |
| 282 | + } | |
| 283 | + | |
| 284 | + .el-dialog__header { | |
| 285 | + background-color: #F2F3F5; | |
| 286 | + text-align: left; | |
| 287 | + } | |
| 288 | + | |
| 289 | + .el-dialog__title { | |
| 290 | + line-height: 30px; | |
| 291 | + font-size: 15px; | |
| 292 | + color: #303133; | |
| 293 | + } | |
| 294 | + | |
| 295 | + .iterem { | |
| 296 | + z-index: 99; | |
| 297 | + margin-left: 10px; | |
| 298 | + height: 40px; | |
| 299 | + line-height: 25px; | |
| 300 | + } | |
| 301 | +</style> | ... | ... |
admin-web-master/src/components/change/mbachakan.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div v-if="isshow"> | |
| 3 | + <el-form ref="ruleForm" :model="forminfo" :rules="ruleAddData" label-width="130px" class="demo-ruleForm"> | |
| 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" | |
| 6 | + :key="index"> | |
| 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> | |
| 9 | + </el-form-item> | |
| 10 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '单行数字文本'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 11 | + <el-input v-model.number="item.value" placeholder="请输入" :maxlength="item.length?item.length:200" | |
| 12 | + @input="validateNumber(index, $event,item.key)"></el-input> | |
| 13 | + </el-form-item> | |
| 14 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '多行文本'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 15 | + <el-input show-word-limit rows="4" v-model="item.value" placeholder="请输入" type="textarea" | |
| 16 | + :maxlength="item.length?item.length:200" @input="e=>inputvalue(e,item.key)"/> | |
| 17 | + </el-form-item> | |
| 18 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '下拉选择'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 19 | + <el-select v-model="item.value" clearable placeholder="请选择" style="width: 100%;" @change="e=>changexl(e,item.key)"> | |
| 20 | + <el-option v-for="(item1,index1) in item.list" :key="index1" :label="item1.label" | |
| 21 | + :value="item1.value"></el-option> | |
| 22 | + </el-select> | |
| 23 | + </el-form-item> | |
| 24 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '日期'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 25 | + <el-date-picker @change="e=>changetime(e,item.key)" v-model="item.value" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" | |
| 26 | + style="width: 100%;"></el-date-picker> | |
| 27 | + </el-form-item> | |
| 28 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '付款日'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 29 | + <el-select v-model="item.value" placeholder="请选择" style="width: 100%;" @change="e=>changexl(e,item.key)"> | |
| 30 | + <el-option :label="val+'号'" :value="val+'号'" v-for="val in 31"></el-option> | |
| 31 | + </el-select> | |
| 32 | + </el-form-item> | |
| 33 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '商家'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 34 | + <el-select v-model="item.value" placeholder="请选择" style="width: 100%;" @change="e=>changexl(e,item.key)"> | |
| 35 | + <el-option v-for="(item,index) in shopList" :key="index" :label="item.name+ ' ' + item.phone" | |
| 36 | + :value="item.id+''" /> | |
| 37 | + </el-select> | |
| 38 | + </el-form-item> | |
| 39 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '附件'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 40 | + <upfile :accept="'.docx,.doc'" filePath="mb" :inputtype="item.name" :value="item.value" | |
| 41 | + @changimg="e=>changimg(e,index,item.key)"></upfile> | |
| 42 | + </el-form-item> | |
| 43 | + <i v-if="iscopy && item.type != '资源'" class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit(item.name)"></i> | |
| 44 | + <el-form-item label="绑定资源" :prop="item.key" v-if="item.type == '资源' " style="width: 100%;"> | |
| 45 | + <div style="border: 1px solid #E5E5E5;padding: 1px" id="huodong"> | |
| 46 | + <div v-if="!iscopy && item.list.length != 1" | |
| 47 | + style="font-size: 14px;border-bottom: 1px solid #E5E5E5;display: flex;justify-content: space-between;line-height:20px;background:#F2F3F5;"> | |
| 48 | + <div></div> | |
| 49 | + <div style="color: #3F9B6A;padding:10px;" @click="mingShow(index,item.key)"> | |
| 50 | + 添加 | |
| 51 | + </div> | |
| 52 | + </div> | |
| 53 | + <div style="padding: 15px;"> | |
| 54 | + <div style="padding: 0px 20px 0px 0px"> | |
| 55 | + <el-table :data="iscopy?[{}]:item.list" | |
| 56 | + :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"> | |
| 57 | + <el-table-column label="序号"> | |
| 58 | + <template slot-scope="scope"> | |
| 59 | + {{scope.$index + 1}} | |
| 60 | + </template> | |
| 61 | + </el-table-column> | |
| 62 | + <el-table-column label="资源名称" show-overflow-tooltip> | |
| 63 | + <template slot-scope="scope" > | |
| 64 | + <div style="display: flex;" v-if="iscopy"> | |
| 65 | + <div>资源名称</div> | |
| 66 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('资源名称')"></i> | |
| 67 | + </div> | |
| 68 | + <div v-else> {{scope.row.shopName?scope.row.shopName:scope.row.advertisingName?scope.row.advertisingName:scope.row.venueName}}</div> | |
| 69 | + </template> | |
| 70 | + </el-table-column> | |
| 71 | + <el-table-column label="资源类型" show-overflow-tooltip> | |
| 72 | + <template slot-scope="scope" > | |
| 73 | + <div style="display: flex;" v-if="iscopy"> | |
| 74 | + <div>资源类型</div> | |
| 75 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('资源类型')"></i> | |
| 76 | + </div> | |
| 77 | + <div v-else> {{scope.row.shopName ? '商铺' : scope.row.advertisingType?scope.row.advertisingType:'场地'}}</div> | |
| 78 | + </template> | |
| 79 | + </el-table-column> | |
| 80 | + <el-table-column label="详细地址" show-overflow-tooltip> | |
| 81 | + <template slot-scope="scope" > | |
| 82 | + <div style="display: flex;" v-if="iscopy"> | |
| 83 | + <div>详细地址</div> | |
| 84 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('详细地址')"></i> | |
| 85 | + </div> | |
| 86 | + <div v-else>{{scope.row.detailedLocation}}</div> | |
| 87 | + </template> | |
| 88 | + </el-table-column> | |
| 89 | + | |
| 90 | + <el-table-column prop="notes" label="实际使用面积" > | |
| 91 | + <template slot-scope="scope" > | |
| 92 | + <div style="display: flex;" v-if="iscopy"> | |
| 93 | + <div>实际使用面积</div> | |
| 94 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('实际使用面积')"></i> | |
| 95 | + </div> | |
| 96 | + <div v-else> {{scope.row.actualArea ? scope.row.actualArea : scope.row.actualUsableArea?scope.row.actualUsableArea:'-'}}</div> | |
| 97 | + </template> | |
| 98 | + | |
| 99 | + </el-table-column> | |
| 100 | + | |
| 101 | + <el-table-column label="操作" v-if="!iscopy"> | |
| 102 | + <template slot-scope="scope"> | |
| 103 | + <div @click="MingDelete(scope.$index)" class="tableBtn greens">删除</div> | |
| 104 | + </template> | |
| 105 | + </el-table-column> | |
| 106 | + </el-table> | |
| 107 | + </div> | |
| 108 | + </div> | |
| 109 | + </div> | |
| 110 | + </el-form-item> | |
| 111 | + </el-col> | |
| 112 | + </el-row> | |
| 113 | + </el-form> | |
| 114 | + <el-dialog :visible.sync="addcl" title="选择策略" width="65%" append-to-body center :close-on-click-modal="false" | |
| 115 | + :close-on-press-escape="false" :show-close="false"> | |
| 116 | + <cl v-if="addcl" @minSev="minSevcl" @mingClose="mingClosecl"></cl> | |
| 117 | + </el-dialog> | |
| 118 | + <el-dialog :visible.sync="addzy" title="选择资源" width="65%" append-to-body center :close-on-click-modal="false" | |
| 119 | + :close-on-press-escape="false" :show-close="false"> | |
| 120 | + <zy :maxSelection="1" publishStatus="2" v-if="addzy" @mingClose="mingClosezy" @minSev="minSevzy"></zy> | |
| 121 | + </el-dialog> | |
| 122 | + </div> | |
| 123 | +</template> | |
| 124 | +<script> | |
| 125 | + import upfile from "@/components/fujianUpload/fujianList" | |
| 126 | + import upimg from "@/components/ImageUpload/index" | |
| 127 | + import cl from "@/components/change/cl" | |
| 128 | + import zy from "@/components/change/zy" | |
| 129 | + import { | |
| 130 | + cerePlatformMerchant, | |
| 131 | + } from '@/api/newly.js' | |
| 132 | + export default { | |
| 133 | + components: { | |
| 134 | + upfile, | |
| 135 | + upimg, | |
| 136 | + cl, | |
| 137 | + zy | |
| 138 | + }, | |
| 139 | + props: { | |
| 140 | + list1: { | |
| 141 | + type: Array, | |
| 142 | + default: [] | |
| 143 | + }, | |
| 144 | + iscopy: { | |
| 145 | + type: Boolean, | |
| 146 | + default: false | |
| 147 | + }, | |
| 148 | + | |
| 149 | + }, | |
| 150 | + data() { | |
| 151 | + return { | |
| 152 | + keyon:'', | |
| 153 | + addcl: false, | |
| 154 | + addzy: false, | |
| 155 | + shopId: '', | |
| 156 | + shopList: [], | |
| 157 | + ruleAddData: { | |
| 158 | + | |
| 159 | + }, | |
| 160 | + onindex:null, | |
| 161 | + forminfo:{}, | |
| 162 | + isshow:false | |
| 163 | + } | |
| 164 | + }, | |
| 165 | + watch:{ | |
| 166 | + list1(val) { | |
| 167 | + this.isshow = false | |
| 168 | + if(this.list1.length>0) { | |
| 169 | + let c1 = {} | |
| 170 | + let info1 = {} | |
| 171 | + for (let index = 0; index < this.list1.length; index++) { | |
| 172 | + const element = this.list1[index]; | |
| 173 | + if(element.isrequired == '是') { | |
| 174 | + c1[element.key] = [{ | |
| 175 | + required: true, | |
| 176 | + message: '请填写' + element.name, | |
| 177 | + trigger: 'change' | |
| 178 | + }] | |
| 179 | + | |
| 180 | + } | |
| 181 | + info1[element.key] = element.value+'' | |
| 182 | + } | |
| 183 | + this.forminfo = info1 | |
| 184 | + this.ruleAddData = c1 | |
| 185 | + this.isshow = true | |
| 186 | + // this.$updateRules(this.ruleAddData) | |
| 187 | + console.error(this.ruleAddData) | |
| 188 | + console.error({...this.forminfo}) | |
| 189 | + } | |
| 190 | + }, | |
| 191 | + }, | |
| 192 | + async created() { | |
| 193 | + await cerePlatformMerchant({ | |
| 194 | + checkState: '2', | |
| 195 | + pageNumber: 0, | |
| 196 | + pageSize: 1000, | |
| 197 | + }).then(res => { | |
| 198 | + this.shopList = res.data.content | |
| 199 | + // console.error(this.shopList) | |
| 200 | + }) | |
| 201 | + this.isshow = false | |
| 202 | + if(this.list1.length>0) { | |
| 203 | + let c1 = {} | |
| 204 | + let info1 = {} | |
| 205 | + for (let index = 0; index < this.list1.length; index++) { | |
| 206 | + const element = this.list1[index]; | |
| 207 | + if(element.isrequired == '是') { | |
| 208 | + c1[element.key] = [{ | |
| 209 | + required: true, | |
| 210 | + message: '请填写' + element.name, | |
| 211 | + trigger: 'change' | |
| 212 | + }] | |
| 213 | + | |
| 214 | + } | |
| 215 | + info1[element.key] = element.value+'' | |
| 216 | + } | |
| 217 | + this.forminfo = info1 | |
| 218 | + this.ruleAddData = c1 | |
| 219 | + this.isshow = true | |
| 220 | + // this.$updateRules(this.ruleAddData) | |
| 221 | + console.error(this.ruleAddData) | |
| 222 | + console.error({...this.forminfo}) | |
| 223 | + } | |
| 224 | + | |
| 225 | + }, | |
| 226 | + methods: { | |
| 227 | + MingDelete(item) { | |
| 228 | + this.list1[this.onindex].list = [] | |
| 229 | + }, | |
| 230 | + // 验证输入框 | |
| 231 | + async yanzhen() { | |
| 232 | + let c1 = false | |
| 233 | + await this.$refs.ruleForm.validate(async (valid) => { | |
| 234 | + if (valid) { | |
| 235 | + c1 = true | |
| 236 | + } else { | |
| 237 | + this.$message({ | |
| 238 | + type: 'error', | |
| 239 | + message: '请填写必填项' | |
| 240 | + }) | |
| 241 | + c1 = false | |
| 242 | + } | |
| 243 | + }) | |
| 244 | + return c1 | |
| 245 | + }, | |
| 246 | + | |
| 247 | + inputvalue(e,onindex) { | |
| 248 | + this.forminfo[onindex] = e | |
| 249 | + }, | |
| 250 | + inputnumvalue(e,onindex) { | |
| 251 | + this.forminfo[onindex] = e | |
| 252 | + }, | |
| 253 | + changetime(e,onindex){ | |
| 254 | + this.forminfo[onindex] = e | |
| 255 | + }, | |
| 256 | + changexl(e,onindex){ | |
| 257 | + this.forminfo[onindex] = e | |
| 258 | + }, | |
| 259 | + async copytit(content){ | |
| 260 | + // 复制结果 | |
| 261 | + let copyResult = true | |
| 262 | + // 设置想要复制的文本内容 | |
| 263 | + const text = content || '复制内容为空哦~'; | |
| 264 | + // 判断是否支持clipboard方式 | |
| 265 | + if (!!window.navigator.clipboard) { | |
| 266 | + // 利用clipboard将文本写入剪贴板(这是一个异步promise) | |
| 267 | + await window.navigator.clipboard.writeText(text).then((res) => { | |
| 268 | + console.log('复制成功'); | |
| 269 | + }).catch((err) => { | |
| 270 | + console.log('复制失败--采取第二种复制方案', err); | |
| 271 | + // clipboard方式复制失败 则采用document.execCommand()方式进行尝试 | |
| 272 | + copyResult = copyContent2(text) | |
| 273 | + }) | |
| 274 | + } else { | |
| 275 | + // 不支持clipboard方式 则采用document.execCommand()方式 | |
| 276 | + copyResult = copyContent2(text) | |
| 277 | + } | |
| 278 | + // 返回复制操作的最终结果 | |
| 279 | + return copyResult; | |
| 280 | + }, | |
| 281 | + validateNumber(index, value,onindex) { | |
| 282 | + // 使用正则表达式确保输入的是数字,并且可以包含最多两位小数 | |
| 283 | + const regex = /^\d+(\.\d{1,2})?$/; | |
| 284 | + if (!regex.test(value)) { | |
| 285 | + this.list1[index].value = value.replace(/[^\d.]/g, '').replace(/(\.\d{2}).*$/, '$1'); | |
| 286 | + | |
| 287 | + } | |
| 288 | + this.forminfo[onindex] = this.list1[index].value | |
| 289 | + }, | |
| 290 | + changimg(e, type,onindex) { | |
| 291 | + this.list1[type].value = e | |
| 292 | + this.forminfo[onindex] = e | |
| 293 | + }, | |
| 294 | + // changeRelatedMerchants(e) { | |
| 295 | + // this.shopId = e | |
| 296 | + // }, | |
| 297 | + async mingShow(index,key) { | |
| 298 | + this.addzy = true | |
| 299 | + this.onindex = index | |
| 300 | + this.keyon = key | |
| 301 | + }, | |
| 302 | + // 处理策略对话框的确认操作 | |
| 303 | + minSevcl(data) { | |
| 304 | + // 处理策略选择后的数据 | |
| 305 | + console.log('策略选择确认:', data); | |
| 306 | + this.addcl = false; // 关闭策略对话框 | |
| 307 | + }, | |
| 308 | + // 处理策略对话框的关闭操作 | |
| 309 | + mingClosecl() { | |
| 310 | + this.addcl = false; // 关闭策略对话框 | |
| 311 | + }, | |
| 312 | + // 处理资源对话框的确认操作 | |
| 313 | + minSevzy(data) { | |
| 314 | + // 处理资源选择后的数据 | |
| 315 | + console.log('资源选择确认:', data); | |
| 316 | + const filteredAddData = this.list1[this.onindex].list.filter(itemAdd => { | |
| 317 | + // 使用 some 方法检查 this.multipleSelection 中是否存在具有相同 id 的元素 | |
| 318 | + return !data.some(itemMultiple => itemMultiple.id === itemAdd.id); | |
| 319 | + }); | |
| 320 | + | |
| 321 | + console.error(this.list1[this.onindex].list) | |
| 322 | + //刷新渲染层 | |
| 323 | + this.$nextTick(() => { | |
| 324 | + this.list1[this.onindex].list = filteredAddData.concat(data) | |
| 325 | + this.list1[this.onindex].value = this.list1[this.onindex].list[0] | |
| 326 | + }) | |
| 327 | + this.forminfo[this.keyon] = data[0].id | |
| 328 | + this.addzy = false; // 关闭资源对话框 | |
| 329 | + }, | |
| 330 | + // 处理资源对话框的关闭操作 | |
| 331 | + mingClosezy() { | |
| 332 | + this.addzy = false; // 关闭资源对话框 | |
| 333 | + } | |
| 334 | + } | |
| 335 | + } | |
| 336 | +</script> | |
| 337 | +<style lang="css"> | |
| 338 | + .el-upload { | |
| 339 | + display: block; | |
| 340 | + text-align: left; | |
| 341 | + } | |
| 342 | + | |
| 343 | + .el-dialog__header { | |
| 344 | + background-color: #F2F3F5; | |
| 345 | + text-align: left; | |
| 346 | + } | |
| 347 | + | |
| 348 | + .el-dialog__title { | |
| 349 | + line-height: 30px; | |
| 350 | + font-size: 15px; | |
| 351 | + color: #303133; | |
| 352 | + } | |
| 353 | + | |
| 354 | + .iterem { | |
| 355 | + z-index: 99; | |
| 356 | + margin-left: 10px; | |
| 357 | + height: 40px; | |
| 358 | + line-height: 25px; | |
| 359 | + } | |
| 360 | +</style> | ... | ... |
admin-web-master/src/components/change/mbadd.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div v-if="isshow"> | |
| 3 | + <el-form ref="ruleForm" :model="forminfo" :rules="ruleAddData" label-width="130px" class="demo-ruleForm"> | |
| 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" | |
| 6 | + :key="index"> | |
| 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> | |
| 9 | + </el-form-item> | |
| 10 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '单行数字文本'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 11 | + <el-input v-model.number="item.value" placeholder="请输入" :maxlength="item.length?item.length:200" | |
| 12 | + @input="validateNumber(index, $event,item.key)"></el-input> | |
| 13 | + </el-form-item> | |
| 14 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '多行文本'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 15 | + <el-input show-word-limit rows="4" v-model="item.value" placeholder="请输入" type="textarea" | |
| 16 | + :maxlength="item.length?item.length:200" @input="e=>inputvalue(e,item.key)"/> | |
| 17 | + </el-form-item> | |
| 18 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '下拉选择'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 19 | + <el-select v-model="item.value" clearable placeholder="请选择" style="width: 100%;" @change="e=>changexl(e,item.key)"> | |
| 20 | + <el-option v-for="(item1,index1) in item.list" :key="index1" :label="item1.label" | |
| 21 | + :value="item1.value"></el-option> | |
| 22 | + </el-select> | |
| 23 | + </el-form-item> | |
| 24 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '日期'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 25 | + <el-date-picker @change="e=>changetime(e,item.key)" v-model="item.value" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" | |
| 26 | + style="width: 100%;"></el-date-picker> | |
| 27 | + </el-form-item> | |
| 28 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '付款日'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 29 | + <el-select v-model="item.value" placeholder="请选择" style="width: 100%;" @change="e=>changexl(e,item.key)"> | |
| 30 | + <el-option :label="val+'号'" :value="val+'号'" v-for="val in 31"></el-option> | |
| 31 | + </el-select> | |
| 32 | + </el-form-item> | |
| 33 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '商家'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 34 | + <el-select v-model="item.value" placeholder="请选择" style="width: 100%;" @change="e=>changexl(e,item.key)"> | |
| 35 | + <el-option v-for="(item,index) in shopList" :key="index" :label="item.name+ ' ' + item.phone" | |
| 36 | + :value="item.id+''" /> | |
| 37 | + </el-select> | |
| 38 | + </el-form-item> | |
| 39 | + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '附件'" :style="iscopy?'width: calc(100% - 35px)':''"> | |
| 40 | + <upfile :accept="'.docx,.doc'" filePath="mb" :inputtype="item.name" :value="item.value" | |
| 41 | + @changimg="e=>changimg(e,index,item.key)"></upfile> | |
| 42 | + </el-form-item> | |
| 43 | + <i v-if="iscopy && item.type != '资源'" class="el-icon-copy-document greens tableBtn iterem" @click.stop="copytit(item.name)"></i> | |
| 44 | + <el-form-item label="绑定资源" :prop="item.key" v-if="item.type == '资源' " style="width: 100%;"> | |
| 45 | + <div style="border: 1px solid #E5E5E5;padding: 1px" id="huodong"> | |
| 46 | + <div v-if="!iscopy && item.list.length != 1" | |
| 47 | + style="font-size: 14px;border-bottom: 1px solid #E5E5E5;display: flex;justify-content: space-between;line-height:20px;background:#F2F3F5;"> | |
| 48 | + <div></div> | |
| 49 | + <div style="color: #3F9B6A;padding:10px;" @click="mingShow(index,item.key)"> | |
| 50 | + 添加 | |
| 51 | + </div> | |
| 52 | + </div> | |
| 53 | + <div style="padding: 15px;"> | |
| 54 | + <div style="padding: 0px 20px 0px 0px"> | |
| 55 | + <el-table :data="iscopy?[{}]:item.list" | |
| 56 | + :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"> | |
| 57 | + <el-table-column label="序号"> | |
| 58 | + <template slot-scope="scope"> | |
| 59 | + {{scope.$index + 1}} | |
| 60 | + </template> | |
| 61 | + </el-table-column> | |
| 62 | + <el-table-column label="资源名称" show-overflow-tooltip> | |
| 63 | + <template slot-scope="scope" > | |
| 64 | + <div style="display: flex;" v-if="iscopy"> | |
| 65 | + <div>资源名称</div> | |
| 66 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('资源名称')"></i> | |
| 67 | + </div> | |
| 68 | + <div v-else> {{scope.row.shopName?scope.row.shopName:scope.row.advertisingName?scope.row.advertisingName:scope.row.venueName}}</div> | |
| 69 | + </template> | |
| 70 | + </el-table-column> | |
| 71 | + <el-table-column label="资源类型" show-overflow-tooltip> | |
| 72 | + <template slot-scope="scope" > | |
| 73 | + <div style="display: flex;" v-if="iscopy"> | |
| 74 | + <div>资源类型</div> | |
| 75 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('资源类型')"></i> | |
| 76 | + </div> | |
| 77 | + <div v-else> {{scope.row.shopName ? '商铺' : scope.row.advertisingType?scope.row.advertisingType:'场地'}}</div> | |
| 78 | + </template> | |
| 79 | + </el-table-column> | |
| 80 | + <el-table-column label="详细地址" show-overflow-tooltip> | |
| 81 | + <template slot-scope="scope" > | |
| 82 | + <div style="display: flex;" v-if="iscopy"> | |
| 83 | + <div>详细地址</div> | |
| 84 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('详细地址')"></i> | |
| 85 | + </div> | |
| 86 | + <div v-else>{{scope.row.detailedLocation}}</div> | |
| 87 | + </template> | |
| 88 | + </el-table-column> | |
| 89 | + | |
| 90 | + <el-table-column prop="notes" label="实际使用面积" > | |
| 91 | + <template slot-scope="scope" > | |
| 92 | + <div style="display: flex;" v-if="iscopy"> | |
| 93 | + <div>实际使用面积</div> | |
| 94 | + <i class="el-icon-copy-document greens tableBtn iterem" style="height: 0;" @click.stop="copytit('实际使用面积')"></i> | |
| 95 | + </div> | |
| 96 | + <div v-else> {{scope.row.actualArea ? scope.row.actualArea : scope.row.actualUsableArea?scope.row.actualUsableArea:'-'}}</div> | |
| 97 | + </template> | |
| 98 | + | |
| 99 | + </el-table-column> | |
| 100 | + | |
| 101 | + <el-table-column label="操作" v-if="!iscopy"> | |
| 102 | + <template slot-scope="scope"> | |
| 103 | + <div @click="MingDelete(scope.$index)" class="tableBtn greens">删除</div> | |
| 104 | + </template> | |
| 105 | + </el-table-column> | |
| 106 | + </el-table> | |
| 107 | + </div> | |
| 108 | + </div> | |
| 109 | + </div> | |
| 110 | + </el-form-item> | |
| 111 | + </el-col> | |
| 112 | + </el-row> | |
| 113 | + </el-form> | |
| 114 | + <el-dialog :visible.sync="addcl" title="选择策略" width="65%" append-to-body center :close-on-click-modal="false" | |
| 115 | + :close-on-press-escape="false" :show-close="false"> | |
| 116 | + <cl v-if="addcl" @minSev="minSevcl" @mingClose="mingClosecl"></cl> | |
| 117 | + </el-dialog> | |
| 118 | + <el-dialog :visible.sync="addzy" title="选择资源" width="65%" append-to-body center :close-on-click-modal="false" | |
| 119 | + :close-on-press-escape="false" :show-close="false"> | |
| 120 | + <zy :maxSelection="1" publishStatus="2" v-if="addzy" @mingClose="mingClosezy" @minSev="minSevzy"></zy> | |
| 121 | + </el-dialog> | |
| 122 | + </div> | |
| 123 | +</template> | |
| 124 | +<script> | |
| 125 | + import upfile from "@/components/fujianUpload/fujianList" | |
| 126 | + import upimg from "@/components/ImageUpload/index" | |
| 127 | + import cl from "@/components/change/cl" | |
| 128 | + import zy from "@/components/change/zy" | |
| 129 | + import { | |
| 130 | + cerePlatformMerchant, | |
| 131 | + } from '@/api/newly.js' | |
| 132 | + export default { | |
| 133 | + components: { | |
| 134 | + upfile, | |
| 135 | + upimg, | |
| 136 | + cl, | |
| 137 | + zy | |
| 138 | + }, | |
| 139 | + props: { | |
| 140 | + list1: { | |
| 141 | + type: Array, | |
| 142 | + default: [] | |
| 143 | + }, | |
| 144 | + iscopy: { | |
| 145 | + type: Boolean, | |
| 146 | + default: false | |
| 147 | + }, | |
| 148 | + | |
| 149 | + }, | |
| 150 | + data() { | |
| 151 | + return { | |
| 152 | + keyon:'', | |
| 153 | + addcl: false, | |
| 154 | + addzy: false, | |
| 155 | + shopId: '', | |
| 156 | + shopList: [], | |
| 157 | + ruleAddData: { | |
| 158 | + | |
| 159 | + }, | |
| 160 | + onindex:null, | |
| 161 | + forminfo:{}, | |
| 162 | + isshow:false | |
| 163 | + } | |
| 164 | + }, | |
| 165 | + watch:{ | |
| 166 | + list1(val) { | |
| 167 | + this.isshow = false | |
| 168 | + if(this.list1.length>0) { | |
| 169 | + let c1 = {} | |
| 170 | + let info1 = {} | |
| 171 | + for (let index = 0; index < this.list1.length; index++) { | |
| 172 | + const element = this.list1[index]; | |
| 173 | + if(element.isrequired == '是') { | |
| 174 | + c1[element.key] = [{ | |
| 175 | + required: true, | |
| 176 | + message: '请填写' + element.name, | |
| 177 | + trigger: 'change' | |
| 178 | + }] | |
| 179 | + | |
| 180 | + } | |
| 181 | + info1[element.key] = element.value+'' | |
| 182 | + } | |
| 183 | + this.forminfo = info1 | |
| 184 | + this.ruleAddData = c1 | |
| 185 | + this.isshow = true | |
| 186 | + // this.$updateRules(this.ruleAddData) | |
| 187 | + console.error(this.ruleAddData) | |
| 188 | + console.error({...this.forminfo}) | |
| 189 | + } | |
| 190 | + }, | |
| 191 | + }, | |
| 192 | + async created() { | |
| 193 | + await cerePlatformMerchant({ | |
| 194 | + checkState: '2', | |
| 195 | + pageNumber: 0, | |
| 196 | + pageSize: 1000, | |
| 197 | + }).then(res => { | |
| 198 | + this.shopList = res.data.content | |
| 199 | + // console.error(this.shopList) | |
| 200 | + }) | |
| 201 | + this.isshow = false | |
| 202 | + if(this.list1.length>0) { | |
| 203 | + let c1 = {} | |
| 204 | + let info1 = {} | |
| 205 | + for (let index = 0; index < this.list1.length; index++) { | |
| 206 | + const element = this.list1[index]; | |
| 207 | + if(element.isrequired == '是') { | |
| 208 | + c1[element.key] = [{ | |
| 209 | + required: true, | |
| 210 | + message: '请填写' + element.name, | |
| 211 | + trigger: 'change' | |
| 212 | + }] | |
| 213 | + | |
| 214 | + } | |
| 215 | + info1[element.key] = element.value+'' | |
| 216 | + } | |
| 217 | + this.forminfo = info1 | |
| 218 | + this.ruleAddData = c1 | |
| 219 | + this.isshow = true | |
| 220 | + // this.$updateRules(this.ruleAddData) | |
| 221 | + console.error(this.ruleAddData) | |
| 222 | + console.error({...this.forminfo}) | |
| 223 | + } | |
| 224 | + | |
| 225 | + }, | |
| 226 | + methods: { | |
| 227 | + MingDelete(item) { | |
| 228 | + this.list1[this.onindex].list = [] | |
| 229 | + }, | |
| 230 | + // 验证输入框 | |
| 231 | + async yanzhen() { | |
| 232 | + let c1 = false | |
| 233 | + await this.$refs.ruleForm.validate(async (valid) => { | |
| 234 | + if (valid) { | |
| 235 | + c1 = true | |
| 236 | + } else { | |
| 237 | + this.$message({ | |
| 238 | + type: 'error', | |
| 239 | + message: '请填写必填项' | |
| 240 | + }) | |
| 241 | + c1 = false | |
| 242 | + } | |
| 243 | + }) | |
| 244 | + return c1 | |
| 245 | + }, | |
| 246 | + | |
| 247 | + inputvalue(e,onindex) { | |
| 248 | + this.forminfo[onindex] = e | |
| 249 | + }, | |
| 250 | + inputnumvalue(e,onindex) { | |
| 251 | + this.forminfo[onindex] = e | |
| 252 | + }, | |
| 253 | + changetime(e,onindex){ | |
| 254 | + this.forminfo[onindex] = e | |
| 255 | + }, | |
| 256 | + changexl(e,onindex){ | |
| 257 | + this.forminfo[onindex] = e | |
| 258 | + }, | |
| 259 | + async copytit(content){ | |
| 260 | + // 复制结果 | |
| 261 | + let copyResult = true | |
| 262 | + // 设置想要复制的文本内容 | |
| 263 | + const text = content || '复制内容为空哦~'; | |
| 264 | + // 判断是否支持clipboard方式 | |
| 265 | + if (!!window.navigator.clipboard) { | |
| 266 | + // 利用clipboard将文本写入剪贴板(这是一个异步promise) | |
| 267 | + await window.navigator.clipboard.writeText(text).then((res) => { | |
| 268 | + console.log('复制成功'); | |
| 269 | + }).catch((err) => { | |
| 270 | + console.log('复制失败--采取第二种复制方案', err); | |
| 271 | + // clipboard方式复制失败 则采用document.execCommand()方式进行尝试 | |
| 272 | + copyResult = copyContent2(text) | |
| 273 | + }) | |
| 274 | + } else { | |
| 275 | + // 不支持clipboard方式 则采用document.execCommand()方式 | |
| 276 | + copyResult = copyContent2(text) | |
| 277 | + } | |
| 278 | + // 返回复制操作的最终结果 | |
| 279 | + return copyResult; | |
| 280 | + }, | |
| 281 | + validateNumber(index, value,onindex) { | |
| 282 | + // 使用正则表达式确保输入的是数字,并且可以包含最多两位小数 | |
| 283 | + const regex = /^\d+(\.\d{1,2})?$/; | |
| 284 | + if (!regex.test(value)) { | |
| 285 | + this.list1[index].value = value.replace(/[^\d.]/g, '').replace(/(\.\d{2}).*$/, '$1'); | |
| 286 | + | |
| 287 | + } | |
| 288 | + this.forminfo[onindex] = this.list1[index].value | |
| 289 | + }, | |
| 290 | + changimg(e, type,onindex) { | |
| 291 | + this.list1[type].value = e | |
| 292 | + this.forminfo[onindex] = e | |
| 293 | + }, | |
| 294 | + // changeRelatedMerchants(e) { | |
| 295 | + // this.shopId = e | |
| 296 | + // }, | |
| 297 | + async mingShow(index,key) { | |
| 298 | + this.addzy = true | |
| 299 | + this.onindex = index | |
| 300 | + this.keyon = key | |
| 301 | + }, | |
| 302 | + // 处理策略对话框的确认操作 | |
| 303 | + minSevcl(data) { | |
| 304 | + // 处理策略选择后的数据 | |
| 305 | + console.log('策略选择确认:', data); | |
| 306 | + this.addcl = false; // 关闭策略对话框 | |
| 307 | + }, | |
| 308 | + // 处理策略对话框的关闭操作 | |
| 309 | + mingClosecl() { | |
| 310 | + this.addcl = false; // 关闭策略对话框 | |
| 311 | + }, | |
| 312 | + // 处理资源对话框的确认操作 | |
| 313 | + minSevzy(data) { | |
| 314 | + // 处理资源选择后的数据 | |
| 315 | + console.log('资源选择确认:', data); | |
| 316 | + const filteredAddData = this.list1[this.onindex].list.filter(itemAdd => { | |
| 317 | + // 使用 some 方法检查 this.multipleSelection 中是否存在具有相同 id 的元素 | |
| 318 | + return !data.some(itemMultiple => itemMultiple.id === itemAdd.id); | |
| 319 | + }); | |
| 320 | + | |
| 321 | + console.error(this.list1[this.onindex].list) | |
| 322 | + //刷新渲染层 | |
| 323 | + this.$nextTick(() => { | |
| 324 | + this.list1[this.onindex].list = filteredAddData.concat(data) | |
| 325 | + this.list1[this.onindex].value = this.list1[this.onindex].list[0] | |
| 326 | + }) | |
| 327 | + this.forminfo[this.keyon] = data[0].id | |
| 328 | + this.addzy = false; // 关闭资源对话框 | |
| 329 | + }, | |
| 330 | + // 处理资源对话框的关闭操作 | |
| 331 | + mingClosezy() { | |
| 332 | + this.addzy = false; // 关闭资源对话框 | |
| 333 | + } | |
| 334 | + } | |
| 335 | + } | |
| 336 | +</script> | |
| 337 | +<style lang="css"> | |
| 338 | + .el-upload { | |
| 339 | + display: block; | |
| 340 | + text-align: left; | |
| 341 | + } | |
| 342 | + | |
| 343 | + .el-dialog__header { | |
| 344 | + background-color: #F2F3F5; | |
| 345 | + text-align: left; | |
| 346 | + } | |
| 347 | + | |
| 348 | + .el-dialog__title { | |
| 349 | + line-height: 30px; | |
| 350 | + font-size: 15px; | |
| 351 | + color: #303133; | |
| 352 | + } | |
| 353 | + | |
| 354 | + .iterem { | |
| 355 | + z-index: 99; | |
| 356 | + margin-left: 10px; | |
| 357 | + height: 40px; | |
| 358 | + line-height: 25px; | |
| 359 | + } | |
| 360 | +</style> | ... | ... |
admin-web-master/src/components/change/zy.vue
| ... | ... | @@ -87,7 +87,7 @@ |
| 87 | 87 | pageindex: { |
| 88 | 88 | pageNumber: 0, |
| 89 | 89 | pageSize: 5, |
| 90 | - publishStatus:'0' | |
| 90 | + // publishStatus:'0' | |
| 91 | 91 | }, |
| 92 | 92 | selectedRows: [], |
| 93 | 93 | listData: [], |
| ... | ... | @@ -98,12 +98,18 @@ |
| 98 | 98 | await this.getAll() |
| 99 | 99 | }, |
| 100 | 100 | props: { |
| 101 | - resourcesId: { | |
| 101 | + publishStatus: { | |
| 102 | 102 | type: String, |
| 103 | 103 | default: function () { |
| 104 | - return '' | |
| 104 | + return '0' | |
| 105 | 105 | } |
| 106 | - } | |
| 106 | + }, | |
| 107 | + maxSelection: { | |
| 108 | + type: Number, | |
| 109 | + default: function () { | |
| 110 | + return 20 | |
| 111 | + } | |
| 112 | + }, | |
| 107 | 113 | }, |
| 108 | 114 | methods: { |
| 109 | 115 | changzytype() { |
| ... | ... | @@ -112,11 +118,11 @@ |
| 112 | 118 | async getAll() { |
| 113 | 119 | let list = [] |
| 114 | 120 | if(this.zytype == '1') { |
| 115 | - list = await getAlls({shopName: this.name,...this.pageindex}) | |
| 121 | + list = await getAlls({shopName: this.name,...this.pageindex,publishStatus:this.publishStatus}) | |
| 116 | 122 | } else if(this.zytype == '2') { |
| 117 | - list = await map1({advertisingName: this.name,...this.pageindex}) | |
| 123 | + list = await map1({advertisingName: this.name,...this.pageindex,publishStatus:this.publishStatus}) | |
| 118 | 124 | } else if(this.zytype == '3') { |
| 119 | - list = await changAlls({venueName: this.name,...this.pageindex}) | |
| 125 | + list = await changAlls({venueName: this.name,...this.pageindex,publishStatus:this.publishStatus}) | |
| 120 | 126 | } |
| 121 | 127 | this.listData = list.data.content |
| 122 | 128 | this.total = list.data.totalElements |
| ... | ... | @@ -143,7 +149,15 @@ |
| 143 | 149 | this.getAll() |
| 144 | 150 | }, |
| 145 | 151 | handleSelectionChange(selection) { |
| 146 | - this.selectedRows = selection; | |
| 152 | + if (selection.length > this.maxSelection) { | |
| 153 | + this.$message.warning(`最多只能选择 ${this.maxSelection} 项`); | |
| 154 | + this.$refs.multipleTable.clearSelection(); | |
| 155 | + selection.slice(0, this.maxSelection).forEach(row => { | |
| 156 | + this.$refs.multipleTable.toggleRowSelection(row, true); | |
| 157 | + }); | |
| 158 | + } else { | |
| 159 | + this.selectedRows = selection; | |
| 160 | + } | |
| 147 | 161 | }, |
| 148 | 162 | confirm() { |
| 149 | 163 | ... | ... |
admin-web-master/src/main.js
| ... | ... | @@ -39,9 +39,9 @@ Vue.prototype.$hostUrl =`${window.location.protocol}//${window.location.host}/cd |
| 39 | 39 | |
| 40 | 40 | let host = window.location.host; |
| 41 | 41 | if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost:9528'|| host === '192.168.31.45:9528' ) { |
| 42 | - Vue.prototype.$baseURL ='http://172.16.61.125/cdwlMall' | |
| 43 | - Vue.prototype.$fontBold = `http://172.16.61.125/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Bold.ttf` | |
| 44 | - Vue.prototype.$fontRegular = `http://172.16.61.125/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Regular.ttf` | |
| 42 | + Vue.prototype.$baseURL ='https://jy.scjysm.asia:18086/cdwlMall' | |
| 43 | + Vue.prototype.$fontBold = `https://jy.scjysm.asia:18086/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Bold.ttf` | |
| 44 | + Vue.prototype.$fontRegular = `https://jy.scjysm.asia:18086/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Regular.ttf` | |
| 45 | 45 | } else { |
| 46 | 46 | Vue.prototype.$baseURL =`${window.location.protocol}//${window.location.host}/cdwlMall` |
| 47 | 47 | Vue.prototype.$fontBold = `${window.location.protocol}//${window.location.host}/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Bold.ttf` | ... | ... |
admin-web-master/src/store/modules/app.js
| ... | ... | @@ -17,7 +17,46 @@ const state = { |
| 17 | 17 | { label: '郫都区', value: '郫都区' }, |
| 18 | 18 | { label: '龙泉驿区', value: '龙泉驿区' }, |
| 19 | 19 | { label: '温江区', value: '温江区' } |
| 20 | -] | |
| 20 | +], | |
| 21 | +mobantype:[ | |
| 22 | + | |
| 23 | + { | |
| 24 | + label: '单行文本', | |
| 25 | + value: '单行文本' | |
| 26 | + }, | |
| 27 | + { | |
| 28 | + label: '单行数字文本', | |
| 29 | + value: '单行数字文本' | |
| 30 | + }, | |
| 31 | + { | |
| 32 | + label: '多行文本', | |
| 33 | + value: '多行文本' | |
| 34 | + }, | |
| 35 | + { | |
| 36 | + label: '下拉选择', | |
| 37 | + value: '下拉选择' | |
| 38 | + }, | |
| 39 | + { | |
| 40 | + label: '日期', | |
| 41 | + value: '日期' | |
| 42 | + }, | |
| 43 | + { | |
| 44 | + label: '付款日', | |
| 45 | + value: '付款日' | |
| 46 | + }, | |
| 47 | + // { | |
| 48 | + // label: '商家', | |
| 49 | + // value: '商家' | |
| 50 | + // }, | |
| 51 | + { | |
| 52 | + label: '附件', | |
| 53 | + value: '附件' | |
| 54 | + }, | |
| 55 | + // { | |
| 56 | + // label: '资源', | |
| 57 | + // value: '资源' | |
| 58 | + // } | |
| 59 | +], | |
| 21 | 60 | } |
| 22 | 61 | |
| 23 | 62 | const mutations = { | ... | ... |
admin-web-master/src/views/shopRental/manage/index.vue
admin-web-master/src/views/shopRental/template/index.vue
| ... | ... | @@ -3,15 +3,15 @@ |
| 3 | 3 | <div class="zhuti" v-if="onaction == '1'"> |
| 4 | 4 | <div style="height:58px;line-height:58px;"> |
| 5 | 5 | <div style="color:#0006"> <span>商铺租赁服务</span> <span style="padding:0 5px;">></span> <span |
| 6 | - style="color:#000000e6">合同管理</span></div> | |
| 6 | + style="color:#000000e6">合同模版管理</span></div> | |
| 7 | 7 | </div> |
| 8 | 8 | <!-- 线上 --> |
| 9 | 9 | <div> |
| 10 | 10 | <!-- 搜索 --> |
| 11 | 11 | <div class="formSearch"> |
| 12 | 12 | <el-form :inline="true" :model="pagequery"> |
| 13 | - <el-form-item label="合同名称"> | |
| 14 | - <el-input v-model="pagequery.contractName" placeholder="请输入" style="width:168px;" /> | |
| 13 | + <el-form-item label="模版名称"> | |
| 14 | + <el-input v-model="pagequery.templateName" placeholder="请输入" style="width:168px;" /> | |
| 15 | 15 | </el-form-item> |
| 16 | 16 | </el-form> |
| 17 | 17 | |
| ... | ... | @@ -32,65 +32,21 @@ |
| 32 | 32 | |
| 33 | 33 | <el-table :data="tableData" |
| 34 | 34 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"> |
| 35 | - <el-table-column label="合同名称"> | |
| 35 | + <el-table-column label="模版名称"> | |
| 36 | 36 | <template slot-scope="scope"> |
| 37 | - {{scope.row.contractName}} | |
| 38 | - | |
| 39 | - </template> | |
| 40 | - </el-table-column> | |
| 41 | - <el-table-column label="合同金额"> | |
| 42 | - <template slot-scope="scope"> | |
| 43 | - {{scope.row.contractAmount}} | |
| 44 | - | |
| 45 | - </template> | |
| 46 | - </el-table-column> | |
| 47 | - <el-table-column label="签订日期"> | |
| 48 | - <template slot-scope="scope"> | |
| 49 | - {{scope.row.contractSigningDate}} | |
| 50 | - | |
| 51 | - </template> | |
| 52 | - </el-table-column> | |
| 53 | - <el-table-column label="终止日期"> | |
| 54 | - <template slot-scope="scope"> | |
| 55 | - {{scope.row.contractTerminationDate}} | |
| 56 | - | |
| 57 | - </template> | |
| 58 | - </el-table-column> | |
| 59 | - <el-table-column label="姓名"> | |
| 60 | - <template slot-scope="scope"> | |
| 61 | - {{scope.row.tenantName}} | |
| 62 | - | |
| 63 | - </template> | |
| 64 | - </el-table-column> | |
| 65 | - <el-table-column label="联系电话"> | |
| 66 | - <template slot-scope="scope"> | |
| 67 | - {{scope.row.tenantTelephone}} | |
| 68 | - | |
| 37 | + {{scope.row.templateName}} | |
| 69 | 38 | </template> |
| 70 | 39 | </el-table-column> |
| 71 | - </el-table-column> | |
| 72 | - <el-table-column label="合同类型"> | |
| 73 | - <template slot-scope="scope"> | |
| 74 | - {{scope.row.contractType}} | |
| 75 | - | |
| 76 | - </template> | |
| 77 | - </el-table-column> | |
| 78 | - <el-table-column prop="dataStatus" label="合同状态"> | |
| 40 | + <el-table-column label="word模板"> | |
| 79 | 41 | <template slot-scope="scope"> |
| 80 | - <span v-if='scope.row.dataStatus == 1'>使用中</span> | |
| 81 | - <span v-else-if='scope.row.dataStatus == 2'>往期合同</span> | |
| 82 | - <span v-else-if='scope.row.dataStatus == 3'>已终止</span> | |
| 83 | - <span v-else>-</span> | |
| 42 | + <div class="greens tableBtn" @click.stop="openfile($baseURL+scope.row.templateAttachment)">模版文件</div> | |
| 84 | 43 | </template> |
| 85 | 44 | </el-table-column> |
| 86 | 45 | |
| 87 | - <el-table-column label="操作" min-width="150" fixed="right"> | |
| 46 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 88 | 47 | <template slot-scope="scope"> |
| 89 | 48 | <div @click="details(scope.row)" class="tableBtn greens">查看</div> |
| 90 | - <div v-if='scope.row.dataStatus == 1' @click="removeinfo(scope.row,'合同变更')" class="tableBtn greens">合同变更</div> | |
| 91 | - <div v-if='scope.row.dataStatus == 1' @click="removeinfo(scope.row,'合同续约')" class="tableBtn greens">合同续约</div> | |
| 92 | - <div v-if='scope.row.dataStatus == 1' @click="removeinfozz(scope.row,'合同终止')" class="tableBtn greens">合同终止</div> | |
| 93 | - <!-- <div @click="handleDelete(scope.row)" class="tableBtn greens">删除</div> --> | |
| 49 | + <div @click="closemsg(scope.row)" class="tableBtn greens">删除</div> | |
| 94 | 50 | </template> |
| 95 | 51 | </el-table-column> |
| 96 | 52 | </el-table> |
| ... | ... | @@ -113,37 +69,20 @@ |
| 113 | 69 | |
| 114 | 70 | <div class="zhuti" v-if="onaction == '2'"> |
| 115 | 71 | <div style="height:58px;line-height:58px;"> |
| 116 | - <div style="color:#0006"> <span>合同管理</span> <span style="padding:0 5px;">></span> <span | |
| 72 | + <div style="color:#0006"> <span>合同模版管理</span> <span style="padding:0 5px;">></span> <span | |
| 117 | 73 | style="color:#000000e6">新增</span></div> |
| 118 | 74 | </div> |
| 119 | - | |
| 120 | 75 | <div style="padding: 20px 20px 20px 0;"> |
| 121 | - <add :info="formInline" @removeonaction="removeonaction"></add> | |
| 76 | + <add :info="detailsinfo" @removeonaction="removeonaction"></add> | |
| 122 | 77 | </div> |
| 123 | 78 | </div> |
| 124 | 79 | <div class="zhuti" v-if="onaction == '3'"> |
| 125 | 80 | <div style="height:58px;line-height:58px;"> |
| 126 | - <div style="color:#0006"> <span>合同管理</span> <span style="padding:0 5px;">></span> <span | |
| 81 | + <div style="color:#0006"> <span>合同模版管理</span> <span style="padding:0 5px;">></span> <span | |
| 127 | 82 | style="color:#000000e6">查看</span></div> |
| 128 | 83 | </div> |
| 129 | - <div> | |
| 130 | - <busCha :info="detailsinfo" @removeonaction="removeonaction"></busCha> | |
| 131 | - </div> | |
| 132 | - <!-- <div> | |
| 133 | - <el-button class="buttonHover" | |
| 134 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;margin-top: 20px;" | |
| 135 | - @click="removeonaction('1')">返回</el-button> | |
| 136 | - </div> --> | |
| 137 | - </div> | |
| 138 | - <div class="zhuti" v-if="onaction == '4'"> | |
| 139 | - <div style="height:58px;line-height:58px;"> | |
| 140 | - <div style="color:#0006"> <span>合同管理</span> <span style="padding:0 5px;">></span> <span | |
| 141 | - style="color:#000000e6">{{contractChangeReason}}</span></div> | |
| 142 | - </div> | |
| 143 | - | |
| 144 | 84 | <div style="padding: 20px 20px 20px 0;"> |
| 145 | - <addremove :info="detailsinfo" :contractChangeReason="contractChangeReason" @removeonaction="removeonaction"> | |
| 146 | - </addremove> | |
| 85 | + <mb :info="detailsinfo" @removeonaction="removeonaction"></mb> | |
| 147 | 86 | </div> |
| 148 | 87 | </div> |
| 149 | 88 | </div> |
| ... | ... | @@ -153,11 +92,11 @@ |
| 153 | 92 | |
| 154 | 93 | <script> |
| 155 | 94 | import { |
| 156 | - contractGetAllnew, | |
| 157 | - } from '@/api/manage.js' | |
| 95 | + cereContractTemplate,cereContractTemplatedeleteById | |
| 96 | + } from '@/api/newly.js' | |
| 158 | 97 | import add from '@/components/add/addmb.vue' |
| 159 | 98 | import addremove from '@/components/add/addremoveht.vue' |
| 160 | - import busCha from '@/components/buscha/busCha' | |
| 99 | + import mb from '@/components/chakan/mb.vue' | |
| 161 | 100 | import { |
| 162 | 101 | cereContractInformation |
| 163 | 102 | } from '@/api/commodityLease.js' |
| ... | ... | @@ -170,56 +109,67 @@ |
| 170 | 109 | dataStatus:'1', |
| 171 | 110 | pageNumber: 0, |
| 172 | 111 | pageSize: 10, |
| 173 | - contractName: '' | |
| 112 | + templateName: '' | |
| 174 | 113 | }, |
| 175 | 114 | tableData: [], |
| 176 | 115 | total: 0, |
| 177 | 116 | onaction: '1', |
| 178 | 117 | 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 | 118 | }, |
| 212 | 119 | } |
| 213 | 120 | }, |
| 214 | 121 | components: { |
| 215 | 122 | add, |
| 216 | - busCha, | |
| 123 | + mb, | |
| 217 | 124 | addremove |
| 218 | 125 | }, |
| 219 | 126 | created() { |
| 220 | - // this.getAll() | |
| 127 | + this.getAll() | |
| 221 | 128 | }, |
| 222 | 129 | methods: { |
| 130 | + //删除 | |
| 131 | + closemsg(item) { | |
| 132 | + const h = this.$createElement; | |
| 133 | + this.$msgbox({ | |
| 134 | + title: '消息', | |
| 135 | + message: h('p', null, [ | |
| 136 | + h('span', null, '是否删除 '), | |
| 137 | + ]), | |
| 138 | + showCancelButton: true, | |
| 139 | + showClose: false, | |
| 140 | + confirmButtonText: '确定', | |
| 141 | + cancelButtonText: '取消', | |
| 142 | + customClass: 'oe-dialog-btn', | |
| 143 | + beforeClose: (action, instance, done) => { | |
| 144 | + if (action === 'confirm') { | |
| 145 | + cereContractTemplatedeleteById({ | |
| 146 | + id: item.id | |
| 147 | + }).then(res => { | |
| 148 | + this.$message({ | |
| 149 | + message: '删除成功', | |
| 150 | + type: 'success' | |
| 151 | + }) | |
| 152 | + this.getAll() | |
| 153 | + done(); | |
| 154 | + }) | |
| 155 | + } else { | |
| 156 | + done(); | |
| 157 | + } | |
| 158 | + } | |
| 159 | + }) | |
| 160 | + }, | |
| 161 | + openfile(e) { | |
| 162 | + if (e) { | |
| 163 | + const fullUrl = e; | |
| 164 | + try { | |
| 165 | + window.open(fullUrl, '_blank'); // 在新标签页中打开文件 | |
| 166 | + } catch (error) { | |
| 167 | + console.error('打开文件失败:', error); | |
| 168 | + } | |
| 169 | + } else { | |
| 170 | + console.error('无文件可查看'); | |
| 171 | + } | |
| 172 | + }, | |
| 223 | 173 | gettime() { |
| 224 | 174 | // 获取当前时间 |
| 225 | 175 | let currentTime = new Date(); |
| ... | ... | @@ -301,15 +251,16 @@ |
| 301 | 251 | this.onaction = '4' |
| 302 | 252 | }, |
| 303 | 253 | async getAll() { |
| 304 | - const res = await contractGetAllnew(this.pagequery) | |
| 254 | + const res = await cereContractTemplate(this.pagequery) | |
| 305 | 255 | this.tableData = res.data.content |
| 306 | 256 | this.total = res.data.totalElements |
| 307 | 257 | }, |
| 308 | 258 | removeonaction(e) { |
| 309 | 259 | console.error(e) |
| 260 | + this.detailsinfo ={} | |
| 310 | 261 | this.onaction = e |
| 311 | 262 | this.pagequery.pageNumber = 0 |
| 312 | - // this.getAll() | |
| 263 | + this.getAll() | |
| 313 | 264 | }, |
| 314 | 265 | handleCurrentChange(val) { |
| 315 | 266 | this.pagequery.pageNumber = val - 1 |
| ... | ... | @@ -329,7 +280,7 @@ |
| 329 | 280 | pageNumber: 0, |
| 330 | 281 | pageSize: 10, |
| 331 | 282 | dataStatus:'1', |
| 332 | - contractName: '' | |
| 283 | + templateName: '' | |
| 333 | 284 | }, |
| 334 | 285 | this.getAll() |
| 335 | 286 | }, | ... | ... |