|
|
|
@ -4,7 +4,11 @@ |
|
|
|
<view class="IndexContent"> |
|
|
|
<view class="contentPadding"> |
|
|
|
<view style="width: 95%;display: flex;margin: 0 auto;"> |
|
|
|
<view class="top-btn" style="width: 100%;" @tap="gokaidan">开单</view> |
|
|
|
<view v-if = "wluserType != 2" class="top-btn" style="width: 100%;" @tap="gokaidan">开单</view> |
|
|
|
<view v-else class="top-btn" style="width: 100%;"> |
|
|
|
<kk-printer ref="kkprinter" :bufferData="bufferData" :defaultText="'打印票据'" |
|
|
|
@onPrint="goPrintList"></kk-printer> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="title"> |
|
|
|
<i class="iconfont icon-xiaoshouyuce"> 今日营收详情 |
|
|
|
@ -71,10 +75,10 @@ |
|
|
|
<view class="uni-body"> |
|
|
|
<text class="cardText">接站人:{{item.receivingUserName}}</text> |
|
|
|
</view> |
|
|
|
<view @tap.stop="goAddOrderPage(item)" style="position: absolute;bottom: 20rpx;right: 20rpx;color: #00B5FF;"> |
|
|
|
<view v-if = "wluserType != 2" @tap.stop="goAddOrderPage(item)" style="position: absolute;bottom: 20rpx;right: 20rpx;color: #00B5FF;"> |
|
|
|
修改订单 |
|
|
|
</view> |
|
|
|
<view @tap.stop="delOrder(item)" style="position: absolute;bottom: 100rpx;right: 20rpx;color: #00B5FF;"> |
|
|
|
<view v-if = "wluserType != 2" @tap.stop="delOrder(item)" style="position: absolute;bottom: 100rpx;right: 20rpx;color: #00B5FF;"> |
|
|
|
删除订单 |
|
|
|
</view> |
|
|
|
<view v-if="item.changeCount != '0'" style="position: absolute;top: 140rpx;right: 20rpx;color: #00B5FF;"> |
|
|
|
@ -137,6 +141,10 @@ |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import util from '@/components/kk-printer/utils/util.js'; |
|
|
|
import * as blesdk from '@/components/kk-printer/utils/bluetoolth.js'; |
|
|
|
import kkPrinter from '@/components/kk-printer/index.vue'; |
|
|
|
import gbk from '@/components/kk-printer/utils/printUtil-GBK.js'; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -152,6 +160,7 @@ |
|
|
|
range:[], |
|
|
|
lineValue:'', |
|
|
|
comPanyList:[], |
|
|
|
wluserType:uni.getStorageSync('wluserType'), |
|
|
|
companyValue:'', |
|
|
|
stationName:'', |
|
|
|
stationValue:{ |
|
|
|
@ -164,10 +173,17 @@ |
|
|
|
arrivalStationId:'', |
|
|
|
lineRange:[], |
|
|
|
companyRange:[], |
|
|
|
bufferDataList:[], |
|
|
|
orderStatistics:{}, |
|
|
|
stationRange:[] |
|
|
|
bufferData:[], |
|
|
|
stationRange:[], |
|
|
|
shopRemark:[], |
|
|
|
companyTel:'' |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
kkPrinter |
|
|
|
}, |
|
|
|
onShareAppMessage() { |
|
|
|
return { |
|
|
|
title: '查看我的物流单', |
|
|
|
@ -183,6 +199,10 @@ |
|
|
|
this.getLine() |
|
|
|
this.getLineByCompany('') |
|
|
|
this.getAllNum() |
|
|
|
// 初始化蓝牙模块 |
|
|
|
wx.openBluetoothAdapter({ |
|
|
|
mode: 'central' |
|
|
|
}) |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
let that = this; |
|
|
|
@ -192,6 +212,191 @@ |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title: this.shopName |
|
|
|
}); |
|
|
|
if(uni.getStorageSync('remark')){ |
|
|
|
let remark = uni.getStorageSync('remark') |
|
|
|
this.shopRemark = remark.split('\n'); |
|
|
|
} |
|
|
|
if(uni.getStorageSync('companyTel')){ |
|
|
|
this.companyTel = uni.getStorageSync('companyTel') |
|
|
|
} |
|
|
|
//收货单横向打印 |
|
|
|
for(let i=1;i<=this.orderList.length;i++){ |
|
|
|
//let strCmd = blesdk.CreatCPCLPage(600, 480, 1, 0,0); |
|
|
|
let strCmd = blesdk.CreatCPCLPage(780, 1590, 1, 0,0); |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLSETMAG(2, 2) |
|
|
|
strCmd += blesdk.addCPCLLocation(2); |
|
|
|
strCmd += blesdk.addCPCLText('-30', 1100, '24', '1', 1, this.orderList[i].companyName) |
|
|
|
strCmd += blesdk.addCPCLLocation(0); |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 1) |
|
|
|
strCmd += blesdk.addCPCLText('50', 1500, '24', '0.5', 1, '开票日期:'+ this.orderList[i].createTime + ' 发站:' +this.orderList[i].goStationName +'-->'+ this.orderList[i].arrivalStationName +' 卸货地点:'+ this.orderList[i].arrivalStationName +' 货号:'+this.orderList[i].orderNumber) |
|
|
|
|
|
|
|
//正文第一行 |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('90', 1290, '24', '0', 1, '收货人') |
|
|
|
strCmd += blesdk.addCPCLLine(80, 1200, 125, 1200, 2); |
|
|
|
strCmd += blesdk.addCPCLText('90', 1180, '24', '0', 1, this.orderList[i].receiverName) |
|
|
|
strCmd += blesdk.addCPCLLine(80, 1070, 125, 1070, 2); |
|
|
|
strCmd += blesdk.addCPCLText('90', 1050, '24', '0', 1, '电话') |
|
|
|
strCmd += blesdk.addCPCLLine(80, 970, 125, 970, 2); |
|
|
|
strCmd += blesdk.addCPCLText('90', 960, '24', '0', 1, this.orderList[i].receiverMobile) |
|
|
|
strCmd += blesdk.addCPCLLine(80, 760, 125, 760, 2); |
|
|
|
strCmd += blesdk.addCPCLText('90', 740, '24', '0', 1, '票号') |
|
|
|
strCmd += blesdk.addCPCLLine(80, 660, 125, 660, 2); |
|
|
|
strCmd += blesdk.addCPCLText('90', 640, '24', '0', 1, '') |
|
|
|
|
|
|
|
//正文第二行 |
|
|
|
strCmd += blesdk.addCPCLText('135', 1290, '24', '0', 1, '发货人') |
|
|
|
strCmd += blesdk.addCPCLLine(125, 1200, 170, 1200, 2); |
|
|
|
strCmd += blesdk.addCPCLText('135', 1180, '24', '0', 1, this.orderList[i].shipperName) |
|
|
|
strCmd += blesdk.addCPCLLine(125, 1070, 170, 1070, 2); |
|
|
|
strCmd += blesdk.addCPCLText('135', 1050, '24', '0', 1, '电话') |
|
|
|
strCmd += blesdk.addCPCLLine(125, 970, 170, 970, 2); |
|
|
|
strCmd += blesdk.addCPCLText('135', 960, '24', '0', 1, this.orderList[i].shipperMobile) |
|
|
|
strCmd += blesdk.addCPCLLine(125, 760, 170, 760, 2); |
|
|
|
strCmd += blesdk.addCPCLText('135', 740, '24', '0', 1, '身份证') |
|
|
|
strCmd += blesdk.addCPCLLine(125, 630, 170, 630, 2); |
|
|
|
strCmd += blesdk.addCPCLText('135', 620, '24', '0', 1, '') |
|
|
|
|
|
|
|
//正文第三行 |
|
|
|
strCmd += blesdk.addCPCLText('180', 1290, '24', '0', 1, '货名') |
|
|
|
strCmd += blesdk.addCPCLLine(170, 1200, 215, 1200, 2); |
|
|
|
strCmd += blesdk.addCPCLText('180', 1180, '24', '0', 1, '件数') |
|
|
|
strCmd += blesdk.addCPCLLine(170, 1070, 215, 1070, 2); |
|
|
|
strCmd += blesdk.addCPCLText('180', 1050, '24', '0', 1, '付款方式') |
|
|
|
strCmd += blesdk.addCPCLLine(170, 900, 215, 900, 2); |
|
|
|
strCmd += blesdk.addCPCLText('180', 890, '24', '0', 1, '运费') |
|
|
|
strCmd += blesdk.addCPCLLine(170, 800, 215, 800, 2); |
|
|
|
strCmd += blesdk.addCPCLText('180', 790, '24', '0', 1, '送货') |
|
|
|
strCmd += blesdk.addCPCLLine(170, 700, 215, 700, 2); |
|
|
|
strCmd += blesdk.addCPCLText('180', 690, '24', '0', 1, '中转') |
|
|
|
strCmd += blesdk.addCPCLLine(170, 600, 215, 600, 2); |
|
|
|
strCmd += blesdk.addCPCLText('180', 590, '24', '0', 1, '工本费') |
|
|
|
strCmd += blesdk.addCPCLLine(170, 500, 215, 500, 2); |
|
|
|
strCmd += blesdk.addCPCLText('180', 490, '24', '0', 1, '保费') |
|
|
|
strCmd += blesdk.addCPCLLine(170, 400, 215, 400, 2); |
|
|
|
strCmd += blesdk.addCPCLText('180', 390, '24', '0', 1, '垫付') |
|
|
|
strCmd += blesdk.addCPCLLine(170, 300, 215, 300, 2); |
|
|
|
strCmd += blesdk.addCPCLText('180', 290, '24', '0', 1, '代收款') |
|
|
|
strCmd += blesdk.addCPCLLine(170, 200, 215, 200, 2); |
|
|
|
strCmd += blesdk.addCPCLText('180', 190, '24', '0', 1, '货到付款') |
|
|
|
|
|
|
|
//正文第四行 |
|
|
|
strCmd += blesdk.addCPCLText('225', 1290, '24', '0', 1, this.orderList[i].objectName) |
|
|
|
strCmd += blesdk.addCPCLLine(215, 1200, 260, 1200, 2); |
|
|
|
strCmd += blesdk.addCPCLText('225', 1180, '24', '0', 1, this.orderList[i].count) |
|
|
|
strCmd += blesdk.addCPCLLine(215, 1070, 260, 1070, 2); |
|
|
|
strCmd += blesdk.addCPCLText('225', 1050, '24', '0', 1, this.orderList[i].methodOfSettlement == 0 ?'现金':this.orderList[i].methodOfSettlement == 1 ?'月付':this.orderList[i].methodOfSettlement == 2 ?'到付':'') |
|
|
|
strCmd += blesdk.addCPCLLine(215, 900, 260, 900, 2); |
|
|
|
strCmd += blesdk.addCPCLText('225', 890, '24', '0', 1, this.orderList[i].freight) |
|
|
|
strCmd += blesdk.addCPCLLine(215, 800, 260, 800, 2); |
|
|
|
strCmd += blesdk.addCPCLText('225', 790, '24', '0', 1, this.orderList[i].deliveryFee) |
|
|
|
strCmd += blesdk.addCPCLLine(215, 700, 260, 700, 2); |
|
|
|
strCmd += blesdk.addCPCLText('225', 690, '24', '0', 1, this.orderList[i].transitFee) |
|
|
|
strCmd += blesdk.addCPCLLine(215, 600, 260, 600, 2); |
|
|
|
strCmd += blesdk.addCPCLText('225', 590, '24', '0', 1, this.orderList[i].cost) |
|
|
|
strCmd += blesdk.addCPCLLine(215, 500, 260, 500, 2); |
|
|
|
strCmd += blesdk.addCPCLText('225', 490, '24', '0', 1, this.orderList[i].premium) |
|
|
|
strCmd += blesdk.addCPCLLine(215, 400, 260, 400, 2); |
|
|
|
strCmd += blesdk.addCPCLText('225', 390, '24', '0', 1, '') |
|
|
|
strCmd += blesdk.addCPCLLine(215, 300, 260, 300, 2); |
|
|
|
strCmd += blesdk.addCPCLText('225', 290, '24', '0', 1, this.orderList[i].paymentForGoods) |
|
|
|
strCmd += blesdk.addCPCLLine(215, 200, 260, 200, 2); |
|
|
|
let allmoney = Number(this.orderList[i].premium)+Number(this.orderList[i].cost)+Number(this.orderList[i].freight)+Number(this.orderList[i].deliveryFee)+Number(this.orderList[i].transitFee) |
|
|
|
if(this.orderList[i].methodOfSettlement == 2){ |
|
|
|
strCmd += blesdk.addCPCLText('225', 190, '24', '0', 1, allmoney) |
|
|
|
}else{ |
|
|
|
strCmd += blesdk.addCPCLText('225', 190, '24', '0', 1, '') |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//正文第五行 |
|
|
|
strCmd += blesdk.addCPCLText('270', 1290, '24', '0', 1, '运费合计:'+this.convertToChineseNumeral1(allmoney)+'元整 ¥'+allmoney) |
|
|
|
strCmd += blesdk.addCPCLLine(260, 700, 305, 700, 2); |
|
|
|
strCmd += blesdk.addCPCLText('270', 690, '24', '0', 1, '代收款:'+this.convertToChineseNumeral1(Number(this.orderList[i].paymentForGoods))+'元整 ¥'+this.orderList[i].paymentForGoods) |
|
|
|
|
|
|
|
//正文第六行 |
|
|
|
strCmd += blesdk.addCPCLText('315', 1290, '24', '0', 1, '备注') |
|
|
|
strCmd += blesdk.addCPCLLine(305, 700, 350, 700, 2); |
|
|
|
strCmd += blesdk.addCPCLText('315', 690, '24', '0', 1, '特别声明') |
|
|
|
|
|
|
|
//正文第七行 |
|
|
|
strCmd += blesdk.addCPCLLocation(0); |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 1) |
|
|
|
strCmd += blesdk.addCPCLText('360', 1290, '24', '0', 1, '注') |
|
|
|
strCmd += blesdk.addCPCLText('390', 1290, '24', '0', 1, '意') |
|
|
|
strCmd += blesdk.addCPCLText('420', 1290, '24', '0', 1, '事') |
|
|
|
strCmd += blesdk.addCPCLText('450', 1290, '24', '0', 1, '项') |
|
|
|
strCmd += blesdk.addCPCLLine(350, 1260, 475, 1260, 2); |
|
|
|
if(this.shopRemark.length > 0){ |
|
|
|
for(let q = 0;q<this.shopRemark.length;q++){ |
|
|
|
strCmd += blesdk.addCPCLText('360', 1250, '24', '0', 1, this.shopRemark[q]) |
|
|
|
} |
|
|
|
} |
|
|
|
//正文第八行 |
|
|
|
strCmd += blesdk.addCPCLText('485', 1290, '24', '0', 1, this.companyTel) |
|
|
|
|
|
|
|
//左一竖线 |
|
|
|
strCmd += blesdk.addCPCLLine(80, 1500, 510, 1500, 2); |
|
|
|
//左二竖线 |
|
|
|
strCmd += blesdk.addCPCLLine(80, 1300, 510, 1300, 2); |
|
|
|
//右一竖线 |
|
|
|
strCmd += blesdk.addCPCLLine(80, 80, 510, 80, 2); |
|
|
|
//第一条横线 |
|
|
|
strCmd += blesdk.addCPCLLine(80, 1500, 80, 80, 2); |
|
|
|
//第二条横线 |
|
|
|
strCmd += blesdk.addCPCLLine(125, 1300, 125, 80, 2); |
|
|
|
//第三条横线 |
|
|
|
strCmd += blesdk.addCPCLLine(170, 1300, 170, 80, 2); |
|
|
|
//第四条横线 |
|
|
|
strCmd += blesdk.addCPCLLine(215, 1300, 215, 80, 2); |
|
|
|
//第五条横线 |
|
|
|
strCmd += blesdk.addCPCLLine(260, 1300, 260, 80, 2); |
|
|
|
//第六条横线 |
|
|
|
strCmd += blesdk.addCPCLLine(305, 1300, 305, 80, 2); |
|
|
|
//第七条横线 |
|
|
|
strCmd += blesdk.addCPCLLine(350, 1300, 350, 80, 2); |
|
|
|
//第八条横线 |
|
|
|
strCmd += blesdk.addCPCLLine(475, 1300, 475, 80, 2); |
|
|
|
//第九条横线 |
|
|
|
strCmd += blesdk.addCPCLLine(520, 1500, 520, 80, 2); |
|
|
|
|
|
|
|
// strCmd += blesdk.addCPCLLine(50, 1500, 250, 100, 2); |
|
|
|
|
|
|
|
/* |
|
|
|
strCmd += blesdk.addCPCLLine(10,140,570,140,2) //画线 |
|
|
|
strCmd += blesdk.addCPCLLine(382,140,382,316,2) //画线 |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLSETMAG(2, 2) |
|
|
|
strCmd += blesdk.addCPCLText('20', 160, '24', '0', 0, '到站:'+ arrivalStationName) |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLLine(10,220,382,220,2) //画线 |
|
|
|
|
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('20', 248, '24', '0', 0, '收:'+receiverName) |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLLine(10,316,570,316,2) //画线 |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 1) |
|
|
|
strCmd += blesdk.addCPCLText('20', 336, '24', '0', 0, '共'+ this.itemData.count + '件') |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('112', 336, '24', '0', 0, '自提') |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLLine(170,316,170,450,2) //画线 |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('186', 336, '24', '0', 0, '单号:'+ orderNumber + '-' +i) |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLLine(10,376,570,376,2) //画线 |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('20', 396, '24', '0', 0, this.itemData.receiverMobile == 'undefined' || this.itemData.receiverMobile == null ? '' : this.itemData.receiverMobile) |
|
|
|
strCmd += blesdk.addCPCLText('186', 396, '24', '0', 0, '备注:'+this.itemData.remark) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLQRCode(400, 150 , 'H', '1', 4, orderNumber) //二维码 */ |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferDataList.push(strCmd); |
|
|
|
} |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
if (this.pageNum >= this.pages) return; |
|
|
|
@ -200,6 +405,74 @@ |
|
|
|
this.getOrderList(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
goPrintList() { |
|
|
|
this.bufferData = this.bufferDataList |
|
|
|
// this.xierushuju(this.bufferData) |
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
|
|
setTimeout(res => { |
|
|
|
this.bufferData = [] |
|
|
|
}, 1000 * this.orderList.length) |
|
|
|
uni.hideLoading(); |
|
|
|
}) |
|
|
|
}, |
|
|
|
xierushuju() { |
|
|
|
let that = this; |
|
|
|
//写入数据 |
|
|
|
if (this.defaultText == '小标签') { |
|
|
|
that.$emit('onPrintSmall1'); |
|
|
|
} else if (this.defaultText == '确认打印') { |
|
|
|
that.$emit('goPrint'); |
|
|
|
} else { |
|
|
|
that.$emit('onPrint'); |
|
|
|
} |
|
|
|
|
|
|
|
that.$nextTick(() => { |
|
|
|
var dataStr = '' |
|
|
|
for (let m = 0; m < that.bufferData.length; m++) { |
|
|
|
dataStr += that.bufferData[m] |
|
|
|
} |
|
|
|
const maxChunk = that.deviceType == 'android' ? 20 : 180; |
|
|
|
const delay = that.deviceType == 'android' ? 20 : 180; |
|
|
|
|
|
|
|
let buffer = gbk.strToGBKByte(dataStr) |
|
|
|
for (let i = 0, j = 0, length = buffer.byteLength; i < length; i += maxChunk, j++) { |
|
|
|
let subPackage = buffer.slice(i, i + maxChunk <= length ? (i + maxChunk) : length); |
|
|
|
setTimeout(that._writeBLECharacteristicValue, j * delay, subPackage); |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
return; |
|
|
|
}, |
|
|
|
_writeBLECharacteristicValue(buffer) { |
|
|
|
let that = this; |
|
|
|
wx.writeBLECharacteristicValue({ |
|
|
|
deviceId: uni.getStorageSync('deviceId'), |
|
|
|
serviceId: uni.getStorageSync('serviceId'), |
|
|
|
characteristicId: uni.getStorageSync('characteristicId'), |
|
|
|
value: buffer, |
|
|
|
success(res) { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
fail(res) { |
|
|
|
|
|
|
|
wx.closeBLEConnection({ |
|
|
|
deviceId: uni.getStorageSync('deviceId'), |
|
|
|
success(res) { |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
if (uni.getStorageSync('deviceId')) { |
|
|
|
|
|
|
|
that.xierushuju() |
|
|
|
} else { |
|
|
|
that.jiantingshebei() |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
uni.hideLoading(); |
|
|
|
}, |
|
|
|
getLineByCompany(id){ |
|
|
|
if(id == ''){ |
|
|
|
let data = { |
|
|
|
@ -247,6 +520,88 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
convertToChineseNumeral1(money) { |
|
|
|
let fu = false |
|
|
|
if (money == 0) { |
|
|
|
return '零元整' |
|
|
|
} |
|
|
|
if (JSON.stringify(money).indexOf('-') != -1) { |
|
|
|
money = JSON.stringify(money).split('-')[1] |
|
|
|
fu = true |
|
|
|
} |
|
|
|
const cnNums = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'] |
|
|
|
const cnIntRadice = ['', '拾', '佰', '仟'] |
|
|
|
const cnIntUnits = ['', '万', '亿', '兆'] |
|
|
|
const cnDecUnits = ['角', '分', '毫', '厘'] |
|
|
|
const cnInteger = '整' |
|
|
|
const cnIntLast = '元' |
|
|
|
const maxNum = 999999999999999.9999 |
|
|
|
let integerNum |
|
|
|
let decimalNum |
|
|
|
let chineseStr = '' |
|
|
|
let parts |
|
|
|
if (money == '') { |
|
|
|
return '' |
|
|
|
} |
|
|
|
money = parseFloat(money) |
|
|
|
if (money >= maxNum) { |
|
|
|
return '' |
|
|
|
} |
|
|
|
if (money == 0) { |
|
|
|
chineseStr = cnNums[0] + cnIntLast + cnInteger |
|
|
|
return chineseStr |
|
|
|
} |
|
|
|
money = money.toString() |
|
|
|
if (money.indexOf('.') == -1) { |
|
|
|
integerNum = money |
|
|
|
decimalNum = '' |
|
|
|
} else { |
|
|
|
parts = money.split('.') |
|
|
|
integerNum = parts[0] |
|
|
|
decimalNum = parts[1].substr(0, 4) |
|
|
|
} |
|
|
|
if (parseInt(integerNum, 10) > 0) { |
|
|
|
let zeroCount = 0 |
|
|
|
const IntLen = integerNum.length |
|
|
|
for (let i = 0; i < IntLen; i++) { |
|
|
|
const n = integerNum.substr(i, 1) |
|
|
|
const p = IntLen - i - 1 |
|
|
|
const q = p / 4 |
|
|
|
const m = p % 4 |
|
|
|
if (n == '0') { |
|
|
|
zeroCount++ |
|
|
|
} else { |
|
|
|
if (zeroCount > 0) { |
|
|
|
chineseStr += cnNums[0] |
|
|
|
} |
|
|
|
zeroCount = 0 |
|
|
|
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m] |
|
|
|
} |
|
|
|
if (m == 0 && zeroCount < 4) { |
|
|
|
chineseStr += cnIntUnits[q] |
|
|
|
} |
|
|
|
} |
|
|
|
chineseStr += cnIntLast |
|
|
|
} |
|
|
|
if (decimalNum != '') { |
|
|
|
const decLen = decimalNum.length |
|
|
|
for (let i = 0; i < decLen; i++) { |
|
|
|
const n = decimalNum.substr(i, 1) |
|
|
|
if (n != '0') { |
|
|
|
chineseStr += cnNums[Number(n)] + cnDecUnits[i] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (chineseStr == '') { |
|
|
|
chineseStr += cnNums[0] + cnIntLast + cnInteger |
|
|
|
} else if (decimalNum == '') { |
|
|
|
chineseStr += cnInteger |
|
|
|
} |
|
|
|
if (fu == true) { |
|
|
|
chineseStr = '负' + chineseStr |
|
|
|
} |
|
|
|
return chineseStr |
|
|
|
}, |
|
|
|
getAllNum(){ |
|
|
|
let currentTime = new Date(); |
|
|
|
let year = currentTime.getFullYear(); |
|
|
|
@ -345,7 +700,7 @@ |
|
|
|
url: this.tui.interfaceUrl() + '/app/logisticsOrder/getLogisticsOrderPageList', |
|
|
|
data:{ //stationId |
|
|
|
pageNum:this.pageNum, |
|
|
|
pageSize:"10", |
|
|
|
pageSize:this.wluserType == '2' ? "1000" : "10", |
|
|
|
companyName:"", |
|
|
|
companyId:this.companyId, |
|
|
|
circuitName:"", |
|
|
|
|