Răsfoiți Sursa

增加发货页面的城市选择框

wangn 5 ani în urmă
părinte
comite
d8e5ab4f99
2 a modificat fișierele cu 38 adăugiri și 31 ștergeri
  1. 19 12
      ghsApp/src/components/app-address-group.vue
  2. 19 19
      ghsApp/src/pagesOrder/shipInfo.vue

+ 19 - 12
ghsApp/src/components/app-address-group.vue

@@ -3,7 +3,7 @@
 		<tui-list-cell
 		<tui-list-cell
 			class="line-cell"
 			class="line-cell"
 			:hover="false"
 			:hover="false"
-			:arrow="false"
+			:arrow="flag"
 			@click="openAddres"
 			@click="openAddres"
 		>
 		>
 			<view class="tui-title ">{{ cityTitle }}</view>
 			<view class="tui-title ">{{ cityTitle }}</view>
@@ -94,7 +94,8 @@ export default {
 				longitude: "",
 				longitude: "",
 				latitude: ""
 				latitude: ""
 			},
 			},
-			showRegion: false
+			showRegion: false,
+      flag: false
 		};
 		};
 	},
 	},
 	mounted(){
 	mounted(){
@@ -102,14 +103,19 @@ export default {
 	},
 	},
 	methods: {
 	methods: {
 		initAdress(){
 		initAdress(){
-			return getUserDet({ id: this.customId }).then(res => {
-				this.form.province = res.data.province;
-				this.form.city = res.data.city;
-				this.form.address = res.data.address;
-				this.form.latitude = res.data.lat;
-				this.form.longitude = res.data.long;
-				this.$emit("selectAdress", this.form);
-			})
+      if(this.customId != '0') {
+        return getUserDet({ id: this.customId }).then(res => {
+          this.form.province = res.data.province;
+          this.form.city = res.data.city;
+          this.form.address = res.data.address;
+          this.form.latitude = res.data.lat;
+          this.form.longitude = res.data.long;
+          this.$emit("selectAdress", this.form);
+        })
+      } else {
+        this.flag = true
+      }
+			
 		},
 		},
 		formatForm() {
 		formatForm() {
 			Object.keys(this.form).forEach(i => {
 			Object.keys(this.form).forEach(i => {
@@ -130,8 +136,9 @@ export default {
 		},
 		},
 		// 省市联动
 		// 省市联动
 		openAddres() {
 		openAddres() {
-			return;
-			this.$refs.simpleAddress.open();
+      if(this.flag) {
+        this.$refs.simpleAddress.open();
+      }
 		},
 		},
 		changeAreaFn(e) {
 		changeAreaFn(e) {
 			this.form.address = e.title;
 			this.form.address = e.title;

+ 19 - 19
ghsApp/src/pagesOrder/shipInfo.vue

@@ -15,40 +15,40 @@
 
 
 		</view>
 		</view>
 		<!-- 选择客户 -->
 		<!-- 选择客户 -->
-		<AppCustomerSel :show.sync="showCustomer" @change="changeCustomerFn" />
+		<!-- <AppCustomerSel :show.sync="showCustomer" @change="changeCustomerFn" /> -->
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
 import TuiListCell from "@/components/plugin/list-cell";
 import TuiListCell from "@/components/plugin/list-cell";
-import AppAvatarModule from "@/components/module/app-avatar";
-import SimpleAddress from "@/components/plugin/simple-address";
-import AppAreaSel from "@/components/app-area-sel";
-import AppCustomerSel from "@/components/app-customer-sel";
-import productMins from "@/mixins/product";
-import appFormRadioBtn from "@/components/app-formRadio-btn";
-import appAddressGroup from "@/components/app-address-group";
-import appSendTime from "@/components/app-send-time";
+// import AppAvatarModule from "@/components/module/app-avatar";
+// import SimpleAddress from "@/components/plugin/simple-address";
+// import AppAreaSel from "@/components/app-area-sel";
+// import AppCustomerSel from "@/components/app-customer-sel";
+// import productMins from "@/mixins/product";
+// import appFormRadioBtn from "@/components/app-formRadio-btn";
+// import appAddressGroup from "@/components/app-address-group";
+// import appSendTime from "@/components/app-send-time";
 import appFormSend from "@/components/app-form-send1";
 import appFormSend from "@/components/app-form-send1";
 const formUtil = require("@/utils/formValidation.js");
 const formUtil = require("@/utils/formValidation.js");
 import { sendExpressage } from "@/api/order/index";
 import { sendExpressage } from "@/api/order/index";
-import { getUserDet } from "@/api/member/index";
+// import { getUserDet } from "@/api/member/index";
 import { mapActions, mapGetters } from "vuex";
 import { mapActions, mapGetters } from "vuex";
 
 
 export default {
 export default {
 	name: "BillingAffirm", // 开单确认
 	name: "BillingAffirm", // 开单确认
 	components: {
 	components: {
 		TuiListCell,
 		TuiListCell,
-		AppAvatarModule,
-		SimpleAddress,
-		AppAreaSel,
-		AppCustomerSel,
-		appFormRadioBtn,
-		appAddressGroup,
-		appSendTime,
+		// AppAvatarModule,
+		// SimpleAddress,
+		// AppAreaSel,
+		// AppCustomerSel,
+		// appFormRadioBtn,
+		// appAddressGroup,
+		// appSendTime,
 		appFormSend
 		appFormSend
 	},
 	},
-	mixins: [productMins],
+	// mixins: [productMins],
 	data() {
 	data() {
 		return {
 		return {
 			customId:'',
 			customId:'',
@@ -80,7 +80,7 @@ export default {
 	onLoad(e) {
 	onLoad(e) {
 		this.customId = e.id;
 		this.customId = e.id;
 		this.orderId = e.orderId;
 		this.orderId = e.orderId;
-		if (!this.getMerchantInfo) {
+		if (!this.getMerchantInfo && this.customId != '0') {
 			this.initMerchantInfo().then(data => {
 			this.initMerchantInfo().then(data => {
 				uni.setNavigationBarTitle({
 				uni.setNavigationBarTitle({
 					title: data.name
 					title: data.name