|
@@ -46,12 +46,23 @@
|
|
|
<view class="modular">
|
|
|
<u-form-item label="上传坐标" label-width="30%" class="title Regular">
|
|
|
<text @click='naviageToPage("/pages/grain_pulse/localtion/coordinate")'
|
|
|
- class="con-list Regular">{{deptList.buyer == null ? "未上传":deptList.buyer}}<text
|
|
|
+ class="con-list Regular">{{position.longitude == undefined ? "未上传":'已上传'}}<text
|
|
|
class='tip_text cuIcon-right'></text></text>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="所在区域" label-width="30%" class="title Regular">
|
|
|
- <u-input v-model="deptList.name" input-align="right" class="write Regular" disabled
|
|
|
- placeholder="自动获取" />
|
|
|
+ <view style='text-align:right;width:100%;padding-right:10px;' v-if='position.province!=undefined'>
|
|
|
+ {{position.province}}
|
|
|
+ {{position.city}}
|
|
|
+ {{position.district}}
|
|
|
+ </view>
|
|
|
+ <view style='text-align:right;width:100%;padding-right:10px;' v-if='position.pname!=undefined'>
|
|
|
+ {{position.pname}}
|
|
|
+ {{position.cityname}}
|
|
|
+ {{position.adname}}
|
|
|
+ </view>
|
|
|
+ <view style='text-align:right;width:100%;padding-right:10px;' v-if='position.pname==undefined&&position.province==undefined'>
|
|
|
+ 未上传坐标
|
|
|
+ </view>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="详细地址" label-width="30%" class="title Regular">
|
|
|
<u-input v-model="deptList.detailedAddress" input-align="right" class="write Regular"
|
|
@@ -61,19 +72,19 @@
|
|
|
<view class="title Regular" style="margin-top: 15rpx;">上传图片</view>
|
|
|
<view v-if="license1 != ''">
|
|
|
<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
|
|
|
- :size-type="['compressed']" @on-success="getImgUrl" @on-error="onError"
|
|
|
- @on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
|
|
|
+ :size-type="['compressed']" @on-success="getImgUrl"
|
|
|
+ @on-uploaded="isAdd = true" :before-upload="filterFileType"
|
|
|
:options="uploadOptions" customBorder='2px dashed #D8DEF7' customBtnFontSize="14" customBtnColor="#6A7282" :customBtnHeight='custombtnheight'
|
|
|
:customBtnWidth='custombtnwidth' customBack='#F9FAFE' :customBtnImage="custombtnimage" :customBtn='custombtn'
|
|
|
- :custom="uploadCustom" @on-progress="onProgress"></upload>
|
|
|
+ :custom="uploadCustom" ></upload>
|
|
|
</view>
|
|
|
<view v-if="license2 != ''">
|
|
|
<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
|
|
|
- :size-type="['compressed']" @on-success="getImgUrl1" @on-error="onError"
|
|
|
- @on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
|
|
|
+ :size-type="['compressed']" @on-success="getImgUrl1"
|
|
|
+ @on-uploaded="isAdd = true" :before-upload="filterFileType"
|
|
|
:options="uploadOptions1" customBack='#FEF9FA' customBorder='2px dashed #F9D5DC' customBtnFontSize="14" customBtnColor="#6A7282" :customBtnHeight='custombtnheight'
|
|
|
:customBtnWidth='custombtnwidth' :customBtnImage="custombtnimage" :customBtn='custombtn'
|
|
|
- :custom="uploadCustom" @on-progress="onProgress"></upload>
|
|
|
+ :custom="uploadCustom" ></upload>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -97,7 +108,8 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- mapState
|
|
|
+ mapState,
|
|
|
+ mapMutations
|
|
|
} from 'vuex';
|
|
|
import upload from '@/components/upload.vue';
|
|
|
export default {
|
|
@@ -123,7 +135,12 @@
|
|
|
mainBusinessType: [],
|
|
|
uploadCustom: true,
|
|
|
deptList: {
|
|
|
- companyProfile:''
|
|
|
+ compName:'',
|
|
|
+ title:'',
|
|
|
+ companyProfile:'',
|
|
|
+ province:'',
|
|
|
+ city:'',
|
|
|
+ area:''
|
|
|
},
|
|
|
management: [{
|
|
|
name: "粮库",
|
|
@@ -158,7 +175,9 @@
|
|
|
show: false,
|
|
|
// anNiuCss:"types",
|
|
|
anNiuCss: [],
|
|
|
- position:{},
|
|
|
+ position:{
|
|
|
+ province:''
|
|
|
+ },
|
|
|
custombtn:true,
|
|
|
custombtnimage:'../../static/img/liangmai/ic_shanchuan@3x.png',
|
|
|
custombtnwidth:50,
|
|
@@ -169,9 +188,13 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- console.log(options)
|
|
|
- this.position=JSON.parse(options.position)
|
|
|
- console.log(this.position)
|
|
|
+
|
|
|
+ if(options.position){
|
|
|
+ this.position=JSON.parse(options.position)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ console.log(this.$store.state.enter)
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['hasLogin', 'userInfo'])
|
|
@@ -182,9 +205,21 @@
|
|
|
this.deptList.attachmentAddress = res
|
|
|
},
|
|
|
naviageToPage(item) {
|
|
|
+ // console.log(this.enter)
|
|
|
+ var data={
|
|
|
+ compName:this.deptList.compName,
|
|
|
+ title:this.deptList.title,
|
|
|
+ mainBusinessType:this.mainBusinessType.toString(),
|
|
|
+ companyProfile:this.deptList.companyProfile,
|
|
|
+ }
|
|
|
+ this.$store.dispatch('enterchange',data)
|
|
|
+ console.log(this.$store.state.enter)
|
|
|
+ // this.enterchange()
|
|
|
+ var mainBusinessType=this.mainBusinessType.toString()
|
|
|
uni.navigateTo({
|
|
|
url: item
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
getImgUrl1(res) {
|
|
|
console.log(res)
|
|
@@ -247,7 +282,7 @@
|
|
|
this.$api.msg('企业简介不能为空')
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptList.longitude&&!this.deptList.longitude) {
|
|
|
+ if (!this.position.longitude&&!this.position.latitude) {
|
|
|
this.$api.msg('上传坐标不能为空')
|
|
|
return
|
|
|
}
|
|
@@ -282,8 +317,18 @@
|
|
|
// this.show = true
|
|
|
// return
|
|
|
this.deptList.mainBusinessType=this.mainBusinessType.toString()
|
|
|
- this.deptList.longitude='40.22077'
|
|
|
- this.deptList.latitude='116.23128'
|
|
|
+ this.deptList.longitude=this.position.longitude
|
|
|
+ this.deptList.latitude=this.position.latitude
|
|
|
+ if(this.position.province!=undefined){
|
|
|
+ this.deptList.province=this.position.province
|
|
|
+ this.deptList.city=this.position.city
|
|
|
+ this.deptList.area=this.position.district
|
|
|
+ }else if(this.position.pname!=undefined){
|
|
|
+ this.deptList.province=this.position.pname
|
|
|
+ this.deptList.city=this.position.cityname
|
|
|
+ this.deptList.area=this.position.adname
|
|
|
+ }
|
|
|
+
|
|
|
this.deptList.createPhone=this.userInfo.phone
|
|
|
uni.showModal({
|
|
|
content: "确定提交企业信息??",
|