var el = {
    businessTypeCode: '#businessTypeCode',
    files: '#files',
    id:'#ids'

};
$(function () {
    $(el.businessTypeCode).combobox({
        required: true,
        valueField: 'code',
        textField: 'name',
        limitToList: 'true',
        data: [
            {'name': '材料购销合同', 'code': 'purchase_sale_contract'},
            {'name': '加工费合同', 'code': 'purchase_sale_process_contract'}
        ],
        editable: false,
        prompt: '--- 请选择 ---',
        panelHeight: 'auto',
    });
});
/**
 * 确定过账
 */
function confirm(call) {
    var businessTypeCode = $(el.businessTypeCode).combobox('getValue');
    var files = $(el.files).attr('data-fileIds');
    if(!businessTypeCode){
        topWin.layer.alert('请选择合同类型', {icon: 0});
        return false;
    }
    if(!files){
        topWin.layer.alert('请上传合同附件', {icon: 0});
        return false;
    }
    var param = {
        businessTypeCode : businessTypeCode,
        files : files
    }
    call(param);
}
