58 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Java
		
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Java
		
	
	
	
package tqq9.lc123.cloud.app.plugin.form.sys;
 | 
						|
 | 
						|
import kd.bos.bill.AbstractBillPlugIn;
 | 
						|
import kd.bos.dataentity.entity.LocaleString;
 | 
						|
import kd.bos.dataentity.utils.StringUtils;
 | 
						|
import kd.bos.entity.datamodel.events.ChangeData;
 | 
						|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
 | 
						|
import kd.bos.form.field.ComboEdit;
 | 
						|
import kd.bos.form.field.ComboItem;
 | 
						|
import kd.bos.logging.Log;
 | 
						|
import kd.bos.logging.LogFactory;
 | 
						|
import kd.sdk.plugin.Plugin;
 | 
						|
 | 
						|
import java.util.ArrayList;
 | 
						|
import java.util.List;
 | 
						|
 | 
						|
/**
 | 
						|
 * 客户界面插件
 | 
						|
 * 基础资料根据结算方式过滤客户结算方式
 | 
						|
 */
 | 
						|
public class CustomerBillPlugin extends AbstractBillPlugIn implements Plugin {
 | 
						|
    private final static Log logger = LogFactory.getLog(CustomerBillPlugin.class);
 | 
						|
 | 
						|
    @Override
 | 
						|
    public void propertyChanged(PropertyChangedArgs e) {
 | 
						|
        super.propertyChanged(e);
 | 
						|
        String itemKey = e.getProperty().getName();
 | 
						|
        ChangeData[] changeSet = e.getChangeSet();
 | 
						|
        if (StringUtils.equals("tqq9_settlementtype", itemKey)) {
 | 
						|
            String settlementtype = (String) changeSet[0].getNewValue();
 | 
						|
            List<ComboItem> comboItems = new ArrayList<>();
 | 
						|
            ComboEdit comboEdit = (ComboEdit) this.getControl("tqq9_khjslx");
 | 
						|
            if ("B".equals(settlementtype)) {
 | 
						|
                ComboItem comboItem = new ComboItem();
 | 
						|
                ComboItem comboItem1 = new ComboItem();
 | 
						|
                comboItem.setCaption(new LocaleString("现结"));
 | 
						|
                comboItem1.setCaption(new LocaleString("货到付款"));
 | 
						|
                comboItem.setValue("A");
 | 
						|
                comboItem1.setValue("B");
 | 
						|
                comboItems.add(comboItem);
 | 
						|
                comboItems.add(comboItem1);
 | 
						|
                comboEdit.setComboItems(comboItems);
 | 
						|
            } else if ("A".equals(settlementtype)) {
 | 
						|
                ComboItem comboItem = new ComboItem();
 | 
						|
                ComboItem comboItem1 = new ComboItem();
 | 
						|
                comboItem.setCaption(new LocaleString("单店月结"));
 | 
						|
                comboItem1.setCaption(new LocaleString("连锁月结"));
 | 
						|
                comboItem.setValue("C");
 | 
						|
                comboItem1.setValue("D");
 | 
						|
                comboItems.add(comboItem);
 | 
						|
                comboItems.add(comboItem1);
 | 
						|
                comboEdit.setComboItems(comboItems);
 | 
						|
            }else{
 | 
						|
                comboEdit.setComboItems(comboItems);
 | 
						|
            }
 | 
						|
        }
 | 
						|
    }
 | 
						|
} |