shish 3 лет назад
Родитель
Сommit
6e0509013a
2 измененных файлов с 36 добавлено и 62 удалено
  1. 18 56
      hdApp/src/admin/billing/affirm.vue
  2. 18 6
      hdApp/src/admin/billing/index.vue

+ 18 - 56
hdApp/src/admin/billing/affirm.vue

@@ -1,18 +1,12 @@
 <template>
 	<view class="affirm-page">
 		<view class="affirm-view overscroll">
-			<!-- 门店信息 -->
 			<form>
 				<view class="module-com">
 					<view class="commodity-view">
 						<view class="commodity-list">
-							<view
-								class="commodity-item"
-								v-for="(item, index) in selectList"
-								:key="index"
-							>
+							<view class="commodity-item" v-for="(item, index) in selectList" :key="index" >
 								<image class="item-icon" :src="item.cover" alt="商品图" />
-
 								<view class="item-info">
 									<view class="info-line">
 										<text class="item-name">{{ item.itemName }}</text>
@@ -27,9 +21,7 @@
 									<view class="info-line">
 										<text class="item-type">{{ item.rank }}级</text>
 										<text class="item-count">
-											<text v-if="item.bigCount > 0 || item.smallCount > 0">{{
-												`${item.bigCount}`
-											}}</text>
+											<text v-if="item.bigCount > 0 || item.smallCount > 0">{{ `${item.bigCount}` }}</text>
 											<text v-if="item.smallCount > 0">/</text>
 											<text v-if="item.smallCount > 0">{{ item.smallCount }}</text>
 										</text>
@@ -40,17 +32,16 @@
 						<view class="summary-bar">
 							<view class="operate-view" @click="gobackEvent">
 								<text class="iconfont icongouwuche"></text>
-								重选花材
+								返回修改
 							</view>
 							<view class="describe-view">
-								共{{ allCount.bigLength }}/{{ allCount.smallLength }}种,
-								<!-- 共16扎9支, -->
-								合计 ¥<text class="price">{{ allPrice }}</text>
+								共<text v-if="Number(allCount.bigLength)>0">{{ allCount.bigLength }}扎</text>
+								<text v-if="Number(allCount.smallLength)>0">{{ allCount.smallLength }}支</text>,
+								合计<text class="price">¥{{ allPrice }}</text>
 							</view>
 						</view>
 					</view>
 				</view>
-				<!-- 登录信息 -->
 				<view class="module-com input-line-wrap">
 					<tui-list-cell class="line-cell" :hover="false" :arrow="true">
 						<view class="tui-title ">客户</view>
@@ -60,8 +51,8 @@
 
 					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
 						<view class="tui-title ">付款方式</view>
-						<button class="admin-button-com mini-btn" :class="payType==res.id?'blue':'default'" style="margin-right: 10upx"
-														@tap="payType=res.id"  v-for="(res,i) in getDictionariesInfo.htPayWayOption" :key="i">
+						<button class="admin-button-com mini-btn" :class="payType==res.id?'blue':'default'" 
+						style="margin-right: 10upx" @tap="payType=res.id"  v-for="(res,i) in getDictionariesInfo.htPayWayOption" :key="i">
 							{{ res.name }}
 						</button>
 					</tui-list-cell>
@@ -107,9 +98,6 @@
 						<view class="tui-title">优惠</view>
 						<text style="color: #3385FF">{{	((allPrice+Number(packingMoney)+Number(freight)).toFixed(2) - modifyPrice).toFixed(2) }}</text>
 					</tui-list-cell>
-
-
-<!--					<appFormSend :form.sync="form"> </appFormSend>-->
 				</view>
 			</form>
 		</view>
@@ -117,11 +105,10 @@
 			<view class="price-view">
 				<text class="price-title">收款</text>
 				<text class="price-number">
-					<!--¥ <text class="large">{{	(allPrice+Number(packingMoney)+Number(freight)).toFixed(2)  }}</text>-->
 					¥ <text class="large">{{ modifyPrice }}</text>
 				</text>
 			</view>
-			<button class="admin-button-com blue middle" @click="affirmFormSubmit">开单</button>
+			<button class="admin-button-com blue big" @click="affirmFormSubmit">开单</button>
 		</view>
 		<!-- 选择客户 -->
 		<AppCustomerSel :show.sync="showCustomer" @change="changeCustomerFn" />
@@ -138,14 +125,11 @@ import productMins from "@/mixins/product";
 import appFormRadioBtn from "@/components/app-formRadio-btn";
 import appAddressGroup from "@/components/app-address-group";
 import appSendTime from "@/components/app-send-time";
-import appFormSend from "@/components/app-form-send";
 const formUtil = require("@/utils/formValidation.js");
-import { createOrder,freight } from "@/api/order/index";
-// import { freight } from "@/api/order";
+import { createOrder } from "@/api/order/index";
 import { mapActions, mapGetters } from "vuex";
-
 export default {
-	name: "BillingAffirm", // 开单确认
+	name: "affirm",
 	components: {
 		TuiListCell,
 		AppAvatarModule,
@@ -154,8 +138,7 @@ export default {
 		AppCustomerSel,
 		appFormRadioBtn,
 		appAddressGroup,
-		appSendTime,
-		appFormSend
+		appSendTime
 	},
 	mixins: [productMins],
 	data() {
@@ -169,7 +152,7 @@ export default {
 			showCustomer: false,
 			sendType:1,
 			discountIndex:0,
-			discount:['打折','95折','9折','85折','8折','75折','7折','65折','6折']
+			discount:['打折','95折','9折','85折','8折','75折','7折','65折','6折']
 		};
 	},
 	onLoad() {
@@ -238,9 +221,6 @@ export default {
 		},
 		//确定开单
 		affirmFormSubmit(){
-			// if(this.clientInfo==''){uni.showToast({title:'请选择客户!',icon:'none'});return;}
-			if(this.packingMoney==''){uni.showToast({title:'请输入包装费!',icon:'none'});return;}
-			if(this.payType==null){uni.showToast({title:'请选择结算方式!',icon:'none'});return;}
 			const product = this.selectList.map(ele => {
 				return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
 			});
@@ -261,21 +241,15 @@ export default {
 				success: function (res) {
 					if (res.confirm) {
 						createOrder(options).then(res => {
-							// this.$msg("下单成功");
 							self.resetSelectInfoByType(self.pageType);
-							const {
-								data: { orderId, orderSn }
-							} = res;
+							const { data: { orderId, orderSn } } = res
 							let url = `/admin/billing/result?orderId=${orderId}&orderSn=${orderSn}&type=zuhe`;
-							uni.redirectTo({url: url});
+							uni.redirectTo({url: url})
 						});
 					}
 				}
 			});
 		},
-
-
-
 		gobackEvent() {
 			uni.navigateBack({
 				delta: 1
@@ -294,12 +268,10 @@ export default {
 	height: 100%;
 	display: flex;
 	flex-direction: column;
-
 	.affirm-view {
 		flex: 1;
 		padding: 20upx;
 		background-color: #f0f2f6;
-
 		.commodity-view {
 			display: flex;
 			flex-direction: column;
@@ -352,16 +324,15 @@ export default {
 				padding: 0 20upx;
 				height: 90upx;
 				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: 26upx;
+					font-size: 30upx;
+					font-weight:bold;
 					.iconfont {
 						margin-right: 20upx;
 						font-size: 40upx;
@@ -380,11 +351,9 @@ export default {
 				}
 			}
 		}
-
 		.module-com {
 			background-color: #fff;
 			margin-bottom: 20upx;
-
 			border-radius: 10upx;
 			overflow: hidden;
 			.member-wrap {
@@ -399,12 +368,6 @@ export default {
 					height: 240upx;
 				}
 			}
-			// .tui-placeholder,
-			// .tui-input {
-			// 	padding-right: 30upx;
-			// 	width: 100%;
-			// 	text-align: right;
-			// }
 		}
 	}
 	.under-bar {
@@ -415,7 +378,6 @@ export default {
 		width: 100%;
 		height: 100upx;
 		background-color: #fff;
-
 		box-shadow: 0upx -1px 6upx 0upx rgba(4, 0, 0, 0.06);
 		.price-view {
 			display: flex;
@@ -437,4 +399,4 @@ export default {
 		}
 	}
 }
-</style>
+</style>

+ 18 - 6
hdApp/src/admin/billing/index.vue

@@ -26,8 +26,7 @@
 							<view style="height: 160upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
 								<Commondity v-if="classItem.isActive"
 									:offVerifyRepertory = 'true'
-									:info="productItem" :bigCount=" getSelectItemById(productItem.id, classItem.classId).bigCount "
-									:smallCount=" getSelectItemById(productItem.id, classItem.classId).smallCount "
+									:info="productItem"
 									:checkStock="true"
 									:selectJobType="selectJobType"
 									@showAddModelFn="showAddModelFn"
@@ -48,8 +47,19 @@
 				<view class="select-cmd_bx" v-if="customData">
 					<view class="kc"> 库存 {{ customData.stock?parseFloat(customData.stock):0 }} </view>
 					<view class="num_bx">
-						<input v-model="customData.bigCount" :focus="isFocus"  type="number" />扎
-						<input v-model="customData.smallCount" type="number" style="margin-left:24upx" />支
+						<!-- #ifdef APP-PLUS -->
+						<input style="width: 260upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">{{customData.bigUnit}}</text>
+						<input style="width: 260upx" v-model="customData.smallCount" v-if="globalUnitType == 1" type="number" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">{{customData.smallUnit}}</text>
+						<!-- #endif -->
+						<!-- #ifdef MP-WEIXIN -->
+						<input style="width: 260upx" v-model="customData.bigCount" v-if="globalUnitType == 0" :focus="isAddInputFocus" type="number" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">{{customData.bigUnit}}</text>
+						<input style="width: 260upx" v-model="customData.smallCount" v-if="globalUnitType == 1" :focus="isAddInputFocus" type="number" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">{{customData.smallUnit}}</text>
+						<!-- #endif -->
+						<image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" style="width:86upx;height:86upx;" mode="widthFix"></image>
 					</view>
 				</view>
 			</template>
@@ -273,11 +283,13 @@ export default {
 		& .num_bx {
 			display: flex;
 			align-items: center;
-			margin-bottom: 80upx;
+			margin-bottom: 40upx;
+			justify-content:center;
+			padding-left:70upx;
 			& > input {
 				width: 212upx;
 				height: 80upx;
-				border: 1px solid #dddddd;
+				border: 1upx solid #dddddd;
 				border-radius: 4upx;
 				text-align: center;
 				margin-right: 24upx;