shish hace 2 años
padre
commit
2580cbb0c8

+ 2 - 2
ghsApp/src/admin/home/mall.vue

@@ -16,8 +16,8 @@
   </view>
 </template>
 <script>
-import { mainGetMallPoster } from '@/api/main/index'
-import { getWeixinId } from "@/api/invite/index";
+import { mainGetMallPoster } from '@/api/main'
+import { getWeixinId } from "@/api/invite";
 import { mapGetters } from "vuex";
 export default {
   data() {

+ 4 - 0
ghsApp/src/api/purchase/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const getLsRunningOrderNum = data => {
+	return https.post("/purchase-order/get-ls-running-order-num", data);
+};
+
 export const saveCgPrice = data => {
 	return https.post("/purchase-order-item/save-cg-price", data);
 };

+ 0 - 1
ghsApp/src/pagesClient/member/detail.vue

@@ -52,7 +52,6 @@
             </view>
             <view>
               <i @click="callUp" class="iconfont icondianhua1"></i>
-              <i @click.stop="navigate(userInfo.lat,userInfo.long,userInfo.customName)" class="iconfont icondianhua" style="font-size:48upx;margin-left:60upx;margin-right:18upx;color:#3385ff;"></i>
             </view>
           </view>
       </view>

+ 6 - 28
ghsApp/src/pagesClient/member/modify.vue

@@ -2,24 +2,20 @@
 	<view class="app-content">
 		<form @submit="formSubmit">
 			<view class="module-com input-line-wrap">
-
 				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
 					<view class="tui-title">城市</view>
 					<view class="tui-input" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
 					<view class="tui-placeholder" v-else>请选择</view>
 					<input v-model="form.province" name="province" hidden />
 				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selectRegion">
+				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title">地址</view>
-					<view class="tui-input" v-if="form.address">{{ form.address }}</view>
-					<view class="tui-placeholder" v-else>请填写详细地址</view>
-					<input v-model="form.address" name="address" hidden />
+					<input v-model="form.address" placeholder-class="phcolor" class="tui-input" name="address" placeholder="请填写地址" />
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title ">门牌</view>
 					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便查找)" />
 				</tui-list-cell>
-
 			</view>
 			<view class="confirm-btn">
 				<button class="admin-button-com big blue" formType="submit">提交</button>
@@ -27,8 +23,6 @@
 		</form>
 		<!-- 省市联动 -->
 		<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
-		<!-- 选择地区 -->
-		<app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
 	</view>
 </template>
 
@@ -59,7 +53,6 @@ export default {
 				floor: '',
 				showAddress:''
 			},
-			showRegion: false,
 			region: {
 				lat: 0,
 				long: 0
@@ -72,28 +65,11 @@ export default {
 		if(this.option.name){
 			uni.setNavigationBarTitle({ title: this.option.name })
 		}
-	},
-	onShow() {
-
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
 		init() {
 
-		},
-		// 选择城市
-		selectRegion() {
-			if (!this.form.city) {
-				this.$msg('请先选择城市!')
-				return false
-			}
-			this.showRegion = true
-		},
-		changeAreaFn(e) {
-			this.form.address = e.title
-			this.form.showAddress = e.address
-			this.region.lat = e.location.lat
-			this.region.long = e.location.lng
 		},
 		//省市联动
 		openAddres() {
@@ -103,11 +79,15 @@ export default {
 			this.form.province = e.provinceName
 			this.form.city = e.cityName
 			this.form.address = ''
+			this.form.showAddress = ''
 			this.region.lat = 0
 			this.region.long = 0
 		},
 		confirmFn() {
 			let that = this
+			this.region.long = 10
+			this.region.long = 11
+			this.form.showAddress = this.form.city+this.form.address+this.form.floor
 			that.$util.confirmModal({content:'确认修改?'},() => {
 				this.form.id = this.option.id ? this.option.id : 0
 				this.form = {...this.form,...this.region}
@@ -122,9 +102,7 @@ export default {
 				})
 			})
 		},
-		// 表单验证
 		formSubmit(e) {
-			// 表单规则
 			let rules = [
 				{
 					name: 'province',

+ 37 - 2
ghsApp/src/pagesPurchase/order.vue

@@ -13,6 +13,12 @@
 			</block>
 		</view>
 		<view class="app-footer open_btn">
+			<text @click="goToLsApp()" style="margin-right:60upx;font-size:30upx;">
+				零售端
+				<text v-if="lsFhNum>0">,待发货{{lsFhNum}}笔</text>
+				<text v-if="lsShNum>0">,待收货{{lsShNum}}笔</text>
+				<text v-if="lsShNum>0 || lsFhNum>0" style="color:#3385FF;font-weight:bold;margin-left:10upx;">查看</text>
+			</text>
 			<view @click="addEvent" class="admin-button-com big blue">新增采购</view>
 		</view>
 	</view>
@@ -23,7 +29,8 @@ import Tabs from "@/components/plugin/tabs";
 import OrderItem from "./orderItem";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import { list } from "@/mixins";
-import { getPurchaseListApi } from "@/api/purchase/index";
+import { getPurchaseListApi,getLsRunningOrderNum } from "@/api/purchase";
+import { getWeixinId } from "@/api/invite";
 export default {
 	components: {
 		Tabs,
@@ -33,7 +40,10 @@ export default {
 	mixins: [list],
 	data() {
 		return {
+			getappIdList: {},
 			tabIndex: 0,
+			lsFhNum:0,
+			lsShNum:0,
 			tabs: [
 				{
 					name: "全部",
@@ -81,8 +91,33 @@ export default {
 		this.getCgList()
 	},
 	methods: {
+		goToLsApp () {
+			let that = this
+			// #ifdef MP-WEIXIN
+			uni.navigateToMiniProgram({
+				appId: that.getappIdList.hd.miniAppId,
+				path: 'pagesPurchase/shopping',
+				//develop 开发版 trial 体验版 release 正式版
+				envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+				extraData: {},
+				success (res) {
+				}
+			})
+			// #endif
+			// #ifdef APP-PLUS
+			this.$msg('暂时只能在微信上操作')
+			// #endif
+		},
 		init(){
-
+			getWeixinId().then(res => {
+        		this.getappIdList = res.data
+      		})
+			getLsRunningOrderNum().then(res=>{
+				if(res.code == 1){
+					this.lsFhNum = res.data.lsFhNum ? res.data.lsFhNum : 0
+					this.lsShNum = res.data.lsShNum ? res.data.lsShNum : 0
+				}
+			})
 		},
 		getCgList() {
 			let ghsId = this.option.ghsId || 0