package com.topsun.posclient.sales.ui.gold; import java.util.List; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; import com.topsun.posclient.datamodel.Item; import com.topsun.posclient.datamodel.PartSales; /** * @author Dong * */ public class PartSalesManager { private TableViewer salesProductTableView; private Label salesTotlePrice; private Text docNum;//零售单据编号 private Text oldDocNum;//旧金单据编号 private Text cardNo;//会员卡号 private Text memberName;//会员姓名 private Text point;//会员积分 private Text phone;//电话号码 public Text cashBack;//现金找补 private Text totalAmount;//合计金额 private TableViewer cashierModelTableViewer;//结算方式表格 private PartSales partSales;//零售信息 private PartSales beforeZeroAndDiscountPartSales;//折扣和抹零之前的零售信息 private List<Item> itemTempList;//促销之前单品列表 private int printNum;//发票打印张数 public PartSales getBeforeZeroAndDiscountPartSales() { return beforeZeroAndDiscountPartSales; } public void setBeforeZeroAndDiscountPartSales( PartSales beforeZeroAndDiscountPartSales) { this.beforeZeroAndDiscountPartSales = beforeZeroAndDiscountPartSales; } public final Text getCashBack() { return cashBack; } public final void setCashBack(Text cashBack) { this.cashBack = cashBack; } public final int getPrintNum() { return printNum; } public final void setPrintNum(int printNum) { this.printNum = printNum; } public final List<Item> getItemTempList() { return itemTempList; } public final void setItemTempList(List<Item> itemTempList) { this.itemTempList = itemTempList; } public final PartSales getPartSales() { return partSales; } public final void setPartSales(PartSales partSales) { this.partSales = partSales; // PartSales standbyPartSales = partSales.clone(); // standbyPartSales.setBalloter(partSales.getBalloter()); // standbyPartSales.setBookDocNum(partSales.getBookDocNum()); // standbyPartSales.setCashBackAmount(partSales.getCashBackAmount()); // standbyPartSales.setCashierModelList(partSales.getCashierModelList()); // standbyPartSales.setCountAmount(partSales.getCountAmount()); // standbyPartSales.setDiscountAccount(partSales.getDiscountAccount()); // standbyPartSales.setDiscountAmount(partSales.getDiscountAmount()); // standbyPartSales.setDiscountRate(partSales.getDiscountRate()); // standbyPartSales.setDiscountToZero(partSales.getDiscountToZero()); // standbyPartSales.setDocNum(partSales.getDocNum()); // standbyPartSales.setInvoiceCode(partSales.getInvoiceCode()); // standbyPartSales.setIsReplace(partSales.getIsReplace()); // standbyPartSales.setInvoiceNumber(partSales.getInvoiceNumber()); // standbyPartSales.setIsReturn(partSales.getIsReturn()); // standbyPartSales.setItemList(partSales.getItemList()); // standbyPartSales.setMlimit(partSales.isMlimit()); // standbyPartSales.setMratio(partSales.isMratio()); // standbyPartSales.setOgDocNum(partSales.getOgDocNum()); // standbyPartSales.setSalesDate(partSales.getSalesDate()); // standbyPartSales.setSalesType(partSales.getSalesType()); // standbyPartSales.setShopId(partSales.getShopId()); // standbyPartSales.setSourceNum(partSales.getSourceNum()); // standbyPartSales.setUsePoint(partSales.getUsePoint()); // standbyPartSales.setVip(partSales.isVip()); // standbyPartSales.setVipUser(partSales.getVipUser()); // this.backPartSales = standbyPartSales; } public final TableViewer getCashierModelTableViewer() { return cashierModelTableViewer; } public final void setCashierModelTableViewer(TableViewer cashierModelTableViewer) { this.cashierModelTableViewer = cashierModelTableViewer; } public final Text getTotalAmount() { return totalAmount; } public final void setTotalAmount(Text totalAmount) { this.totalAmount = totalAmount; } public final Text getCardNo() { return cardNo; } public final void setCardNo(Text cardNo) { this.cardNo = cardNo; } public final Text getMemberName() { return memberName; } public final void setMemberName(Text memberName) { this.memberName = memberName; } public final Text getPoint() { return point; } public final void setPoint(Text point) { this.point = point; } public final Text getPhone() { return phone; } public final void setPhone(Text phone) { this.phone = phone; } public final Text getDocNum() { return docNum; } public final void setDocNum(Text docNum) { this.docNum = docNum; } public Label getSalesTotlePrice() { return salesTotlePrice; } public void setSalesTotlePrice(Label salesTotlePrice) { this.salesTotlePrice = salesTotlePrice; } public TableViewer getSalesProductTableView() { return salesProductTableView; } public void setSalesProductTableView(TableViewer salesProductTableView) { this.salesProductTableView = salesProductTableView; } public final Text getOldDocNum() { return oldDocNum; } public final void setOldDocNum(Text oldDocNum) { this.oldDocNum = oldDocNum; } private static PartSalesManager goldSalesManager = new PartSalesManager(); private PartSalesManager(){ } public static PartSalesManager getInstance(){ if (goldSalesManager == null){ goldSalesManager = new PartSalesManager(); return goldSalesManager; } return goldSalesManager; } }