|
@@ -1,13 +1,31 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
<view class="content1">
|
|
|
- <view class="top">
|
|
|
+ <!-- <view class="top">
|
|
|
<textarea v-model="dataObj.publishingContent" placeholder="请发布粮食类商品交易信息,建议包含联系方" maxlength='200'
|
|
|
placeholder-class='placeholder-class' class="textarea" />
|
|
|
<view class="number">
|
|
|
{{dataObj.publishingContent.length}}/200个字
|
|
|
</view>
|
|
|
+ </view> -->
|
|
|
+ <view class='row'>
|
|
|
+ <view class="textarea">
|
|
|
+ <textarea placeholder-style="color:#AFB3BF;" placeholder="请发布粮食类商品交易信息,建议包含联系方式" maxlength="2000"
|
|
|
+ v-model="dataObj.publishingContent"></textarea>
|
|
|
+ <view class="textarea-left">
|
|
|
+ <view class="clear" @click="clear()">清除全部</view>
|
|
|
+ </view>
|
|
|
+ <view class="textarea-bottom">
|
|
|
+ {{dataObj.publishingContent?dataObj.publishingContent.length:'0'}}/2000字
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- <view class="number">
|
|
|
+ {{dataObj.publishingContent.length}}/2000个字
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
<view style="padding-left: 10rpx;">
|
|
|
<upload :file-list='businesslicense' class="upload" ref="upload" :action="action" :max-size="maxSize"
|
|
|
delIconSize='30' delBgColor='rgba(0,0,0,0.4)' delIcon="trash" :max-count="9"
|
|
@@ -25,7 +43,7 @@
|
|
|
</u-radio>
|
|
|
</u-radio-group>
|
|
|
</u-cell-item>
|
|
|
- <u-cell-item title="交易地" :title-style="titleStyle">
|
|
|
+ <u-cell-item :title="placeTitle" :title-style="titleStyle">
|
|
|
<selectAddress @selectAddress='selectAddress' series='3' :textStyle='textStyle' :edit='true'
|
|
|
:text='dataObj.placeDelivery'></selectAddress>
|
|
|
</u-cell-item>
|
|
@@ -65,6 +83,8 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ searchPlaceHolder: '选择交货地区',
|
|
|
+ placeTitle: '交货地',
|
|
|
id: '',
|
|
|
imgList: [],
|
|
|
showNickname: false,
|
|
@@ -83,7 +103,6 @@
|
|
|
},
|
|
|
textStyle: {
|
|
|
"font-size": "32rpx",
|
|
|
- "font-weight": 700,
|
|
|
"color": "#333333",
|
|
|
"margin-right": '27rpx'
|
|
|
},
|
|
@@ -119,8 +138,18 @@
|
|
|
computed: {
|
|
|
...mapState(['hasLogin', 'userInfo', 'clientId']),
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ let _tl = uni.getStorageSync('transactionPlace')
|
|
|
+ if (_tl) {
|
|
|
+ this.dataObj.placeDelivery = _tl.address
|
|
|
+ } else {
|
|
|
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ clear() {
|
|
|
+ this.dataObj.publishingContent = ''
|
|
|
+ },
|
|
|
init() {
|
|
|
let _obj = {
|
|
|
id: this.id
|
|
@@ -133,7 +162,13 @@
|
|
|
console.log(res.data)
|
|
|
if (res.data.code == 200) {
|
|
|
this.dataObj = res.data.data
|
|
|
-
|
|
|
+ if (this.dataObj.tranType == '销售') {
|
|
|
+ this.placeTitle = '货源地'
|
|
|
+ this.searchPlaceHolder = '选择货源地区'
|
|
|
+ } else {
|
|
|
+ this.placeTitle = '交货地'
|
|
|
+ this.searchPlaceHolder = '选择交货地区'
|
|
|
+ }
|
|
|
this.imgList = res.data.data.urlImg.split(',')
|
|
|
for (let i = 0; i < this.imgList.length; i++) {
|
|
|
this.businesslicense.push({
|
|
@@ -218,6 +253,7 @@
|
|
|
})
|
|
|
|
|
|
this.dataObj.urlImg = this.imgList.toString()
|
|
|
+ this.dataObj.flag = 3
|
|
|
this.$api.doRequest('post', '/transactionExchangeInfo/editInfo', this.dataObj).then(res => {
|
|
|
console.log(res)
|
|
|
if (res.data.code == 200) {
|
|
@@ -235,10 +271,32 @@
|
|
|
},
|
|
|
selectAddress(val) {
|
|
|
console.log(val)
|
|
|
- this.dataObj.placeDelivery = val
|
|
|
+ console.log(this.dataObj.tranType)
|
|
|
+ if (!val.check) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '地点必须选到区县一级',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ uni.setStorageSync('transactionPlace', val);
|
|
|
+ this.dataObj.placeDelivery = val.address
|
|
|
+ } catch (e) {
|
|
|
+ // error
|
|
|
+ }
|
|
|
},
|
|
|
radioChange(e) {
|
|
|
// console.log(e);
|
|
|
+ console.log(e);
|
|
|
+ if (e == '销售') {
|
|
|
+ this.placeTitle = '货源地'
|
|
|
+ this.searchPlaceHolder = '选择货源地区'
|
|
|
+ } else {
|
|
|
+ this.placeTitle = '交货地'
|
|
|
+ this.searchPlaceHolder = '选择交货地区'
|
|
|
+ }
|
|
|
},
|
|
|
filterFileType(index, lists) {
|
|
|
if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
|
|
@@ -282,6 +340,7 @@
|
|
|
<style lang="scss" scoped>
|
|
|
.content {
|
|
|
// overflow: hidden;
|
|
|
+ padding-bottom: 100rpx;
|
|
|
}
|
|
|
|
|
|
.content1 {
|
|
@@ -325,6 +384,7 @@
|
|
|
}
|
|
|
|
|
|
.submit {
|
|
|
+ margin: 40rpx auto;
|
|
|
width: 654rpx;
|
|
|
height: 92rpx;
|
|
|
background: #22C572;
|
|
@@ -334,11 +394,11 @@
|
|
|
color: #FFFFFF;
|
|
|
line-height: 92rpx;
|
|
|
text-align: center;
|
|
|
- position: fixed;
|
|
|
- bottom: 76rpx;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- margin: auto;
|
|
|
+ // position: fixed;
|
|
|
+ // bottom: 76rpx;
|
|
|
+ // left: 0;
|
|
|
+ // right: 0;
|
|
|
+ // margin: auto;
|
|
|
}
|
|
|
|
|
|
.edit-nickname {
|
|
@@ -352,4 +412,74 @@
|
|
|
.nickname-btn {
|
|
|
margin-top: 20rpx;
|
|
|
}
|
|
|
+
|
|
|
+ .row {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ position: relative;
|
|
|
+ background: #fff;
|
|
|
+
|
|
|
+ border-radius: 20rpx;
|
|
|
+
|
|
|
+ input {
|
|
|
+ font-size: 28rpx;
|
|
|
+ // color: #333333;
|
|
|
+ }
|
|
|
+
|
|
|
+ .left {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ color: #333333;
|
|
|
+ font-size: 34rpx;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .row_css {
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #333333;
|
|
|
+ margin-top: 60rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+
|
|
|
+ .textarea {
|
|
|
+ background: #F9F9FA;
|
|
|
+ font-size: 28rpx;
|
|
|
+ text-align: left;
|
|
|
+ width: 100%;
|
|
|
+ padding: 30rpx 30rpx;
|
|
|
+ border-radius: 5px;
|
|
|
+ margin: 30rpx;
|
|
|
+ height: 46vh;
|
|
|
+ padding-bottom: 20rpx;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+
|
|
|
+ .textarea textarea {
|
|
|
+ height: 90%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .textarea-left {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 40rpx;
|
|
|
+ left: 50rpx;
|
|
|
+ color: #606266;
|
|
|
+ }
|
|
|
+
|
|
|
+ .textarea-bottom {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 40rpx;
|
|
|
+ right: 40rpx;
|
|
|
+ color: #AFB3BF;
|
|
|
+ }
|
|
|
+
|
|
|
+ .clear {
|
|
|
+ /* width: 90%; */
|
|
|
+ // background: #ffffff;
|
|
|
+ color: #22C572;
|
|
|
+ // border: 1px solid #22C572;
|
|
|
+ // border-radius: 50rpx;
|
|
|
+ // font-size: 28rpx;
|
|
|
+ // padding: 9rpx 24rpx;
|
|
|
+ }
|
|
|
</style>
|