瀏覽代碼

处理零售店开单报错,零售端采购、供货商采购后刷新列表,pc供货商优化

jf 5 年之前
父節點
當前提交
8ddd46a5f0

+ 5 - 5
ghs/src/views/order/add.vue

@@ -56,7 +56,7 @@
     bottom: 70px;
     right: 20%;
     width: 70%;
-    height: 310px;
+    //height: 310px;
     overflow: hidden;
     //overflow-y: scroll;
   }
@@ -515,10 +515,10 @@ export default {
         this.$message({message: '请先输入数量',type: 'warning'});
         return;
       }
-      if(Number(selectList.stock)<Number(big) + Number(small) / Number(selectList.ratio)){
-        this.$message({message: '库存不足',type: 'warning'});
-        return;
-      }
+      // if(Number(selectList.stock)<Number(big) + Number(small) / Number(selectList.ratio)){
+      //   this.$message({message: '库存不足',type: 'warning'});
+      //   return;
+      // }
       let money = Number(selectList.price) * (Number(big) + Number(small) / Number(selectList.ratio))
       for (let i=0;i<this.tableData.length;i++){
         if(this.tableData[i].name==selectList.itemName){

+ 1 - 0
ghsApp/dist/build/mp-weixin/admin/home/console.wxss

@@ -0,0 +1 @@
+/* admin/home/console.wxss */

+ 1 - 0
ghsApp/dist/build/mp-weixin/admin/shopAdmin/bind.wxss

@@ -0,0 +1 @@
+/* admin/shopAdmin/bind.wxss */

+ 1 - 0
ghsApp/dist/build/mp-weixin/admin/staff/sel-member.wxss

@@ -0,0 +1 @@
+/* admin/staff/sel-member.wxss */

+ 1 - 0
ghsApp/dist/build/mp-weixin/admin/statistics/demo.wxss

@@ -0,0 +1 @@
+/* admin/statistics/demo.wxss */

+ 1 - 0
ghsApp/dist/build/mp-weixin/common/webview.wxss

@@ -0,0 +1 @@
+/* common/webview.wxss */

+ 1 - 0
ghsApp/dist/build/mp-weixin/pagesOrder/print.wxss

@@ -0,0 +1 @@
+/* pagesOrder/print.wxss */

+ 1 - 0
ghsApp/dist/build/mp-weixin/pagesStore/me/rechargeList.wxss

@@ -0,0 +1 @@
+/* pagesStore/me/rechargeList.wxss */

+ 1 - 0
ghsApp/dist/build/mp-weixin/pagesStore/me/withdraw.wxss

@@ -0,0 +1 @@
+/* pagesStore/me/withdraw.wxss */

+ 7 - 0
ghsApp/dist/build/mp-weixin/sitemap.json

@@ -0,0 +1,7 @@
+{
+  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+  "rules": [{
+  "action": "allow",
+  "page": "*"
+  }]
+}

+ 3 - 0
ghsApp/src/mixins/product.js

@@ -20,6 +20,9 @@ export default {
 			this.pageType = pageType;
 		}
 
+
+	},
+	onShow(){
 		if (this.autoLoad) {
 			this.initData();
 		}

+ 1 - 1
hdApp/src/admin/billing/affirmGhs.vue

@@ -167,7 +167,7 @@
 						<i class="iconfont icondianhua1" @tap="toPhone(ghsMsg.mobile)"></i>
 					</view>
 					<view class="flex ghs-msg active">
-						{{ ghsMsg.address }}
+						{{ ghsMsg.fullAddress }}
 					</view>
 				</view>
 				<view class="module-com">

+ 1 - 1
hdApp/src/admin/billing/index.vue

@@ -139,7 +139,7 @@
 		>
 		</modal-module>
 		<!--<FooterCart :price="allGoodsPrice" :count="allGoodsCount" @confirm="confirmSelectGoodsEvent" v-if="tabIndex == 0"></FooterCart>-->
-		<FooterCart :price="allGoodsPriceFun" :count="allGoodsCount" @confirm="confirmSelectGoodsEvent" v-if="tabIndex == 0"></FooterCart>
+		<FooterCart :price="allGoodsPrice" :count="allGoodsCount" @confirm="confirmSelectGoodsEvent" v-if="tabIndex == 0"></FooterCart>
 		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" v-if="tabIndex == 1"></FooterCart>
 	</view>
 </template>

+ 1 - 0
hdApp/src/components/module/app-commodity.vue

@@ -134,6 +134,7 @@ export default {
 			})
 		},
 		customNum() {
+			console.log('---')
 			// if(!this.info.bigCount){
 			if(!this.bigCount && !this.smallCount){
 				let params = {

+ 9 - 1
hdApp/src/components/module/dorpdownSelect.vue

@@ -2,7 +2,9 @@
     <view class="select-bg_bx">
 
         <view v-if="isShowTit" @click="switchCut" :class="['select-title',dropdownShow?'select_corlor':'']">
-            {{menuObjActive?menuObjActive:menuObj.title}}
+<!--            {{menuObjActive?menuObjActive:menuObj.title}}-->
+									<text v-if="typeTime">{{selectItemId?menuObjActive:menuObj.title}}</text>
+									<text v-else>{{menuObjActive?menuObjActive:getMyShopInfo.shopName}}</text>
             <i v-if="isShowMore" class="iconfont iconsanjiao_xia"></i>
         </view>
          <view
@@ -49,6 +51,7 @@
     import DropdownList from "@/components/plugin/dropdown-list";
     import AppDatePicker from "@/components/app-date-picker";
 				import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
+				import {mapGetters} from "vuex";
     export default {
         name:'DorpdownSelect',
         components:{
@@ -80,6 +83,10 @@
                 type: Boolean,
                 default: true
             },
+												typeTime:{
+													type: Boolean,
+													default: false
+												},
             isShowMore:{
                 type: Boolean,
                 default: true
@@ -93,6 +100,7 @@
             }
         },
         computed:{
+									...mapGetters(["getMyShopInfo"]),
             formatSelect(){
                 if(!this.$util.isEmpty(this.selectItemId)&&
                 this.$util.isString(this.selectItemId)&&

+ 58 - 73
hdApp/src/mixins/product.js

@@ -111,8 +111,8 @@ export default {
 			return list;
 		},
 		/**
-		 * 当前页面选中的商品列表
-		 */
+			* 当前页面选中的商品列表
+			*/
 		selectList() {
 			return this.getSelectInfo[this.pageType] || [];
 		},
@@ -165,31 +165,17 @@ export default {
 			* */
 		allGoodsPrice() {
 			let price = 0;
-			if (this.selectList.goodsStyleList) {
+			if (this.selectList) {
 				for (const item of this.selectList) {
-					if(item.goodsStyle==0){
-						price += item.bigCount * Number(item.price);
-					}else{
-						price += item.bigCount * Number(item.goodsStyleList[item.goodsStyleSelectIndex].price);
+					if(item.goodsStyle){
+						if(item.goodsStyle==0){
+							price += item.bigCount * Number(item.price);
+						}else{
+							price += item.bigCount * Number(item.goodsStyleList[item.goodsStyleSelectIndex].price);
+						}
 					}
 				}
-
 			}
-
-			return Math.round(price * 100) / 100;
-		},
-		allGoodsPriceFun() {
-			let price = 0;
-				for (const item of this.selectList) {
-					if(item.goodsStyle==0){
-						price += item.bigCount * Number(item.price);
-					}else{
-						price += item.bigCount * Number(item.goodsStyleList[item.goodsStyleSelectIndex].price);
-					}
-				}
-
-
-
 			return Math.round(price * 100) / 100;
 		},
 		/**
@@ -203,8 +189,8 @@ export default {
 			return length;
 		},
 		/**
-		 * 当前选中商品列表中是否有没有库存的商品
-		 */
+			* 当前选中商品列表中是否有没有库存的商品
+			*/
 		hasNoStock() {
 			let has = false;
 			if (this.selectList) {
@@ -234,8 +220,8 @@ export default {
 	methods: {
 		...mapActions(["setSelectInfoByType", "resetSelectInfoByType"]),
 		/**
-		 * 请求商品数据
-		 */
+			* 请求商品数据
+			*/
 		async initGhsData(id,shopId) {
 			//extendInfo调用时的扩展参数  如  shopId
 			try {
@@ -247,10 +233,10 @@ export default {
 				const { data } = await getGhsProductList(params);
 				data.forEach(element => {
 					element.child &&
-						element.child.forEach(child => {
-							child.classId = element.classId;
-							child.className = element.className;
-						});
+					element.child.forEach(child => {
+						child.classId = element.classId;
+						child.className = element.className;
+					});
 				});
 				this.productInfo = data;
 				this.classIndex = 0;
@@ -272,10 +258,10 @@ export default {
 				const { data } = await getProductDataApi(params);
 				data.forEach(element => {
 					element.child &&
-						element.child.forEach(child => {
-							child.classId = element.classId;
-							child.className = element.className;
-						});
+					element.child.forEach(child => {
+						child.classId = element.classId;
+						child.className = element.className;
+					});
 				});
 				uni.setStorageSync('productInfoList',data);
 				this.productInfo = data;
@@ -286,8 +272,8 @@ export default {
 			}
 		},
 		/**
-		 * 获取当前选中商品总价
-		 */
+			* 获取当前选中商品总价
+			*/
 		getSelectItemPrice(item) {
 			let price = 0;
 			const { bigCount, smallCount, bigPrice, smallPrice } = item;
@@ -346,8 +332,8 @@ export default {
 			return price;
 		},
 		/**
-		 * 通过id获取当前选中的商品信息
-		 */
+			* 通过id获取当前选中的商品信息
+			*/
 		getSelectItemById(id, classId) {
 			let info = {
 				bigCount: 0, //扎数
@@ -372,8 +358,8 @@ export default {
 			return info;
 		},
 		/**
-		 * 通过id获取当前选中的商品类别信息  左边菜单角标  当前选中该类别商品多少件
-		 */
+			* 通过id获取当前选中的商品类别信息  左边菜单角标  当前选中该类别商品多少件
+			*/
 		getSelectClassById(classId) {
 			let info = {
 				bigCount: 0, //扎数
@@ -400,8 +386,8 @@ export default {
 		},
 
 		/**
-		 * 添加商品
-		 */
+			* 添加商品
+			*/
 		addEvent(item) {
 			const list = this.selectList;
 			let has = false;
@@ -469,7 +455,6 @@ export default {
 					}
 				}
 			}
-
 			this.setSelectInfoByType({ type: this.pageType, info: list });
 			// this.$forceUpdate();
 		},
@@ -478,37 +463,37 @@ export default {
 			const list = this.selectList;
 
 			// if (!has) {}
-				let info = { classId: item.classId, id: item.id };
+			let info = { classId: item.classId, id: item.id };
 
-				const classInfo =
-					this.productInfo &&
-					this.productInfo.find(element => {
-						return element.classId == item.classId && element.child;
-					});
-				if (classInfo) {
-					info = classInfo.child.find(ele => {
-						return ele.id == item.id;
-					});
-				}
+			const classInfo =
+				this.productInfo &&
+				this.productInfo.find(element => {
+					return element.classId == item.classId && element.child;
+				});
+			if (classInfo) {
+				info = classInfo.child.find(ele => {
+					return ele.id == item.id;
+				});
+			}
 
-				let params = {
-					...info,
-					bigCount: 0, //扎数
-					smallCount: 0, //支数
-					autoPrice: 0 //调价价格
-				};
-				list.push(params);
-				if(type!='noAdd'){
-					this.setSelectInfoByType({ type: this.pageType, info: list });
-				}
+			let params = {
+				...info,
+				bigCount: 0, //扎数
+				smallCount: 0, //支数
+				autoPrice: 0 //调价价格
+			};
+			list.push(params);
+			if(type!='noAdd'){
+				this.setSelectInfoByType({ type: this.pageType, info: list });
+			}
 			this.$nextTick(()=>{
 				this.customNum(params1)
 			})
 			// this.$forceUpdate();
 		},
 		/**
-		 * 减去商品
-		 */
+			* 减去商品
+			*/
 		delEvent(item) {
 			const list = this.selectList;
 			let has = false;
@@ -712,8 +697,8 @@ export default {
 			this.setSelectInfoByType({ type: this.pageType, info: list });
 		},
 		/**
-		 * 更新商品
-		 */
+			* 更新商品
+			*/
 		updateItemEvent(item) {
 			const list = this.selectList;
 			for (let index = 0; index < list.length; index++) {
@@ -748,8 +733,8 @@ export default {
 			// this.$forceUpdate();
 		},
 		/**
-		 * 切换左侧商品类别
-		 */
+			* 切换左侧商品类别
+			*/
 		swichClass(e) {
 			let cur = e.currentTarget.dataset.current;
 			if (this.classIndex == cur) {
@@ -770,8 +755,8 @@ export default {
 			}
 		},
 		/**
-		 * 搜索对应花材
-		 */
+			* 搜索对应花材
+			*/
 		searchFn() {},
 
 

+ 1 - 0
hdApp/src/pagesStorehouse/stockWarn/detailed.vue

@@ -5,6 +5,7 @@
 
 				<DorpdownSelect class="bar"
 					:menuObj="menuTimeObj"
+					:typeTime="true"
 					:selectItemId.sync="selectTimeId"
 					:typeSelect="1" top="0px"
 					@selectSussess="selectSussess" />

+ 11 - 3
hdApp/src/pagesStorehouse/stockWarn/manage.vue

@@ -20,7 +20,7 @@
 <!--				<view class="item_list_bx" v-for="(classItem, classIndex) in filterProductInfoContrapose" :key="classIndex" :id="`class_${classItem.classId}`">-->
 <!--				</view>-->
 					<!--					<text v-else>当前库存充足</text>-->
-				<view class="item_list_bx">
+				<view class="item_list_bx" style="width: 100%">
 					<template v-for="(productItem, productIndex) in filterProductInfoContrapose">
 						<CommodityStock
 							:isPrice="false"
@@ -32,7 +32,10 @@
 				</view>
 			</block>
 			<block v-else>
-				<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(filterProductInfoContrapose)"/>
+				<view style="width: 100%">
+					<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(filterProductInfoContrapose)"/>
+				</view>
+
 			</block>
 		</view>
 		<view v-else class="scroll-middle_bx">
@@ -111,10 +114,15 @@ export default {
 			]
 		};
 	},
+	computed:{
+		...mapGetters(["getMyShopInfo"]),
+	},
 	onLoad() {
 		let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
 		// 当前门店
-		this.shopId = this.userInfo.id;
+		// this.shopId = this.userInfo.id;
+		console.log('this.getMyShopInfo',this.getMyShopInfo)
+		this.shopId = this.getMyShopInfo.id;
 		if(type=="waring"){
 			this.initDataContrapose({ type, shopId: this.shopId });
 		}else{

+ 8 - 1
hdApp/src/store/modules/login.js

@@ -1,7 +1,8 @@
 export default {
 	state: {
 		loginInfo: {},
-		dictionariesInfo:{}
+		dictionariesInfo:{},
+		myShopInfo:{}
 	},
 	getters: {
 		getLoginInfo(state) {
@@ -10,6 +11,9 @@ export default {
 		getDictionariesInfo(state) {
 			return state.dictionariesInfo || {}
 		},
+		getMyShopInfo(state) {
+			return state.myShopInfo || {}
+		},
 	},
 	mutations: {
 		setLoginInfo(state, payload) {
@@ -19,6 +23,9 @@ export default {
 			console.log('payload',payload)
 			state.dictionariesInfo = payload
 		},
+		setMyShopInfo(state, payload) {
+			state.myShopInfo = payload
+		},
 	}
 	// ,
 	// actions: {