diff --git a/pages/.DS_Store b/pages/.DS_Store index d73a6a3..306edbe 100644 Binary files a/pages/.DS_Store and b/pages/.DS_Store differ diff --git a/pages/billing/.DS_Store b/pages/billing/.DS_Store index da4854c..f411168 100644 Binary files a/pages/billing/.DS_Store and b/pages/billing/.DS_Store differ diff --git a/pages/billing/changeGoods1.vue b/pages/billing/changeGoods1.vue index cd3eb1e..700c55d 100644 --- a/pages/billing/changeGoods1.vue +++ b/pages/billing/changeGoods1.vue @@ -63,8 +63,7 @@ - + {{goodsDetail.productName}} @@ -87,11 +86,13 @@ - - - {{item.name}} + + + + {{item.name}} + + - @@ -112,8 +113,7 @@ - + {{item.productName}} @@ -135,7 +135,8 @@ {{item1.attributeList | sliceMsg}} - + @@ -184,25 +185,25 @@ carType: 0, type: '' } - }, - filters: { - sliceMsg(val) { - var name = '' - if (typeof(val) == 'string') { - let newObj = JSON.parse(val) - for (let as in newObj) { - name += newObj[as] + '/' - } - } - return name; - }, - maxNum(val) { - if (val >= 10) { - return 10 - } else if (val < 0) { - return 0 - } - } + }, + filters: { + sliceMsg(val) { + var name = '' + if (typeof(val) == 'string') { + let newObj = JSON.parse(val) + for (let as in newObj) { + name += newObj[as] + '/' + } + } + return name; + }, + maxNum(val) { + if (val >= 10) { + return 10 + } else if (val < 0) { + return 0 + } + } }, onLoad() { this.getGategoryList() @@ -272,15 +273,14 @@ if (this.temporaryList.length == 0) { this.temporaryList.push(this.attributeList); } else { - for (var i = 0; i < this.temporaryList.length; i++) { - console.log(this.temporaryList[i].name.indexOf(this.attributeList.name)) + for (var i = 0; i < this.temporaryList.length; i++) { if (this.temporaryList[i].name.indexOf(this.attributeList.name) != -1) { return - }else{ - if (this.temporaryList.length == (i + 1)) { - this.temporaryList.push(this.attributeList); - return - } + } else { + if (this.temporaryList.length == (i + 1)) { + this.temporaryList.push(this.attributeList); + return + } } } @@ -315,36 +315,31 @@ pageSize: '10' }, false, false).then((res) => { if (res.code == 200) { - + this.shopList = res.result.records } else { this.tui.toast(res.message) } }).catch((res) => {}) - }, - change(){ - + }, + change() { + }, // - carChange(e,index,index1) { - console.log(this.carList) - this.carNum = 0 - for (let i = 0; i < this.carList.length; i++) { - this.carList[i].num = 0 - for (let m = 0; m < this.carList[i].saleDetailQueryDTO.length; m++) { - this.carList[i].num += this.carList[i].saleDetailQueryDTO[m].productCount - } - this.carNum += this.carList[i].num + carChange(e, index, index1) { + this.carNum = 0 + for (let i = 0; i < this.carList.length; i++) { + this.carList[i].num = 0 + for (let m = 0; m < this.carList[i].saleDetailQueryDTO.length; m++) { + this.carList[i].num += this.carList[i].saleDetailQueryDTO[m].productCount + } + this.carNum += this.carList[i].num } }, //弹出购物车或者商品规格选择弹窗 toggle(type, item) { - // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 if (type == 'carPopup') { - - this.oldList = this.carList - console.log(this.carList) - // this.newFun() + this.oldList = this.carList this.carNum = 0 for (let i = 0; i < this.carList.length; i++) { this.carNum += this.carList[i].num @@ -359,21 +354,19 @@ }, //选择商品查询商品规格 checkGoods(item) { - this.goodsDetail = item; - this.temporaryList = [] - this.columns = [] - this.keyList = [] - console.log(this.temporaryList) - console.log(this.carList) - if(this.carList != ''){ - this.zNum = 0 - for(let i=0;i - + @@ -101,7 +101,6 @@ - @@ -298,14 +297,11 @@ this.temporaryList.push(this.attributeList); } else { for (var i = 0; i < this.temporaryList.length; i++) { - console.log(this.temporaryList[i].name.indexOf(this.attributeList.name)) if (this.temporaryList[i].name.indexOf(this.attributeList.name) != -1) { - console.log(this.temporaryList) return }else{ if (this.temporaryList.length == (i + 1)) { this.temporaryList.push(this.attributeList); - console.log(this.temporaryList) return } } @@ -354,8 +350,6 @@ this.temporaryList = [] this.columns = [] this.keyList = [] - console.log(this.temporaryList) - console.log(this.carList) if(this.carList != ''){ this.zNum = 0 for(let i=0;i { - console.log(res, 'res'); if (res.code == 200) { this.indexList = res.result; } else{ @@ -98,7 +97,6 @@ this.tui.request("/app/productCategory/save", "post", { categoryName: e }, false, true).then((res) => { - console.log(res, 'res'); if (res.code == 200) { this.getGategoryList() uni.showToast({ @@ -152,7 +150,6 @@ this.tui.request("/app/productCategory/delById", "post", { id: this.delItems.id, }, false, true).then((res) => { - console.log(res, 'res'); if (res.code == 200) { this.getGategoryList() uni.showToast({ @@ -175,7 +172,6 @@ }, //跳转子分类页 goGategoryLow(id) { - // console.log(id) uni.navigateTo({ url: '/pages/inventory/gategoryLow?id='+id }) diff --git a/pages/inventory/gategoryLow.vue b/pages/inventory/gategoryLow.vue index 5d3b866..b6e811a 100644 --- a/pages/inventory/gategoryLow.vue +++ b/pages/inventory/gategoryLow.vue @@ -136,7 +136,6 @@ }, false, true).then((res) => { if (res.code == 200) { item.attributeValue = res.result; - // item.attributeValue = res.result; }else{ this.tui.toast(res.message) } diff --git a/pages/inventory/goodsList1.vue b/pages/inventory/goodsList1.vue index 4ae08d5..55bbf71 100644 --- a/pages/inventory/goodsList1.vue +++ b/pages/inventory/goodsList1.vue @@ -195,7 +195,7 @@ 选择车号 - { this.toggle('bottom', res.result); }, - fail: (res) => { - // this.clearMsg = '1' + fail: (res) => { uni.showToast({ title: '扫描失败', icon: 'none' @@ -795,8 +791,7 @@ } }).catch((res) => {}) }, - temporaryChange(val) { - console.log('扫一扫',this.temporaryList) + temporaryChange(val) { this.zNum = 0 for (var i = 0; i < this.temporaryList.length; i++) { this.zNum += this.temporaryList[i].productCount @@ -805,10 +800,6 @@ //折扣种类选择 discountChange(e) { let that = this; - // if(this.carList.size == 0){ - // this.tui.toast("请先选择商品") - // return - // } that.shouldPay = 0 this.discountType = e.detail.value; this.carList.forEach(function(value, key) { @@ -819,7 +810,6 @@ }) this.price = this.shouldPay //永远不变的总金额/实际折扣后的总金额 this.discountNum = 10 - // shouldPay for (let i = 0; i < this.items.length; i++) { if (this.items[i].value === e.detail.value) { this.discountCurrent = i; @@ -1121,14 +1111,14 @@ onPrint(opt) { let that = this; that.yNum = 150 - let strCmd = blesdk.CreatCPCLPage(600, 1040, 1, 0); + let strCmd = blesdk.CreatCPCLPage(600, 2080, 1, 0); strCmd += blesdk.addCPCLSETMAG(2, 2) blesdk.addCPCLSETBOLD('bold') - strCmd += blesdk.addCPCLLocation(2); //对齐指令 0-左对齐 1-右对齐 2-居中 + strCmd += blesdk.addCPCLLocation(2); strCmd += blesdk.addCPCLText('0', '30', '24', '0', 0, uni.getStorageSync('shopName')) strCmd += blesdk.addCPCLSETMAG(1, 1) - strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中 + strCmd += blesdk.addCPCLLocation(0); strCmd += blesdk.addCPCLText('0', '100', '24', '0', 0, '客户:' + this.khName.name) strCmd += blesdk.addCPCLText('0', '130', '24', '0', 0, '销售:' + this.createByName) strCmd += blesdk.addCPCLText('280', '130', '24', '0', 0, '日期:' + this.formatDate(new Date(), @@ -1137,33 +1127,53 @@ '=========================================================') this.carList.forEach(function(value, key) { - strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, value.productName + '(' + + strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, value.productName + '(' + value.productSn + ')' + '折扣:' + (value.discount < 10 ? value.discount : '无折扣')) value.stockLogList.forEach(function(value1, key1) { - strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, (that.slicePrint( + strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, (that.slicePrint( key1)) + '*' + value1) strCmd += blesdk.addCPCLText('200', that.yNum, '24', '0', 0, '单价:' + value.lsprice) strCmd += blesdk.addCPCLText('360', that.yNum, '24', '0', 0, '总价:' + (value .lsprice * value1)) }) }) - strCmd += blesdk.addCPCLText('0', this.yNum += 20, '24', '0', 0, + strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '===============================================================') - strCmd += blesdk.addCPCLText('0', this.yNum += 30, '24', '0', 0, '总数量:' + this.totalAmount) + strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '总数量:' + this.totalAmount) strCmd += blesdk.addCPCLText('200', this.yNum, '24', '0', 0, '总金额' + this.shouldPay) strCmd += blesdk.addCPCLText('400', this.yNum, '24', '0', 0, '应收:' + this.relPrice) - strCmd += blesdk.addCPCLText('0', this.yNum += 30, '24', '0', 0, '实收:' + this.priceOk) + strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '实收:' + this.priceOk) strCmd += blesdk.addCPCLText('200', this.yNum, '24', '0', 0, '欠款:' + (this.relPrice - this.priceOk)) strCmd += blesdk.addCPCLText('400', this.yNum, '24', '0', 0, '其他费用:' + (this.otherExpense == '' ? 0 : this.otherExpense)) - strCmd += blesdk.addCPCLText('0', this.yNum += 30, '24', '0', 0, '备注:' + (this.remark == '' ? '无' : this.remark)) - strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中 + if(this.remark.length >20){ + let position = 20; + let part1 = this.remark.substring(0, position); + let part2 = this.remark.substring(position); + strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '备注:' + part1) + strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, part2) + }else{ + strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '备注:' + this.remark) + } + strCmd += blesdk.addCPCLLocation(0); strCmd += blesdk.addCPCLPrint(); + this.bufferData = strCmd; + console.log(strCmd); this.$nextTick(()=>{ uni.redirectTo({ url: "/pages/index/order" }) }) + }, + //计算打印机当前行高度 + countPrint(){ + if((this.yNum + 30) >= (1040 * this.multiple)){ + this.yNum = this.yNum + (1040 * this.multiple - this.yNum) + 50 + this.multiple ++ + return this.yNum + }else{ + return this.yNum += 30 + } }, //截取 slicePrint(val) { @@ -1214,8 +1224,7 @@ carlist.discount = 0; }else{ carlist.discount = e.detail.value; - } - console.log(carlist.discount) + } carlist.discountAmount = carlist.unitPrice * carlist.discount / 10 carlist.price = carlist.unitPrice * carlist.discount / 10 * carlist.productCount @@ -1248,7 +1257,6 @@ content: "确定删除此条商品吗?", success: function(res) { if (res.confirm) { - console.log(that.carList.get(id)) that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(name); that.carList.get(id).stockLogList.delete(name); that.carList.get(id).price = that.carList.get(id).productCount * that.carList.get(id).unitPrice diff --git a/pages/inventory/inventory.vue b/pages/inventory/inventory.vue index 7f58444..587cefd 100644 --- a/pages/inventory/inventory.vue +++ b/pages/inventory/inventory.vue @@ -109,7 +109,6 @@ } }, onShow() { - console.log('onshow'); this.getGategoryList() this.getWarnMsg() this.type=uni.getStorageSync('type') @@ -173,7 +172,6 @@ pageSize: '10' }, false, false).then((res) => { if (res.code == 200) { - console.log(res.result.records) this.shopList = res.result.records } else { this.tui.toast(res.message) @@ -246,11 +244,7 @@ \ No newline at end of file diff --git a/pages/other/logisticsDetail.vue b/pages/other/logisticsDetail.vue index 35fa537..ae580af 100644 --- a/pages/other/logisticsDetail.vue +++ b/pages/other/logisticsDetail.vue @@ -63,7 +63,6 @@ }, methods: { sectionChange(index) { - console.log(index) this.current = index this.bList = [] if (index == 0) { @@ -107,7 +106,6 @@ }) }, dateChange() { - console.log(this.range) this.query.startDate = this.range[0] this.query.endDate = this.range[1] this.sectionChange(this.current) @@ -125,43 +123,29 @@ }) }, getShopList() { - // this.tui.request('/app/sale/listCompany', 'POST', {}, false, true, false).then(res => { - // if (res.code !== 200) return - // this.shopList = res.result.map((v) => { - // return { - // text: v.shopName, - // value: v.id - // } - // }) - // }) const that = this uni.request({ url: tui.interfaceUrl() + '/app/sale/listCompany', data: this.query.saleVO, header: { 'content-type': 'application/json', - // 'Authorization': tui.getToken() 'appWLToken': tui.getToken() }, - method: 'post', //'GET','POST' + method: 'post', dataType: 'json', success: (res) => { that.shopList = res.data.result - console.log(res) }, fail: (res) => { tui.toast("网络不给力,请稍后再试~") - console.log(res) } }) }, onCellClick(item) { this.modalShow = true this.content = item.receiveAddress - console.log('item', item) }, onDatePackerChange(date) { - console.log(date) if (!date) { this.query.saleVO.searchDateVo.startDate = '' this.query.saleVO.searchDateVo.endDate = '' diff --git a/pages/rebate/detail.vue b/pages/rebate/detail.vue index a04708a..a4a3ab0 100644 --- a/pages/rebate/detail.vue +++ b/pages/rebate/detail.vue @@ -31,7 +31,6 @@ }, false, false, true).then((res) => { if (res.code !== 200) return this.commissionList = res.result - console.log(res) }) } } diff --git a/pages/rebate/rebate.vue b/pages/rebate/rebate.vue index 5e6c092..8bf08ec 100644 --- a/pages/rebate/rebate.vue +++ b/pages/rebate/rebate.vue @@ -62,16 +62,13 @@ }, methods: { onCardClick(e) { - console.log(e) }, getList() { - console.log('this.$store', this.$store.shopId) this.tui.request('/app/returnCommission/listWithReturned', 'get', { shopId: '001' }, false, false, true).then((res) => { if (res.code !== 200) return this.notYetCommissionList = res.result - console.log(res) }) }, getCommissionList() { diff --git a/pages/rebate/withdrawal.vue b/pages/rebate/withdrawal.vue index e28a3a7..9078f99 100644 --- a/pages/rebate/withdrawal.vue +++ b/pages/rebate/withdrawal.vue @@ -30,7 +30,6 @@ export default { name: "withdrawal", onLoad(options) { - console.log(options) this.canBalance = options.balance }, data() { @@ -42,7 +41,6 @@ export default { computed:{ canSave() { if (!this.balance) return true - console.log(this.balance < this.canBalance,this.balance , this.canBalance) if (+this.balance > +this.canBalance) return true return false } diff --git a/pages/staff/addStaff/addStaff.vue b/pages/staff/addStaff/addStaff.vue index 1dca4d6..630104b 100644 --- a/pages/staff/addStaff/addStaff.vue +++ b/pages/staff/addStaff/addStaff.vue @@ -62,8 +62,7 @@ }, onLoad(options) { const type = options.type - const item = JSON.parse(options.item) - console.log(item) + const item = JSON.parse(options.item) this.type = options.type if (type === 'edit') { this.addForm.nickname = item.nickname @@ -77,7 +76,6 @@ }, methods: { onFormSubmit() { - console.log('submit') this.$refs.addForm.validate().then(async () => { let url; if(this.type=='edit'){ @@ -90,12 +88,11 @@ true, false) if (res.code == 200) { uni.navigateBack() - console.log(res) } else { this.tui.toast(res.message) } }, (reason) => { - console.log(reason) + }) } } diff --git a/pages/staff/clock/clock.vue b/pages/staff/clock/clock.vue index 75a6807..d11e790 100644 --- a/pages/staff/clock/clock.vue +++ b/pages/staff/clock/clock.vue @@ -78,10 +78,10 @@ const amapObject = new amap.AMapWX({ key: 'f06653d65bcefa97e94ab08917389842' }) amapObject.getRegeo({ success: (res) => { - console.log(res, res[0].regeocodeData.formatted_address) + }, fail: (err) => { - console.log(err) + } }) // if (!this.isClock) { @@ -95,7 +95,6 @@ // } else { // this.tui.toast(res.message) // } - // console.log(res) // }) // } } diff --git a/pages/staff/signRule/signRule.vue b/pages/staff/signRule/signRule.vue index 8da2142..39dda72 100644 --- a/pages/staff/signRule/signRule.vue +++ b/pages/staff/signRule/signRule.vue @@ -51,12 +51,11 @@ this.addForm.longitude = res[0].longitude }, fail: (err) => { - console.log(err) + } }) }, onFormSubmit() { - console.log('submit') this.$refs.addForm.validate().then(async () => { let url; if (this.type == 'edit') { @@ -69,12 +68,10 @@ true, false) if (res.code == 200) { uni.navigateBack() - console.log(res) } else { this.tui.toast(res.message) } }, (reason) => { - console.log(reason) }) }, start(e) {