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

+ 2 - 8
ghsApp/src/admin/billing/affirm.vue

@@ -19,15 +19,9 @@
                     </text>
                   </view>
                   <view class="info-line">
-                    <text class="item-type">{{ item.rank }}级</text>
+                    <text class="item-type"></text>
                     <text class="item-count">
-                      <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 v-if="item.bigCount > 0">{{`${item.bigCount}`}}扎</text>
                     </text>
                   </view>
                 </view>

+ 7 - 11
ghsApp/src/admin/billing/index.vue

@@ -62,11 +62,10 @@
 				<view class="select-cmd_bx" v-if="customData">
 					<view class="kc"><text class="unit_price">库存 {{ customData.stock }}</text><text class="unit_price"> 单价 {{ customData.price }}</text>1扎={{customData.ratio}}支</view>
 					<view class="num_bx">
-						<input v-model="customData.bigCount" @input="countPrice" :focus="isFocus" type="number" />扎
-						<input v-model="customData.smallCount" @input="countPrice" type="number" style="margin-left:24upx" />支
+						<input v-model="customData.bigCount" style="width: 495rpx" :focus="isFocus" type="number" />扎
 					</view>
 					<view class="num_bx">
-						<input style="width: 495rpx" v-model="customData.userPrice" @focus="customData.userPrice = null" type="number" placeholder="金额" />
+						<input style="width: 495rpx" v-model="customData.userPrice" @focus="customData.userPrice = null" type="number" placeholder="单价" />
 						<text>元</text>
 					</view>
 				</view>
@@ -165,7 +164,6 @@ export default {
 						bigCount: null, //扎数
 						smallCount: null, //支数
 						autoPrice: null, //调价价格
-						realityWeight: null, //调价价格
 						userPrice: null, //调价价格
 					};
 					list.push(params);
@@ -197,12 +195,6 @@ export default {
 				this.$util.pageTo({url: "/admin/item/xj",query: {stock:info.stock,price: info.price,customId:this.option.customId,userPrice:info.userPrice}})
 			}
 		},
-		countPrice() {
-			let price = 0;
-			price += this.customData.bigCount * Number(this.customData.bigPrice);
-			price += this.customData.smallCount * Number(this.customData.smallPrice);
-			this.customData.userPrice = price.toFixed(2)
-		},
 		//自定义数量
 		customNum(info) {
 			this.isModel = true;
@@ -211,7 +203,11 @@ export default {
 			this.$nextTick(()=>{
 				this.customData.smallCount =	this.customData.smallCount==0?null:this.customData.smallCount;
 				this.customData.bigCount =	this.customData.bigCount==0?null:this.customData.bigCount;
-				this.customData.userPrice =	this.customData.userPrice==0?null:this.customData.userPrice;
+				if(this.customData.userPrice == null || this.customData.userPrice == 0){
+					this.customData.userPrice =	this.customData.bigPrice;
+				}else{
+					this.customData.userPrice =	this.customData.userPrice;
+				}
 				this.isFocus = true;
 			})
 		},

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

@@ -65,7 +65,7 @@
             <view class="order-info_box">
               <view>开单:</view>
               <view v-if="item.shopAdminId > 0">{{ item.shopAdminName}}</view>
-              <view v-else>{{item.customName}}-{{item.customShopAdminName}}</view>
+              <view v-else>{{item.customShopAdminName}}</view>
             </view>
             <view class="order-info_box">
               <view>数量:</view>

+ 0 - 1
ghsApp/src/mixins/allMoreSelectInput.js

@@ -16,7 +16,6 @@ export default {
 			let smallCount = this.customData.smallCount;
 			let bigCount = this.customData.bigCount;
 			let weight = this.customData.weight;
-			this.customData.realityWeight = (smallCount * weight / ratio + bigCount * weight).toFixed(2)
 		},
 		// 离开全选input
 		moveAllInput(e){

+ 3 - 7
ghsApp/src/mixins/product.js

@@ -48,7 +48,7 @@ export default {
 				for (const item of this.selectList) {
 					const itemInfo = this.getSelectItemById(item.id, item.classId);
 					if (itemInfo &&!this.$util.isEmpty(itemInfo.itemPrice)) {
-						price += Number(itemInfo.itemPrice);
+						price += Number(itemInfo.itemPrice)*Number(itemInfo.bigCount);
 					}
 				}
 			}
@@ -61,7 +61,7 @@ export default {
 					const itemInfo = this.getSelectItemById(item.id, item.classId);
 					if (itemInfo && !this.$util.isEmpty(itemInfo.bigPrice) && !this.$util.isEmpty(itemInfo.smallPrice)) {
 						if(item.userPrice>0){
-							price += Number(item.userPrice);
+							price += Number(item.bigCount) * Number(itemInfo.userPrice);
 						}else{
 							price += item.bigCount * Number(itemInfo.bigPrice);
 							price += item.smallCount * Number(itemInfo.smallPrice);
@@ -170,7 +170,6 @@ export default {
 
 							child.classId = element.classId;
 							child.className = element.className;
-							child.realityWeight = 0;
 							child.userPrice = 0;
 						});
 				});
@@ -425,7 +424,6 @@ export default {
 					bigCount: null, //扎数
 					smallCount: null, //支数
 					autoPrice: null, //调价价格
-					realityWeight: null, //调价价格
 					userPrice: null, //调价价格
 				};
 				list.push(params);
@@ -519,7 +517,6 @@ export default {
 						) {
 							list[index].bigCount = Number(item.bigNum);
 							list[index].smallCount = Number(item.smallNum);
-							list[index].realityWeight = Number(item.realityWeight),
 							list[index].userPrice = Number(item.userPrice),
 							list[index].itemPrice = item.itemPrice?Number(item.itemPrice):'';
 						}
@@ -529,7 +526,6 @@ export default {
 						...element,
 						bigCount: Number(item.bigCount),
 						smallCount: Number(item.smallCount),
-						realityWeight: Number(item.realityWeight),
 						userPrice: Number(item.userPrice),
 						itemPrice: item.itemPrice?Number(item.itemPrice):''
 					};
@@ -537,7 +533,7 @@ export default {
 					break;
 				}
 			}
-			console.log('更新1',list)
+
 			this.setSelectInfoByType({ type: this.pageType, info: list });
 
 			//记忆已经选择的花材

+ 1 - 1
ghsApp/src/pagesClient/member/detail.vue

@@ -45,7 +45,7 @@
                 <view>
                   {{userInfo.name}} {{userInfo.mobile}}
                 </view>
-                <view style="margin-bottom:14rpx;color:#333333">店长:{{userInfo.superInfo.name}}</view>
+                <view style="margin-bottom:20rpx;color:#333333">店长:{{userInfo.superInfo.name}}</view>
                 <view>
                   {{userInfo.address}}
                 </view>

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

@@ -5,9 +5,10 @@
 			<view class="title">
 				客户
 			</view>
-			<view class="address-des_bx content-box" @click='pageTo({url:"/pagesArrears/details",query: {id: detailInfo.customId}})'>
+			<view class="address-des_bx content-box" @click='pageTo({url:"/pagesClient/member/detail",query: {id: detailInfo.customId}})'>
 				<view>
 					<view> {{ detailInfo.customName }} {{ detailInfo.customMobile }} </view>
+					<view style="margin-bottom:20rpx;color:#333333"">店长:{{ detailInfo.customSuper.name}}</view>
 					<view>{{ detailInfo.customAddress}}</view>
 				</view>
 				<view>
@@ -24,12 +25,16 @@
 					<view>{{ detailInfo.addTime }}</view>
 				</view>
 				<view class="order-info_box">
-					<view>单号编码:</view>
+					<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.cgInfo.orderSn }}</view>
+				</view>
 				<view class="order-info_box">
 					<view>开单员:</view>
 					<view>{{ detailInfo.shopAdminName }}</view>

+ 4 - 38
ghsApp/src/pagesPurchase/add.vue

@@ -46,7 +46,6 @@
 								:bigCount=" getSelectItemById(productItem.id, classItem.classId).bigCount"
 								:smallCount="getSelectItemById(productItem.id, classItem.classId).smallCount"
 								:itemPrice="getSelectItemById(productItem.id, classItem.classId).itemPrice"
-								:realityWeight="getSelectItemById(productItem.id, classItem.classId).realityWeight"
 								@customNum="customNum"
 								@add="addEvent"
 								@addOneEvent="addCustomNumEvent"
@@ -79,24 +78,14 @@
 				<view class="select-view">
 					<view class="select-cmd_bx">
 						<view class="num_bx">
-							<view class="kc">
-								数量
-							</view>
-							<input v-model="customData.bigCount" :focus="isFocus" @input="countWeight" type="number"  />扎
-							<input v-model="customData.smallCount" @input="countWeight" type="number" style="margin-left:24upx"/>支
-						</view>
-					</view>
-					<view class="select-cmd_bx">
-						<view class="num_bx">
-							<view class="kc">总价</view>
-							<input v-model="customData.itemPrice" @focus="customData.itemPrice = null" type="number" placeholder="采购金额" />
-							<text style="margin-left: 20rpx">元</text>
+							<view class="kc">数量</view>
+							<input v-model="customData.bigCount" :focus="isFocus" type="number" placeholder="扎" />
 						</view>
 					</view>
 					<view class="select-cmd_bx">
 						<view class="num_bx">
-							<view class="kc">重量</view>
-							<input readonly v-model="customData.realityWeight" @focus="customData.realityWeight = null" type="number" placeholder="公斤" />
+							<view class="kc">单价</view>
+							<input v-model="customData.itemPrice" @focus="customData.itemPrice = null" type="number" placeholder="元" />
 						</view>
 					</view>
 				</view>
@@ -144,7 +133,6 @@ export default {
 				smallCount: null,
 				itemPrice: null,
 				weight:null,
-				realityWeight:null,
 			},
 			autoLoad: false, //不自动请求数据  自定义请求
 		};
@@ -166,14 +154,6 @@ export default {
 		this.initData({ type, shopId: this.shopId,status:0});
 	},
 	methods: {
-		// 计算重量
-		countWeight(){
-			let ratio = this.customData.ratio;
-			let smallCount = this.customData.smallCount;
-			let bigCount = this.customData.bigCount;
-			let weight = this.customData.weight;
-			this.customData.realityWeight = (smallCount * weight / ratio + bigCount * weight).toFixed(2)
-		},
 		// 离开全选input alone
 		moveAloneAllInput(e){
 			this.isAloneAllActive=false;
@@ -181,13 +161,6 @@ export default {
 			if(e==''){return}
 			this.customData.itemPrice = e;
 		},
-		// 公斤离开全选input alone
-		moveWeightAllInput(e){
-			this.isWeightActive=false;
-			this.isWeightFocus=false;
-			if(e==''){return}
-			this.customData.realityWeight = e;
-		},
 		//input点击删除按键
 		deleteAloneInputVal(){
 			this.isAloneAllActive=false;
@@ -196,7 +169,6 @@ export default {
 		//input重量点击删除按键
 		deleteWeightInputVal(){
 			this.isWeightActive=false;
-			this.customData.realityWeight = '';
 		},
 		//自定义数量
 		customNum(info) {
@@ -205,7 +177,6 @@ export default {
 			this.isFocus = false;
 			this.$nextTick(()=>{
 				this.customData.itemPrice = 	this.customData.itemPrice==0?null:this.customData.itemPrice;
-				this.customData.realityWeight = 	this.customData.realityWeight==0?null:this.customData.realityWeight;
 				this.customData.smallCount = 	this.customData.smallCount==0?null:this.customData.smallCount;
 				this.customData.bigCount = 	this.customData.bigCount==0?null:this.customData.bigCount;
 				this.isFocus = true;
@@ -257,11 +228,6 @@ export default {
 					}
 				}
 
-				if(this.customData.realityWeight<=0){
-					uni.showToast({title:"请输入花材重量",icon:"none"})
-					return;
-				}
-				// delAllEvent
 				//超过库存时 设置为库存最大值
 				this.updateItemEvent(this.customData);
 				this.modalCancel();

+ 2 - 7
ghsApp/src/pagesPurchase/components/CommodityPurchase.vue

@@ -81,9 +81,6 @@ export default {
     itemPrice: {
       type: Number,
       default: null
-    },realityWeight: {
-      type: Number,
-      default: null
     },
   },
   data () {
@@ -128,8 +125,7 @@ export default {
           ...this.info,
           bigCount: this.bigCount,
           smallCount: this.smallCount,
-          itemPrice: this.itemPrice,
-										realityWeight: this.realityWeight
+          itemPrice: this.itemPrice
         };
         this.$emit("addOneEvent", this.info, params, 'noAdd');
       }
@@ -137,8 +133,7 @@ export default {
         ...this.info,
         bigCount: this.bigCount,
         smallCount: this.smallCount,
-        itemPrice: this.itemPrice,
-								realityWeight: this.realityWeight
+        itemPrice: this.itemPrice
       });
     }
   }

+ 12 - 19
ghsApp/src/pagesPurchase/details.vue

@@ -13,18 +13,13 @@
 										<text class="item-name">{{ item.itemName }}</text>
 										<text class="item-price">
 											<text class="unit">¥</text>
-
-											<text class="price">{{
-												item.itemPrice || getSelectItemPrice(item)
-											}}</text>
+											<text class="price">{{item.itemPrice || getSelectItemPrice(item)}}</text>
 										</text>
 									</view>
 									<view class="info-line">
 										<text class="item-type"></text>
 										<text class="item-count">
-											<text >{{`${item.bigCount}`}}</text>
-											<text >/</text>
-											<text >{{ `${item.smallCount}` }}</text>
+											<text >{{`${item.bigCount}`}}扎</text>
 										</text>
 									</view>
 								</view>
@@ -32,13 +27,10 @@
 						</view>
 						<view class="summary-bar">
 							<view class="operate-view" @click="gobackEvent">
-								<text class="iconfont icongouwuche"></text>
-								重选花材
+								<text class="iconfont icongouwuche"></text>重选花材
 							</view>
 							<view class="describe-view">
-								共{{ selectList.length }}种,
-								<!-- 共16扎9支, -->
-								合计 {{`${selectAllRealityWeight}kg`}} ¥{{ selectAllPrice }}
+								共{{ selectList.length }}种,合计 ¥{{ selectAllPrice }}
 							</view>
 						</view>
 					</view>
@@ -106,6 +98,10 @@
 						<view class="tui-title ">总运费</view>
 						<view>{{totalFreight}}</view>
 					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false">
+						<view class="tui-title ">总重量</view>
+						<view>{{calcTotalWeight}}</view>
+					</tui-list-cell>
 					<tui-list-cell class="line-cell" :hover="false">
 						<view class="tui-title ">每公斤运费</view>
 						<view>{{perKgFreight}}</view>
@@ -199,7 +195,7 @@ export default {
 				console.log(this.selectList,'selectList')
 				for (const item of this.selectList) {
 					if (item.itemPrice) {
-						price += Number(item.itemPrice);
+						price += Number(item.itemPrice)*Number(item.bigCount);
 					} else {
 						price += this.getSelectItemPrice(item);
 					}
@@ -209,13 +205,11 @@ export default {
 			this.totalPrice = price.toFixed(2);
 			return price.toFixed(2);
 		},
-		selectAllRealityWeight(){
+		calcTotalWeight(){
 			let realityWeight = 0;
 			if (this.selectList) {
 				for (const item of this.selectList) {
-					if (item.realityWeight) {
-						realityWeight += Number(item.realityWeight);
-					}
+					realityWeight += Number(item.weight)*Number(item.bigCount);
 				}
 			}
 			let calcWeight = realityWeight.toFixed(2);
@@ -264,7 +258,7 @@ export default {
 			let localCharge = Number(this.form.localCharge) > 0 ? Number(this.form.localCharge) : 0
 			let pickCharge = Number(this.form.pickCharge) > 0 ? Number(this.form.pickCharge) : 0
 			this.totalFreight = (packingCharge+longCharge+shortCharge+localCharge+pickCharge).toFixed(2)
-			this.perKgFreight = (this.totalFreight / this.selectAllRealityWeight).toFixed(2)
+			this.perKgFreight = (this.totalFreight / this.calcTotalWeight).toFixed(2)
 		},
 		_getDet() {
 			let data = uni.getStorageSync("modifyShopB");
@@ -327,7 +321,6 @@ export default {
 						bigNum: ele.bigCount,
 						smallNum: ele.smallCount,
 						itemId:ele.itemId,
-						weight:ele.realityWeight,
 						itemPrice: ele.itemPrice || this.getSelectItemPrice(ele)
 					};
 				});

+ 4 - 5
ghsApp/src/pagesPurchase/info.vue

@@ -90,20 +90,19 @@
 							:key="idx"
 							class="commodity-item"
 						>
-							<image class="item-icon" :src="s.itemCover" alt="商品图片" />
+							<image class="item-icon" :src="s.cover" alt="" />
 
 							<view class="item-info">
 								<view class="info-line">
-									<text class="item-name">{{ s.itemName }}</text>
+									<text class="item-name">{{ s.name }}</text>
 									<text class="item-price">
 										<text class="unit">¥</text>
-
-										<text class="price">{{ s.itemPrice }}</text>
+										<text class="price">{{ s.bigPrice }}</text>
 									</text>
 								</view>
 								<view class="info-line">
 									<text class="item-type">{{ s.property }}</text>
-									<text class="item-count">{{ `${s.bigNum}/${s.smallNum}` }}</text>
+									<text class="item-count">{{ parseFloat(s.itemNum) }}扎</text>
 								</view>
 							</view>
 						</view>