wangfukang 2 years ago
parent
commit
e57bd4b823
  1. 19
      package1/index/orderDetail.vue
  2. 2
      package1/inventory/gategory.vue

19
package1/index/orderDetail.vue

@ -1013,7 +1013,14 @@
}) })
}, },
returnRealSize(size){ returnRealSize(size){
return Number((size / this.smailDcl).toFixed(0)) if(this.smailDcl >= 1){
return Number((size / this.smailDcl).toFixed(2))
}else{
return size
}
},
returnFontSize(size){
return Number((size / this.smailDcl).toFixed(0)) - 1
}, },
getData() { getData() {
let that = this let that = this
@ -1034,7 +1041,7 @@
//店铺名 //店铺名
// 设置字体样式 // 设置字体样式
ctx.font = 'bold '+ that.returnRealSize(150) +'px SimSun'; ctx.font = 'bold '+ that.returnFontSize(150) +'px SimSun';
// 设置文字颜色 // 设置文字颜色
ctx.fillStyle = 'black'; ctx.fillStyle = 'black';
var text = this.shopName+' 销售单'; var text = this.shopName+' 销售单';
@ -1047,7 +1054,7 @@
// 设置字体样式 // 设置字体样式
ctx.font = 'bold '+ that.returnRealSize(60) +'px SimSun'; ctx.font = 'bold '+ that.returnFontSize(60) +'px SimSun';
// 设置文字颜色 // 设置文字颜色
ctx.fillStyle = 'black'; ctx.fillStyle = 'black';
@ -1189,7 +1196,7 @@
ctx.draw(true) ctx.draw(true)
// 设置字体样式 // 设置字体样式
ctx.font = 'bold '+that.returnRealSize(70)+'px SimSun'; ctx.font = 'bold '+that.returnFontSize(70)+'px SimSun';
// 设置文字颜色 // 设置文字颜色
ctx.fillStyle = 'black'; ctx.fillStyle = 'black';
ctx.fillText('本单应收:' + that.sales.realAmount + '(' + this.convertToChineseNumeral(that.sales.realAmount) + ')', that.returnRealSize(20) , lastHeight+=that.returnRealSize(100)) ctx.fillText('本单应收:' + that.sales.realAmount + '(' + this.convertToChineseNumeral(that.sales.realAmount) + ')', that.returnRealSize(20) , lastHeight+=that.returnRealSize(100))
@ -1214,7 +1221,7 @@
ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), lastHeight+=that.returnRealSize(100)) ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), lastHeight+=that.returnRealSize(100))
ctx.draw(true) ctx.draw(true)
// 设置字体样式 // 设置字体样式
ctx.font = 'bold '+that.returnRealSize(60)+'px SimSun'; ctx.font = 'bold '+that.returnFontSize(60)+'px SimSun';
// 设置文字颜色 // 设置文字颜色
ctx.fillStyle = 'black'; ctx.fillStyle = 'black';
@ -1586,7 +1593,7 @@
this.printHeight1 = smailBegin this.printHeight1 = smailBegin
this.myCanvasHeight = this.printHeight1+'px' this.myCanvasHeight = this.printHeight1+'px'
if(this.smailDcl >= 1){ if(this.smailDcl >= 1){
this.printWidth1 = Number(Number(this.printWidth1 / this.smailDcl).toFixed(0)) this.printWidth1 = Number(Number(this.printWidth1 / this.smailDcl).toFixed(0))
} }
this.myCanvasWidth = this.printWidth1+'px' this.myCanvasWidth = this.printWidth1+'px'
setTimeout(res => { setTimeout(res => {

2
package1/inventory/gategory.vue

@ -8,7 +8,7 @@
<li v-for="(item, index) in indexList" :key="index" @tap="clickList(item)"> <li v-for="(item, index) in indexList" :key="index" @tap="clickList(item)">
<view class="name"> <view class="name">
<text>{{item.categoryName}}</text> <text>{{item.categoryName}}</text>
<u-icon name="edit-pen-fill" size="22" @tap.stop="inputDialogToggle('edit', item)"></u-icon> <u-icon name="edit-pen-fill" size="22" v-if="item.categoryName != '默认分类'" @tap.stop="inputDialogToggle('edit', item)"></u-icon>
</view> </view>
<button class="bj-btn" @tap.stop="goGategoryLow(item.id)">编辑规格</button> <button class="bj-btn" @tap.stop="goGategoryLow(item.id)">编辑规格</button>
</li> </li>

Loading…
Cancel
Save