shish 4 лет назад
Родитель
Сommit
916655f175

+ 8 - 2
ghsApp/src/admin/home/apply.vue

@@ -49,16 +49,22 @@ export default {
                         {name: "采购统计",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/statistics/cgStat"},
                     ]
                 },
+                {
+                    title:'订单与销售',
+                    list:[
+                        {name: "预订单",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/shop/list"},
+                        {name: "预订设置",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/order/bookSet"},
+                    ]
+                },
                 {
                     title:'客户与门店',
                     list:[
                         {name: "门店",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/shop/list"},
-                        {name: "我的零售店",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/shop/sk"},
                         {name: "员工",img: `${this.$constant.imgUrl}/ghs/home/yggl.png`,url: "/admin/staff/list"},
                         {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/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"},
                     ]
                 },
                 {

+ 115 - 0
ghsApp/src/admin/order/bookSet.vue

@@ -0,0 +1,115 @@
+<template>
+  <view class="app-content">
+    <view>
+      <form @submit="formSubmit">
+        <view class="module-com input-line-wrap">
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">起订公斤数</view>
+            <input v-model="form.miniKilo" placeholder-class="phcolor" class="tui-input" name="miniKilo" placeholder="预订的最少公斤数" maxlength="50" type="number" />
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">每公斤服务费</view>
+            <input v-model="form.kiloFee" placeholder-class="phcolor" class="tui-input" name="kiloFee" placeholder="请填写" maxlength="50" type="text" />
+          </tui-list-cell>
+
+        </view>
+        <view class="confirm-btn">
+          <button class="admin-button-com big blue" formType="submit">
+            提交
+          </button>
+        </view>
+      </form>
+    </view>
+  </view>
+</template>
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import { bookSet,getInfo } from "@/api/shop";
+export default {
+  name: "bookSet",
+  components: {
+    TuiListCell
+  },
+  data() {
+    return {
+      form: {
+        kiloFee: "",
+        miniKilo: ""
+      }
+    };
+  },
+  onLoad() {
+  },
+  onShow() {
+  },
+  methods: {
+    async init() {
+      const { data } = await getInfo()
+      this.form.kiloFee = parseFloat(data.kiloFee)
+      this.form.miniKilo = parseFloat(data.miniKilo)
+      this.$forceUpdate()
+    },
+    confirmFn() {
+      bookSet(this.form).then((res) => {
+        this.$msg(res.msg);
+        if(res.code == 1){
+          setTimeout(() => {
+            uni.navigateBack();
+          }, 1000)
+        }
+      });
+    },
+    formSubmit(e) {
+      let rules = [
+        {
+          name: "miniKilo",
+          rule: ["required"],
+          msg: ["请填写起订公斤数"],
+        },
+        {
+          name: "kiloFee",
+          rule: ["required"],
+          msg: ["请填写每公斤服务费"],
+        },
+      ];
+      this.confirmFn();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.app-content {
+  min-height: calc(100vh - 20upx);
+  padding-top: 20upx;
+}
+.prompt-text {
+  color: $fontColor3;
+  padding-left: 30upx;
+  margin-bottom: 30upx;
+}
+.module-com {
+  margin-bottom: 20upx;
+  .member-wrap {
+    .member-det {
+      font-size: 24upx;
+      margin-left: 20upx;
+    }
+  }
+  .remark-wrap {
+    align-items: flex-start;
+    .remark {
+      height: 240upx;
+    }
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60upx);
+  margin: 60upx 30upx 20upx;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 5 - 0
ghsApp/src/api/order/index.js

@@ -13,6 +13,11 @@ export const getDetail = data => {
 	return https.get("/order/detail", data);
 };
 
+//到货前获取详情
+export const getArrivalDetail = data => {
+	return https.get("/order/arrival-detail", data);
+};
+
 /** *
 	* 损耗生成订单
 	*/

+ 9 - 0
ghsApp/src/api/shop/index.js

@@ -84,4 +84,13 @@ export const skCustomSet = data => {
 
 export const updateCgModel = data => {
 	return https.get('/shop/update-cg-model', data)
+}
+
+//预订设置
+export const bookSet = data => {
+	return https.get('/shop/book-set', data)
+}
+
+export const getInfo = data => {
+	return https.get('/shop/info', data)
 }

+ 3 - 1
ghsApp/src/pages.json

@@ -71,6 +71,7 @@
 			"root": "pagesOrder",
 			"pages": [
 				{"path": "detail","style": {"navigationBarTitleText": "订单详情", "enablePullDownRefresh": true}},
+				{"path": "arrival","style": {"navigationBarTitleText": "到货处理"}},
 				{"path": "refund","style": {"navigationBarTitleText": "退款"}},
 				{"path": "refundMsg","style": {"navigationBarTitleText": "退款"}},
 				{"path": "ship","style": {"navigationBarTitleText": "发货"}},
@@ -350,7 +351,8 @@
 		{
 			"root": "admin/order",
 			"pages": [
-				{"path": "itemOrder","style": {"navigationBarTitleText": "订单列表"}}
+				{"path": "itemOrder","style": {"navigationBarTitleText": "订单列表"}},
+				{"path": "bookSet","style": {"navigationBarTitleText": "预订设置"}}
 			]
 		},
 		{

+ 380 - 0
ghsApp/src/pagesOrder/arrival.vue

@@ -0,0 +1,380 @@
+<template>
+	<view class="app-content">
+		<view v-if="!$util.isEmpty(detailInfo)" class="info-content_box">
+			<view class="module-com content-box">
+				<view class="commodity-view">
+					<view class="commodity-list">
+						<view v-for="(s, idx) in detailInfo.product" :key="idx" class="commodity-item" >
+							<image class="item-icon" :src="s.cover" alt="" />
+							<view class="item-info">
+								<view class="info-line">
+									<text class="item-name">{{ s.name }}</text>
+									<text class="item-price">
+										<text class="unit"></text>
+										<text class="price"><text v-if="s.bigNum>0">{{s.bigNum}}扎</text></text>
+									</text>
+								</view>
+								<view class="info-line">
+									<text class="item-type">{{ s.property }}</text>
+									<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="成本" />
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="summary-bar">
+						<view class="operate-view" ></view>
+						<view class="describe-view">
+							合计 ¥<text class="price">{{ itemPrice }}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<view class="content-box price-detail">
+				<view class="module-com input-line-wrap">
+					<tui-list-cell class="line-cell" :hover="false">
+						<view class="tui-title">客户</view>
+						<view class="detail-price_box" style="font-size: 28upx;">{{ detailInfo.customName||'' }}</view>
+					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false">
+						<view class="tui-title">重量(公斤)</view>
+						<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>{{ totalWeight }}</text>
+						</view>
+					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false">
+						<view class="tui-title">每公斤服务费</view>
+						<view class="detail-price_box" style="font-size: 28upx;">¥{{ kiloFee ? parseFloat(kiloFee) : 0}}</view>
+					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false">
+						<view class="tui-title">本单服务费</view>
+						<view class="detail-price_box" style="font-size: 28upx;">¥{{totalKiloFee}}</view>
+					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false">
+						<view class="tui-title">商品金额</view>
+						<view class="detail-price_box" style="font-size: 28upx;">¥{{itemPrice}}</view>
+					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false">
+						<view class="tui-title">总计</view>
+						<view class="detail-price_box red" style="font-size: 28upx;">¥{{allPrice}}</view>
+					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false">
+						<view class="tui-title">预付金额</view>
+						<view class="detail-price_box red" style="font-size: 28upx;">¥{{ detailInfo.bookPrice ? parseFloat(detailInfo.bookPrice) : 0}}</view>
+					</tui-list-cell>
+
+					<tui-list-cell class="line-cell" :hover="false">
+						<view class="tui-title">结账</view>
+						<view class="detail-price_box" style="font-size: 28upx;color:green;" v-if="settlePrice > 0">退 ¥{{settlePrice}},确认后自动退款</view>
+						<view class="detail-price_box" style="font-size: 28upx;color:red;" v-else-if="settlePrice < 0">欠 ¥{{Math.abs(settlePrice)}},确认后变成欠款单</view>
+						<view class="detail-price_box" style="font-size: 28upx;" v-else>0</view>
+					</tui-list-cell>
+
+				</view>
+			</view>
+
+		</view>
+
+		<view class="app-footer">
+			<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>
+		</view>
+
+	</view>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import TuiListCell from "@/components/plugin/list-cell";
+import { getArrivalDetail } from "@/api/order/index";
+export default {
+	name: "arrival",
+	components: {
+		TuiListCell
+	},
+	mixins: [],
+	data() {
+		return {
+			detailInfo: {},
+			miniKilo:0,
+			kiloFee:0,
+			totalKiloFee:0,
+			itemPrice:0,
+			totalWeight:0,
+			settlePrice:0
+		};
+	},
+	onShow() {
+		this.init();
+	},
+	computed: {
+		...mapGetters({ loginInfo: "getLoginInfo" }),
+		allPrice() {
+			let price = 0
+			this.itemPrice = 0
+			this.totalWeight = 0
+			if (this.detailInfo && this.detailInfo.product) {
+				for (const item of this.detailInfo.product) {
+					if(item.currentCost){
+						//花材价格
+						let currentPrice = Number(item.bigNum) * Number(item.currentCost)
+						currentPrice = currentPrice.toFixed(2)
+						this.itemPrice = Number(this.itemPrice) + Number(currentPrice)
+						this.itemPrice.toFixed(2)
+
+						//总重量
+						let thisWeight = Number(item.unitWeight)*Number(item.bigNum)
+						this.totalWeight = Number(this.totalWeight)+Number(thisWeight)
+						this.totalWeight = parseFloat(this.totalWeight.toFixed(2))
+
+					}
+				}
+			}
+
+			//总服务费
+			let calcWeight = Number(this.totalWeight)>Number(this.miniKilo) ? Number(this.totalWeight) : this.miniKilo
+			this.totalKiloFee = Number(this.kiloFee)*calcWeight
+			this.totalKiloFee = parseFloat(this.totalKiloFee.toFixed(2))
+
+			//总计
+			price = Number(this.itemPrice) + Number(this.totalKiloFee)
+			price = parseFloat(price.toFixed(2))
+
+			this.settlePrice = Number(this.detailInfo.bookPrice) - Number(price)
+			this.settlePrice = parseFloat(this.settlePrice.toFixed(2))
+
+			return price
+		}
+	},
+	methods: {
+		async init() {
+			const res = await getArrivalDetail({
+				id: this.option.id
+			});
+			this.detailInfo = res.data;
+			this.miniKilo = res.data.miniKilo
+			this.kiloFee = res.data.kiloFee
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.info-content_box {
+	padding: 15upx 20upx 120upx;
+	& > .title {
+		color: #666666;
+		font-size: 28upx;
+		font-weight: 600;
+		padding: 30upx 3upx;
+	}
+	& .address-des_bx {
+		display: flex;
+		padding: 20upx 10upx 30upx 20upx;
+		& > view:nth-child(1) {
+			flex: 1;
+			margin-top: 10upx;
+			& > view:nth-child(1) {
+				color: #333333;
+				font-size: 32upx;
+				font-weight: bold;
+			}
+			& > view:nth-child(2) {
+				color: #666666;
+				font-size: 28upx;
+				font-weight: 400;
+				margin-top: 20upx;
+			}
+		}
+		& > view:nth-child(2) {
+			display: flex;
+			& .icondianhua1 {
+				font-size: 50upx;
+				color: #3385ff;
+				margin-left: 0upx;
+			}
+		}
+	}
+	.bills-info_box {
+		padding: 30upx 20upx 30upx;
+		& > .order-info_box {
+			display: flex;
+			align-items: center;
+			font-size: 26upx;
+			font-weight: 400;
+			margin-bottom: 5upx;
+			& > view:nth-child(1) {
+				color: #999999;
+				width: 135upx;
+				text-align: right;
+			}
+			& > view:nth-child(2) {
+				color: #333333;
+			}
+			& > .price {
+				flex: 1;
+				font-size: 30upx;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				& .iconxiangyou {
+					color: #999999;
+					font-size: 25upx;
+					margin-left: 12upx;
+				}
+			}
+		}
+	}
+	.content-box {
+		background-color: #ffffff;
+		border-radius: 10upx;
+	}
+	.commodity-view {
+		display: flex;
+		flex-direction: column;
+		.commodity-list {
+			padding: 20upx;
+			.commodity-item {
+				display: flex;
+				margin-bottom: 20upx;
+				.item-icon {
+					flex-shrink: 0;
+					width: 140upx;
+					height: 140upx;
+				}
+				.item-info {
+					display: flex;
+					flex-direction: column;
+					justify-content: center;
+					flex: 1;
+					margin-left: 20upx;
+					.info-line {
+						margin-bottom: 20upx;
+						display: flex;
+						justify-content: space-between;
+						align-items: flex-end;
+						.item-name {
+							color: black;
+							font-size: 30upx;
+							font-weight: 700;
+							overflow: hidden;
+							white-space: nowrap;
+							text-overflow: ellipsis;
+							width:360upx;
+						}
+						.item-price {
+							color: #333;
+							font-size: 22upx;
+							.price {
+								font-size:25upx;
+							}
+						}
+						.item-type {
+							color: #999;
+							font-size: 24upx;
+						}
+						.item-count {
+							color: #666;
+							font-size: 24upx;
+							width:380upx;
+							.price{
+								text-align: center;
+								width:150upx;
+								height:20upx;
+								border:1upx solid #cccccc;
+								float:right;
+								margin-right:30upx;
+							}
+							.num{
+								text-align: center;
+								width:150upx;
+								height:20upx;
+								border:1upx solid #cccccc;
+								float:right;
+							}
+						}
+					}
+				}
+			}
+		}
+		.summary-bar {
+			padding: 0 20upx;
+			height: 90upx;
+			display: flex;
+
+			align-items: center;
+			justify-content: space-between;
+			border-top: 1upx solid #eeeeee;
+			.operate-view {
+				display: flex;
+
+				align-items: center;
+				color: #3385ff;
+				font-size: 26upx;
+				.iconfont {
+					margin-right: 20upx;
+					font-size: 40upx;
+				}
+			}
+			.describe-view {
+				display: flex;
+
+				align-items: center;
+				color: #333;
+				font-size: 24upx;
+				.price {
+					font-weight: bold;
+					font-size: 28upx;
+				}
+			}
+		}
+	}
+	.shipping-address {
+		display: flex;
+		align-items: center;
+		margin-top: 20upx;
+		& > view:nth-child(1) {
+			color: #999999;
+			font-size: 28upx;
+			font-weight: 400;
+			display: inline-block;
+			padding: 30upx 0 30upx 20upx;
+			flex: 1;
+			& > text {
+				color: #333333;
+				font-weight: 600;
+			}
+		}
+		& > view:nth-child(2) {
+			font-size: 60upx;
+			color: #d6e7ff;
+			margin-right: 10upx;
+		}
+	}
+	.price-detail {
+		margin-top: 20upx;
+		margin-bottom: 20upx;
+	}
+	.detail-price_box {
+		color: #333333;
+		font-size: 22upx;
+		text-align: right;
+		flex: 1;
+		font-weight: 600;
+		&.red {
+			color: #ff2842;
+		}
+	}
+}
+.app-footer {
+  justify-content: space-evenly;
+  z-index: 9999;
+  .admin-button-com {
+    width: 46%;
+  }
+}
+</style>

+ 5 - 2
ghsApp/src/pagesOrder/detail.vue

@@ -87,7 +87,7 @@
 				<view>结算状态:</view>
 					<view style="color:red;font-weight:bold;">欠款</view>
 					<view class="price">
-						<text v-if="detailInfo.debtAmount > 0" @click='pageTo({url:"/pagesArrears/details",query: {id: detailInfo.customId}})' style="margin-right:60upx;color:#3385FF;font-size:26upx;">全部欠款单</text>
+						<text v-if="detailInfo.debtAmount > 0" @click='pageTo({url:"/pagesArrears/details",query: {id: detailInfo.customId}})' style="margin-right:60upx;color:#3385FF;font-size:26upx;">所有欠款单</text>
 						<button @click="settleOrder(detailInfo)" class="admin-button-com">结清本单</button>
 					</view>
 				</view>
@@ -195,7 +195,7 @@
 					<div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.kiloFee ? parseFloat(detailInfo.kiloFee) : 0}}</div>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">服务费合计</div>
+					<div class="tui-title">本单服务费</div>
 					<div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.allKiloFee ? parseFloat(detailInfo.allKiloFee) : 0}}</div>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
@@ -391,6 +391,9 @@ export default {
 					self.freeShipModalClick()
 				})
 				this.freeShipModal = true;
+			}else if(s.type === 'arrival'){
+				//到货
+				this.pageTo({url: "/pagesOrder/arrival",query: {id: item.id}});
 			} else if (s.type === "print") {
 				if(item.hasCloudPrint == 1){
 					//云打印

+ 1 - 1
ghsApp/src/pagesPurchase/info.vue

@@ -65,7 +65,7 @@
 				<view>结算状态:</view>
 					<view style="color:red;">欠款</view>
 					<view class="price">
-					<text v-if="detailInfo.debtAmount > 0" @click="goToClear(detailInfo)" style="margin-right:38upx;color:#3385FF;font-size:26upx;">全部欠款单</text>
+					<text v-if="detailInfo.debtAmount > 0" @click="goToClear(detailInfo)" style="margin-right:38upx;color:#3385FF;font-size:26upx;">所有欠款单</text>
 					<button @click="clearOrder(detailInfo)" class="admin-button-com">结清本单</button>
 					</view>
 				</view>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
ghsPad/dist/dev/app-plus/app-config-service.js


+ 1 - 1
hdApp/src/pagesPurchase/purDetails.vue

@@ -201,7 +201,7 @@
             <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.kiloFee ? parseFloat(detailInfo.kiloFee) : 0}}</div>
           </tui-list-cell>
           <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title">服务费合计</div>
+            <div class="tui-title">本单服务费</div>
             <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.allKiloFee ? parseFloat(detailInfo.allKiloFee) : 0}}</div>
           </tui-list-cell>
           <tui-list-cell class="line-cell" :hover="false">

Некоторые файлы не были показаны из-за большого количества измененных файлов