gjy 2 éve
szülő
commit
b8ca3fa6e7
4 módosított fájl, 43 hozzáadás és 15 törlés
  1. 36 12
      components/selectAddress.vue
  2. 1 0
      main.js
  3. 3 1
      pages/business/record.vue
  4. 3 2
      pages/business/release.vue

+ 36 - 12
components/selectAddress.vue

@@ -12,6 +12,7 @@
 </template>
 
 <script>
+	var that= this
 	import {
 		address
 	} from '@/components/data/data.js'
@@ -43,17 +44,34 @@
 			disabled: {
 				value: Boolean,
 				default: false
-			}
+			},
 		},
 		watch: {
-
-			// searchPlace(oldValue, newValue) {
-			// 	console.log(123)
-			// 	console.log(oldValue, newValue)
-			// 	// if (val != '') {
-			// 	// 	this.place = val
-			// 	// }
-			// }
+			
+			text:{
+				handler(oldValue, newValue) {
+				console.log(11111111)
+				console.log(oldValue, newValue)
+				// if (val != '') {
+					this.place = oldValue
+				// }
+				console.log(this.place,this.text,this.edit)
+			},
+			deep:true,
+			immediate:true,
+			},
+			place:{
+				handler(oldValue, newValue) {
+				// console.log(11111111)
+				// console.log(oldValue, newValue)
+				// // if (val != '') {
+				// 	this.place = oldValue
+				// // }
+				// console.log(this.place,this.text,this.edit)
+			},
+			deep:true,
+			immediate:true,
+			},
 		},
 		data() {
 			return {
@@ -73,8 +91,9 @@
 			}
 		},
 		mounted() {
-			console.log(this.disabled)
-			this.place = this.searchPlace
+			if(!this.edit&&!this.text){
+				this.place = this.searchPlace
+			}
 			console.log("this.series", this.series)
 			if (this.series == 3) {
 				this.addressCopy = JSON.parse(JSON.stringify(address1))
@@ -132,8 +151,13 @@
 						.label
 					this.place = this.multiArray[1][e.detail.value[1]].label
 				} else {
-					_address = this.multiArray[0][e.detail.value[0]].label + this.multiArray[1][e.detail.value[1]]
+					if(this.multiArray[0][e.detail.value[0]].label=='北京'||this.multiArray[0][e.detail.value[0]].label=='天津'||this.multiArray[0][e.detail.value[0]].label=='上海'||this.multiArray[0][e.detail.value[0]].label=='重庆'){
+						_address =  this.multiArray[1][e.detail.value[1]]
 						.label + this.multiArray[2][e.detail.value[2]].label
+					}else{
+						_address = this.multiArray[0][e.detail.value[0]].label + this.multiArray[1][e.detail.value[1]]
+						.label + this.multiArray[2][e.detail.value[2]].label
+					}
 					this.place = this.multiArray[2][e.detail.value[2]].label
 					this.check = true
 				}

+ 1 - 0
main.js

@@ -244,6 +244,7 @@ const doRequest = (method, url, data, header) => {
 
 }
 
+
 const uploadImg = (successCallback) => {
 	let baseUrl = config.def().baseUrl
 	uni.chooseImage({

+ 3 - 1
pages/business/record.vue

@@ -87,7 +87,9 @@
 						icon: '/static/empty.png',
 						tip: '暂无内容', // 提示
 						// btnText: '去看看'
-					}
+					},
+					textNoMore: '没有更多了~',
+					textColor: '#878C9C',
 				},
 				goods: [], //列表数据
 				tabs: [{

+ 3 - 2
pages/business/release.vue

@@ -52,7 +52,7 @@
 					</u-radio-group>
 				</u-cell-item>
 				<u-cell-item :title="placeTitle" :title-style="titleStyle">
-					<selectAddress :disabled="true" @selectAddress='selectAddress' series='3' :textStyle='textStyle'
+					<selectAddress :disabled="true" @selectAddress='selectAddress' :edit='true' :text='dataObj.placeDelivery' series='3' :textStyle='textStyle'
 						:searchPlace='searchPlaceHolder'>
 					</selectAddress>
 
@@ -367,7 +367,7 @@
 				// return year + "-" + month + "-" + day;
 			},
 			selectAddress(val) {
-				console.log(val)
+				console.log(val,11111)
 				console.log(this.dataObj.tranType)
 				if (!val.check) {
 					uni.showToast({
@@ -378,6 +378,7 @@
 					return
 				}
 				try {
+					console.log(22222222)
 					uni.setStorageSync('transactionPlace', val);
 					this.dataObj.placeDelivery = val.address
 				} catch (e) {