| | |
| | | total = total.add(new BigDecimal(item.getPrice() * item.getCount())); |
| | | } |
| | | SysOrder sysOrderResult = new SysOrder(); |
| | | sysOrderResult.setZkTotal(zkTotal.doubleValue()); |
| | | sysOrderResult.setZkTotal(zkTotal.setScale(2,BigDecimal.ROUND_DOWN).doubleValue()); |
| | | sysOrderResult.setTotal(total.doubleValue()); |
| | | |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(sysOrderResult)); |
| | |
| | | v2=v2==null ? 0:v2; |
| | | BigDecimal b1 = new BigDecimal(Double.toString(v1)); |
| | | BigDecimal b2 = new BigDecimal(Double.toString(v2)); |
| | | return b1.multiply(b2).doubleValue(); |
| | | return b1.multiply(b2).setScale(2,BigDecimal.ROUND_DOWN).doubleValue(); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | BigDecimal b1 = new BigDecimal(Double.toString(v1)); |
| | | BigDecimal b2 = new BigDecimal(Double.toString(v2)); |
| | | return b1.divide(b2, scale, BigDecimal.ROUND_HALF_DOWN).doubleValue(); |
| | | return b1.divide(b2, scale, BigDecimal.ROUND_DOWN).doubleValue(); |
| | | } |
| | | |
| | | /** |
| | |
| | | b.code goodsNo, |
| | | b.name goodsName, |
| | | c.su_name meiliao, |
| | | d.count*d.zk_price zk_total |
| | | TRUNCATE(d.count*d.zk_price,2) zk_total |
| | | from achieve_new a |
| | | left join shopping_goods b on a.shopping_goods_id=b.id |
| | | left join sys_users c on a.beault_id=c.su_id |
| | |
| | | _this.dialogSettleVisible = true; |
| | | }, |
| | | calOrderTotalFormatter(row, column) { |
| | | return row.count * row.zkPrice; |
| | | return (row.count * row.zkPrice).toFixed(2); |
| | | }, |
| | | getVipMoneyCards() { |
| | | let _this = this; |
| | |
| | | commission : 0, |
| | | achieveType : _this.achieveTypeList[0].value, |
| | | isShare: false, |
| | | payMethod:item.payMethod, |
| | | payMethod:"现金", |
| | | }); |
| | | }); |
| | | _this.order.payMoney = orderPayMoney; |
| | |
| | | return false; |
| | | } |
| | | } |
| | | console.log("isCardPay",isCardPay); |
| | | |
| | | //匹配业绩 |
| | | _this.order.items.forEach(item=>{ |
| | | item.achieveList = []; |
| | | }) |
| | | _this.achieveList.forEach(achieve => { |
| | | for (let i = 0; i < _this.order.items.length; i++) { |
| | | let item = _this.order.items[i]; |
| | | if (!item.achieveList){ |
| | | item.achieveList = []; |
| | | } |
| | | if (item.uuid == achieve.orderItem.uuid) { |
| | | |
| | | let payMethod=achieve.payMethod; |
| | | if(isCardPay){ |
| | | //如果是储值卡支付,则业绩自动切换到划扣金额 |
| | | achieve.payMethod="划扣"; |
| | | } |
| | | |
| | | payMethod="划扣"; |
| | | } |
| | | let achieveNew = { |
| | | uuid:item.uuid, |
| | | beaultId: achieve.saleId, |
| | | projPercentage: achieve.commission, |
| | | achieveType: achieve.achieveType, |
| | | goodsCash: achieve.goodsCash, |
| | | payMethod: achieve.payMethod, |
| | | payMethod: payMethod, |
| | | }; |
| | | item.achieveList.push(achieveNew); |
| | | break; |
| | |
| | | */ |
| | | chouseGoods() { |
| | | let _this = this; |
| | | // this.multipleSelection.forEach(item => { |
| | | // _this.pushToSelectGoods(item, BUY_TYPE_NOT_FREE); |
| | | // }); |
| | | _this.multipleSelection.forEach(item => { |
| | | _this.pushToSelectGoods(item, BUY_TYPE_NOT_FREE); |
| | | }); |
| | | this.closeXm(); |
| | | this.calculationTotal(); |
| | | }, |
| | |
| | | _this.dialogSettleVisible = true; |
| | | }, |
| | | calOrderTotalFormatter(row, column) { |
| | | return row.count * row.zkPrice; |
| | | return (row.count * row.zkPrice).toFixed(2); |
| | | }, |
| | | getVipMoneyCards() { |
| | | let _this = this; |