shish 4 жил өмнө
parent
commit
c1d6bd61a4

+ 3 - 3
ghsApp/src/admin/changePrice/components/Item.vue

@@ -25,9 +25,9 @@
 		</view>
 		</view>
 	</view>
 	</view>
 	<view class="level-price">
 	<view class="level-price">
-		散客 ¥<text style="margin-right:35upx;">{{skPrice}}</text>
-		普店 ¥<text style="margin-right:35upx;">{{pdPrice}}</text>
-		银店 ¥<text style="margin-right:35upx;">{{ydPrice}}</text>
+		散客 ¥<text style="margin-right:30upx;">{{skPrice}}</text>
+		普店 ¥<text style="margin-right:30upx;">{{pdPrice}}</text>
+		银店 ¥<text style="margin-right:30upx;">{{ydPrice}}</text>
 		金店 ¥<text style="margin-right:8upx;">{{jdPrice}}</text>
 		金店 ¥<text style="margin-right:8upx;">{{jdPrice}}</text>
 	</view>
 	</view>
 </view>
 </view>

+ 1 - 1
ghsApp/src/admin/home/apply.vue

@@ -64,7 +64,7 @@ export default {
                         {name: "调拨出库",img: `${this.$constant.imgUrl}/ghs/home/dbck.png`,url: "/pagesStorehouse/allot/allotEx"},
                         {name: "调拨出库",img: `${this.$constant.imgUrl}/ghs/home/dbck.png`,url: "/pagesStorehouse/allot/allotEx"},
                         {name: "调拨入库",img: `${this.$constant.imgUrl}/ghs/home/dbrk.png`,url: "/pagesStorehouse/allot/allotPut"},
                         {name: "调拨入库",img: `${this.$constant.imgUrl}/ghs/home/dbrk.png`,url: "/pagesStorehouse/allot/allotPut"},
                         {name: "员工业绩",img: `${this.$constant.imgUrl}/ghs/home/icon_ygyj.png`,url: "/admin/staff/achieve"},
                         {name: "员工业绩",img: `${this.$constant.imgUrl}/ghs/home/icon_ygyj.png`,url: "/admin/staff/achieve"},
-                        {name: "花店等级设置",img: `${this.$constant.imgUrl}/ghs/home/yggl.png`,url: "/admin/custom/levelSet"},
+                        {name: "客户分级指标",img: `${this.$constant.imgUrl}/ghs/home/yggl.png`,url: "/admin/custom/levelSet"},
                     ]
                     ]
                 },
                 },
                 {
                 {

+ 1 - 3
ghsApp/src/admin/item/detail.vue

@@ -355,9 +355,7 @@ export default {
       });
       });
     },
     },
     goBack(){
     goBack(){
-      uni.navigateBack({
-						delta: 1
-					});
+      uni.navigateBack({ delta: 1 })
     },
     },
     changeBigUnitFn(e){
     changeBigUnitFn(e){
       this.bigUnitSelectedData = this.unitData[e.detail.value];
       this.bigUnitSelectedData = this.unitData[e.detail.value];

+ 7 - 1
ghsApp/src/api/order/index.js

@@ -1,4 +1,10 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 import https from "@/plugins/luch-request_0.0.7/request";
+
+//到货提交花材
+export const arrival = data => {
+	return https.post("/order/arrival", data);
+};
+
 /** *
 /** *
  * 商城下单-生成订单 m
  * 商城下单-生成订单 m
  */
  */
@@ -166,7 +172,7 @@ export const orderClass = data => {
 export const orderUpdatePrice = data => {
 export const orderUpdatePrice = data => {
 	return https.get("/order/update-price", data);
 	return https.get("/order/update-price", data);
 };
 };
-// =====================  new ========================
+
 // 计算运费
 // 计算运费
 export const freight = data => https.get("/order/freight", data);
 export const freight = data => https.get("/order/freight", data);
 // 发快递
 // 发快递

+ 38 - 6
ghsApp/src/pagesOrder/arrival.vue

@@ -17,8 +17,8 @@
 								<view class="info-line">
 								<view class="info-line">
 									<text class="item-type">{{ s.property }}</text>
 									<text class="item-type">{{ s.property }}</text>
 									<view class="item-count">
 									<view class="item-count">
-										<input type="text" class="num" v-model="s.bigNum" @focus="s.bigNum=''" placeholder="到货数量" />
-										<input type="text" class="price" v-model="s.currentCost" @focus="s.currentCost=''" placeholder="成本" />
+										<input type="text" class="num" v-model="s.bigNum" placeholder="到货数量" />
+										<input type="text" class="price" v-model="s.currentCost" placeholder="成本" />
 									</view>
 									</view>
 								</view>
 								</view>
 							</view>
 							</view>
@@ -42,7 +42,7 @@
 					<tui-list-cell class="line-cell" :hover="false">
 					<tui-list-cell class="line-cell" :hover="false">
 						<view class="tui-title">重量(公斤)</view>
 						<view class="tui-title">重量(公斤)</view>
 						<view class="detail-price_box" style="font-size: 28upx;">
 						<view class="detail-price_box" style="font-size: 28upx;">
-						<text v-if="Number(miniKilo) > Number(totalWeight)" style="color:#CCCCCC;margin-right:15upx;">未达{{parseFloat(miniKilo)}}公斤按{{parseFloat(miniKilo)}}公斤算</text>
+						<text v-if="Number(miniKilo) > Number(totalWeight)" style="color:#CCCCCC;margin-right:15upx;">不足{{parseFloat(miniKilo)}}公斤按{{parseFloat(miniKilo)}}公斤算</text>
 						<text>{{ totalWeight }}</text>
 						<text>{{ totalWeight }}</text>
 						</view>
 						</view>
 					</tui-list-cell>
 					</tui-list-cell>
@@ -81,8 +81,7 @@
 
 
 		<view class="app-footer">
 		<view class="app-footer">
 			<button class="admin-button-com big default" @click="goBack()">取消</button>
 			<button class="admin-button-com big default" @click="goBack()">取消</button>
-			<button v-if="option.ptItemId" class="admin-button-com big blue" formType="submit" @click="status = 1">添加</button>
-			<button v-else class="admin-button-com big blue" formType="submit" @click="status = 1">确认</button>
+			<button class="admin-button-com big blue" @click="commitItem()">确认</button>
 		</view>
 		</view>
 
 
 	</view>
 	</view>
@@ -90,7 +89,7 @@
 <script>
 <script>
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
 import TuiListCell from "@/components/plugin/list-cell";
 import TuiListCell from "@/components/plugin/list-cell";
-import { getArrivalDetail } from "@/api/order/index";
+import { getArrivalDetail,arrival } from "@/api/order/index";
 export default {
 export default {
 	name: "arrival",
 	name: "arrival",
 	components: {
 	components: {
@@ -151,6 +150,9 @@ export default {
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
+		goBack(){
+			uni.navigateBack({ delta: 1 })
+		},
 		async init() {
 		async init() {
 			const res = await getArrivalDetail({
 			const res = await getArrivalDetail({
 				id: this.option.id
 				id: this.option.id
@@ -158,6 +160,36 @@ export default {
 			this.detailInfo = res.data;
 			this.detailInfo = res.data;
 			this.miniKilo = res.data.miniKilo
 			this.miniKilo = res.data.miniKilo
 			this.kiloFee = res.data.kiloFee
 			this.kiloFee = res.data.kiloFee
+		},
+		commitItem(){
+			let product = []
+			let hasError = false
+			if (this.detailInfo && this.detailInfo.product) {
+				for (const item of this.detailInfo.product) {
+						if(item.currentCost.length <= 0){
+							this.$msg('请填写进货价')
+							hasError = true;
+							break;
+						}
+						if(item.bigNum <= 0){
+							this.$msg('请填写到货数,没有填0')
+							hasError = true;
+							break;
+						}
+						let num = item.bigNum ? Number(item.bigNum) : 0
+						let price = item.currentCost ? Number(item.currentCost) : 0
+						let productId = item.productId || 0
+						product = [...product,{productId,price,num}]
+				}
+			}
+			if(hasError == true){
+				return false
+			}
+			arrival({id:this.option.id,product:JSON.stringify(product)}).then(res=>{
+				if(res.code == 1){
+
+				}
+			})
 		}
 		}
 	}
 	}
 };
 };

+ 0 - 1
hdApp/src/admin/billing/affirmGhsBook.vue

@@ -96,7 +96,6 @@
 		</view>
 		</view>
 	</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 AppAvatarModule from "@/components/module/app-avatar";

+ 1 - 1
hdApp/src/pages.json

@@ -305,7 +305,7 @@
 				{ "path": "shopping", "style": { "navigationBarTitleText": "采购", "enablePullDownRefresh": true } },
 				{ "path": "shopping", "style": { "navigationBarTitleText": "采购", "enablePullDownRefresh": true } },
 				{ "path": "ghsProduct", "style": { "navigationBarTitleText": "采购花材", "enablePullDownRefresh": false } },
 				{ "path": "ghsProduct", "style": { "navigationBarTitleText": "采购花材", "enablePullDownRefresh": false } },
 				{ "path": "setPsd", "style": { "navigationBarTitleText": "设置密码", "enablePullDownRefresh": true } },
 				{ "path": "setPsd", "style": { "navigationBarTitleText": "设置密码", "enablePullDownRefresh": true } },
-				{ "path": "wechatPay", "style": { "navigationBarTitleText": "待支付", "enablePullDownRefresh": true } },
+				{ "path": "wechatPay", "style": { "navigationBarTitleText": "待支付"} },
 				{ "path": "cosNext", "style": { "navigationBarTitleText": "下一步", "enablePullDownRefresh": true } },
 				{ "path": "cosNext", "style": { "navigationBarTitleText": "下一步", "enablePullDownRefresh": true } },
 				{ "path": "gatherPay", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false } },
 				{ "path": "gatherPay", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false } },
 				{ "path": "gatherResult", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false } },
 				{ "path": "gatherResult", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false } },

+ 5 - 8
hdApp/src/pagesPurchase/bookExplain.vue

@@ -2,21 +2,18 @@
   <view class="app-content">
   <view class="app-content">
     <view class="rank-top-wrap">
     <view class="rank-top-wrap">
       <view class="rank-top-text">
       <view class="rank-top-text">
-        <view class="rank-top-tit">花材预订</view>
-      </view>
-      <view class="rank-top-img">
-        <img :src="`${constant.imgUrl}/retail/interest/VIP-interest.png`" alt mode="widthFix" />
+        <view class="rank-top-tit">预订说明</view>
       </view>
       </view>
     </view>
     </view>
     <view class="rank-bottom-wrap">
     <view class="rank-bottom-wrap">
       <view class="rank-text">
       <view class="rank-text">
         <view>提前订货按门店进货价销售</view>
         <view>提前订货按门店进货价销售</view>
-        <view>下单时按下单当天售价付款,到货后按到货当天进货价结算,多退少补</view>
+        <view>下单时按下单当天售价付款,到货后按到货当天进货价结算,多退少补</view>
         <view>门店仅收取服务费,每公斤服务费{{parseFloat(kiloFee)}}元,不足{{parseFloat(miniKilo)}}公斤按{{parseFloat(miniKilo)}}公斤计算</view>
         <view>门店仅收取服务费,每公斤服务费{{parseFloat(kiloFee)}}元,不足{{parseFloat(miniKilo)}}公斤按{{parseFloat(miniKilo)}}公斤计算</view>
         <view>当天15点前下单,第二天送达,15点后下单的,第三天送达</view>
         <view>当天15点前下单,第二天送达,15点后下单的,第三天送达</view>
       </view>
       </view>
       <view style="text-align:center;">
       <view style="text-align:center;">
-        <button style="margin:0 auto;" class="admin-button-com blue middle" @click="goBack()">返回</button>
+        <button style="margin:10upx auto;padding-left:50upx;padding-right:50upx;" class="admin-button-com blue middle" @click="goBack()">返回</button>
       </view>
       </view>
     </view>
     </view>
   </view>
   </view>
@@ -25,7 +22,7 @@
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
 import { getGhsDataApi} from "@/api/ghs/index";
 import { getGhsDataApi} from "@/api/ghs/index";
 export default {
 export default {
-  name: "customLevel",
+  name: "bookExplain",
   components: {
   components: {
   },
   },
   data() {
   data() {
@@ -67,7 +64,6 @@ export default {
     .rank-top-tit {
     .rank-top-tit {
       color: #ffd515;
       color: #ffd515;
       font-size: 44upx;
       font-size: 44upx;
-      margin-bottom: 10upx;
     }
     }
   }
   }
   .rank-top-img {
   .rank-top-img {
@@ -80,6 +76,7 @@ export default {
 .rank-bottom-wrap {
 .rank-bottom-wrap {
   padding: 30upx;
   padding: 30upx;
   background-color: #fff;
   background-color: #fff;
+  color:#666666;
   .rank-text {
   .rank-text {
     font-size:30upx;
     font-size:30upx;
     margin-bottom: 26upx;
     margin-bottom: 26upx;

+ 64 - 34
hdApp/src/pagesPurchase/order.vue

@@ -10,12 +10,16 @@
               <view class="accumulative"></view>
               <view class="accumulative"></view>
             </view>
             </view>
             <view class="cg-button" @click="enterShop(ghsInfo)">进店</view>
             <view class="cg-button" @click="enterShop(ghsInfo)">进店</view>
-            <view class="book-button" @click="bookItem(ghsInfo)">预订</view>
+            <view :class="[ghsInfo.kiloFee && Number(ghsInfo.kiloFee)>0 ? 'could-book' : 'not-book', 'book-button']"  @click="bookItem(ghsInfo)">预订</view>
+            <view :class="[ghsInfo.kiloFee && Number(ghsInfo.kiloFee)>0 ? 'could-book-text' : 'not-book-text', 'book-button-text']">
+              <text>提前订货更便宜,</text>
+              <text class="explain" @click="getBookItemExplain(ghsInfo)">预订说明</text>
+            </view>
             <view class="store_btn">
             <view class="store_btn">
               <view class="btn_entrance" @click="pageTo({ url: '/admin/clear/list',query: {ghsId: ghsInfo.id}})">结账记录</view>
               <view class="btn_entrance" @click="pageTo({ url: '/admin/clear/list',query: {ghsId: ghsInfo.id}})">结账记录</view>
-              <view class="btn_entrance" @click="settleAccounts(ghsInfo)" > 欠款订单 </view>
               <view class="btn_entrance" @click="pageTo({url:'/pagesPurchase/shopping'})" > 采购记录 </view>
               <view class="btn_entrance" @click="pageTo({url:'/pagesPurchase/shopping'})" > 采购记录 </view>
-              <view class="btn_entrance" @click="pageTo({ url: '/admin/ghs/debtChange',query: {ghsId: ghsInfo.id}})" style="text-decoration:none;color:red;font-size:25upx;"> 欠款 ¥{{parseFloat(ghsInfo.debtAmount)}} </view>
+              <view class="btn_entrance" @click="settleAccounts(ghsInfo)"> 欠款 ¥{{parseFloat(ghsInfo.debtAmount)}} </view>
+              <view class="btn_entrance" @click="pageTo({ url: '/admin/ghs/debtChange',query: {ghsId: ghsInfo.id}})">欠款变动明细 </view>
             </view>
             </view>
           </view>
           </view>
         </block>
         </block>
@@ -24,7 +28,6 @@
         </block>
         </block>
       </block>
       </block>
     </view>
     </view>
-
   </view>
   </view>
 </template>
 </template>
 <script>
 <script>
@@ -65,41 +68,43 @@ export default {
       })
       })
     },
     },
 		inviteGhs(){
 		inviteGhs(){
-      this.pageTo({
-        url: '/pagesInvite/inviteShop'
-      })
+      this.pageTo({ url: '/pagesInvite/inviteShop' })
 		},
 		},
     enterShop(item) {
     enterShop(item) {
       const { id } = item
       const { id } = item
       this.pageTo({url: '/pagesPurchase/ghsProduct',query:{id:id}})
       this.pageTo({url: '/pagesPurchase/ghsProduct',query:{id:id}})
     },
     },
     bookItem(item){
     bookItem(item){
+      //没有设置每公斤运费则不能进入预订页面
+      if(item.kiloFee && Number(item.kiloFee)<=0){
+        this.$msg("即将开通,敬请期待");
+        return false
+      }
       const { id } = item
       const { id } = item
       this.pageTo({url: '/pagesPurchase/bookProduct',query:{id:id}})
       this.pageTo({url: '/pagesPurchase/bookProduct',query:{id:id}})
     },
     },
+    getBookItemExplain(item){
+      if(item.kiloFee && Number(item.kiloFee)<=0){
+        this.$msg("即将开通,敬请期待");
+        return false
+      }
+      this.pageTo('/pagesPurchase/bookExplain?id='+item.id)
+    },
     init() {
     init() {
       this.getGHSList()
       this.getGHSList()
     },
     },
     getGHSList () {
     getGHSList () {
       return ghsList().then(res => {
       return ghsList().then(res => {
         this.supplierList = res.data.list
         this.supplierList = res.data.list
-        console.log(this.supplierList, 111)
-      }).catch(err => { console.log(err) })
+      })
     },
     },
     // 结账
     // 结账
     settleAccounts (item) {
     settleAccounts (item) {
-      console.log('999999')
-      console.log(item)
-      console.log(item.id)
       this.pageTo({ url: '/pagesPurchase/gathering',query:{id:item.id}})
       this.pageTo({ url: '/pagesPurchase/gathering',query:{id:item.id}})
     },
     },
     // 采购记录详情
     // 采购记录详情
     gotoDetails (val) {
     gotoDetails (val) {
-      console.log(val)
-      this.pageTo({
-        url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id,
-        type:2
-      })
+      this.pageTo({ url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id, type:2 })
     }
     }
   }
   }
 }
 }
@@ -116,7 +121,7 @@ export default {
     .list_item {
     .list_item {
       margin: 20upx 0 0;
       margin: 20upx 0 0;
       position: relative;
       position: relative;
-      height: 210upx;
+      height: 380upx;
       width: 100vw;
       width: 100vw;
       background: #fff;
       background: #fff;
       display: flex;
       display: flex;
@@ -141,28 +146,52 @@ export default {
           padding: 20upx 35upx;
           padding: 20upx 35upx;
           position: absolute;
           position: absolute;
           top:40upx;
           top:40upx;
-          right:220upx;
+          right:30upx;
           background: #3385FF;
           background: #3385FF;
       }
       }
       .book-button{
       .book-button{
           display: inline-block;
           display: inline-block;
-          font-size: 28upx;
+          font-size: 25upx;
+          border-radius: 120upx;
+          padding: 15upx 30upx;
+          position: absolute;
+          top:250upx;
+          right:300upx;
+      }
+      .could-book{
           color: white;
           color: white;
-          border: 1px solid #3385FF;
-          border-radius: 110upx;
-          padding: 20upx 35upx;
-          background: #3385FF;
+          border: 1px solid #657cac;
+          background: #657cac;
+      }
+      .not-book{
+          color: white;
+          border: 1px solid #CCCCCC;
+          background: #CCCCCC;
+      }
+      .book-button-text{
           position: absolute;
           position: absolute;
-          top:40upx;
-          right:30upx;
+          top:330upx;
+          right:210upx;
+          .explain{
+            text-decoration: underline;
+          }
+      }
+      .could-book-text{
+          color:#666666;
+      }
+      .not-book-text{
+        color:#CCCCCC;
       }
       }
       & > .store_name {
       & > .store_name {
         margin-left: 30upx;
         margin-left: 30upx;
         width: 700upx;
         width: 700upx;
         display: block;
         display: block;
+        position: absolute;
+        top:50upx;
+        left: 0upx;
         image{
         image{
-          width:48upx;
-          height:48upx;
+          width:50upx;
+          height:50upx;
           border-radius:60upx;
           border-radius:60upx;
           float:left;
           float:left;
         }
         }
@@ -186,15 +215,16 @@ export default {
       }
       }
       & > .store_btn {
       & > .store_btn {
         position: absolute;
         position: absolute;
-        top:140upx;
+        top:150upx;
         left: 0upx;
         left: 0upx;
         & > .btn_entrance {
         & > .btn_entrance {
           display: inline-block;
           display: inline-block;
-          font-size: 26upx;
-          color: #666666;
-          padding: 10upx 20upx;
-          margin-left: 10upx;
-          text-decoration:underline;
+          font-size: 28upx;
+          color: #BBBBBB;
+          padding: 10upx 10upx;
+          margin-left: 22upx;
+          text-decoration: underline;
+          color:#666666;
         }
         }
       }
       }
       .fl_line {
       .fl_line {