Check-in [7038629204]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Interim code
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1:70386292044835d11868891335eb0b21ef64f897
User & Date: xiekevin 2018-02-07 20:59:00
Context
2018-02-07
20:59
Interim code Leaf check-in: 7038629204 user: xiekevin tags: trunk
2018-01-08
18:21
Implemented feature request [c961f21c74] check-in: 4c2b0d3040 user: xiekevin tags: trunk
Changes

Changes to src/fanxi/front/local/Receipt.java.

6
7
8
9
10
11
12



13
14
15
16
17
18
19
..
22
23
24
25
26
27
28


29
30
31
32
33
34
35
..
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import java.awt.print.Printable;
import java.awt.print.PrinterJob;
import java.math.BigDecimal;
import java.text.DecimalFormat;

import javax.print.PrintService;




import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

import fanxi.common.D;
import fanxi.common.JSON;
import fanxi.common.i18n.I18n;
import fanxi.common.i18n.K;
................................................................................
/** This class encapsulate data of a receipt 
 * 
 * @author Kevin
 *
 */
public abstract class Receipt implements Printable {
	


	protected ReceiptConfig	mConf			= null;
	protected DecimalFormat	df				= new DecimalFormat("#.00");
	
	protected String		storeName		= null;
	protected String		storeAddr		= null;
	protected String		storeAddr1		= null;
	protected String		storeTel		= null;
................................................................................
		try {
			this.transType = Sale.Type.valueOf(JSON.getAsString(jsonReceipt, D.Sale.TYPE, null));
		}catch(Exception e) {}

		
		
		
		this.id = JSON.getAsString(jsonReceipt, D.Sale.ID, I18n.get(K.incomplete));
		this.transTs = JSON.getAsString(jsonReceipt, D.Sale.TRANS_TS, "");
		this.transTs = this.transTs.split("\\.", 2)[0];
		this.employeeId = JSON.getAsString(jsonReceipt, D.Sale.EMPLOYEE_ID, "");
		this.totalAmt = JSON.getAsBigDecimal(jsonReceipt, D.Sale.TOTAL_AMT, BigDecimal.ZERO);
		this.customerId = JSON.getAsString(jsonReceipt, D.Sale.CUSTOMER_ID, null);
		this.customerName = JSON.getAsString(jsonReceipt, D.Sale.CUSTOMER_NAME, null);
		this.customerDeposit = JSON.getAsBigDecimal(jsonReceipt, D.Sale.CUSTOMER_DEPOSIT, BigDecimal.ZERO);







>
>
>







 







>
>







 







|







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import java.awt.print.Printable;
import java.awt.print.PrinterJob;
import java.math.BigDecimal;
import java.text.DecimalFormat;

import javax.print.PrintService;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

import fanxi.common.D;
import fanxi.common.JSON;
import fanxi.common.i18n.I18n;
import fanxi.common.i18n.K;
................................................................................
/** This class encapsulate data of a receipt 
 * 
 * @author Kevin
 *
 */
public abstract class Receipt implements Printable {
	
	public static final Logger logger = LogManager.getLogger();

	protected ReceiptConfig	mConf			= null;
	protected DecimalFormat	df				= new DecimalFormat("#.00");
	
	protected String		storeName		= null;
	protected String		storeAddr		= null;
	protected String		storeAddr1		= null;
	protected String		storeTel		= null;
................................................................................
		try {
			this.transType = Sale.Type.valueOf(JSON.getAsString(jsonReceipt, D.Sale.TYPE, null));
		}catch(Exception e) {}

		
		
		
		this.id = JSON.getAsString(jsonReceipt, D.Sale.ID, null);
		this.transTs = JSON.getAsString(jsonReceipt, D.Sale.TRANS_TS, "");
		this.transTs = this.transTs.split("\\.", 2)[0];
		this.employeeId = JSON.getAsString(jsonReceipt, D.Sale.EMPLOYEE_ID, "");
		this.totalAmt = JSON.getAsBigDecimal(jsonReceipt, D.Sale.TOTAL_AMT, BigDecimal.ZERO);
		this.customerId = JSON.getAsString(jsonReceipt, D.Sale.CUSTOMER_ID, null);
		this.customerName = JSON.getAsString(jsonReceipt, D.Sale.CUSTOMER_NAME, null);
		this.customerDeposit = JSON.getAsBigDecimal(jsonReceipt, D.Sale.CUSTOMER_DEPOSIT, BigDecimal.ZERO);

Changes to src/fanxi/front/local/ReceiptDeposit.java.

1
2
3
4
5

6
7
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
..
73
74
75
76
77
78
79
80

81
82
83
84
85
86
87
...
137
138
139
140
141
142
143













144
145
146
147
148
149
150
package fanxi.front.local;

import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;

import java.awt.Point;
import java.awt.Rectangle;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.math.BigDecimal;
import java.text.DecimalFormat;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;


import fanxi.common.D;
import fanxi.common.JSON;
import fanxi.common.i18n.I18n;
import fanxi.common.i18n.K;
import fanxi.middle.entity.Sale;

/** This class encapsulate data of a receipt 
................................................................................
				clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
				PrintUtil.drawString(g2d, this.storeTel, clip, PrintUtil.Alignment.CENTER);
				cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP + 20);
			}
			
			// LINE: print receipt id (trans_id)
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, I18n.get(K.receiptId) + ": " + this.id, 

					clip, PrintUtil.Alignment.WEST);
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP);
			
			// LINE: print receipt date and time on the left, sale person on the right
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, this.transTs, clip, PrintUtil.Alignment.WEST);
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP);
................................................................................
			// total paid
			cursor.setLocation(this.mConf.mWidthQuarterP*2, cursor.y);					
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthQuarterP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, I18n.get(K.amtPaid) + ": ", clip, PrintUtil.Alignment.EAST);
			cursor.setLocation(this.mConf.mWidthQuarterP*3, cursor.y);
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthQuarterP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, this.df.format(this.amtPaid), clip, PrintUtil.Alignment.EAST);













			
			// print footer Note 
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP*2);
			if(this.mConf.mFootNote!=null) {
				clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
				PrintUtil.drawString(g2d, this.mConf.mFootNote, clip, PrintUtil.Alignment.CENTER);
			}





>










>







 







|
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
package fanxi.front.local;

import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.math.BigDecimal;
import java.text.DecimalFormat;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

import fanxi.barcode.Barcode;
import fanxi.common.D;
import fanxi.common.JSON;
import fanxi.common.i18n.I18n;
import fanxi.common.i18n.K;
import fanxi.middle.entity.Sale;

/** This class encapsulate data of a receipt 
................................................................................
				clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
				PrintUtil.drawString(g2d, this.storeTel, clip, PrintUtil.Alignment.CENTER);
				cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP + 20);
			}
			
			// LINE: print receipt id (trans_id)
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, I18n.get(K.receiptId) + ": " + 
						(this.id==null? I18n.get(K.incomplete) : this.id ), 
					clip, PrintUtil.Alignment.WEST);
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP);
			
			// LINE: print receipt date and time on the left, sale person on the right
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, this.transTs, clip, PrintUtil.Alignment.WEST);
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP);
................................................................................
			// total paid
			cursor.setLocation(this.mConf.mWidthQuarterP*2, cursor.y);					
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthQuarterP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, I18n.get(K.amtPaid) + ": ", clip, PrintUtil.Alignment.EAST);
			cursor.setLocation(this.mConf.mWidthQuarterP*3, cursor.y);
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthQuarterP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, this.df.format(this.amtPaid), clip, PrintUtil.Alignment.EAST);
			
			// LINE: print barcoded receipt id image
			if( this.id!=null ) {
				cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP*2);
				try {
					Image image = Barcode.instance(Barcode.Type.CODE128, this.id).showCode(false).getImage();
					clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightBarcodeP);
					PrintUtil.drawImage(g2d, image, clip, PrintUtil.Alignment.CENTER);
					cursor.setLocation(0, cursor.y + this.mConf.mHeightBarcodeP);
				}catch(Exception e) {
					logger.error("Failed print receipt id barcode image", e);
				}
			}
			
			// print footer Note 
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP*2);
			if(this.mConf.mFootNote!=null) {
				clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
				PrintUtil.drawString(g2d, this.mConf.mFootNote, clip, PrintUtil.Alignment.CENTER);
			}

Changes to src/fanxi/front/local/ReceiptSale.java.

1
2
3
4
5

6
7
8
9
10
11



12
13
14
15

16
17
18
19
20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
...
138
139
140
141
142
143
144
145

146
147
148
149
150
151
152
...
336
337
338
339
340
341
342













343
344
345
346
347
348
349
package fanxi.front.local;

import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;

import java.awt.Point;
import java.awt.Rectangle;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.math.BigDecimal;




import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;


import fanxi.common.D;
import fanxi.common.JSON;
import fanxi.common.i18n.I18n;
import fanxi.common.i18n.K;
import fanxi.middle.entity.Sale;

/** This class encapsulate data of a receipt 
 * 
 * @author Kevin
 *
 */
public class ReceiptSale extends Receipt {

/**	
	private	ReceiptConfig	mConf			= null;
	private DecimalFormat	df				= new DecimalFormat("#.00");
	
	private	String			storeName		= null;
	private	String			storeAddr		= null;
	private String			storeAddr1		= null;
	private String			storeTel		= null;
................................................................................
				clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
				PrintUtil.drawString(g2d, this.storeTel, clip, PrintUtil.Alignment.CENTER);
				cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP + 20);
			}
			
			// LINE: print receipt id (trans_id)
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, I18n.get(K.receiptId) + ": " + this.id, 

					clip, PrintUtil.Alignment.WEST);
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP);
			
			// LINE: print receipt date and time on the left, sale person on the right
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, this.transTs, clip, PrintUtil.Alignment.WEST);
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP);
................................................................................
				cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP * 2);
				clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
				PrintUtil.drawString(g2d, "*** " + I18n.get(K.totalSaved) + " " 
							+ this.df.format(this.amtSavedTotal) + " ***", 
							clip, PrintUtil.Alignment.CENTER);
				g2d.setFont(font);
			}			













			
			// print footer Note 
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP*2);
			if(this.mConf.mFootNote!=null) {
				clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
				PrintUtil.drawString(g2d, this.mConf.mFootNote, clip, PrintUtil.Alignment.CENTER);
			}





>






>
>
>




>












>
|







 







|
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
...
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
...
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
package fanxi.front.local;

import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.math.BigDecimal;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

import fanxi.barcode.Barcode;
import fanxi.common.D;
import fanxi.common.JSON;
import fanxi.common.i18n.I18n;
import fanxi.common.i18n.K;
import fanxi.middle.entity.Sale;

/** This class encapsulate data of a receipt 
 * 
 * @author Kevin
 *
 */
public class ReceiptSale extends Receipt {

	/**	
	private	ReceiptConfig	mConf			= null;
	private DecimalFormat	df				= new DecimalFormat("#.00");
	
	private	String			storeName		= null;
	private	String			storeAddr		= null;
	private String			storeAddr1		= null;
	private String			storeTel		= null;
................................................................................
				clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
				PrintUtil.drawString(g2d, this.storeTel, clip, PrintUtil.Alignment.CENTER);
				cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP + 20);
			}
			
			// LINE: print receipt id (trans_id)
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, I18n.get(K.receiptId) + ": " + 
						(this.id==null? I18n.get(K.incomplete) : this.id ), 
					clip, PrintUtil.Alignment.WEST);
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP);
			
			// LINE: print receipt date and time on the left, sale person on the right
			clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
			PrintUtil.drawString(g2d, this.transTs, clip, PrintUtil.Alignment.WEST);
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP);
................................................................................
				cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP * 2);
				clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
				PrintUtil.drawString(g2d, "*** " + I18n.get(K.totalSaved) + " " 
							+ this.df.format(this.amtSavedTotal) + " ***", 
							clip, PrintUtil.Alignment.CENTER);
				g2d.setFont(font);
			}			
			
			// LINE: print barcoded receipt id image
			if( this.id!=null ) {
				cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP*2);
				try {
					Image image = Barcode.instance(Barcode.Type.CODE128, this.id).showCode(false).getImage();
					clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightBarcodeP);
					PrintUtil.drawImage(g2d, image, clip, PrintUtil.Alignment.CENTER);
					cursor.setLocation(0, cursor.y + this.mConf.mHeightBarcodeP);
				}catch(Exception e) {
					logger.error("Failed print receipt id barcode image", e);
				}
			}
			
			// print footer Note 
			cursor.setLocation(0, cursor.y + this.mConf.mHeightLineP*2);
			if(this.mConf.mFootNote!=null) {
				clip.setFrame(cursor.x, cursor.y, this.mConf.mWidthPrintableP, this.mConf.mHeightLineP);
				PrintUtil.drawString(g2d, this.mConf.mFootNote, clip, PrintUtil.Alignment.CENTER);
			}

Changes to src/fanxi/middle/Engine.java.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import fanxi.back.Repository;
import fanxi.back.db.DBManager;
import fanxi.common.Fanxi;
import fanxi.common.i18n.I18n;
import fanxi.common.i18n.K;
import fanxi.middle.entity.Inventory;
import fanxi.middle.session.SessionManager;
import kxie.base.BaseException;

/**
 *
 * @author Kevin_Xie1







<
<







10
11
12
13
14
15
16


17
18
19
20
21
22
23

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import fanxi.back.Repository;
import fanxi.back.db.DBManager;
import fanxi.common.Fanxi;


import fanxi.middle.entity.Inventory;
import fanxi.middle.session.SessionManager;
import kxie.base.BaseException;

/**
 *
 * @author Kevin_Xie1

Added src/fanxi/middle/web/html/pos/exchange.html.

























>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
<div class="kxPage">
	<div class="kxHead">
		<div class="kxIcon">&#x21CB;</div>
		<div class="kxTitle">客户退换货</div>
	</div>
    <div class="kxContent">
    <div class="kxFoot">
   		<button class="kxLink" onclick="fx.exchange.onCancel(event);">取消</button>
   		<button class="kxButton" name="buttonEnter"
   			onclick="fx.exchange.confirm(event);">退换</button>
    </div>
</div>

Changes to src/fanxi/middle/web/html/pos/pos.html.

212
213
214
215
216
217
218







219
220
221
222
223
224
225

			<div class="kxButtonTile u9">
				<button name="printReceipt" onclick="fx.pos.onPrintReceipt(event);">
					<span class="kxIcon">&#x1F5B6;</span>
					<span class="kxLabel">打印收据</span>
				</button>
			</div>







			<button class="kxButtonTile u9" onclick="fx.pos.onDailySummary(event);"
					style="width:9rem;position:relative;display:none;">
				<img class="icon" src="img/daily.svg" />
				<span class="caption">今日销售</span>
			</button>

			<div class="kxFlexCGS"></div>







>
>
>
>
>
>
>







212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232

			<div class="kxButtonTile u9">
				<button name="printReceipt" onclick="fx.pos.onPrintReceipt(event);">
					<span class="kxIcon">&#x1F5B6;</span>
					<span class="kxLabel">打印收据</span>
				</button>
			</div>
			<div class="kxButtonTile u9">
				<button name="printReceipt" onclick="fx.pos.onExchange(event);">
					<span class="kxIcon">&#x21CB;</span>
					<span class="kxLabel">客户退换货</span>
				</button>
			</div>

			<button class="kxButtonTile u9" onclick="fx.pos.onDailySummary(event);"
					style="width:9rem;position:relative;display:none;">
				<img class="icon" src="img/daily.svg" />
				<span class="caption">今日销售</span>
			</button>

			<div class="kxFlexCGS"></div>

Changes to src/fanxi/middle/web/js/fx_pos.js.

681
682
683
684
685
686
687










688
689
690
691
692
693
694
....
1521
1522
1523
1524
1525
1526
1527

















    };
    fx.checkout.page({
        ORDER: order,
        CUSTOMER: cust,
        onData: cbOnData
    });
};











fx.pos.deposit = {
    page : function() {
        var orderData = fx.pos.getOrder();
        if( !orderData.customerId ) {
            kxie.ui.msg.info({
                message: "请先确定一个 VIP 客户!",
................................................................................
            + (line.DESCRIPTION ? "<br/>" + line.DESCRIPTION + "; ": "")
            + (line.DISCOUNTABLE===true ? "" : "总额优惠%不适用")
          ;
    }
    return html;
};

























>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
....
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
    };
    fx.checkout.page({
        ORDER: order,
        CUSTOMER: cust,
        onData: cbOnData
    });
};

fx.pos.onExchange = function(event) {
    const kxWrap = $(event.target).closest(".kxWrap").get(0);
    const cbOnData = function(argsOnData) {
        const saleLine = argsOnData.data;
    };
    fx.exchange.page({
        onData: cbOnData
    });
};

fx.pos.deposit = {
    page : function() {
        var orderData = fx.pos.getOrder();
        if( !orderData.customerId ) {
            kxie.ui.msg.info({
                message: "请先确定一个 VIP 客户!",
................................................................................
            + (line.DESCRIPTION ? "<br/>" + line.DESCRIPTION + "; ": "")
            + (line.DISCOUNTABLE===true ? "" : "总额优惠%不适用")
          ;
    }
    return html;
};

/** refund exchange */
fx.exchange = {};

fx.exchange.page = function(args) {
    if( args===undefined  ) return;
    const cbOnLoad = function(cbArgs) {
    };
    kxie.ui.page.show({
        url : "html/pos/exchange.html",
        onLoad: cbOnLoad,
        onData: args.onData,
        width: "40rem"
    });
};

/** end of refund exchange */