Parcourir la source

花材选择优化

zhengxin il y a 5 ans
Parent
commit
5fbb0e153a

+ 8 - 6
ghs/src/admin/billing/affirm.vue

@@ -25,10 +25,10 @@
 										</text>
 									</view>
 									<view class="info-line">
-										<text class="item-type">b级</text>
+										<text class="item-type">{{ item.rank }}级</text>
 										<text class="item-count">
-											<text v-if="item.bigCount > 0">{{ `${item.bigCount}/` }}</text>
-											<text>{{ item.smallCount }}</text>
+											<text v-if="item.bigCount > 0">{{ `${item.bigCount}` }}</text>
+											<text v-if="smallCount > 0">{{ `/${smallCount}` }}</text>
 										</text>
 									</view>
 								</view>
@@ -147,7 +147,7 @@ export default {
 		}
 	},
 	computed: {
-		...mapGetters(["getMerchantInfo",'getLoginInfo']),
+		...mapGetters(["getMerchantInfo", "getLoginInfo"])
 	},
 	methods: {
 		...mapActions(["initMerchantInfo"]),
@@ -178,14 +178,16 @@ export default {
 					data: { orderId, orderSn }
 				} = res;
 				// 如果是客户跳转到客户成功页pagesClient/official/clientApply   供货员工下单到 /admin/billing/result
-				let url = this.getLoginInfo.identity == '1'?'pagesClient/official/clientApply': `/admin/billing/result?orderId=${orderId}&orderSn=${orderSn}`
+				let url =
+					this.getLoginInfo.identity == "1"
+						? "pagesClient/official/clientApply"
+						: `/admin/billing/result?orderId=${orderId}&orderSn=${orderSn}`;
 				uni.redirectTo({
 					url: url,
 					success: result => {},
 					fail: () => {},
 					complete: () => {}
 				});
-				
 			});
 		},
 		// 表单验证

+ 2 - 2
ghs/src/components/module/app-commodity.vue

@@ -15,8 +15,8 @@
 						v-if="bigCount > 0 || smallCount > 0"
 					></i>
 					<text class="num" @click="customNum" v-if="bigCount > 0 || smallCount > 0">
-						<text v-if="bigCount > 0">{{ `${bigCount}/` }}</text>
-						<text>{{ smallCount }}</text>
+						<text v-if="bigCount > 0">{{ `${bigCount}` }}</text>
+						<text v-if="smallCount > 0">{{ `/${smallCount}` }}</text>
 					</text>
 					<i class="iconfont icontianjia" @click="addEvent"></i>
 				</view>

+ 3 - 1
ghs/src/mixins/product.js

@@ -141,7 +141,8 @@ export default {
 				});
 				this.productInfo = data;
 				this.classIndex = 0;
-			} catch (error) {}finally{
+			} catch (error) {
+			} finally {
 				uni.hideLoading();
 			}
 		},
@@ -255,6 +256,7 @@ export default {
 						) {
 							list[index].bigCount = Number(item.bigNum);
 							list[index].smallCount = Number(item.smallNum);
+							this.$msg("库存不足");
 						}
 					}
 

+ 416 - 411
ghs/src/pagesOrder/detail.vue

@@ -1,443 +1,448 @@
 <template>
-    <view class="app-content">   
-       <stepStatus 
-        v-if="!$util.isEmpty(detailInfo)"
-        :stepOptions="detailInfo.progress"></stepStatus>
-       <view 
-            v-if="!$util.isEmpty(detailInfo)"
-            class="info-content_box">
-           <view class="title">
-               客户
-           </view>
-           <view class="address-des_bx content-box">
-            <view>
-                <view>
-                  {{detailInfo.customName}} {{detailInfo.customMobile}}
-                </view>
-                <view class="">
-                  {{detailInfo.customAddress + detailInfo.receiveAddress}}
-                </view>
-            </view>
-            <view>
-              <i @click="callUp(detailInfo.customMobile)" class="iconfont icondianhua1"></i>
-            </view>
-          </view>
-           <view class="title">
-               单据信息
-           </view>
-           <view class="bills-info_box content-box">
-               <view class="order-info_box">
-                  <view>日期:</view>
-                  <view>{{detailInfo.addTime}}</view>
-              </view>
-               <view class="order-info_box">
-                  <view>单号编码:</view>
-                  <view>{{detailInfo.orderSn}}</view>
-                  <view class="price">
-                      <button 
-                        @click="copy(detailInfo.orderSn)"
-                        class="admin-button-com default">复制</button>
-                  </view>
-              </view>
-              <view class="order-info_box">
-                  <view>销售人员:</view>
-                  <view>{{detailInfo.adminName}}</view>
-              </view>
-              <!-- <view class="order-info_box">
+	<view class="app-content">
+		<stepStatus
+			v-if="!$util.isEmpty(detailInfo)"
+			:stepOptions="detailInfo.progress"
+		></stepStatus>
+		<view v-if="!$util.isEmpty(detailInfo)" class="info-content_box">
+			<view class="title">
+				客户
+			</view>
+			<view class="address-des_bx content-box">
+				<view>
+					<view> {{ detailInfo.customName }} {{ detailInfo.customMobile }} </view>
+					<view class="">
+						{{ detailInfo.customAddress + detailInfo.receiveAddress }}
+					</view>
+				</view>
+				<view>
+					<i
+						@click="callUp(detailInfo.customMobile)"
+						class="iconfont icondianhua1"
+					></i>
+				</view>
+			</view>
+			<view class="title">
+				单据信息
+			</view>
+			<view class="bills-info_box content-box">
+				<view class="order-info_box">
+					<view>日期:</view>
+					<view>{{ detailInfo.addTime }}</view>
+				</view>
+				<view class="order-info_box">
+					<view>单号编码:</view>
+					<view>{{ detailInfo.orderSn }}</view>
+					<view class="price">
+						<button
+							@click="copy(detailInfo.orderSn)"
+							class="admin-button-com default"
+						>
+							复制
+						</button>
+					</view>
+				</view>
+				<view class="order-info_box">
+					<view>销售人员:</view>
+					<view>{{ detailInfo.adminName }}</view>
+				</view>
+				<!-- <view class="order-info_box">
                   <view>销售部门:</view>
                   <view>2020 11-22</view>
               </view> -->
-              <view class="order-info_box">
-                  <view>出货日期:</view>
-                  <view>{{detailInfo.outTime}}</view>
-              </view>
-              <!-- <view class="order-info_box">
+				<view class="order-info_box">
+					<view>出货日期:</view>
+					<view>{{ detailInfo.outTime }}</view>
+				</view>
+				<!-- <view class="order-info_box">
                   <view>销售门店:</view>
                   <view>2020 11-22</view>
               </view> -->
-           </view>
-           <view class="content-box shipping-address">
-               <view>
-                   配送进展:<text>骑手已接单,取货中</text>
-               </view>
-               <i class="iconfont iconqishouyinying"></i>
-           </view>
-           <view class="title">
-               商品信息
-           </view>
-           <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>
+			<view class="content-box shipping-address">
+				<view> 配送进展:<text>骑手已接单,取货中</text> </view>
+				<i class="iconfont iconqishouyinying"></i>
+			</view>
+			<view class="title">
+				商品信息
+			</view>
+			<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>
+							<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">{{s.price}}</text>
-                                    </text>
-                                </view>
-                                <view class="info-line">
-                                    <text class="item-type">{{s.price}}</text>
-                                    <text class="item-count">{{`${s.bigNum}/${s.smallNum}`}}</text>
-                                </view>
-                            </view>
-                        </view>
-                    </view>
-                    <view class="summary-bar">
-                        <view class="operate-view">
-                            <text class="iconfont icongouwuche"></text>
-                            重选花材
-                        </view>
-                        <view class="describe-view">
-                            共{{detailInfo.product.length || 0}}种, 共{{detailInfo.num}}扎{{detailInfo.smallNum}}支,合计 ¥<text class="price">{{detailInfo.actPrice}}</text>
-                        </view>
-                    </view>
-                </view>
+										<text class="price">{{ s.price }}</text>
+									</text>
+								</view>
+								<view class="info-line">
+									<text class="item-type">{{ s.price }}</text>
+									<text class="item-count">{{ `${s.bigNum}/${s.smallNum}` }}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="summary-bar">
+						<view class="operate-view">
+							<text class="iconfont icongouwuche"></text>
+							重选花材
+						</view>
+						<view class="describe-view">
+							共{{ detailInfo.product.length || 0 }}种, 共{{ detailInfo.num }}扎{{
+								detailInfo.smallNum
+							}}支,合计 ¥<text class="price">{{ detailInfo.actPrice }}</text>
+						</view>
+					</view>
+				</view>
 			</view>
-            <view class="content-box price-detail">
-                <div class="module-com input-line-wrap">
-                    <tui-list-cell class="line-cell" :hover="false">
-                        <div class="tui-title">运费</div>
-                        <div class="detail-price_box">¥{{detailInfo.sendCost}}</div>
-                    </tui-list-cell>
-                    <tui-list-cell class="line-cell" :hover="false">
-                        <div class="tui-title">总金额</div>
-                        <div class="detail-price_box red">¥{{detailInfo.totalPrice || 0}}</div>
-                    </tui-list-cell>
-                </div>
-            </view>
-            <view class="content-box price-detail">
-                <div class="module-com input-line-wrap">
-                    <tui-list-cell class="line-cell" :hover="false">
-                        <div class="tui-title">备注</div>
-                        <input 
-                            :disabled="true"
-                            v-model="detailInfo.remark" placeholder-class="phcolor" class="tui-input" name="name" maxlength="50" type="text" />
-                    </tui-list-cell>
-                </div>
-            </view>
-       </view>
-       <div class="app-footer">
-           <template
-                v-for="s in detailInfo.buttonList"   
-              >
-           <button
-                :key="s.type"
-                @click="openBt(s,detailInfo)"
-                v-if="s.disable == 1"
-                class="admin-button-com default" >
-                {{s.type==='item'?'花材':s.type==='selfGet'?'自取':'发货'}}
-            </button>
-        </template>
-       </div>
-       <!-- 免发货弹窗 -->
-        <modal-module
-        :show="freeShipModal"
-        @cancel="modalCancel"
-        @click="freeShipModalClick"
-        content="确认已自取?"
-        color="#333"
-        :size="32"
-        padding="30rpx 30rpx"
-        ></modal-module>
-    </view>
+			<view class="content-box price-detail">
+				<div class="module-com input-line-wrap">
+					<tui-list-cell class="line-cell" :hover="false">
+						<div class="tui-title">运费</div>
+						<div class="detail-price_box">¥{{ detailInfo.sendCost }}</div>
+					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false">
+						<div class="tui-title">总金额</div>
+						<div class="detail-price_box red">¥{{ detailInfo.totalPrice || 0 }}</div>
+					</tui-list-cell>
+				</div>
+			</view>
+			<view class="content-box price-detail">
+				<div class="module-com input-line-wrap">
+					<tui-list-cell class="line-cell" :hover="false">
+						<div class="tui-title">备注</div>
+						<input
+							:disabled="true"
+							v-model="detailInfo.remark"
+							placeholder-class="phcolor"
+							class="tui-input"
+							name="name"
+							maxlength="50"
+							type="text"
+						/>
+					</tui-list-cell>
+				</div>
+			</view>
+		</view>
+		<div class="app-footer">
+			<template v-for="s in detailInfo.buttonList">
+				<button
+					:key="s.type"
+					@click="openBt(s, detailInfo)"
+					v-if="s.disable == 1"
+					class="admin-button-com default"
+				>
+					{{ s.type === "item" ? "花材" : s.type === "selfGet" ? "自取" : "发货" }}
+				</button>
+			</template>
+		</div>
+		<!-- 免发货弹窗 -->
+		<modal-module
+			:show="freeShipModal"
+			@cancel="modalCancel"
+			@click="freeShipModalClick"
+			content="确认已自取?"
+			color="#333"
+			:size="32"
+			padding="30rpx 30rpx"
+		></modal-module>
+	</view>
 </template>
 
 <script>
-    import stepStatus from './components/stepStatus'
-    import TuiListCell from '@/components/plugin/list-cell'
-    import { getDetail,freeShipping } from '@/api/order/index'
-    export default {
-        name:'orderDetail',
-        components:{
-            stepStatus,
-            TuiListCell
-        },
-        data(){
-            return {
-                stepActive: 0,
-                form: {
-                    name:''
-                },
-                detailInfo:{},
-                freeShipModal: false,
-            }
-        },
-        methods:{
-            freeShipModalClick(e){
-                if (e.index === 0) {
-                    this.modalCancel();
-                } else {
-                    freeShipping({ id: this.detailInfo.id }).then(res => {
-                    this.init();
-                    this.$msg("操作成功!");
-                    this.modalCancel();
-                    });
-                }
-            },
-            modalCancel(){
-                this.freeShipModal = false
-            },
-            openBt(s,item) {
-                    // 花材
-                    if(s.item === 'item') {
-
-                        // 自取
-                    }else if(s.item === 'selfGet') {
-                        this.freeShipModal = true;
-                        // this.operateData = item;
-                        //发货 
-                    }else if(s.item === 'send') {
-                        this.pageTo({
-                        url: '/pagesOrder/ship',
-                            query: {
-                            id: item.id
-                            }
-                        })
-                    }
-            },
-            copy(val){
-               const self = this
-                uni.setClipboardData({
-                    data: val,
-                    success: function() {
-                        self.$msg('复制成功')
-                    }
-                })
-            },
-            callUp(mobile) {
-                uni.makePhoneCall({
-                    phoneNumber: mobile //仅为示例
-                });
-            },
-            async  init() {
-                 try {
-                  const res = await getDetail({
-                         id: this.option.id
-                     })
-                    this.detailInfo = res.data
-                 } finally {
+import stepStatus from "./components/stepStatus";
+import TuiListCell from "@/components/plugin/list-cell";
+import { getDetail, freeShipping } from "@/api/order/index";
+import productMins from "@/mixins/product";
 
-                 }
-            }
-        }
-    }
+export default {
+	name: "orderDetail",
+	components: {
+		stepStatus,
+		TuiListCell
+	},
+	mixins: [productMins],
+	data() {
+		return {
+			pageType: "order_change",
+			autoLoad: false,
+			stepActive: 0,
+			form: {
+				name: ""
+			},
+			detailInfo: {},
+			freeShipModal: false
+		};
+	},
+	methods: {
+		freeShipModalClick(e) {
+			if (e.index === 0) {
+				this.modalCancel();
+			} else {
+				freeShipping({ id: this.detailInfo.id }).then(res => {
+					this.init();
+					this.$msg("操作成功!");
+					this.modalCancel();
+				});
+			}
+		},
+		modalCancel() {
+			this.freeShipModal = false;
+		},
+		openBt(s, item) {
+			// 花材
+			if (s.item === "item") {
+				// 自取
+			} else if (s.item === "selfGet") {
+				this.freeShipModal = true;
+				// this.operateData = item;
+				//发货
+			} else if (s.item === "send") {
+				this.pageTo({
+					url: "/pagesOrder/ship",
+					query: {
+						id: item.id
+					}
+				});
+			}
+		},
+		copy(val) {
+			const self = this;
+			uni.setClipboardData({
+				data: val,
+				success: function() {
+					self.$msg("复制成功");
+				}
+			});
+		},
+		callUp(mobile) {
+			uni.makePhoneCall({
+				phoneNumber: mobile //仅为示例
+			});
+		},
+		async init() {
+			try {
+				const res = await getDetail({
+					id: this.option.id
+				});
+				this.detailInfo = res.data;
+			} finally {
+			}
+		}
+	}
+};
 </script>
 
 <style lang="scss" scoped>
-    .info-content_box {
-        padding: 0 20px 100px;
-        & > .title {
-            color: #666666;
-            font-size: 28px;
-            font-weight: 600;
-            padding:30px 3px;
-        }
-        & .address-des_bx {
-            display: flex;
-            padding: 20px 10px 30px 20px;
-            & > view:nth-child(1) {
-            flex: 1;
-            margin-top: 10px;
-            & > view:nth-child(1) {
-                color: #333333;
-                font-size: 32px;
-                font-weight: bold;
-            }
-            & > view:nth-child(2) {
-                color: #666666;
-                font-size: 28px;
-                font-weight: 400;
-                margin-top: 20px;
-                
-            }
-        }
-    & > view:nth-child(2) {
-      display: flex;
-      & .icondianhua1 {
-          font-size: 44px;
-          color: #3385FF;
-          margin-left: 10px;
-        }
-    }
-        }
-        .bills-info_box {
-            padding:30px 20px 30px;
-            // border-bottom: 1px solid #EEEEEE;
-            & > .order-info_box {
-            display: flex;
-            align-items: center;
-            font-size: 26px;
-            font-weight: 400;
-            margin-bottom: 5px;
-            & > view:nth-child(1) {
-                color: #999999;
-                width: 135px;
-                text-align: right;
-            }
-            & > view:nth-child(2) {
-                color: #333333;
-            }
-            & > .price {
-                flex: 1;
-                font-size: 30px;
-                color: #333333;
-                display: flex;
-                align-items: center;
-                justify-content: flex-end;
-                & .iconxiangyou {
-                color: #999999;
-                font-size: 25px;
-                margin-left: 12px;
-                }
-            }
-            }
-         }
-        .content-box {
-          background-color: #FFFFFF;  
-          border-radius: 10px;
-        }
-        .commodity-view {
+.info-content_box {
+	padding: 0 20px 100px;
+	& > .title {
+		color: #666666;
+		font-size: 28px;
+		font-weight: 600;
+		padding: 30px 3px;
+	}
+	& .address-des_bx {
+		display: flex;
+		padding: 20px 10px 30px 20px;
+		& > view:nth-child(1) {
+			flex: 1;
+			margin-top: 10px;
+			& > view:nth-child(1) {
+				color: #333333;
+				font-size: 32px;
+				font-weight: bold;
+			}
+			& > view:nth-child(2) {
+				color: #666666;
+				font-size: 28px;
+				font-weight: 400;
+				margin-top: 20px;
+			}
+		}
+		& > view:nth-child(2) {
 			display: flex;
-			flex-direction: column;
-			.commodity-list {
-				padding: 20px;
-				.commodity-item {
+			& .icondianhua1 {
+				font-size: 44px;
+				color: #3385ff;
+				margin-left: 10px;
+			}
+		}
+	}
+	.bills-info_box {
+		padding: 30px 20px 30px;
+		// border-bottom: 1px solid #EEEEEE;
+		& > .order-info_box {
+			display: flex;
+			align-items: center;
+			font-size: 26px;
+			font-weight: 400;
+			margin-bottom: 5px;
+			& > view:nth-child(1) {
+				color: #999999;
+				width: 135px;
+				text-align: right;
+			}
+			& > view:nth-child(2) {
+				color: #333333;
+			}
+			& > .price {
+				flex: 1;
+				font-size: 30px;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				& .iconxiangyou {
+					color: #999999;
+					font-size: 25px;
+					margin-left: 12px;
+				}
+			}
+		}
+	}
+	.content-box {
+		background-color: #ffffff;
+		border-radius: 10px;
+	}
+	.commodity-view {
+		display: flex;
+		flex-direction: column;
+		.commodity-list {
+			padding: 20px;
+			.commodity-item {
+				display: flex;
+				margin-bottom: 20px;
+				.item-icon {
+					flex-shrink: 0;
+					width: 140px;
+					height: 140px;
+				}
+				.item-info {
 					display: flex;
-					margin-bottom: 20px;
-					.item-icon {
-						flex-shrink: 0;
-						width: 140px;
-						height: 140px;
-					}
-					.item-info {
+					flex-direction: column;
+					justify-content: center;
+					flex: 1;
+					margin-left: 20px;
+					.info-line {
+						margin-bottom: 20px;
 						display: flex;
-						flex-direction: column;
-						justify-content: center;
-						flex: 1;
-						margin-left: 20px;
-						.info-line {
-							margin-bottom: 20px;
-							display: flex;
-							justify-content: space-between;
-							align-items: flex-end;
-							.item-name {
-								color: #666;
-								font-size: 28px;
-							}
-							.item-price {
-								color: #333;
-								font-size: 22px;
-								.price {
-									font-size: 32px;
-									font-weight: bold;
-								}
-							}
-							.item-type {
-								color: #999;
-								font-size: 24px;
-							}
-							.item-count {
-								color: #666;
-								font-size: 24px;
+						justify-content: space-between;
+						align-items: flex-end;
+						.item-name {
+							color: #666;
+							font-size: 28px;
+						}
+						.item-price {
+							color: #333;
+							font-size: 22px;
+							.price {
+								font-size: 32px;
+								font-weight: bold;
 							}
 						}
+						.item-type {
+							color: #999;
+							font-size: 24px;
+						}
+						.item-count {
+							color: #666;
+							font-size: 24px;
+						}
 					}
 				}
 			}
-			.summary-bar {
-				padding: 0 20px;
-				height: 90px;
+		}
+		.summary-bar {
+			padding: 0 20px;
+			height: 90px;
+			display: flex;
+
+			align-items: center;
+			justify-content: space-between;
+			border-top: 1px solid #eeeeee;
+			.operate-view {
 				display: flex;
 
 				align-items: center;
-				justify-content: space-between;
-				border-top: 1px solid #eeeeee;
-				.operate-view {
-					display: flex;
-
-					align-items: center;
-					color: #3385ff;
-					font-size: 26px;
-					.iconfont {
-						margin-right: 20px;
-						font-size: 40px;
-					}
+				color: #3385ff;
+				font-size: 26px;
+				.iconfont {
+					margin-right: 20px;
+					font-size: 40px;
 				}
-				.describe-view {
-					display: flex;
+			}
+			.describe-view {
+				display: flex;
 
-					align-items: center;
-					color: #333;
-					font-size: 24px;
-					.price {
-						font-weight: bold;
-						font-size: 36px;
-					}
+				align-items: center;
+				color: #333;
+				font-size: 24px;
+				.price {
+					font-weight: bold;
+					font-size: 36px;
 				}
 			}
-        }
-        .shipping-address {
-            display: flex;
-            align-items: center;
-            margin-top: 20px;
-            & > 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: 60px;
-                color: #D6E7FF;
-                margin-right: 10px;
-            }
-        }
-        .price-detail {
-            margin-top: 20px;
-            margin-bottom: 20px;
-        }
-        .detail-price_box {
-            color: #333333;
-            font-size: 22px;
-            text-align: right;
-            flex: 1;
-            font-weight: 600;
-            &.red {
-                color: #FF2842;
-            }
-        }
-        
-    }
-    .app-footer {
-        display: flex;
-        align-items: center;
-        justify-content: flex-end;
-        & .admin-button-com {
-            padding:0;
-            margin-right: 15px;
-            width: 140px;
-            height: 70px;
-            line-height: 70px;
-            text-align: center;
-        }
-        }
-</style>
+		}
+	}
+	.shipping-address {
+		display: flex;
+		align-items: center;
+		margin-top: 20px;
+		& > 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: 60px;
+			color: #d6e7ff;
+			margin-right: 10px;
+		}
+	}
+	.price-detail {
+		margin-top: 20px;
+		margin-bottom: 20px;
+	}
+	.detail-price_box {
+		color: #333333;
+		font-size: 22px;
+		text-align: right;
+		flex: 1;
+		font-weight: 600;
+		&.red {
+			color: #ff2842;
+		}
+	}
+}
+.app-footer {
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+	& .admin-button-com {
+		padding: 0;
+		margin-right: 15px;
+		width: 140px;
+		height: 70px;
+		line-height: 70px;
+		text-align: center;
+	}
+}
+</style>

+ 376 - 0
ghs/src/pagesOrder/select.vue

@@ -0,0 +1,376 @@
+<template>
+	<view class="billing_box_bg">
+		<app-tabs
+			:tabs="tabs"
+			:currentTab="tabIndex"
+			@change="change"
+			itemWidth="50%"
+		/>
+		<view class="input-wrap">
+			<app-search-module
+				v-model="py"
+				placeholder="请输入关键词"
+				@search="searchFn"
+			/>
+		</view>
+		<view class="scroll-middle_bx">
+			<scroll-view
+				scroll-y
+				scroll-with-animation
+				class="tab-view"
+				:scroll-top="scrollTop"
+			>
+				<div
+					v-for="(item, index) in filterProductInfo"
+					:key="index"
+					class="tab-bar-item"
+					:class="[classIndex == index ? 'active' : '']"
+					:data-current="index"
+					@tap.stop="swichClass"
+				>
+					<text>{{ item.className || "" }}</text>
+					<text
+						class="tag"
+						v-if="
+							getSelectClassById(item.classId).bigCount > 0 ||
+								getSelectClassById(item.classId).smallCount > 0
+						"
+					>
+						<text v-if="getSelectClassById(item.classId).bigCount > 0">
+							{{ `${getSelectClassById(item.classId).bigCount}/` }}
+						</text>
+						<text>{{ getSelectClassById(item.classId).smallCount }}</text>
+					</text>
+				</div>
+			</scroll-view>
+
+			<scroll-view
+				scroll-y
+				class="right-box"
+				v-if="tabIndex == 0"
+				:scroll-into-view="scrollClassId"
+			>
+				<!--内容部分 start -->
+				<block v-if="!$util.isEmpty(filterProductInfo)">
+					<view
+						class="item_list_bx"
+						v-for="(classItem, classIndex) in filterProductInfo"
+						:key="classIndex"
+						:id="`class_${classItem.classId}`"
+					>
+						<view class="item_list_title">
+							{{ classItem.className }}
+						</view>
+						<template v-for="(productItem, productIndex) in classItem.child">
+							<Commondity
+								:id="`class_${classItem.classId}_${productItem.id}`"
+								:key="productIndex"
+								:info="productItem"
+								:bigCount="
+									getSelectItemById(productItem.id, classItem.classId).bigCount
+								"
+								:smallCount="
+									getSelectItemById(productItem.id, classItem.classId).smallCount
+								"
+								@customNum="customNum"
+								@add="addEvent"
+								@del="delEvent"
+							></Commondity>
+							<!-- <Commondity
+							:type="COMMODITY_TYPE.CHANGE"
+							@customNum="customNum"
+						></Commondity> -->
+						</template>
+					</view>
+				</block>
+				<block v-else>
+					<app-wrapper-empty
+						title="暂无数据"
+						:is-empty="$util.isEmpty(filterProductInfo)"
+					/>
+				</block>
+				<!--内容部分 end -->
+			</scroll-view>
+			<block v-else>
+				<view style="width:100%">
+					<AppWrapperEmpty title="敬请期待" :is-empty="true" />
+				</view>
+			</block>
+		</view>
+		<!-- :maskClosable="false" -->
+		<modal-module
+			:show="isModel"
+			@cancel="modalCancel"
+			@click="affirm"
+			:title="customData.itemName"
+			color="#333"
+			:size="32"
+			padding="30rpx 30rpx"
+		>
+			<template slot="customContent">
+				<view class="select-cmd_bx" v-if="customData">
+					<view class="kc"> 库存{{ customData.stock }} </view>
+					<view class="num_bx">
+						<input v-model="customData.bigCount" type="number" focus />扎
+						<input
+							v-model="customData.smallCount"
+							type="number"
+							style="margin-left:24upx"
+						/>支
+					</view>
+				</view>
+			</template>
+		</modal-module>
+		<modal-module
+			:show="showSubmitModel"
+			@cancel="cancelEvent"
+			@click="submitEvent"
+			:title="confirmContent"
+			color="#333"
+			:size="32"
+			padding="30rpx 30rpx"
+		>
+		</modal-module>
+		<FooterCart
+			:price="allPrice"
+			:count="allCount"
+			@confirm="confirmSelectEvent"
+		></FooterCart>
+	</view>
+</template>
+
+<script>
+import AppSearchModule from "@/components/module/app-search";
+import AppTabs from "@/components/plugin/tabs";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import Commondity from "@/components/module/app-commodity";
+import FooterCart from "@/components/module/app-footer-cart";
+import ModalModule from "@/components/plugin/modal";
+
+import { COMMODITY_TYPE } from "@/utils/declare";
+import productMins from "@/mixins/product";
+export default {
+	name: "Billing", // 开单
+	components: {
+		AppTabs,
+		AppSearchModule,
+		AppWrapperEmpty,
+		Commondity,
+		ModalModule,
+		FooterCart
+	},
+	mixins: [productMins],
+	data() {
+		return {
+			pageType: "order_change",
+			COMMODITY_TYPE,
+			tabIndex: 0,
+			tabs: [
+				{
+					name: "花材"
+				},
+				{
+					name: "成品"
+				}
+				// {
+				//     name: '课程'
+				// },
+			],
+			isModel: false,
+			customData: {
+				bigCount: 0,
+				smallCount: 0
+			},
+			showSubmitModel: false
+		};
+	},
+	computed: {
+		confirmContent() {
+			let content = "确认下一步?";
+			if (this.hasNoStock) {
+				content = "有花材库存不足,确认下一步?";
+			}
+			return content;
+		}
+	},
+	onUnload() {
+		this.resetSelectInfoByType(this.pageType);
+	},
+
+	methods: {
+		//自定义数量
+		customNum(info) {
+			this.isModel = true;
+			this.customData = info;
+		},
+		modalCancel() {
+			this.isModel = false;
+			this.customData = {};
+		}, // 取消 确认
+		affirm(val) {
+			if (val.index === 0) {
+				this.modalCancel();
+			} else {
+				const {
+					bigCount,
+					smallCount,
+					bigNum,
+					bigUnit,
+					smallNum,
+					smallUnit,
+					ratio
+				} = this.customData;
+				const ratioNum = Number(ratio);
+
+				//超过库存时 设置为库存最大值
+				if (
+					Number(bigCount) * ratioNum + Number(smallCount) >
+					Number(bigNum) * ratioNum + Number(smallNum)
+				) {
+					uni.showToast({
+						title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,
+						icon: "none"
+					});
+					this.customData.bigCount = bigNum;
+					this.customData.smallCount = smallNum;
+				} else {
+					this.updateItemEvent(this.customData);
+					this.modalCancel();
+				}
+			}
+		},
+		cancelEvent() {
+			this.showSubmitModel = false;
+		},
+		submitEvent(val) {
+			if (val.index === 0) {
+				this.cancelEvent();
+			} else {
+				console.log(444, this.selectList);
+				uni.navigateTo({
+					url: "/admin/billing/affirm"
+				});
+				this.cancelEvent();
+			}
+		},
+		confirmSelectEvent() {
+			if (this.selectList.length > 0) {
+				uni.navigateTo({
+					url: "/admin/billing/affirm"
+				});
+			} else {
+				this.$msg("请选择花材");
+			}
+		},
+		change(e) {
+			if (this.tabIndex == e.index) {
+				return false;
+			} else {
+				this.tabIndex = e.index;
+			}
+		},
+		scrollTop() {}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.billing_box_bg {
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.input-wrap {
+		padding: 22px 20px 22px 30px;
+	}
+	.scroll-middle_bx {
+		flex: 1;
+		display: flex;
+		width: 100%;
+		height: 100%;
+		overflow: hidden;
+	}
+	.tab-view {
+		height: 100%;
+		width: 170upx;
+		flex-shrink: 0;
+		background-color: #f0f2f6;
+		.tab-bar-item {
+			position: relative;
+			width: 170upx;
+			height: 90upx;
+			box-sizing: border-box;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			font-size: 26upx;
+			color: #444;
+			font-weight: 400;
+			.tag {
+				display: flex;
+				padding: 0 20px;
+				align-items: center;
+				position: absolute;
+				right: 0;
+				top: 0;
+				height: 32px;
+				background: #ff2842;
+				border-radius: 16px;
+				color: #fff;
+				font-size: 20px;
+			}
+		}
+
+		.active {
+			position: relative;
+			color: $mainColor;
+			font-size: 26px;
+			background: #fff;
+		}
+
+		.active::before {
+			content: "";
+			position: absolute;
+			border-left: 8upx solid $mainColor;
+			height: 100%;
+			left: 0;
+		}
+	}
+	.right-box {
+		height: 100%;
+		flex: 1;
+		box-sizing: border-box;
+	}
+	.item_list_bx {
+		padding: 40px 16px;
+	}
+	.item_list_title {
+		margin-bottom: 20px;
+		font-size: 24px;
+		font-weight: 600;
+		color: #666666;
+	}
+	.select-cmd_bx {
+		& .kc {
+			color: #999999;
+			font-size: 28px;
+			font-weight: 400;
+			margin-bottom: 60px;
+			text-align: center;
+			margin-top: 10px;
+		}
+		& .num_bx {
+			display: flex;
+			align-items: center;
+			margin-bottom: 80px;
+			& > input {
+				width: 212px;
+				height: 80px;
+				border: 1px solid #dddddd;
+				border-radius: 4px;
+				text-align: center;
+				margin-right: 24px;
+			}
+		}
+	}
+}
+</style>

+ 2 - 2
ghs/src/pagesPurchase/components/CommodityPurchase.vue

@@ -18,8 +18,8 @@
 						v-if="bigCount > 0 || smallCount > 0"
 					></i>
 					<text class="num" @click="customNum" v-if="bigCount > 0 || smallCount > 0">
-						<text v-if="bigCount > 0">{{ `${bigCount}/` }}</text>
-						<text>{{ smallCount }}</text>
+						<text v-if="bigCount > 0">{{ `${bigCount}` }}</text>
+						<text v-if="smallCount > 0">{{ `/${smallCount}` }}</text>
 					</text>
 					<i class="iconfont icontianjia" @click="addEvent"></i>
 				</view>

+ 2 - 2
ghs/src/pagesPurchase/details.vue

@@ -25,8 +25,8 @@
 									<view class="info-line">
 										<text class="item-type">b级</text>
 										<text class="item-count">
-											<text v-if="item.bigCount > 0">{{ `${item.bigCount}/` }}</text>
-											<text>{{ item.smallCount }}</text>
+											<text v-if="item.bigCount > 0">{{ `${item.bigCount}` }}</text>
+											<text v-if="item.smallCount > 0">{{ `/${item.smallCount}` }}</text>
 										</text>
 									</view>
 								</view>

+ 2 - 2
ghs/src/pagesStorehouse/allot/addExDetails.vue

@@ -74,8 +74,8 @@
 									</view>
 								</view>
 								<view v-else-if="column.custom == 'excount'">
-									<text v-if="item.bigCount > 0">{{ `${item.bigCount}/` }}</text>
-									<text>{{ item.smallCount }}</text>
+									<text v-if="item.bigCount > 0">{{ `${item.bigCount}` }}</text>
+									<text v-if="item.smallCount > 0">{{ `/${item.smallCount}` }}</text>
 								</view>
 								<view v-else>
 									{{ item[column.dataIndex] || "" }}

+ 107 - 0
ghs/src/pagesStorehouse/components/CommodityStock.vue

@@ -0,0 +1,107 @@
+<template>
+	<view class="item-cmd_bx">
+		<view class="img_bx">
+			<app-img
+				src="https://img.huaml.com/uploads/12358/202005/29/de74c55596d304b85e79154958e8bf57_small.jpeg"
+				alt="商品图"
+				mode="aspectFit"
+				:height="160"
+			/>
+		</view>
+		<view class="cmd-info_bx">
+			<view class="tit">天使美人</view>
+			<view class="kc">B级</view>
+			<view class="num-open_bx">
+				<view class="price"><text class="unit">¥</text><text>42</text></view>
+
+				<view :class="['open-bx', { light: type == STOCK_TYPE.WARN }]">
+					库存2/5
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { STOCK_TYPE } from "@/utils/declare";
+import AppImg from "@/components/app-img";
+export default {
+	name: "Commodity",
+	components: {
+		AppImg
+	},
+	props: {
+		type: {
+			type: String,
+			default: STOCK_TYPE.WARN
+		}
+	},
+	data() {
+		return {
+			STOCK_TYPE
+		};
+	},
+	methods: {
+		customNum() {
+			this.$emit("customNum");
+		},
+		addEvent() {
+			this.$emit("add");
+		},
+		subtractEvent() {
+			this.$emit("subtract");
+		},
+		delEvent() {
+			this.$emit("del");
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.item-cmd_bx {
+	position: relative;
+	margin-bottom: 20px;
+	.img_bx {
+		height: 160px;
+		width: 160px;
+		position: absolute;
+		left: 0px;
+		top: 0px;
+	}
+	.cmd-info_bx {
+		padding-left: 177px;
+		& .tit {
+			font-size: 28px;
+			font-weight: 400;
+			color: #333333;
+			padding-top: 10px;
+		}
+		& .kc {
+			color: #999999;
+			font-size: 24px;
+			padding: 10px 0 24px;
+		}
+		& .num-open_bx {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			& .price {
+				font-size: 32upx;
+				color: #333;
+				.unit {
+					font-size: 22upx;
+				}
+			}
+			& .open-bx {
+				display: flex;
+				align-items: center;
+				font-size: 32upx;
+				&.light {
+					color: $redColor;
+				}
+			}
+		}
+	}
+}
+</style>

+ 2 - 2
ghs/src/pagesStorehouse/inventory/update.vue

@@ -107,8 +107,8 @@
 									<text>{{ item.smallNum }}</text>
 								</view>
 								<view v-else-if="column.custom == 'inventory'">
-									<text v-if="item.bigCount > 0">{{ `${item.bigCount}/` }}</text>
-									<text>{{ item.smallCount }}</text>
+									<text v-if="item.bigCount > 0">{{ `${item.bigCount}` }}</text>
+									<text v-if="item.smallCount > 0">{{ `/${item.smallCount}` }}</text>
 								</view>
 
 								<view v-else-if="column.custom == 'profit'">