Commit 132aa3e86ea7e2bbb9239038ef12287f9a52e47f
1 parent
290144e9
ss
Showing
8 changed files
with
1012 additions
and
7 deletions
apis/construct/construct.js
| @@ -20,5 +20,13 @@ export default{ | @@ -20,5 +20,13 @@ export default{ | ||
| 20 | //党的建设删除 | 20 | //党的建设删除 |
| 21 | deleteCon(data){ | 21 | deleteCon(data){ |
| 22 | return request.delete(`/SubDev/basepartybuilding/${data}`,data) | 22 | return request.delete(`/SubDev/basepartybuilding/${data}`,data) |
| 23 | - } | 23 | + }, |
| 24 | + // 企业信息表单上传 | ||
| 25 | + postCompanyInfo(data){ | ||
| 26 | + return request.post('/SubDev/baseenterprisemanager',data) | ||
| 27 | + }, | ||
| 28 | + // 企业信息修改 | ||
| 29 | + updateInfo(data){ | ||
| 30 | + return request.put(`/SubDev/baseenterprisemanager/${data}`,data) | ||
| 31 | + }, | ||
| 24 | } | 32 | } |
| 25 | \ No newline at end of file | 33 | \ No newline at end of file |
pages.json
| @@ -389,6 +389,30 @@ | @@ -389,6 +389,30 @@ | ||
| 389 | "navigationBarTitleText" : "人才信息", | 389 | "navigationBarTitleText" : "人才信息", |
| 390 | "enablePullDownRefresh" : false | 390 | "enablePullDownRefresh" : false |
| 391 | } | 391 | } |
| 392 | + }, | ||
| 393 | + { | ||
| 394 | + "path" : "pages/postCompany/postCompany", | ||
| 395 | + "style" : | ||
| 396 | + { | ||
| 397 | + "navigationBarTitleText" : "企业信息表单采集", | ||
| 398 | + "enablePullDownRefresh" : false | ||
| 399 | + } | ||
| 400 | + }, | ||
| 401 | + { | ||
| 402 | + "path" : "pages/my/myCom/myCom", | ||
| 403 | + "style" : | ||
| 404 | + { | ||
| 405 | + "navigationBarTitleText" : "发布企业列表", | ||
| 406 | + "enablePullDownRefresh" : false | ||
| 407 | + } | ||
| 408 | + }, | ||
| 409 | + { | ||
| 410 | + "path" : "pages/my/myComdetail/myComdetail", | ||
| 411 | + "style" : | ||
| 412 | + { | ||
| 413 | + "navigationBarTitleText" : "", | ||
| 414 | + "enablePullDownRefresh" : false | ||
| 415 | + } | ||
| 392 | } | 416 | } |
| 393 | 417 | ||
| 394 | // { | 418 | // { |
pages/datain/datain.vue
| @@ -4,8 +4,8 @@ | @@ -4,8 +4,8 @@ | ||
| 4 | <view class="content"> | 4 | <view class="content"> |
| 5 | <!-- 列表 --> | 5 | <!-- 列表 --> |
| 6 | <view class="user-list" v-show="!isAdmin"> | 6 | <view class="user-list" v-show="!isAdmin"> |
| 7 | - <view class="list" @click="toData"> | ||
| 8 | - <view class="title"> | 7 | + <view class="list" @click="toData" style="background-color:#D32D25;"> |
| 8 | + <view class="title" style="color:white"> | ||
| 9 | <text>表单设计</text> | 9 | <text>表单设计</text> |
| 10 | </view> | 10 | </view> |
| 11 | <view class="more-content"> | 11 | <view class="more-content"> |
| @@ -15,6 +15,18 @@ | @@ -15,6 +15,18 @@ | ||
| 15 | </view> | 15 | </view> |
| 16 | </view> | 16 | </view> |
| 17 | </view> | 17 | </view> |
| 18 | + <view class="user-list"> | ||
| 19 | + <view class="list" @click="toPostCom()" style="background-color:#D32D25;"> | ||
| 20 | + <view class="title" style="color:white"> | ||
| 21 | + <text>企业信息采集</text> | ||
| 22 | + </view> | ||
| 23 | + <view class="more-content"> | ||
| 24 | + <view class="more-content-img"> | ||
| 25 | + <image src="../../static/right2.png"></image> | ||
| 26 | + </view> | ||
| 27 | + </view> | ||
| 28 | + </view> | ||
| 29 | + </view> | ||
| 18 | <view class="user-list" v-for="(item,index) in formList"> | 30 | <view class="user-list" v-for="(item,index) in formList"> |
| 19 | <view class="list" @click="toForm(it)" v-for="(it,index) in item.children"> | 31 | <view class="list" @click="toForm(it)" v-for="(it,index) in item.children"> |
| 20 | <view class="title"> | 32 | <view class="title"> |
| @@ -96,6 +108,12 @@ | @@ -96,6 +108,12 @@ | ||
| 96 | url: '/pages/data/data' | 108 | url: '/pages/data/data' |
| 97 | }) | 109 | }) |
| 98 | }, | 110 | }, |
| 111 | + // 去企业信息表单采集 | ||
| 112 | + toPostCom(){ | ||
| 113 | + uni.navigateTo({ | ||
| 114 | + url:'/pages/postCompany/postCompany' | ||
| 115 | + }) | ||
| 116 | + }, | ||
| 99 | // 去表单填写页面 | 117 | // 去表单填写页面 |
| 100 | toForm(item){ | 118 | toForm(item){ |
| 101 | // uni.navigateTo({ | 119 | // uni.navigateTo({ |
| @@ -107,7 +125,7 @@ | @@ -107,7 +125,7 @@ | ||
| 107 | this.$u.toast("暂无此页面") | 125 | this.$u.toast("暂无此页面") |
| 108 | } | 126 | } |
| 109 | }) | 127 | }) |
| 110 | - } | 128 | + }, |
| 111 | } | 129 | } |
| 112 | } | 130 | } |
| 113 | </script> | 131 | </script> |
pages/my/my.vue
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | <view class="logo"> | 7 | <view class="logo"> |
| 8 | <image src="../../static/logo.png" mode="widthFix"></image> | 8 | <image src="../../static/logo.png" mode="widthFix"></image> |
| 9 | </view> | 9 | </view> |
| 10 | - <view class="mian-box"> | 10 | + <view class="mian-box" style="position: relative;z-index: 2;"> |
| 11 | <view class="my-top" @click="toPerson"> | 11 | <view class="my-top" @click="toPerson"> |
| 12 | <view class="user-info" > | 12 | <view class="user-info" > |
| 13 | <view class="portrait" v-if="isHead"> | 13 | <view class="portrait" v-if="isHead"> |
| @@ -66,6 +66,15 @@ | @@ -66,6 +66,15 @@ | ||
| 66 | <text>招聘</text> | 66 | <text>招聘</text> |
| 67 | </view> | 67 | </view> |
| 68 | </view> | 68 | </view> |
| 69 | + <view class="line"></view> | ||
| 70 | + <view class="list" @click="toMyCom()"> | ||
| 71 | + <view class="thumb"> | ||
| 72 | + {{com}} | ||
| 73 | + </view> | ||
| 74 | + <view class="name"> | ||
| 75 | + <text>企业</text> | ||
| 76 | + </view> | ||
| 77 | + </view> | ||
| 69 | </view> | 78 | </view> |
| 70 | </view> | 79 | </view> |
| 71 | 80 | ||
| @@ -160,6 +169,21 @@ | @@ -160,6 +169,21 @@ | ||
| 160 | <text class="iconfont icon-more"></text> | 169 | <text class="iconfont icon-more"></text> |
| 161 | </view> | 170 | </view> |
| 162 | </view> | 171 | </view> |
| 172 | + <!-- <view class="list" @click="toMyCom"> | ||
| 173 | + <view class="icon-data"> | ||
| 174 | + <view class="icon"> | ||
| 175 | + <image src="/static/my-icon5.png" mode=""></image> | ||
| 176 | + </view> | ||
| 177 | + <view class="data"> | ||
| 178 | + <view class="title"> | ||
| 179 | + <text>我的企业</text> | ||
| 180 | + </view> | ||
| 181 | + </view> | ||
| 182 | + </view> | ||
| 183 | + <view class="more"> | ||
| 184 | + <text class="iconfont icon-more"></text> | ||
| 185 | + </view> | ||
| 186 | + </view> --> | ||
| 163 | <!-- <view class="list"> | 187 | <!-- <view class="list"> |
| 164 | <view class="icon-data"> | 188 | <view class="icon-data"> |
| 165 | <view class="icon"> | 189 | <view class="icon"> |
| @@ -211,7 +235,9 @@ | @@ -211,7 +235,9 @@ | ||
| 211 | // 需求数量 | 235 | // 需求数量 |
| 212 | demandCount: '', | 236 | demandCount: '', |
| 213 | // 招聘数量 | 237 | // 招聘数量 |
| 214 | - zhaoPCount: '' | 238 | + zhaoPCount: '', |
| 239 | + // 企业数量 | ||
| 240 | + com:'' | ||
| 215 | }; | 241 | }; |
| 216 | }, | 242 | }, |
| 217 | onLoad() { | 243 | onLoad() { |
| @@ -219,6 +245,7 @@ | @@ -219,6 +245,7 @@ | ||
| 219 | this.getSelfProCount() | 245 | this.getSelfProCount() |
| 220 | this.getSelfDemandCount() | 246 | this.getSelfDemandCount() |
| 221 | this.getSelfZhaoCount() | 247 | this.getSelfZhaoCount() |
| 248 | + this.getSelfCom() | ||
| 222 | }, | 249 | }, |
| 223 | onReady() { | 250 | onReady() { |
| 224 | uni.hideTabBar(); | 251 | uni.hideTabBar(); |
| @@ -276,7 +303,12 @@ | @@ -276,7 +303,12 @@ | ||
| 276 | url: '/pages/fileLook/fileLook' | 303 | url: '/pages/fileLook/fileLook' |
| 277 | }) | 304 | }) |
| 278 | }, | 305 | }, |
| 279 | - | 306 | + // 发布企业列表页面 |
| 307 | + toMyCom(){ | ||
| 308 | + uni.navigateTo({ | ||
| 309 | + url:'/pages/my/myCom/myCom' | ||
| 310 | + }) | ||
| 311 | + }, | ||
| 280 | // 获取自己发布的产品 | 312 | // 获取自己发布的产品 |
| 281 | getSelfProCount() { | 313 | getSelfProCount() { |
| 282 | request({ | 314 | request({ |
| @@ -332,6 +364,24 @@ | @@ -332,6 +364,24 @@ | ||
| 332 | } | 364 | } |
| 333 | }) | 365 | }) |
| 334 | }, | 366 | }, |
| 367 | + // 获取自己发布的企业 | ||
| 368 | + getSelfCom() { | ||
| 369 | + request({ | ||
| 370 | + url: this.baseUrl + '/api/SubDev/baseenterprisemanager', | ||
| 371 | + method: 'get', | ||
| 372 | + data: {} | ||
| 373 | + }).then(res => { | ||
| 374 | + if (res.code === 200) { | ||
| 375 | + console.log(res) | ||
| 376 | + this.com = res.data.list.length | ||
| 377 | + } else { | ||
| 378 | + uni.showToast({ | ||
| 379 | + icon: "error", | ||
| 380 | + title: res.msg | ||
| 381 | + }) | ||
| 382 | + } | ||
| 383 | + }) | ||
| 384 | + }, | ||
| 335 | } | 385 | } |
| 336 | } | 386 | } |
| 337 | </script> | 387 | </script> |
pages/my/myCom/myCom.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="page"> | ||
| 3 | + <view class="notHave" v-if="isShow" style="transform: translateX(-50%); | ||
| 4 | + left: 50%; | ||
| 5 | + position: fixed; | ||
| 6 | + top: 350px;"> | ||
| 7 | + 暂时还未发布招聘 | ||
| 8 | + </view> | ||
| 9 | + <view class="item" v-else v-for="(it,index) in proList" :key="index"> | ||
| 10 | + <view class="top"> | ||
| 11 | + <view class="title"> | ||
| 12 | + {{it.enterpriseName}} | ||
| 13 | + </view> | ||
| 14 | + <view class="time"> | ||
| 15 | + <!-- 2024-02-19 16:36:53 --> | ||
| 16 | + {{it.creatorTime}} | ||
| 17 | + </view> | ||
| 18 | + </view> | ||
| 19 | + <view class="bottom"> | ||
| 20 | + <button type="primary" @click="GoodsDetails(it.id)">详情</button> | ||
| 21 | + <button type="warn" @click="deletePro(it.id)">删除</button> | ||
| 22 | + </view> | ||
| 23 | + </view> | ||
| 24 | + </view> | ||
| 25 | +</template> | ||
| 26 | + | ||
| 27 | +<script> | ||
| 28 | + import request from '@/utils/request.js' | ||
| 29 | +import utils from '../../../service/utils' | ||
| 30 | + export default { | ||
| 31 | + data() { | ||
| 32 | + return { | ||
| 33 | + proList:[], | ||
| 34 | + baseUrl: 'http://deyanggaoxin.fengshiyun.com', | ||
| 35 | + isShow:false | ||
| 36 | + } | ||
| 37 | + }, | ||
| 38 | + onLoad() { | ||
| 39 | + this.getSelfProCount() | ||
| 40 | + }, | ||
| 41 | + methods: { | ||
| 42 | + // 获取自己发布的产品 | ||
| 43 | + getSelfProCount() { | ||
| 44 | + request({ | ||
| 45 | + url: this.baseUrl + '/api/SubDev/baseenterprisemanager', | ||
| 46 | + method: 'get', | ||
| 47 | + data: {} | ||
| 48 | + }).then(res => { | ||
| 49 | + if (res.code === 200) { | ||
| 50 | + console.log(res) | ||
| 51 | + this.proList = res.data.list.map(it=>{ | ||
| 52 | + return { | ||
| 53 | + ...it, | ||
| 54 | + creatorTime:utils.formatTime(it.creatorTime) | ||
| 55 | + } | ||
| 56 | + }) | ||
| 57 | + if (this.proList.length === 0) { | ||
| 58 | + this.isShow = true | ||
| 59 | + } | ||
| 60 | + } else { | ||
| 61 | + uni.showToast({ | ||
| 62 | + icon: "error", | ||
| 63 | + title: res.msg | ||
| 64 | + }) | ||
| 65 | + } | ||
| 66 | + }) | ||
| 67 | + }, | ||
| 68 | + // 跳转到产品详情页面 | ||
| 69 | + GoodsDetails(item) { | ||
| 70 | + uni.navigateTo({ | ||
| 71 | + url: `/pages/my/myComdetail/myComdetail?data=${JSON.stringify(item)}` | ||
| 72 | + }) | ||
| 73 | + }, | ||
| 74 | + // 删除该产品 | ||
| 75 | + deletePro(id){ | ||
| 76 | + uni.showModal({ | ||
| 77 | + title:"提示", | ||
| 78 | + content:"确定删除该产品吗?", | ||
| 79 | + success: (res) => { | ||
| 80 | + request({ | ||
| 81 | + url:this.baseUrl + `/api/Extend/baseproduct/${id}`, | ||
| 82 | + method:'delete', | ||
| 83 | + data:{} | ||
| 84 | + }).then(res=>{ | ||
| 85 | + console.log(res) | ||
| 86 | + if(res.code === 200){ | ||
| 87 | + uni.showToast({ | ||
| 88 | + icon:"success", | ||
| 89 | + title:'删除产品成功!' | ||
| 90 | + }).then(res=>{ | ||
| 91 | + this.getSelfProCount() | ||
| 92 | + }) | ||
| 93 | + | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + }) | ||
| 97 | + } | ||
| 98 | + }) | ||
| 99 | + | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + } | ||
| 103 | +</script> | ||
| 104 | + | ||
| 105 | +<style lang="scss" scoped> | ||
| 106 | +.page{ | ||
| 107 | + width: 100%; | ||
| 108 | + height: 100vh; | ||
| 109 | + background-color: #f3f3f3; | ||
| 110 | + margin: 0 auto; | ||
| 111 | + border-radius: 20rpx; | ||
| 112 | + overflow-y: scroll; | ||
| 113 | +} | ||
| 114 | +.item{ | ||
| 115 | + width: 96%; | ||
| 116 | + margin: 0 auto; | ||
| 117 | + background-color: white; | ||
| 118 | + margin-top: 20rpx; | ||
| 119 | + padding-bottom: 40rpx; | ||
| 120 | + border-radius: 20rpx; | ||
| 121 | + overflow: hidden; | ||
| 122 | + // height: 150rpx; | ||
| 123 | + .top{ | ||
| 124 | + width: 96%; | ||
| 125 | + margin: 0 auto; | ||
| 126 | + display: flex; | ||
| 127 | + margin-top: 40rpx; | ||
| 128 | + .title{ | ||
| 129 | + width: 50%; | ||
| 130 | + text-align: center; | ||
| 131 | + font-weight: bold; | ||
| 132 | + } | ||
| 133 | + .time{ | ||
| 134 | + text-align: center; | ||
| 135 | + width: 50%; | ||
| 136 | + } | ||
| 137 | + } | ||
| 138 | + .bottom{ | ||
| 139 | + display: flex; | ||
| 140 | + margin-top: 20rpx; | ||
| 141 | + button{ | ||
| 142 | + width: 240rpx; | ||
| 143 | + font-size: 30rpx; | ||
| 144 | + height: 70rpx; | ||
| 145 | + line-height: 70rpx; | ||
| 146 | + } | ||
| 147 | + } | ||
| 148 | +} | ||
| 149 | +</style> |
pages/my/myComdetail/myComdetail.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="personalData-v"> | ||
| 3 | + <u-cell-group> | ||
| 4 | + <u-cell-item title="企业名称" :value="info.enterpriseName" :arrow="false"></u-cell-item> | ||
| 5 | + <u-cell-item title="企业规模" :value="info.enterpriseScale" :arrow="false"></u-cell-item> | ||
| 6 | + <u-cell-item title="所属行业" :value="info.industry" :arrow="false"></u-cell-item> | ||
| 7 | + <u-cell-item title="法人" :value="info.legalPerson" :arrow="false"></u-cell-item> | ||
| 8 | + <u-cell-item title="联系人" :value="info.contacts" :arrow="false"></u-cell-item> | ||
| 9 | + <u-cell-item title="联系人电话号码" :value="info.contactsPhone" :arrow="false"></u-cell-item> | ||
| 10 | + <u-cell-item title="从业人数" :value="info.employees" :arrow="false"></u-cell-item> | ||
| 11 | + <u-cell-item title="总产值" :value="info.totalOutputValue" :arrow="false"></u-cell-item> | ||
| 12 | + <u-cell-item title="销售收入" :value="info.salesRevenue" :arrow="false"></u-cell-item> | ||
| 13 | + <u-cell-item title="固投" :value="info.fixedInvestment" :arrow="false"></u-cell-item> | ||
| 14 | + <u-cell-item title="税收" :value="info.taxation" :arrow="false"></u-cell-item> | ||
| 15 | + <u-cell-item title="利润" :value="info.profit" :arrow="false"></u-cell-item> | ||
| 16 | + <u-cell-item title="进口总额" :value="info.imports" :arrow="false"></u-cell-item> | ||
| 17 | + <u-cell-item title="出口总额" :value="info.totalExportValue" :arrow="false"></u-cell-item> | ||
| 18 | + <u-cell-item title="主要产品" :value="info.mainProducts" :arrow="false"></u-cell-item> | ||
| 19 | + <!-- <u-cell-item title="手机号" :value="userInfo.mobilePhone" :arrow="false"></u-cell-item> --> | ||
| 20 | + <!-- <u-cell-item title="邮箱" :value="userInfo.email" :arrow="false"></u-cell-item> --> | ||
| 21 | + </u-cell-group> | ||
| 22 | + <button type="primary" | ||
| 23 | + @click="toUpdate()" | ||
| 24 | + style="margin: 0 auto; margin-top: 30rpx; width: 90%;margin-bottom: 40rpx;" | ||
| 25 | + >修改</button> | ||
| 26 | + </view> | ||
| 27 | +</template> | ||
| 28 | + | ||
| 29 | +<script> | ||
| 30 | + import request from '@/utils/request.js' | ||
| 31 | + export default { | ||
| 32 | + data() { | ||
| 33 | + return { | ||
| 34 | + gender: '', | ||
| 35 | + birthday: '', | ||
| 36 | + userInfo: {}, | ||
| 37 | + baseUrl:'http://deyanggaoxin.fengshiyun.com', | ||
| 38 | + id:'', | ||
| 39 | + info:{} | ||
| 40 | + } | ||
| 41 | + }, | ||
| 42 | + computed: { | ||
| 43 | + baseURL() { | ||
| 44 | + return this.define.baseURL | ||
| 45 | + } | ||
| 46 | + }, | ||
| 47 | + onLoad(options) { | ||
| 48 | + console.log("options",options.data) | ||
| 49 | + this.id = JSON.parse(options.data) | ||
| 50 | + console.log("id",this.id) | ||
| 51 | + this.getDetail() | ||
| 52 | + this.userInfo = uni.getStorageSync('user') || {}; | ||
| 53 | + console.log(this.userInfo) | ||
| 54 | + this.gender = this.userInfo.gender == 1 ? '男' : this.userInfo.gender == 2 ? '女' : '保密' | ||
| 55 | + this.birthday = this.userInfo.birthday ? this.$u.timeFormat(this.userInfo.birthday, 'yyyy-mm-dd') : '' | ||
| 56 | + }, | ||
| 57 | + methods:{ | ||
| 58 | + // 获取详细信息 | ||
| 59 | + getDetail(){ | ||
| 60 | + let that = this | ||
| 61 | + request({ | ||
| 62 | + url:`/api/SubDev/baseenterprisemanager/${this.id}`, | ||
| 63 | + method:'get', | ||
| 64 | + data:{} | ||
| 65 | + }).then(res=>{ | ||
| 66 | + console.log(res) | ||
| 67 | + if(res.code === 200){ | ||
| 68 | + this.info = res.data | ||
| 69 | + } | ||
| 70 | + }) | ||
| 71 | + }, | ||
| 72 | + // 修改 | ||
| 73 | + toUpdate(){ | ||
| 74 | + console.log("ssss") | ||
| 75 | + uni.navigateTo({ | ||
| 76 | + url: `/pages/postCompany/postCompany?data=${JSON.stringify(this.id)}` | ||
| 77 | + }) | ||
| 78 | + } | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | +</script> | ||
| 82 | + | ||
| 83 | +<style lang="scss"> | ||
| 84 | + page { | ||
| 85 | + background-color: #f0f2f6; | ||
| 86 | + } | ||
| 87 | +</style> |
pages/postCompany/Feedback.scss
0 → 100644
| 1 | +.page{ | ||
| 2 | + position: absolute; | ||
| 3 | + left: 0; | ||
| 4 | + top: 0; | ||
| 5 | + width: 100%; | ||
| 6 | + height: 100%; | ||
| 7 | + background-color: #f6f6f6; | ||
| 8 | +} | ||
| 9 | +.titleall-box { | ||
| 10 | + display: flex; | ||
| 11 | + justify-content: space-between; | ||
| 12 | + padding: 40rpx 20rpx 20rpx 0; | ||
| 13 | + .titleall-left { | ||
| 14 | + font-size: 32rpx; | ||
| 15 | + font-weight: bold; | ||
| 16 | + display: flex; | ||
| 17 | + align-items: center; | ||
| 18 | + .titleall-left-line { | ||
| 19 | + width: 14rpx; | ||
| 20 | + height: 36rpx; | ||
| 21 | + border-radius: 0 10rpx 10rpx 0; | ||
| 22 | + background-color: #E60012; | ||
| 23 | + box-shadow: 0 0 10rpx 5rpx #fbdadc; | ||
| 24 | + margin-right: 20rpx; | ||
| 25 | + } | ||
| 26 | + text { | ||
| 27 | + font-size: 28rpx; | ||
| 28 | + color: #999999; | ||
| 29 | + } | ||
| 30 | + } | ||
| 31 | +} | ||
| 32 | +/* 反馈类型 */ | ||
| 33 | +.feedback-type{ | ||
| 34 | + position: relative; | ||
| 35 | + display: flex; | ||
| 36 | + align-items: center; | ||
| 37 | + justify-content: space-between; | ||
| 38 | + width: 94%; | ||
| 39 | + height: 100rpx; | ||
| 40 | + margin: 20rpx auto; | ||
| 41 | + background-color: #FFFFFF; | ||
| 42 | + border-radius: 20rpx; | ||
| 43 | + padding: 0 4%; | ||
| 44 | + .feedback-type-left { | ||
| 45 | + color: #909090; | ||
| 46 | + } | ||
| 47 | + .title{ | ||
| 48 | + display: flex; | ||
| 49 | + align-items: center; | ||
| 50 | + text{ | ||
| 51 | + font-size: 26rpx; | ||
| 52 | + } | ||
| 53 | + } | ||
| 54 | + .picker{ | ||
| 55 | + position: absolute; | ||
| 56 | + width: 100%; | ||
| 57 | + height: 100%; | ||
| 58 | + opacity: 0; | ||
| 59 | + } | ||
| 60 | + .more{ | ||
| 61 | + display: flex; | ||
| 62 | + align-items: center; | ||
| 63 | + text{ | ||
| 64 | + color: #000; | ||
| 65 | + font-size: 34rpx; | ||
| 66 | + } | ||
| 67 | + image { | ||
| 68 | + width: 20rpx; | ||
| 69 | + height: 20rpx; | ||
| 70 | + margin-left: 10rpx; | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | + .feedback-type-right { | ||
| 74 | + display: flex; | ||
| 75 | + align-items: center; | ||
| 76 | + } | ||
| 77 | +} | ||
| 78 | +.example-body { | ||
| 79 | + padding: 10px; | ||
| 80 | + padding-top: 0; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + .custom-image-box { | ||
| 84 | + /* #ifndef APP-NVUE */ | ||
| 85 | + display: flex; | ||
| 86 | + /* #endif */ | ||
| 87 | + flex-direction: row; | ||
| 88 | + justify-content: space-between; | ||
| 89 | + align-items: center; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + .text { | ||
| 93 | + font-size: 14px; | ||
| 94 | + color: #333; | ||
| 95 | + } | ||
| 96 | +.segmented-control { | ||
| 97 | + margin-bottom: 15px; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + .button-group { | ||
| 101 | + margin-top: 15px; | ||
| 102 | + display: flex; | ||
| 103 | + justify-content: space-around; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + .form-item { | ||
| 107 | + display: flex; | ||
| 108 | + align-items: center; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + .button { | ||
| 112 | + display: flex; | ||
| 113 | + align-items: center; | ||
| 114 | + height: 35px; | ||
| 115 | + margin-left: 10px; | ||
| 116 | + } | ||
| 117 | +/* 反馈内容 */ | ||
| 118 | +.feedback-data{ | ||
| 119 | + width: 94%; | ||
| 120 | + // height: 600rpx; | ||
| 121 | + margin: 20rpx auto; | ||
| 122 | + background-color: #FFFFFF; | ||
| 123 | + border-radius: 20rpx; | ||
| 124 | + .content{ | ||
| 125 | + padding: 20rpx; | ||
| 126 | + textarea{ | ||
| 127 | + width: 94%; | ||
| 128 | + height: 320rpx; | ||
| 129 | + background-color: #f6f6f6; | ||
| 130 | + border-radius: 20rpx; | ||
| 131 | + padding: 20rpx; | ||
| 132 | + font-size: 26rpx; | ||
| 133 | + color: #222222; | ||
| 134 | + } | ||
| 135 | + } | ||
| 136 | + .voucher-img{ | ||
| 137 | + display: flex; | ||
| 138 | + align-items: center; | ||
| 139 | + padding: 0 20rpx; | ||
| 140 | + height: 240rpx; | ||
| 141 | + margin-top: 20rpx; | ||
| 142 | + .list{ | ||
| 143 | + width: 33%; | ||
| 144 | + height: 100%; | ||
| 145 | + image{ | ||
| 146 | + width: 160rpx; | ||
| 147 | + height: 160rpx; | ||
| 148 | + border-radius: 10rpx; | ||
| 149 | + } | ||
| 150 | + } | ||
| 151 | + } | ||
| 152 | +} | ||
| 153 | + | ||
| 154 | +/* 联系方式 */ | ||
| 155 | +.contact-way{ | ||
| 156 | + display: flex; | ||
| 157 | + align-items: center; | ||
| 158 | + justify-content: center; | ||
| 159 | + width: 94%; | ||
| 160 | + height: 100rpx; | ||
| 161 | + margin: 20rpx auto; | ||
| 162 | + background-color: #FFFFFF; | ||
| 163 | + border-radius: 20rpx; | ||
| 164 | + input{ | ||
| 165 | + width: 100%; | ||
| 166 | + height: 100%; | ||
| 167 | + padding: 0 4%; | ||
| 168 | + font-size: 26rpx; | ||
| 169 | + color: #222222; | ||
| 170 | + } | ||
| 171 | +} | ||
| 172 | + | ||
| 173 | +/* 提交 */ | ||
| 174 | +.submit-btn{ | ||
| 175 | + display: flex; | ||
| 176 | + align-items: center; | ||
| 177 | + justify-content: center; | ||
| 178 | + width: 94%; | ||
| 179 | + height: 80rpx; | ||
| 180 | + margin: 30rpx auto; | ||
| 181 | + background: #E60012; | ||
| 182 | + border-radius: 80rpx; | ||
| 183 | + text{ | ||
| 184 | + color: #FFFFFF; | ||
| 185 | + font-size: 28rpx; | ||
| 186 | + } | ||
| 187 | +} | ||
| 0 | \ No newline at end of file | 188 | \ No newline at end of file |
pages/postCompany/postCompany.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="page"> | ||
| 3 | + <!-- 反馈内容 --> | ||
| 4 | + <view class="feedback-data"> | ||
| 5 | + <view class="titleall-box"> | ||
| 6 | + <view class="titleall-left"> | ||
| 7 | + <view class="titleall-left-line"></view>填写企业信息 | ||
| 8 | + </view> | ||
| 9 | + </view> | ||
| 10 | + <uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData" style="width: 96%;margin: 0 auto;"> | ||
| 11 | + <uni-forms-item label="公司名称" required name="enterpriseName"> | ||
| 12 | + <uni-easyinput v-model="valiFormData.enterpriseName" placeholder="请输入" /> | ||
| 13 | + </uni-forms-item> | ||
| 14 | + <uni-forms-item label="行业类型" required name="industry"> | ||
| 15 | + <uni-easyinput v-model="valiFormData.industry" placeholder="请输入" /> | ||
| 16 | + </uni-forms-item> | ||
| 17 | + <uni-forms-item label="公司法人" required name="legalPerson"> | ||
| 18 | + <uni-easyinput v-model="valiFormData.legalPerson" placeholder="请输入" /> | ||
| 19 | + </uni-forms-item> | ||
| 20 | + <uni-forms-item label="公司联系人" required name="contacts"> | ||
| 21 | + <uni-easyinput v-model="valiFormData.contacts" placeholder="请输入" /> | ||
| 22 | + </uni-forms-item> | ||
| 23 | + <uni-forms-item label="联系人电话" required name="contactsPhone"> | ||
| 24 | + <uni-easyinput v-model="valiFormData.contactsPhone" placeholder="请输入" /> | ||
| 25 | + </uni-forms-item> | ||
| 26 | + <uni-forms-item label="从业人数" required name="employees"> | ||
| 27 | + <uni-easyinput v-model="valiFormData.employees" placeholder="请输入" /> | ||
| 28 | + </uni-forms-item> | ||
| 29 | + <uni-forms-item label="总产值" required name="totalOutputValue"> | ||
| 30 | + <uni-easyinput v-model="valiFormData.totalOutputValue" placeholder="请输入" /> | ||
| 31 | + </uni-forms-item> | ||
| 32 | + <uni-forms-item label="销售收入" required name="salesRevenue"> | ||
| 33 | + <uni-easyinput v-model="valiFormData.salesRevenue" placeholder="请输入" /> | ||
| 34 | + </uni-forms-item> | ||
| 35 | + <uni-forms-item label="固投" required name="fixedInvestment"> | ||
| 36 | + <uni-easyinput v-model="valiFormData.fixedInvestment" placeholder="请输入" /> | ||
| 37 | + </uni-forms-item> | ||
| 38 | + <uni-forms-item label="税收" required name="taxation"> | ||
| 39 | + <uni-easyinput v-model="valiFormData.taxation" placeholder="请输入" /> | ||
| 40 | + </uni-forms-item> | ||
| 41 | + <uni-forms-item label="利润" required name="profit"> | ||
| 42 | + <uni-easyinput v-model="valiFormData.profit" placeholder="请输入" /> | ||
| 43 | + </uni-forms-item> | ||
| 44 | + <uni-forms-item label="进口总额" name="imports"> | ||
| 45 | + <uni-easyinput v-model="valiFormData.imports" placeholder="请输入" /> | ||
| 46 | + </uni-forms-item> | ||
| 47 | + <uni-forms-item label="出口总额" name="totalExportValue"> | ||
| 48 | + <uni-easyinput v-model="valiFormData.totalExportValue" placeholder="请输入" /> | ||
| 49 | + </uni-forms-item> | ||
| 50 | + <uni-forms-item label="主要产品" required name="mainProducts"> | ||
| 51 | + <uni-easyinput v-model="valiFormData.mainProducts" placeholder="请输入" /> | ||
| 52 | + </uni-forms-item> | ||
| 53 | + <uni-forms-item label="创建用户企业" required name="creatorUserEnterprise"> | ||
| 54 | + <uni-easyinput v-model="valiFormData.creatorUserEnterprise" placeholder="请输入" /> | ||
| 55 | + </uni-forms-item> | ||
| 56 | + <!-- <uni-forms-item label="党的建设详细内容"> | ||
| 57 | + <uni-easyinput type="textarea" v-model="valiFormData.bodyContent" placeholder="请输入" /> | ||
| 58 | + </uni-forms-item> --> | ||
| 59 | + </uni-forms> | ||
| 60 | + <!-- 选择反馈类型 --> | ||
| 61 | + <view class="feedback-type"> | ||
| 62 | + <view class="feedback-type-left">企业规模</view> | ||
| 63 | + <view class="feedback-type-right"> | ||
| 64 | + <view class="title"> | ||
| 65 | + <text>{{TypeArray[TypeIndex]}}</text> | ||
| 66 | + </view> | ||
| 67 | + <view class="picker"> | ||
| 68 | + <picker @change="FeedbackTypeCh" :value="TypeIndex" :range="TypeArray"> | ||
| 69 | + <view class="uni-input">{{TypeArray[TypeIndex]}}</view> | ||
| 70 | + </picker> | ||
| 71 | + </view> | ||
| 72 | + <view class="more"> | ||
| 73 | + <image src="../../static/down1.png"></image> | ||
| 74 | + </view> | ||
| 75 | + </view> | ||
| 76 | + </view> | ||
| 77 | + <!-- <view class="example-body"> | ||
| 78 | + <uni-file-picker limit="9" @select="select" title="信息图片"></uni-file-picker> | ||
| 79 | + </view> --> | ||
| 80 | + </view> | ||
| 81 | + | ||
| 82 | + <!-- 提交 --> | ||
| 83 | + <view v-if="have" class="submit-btn" @click="submitContent('valiForm')"> | ||
| 84 | + <text>发布</text> | ||
| 85 | + </view> | ||
| 86 | + <view v-else class="submit-btn" @click="updateEvent('valiForm')"> | ||
| 87 | + <text>保存</text> | ||
| 88 | + </view> | ||
| 89 | + </view> | ||
| 90 | +</template> | ||
| 91 | + | ||
| 92 | +<script> | ||
| 93 | + import { | ||
| 94 | + data | ||
| 95 | + } from '../../uview-ui/libs/mixin/mixin'; | ||
| 96 | + import request from '@/utils/request.js' | ||
| 97 | +import utils from '../../service/utils'; | ||
| 98 | + export default { | ||
| 99 | + data() { | ||
| 100 | + return { | ||
| 101 | + userCode: {}, | ||
| 102 | + // 选择图片路径 | ||
| 103 | + filePath: [], | ||
| 104 | + uploadPath: [], | ||
| 105 | + type: "", | ||
| 106 | + lastModifyUserId: '', | ||
| 107 | + // 用户公司ID | ||
| 108 | + companyId:'', | ||
| 109 | + // 校验表单数据 | ||
| 110 | + valiFormData: { | ||
| 111 | + enterpriseName: '', | ||
| 112 | + industry: '', | ||
| 113 | + legalPerson: '', | ||
| 114 | + contacts:'', | ||
| 115 | + contactsPhone:"", | ||
| 116 | + employees:'', | ||
| 117 | + totalOutputValue:'', | ||
| 118 | + salesRevenue:'', | ||
| 119 | + fixedInvestment:'', | ||
| 120 | + taxation:'', | ||
| 121 | + profit:'', | ||
| 122 | + imports:'', | ||
| 123 | + totalExportValue:'', | ||
| 124 | + mainProducts:'', | ||
| 125 | + creatorUserEnterprise:'' | ||
| 126 | + }, | ||
| 127 | + creater: '', | ||
| 128 | + rules: { | ||
| 129 | + enterpriseName: { | ||
| 130 | + rules: [{ | ||
| 131 | + required: true, | ||
| 132 | + errorMessage: '不能为空' | ||
| 133 | + }] | ||
| 134 | + }, | ||
| 135 | + industry: { | ||
| 136 | + rules: [{ | ||
| 137 | + required: true, | ||
| 138 | + errorMessage: '不能为空' | ||
| 139 | + }] | ||
| 140 | + }, | ||
| 141 | + legalPerson: { | ||
| 142 | + rules: [{ | ||
| 143 | + required: true, | ||
| 144 | + errorMessage: '不能为空' | ||
| 145 | + }] | ||
| 146 | + }, | ||
| 147 | + contacts: { | ||
| 148 | + rules: [{ | ||
| 149 | + required: true, | ||
| 150 | + errorMessage: '不能为空' | ||
| 151 | + }] | ||
| 152 | + }, | ||
| 153 | + contactsPhone: { | ||
| 154 | + rules: [{ | ||
| 155 | + required: true, | ||
| 156 | + errorMessage: '不能为空' | ||
| 157 | + }] | ||
| 158 | + }, | ||
| 159 | + employees: { | ||
| 160 | + rules: [{ | ||
| 161 | + required: true, | ||
| 162 | + errorMessage: '不能为空' | ||
| 163 | + }] | ||
| 164 | + }, | ||
| 165 | + salesRevenue: { | ||
| 166 | + rules: [{ | ||
| 167 | + required: true, | ||
| 168 | + errorMessage: '不能为空' | ||
| 169 | + }] | ||
| 170 | + }, | ||
| 171 | + fixedInvestment: { | ||
| 172 | + rules: [{ | ||
| 173 | + required: true, | ||
| 174 | + errorMessage: '不能为空' | ||
| 175 | + }] | ||
| 176 | + }, | ||
| 177 | + taxation: { | ||
| 178 | + rules: [{ | ||
| 179 | + required: true, | ||
| 180 | + errorMessage: '不能为空' | ||
| 181 | + }] | ||
| 182 | + }, | ||
| 183 | + profit: { | ||
| 184 | + rules: [{ | ||
| 185 | + required: true, | ||
| 186 | + errorMessage: '不能为空' | ||
| 187 | + }] | ||
| 188 | + }, | ||
| 189 | + mainProducts: { | ||
| 190 | + rules: [{ | ||
| 191 | + required: true, | ||
| 192 | + errorMessage: '不能为空' | ||
| 193 | + }] | ||
| 194 | + }, | ||
| 195 | + creatorUserEnterprise: { | ||
| 196 | + rules: [{ | ||
| 197 | + required: true, | ||
| 198 | + errorMessage: '不能为空' | ||
| 199 | + }] | ||
| 200 | + }, | ||
| 201 | + totalOutputValue: { | ||
| 202 | + rules: [{ | ||
| 203 | + required: true, | ||
| 204 | + errorMessage: '不能为空' | ||
| 205 | + }] | ||
| 206 | + }, | ||
| 207 | + imports: { | ||
| 208 | + rules: [{ | ||
| 209 | + required: true, | ||
| 210 | + errorMessage: '不能为空' | ||
| 211 | + }] | ||
| 212 | + }, | ||
| 213 | + totalExportValue: { | ||
| 214 | + rules: [{ | ||
| 215 | + required: true, | ||
| 216 | + errorMessage: '不能为空' | ||
| 217 | + }] | ||
| 218 | + }, | ||
| 219 | + }, | ||
| 220 | + baseUrl: "http://deyanggaoxin.fengshiyun.com", | ||
| 221 | + // 判断是否传了id | ||
| 222 | + isId:'', | ||
| 223 | + have:false, | ||
| 224 | + detailData:[], | ||
| 225 | + TypeArray: ['规上', '规下'], | ||
| 226 | + TypeIndex: 0, | ||
| 227 | + }; | ||
| 228 | + | ||
| 229 | + }, | ||
| 230 | + // onShow() { | ||
| 231 | + // this.getType() | ||
| 232 | + // }, | ||
| 233 | + onLoad(options) { | ||
| 234 | + console.log("options",options) | ||
| 235 | + | ||
| 236 | + if(JSON.stringify(options) == "{}"){ | ||
| 237 | + this.have = true | ||
| 238 | + }else{ | ||
| 239 | + this.isId = JSON.parse(options.data) | ||
| 240 | + console.log("Id",this.isId) | ||
| 241 | + this.getDetail(this.isId) | ||
| 242 | + } | ||
| 243 | + this.getUser() | ||
| 244 | + let user = uni.getStorageSync('user') | ||
| 245 | + this.lastModifyUserId = user.userInfo.userId | ||
| 246 | + | ||
| 247 | + }, | ||
| 248 | + methods: { | ||
| 249 | + /** | ||
| 250 | + * 反馈类型 | ||
| 251 | + * @param {Object} val | ||
| 252 | + */ | ||
| 253 | + FeedbackTypeCh(val){ | ||
| 254 | + console.log(val); | ||
| 255 | + this.TypeIndex = val.detail.value; | ||
| 256 | + }, | ||
| 257 | + // 获取上传状态 | ||
| 258 | + select(e) { | ||
| 259 | + console.log('选择文件:', e) | ||
| 260 | + this.filePath = e.tempFilePaths | ||
| 261 | + }, | ||
| 262 | + // 获取用户信息 | ||
| 263 | + getUser() { | ||
| 264 | + if (uni.getStorageSync('user')) { | ||
| 265 | + this.userCode = uni.getStorageSync('user').userInfo | ||
| 266 | + this.companyId = this.userCode.organizeId | ||
| 267 | + this.valiFormData.creatorUserEnterprise = this.userCode.organizeName | ||
| 268 | + // this.userInfo = this.userCode.userAccount | ||
| 269 | + // this.userInfo = '123456' | ||
| 270 | + console.log('用户已登录!', this.userCode) | ||
| 271 | + } else { | ||
| 272 | + uni.showToast({ | ||
| 273 | + title: '请登录', | ||
| 274 | + icon: 'none' | ||
| 275 | + }) | ||
| 276 | + setTimeout(() => { | ||
| 277 | + uni.reLaunch({ | ||
| 278 | + url: '/pages/login/index' | ||
| 279 | + }) | ||
| 280 | + }) | ||
| 281 | + } | ||
| 282 | + }, | ||
| 283 | + // 提交内容 | ||
| 284 | + submitContent(ref) { | ||
| 285 | + let that = this | ||
| 286 | + this.$refs[ref].validate().then(res => { | ||
| 287 | + console.log('success', res); | ||
| 288 | + uni.showToast({ | ||
| 289 | + title: `校验通过` | ||
| 290 | + }) | ||
| 291 | + this.uploadPath = [] | ||
| 292 | + setTimeout(function(){ | ||
| 293 | + that.postAll() | ||
| 294 | + },1500) | ||
| 295 | + }) | ||
| 296 | + }, | ||
| 297 | + | ||
| 298 | + // 上传所有 | ||
| 299 | + postAll() { | ||
| 300 | + console.log("进入POST") | ||
| 301 | + let that = this | ||
| 302 | + let enterpriseScale = this.TypeArray[this.TypeIndex] | ||
| 303 | + if (that.uploadPath) { | ||
| 304 | + console.log('jinru') | ||
| 305 | + // console.log(uni.getStorageSync('token')) | ||
| 306 | + var info = { | ||
| 307 | + enterpriseName: that.valiFormData.enterpriseName, | ||
| 308 | + industry: that.valiFormData.industry, | ||
| 309 | + legalPerson: that.valiFormData.legalPerson, | ||
| 310 | + contacts:that.valiFormData.contacts, | ||
| 311 | + contactsPhone:that.valiFormData.contactsPhone, | ||
| 312 | + employees:that.valiFormData.employees, | ||
| 313 | + totalOutputValue:that.valiFormData.totalOutputValue, | ||
| 314 | + salesRevenue:that.valiFormData.salesRevenue, | ||
| 315 | + fixedInvestment:that.valiFormData.fixedInvestment, | ||
| 316 | + taxation:that.valiFormData.taxation, | ||
| 317 | + profit:that.valiFormData.profit, | ||
| 318 | + imports:that.valiFormData.imports, | ||
| 319 | + totalExportValue:that.valiFormData.totalExportValue, | ||
| 320 | + mainProducts:that.valiFormData.mainProducts, | ||
| 321 | + creatorUserEnterprise:that.companyId, | ||
| 322 | + enterpriseScale:enterpriseScale | ||
| 323 | + } | ||
| 324 | + console.log(info) | ||
| 325 | + this.API.postCompanyInfo(info).then(res=>{ | ||
| 326 | + console.log("1111",res); | ||
| 327 | + console.log("res",res); | ||
| 328 | + if (res.code == 200) { | ||
| 329 | + console.log("上传后的值", res) | ||
| 330 | + uni.showToast({ | ||
| 331 | + icon: "success", | ||
| 332 | + title: "发布成功!" | ||
| 333 | + }).then(()=>{ | ||
| 334 | + uni.navigateTo({ | ||
| 335 | + url:'/pages/datain/datain' | ||
| 336 | + }) | ||
| 337 | + }) | ||
| 338 | + } | ||
| 339 | + }).catch((err)=>{ | ||
| 340 | + console.log(err) | ||
| 341 | + }) | ||
| 342 | + | ||
| 343 | + // request({ | ||
| 344 | + // url: '/api/SubDev/basepartybuilding', | ||
| 345 | + // method: 'POST', | ||
| 346 | + // // header: { | ||
| 347 | + // // "Content-Type": "application/json;charset:utf-8" | ||
| 348 | + // // }, | ||
| 349 | + // data: { | ||
| 350 | + // title: that.valiFormData.title, | ||
| 351 | + // content: that.valiFormData.bodyContent, | ||
| 352 | + // creatorUserId: that.userCode.userId, | ||
| 353 | + // summary: that.valiFormData.subTitle, | ||
| 354 | + // image: that.uploadPath, | ||
| 355 | + // } | ||
| 356 | + // }).then(res => { | ||
| 357 | + // console.log("res",res); | ||
| 358 | + // if (res.code == 200) { | ||
| 359 | + // console.log("上传后的值", res) | ||
| 360 | + // uni.showToast({ | ||
| 361 | + // icon: "success", | ||
| 362 | + // title: "发布成功" | ||
| 363 | + // }) | ||
| 364 | + // } | ||
| 365 | + // }) | ||
| 366 | + | ||
| 367 | + // } else { | ||
| 368 | + // uni.showToast({ | ||
| 369 | + // icon: "error", | ||
| 370 | + // title: "请选择图片" | ||
| 371 | + // }) | ||
| 372 | + // } | ||
| 373 | + // setTimeout(function(){ | ||
| 374 | + // console.log('需要', that.uploadPath) | ||
| 375 | + | ||
| 376 | + // },1000) | ||
| 377 | + } | ||
| 378 | + }, | ||
| 379 | + // /** | ||
| 380 | + // * 反馈类型 | ||
| 381 | + // * @param {Object} | ||
| 382 | + // */ | ||
| 383 | + // FeedbackTypeCh(val) { | ||
| 384 | + // console.log(val); | ||
| 385 | + // this.TypeIndex = val.detail.value; | ||
| 386 | + // } | ||
| 387 | + | ||
| 388 | + // 获取详细信息 | ||
| 389 | + getDetail(id){ | ||
| 390 | + let that = this | ||
| 391 | + request({ | ||
| 392 | + url:`/api/SubDev/baseenterprisemanager/${id}`, | ||
| 393 | + method:'get', | ||
| 394 | + data:{} | ||
| 395 | + }).then(res=>{ | ||
| 396 | + console.log(res) | ||
| 397 | + if(res.code === 200){ | ||
| 398 | + this.info = res.data | ||
| 399 | + that.valiFormData.enterpriseName = this.info.enterpriseName | ||
| 400 | + that.valiFormData.industry = this.info.industry | ||
| 401 | + that.valiFormData.legalPerson = this.info.legalPerson | ||
| 402 | + that.valiFormData.contacts = this.info.contacts | ||
| 403 | + that.valiFormData.contactsPhone = this.info.contactsPhone | ||
| 404 | + that.valiFormData.employees = this.info.employees | ||
| 405 | + that.valiFormData.totalOutputValue = this.info.totalOutputValue | ||
| 406 | + that.valiFormData.salesRevenue = this.info.salesRevenue | ||
| 407 | + that.valiFormData.fixedInvestment = this.info.fixedInvestment | ||
| 408 | + that.valiFormData.taxation = this.info.taxation | ||
| 409 | + that.valiFormData.profit = this.info.profit | ||
| 410 | + that.valiFormData.imports = this.info.imports | ||
| 411 | + that.valiFormData.totalExportValue = this.info.totalExportValue | ||
| 412 | + that.valiFormData.mainProducts = this.info.mainProducts | ||
| 413 | + } | ||
| 414 | + }) | ||
| 415 | + }, | ||
| 416 | + | ||
| 417 | + // 信息更新 | ||
| 418 | + updateEvent(ref){ | ||
| 419 | + let that = this | ||
| 420 | + this.$refs[ref].validate().then(res => { | ||
| 421 | + console.log('success', res); | ||
| 422 | + uni.showToast({ | ||
| 423 | + title: `校验通过` | ||
| 424 | + }) | ||
| 425 | + | ||
| 426 | + this.uploadPath = [] | ||
| 427 | + console.log('需要', this.uploadPath) | ||
| 428 | + setTimeout(function(){ | ||
| 429 | + that.updateData() | ||
| 430 | + },1500) | ||
| 431 | + }) | ||
| 432 | + }, | ||
| 433 | + // 更新接口 | ||
| 434 | + updateData(){ | ||
| 435 | + let that = this | ||
| 436 | + let enterpriseScale = this.TypeArray[this.TypeIndex] | ||
| 437 | + if (that.uploadPath) { | ||
| 438 | + console.log('jinru') | ||
| 439 | + // console.log(uni.getStorageSync('token')) | ||
| 440 | + console.log("id",this.isId) | ||
| 441 | + var info = { | ||
| 442 | + enterpriseName: that.valiFormData.enterpriseName, | ||
| 443 | + industry: that.valiFormData.industry, | ||
| 444 | + legalPerson: that.valiFormData.legalPerson, | ||
| 445 | + contacts:that.valiFormData.contacts, | ||
| 446 | + contactsPhone:that.valiFormData.contactsPhone, | ||
| 447 | + employees:that.valiFormData.employees, | ||
| 448 | + totalOutputValue:that.valiFormData.totalOutputValue, | ||
| 449 | + salesRevenue:that.valiFormData.salesRevenue, | ||
| 450 | + fixedInvestment:that.valiFormData.fixedInvestment, | ||
| 451 | + taxation:that.valiFormData.taxation, | ||
| 452 | + profit:that.valiFormData.profit, | ||
| 453 | + imports:that.valiFormData.imports, | ||
| 454 | + totalExportValue:that.valiFormData.totalExportValue, | ||
| 455 | + mainProducts:that.valiFormData.mainProducts, | ||
| 456 | + creatorUserEnterprise:that.companyId, | ||
| 457 | + enterpriseScale:enterpriseScale, | ||
| 458 | + id:this.isId | ||
| 459 | + } | ||
| 460 | + console.log(info) | ||
| 461 | + this.API.updateInfo(info).then(res=>{ | ||
| 462 | + console.log("1111",res); | ||
| 463 | + console.log("res",res); | ||
| 464 | + if (res.code == 200) { | ||
| 465 | + console.log("上传后的值", res) | ||
| 466 | + uni.showToast({ | ||
| 467 | + icon: "success", | ||
| 468 | + title: "更新成功!" | ||
| 469 | + }) | ||
| 470 | + } | ||
| 471 | + }).catch((err)=>{ | ||
| 472 | + console.log(err) | ||
| 473 | + }) | ||
| 474 | + } | ||
| 475 | + } | ||
| 476 | + }, | ||
| 477 | + } | ||
| 478 | +</script> | ||
| 479 | + | ||
| 480 | +<style scoped lang="scss"> | ||
| 481 | + @import 'Feedback.scss'; | ||
| 482 | +</style> | ||
| 0 | \ No newline at end of file | 483 | \ No newline at end of file |