Bläddra i källkod

采购人采购ok

shish 2 år sedan
förälder
incheckning
59ef5f7ad3

+ 4 - 2
ghsApp/src/mixins/product2.js

@@ -38,7 +38,8 @@ export default {
 			globalItemData:[],
 			globalScrollTopPlace:0,
 			globalScrollTopOldPlace:0,
-			globalIsRequesting:false
+			globalIsRequesting:false,
+			globalCgMyCharge:0
 		};
 	},
 	onLoad(options) {
@@ -167,7 +168,8 @@ export default {
                 return false
             }
             let that = this
-			getItemList({classId:this.globalClassId,requestType:this.globalRequestType,page:this.globalPage,search:this.globalPy,customId:this.globalCustomId}).then(res=>{
+			getItemList({classId:this.globalClassId,requestType:this.globalRequestType,page:this.globalPage,
+				search:this.globalPy,customId:this.globalCustomId,globalCgMyCharge:this.globalCgMyCharge}).then(res=>{
 				if(res.code == 1){
 					that.globalItemData = that.globalPage == 1 ? res.data.list : that.globalItemData.concat(res.data.list)
                     if(res.data.moreData == 1){

+ 3 - 1
ghsApp/src/pagesPurchase/add.vue

@@ -1,6 +1,7 @@
 <template>
 <view class="app-content" style="background:white;">
 	<view class="billing_box_bg">
+
 		<view class="input-wrap">
 			<view style="padding:0upx 0upx 0upx 0upx;margin-right:10upx;" >
 				<button class="admin-button-com middle blue" @click="selectFlowerNumFn()">选分类</button>
@@ -140,6 +141,7 @@ export default {
 		},
 	},
 	onShow(){
+		this.globalCgMyCharge = this.option.globalCgMyCharge ? this.option.globalCgMyCharge : 0
 		this.cgItemInit()
 	},
 	onUnload() {
@@ -246,7 +248,7 @@ export default {
 				return false
 			}
 			let location = this.option.location ? this.option.location : 0
-			this.$util.pageTo({url:'/pagesPurchase/details?ghsId='+this.option.ghsId+'&ghsName='+this.option.ghsName+'&location='+location,type:2})
+			this.$util.pageTo({url:'/pagesPurchase/details?ghsId='+this.option.ghsId+'&ghsName='+this.option.ghsName+'&location='+location+'&globalCgMyCharge='+this.globalCgMyCharge,type:2})
 		}
 	}
 };

+ 1 - 0
ghsApp/src/pagesPurchase/components/CommodityPurchase.vue

@@ -1,6 +1,7 @@
 <template>
   <view class="product">
     <view class="item-cmd_bx" @click="showAddModelFn">
+      <text style="position: absolute;left:245upx;font-weight:bold;color:red;font-size:24upx;top:118upx;" v-if="info.needCgNum && Number(info.needCgNum)>0">待采 {{ info.needCgNum }}</text>
       <view class="img_bx" style="background:#eeeeee">
         <block v-if="info.status == 2">
           <view class="sold-out">

+ 6 - 3
ghsApp/src/pagesPurchase/details.vue

@@ -248,11 +248,13 @@ export default {
 			perKgFreight:0,
 			location:0,
 			wcPrintList:[],
-			cgUnitType:0
+			cgUnitType:0,
+			globalCgMyCharge:0
 		};
 	},
 	onLoad() {
 		let that = this
+		this.globalCgMyCharge = this.option.globalCgMyCharge?this.option.globalCgMyCharge:0
 		if(this.myShopInfo.cgModel == 1){
 			this.form.avgKgWeight = this.myShopInfo.cgPerCost
 		}
@@ -482,6 +484,7 @@ export default {
 			}
 			const itemInfo = this.selectList.map(ele => {
 				return {
+					name:ele.name,
 					classId: ele.classId,
 					productId: ele.id,
 					bigNum: ele.bigCount,
@@ -496,7 +499,7 @@ export default {
 			})
 			formData.itemInfo = JSON.stringify(itemInfo)
 			uni.showLoading({mask:true})
-			let params = {...formData,modifyPrice:this.modifyPrice,cgModel:this.myShopInfo.cgModel,ghsId:this.option.ghsId,inType:inType}
+			let params = {...formData,modifyPrice:this.modifyPrice,cgModel:this.myShopInfo.cgModel,ghsId:this.option.ghsId,inType:inType,globalCgMyCharge:this.globalCgMyCharge}
 			createPurchaseOrderApi(params).then(res=>{
 				uni.hideLoading()
 				that.removeFromSaveDirect()
@@ -513,7 +516,7 @@ export default {
 			})
 		},
 		goBackFn() {
-			this.pageTo({url: '/pagesPurchase/add?ghsId='+this.option.ghsId+'&ghsName='+this.option.ghsName,type:2})
+			this.pageTo({url: '/pagesPurchase/add?ghsId='+this.option.ghsId+'&ghsName='+this.option.ghsName+'&globalCgMyCharge='+this.globalCgMyCharge,type:2})
 		}
 	}
 };

+ 21 - 8
ghsApp/src/pagesPurchase/supplier.vue

@@ -17,7 +17,7 @@
     <view style="padding:22upx 0 0 20upx;font-size:30upx;">总欠款:{{info.totalDebtAmount?parseFloat(info.totalDebtAmount):0}}</view>
     <block>
         <block v-if="!$util.isEmpty(list.data)">
-          <view class="list_item" v-for="(item, index) in list.data" :key="index" @click="goToCg(item)" >
+          <view class="list_item" v-for="(item, index) in list.data" :key="index">
 
             <view v-if="item.location == 1"
             style="width:90upx;padding:5upx 0 5upx 0;font-size:20upx;background-color:#7babc1;color:white;position:absolute;left:0;top:0;text-align:center;"
@@ -33,7 +33,8 @@
               <view class="btn_entrance" @click.stop="pageTo({ url: '/admin/clear/list?ghsId'+item.id})"> 结账记录 </view>
               <view class="btn_entrance" @click.stop="getDebtList()"> 欠款变动明细 </view>
               <view class="btn_entrance" @click.stop="cgList(item)">采购记录</view>
-              <view class="cg-button">采购</view>
+              <view class="cg-button" @click="goToCg(item)">采购</view>
+              <view class="my-cg-button" @click.stop="goToMyCg(item)">我的</view>
               <view class="search-button" @click.stop="goToSearchDebt(item)">搜</view>
               <text class="mobile"></text>
             </view>
@@ -41,11 +42,7 @@
             <view class="box_6 flex-row" @click.stop="goToDebtList(item)" v-if="Number(item.debtAmount)>0">
               <view class="show_clear_area flex-row justify-between">
                 <image class="icon_2" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps2pvfa1l5i34w5vqj2k7b3kejml3i3nmrba1421bf-caa2-491b-8773-af413df7e96d.png" />
-                <text class="waite_clear_order">待结订单&nbsp;{{item.debtNum}}笔&nbsp;¥{{item.debtAmount?parseFloat(item.debtAmount):0}}</text>
-              </view>
-              <view class="image-text_9 flex-row justify-between">
-                <text class="text-group_4">查看明细</text>
-                <image class="icon_3" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps83ag7scu3a8bfq22ciodg5hiu0x9cesxjbfb4c9ca-ee3f-45ec-a6d7-6f166e13d6e6.png" />
+                <text class="waite_clear_order">待结订单&nbsp;{{item.debtNum}}笔&nbsp;¥{{item.debtAmount?parseFloat(item.debtAmount):0}} 查看明细&gt;</text>
               </view>
             </view>
 
@@ -202,6 +199,9 @@ export default {
 		},
     goToCg (item) {
       this.pageTo({url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name+'&location='+item.location})
+    },
+    goToMyCg(item){
+      this.pageTo({url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name+'&location='+item.location+'&globalCgMyCharge=1'})
     }
   }
 }
@@ -330,7 +330,7 @@ export default {
           font-size: 30upx;
           color: #666666;
           padding: 10upx 20upx;
-          margin-left: 20upx;
+          margin-left: 14upx;
           text-decoration:underline;
         }
         .mobile{
@@ -364,6 +364,19 @@ export default {
             top:-80upx;
             right:-125upx;
         }
+        .my-cg-button{
+            display: inline-block;
+            font-size: 28upx;
+            color: white;
+            border: 1upx solid #2ca99d;
+            border-radius: 80upx;
+            padding: 18upx 32upx;
+            background: #2ca99d;
+            position: absolute;
+            top:40upx;
+            right:-125upx;
+            z-index:99999;
+        }
       }
       .box_6 {
         background-color: rgb(248, 242, 242);