|
@@ -9,32 +9,32 @@
|
|
|
<u-form class="forList">
|
|
|
<view class="modular">
|
|
|
<u-form-item label="公司名称" label-width="30%" class="title Regular">
|
|
|
- <u-input v-model="deptList.name" input-align="right" class="write Medium" placeholder="请输入公司名称" />
|
|
|
+ <u-input v-model="deptList.compName" input-align="right" class="write Medium" placeholder="请输入公司名称" />
|
|
|
</u-form-item>
|
|
|
<view>
|
|
|
<view class="title Regular" style="margin-top: 15rpx;">主要类型(可多选,必须为真实经营类型)</view>
|
|
|
<view v-for="(item,index) in management" class="choice">
|
|
|
<!-- <u-tag :type="types[index] == null ? 'info' : types[index]" :text="item" show="show"
|
|
|
@click="singleClick(index)"></u-tag> -->
|
|
|
- <view :class="anNiuCss[index] == null ? 'types' : anNiuCss[index]" @click="singleClick(index)">
|
|
|
- {{item}}
|
|
|
+ <view :class="!item.checked ? '' : 'types1'" class='types' @click="singleClick(item)">
|
|
|
+ {{item.name}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="modular">
|
|
|
<u-form-item label="标题" label-width="30%" class="title Regular">
|
|
|
- <u-input v-model="deptList.name" input-align="right" class="write Regular"
|
|
|
+ <u-input v-model="deptList.title" input-align="right" class="write Regular"
|
|
|
placeholder="用于封面展示,2-16个字" />
|
|
|
</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" type="textarea"
|
|
|
+ <u-input v-model="deptList.companyProfile" input-align="right" class="write Regular" type="textarea"
|
|
|
placeholder="请输入企业简介,如经营项目、产品类型、企业规模等,10-60个字" />
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="modular">
|
|
|
<u-form-item label="上传坐标" label-width="30%" class="title Regular">
|
|
|
- <text @click="upload"
|
|
|
+ <text
|
|
|
class="con-list Regular">{{deptList.buyer == null ? "未上传":deptList.buyer}}<text
|
|
|
class='tip_text cuIcon-right'></text></text>
|
|
|
</u-form-item>
|
|
@@ -43,20 +43,20 @@
|
|
|
placeholder="自动获取" />
|
|
|
</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"
|
|
|
+ <u-input v-model="deptList.detailedAddress" input-align="right" class="write Regular"
|
|
|
placeholder="如街道和门牌号,2-12个字" maxlength="12" />
|
|
|
</u-form-item>
|
|
|
<view>
|
|
|
<view class="title Regular" style="margin-top: 15rpx;">上传图片</view>
|
|
|
- <view v-if="license1 != ''">
|
|
|
+ <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"
|
|
|
:options="uploadOptions" :custom="uploadCustom" @on-progress="onProgress"></upload>
|
|
|
</view>
|
|
|
- <view v-if="license2 != ''">
|
|
|
+ <view v-if="license2 != ''">
|
|
|
<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
|
|
|
- :size-type="['compressed']" @on-success="getImgUrl" @on-error="onError"
|
|
|
+ :size-type="['compressed']" @on-success="getImgUrl1" @on-error="onError"
|
|
|
@on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
|
|
|
:options="uploadOptions1" :custom="uploadCustom" @on-progress="onProgress"></upload>
|
|
|
</view>
|
|
@@ -103,9 +103,18 @@
|
|
|
"text": "上传营业执照",
|
|
|
"bgc": ""
|
|
|
},
|
|
|
+ mainBusinessType:[],
|
|
|
uploadCustom: true,
|
|
|
deptList: {},
|
|
|
- management: ["粮库", "加工厂", "烘干厂", "饲料厂", "养殖场", "粮贸", "期货"],
|
|
|
+ management: [
|
|
|
+ {name:"粮库",checked:false},
|
|
|
+ {name:"加工厂",checked:false},
|
|
|
+ {name:"烘干厂",checked:false},
|
|
|
+ {name:"饲料厂",checked:false},
|
|
|
+ {name:"养殖场",checked:false},
|
|
|
+ {name:"粮贸",checked:false},
|
|
|
+ {name:"期货",checked:false},
|
|
|
+ ],
|
|
|
types: [],
|
|
|
show: false,
|
|
|
// anNiuCss:"types",
|
|
@@ -116,16 +125,18 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- singleClick(index) {
|
|
|
- for (let i = 0; i < this.management.length; i++) {
|
|
|
- this.anNiuCss[i] = "types"
|
|
|
- }
|
|
|
- if (this.anNiuCss[index] == null) {
|
|
|
- this.anNiuCss[index] = "types1"
|
|
|
- } else if (this.anNiuCss[index] == "types") {
|
|
|
- this.anNiuCss[index] = "types1"
|
|
|
- } else if (this.anNiuCss[index] == "types1") {
|
|
|
- this.anNiuCss[index] = "types"
|
|
|
+ getImgUrl(res){
|
|
|
+ console.log(res)
|
|
|
+ this.deptList.attachmentAddress=res
|
|
|
+ },
|
|
|
+ getImgUrl1(res){
|
|
|
+ console.log(res)
|
|
|
+ this.deptList.licenseAddress=res
|
|
|
+ },
|
|
|
+ singleClick(item) {
|
|
|
+ if(this.mainBusinessType.indexOf(item)==-1){
|
|
|
+ this.mainBusinessType.push(item.name)
|
|
|
+ item.checked=true
|
|
|
}
|
|
|
},
|
|
|
filterFileType(index, lists) {
|
|
@@ -141,7 +152,11 @@
|
|
|
}
|
|
|
},
|
|
|
navBack() {
|
|
|
- uni.navigateBack(1)
|
|
|
+ this.$api.doRequest('post','/settledCompanyInfo/api/addSettledCompanyInfo',this.deptList).then(res => {
|
|
|
+ if(res.data.code==200){
|
|
|
+ uni.navigateBack(1)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
upload() {
|
|
|
uni.navigateTo({
|
|
@@ -154,26 +169,36 @@
|
|
|
})
|
|
|
},
|
|
|
submit() {
|
|
|
+ var that = this
|
|
|
// if (!this.deptList.title) {
|
|
|
// this.$api.msg('标题不能为空')
|
|
|
// return
|
|
|
// }
|
|
|
- this.show = true
|
|
|
- return
|
|
|
+ // this.show = true
|
|
|
+ // return
|
|
|
+ this.deptList.mainBusinessType=this.mainBusinessType.toString()
|
|
|
+ this.deptList.longitude='40.22077'
|
|
|
+ this.deptList.latitude='116.23128'
|
|
|
uni.showModal({
|
|
|
content: "确定提交企业信息??",
|
|
|
showCancel: true,
|
|
|
confirmText: '确定',
|
|
|
success: function(res) {
|
|
|
if (res.confirm) {
|
|
|
- //成功后
|
|
|
- if (res.data.code == 200) {
|
|
|
- uni.showToast({
|
|
|
- title: '提交成功',
|
|
|
- icon: 'none',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- }
|
|
|
+ this.show = true
|
|
|
+ // that.$api.doRequest('post','/settledCompanyInfo/api/addSettledCompanyInfo',that.deptList).then(res => {
|
|
|
+ // if(res.data.code==200){
|
|
|
+
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // //成功后
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '提交成功',
|
|
|
+ // icon: 'none',
|
|
|
+ // duration: 2000
|
|
|
+ // })
|
|
|
+ // }
|
|
|
}
|
|
|
},
|
|
|
})
|