gjy 2 年之前
父節點
當前提交
522cafc58f
共有 4 個文件被更改,包括 50 次插入31 次删除
  1. 31 26
      components/selectAddress.vue
  2. 2 2
      config/index.js
  3. 2 2
      pages/business/businessNew.vue
  4. 15 1
      pages/business/release.vue

+ 31 - 26
components/selectAddress.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<picker @change="bindPickerChange" :value="multiIndex" :range="multiArray" range-key='label'
+		<picker class="pickerClass" ref='picker' :disabled="disabled" @change="bindPickerChange" :value="multiIndex" :range="multiArray" range-key='label'
 			mode="multiSelector" @columnchange='columnchange'>
 			<view class="text" :style="textStyleEmpty" v-if="place=='选择地区'">
 				{{place}}
@@ -35,9 +35,29 @@
 			},
 			textStyle: {
 				type: Object,
+			},
+			disabled:{
+				value: Boolean,
+				default: false
 			}
 		},
 		watch: {
+			disabled(oldValue, newValue) {
+				console.log(123)
+				console.log(oldValue, newValue)
+				if(newValue){
+					
+				}else{
+					// this.$refs.picker.change()
+					// console.log(this.$refs.picker)
+					this.bindPickerChange(this.$refs.picker.value)
+					
+					// this.bindPickerChange()
+				}
+				// if (val != '') {
+				// 	this.place = val
+				// }
+			}
 			// searchPlace(oldValue, newValue) {
 			// 	console.log(123)
 			// 	console.log(oldValue, newValue)
@@ -63,6 +83,7 @@
 			}
 		},
 		mounted() {
+			console.log(this.disabled)
 			this.place = this.searchPlace
 			console.log("this.series", this.series)
 			for (let i = 0; i < address.length; i++) {
@@ -74,7 +95,7 @@
 		methods: {
 			columnchange(e) {
 				console.log('picker发送选择改变', e.detail)
-				this.multiIndex[e.detail.column] = e.detail.value
+				this.multiIndex[e.detail.column] =e.detail.value
 				console.log("this.multiIndex", this.multiIndex)
 				switch (e.detail.column) {
 					case 0: //拖动第1列
@@ -142,29 +163,13 @@
 </script>
 
 <style lang="scss">
-	.list-cell {
-		display: flex;
-		box-sizing: border-box;
-		width: 100%;
-		padding: 10px 24rpx;
-		overflow: hidden;
-		color: #323233;
-		font-size: 28rpx;
-		font-weight: 800;
-		line-height: 48rpx;
-		background-color: #fff;
-		border-bottom: solid 3rpx #eeeeee;
-		align-items: center;
-
-		image {
-			width: 76rpx;
-			height: 76rpx;
-			border-radius: 12rpx;
-			flex: 0 0 76rpx;
-		}
-
-		&-name {
-			padding-left: 20rpx;
-		}
+	.pickerClass{
+		width: 80%;
+		position: absolute;
+		right:11px;
+		padding:0 20px;
+		top:50%;
+		transform: translateY(-50%);
+		z-index:2
 	}
 </style>

+ 2 - 2
config/index.js

@@ -8,9 +8,9 @@ const dev = {
 	// baseUrlNew: 'http://192.168.110.82:8090/',
 	// baseUrlNew: 'http://192.168.110.82:8090/',
 	// baseUrlNew: 'http://192.168.110.202:8090/',
-	// baseUrlNew: 'http://192.168.110.138:8090/',
+	baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
-	baseUrlNew: 'https://api2.eliangeyun.com/',
+	// baseUrlNew: 'https://api2.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 2 - 2
pages/business/businessNew.vue

@@ -34,7 +34,7 @@
 									<view class="bottom" style="margin-top: 6rpx;">
 										<text class="color1" v-if="item.tranType=='采购'">采购</text>
 										<text class="color2" v-if="item.tranType=='销售'">销售</text>
-										<text class="color3">{{$helper.changeTime(item.remark3)}}</text>
+										<text class="color3">{{item.remark3?$helper.changeTime(item.remark3):''}}</text>
 									</view>
 								</view>
 							</view>
@@ -94,7 +94,7 @@
 			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
 			showCancelButton='false' content="尚未登录,是否立即登录" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 		<u-modal v-model="isSHowReleaseAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
-			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='我知道了'
+			:content-style="{fontSize: '14px',fontWeight:'400','text-align':'left'}" confirm-color='#22C572' confirm-text='我知道了'
 			title='温馨提示' content="交易信息为用户自由发布,正式签订合同前切勿进行任何付款操作,以免给您的财产造成损失。" @confirm="releaseAlertbtn"></u-modal>
 		<u-toast ref="uToast" />
 	</view>

+ 15 - 1
pages/business/release.vue

@@ -79,6 +79,7 @@
 				searchPlaceHolder: '选择地区',
 				placeTitle: '交货地',
 				imgList: [],
+				disabled:false,
 				showNickname: false,
 				dataObj: {
 					userId: '',
@@ -225,7 +226,7 @@
 				})
 
 				this.dataObj.urlImg = this.imgList.toString()
-				this.dataObj.remark3 = new Date().getTime()
+				this.dataObj.remark3 = this.dateFormat(new Date().getTime())
 				this.$api.doRequest('post', '/transactionExchangeInfo/addInfo', this.dataObj).then(res => {
 					console.log(res)
 					if (res.data.code == 200) {
@@ -241,6 +242,19 @@
 					}
 				})
 			},
+			dateFormat(time) {
+			                let date = new Date(time);
+			                let year = date.getFullYear();
+			                // 在日期格式中,月份是从0开始的,因此要加0,使用三元表达式在小于10的前面加0,以达到格式统一  如 09:11:05
+			                let month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
+			                let day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
+			                let hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
+			                let minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
+			                let seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
+			                // 拼接
+			                return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
+			                // return year + "-" + month + "-" + day;
+			            },
 			selectAddress(val) {
 				console.log(val)
 				console.log(this.dataObj.tranType)