Răsfoiți Sursa

组合开单

jf 5 ani în urmă
părinte
comite
13a2e68a07

+ 5 - 32
hdApp/src/admin/billing/affirm.vue

@@ -178,24 +178,17 @@ export default {
 				success: function (res) {
 				success: function (res) {
 					if (res.confirm) {
 					if (res.confirm) {
 						createOrder(options).then(res => {
 						createOrder(options).then(res => {
-							console.log('开单成功',res);
-							return;
 							// this.$msg("下单成功");
 							// this.$msg("下单成功");
-							this.resetSelectInfoByType(this.pageType);
+							self.resetSelectInfoByType(self.pageType);
 							const {
 							const {
-								data: { id, orderSn }
+								data: { orderId, orderSn }
 							} = res;
 							} = res;
 							// 如果是客户跳转到客户成功页pagesClient/official/clientApply   供货员工下单到 /admin/billing/result
 							// 如果是客户跳转到客户成功页pagesClient/official/clientApply   供货员工下单到 /admin/billing/result
 							let url =
 							let url =
-								this.getLoginInfo.identity == "1"
+								self.getLoginInfo.identity == "1"
 									? "pagesClient/official/clientApply"
 									? "pagesClient/official/clientApply"
-									: `/admin/billing/result?orderId=${id}&orderSn=${orderSn}`;
-							uni.redirectTo({
-								url: url,
-								success: result => {},
-								fail: () => {},
-								complete: () => {}
-							});
+									: `/admin/billing/result?orderId=${orderId}&orderSn=${orderSn}&type=zuhe`;
+							uni.redirectTo({url: url});
 						});
 						});
 					}
 					}
 				}
 				}
@@ -203,26 +196,6 @@ export default {
 		},
 		},
 
 
 
 
-		confirmFn(options) {
-			createOrder(options).then(res => {
-				// this.$msg("下单成功");
-				this.resetSelectInfoByType(this.pageType);
-				const {
-					data: { id, orderSn }
-				} = res;
-				// 如果是客户跳转到客户成功页pagesClient/official/clientApply   供货员工下单到 /admin/billing/result
-				let url =
-					this.getLoginInfo.identity == "1"
-						? "pagesClient/official/clientApply"
-						: `/admin/billing/result?orderId=${id}&orderSn=${orderSn}`;
-				uni.redirectTo({
-					url: url,
-					success: result => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			});
-		},
 
 
 		gobackEvent() {
 		gobackEvent() {
 			uni.navigateBack({
 			uni.navigateBack({

+ 95 - 11
hdApp/src/admin/billing/result.vue

@@ -1,25 +1,116 @@
+<style lang="scss" scoped>
+.admin-button-com {
+	margin-bottom: 20px;
+	width: 100%;
+}
+.zuhe-box{
+	width: 100%;
+	margin-top: 30rpx;
+	.zuhe-remark{
+		color: #868686;
+		font-size: 24rpx;
+	}
+	.zuhe-center{
+		margin-top: 20rpx;
+		font-size: 28rpx;
+		.zuhe-val{
+			position: relative;
+			width: 70%;
+			height: 60rpx;
+			padding: 10rpx;
+			border: 1px solid #868686;
+			&.active:before {
+				content: ' ';
+				height: 22px;
+				width: 22px;
+				border-width: 2px 2px 0 0;
+				border-color: #868686;
+				border-style: solid;
+				-webkit-transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
+				transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
+				position: absolute;
+				top: 50%;
+				margin-top: -12px;
+				right: 30rpx;
+			}
+		}
+	}
+}
+</style>
 <template>
 <template>
 	<appResult>
 	<appResult>
 <!--		<button class="admin-button-com blue big" @click="gotoOrderDetails">发货详情</button>-->
 <!--		<button class="admin-button-com blue big" @click="gotoOrderDetails">发货详情</button>-->
 		<button class="admin-button-com blue big" @click="gotoOrderSend">发货</button>
 		<button class="admin-button-com blue big" @click="gotoOrderSend">发货</button>
-
 <!--		<button class="admin-button-com big" @click="gotoOrderPrint">打印单据</button>-->
 <!--		<button class="admin-button-com big" @click="gotoOrderPrint">打印单据</button>-->
-		<button class="admin-button-com big" @click="gotoOrderDetails">订单详情</button>
-		<button class="admin-button-com big" @click="gotoOrderList">订单列表</button>
+<!--		<button class="admin-button-com big" @click="gotoOrderDetails">订单详情</button>-->
+<!--		<button class="admin-button-com big" @click="gotoOrderList">订单列表</button>-->
 		<button class="admin-button-com big" @click="gotoPlace">继续开单</button>
 		<button class="admin-button-com big" @click="gotoPlace">继续开单</button>
+
+		<view class="zuhe-box" v-if="option.type=='zuhe'">
+			<view class="" v-if="!isGroup">
+				<view class="zuhe-remark">保存此商品组合,以便下次取用:</view>
+				<view class="flex-space zuhe-center">
+					<view class="zuhe-title ">名称</view>
+					<input class="zuhe-val" type="text" placeholder="如:开业花篮(200)" v-model="name" placeholder-class="tui-placeholder">
+				</view>
+				<view class="flex-space zuhe-center">
+					<view class="zuhe-title ">所属分类</view>
+					<picker class="zuhe-val active" @change="selectType" :value="index" :range="type" range-key="categoryName">
+						<view class="uni-input">{{type[index].categoryName}}</view>
+					</picker>
+				</view>
+				<view class="flex-center" style="margin-top: 30rpx">
+					<button class="admin-button-com blue big" style="width: 40%;" @click="SubSaveItemGroup">保存</button>
+				</view>
+			</view>
+			<view style="text-align: center;color: #868686" v-else>
+					<view class="iconfont iconchenggong" style="color:#049E2C;margin-bottom:15rpx;font-size:80rpx;" ></view>
+				<view>保存成功,请在【开单 - 成品】查看</view>
+			</view>
+		</view>
 	</appResult>
 	</appResult>
 </template>
 </template>
 
 
 <script>
 <script>
 import appResult from "@/components/app-result";
 import appResult from "@/components/app-result";
+import { categoryListB,saveItemGroup } from "@/api/goods/index";
 export default {
 export default {
 	name: "BillingResult", // 开单结果
 	name: "BillingResult", // 开单结果
 	components: {
 	components: {
 		appResult
 		appResult
 	},
 	},
+	data(){
+		return {
+			name:'',
+			index:0,
+			type:[],
+			isGroup:false,
+		}
+	},
+	onShow(){
+		this.getCategoryList()
+	},
 	methods: {
 	methods: {
+		SubSaveItemGroup(){
+			let parameter = {
+				orderSn:this.option.orderSn,
+				name:this.name,
+				categoryId:this.type[this.index].id,
+			}
+			saveItemGroup(parameter).then(res=>{
+					this.isGroup = true;
+			})
+		},
+		getCategoryList(){
+			categoryListB().then(res => {
+				this.type = res.data;
+			})
+		},
+		selectType(e){
+			this.index = e.target.value
+		},
 		gotoOrderSend(){
 		gotoOrderSend(){
-			uni.navigateTo({url: `/pagesOrder/ship?id=${this.option.orderId}`});
+			uni.navigateTo({url: `/admin/order/ship?id=${this.option.orderId}&pageStatus=0`});
 		},
 		},
 		gotoOrderDetails() {
 		gotoOrderDetails() {
 			uni.navigateTo({url: `/pagesOrder/detail?id=${this.option.orderId}`});
 			uni.navigateTo({url: `/pagesOrder/detail?id=${this.option.orderId}`});
@@ -55,10 +146,3 @@ export default {
 	}
 	}
 };
 };
 </script>
 </script>
-
-<style lang="scss" scoped>
-.admin-button-com {
-	margin-bottom: 20px;
-	width: 100%;
-}
-</style>

+ 6 - 0
hdApp/src/api/goods/index.js

@@ -141,3 +141,9 @@ export const getRise = data => {
 export const updateRise = data => {
 export const updateRise = data => {
 	return https.post('/goods/update-rise', data)
 	return https.post('/goods/update-rise', data)
 }
 }
+/** *
+ * 保存花材组合
+ */
+export const saveItemGroup = data => {
+	return https.post('/goods/save-item-group', data)
+}