|
@@ -1,11 +1,332 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
- 11111
|
|
|
+ <view class="center">
|
|
|
+ <!-- <view class=""> -->
|
|
|
+ <view class="back-btn cuIcon-back" @click="navBack"></view>
|
|
|
+ <!-- <view class='title1'>入驻</view> -->
|
|
|
+ <view class="titleUp">
|
|
|
+ 请完善入驻信息
|
|
|
+ </view>
|
|
|
+ <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-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>
|
|
|
+ </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"
|
|
|
+ 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"
|
|
|
+ placeholder="请输入企业简介,如经营项目、产品类型、企业规模等,10-60个字" />
|
|
|
+ </u-form-item>
|
|
|
+ </view>
|
|
|
+ <view class="modular">
|
|
|
+ <u-form-item label="上传坐标" label-width="30%" class="title Regular">
|
|
|
+ <text @click="upload"
|
|
|
+ class="con-list Regular">{{deptList.buyer == null ? "未上传":deptList.buyer}}<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="自动获取" />
|
|
|
+ </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"
|
|
|
+ placeholder="如街道和门牌号,2-12个字" maxlength="12" />
|
|
|
+ </u-form-item>
|
|
|
+ <view>
|
|
|
+ <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"
|
|
|
+ :options="uploadOptions" :custom="uploadCustom" @on-progress="onProgress"></upload>
|
|
|
+ </view>
|
|
|
+ <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"
|
|
|
+ @on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
|
|
|
+ :options="uploadOptions1" :custom="uploadCustom" @on-progress="onProgress"></upload>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- :disabled="true" -->
|
|
|
+ <u-button @click="submit" class="commit" type="success">提交</u-button>
|
|
|
+ </u-form>
|
|
|
+ <view v-if="show == true">
|
|
|
+ <u-popup v-model="show" mode="center" border-radius="20" width="560rpx" height="560rpx">
|
|
|
+ <view class="successImg">
|
|
|
+ <image src="../../static/img/liangmai/tijiaochenggong@3x.png" mode=""
|
|
|
+ style="width: 180rpx;height: 180rpx;"></image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="successText">提交成功,等待平台审核。</view>
|
|
|
+ <u-button type="success" style="width: 400rpx; margin: 20rpx auto; " shape="circle" @click="perfect">
|
|
|
+ 完善更多信息</u-button>
|
|
|
+ <view style="color: #AFB3BF;text-align: center;" @click="navBack">返回</view>
|
|
|
+ </u-popup>
|
|
|
+
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import upload from '@/components/upload.vue';
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ upload
|
|
|
+ },
|
|
|
+ name: "buy",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ action: this.$uploadUrl,
|
|
|
+ maxSize: 5 * 1024 * 1024,
|
|
|
+ btnLoading: false,
|
|
|
+ isAdd: true,
|
|
|
+ uploadOptions: {
|
|
|
+ "text": "上传封面图片",
|
|
|
+ "bgc": ""
|
|
|
+ },
|
|
|
+ uploadOptions1: {
|
|
|
+ "text": "上传营业执照",
|
|
|
+ "bgc": ""
|
|
|
+ },
|
|
|
+ uploadCustom: true,
|
|
|
+ deptList: {},
|
|
|
+ management: ["粮库", "加工厂", "烘干厂", "饲料厂", "养殖场", "粮贸", "期货"],
|
|
|
+ types: [],
|
|
|
+ show: false,
|
|
|
+ // anNiuCss:"types",
|
|
|
+ anNiuCss: [],
|
|
|
+ license1: "../../static/img/authentication/business@3x.png",
|
|
|
+ license2: "../../static/img/authentication/business@3x.png",
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 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"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ filterFileType(index, lists) {
|
|
|
+ if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
|
|
|
+ lists.splice(index, 1);
|
|
|
+ // 当前文件不支持
|
|
|
+ uni.showModal({
|
|
|
+ title: '暂不支持当前图片类型',
|
|
|
+ showCancel: false
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.isAdd = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ navBack() {
|
|
|
+ uni.navigateBack(1)
|
|
|
+ },
|
|
|
+ upload() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/`
|
|
|
+ })
|
|
|
+ },
|
|
|
+ perfect() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/grain_pulse/perfect`
|
|
|
+ })
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ // if (!this.deptList.title) {
|
|
|
+ // this.$api.msg('标题不能为空')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ this.show = true
|
|
|
+ return
|
|
|
+ uni.showModal({
|
|
|
+ content: "确定提交企业信息??",
|
|
|
+ showCancel: true,
|
|
|
+ confirmText: '确定',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ //成功后
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '提交成功',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style lang='scss' scoped>
|
|
|
+ .center {
|
|
|
+ padding: 10rpx 20rpx;
|
|
|
+ width: 100vw;
|
|
|
+ height: 100vh;
|
|
|
+ overflow: scroll;
|
|
|
+ background: url(../../static/img/liangmai/bg@3x.png);
|
|
|
+ background-size: 100%;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ }
|
|
|
+
|
|
|
+ .c-row {
|
|
|
+ display: -webkit-box;
|
|
|
+ display: -webkit-flex;
|
|
|
+ display: flex;
|
|
|
+ -webkit-box-align: center;
|
|
|
+ -webkit-align-items: center;
|
|
|
+ align-items: center;
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .con-list {
|
|
|
+ -webkit-box-flex: 1;
|
|
|
+ -webkit-flex: 1;
|
|
|
+ flex: 1;
|
|
|
+ display: -webkit-box;
|
|
|
+ display: -webkit-flex;
|
|
|
+ display: flex;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-box-direction: normal;
|
|
|
+ -webkit-flex-direction: column;
|
|
|
+ flex-direction: column;
|
|
|
+ line-height: 40rpx;
|
|
|
+ text-align: right;
|
|
|
+ padding-right: 20rpx;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .con-list input {
|
|
|
+ font-size: 14px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .back-btn {
|
|
|
+ position: absolute;
|
|
|
+ left: 40upx;
|
|
|
+ z-index: 9999;
|
|
|
+ padding-top: var(--status-bar-height);
|
|
|
+ top: 40upx;
|
|
|
+ font-size: 40upx;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title1 {
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ top: 40upx;
|
|
|
+ padding-top: var(--status-bar-height);
|
|
|
+ z-index: 9999;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 36rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .choice {
|
|
|
+ margin-top: 10px;
|
|
|
+ display: inline-block;
|
|
|
+ margin-bottom: 6px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ margin-left: 20rpx;
|
|
|
+ color: #71747C;
|
|
|
+ }
|
|
|
+
|
|
|
+ .types {
|
|
|
+ width: 55px;
|
|
|
+ height: 30px;
|
|
|
+ background-color: #F4FAF8;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 32px;
|
|
|
+ border-radius: 20px;
|
|
|
+ margin-left: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .types1 {
|
|
|
+ width: 55px;
|
|
|
+ height: 30px;
|
|
|
+ background-color: #22C572;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 32px;
|
|
|
+ border-radius: 20px;
|
|
|
+ margin-left: 14px;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+
|
|
|
+ .write {
|
|
|
+ margin-right: 20px;
|
|
|
+ color: #71747C;
|
|
|
+ }
|
|
|
+
|
|
|
+ .commit {
|
|
|
+ margin-top: 20px;
|
|
|
+ border: 0px;
|
|
|
+ border-radius: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .modular {
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border-radius: 20px;
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .forList {
|
|
|
+ margin-top: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .titleUp {
|
|
|
+ color: #FFFFFF;
|
|
|
+ font-size: 44rpx;
|
|
|
+ margin-top: 80px;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .upload {
|
|
|
+ text-align: center;
|
|
|
+ margin: 20px 0;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .popups {
|
|
|
+ width: 280px;
|
|
|
+ height: 290px;
|
|
|
+ border-radius: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .successImg {
|
|
|
+ width: 90px;
|
|
|
+ height: 90px;
|
|
|
+ margin: 30px auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .successText {
|
|
|
+ text-align: center;
|
|
|
+ margin: 0 auto;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
</style>
|