lilei 2 年 前
コミット
661c632c48

+ 11 - 6
components/kk-printer/index.vue

@@ -127,6 +127,10 @@
 			roomid:{
 				type:String,
 				require:true
+			},
+			autoConnect: {
+				type: Boolean,
+				default: true
 			}
 		},
 		computed:{
@@ -162,7 +166,6 @@
 			}
 		},
 		mounted() {
-			console.log('mounted')
 			this.handlePrintTap(0)
 		},
 		beforeDestroy(){
@@ -204,11 +207,13 @@
 								this.handleConnectDevice(lastDevice)
 							}
 						}else{
-							//若没有已连接设备,弹框搜索设备
-							this.isShowSearch = true
-							this.devicesList = []
-							if(this.deviceId){
-								this.closeConnect()
+							if(this.autoConnect || flag){
+								//若没有已连接设备,弹框搜索设备
+								this.isShowSearch = true
+								this.devicesList = []
+								if(this.deviceId){
+									this.closeConnect()
+								}
 							}
 						}
 					}).catch((err)=>{

+ 7 - 1
pages/replenishmentManage/confirm.vue

@@ -17,7 +17,7 @@
 			<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="240" :text="noDataText" img-width="120" v-if="listdata.length==0 && status!='loading'" mode="list"></u-empty>
 		</scroll-view>
 		<view class="replenishment-confirm-footer" v-if="listdata.length>0">
-			<u-button @click="confirmModal=true" type="success" :custom-style="customStyle" hover-class="none" shape="circle">确定补货({{confirmQty}}/{{totalQty}})</u-button>
+			<u-button @click="confirmModal=true" :loading="loading" type="success" :custom-style="customStyle" hover-class="none" shape="circle">确定补货({{confirmQty}}/{{totalQty}})</u-button>
 		</view>
 		<!-- 确认弹框 -->
 		<common-modal :openModal="confirmModal" content="确认对该数字货架进行补货吗?" confirmText="确认补货" @confirm="modalConfirm" @close="confirmModal=false" />
@@ -34,6 +34,7 @@
 		components: { commonModal, stockModal },
 		data() {
 			return {
+				loading: false,
 				listdata: [],
 				status: 'loadmore',
 				noDataText: '暂无数据',
@@ -113,6 +114,7 @@
 					replenishBillNo: this.listdata[0].replenishBillNo,
 					detailList: arr
 				}
+				this.loading = true
 				// 校验产品库存是否足够
 				shelfReplenishDetailStock(params).then(res => {
 					if (res.status == 200) {
@@ -121,7 +123,9 @@
 							this.paramsData = params
 							this.confirmModal = false
 							this.stockModal = true
+							this.loading = false
 						} else {
+							this.confirmModal = false
 							this.confirmFun(params)
 						}
 					}
@@ -130,6 +134,7 @@
 			// 提交确认
 			confirmFun (params) {
 				shelfReplenishConfirm(params).then(res => {
+					this.loading = false
 					if (res.status == 200) {
 						this.toashMsg(res.message)
 						uni.$emit('refreshBL')
@@ -143,6 +148,7 @@
 			// 库存不足  confirm
 			modalStock(params){
 				this.stockModal = false
+				this.loading = true
 				this.confirmFun(params)
 			}
 		}

+ 2 - 1
pages/replenishmentManage/outWarehousing.vue

@@ -24,7 +24,7 @@
 		</view>
 		<view class="replenishment-outWarehousing-footer">
 			<u-button class="button" @click="printModal=true" :custom-style="customDefalutStyle" hover-class="none" shape="circle">打印标签</u-button>
-			<u-button class="button" @click="goSendOutGoods" type="success" :custom-style="customStyle" hover-class="none" shape="circle">发货出库</u-button>
+			<u-button class="button" @click="goSendOutGoods" :loading="loading" type="success" :custom-style="customStyle" hover-class="none" shape="circle">发货出库</u-button>
 		</view>
 		<!-- 打印贴签 -->
 		<print-sticker-modal :openModal="printModal" @confirm="modalPrint" @close="printModal=false" />
@@ -39,6 +39,7 @@
 		components: { partList, printStickerModal },
 		data() {
 			return {
+				loading: false,
 				replenishBillSn: '',
 				basicInfoData:null,
 				partList: [],

+ 4 - 1
pages/replenishmentManage/sendOutGoods.vue

@@ -14,7 +14,7 @@
 				<u-icon name="scan" size="34"></u-icon>
 				点击扫码
 			</u-button>
-			<u-button v-else @click="handleOutGoods" type="success" :custom-style="customStyle" hover-class="none" shape="circle">立即出库</u-button>
+			<u-button v-else @click="handleOutGoods" :loading="loading" type="success" :custom-style="customStyle" hover-class="none" shape="circle">立即出库</u-button>
 		</view>
 		<!-- 确认弹框 -->
 		<common-modal v-if="confirmModal" :openModal="confirmModal" :title="contTitle?'扫码成功':'扫码失败'" :content="contModal" confirmText="继续扫码" @confirm="modalConfirm" @close="confirmModal=false" />
@@ -35,6 +35,7 @@
 		components: { partList, commonModal, chooseTypeModal },
 		data() {
 			return {
+				loading: false,
 				barcode:null,
 				replenishBillSn: null,
 				shelfSn: null,
@@ -143,6 +144,7 @@
 				  shelfSn: _this.shelfSn
 				}
 				console.log(params)
+				this.loading = true
 				shelfReplenishOutStock(params).then(res => {
 					console.log(res)
 				  if (res.status == 200) {
@@ -157,6 +159,7 @@
 				  }else{
 					  _this.toashMsg(res.message)
 				  }
+				  this.loading = false
 				})
 			},
 			// 确认出库

+ 4 - 1
pages/replenishmentManage/signWarehousing.vue

@@ -23,7 +23,7 @@
 			</view>
 		</view>
 		<view class="replenishment-putWarehousing-footer">
-			<u-button @click="confirmModal=true" type="success" :custom-style="customStyle" hover-class="none" shape="circle">确定签收({{confirmQty}}/{{totalQty}})</u-button>
+			<u-button @click="confirmModal=true" type="success" :loading="loading" :custom-style="customStyle" hover-class="none" shape="circle">确定签收({{confirmQty}}/{{totalQty}})</u-button>
 		</view>
 		<!-- 确认弹框 -->
 		<common-modal :openModal="confirmModal" content="签收后数字货架的产品数量将增加,确认签收吗?" confirmText="确认签收" @confirm="modalConfirm" @close="confirmModal=false" />
@@ -38,6 +38,7 @@
 		components: { partList, commonModal },
 		data() {
 			return {
+				loading: false,
 				replenishBillSn: '',
 				basicInfoData:null,
 				partList: [],
@@ -114,6 +115,7 @@
 				  replenishBillSn: this.replenishBillSn,
 				  detailList: arr
 				}
+				this.loading = true
 				shelfReplenishPutStock(params).then(res => {
 					if(res.status == 200){
 						uni.$emit('refreshBL')
@@ -121,6 +123,7 @@
 						uni.navigateBack()
 					}
 					this.toashMsg(res.message)
+					this.loading = false
 				})
 			},
 			// 数量 change

+ 2 - 2
pages/shelfSetting/editShelfHw.vue

@@ -17,7 +17,7 @@
 							<view class="pinfo flex_1">
 								<view class="ptxt flex align_center justify_between">
 									<text>{{productEntity.code}}</text>
-									<text class="pcode" @click="toBindProduct">
+									<text class="pcode" v-if="!productEntity.currQty" @click="toBindProduct">
 										<u-icon name='reload'></u-icon>
 										更换产品
 									</text>
@@ -26,7 +26,7 @@
 									{{productEntity.name}}
 								</view>
 								<view>
-									当前库存:{{productEntity.currQty}} {{productEntity.unit}}
+									当前库存:{{productEntity.currQty||0}} {{productEntity.unit}}
 								</view>
 							</view>
 						</view>

+ 7 - 9
pages/shelfSetting/productList.vue

@@ -4,8 +4,8 @@
 			<text>{{title}}</text>
 			<view>
 				<u-radio-group v-model="printNum" @change="qtyChange">
-					<u-radio :name="0">按当前库存打印</u-radio>
-					<u-radio :name="1">按最大库容打印</u-radio>
+					<u-radio :name="1">按当前库存打印</u-radio>
+					<u-radio :name="2">按最大库容打印</u-radio>
 				</u-radio-group>
 			</view>
 		</view>
@@ -41,7 +41,7 @@
 					<view class="pcurnums flex align_center">
 						<text>打印数量</text>
 						<view class="u-ninput">
-							<u-number-box color="#000" bg-color="#fff" v-model="item.printQty" :min="1" :max="item.maxQty"></u-number-box>
+							<u-number-box color="#000" bg-color="#fff" v-model="item.printQty" :min="1"></u-number-box>
 						</view>
 					</view>
 				</view>
@@ -79,23 +79,21 @@
 		data() {
 			return {
 				partList: [],
-				printNum: 0
+				printNum: 1
 			}
 		},
 		methods: {
 			setData(list){
 				const _this = this
 				list.map(item => {
-					item.printQty = this.printNum == 1 ? item.maxQty : item.qty
+					item.printQty = this.printNum == 2 ? item.maxQty : item.qty
 					item.checked = false
 				})
 				this.partList = JSON.parse(JSON.stringify(list))
 			},
 			qtyChange(v){
-				this.partList.map(item => {
-					item.printQty = v == 1 ? item.maxQty : item.qty
-				})
-				this.partList.splice()
+				 this.partList = []
+				 this.setData(this.list)
 			},
 			// 全选
 			allSelect(val){

+ 2 - 1
pages/shelfSetting/quickReplenish.vue

@@ -20,7 +20,7 @@
 			</view>
 			<view class="btns flex align_item justify_end">
 				<view>
-					<kk-printer ref="kkprinter" printBtnStyle="default-mid" defaultText="打印贴签" @startPrint="startPrint"></kk-printer>
+					<kk-printer ref="kkprinter" :autoConnect="false" printBtnStyle="default-mid" defaultText="打印贴签" @startPrint="startPrint"></kk-printer>
 				</view>
 				<view style="padding: 0 10rpx;"></view>
 				<view>
@@ -42,6 +42,7 @@
 	import stockModal from '@/pages/replenishmentManage/stockModal.vue'
 	import {printTempl} from '@/libs/printTools.js'
 	import {saveReplenishBill} from '@/api/shelfReplenish.js'
+	import {clzConfirm} from '@/libs/tools.js'
 	export default {
 		components: { quickProductList, kkPrinter, chooseTypeModal, stockModal },
 		data() {

+ 6 - 3
pages/stockCheck/startCheck.vue

@@ -122,11 +122,14 @@
 						</view>
 						<view class="item-info uni-col-10">
 							<view class="item-name">
-								<text>{{item.productCode}}</text>
+								<text>{{item.shelfPlaceCode}}</text>
 								{{item.product.productName}}
 							</view>
 							<view class="item-detail">
-								<view class="item-detail-info">
+								<view class="item-detail-info align_center flex justify_between">
+									<view>
+										{{item.productCode}}
+									</view>
 									<view class="flex justify_end">
 										<text class="item-detail-text">
 											可用:{{item.stockQty?item.stockQty:0}} {{item.product&&item.product.unit}}
@@ -853,7 +856,7 @@
 			.item-name{
 				font-size: 30rpx;
 				text{
-					background: #eef6ff;
+					background: rgba(3, 54, 146, 0.15);
 					color: #1c588a;
 					border-radius: 1em;
 					font-size: 0.8em;