shish 3 éve
szülő
commit
11875d2762

+ 3 - 3
ghsApp/src/admin/stat/kdIncome.vue

@@ -8,9 +8,9 @@
 		</view>
 		<view class="top-bar">
 			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
-			<view>
-				<button class="admin-button-com middel" :class="params.contain == 0 ? 'blue' : 'default'" @click="changeContain(0)">不含结账</button>
-				<button class="admin-button-com middel" :class="params.contain == 1 ? 'blue' : 'default'" @click="changeContain(1)" style="margin-left:30upx;">含结账</button>
+			<view style="position:absolute;top:-20upx;right:30upx;">
+				<button class="admin-button-com middle" :class="params.contain == 0 ? 'blue' : 'default'" @click="changeContain(0)">不含结账</button>
+				<button class="admin-button-com middle" :class="params.contain == 1 ? 'blue' : 'default'" @click="changeContain(1)" style="margin-left:30upx;">含结账</button>
 			</view>
 		</view>
 		<view  class="main-view">

+ 2 - 2
ghsApp/src/pagesPurchase/add.vue

@@ -96,7 +96,7 @@ import FooterCart from "@/components/module/app-footer-cart";
 import productMins from "@/mixins/product";
 import { mapGetters } from "vuex";
 export default {
-	name: "purchase", // 采购
+	name: "purchase",
 	components: {
 		AppTabs,
 		AppSearchModule,
@@ -163,7 +163,7 @@ export default {
 				this.$msg('请选择花材')
 				return false
 			}
-			this.$util.pageTo({ url: '/pagesPurchase/details',type:2,query: {ghsId:this.option.ghsId,ghsName:this.option.ghsName}})
+			this.$util.pageTo({url:'/pagesPurchase/details?ghsId='+this.option.ghsId+'&ghsName='+this.option.ghsName,type:2})
 		}
 	}
 };

+ 10 - 20
ghsApp/src/pagesPurchase/details.vue

@@ -26,7 +26,7 @@
 							</view>
 						</view>
 						<view class="summary-bar">
-							<view class="operate-view" @click="gobackEvent">
+							<view class="operate-view" @click="goBackFn">
 								<text class="iconfont icongouwuche"></text>返回修改
 							</view>
 							<view class="describe-view">
@@ -127,7 +127,6 @@
 			</view>
 			<button class="admin-button-com blue middle" v-if="canIEdit" @click="formSubmit">确认</button>
 		</view>
-
 	</view>
 </view>
 </template>
@@ -163,7 +162,6 @@ export default {
 				pickCharge: "",
 				localCharge: "",
 				entryTime: "",
-				ghsId: null,
 				yfPayWay:1,
 				remark:"",
 				avgKgWeight:''
@@ -176,11 +174,7 @@ export default {
 			perKgFreight:0,
 		};
 	},
-	onLoad(option) {
-		this.form.ghsId = option.ghsId
-		if(!this.$util.isEmpty(option.ghsId)){
-			this.selectJobId = option.ghsId
-		}
+	onLoad() {
 		if(this.myShopInfo.cgModel == 1){
 			this.form.avgKgWeight = this.myShopInfo.cgPerCost
 		}
@@ -235,7 +229,10 @@ export default {
 		},
 		...mapActions(["initMerchantInfo"]),
 		init() {
-			this._getDet();
+			if(!this.$util.isEmpty(this.option.ghsId)){
+				this.selectJobId = this.option.ghsId
+			}
+			this.getDetail();
 		},
 		inputFn(e) {
 			let price = Number(this.selectAllPrice);
@@ -265,7 +262,7 @@ export default {
 			this.totalFreight = (packingCharge+longCharge+shortCharge+localCharge+pickCharge).toFixed(2)
 			this.perKgFreight = (this.totalFreight / this.calcTotalWeight).toFixed(2)
 		},
-		_getDet() {
+		getDetail() {
 			let data = uni.getStorageSync("modifyShopB");
 			if (this.$util.isEmpty(data)) return;
 			Object.keys(this.form).forEach((i, index) => {
@@ -300,13 +297,6 @@ export default {
 			} catch (error) {
 			}
 		},
-
-		changeCustomerFn(e) {
-			console.log("changeCustomerFn", e);
-			this.supplier = e;
-			this.form.ghsId = e.id;
-		},
-
 		onCityConfirm(e) {
 			this.form.province = e.provinceName;
 			this.form.city = e.cityName;
@@ -338,7 +328,7 @@ export default {
 				await this.initMerchantInfo()
 			}
 			uni.showLoading({mask:true})
-			const res = await createPurchaseOrderApi({...formData,modifyPrice:this.modifyPrice,cgModel:this.myShopInfo.cgModel})
+			const res = await createPurchaseOrderApi({...formData,modifyPrice:this.modifyPrice,cgModel:this.myShopInfo.cgModel,ghsId:this.option.ghsId})
 			uni.hideLoading()
 			uni.setStorageSync('flowersItemInfo', itemInfo)
 			this.removeFromSaveDirect()
@@ -359,8 +349,8 @@ export default {
 				this.$msg(checkRes);
 			}
 		},
-		gobackEvent() {
-			this.pageTo({url: '/pagesPurchase/add',query:{ghsId:this.option.ghsId,ghsName:this.option.ghsName},type:2})
+		goBackFn() {
+			this.pageTo({url: '/pagesPurchase/add?ghsId='+this.option.ghsId+'&ghsName='+this.option.ghsName,type:2})
 		}
 	}
 };

+ 5 - 5
ghsApp/src/pagesPurchase/supplier.vue

@@ -9,7 +9,7 @@
     <view class="order_list" >
     <block>
         <block v-if="!$util.isEmpty(supplierList)">
-          <view class="list_item" v-for="(item, index) in supplierList" :key="index" @click="gotoDetails(item)" >
+          <view class="list_item" v-for="(item, index) in supplierList" :key="index" @click="goToDetail(item)" >
             <view class="store_name">
               <image :src="item.avatar"></image>
               <view class="store_title">{{item.name}}</view>
@@ -17,7 +17,7 @@
             </view>
             <view class="store_btn">
               <view class="btn_entrance" @click.stop="pageTo({ url: '/admin/clear/list',query: {ghsId: item.id}})"> 结账记录 </view>
-              <view class="btn_entrance" @click.stop="gotoDetailsEvent(item)" > 待结订单 </view>
+              <view class="btn_entrance" @click.stop="goToDebtList(item)"> 待结订单 </view>
               <view class="btn_entrance" @click.stop="pageTo({url:'/pagesPurchase/order',query:{ghsId:item.id}})">采购记录</view>
               <view class="cg-button">采购</view>
             </view>
@@ -72,7 +72,7 @@ export default {
         this.supplierList = res.data.list
       }).catch(err => { console.log(err) })
     },
-    gotoDetailsEvent(item) {
+    goToDebtList(item) {
 			uni.navigateTo({
 				url: `/pagesGys/details?id=${item.id}`,
 				success: result => {},
@@ -81,8 +81,8 @@ export default {
 			});
 		},
     // 采购记录详情
-    gotoDetails (item) {
-      this.pageTo({ url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name, type:2 })
+    goToDetail (item) {
+      this.pageTo({ url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name})
     },
     // 添加供货商
     add() {