Просмотр исходного кода

优化供货商开单列表,优化供货商零售端所有开单列表的弹窗

jiangfeng 5 лет назад
Родитель
Сommit
58e547b437

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

@@ -70,8 +70,10 @@
 				<view class="select-cmd_bx" v-if="customData">
 				<view class="select-cmd_bx" v-if="customData">
 					<view class="kc"> 库存 {{ customData.stock }} </view>
 					<view class="kc"> 库存 {{ customData.stock }} </view>
 					<view class="num_bx">
 					<view class="num_bx">
-						<input v-model="customData.bigCount" @focus="customData.bigCount = null" type="number" />扎
-						<input v-model="customData.smallCount" @focus="customData.smallCount = null" type="number" style="margin-left:24upx" />支
+						<!--<input v-model="customData.bigCount" @focus="customData.bigCount = null" type="number" />扎-->
+						<input v-model="customData.bigCount" :focus="isFocus" type="number" />扎
+
+						<input v-model="customData.smallCount"  type="number" style="margin-left:24upx" />支
 					</view>
 					</view>
 				</view>
 				</view>
 			</template>
 			</template>
@@ -113,6 +115,7 @@ export default {
 	data() {
 	data() {
 		return {
 		return {
 			COMMODITY_TYPE,
 			COMMODITY_TYPE,
+			isFocus: false,
 			isModel: false,
 			isModel: false,
 			isSmallCount:false,//是否是小单位(支)
 			isSmallCount:false,//是否是小单位(支)
 			offVerifyRepertory:true,
 			offVerifyRepertory:true,
@@ -142,6 +145,12 @@ export default {
 		customNum(info) {
 		customNum(info) {
 			this.isModel = true;
 			this.isModel = true;
 			this.customData = info;
 			this.customData = info;
+			this.isFocus = false;
+			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.isFocus = true;
+			})
 		},
 		},
 		modalCancel() {
 		modalCancel() {
 			this.isModel = false;
 			this.isModel = false;

+ 6 - 2
ghsApp/src/components/module/app-commodity.vue

@@ -3,8 +3,8 @@
 <!--		<view class="img_bx" @click="addEvents">-->
 <!--		<view class="img_bx" @click="addEvents">-->
 <!--			<app-img  :src="info.cover" alt="商品图" mode="aspectFit" :height="160" />-->
 <!--			<app-img  :src="info.cover" alt="商品图" mode="aspectFit" :height="160" />-->
 <!--		</view>-->
 <!--		</view>-->
-		<view class="img_bx">
-			<image :src="info.cover"></image>
+		<view class="img_bx" style="background:#eeeeee">
+			<image :src="info.cover" v-if="isImg"></image>
 		</view>
 		</view>
 		<view class="cmd-info_bx">
 		<view class="cmd-info_bx">
 			<view class="tit" >{{ info.itemName || "" }}</view>
 			<view class="tit" >{{ info.itemName || "" }}</view>
@@ -109,6 +109,7 @@ export default {
 			COMMODITY_TYPE,
 			COMMODITY_TYPE,
 			// isAllActive: false,
 			// isAllActive: false,
 			// isAllFocus: false,
 			// isAllFocus: false,
+			isImg:false,
 			isAlterMoney:false,
 			isAlterMoney:false,
 			isAloneAllActive: false,
 			isAloneAllActive: false,
 			isAloneAllFocus: false,
 			isAloneAllFocus: false,
@@ -122,6 +123,9 @@ export default {
 	},
 	},
 	created() {},
 	created() {},
 	mounted() {
 	mounted() {
+		setTimeout(()=>{
+			this.isImg = true;
+		},100)
 		if(this.info.priceLabel == 2){
 		if(this.info.priceLabel == 2){
 			this.changeAutoPrice = this.info.price
 			this.changeAutoPrice = this.info.price
 		}
 		}

+ 11 - 3
ghsApp/src/pagesPurchase/add.vue

@@ -90,8 +90,8 @@
 								<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
 								<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
 								<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
 								<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
 							<!--</allMoreSelectInput>-->
 							<!--</allMoreSelectInput>-->
-							<input v-model="customData.bigCount" @input="countWeight" @focus="customData.bigCount = null" type="number"  />扎
-							<input v-model="customData.smallCount" @input="countWeight" @focus="customData.smallCount = null" type="number" style="margin-left:24upx"/>支
+							<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>
 					</view>
 					<view class="select-cmd_bx">
 					<view class="select-cmd_bx">
@@ -150,6 +150,7 @@ export default {
 		return {
 		return {
 			pageType: "purchase",
 			pageType: "purchase",
 
 
+			isFocus: false,
 			isAloneAllActive: false,
 			isAloneAllActive: false,
 			isAloneAllFocus: false,
 			isAloneAllFocus: false,
 
 
@@ -204,8 +205,15 @@ export default {
 		//自定义数量
 		//自定义数量
 		customNum(info) {
 		customNum(info) {
 			this.isModel = true;
 			this.isModel = true;
-			console.log(info,'customData')
 			this.customData = info;
 			this.customData = info;
+			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;
+			})
 			// this.$nextTick(()=>{
 			// this.$nextTick(()=>{
 			// 	// this.initAllInput();
 			// 	// this.initAllInput();
 			// 	this.initAloneAllInput();
 			// 	this.initAloneAllInput();

+ 18 - 13
ghsApp/src/pagesPurchase/components/CommodityPurchase.vue

@@ -1,16 +1,11 @@
 <template>
 <template>
-  <view
-    class="item-cmd_bx"
-    @click="customNum"
-  >
-    <view class="img_bx">
-      <app-img
-        :src="info.cover"
-        alt="商品图"
-        mode="aspectFit"
-        :height="160"
-      />
-    </view>
+  <view class="item-cmd_bx" @click="customNum">
+    <!--<view class="img_bx">-->
+      <!--<app-img :src="info.cover" alt="商品图" mode="aspectFit" :height="160" />-->
+    <!--</view>-->
+			<view class="img_bx" style="background:#eeeeee">
+				<image :src="info.cover" v-if="isImg"></image>
+			</view>
     <view class="cmd-info_bx">
     <view class="cmd-info_bx">
       <view class="tit">
       <view class="tit">
         {{ info.itemName || "" }}
         {{ info.itemName || "" }}
@@ -98,10 +93,16 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
-      COMMODITY_TYPE
+      COMMODITY_TYPE,
+					isImg:false,
     };
     };
   },
   },
   created () { },
   created () { },
+	mounted() {
+		setTimeout(()=>{
+			this.isImg = true;
+		},100)
+  },
   methods: {
   methods: {
     addEvent () {
     addEvent () {
       this.animationFun('add');
       this.animationFun('add');
@@ -159,6 +160,10 @@ export default {
     position: absolute;
     position: absolute;
     left: 0px;
     left: 0px;
     top: 0px;
     top: 0px;
+			image{
+				width: 100%;
+				height: 100%;
+			}
   }
   }
   .cmd-info_bx {
   .cmd-info_bx {
     padding-left: 167px;
     padding-left: 167px;

+ 6 - 3
ghsApp/src/pagesStorehouse/allot/exSelect.vue

@@ -99,8 +99,8 @@
 							<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
 							<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
 							<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
 							<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
 						<!--</allMoreSelectInput>-->
 						<!--</allMoreSelectInput>-->
-						<input v-model="customData.bigCount" @focus="customData.bigCount = null" type="number" />扎
-						<input v-model="customData.smallCount" @focus="customData.smallCount = null" type="number" style="margin-left:24upx"/>支
+						<input v-model="customData.bigCount" :focus="isFocus" type="number" />扎
+						<input v-model="customData.smallCount"  type="number" style="margin-left:24upx"/>支
 					</view>
 					</view>
 				</view>
 				</view>
 			</template>
 			</template>
@@ -161,6 +161,7 @@ export default {
 				//     name: '课程'
 				//     name: '课程'
 				// },
 				// },
 			],
 			],
+			isFocus: false,
 			isModel: false,
 			isModel: false,
 			offVerifyRepertory: true,
 			offVerifyRepertory: true,
 			isSmallCount:false,//是否是小单位(支)
 			isSmallCount:false,//是否是小单位(支)
@@ -187,7 +188,9 @@ export default {
 			this.isModel = true;
 			this.isModel = true;
 			this.customData = info;
 			this.customData = info;
 			this.$nextTick(()=>{
 			this.$nextTick(()=>{
-				this.initAllInput();
+				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;
 			})
 			})
 		},
 		},
 		modalCancel() {
 		modalCancel() {

+ 16 - 3
ghsApp/src/pagesStorehouse/components/CommodityStock.vue

@@ -1,7 +1,10 @@
 <template>
 <template>
 	<view class="item-cmd_bx">
 	<view class="item-cmd_bx">
-		<view class="img_bx">
-			<app-img :src="info.cover" alt="商品图" mode="aspectFit" :height="160" />
+		<!--<view class="img_bx">-->
+			<!--<app-img :src="info.cover" alt="商品图" mode="aspectFit" :height="160" />-->
+		<!--</view>-->
+		<view class="img_bx" style="background:#eeeeee">
+			<image :src="info.cover" v-if="isImg"></image>
 		</view>
 		</view>
 		<navigator :url="type == STOCK_TYPE.WARN?'':`/pagesStorehouse/stockWarn/detailed?id=${info.itemId}`" class="cmd-info_bx" :class="type == STOCK_TYPE.WARN?'':'active'">
 		<navigator :url="type == STOCK_TYPE.WARN?'':`/pagesStorehouse/stockWarn/detailed?id=${info.itemId}`" class="cmd-info_bx" :class="type == STOCK_TYPE.WARN?'':'active'">
 			<view class="tit">{{ info.itemName || "" }}</view>
 			<view class="tit">{{ info.itemName || "" }}</view>
@@ -49,9 +52,15 @@ export default {
 	},
 	},
 	data() {
 	data() {
 		return {
 		return {
-			STOCK_TYPE
+			// STOCK_TYPEv,
+			isImg:false,
 		};
 		};
 	},
 	},
+	mounted() {
+		setTimeout(()=>{
+			this.isImg = true;
+		},100)
+	},
 	methods: {
 	methods: {
 		customNum() {
 		customNum() {
 			this.$emit("customNum");
 			this.$emit("customNum");
@@ -79,6 +88,10 @@ export default {
 		position: absolute;
 		position: absolute;
 		left: 0px;
 		left: 0px;
 		top: 0px;
 		top: 0px;
+		image{
+			width: 100%;
+			height: 100%;
+		}
 	}
 	}
 	.cmd-info_bx {
 	.cmd-info_bx {
 		position: relative;
 		position: relative;

+ 12 - 2
ghsApp/src/pagesStorehouse/inventory/select.vue

@@ -96,8 +96,8 @@
 							<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
 							<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
 							<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
 							<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
 						<!--</allMoreSelectInput>-->
 						<!--</allMoreSelectInput>-->
-						<input v-model="customData.bigCount" @focus="customData.bigCount = null" type="number" />扎
-						<input v-model="customData.smallCount" @focus="customData.smallCount = null" type="number" style="margin-left:24upx"/>支
+						<input v-model="customData.bigCount" :focus="isFocus" type="number" />扎
+						<input v-model="customData.smallCount" type="number" style="margin-left:24upx"/>支
 					</view>
 					</view>
 				</view>
 				</view>
 			</template>
 			</template>
@@ -147,6 +147,7 @@ export default {
 		return {
 		return {
 			pageType: "inventory",
 			pageType: "inventory",
 			isLimit: false,
 			isLimit: false,
+			isFocus: false,
 			isSmallCount:false,//是否是小单位(支)
 			isSmallCount:false,//是否是小单位(支)
 			offVerifyRepertory:true,
 			offVerifyRepertory:true,
 			tabIndex: 0,
 			tabIndex: 0,
@@ -182,6 +183,15 @@ export default {
 		customNum(info) {
 		customNum(info) {
 			this.isModel = true;
 			this.isModel = true;
 			this.customData = info;
 			this.customData = info;
+			this.isFocus = false;
+
+			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.isFocus = true;
+			})
+
+
 			// this.$nextTick(()=>{
 			// this.$nextTick(()=>{
 			// 	this.initAllInput();
 			// 	this.initAllInput();
 			// })
 			// })

+ 2 - 3
ghsApp/src/pagesStorehouse/stockWarn/manage.vue

@@ -57,12 +57,11 @@
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in filterProductInfo" :key="classIndex" :id="`class_${classIndex}`">
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in filterProductInfo" :key="classIndex" :id="`class_${classIndex}`">
 						<view class="item_list_title" v-if="!$util.isEmpty(classItem.child)"> {{ classItem.className }}</view>
 						<view class="item_list_title" v-if="!$util.isEmpty(classItem.child)"> {{ classItem.className }}</view>
 						<text v-if="tabs[tabIndex].name=='库存预警'&&$util.isEmpty(classItem.child)">当前库存充足</text>
 						<text v-if="tabs[tabIndex].name=='库存预警'&&$util.isEmpty(classItem.child)">当前库存充足</text>
-						<template v-for="(productItem, productIndex) in classItem.child">
-							<view style="height: 200rpx" :id="`class_${classIndex}`" :key="classIndex">
+						<template v-for="(productItem,productIndex) in classItem.child" >
+							<view style="height: 200rpx" :id="`class_${classIndex}`" :key="productIndex">
 								<CommodityStock v-if="classItem.isActive"
 								<CommodityStock v-if="classItem.isActive"
 								:isPrice="false"
 								:isPrice="false"
 								:type="tabs[tabIndex].key"
 								:type="tabs[tabIndex].key"
-								:key="productIndex"
 								:info="productItem"
 								:info="productItem"
 							></CommodityStock>
 							></CommodityStock>
 							</view>
 							</view>

+ 8 - 2
hdApp/src/admin/billing/index.vue

@@ -133,8 +133,8 @@
 							<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
 							<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
 							<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
 							<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
 						<!--</allMoreSelectInput>-->
 						<!--</allMoreSelectInput>-->
-						<input v-model="customData.bigCount" @focus="customData.bigCount = null" type="number" />扎
-						<input v-model="customData.smallCount" @focus="customData.smallCount = null" type="number" style="margin-left:24upx" />支
+						<input v-model="customData.bigCount" :focus="isFocus"  type="number" />扎
+						<input v-model="customData.smallCount" type="number" style="margin-left:24upx" />支
 					</view>
 					</view>
 				</view>
 				</view>
 			</template>
 			</template>
@@ -190,6 +190,7 @@ export default {
 				{	name: '培训班'	},
 				{	name: '培训班'	},
 			],
 			],
 			isSmallCount:false,//是否是小单位(支)
 			isSmallCount:false,//是否是小单位(支)
+			isFocus: false,
 			offVerifyRepertory: true,
 			offVerifyRepertory: true,
 			isModel: false,
 			isModel: false,
 			customData: {
 			customData: {
@@ -220,6 +221,11 @@ export default {
 		customNum(info) {
 		customNum(info) {
 			this.isModel = true;
 			this.isModel = true;
 			this.customData = info;
 			this.customData = info;
+			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.isFocus = true;
+			})
 			// this.$nextTick(()=>{
 			// this.$nextTick(()=>{
 			// 	this.initAllInput();
 			// 	this.initAllInput();
 			// })
 			// })

+ 8 - 2
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -88,8 +88,8 @@
 							<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
 							<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
 							<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
 							<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
 						<!--</allMoreSelectInput>-->
 						<!--</allMoreSelectInput>-->
-						<input v-model="customData.bigCount" @focus="customData.bigCount = null" type="number" />扎
-						<input v-model="customData.smallCount" @focus="customData.smallCount = null" type="number" style="margin-left:24upx" />支
+						<input v-model="customData.bigCount" :focus="isFocus" type="number" />扎
+						<input v-model="customData.smallCount" type="number" style="margin-left:24upx" />支
 					</view>
 					</view>
 				</view>
 				</view>
 			</template>
 			</template>
@@ -148,6 +148,7 @@ export default {
 		return {
 		return {
 			COMMODITY_TYPE,
 			COMMODITY_TYPE,
 			isGhsProduct:true,//采购进店开单
 			isGhsProduct:true,//采购进店开单
+			isFocus: false,
 			isModel: false,
 			isModel: false,
 			isSmallCount: false,
 			isSmallCount: false,
 			customData: {
 			customData: {
@@ -282,6 +283,11 @@ export default {
 		customNum(info) {
 		customNum(info) {
 			this.isModel = true;
 			this.isModel = true;
 			this.customData = info;
 			this.customData = info;
+			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.isFocus = true;
+			})
 			// this.$nextTick(()=>{
 			// this.$nextTick(()=>{
 			// 	this.initAllInput();
 			// 	this.initAllInput();
 			// })
 			// })