lilei 12 hours ago
parent
commit
3d1a46c836

+ 5 - 4
libs/printTools.js

@@ -78,10 +78,10 @@ export const printTempl = function(tsc,data){
 	const lightHeight = 24 // 行高3mm,1mm = 8点
 	const pageW = 60 // 页签宽度mm
 	const pageH = 40 // 页签高度mm
-	const maxFontNums = Math.floor((pageW*8-left*4)/lightHeight) // 每行最多字体数
+	const maxFontNums = Math.floor((pageW*8-left*3)/lightHeight) // 每行最多字体数
 	const leftMaxFnums = Math.floor(maxFontNums*0.4)
 	const rightMaxFnums = leftMaxFnums + 1
-	let rightLeft = (leftMaxFnums+2.5)*lightHeight
+	let rightLeft = (leftMaxFnums+0.5)*lightHeight
 	// 初始化打印机
 	const command = tsc.jpPrinter.createNew()
 	command.init()
@@ -95,9 +95,10 @@ export const printTempl = function(tsc,data){
 	top = textFormat(command,data.shelfName,maxFontNums,left,top,lightHeight,"center",1)
 	// 二维码
 	top = top+15
-	command.setQR(left*6, top, "M", 5, "A", data.barCode)
+	command.setQR(left*2, top, "M", 5, "A", data.barCode)
 	// 货位号
-	const rightTop = textFormat(command,data.shelfPlaceCode,rightMaxFnums,rightLeft,top,lightHeight,"left",4)
+	top = top + 6
+	const rightTop = textFormat(command,data.shelfPlaceCode,rightMaxFnums,rightLeft,top,lightHeight,"left",3)
 	// 产品编码
 	top = rightTop + 1
 	top = textFormat(command,data.productCode,rightMaxFnums,rightLeft,top,lightHeight,"left",1)

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "iSCM智慧供应链",
     "appid" : "__UNI__5B57B68",
     "description" : "iSCM智慧供应链系统",
-    "versionName" : "1.5.2",
-    "versionCode" : 152,
+    "versionName" : "1.5.3",
+    "versionCode" : 153,
     "transformPx" : false,
     "sassImplementationName" : "node-sass",
     /* 5+App特有相关 */

+ 3 - 3
pages/shelfSetting/addShelfHw.vue

@@ -3,7 +3,7 @@
 		<view class="form-body">
 			<u-form :model="form" label-width="180rpx" :error-type="['toast']" ref="uForm">
 				<u-form-item label="货位号" required prop="shelfPlaceCode">
-					<u-input v-model="form.shelfPlaceCode" @input="placeCodeBlur" :maxlength="30" placeholder="请输入货位号(字母+数字的格式)"/>
+					<u-input v-model="form.shelfPlaceCode" @input="placeCodeBlur" :maxlength="30" placeholder="请输入货位号(首字母+数字)格式"/>
 				</u-form-item>
 				<u-form-item label="绑定产品" v-show="type=='add'">
 					<view style="flex-grow: 1;" v-if="productEntity&&productEntity.code" @click="toBindProduct">
@@ -64,8 +64,8 @@
 					shelfPlaceCode:[
 						{ required: true, message: '请输入货位号', trigger: 'change' },
 						{
-							pattern: /^[a-zA-Z]{1}[0-9]{1,29}$/g,
-							message: '必须字母开头且后面紧跟数字'
+							pattern: /^[a-zA-Z]{1}[0-9]{1,5}$/g,
+							message: '必须字母开头且后面紧跟数字,最多6位'
 						}
 					],
 					price: [{ required: true,type:'number', message: '请输入销售价', trigger: 'change' }],

+ 1 - 1
pages/shelfSetting/editShelfHw.vue

@@ -13,7 +13,7 @@
 				<u-form-item label="货位号">
 					<view class="flex align_center flex_1 justify_between">
 						<view style="width: 80%;">{{shelfPlaceCode}}</view>
-						<view v-if="!productEntity" style="width: 20%;text-align: center;" @click="editShelf"><u-icon name='edit-pen'></u-icon>修改</view>
+						<view style="width: 20%;text-align: center;" @click="editShelf"><u-icon name='edit-pen'></u-icon>修改</view>
 					</view>
 				</u-form-item>
 				<view v-if="productEntity">

+ 0 - 1
pages/shelfSetting/shelfSet.vue

@@ -819,7 +819,6 @@
 							border-radius: 0.3rem;
 							margin: 0.5rem 2%;
 							float: left;
-							width: 20%;
 							text-align: center;
 						}