Commit ecb97520 authored by kevin's avatar kevin

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents e68f97ab 61649b25
......@@ -31,7 +31,7 @@ public class CitImportExcelController {
@RequestMapping(value = "/citImportExcel", method = RequestMethod.POST)
public @ResponseBody
OperationResultDto citImportExcel(@RequestParam MultipartFile file, @RequestParam String orgIds,
OperationResultDto citImportExcel(@RequestParam MultipartFile file, @RequestParam(required = false) String orgIds,
@RequestParam String periodDate,
@RequestParam Integer importType,
@RequestParam Integer importFileType){
......
......@@ -9,6 +9,7 @@ import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.dpo.PagingDto;
import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.dto.dataimport.DataImportParam;
import pwc.taxtech.atms.dto.dataimport.DataProcessParam;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam;
......@@ -218,6 +219,12 @@ public class DataImportController extends BaseController {
return new CamelPagingResultDto<>(dataImportService.displayImportLog(param));
}
@ResponseBody
@RequestMapping(value = "displayProcessLog", method = RequestMethod.POST)
public CamelPagingResultDto<DataValidateLogDto> displayProcessLog(@RequestBody DataProcessParam param) {
return new CamelPagingResultDto<>(dataImportService.displayProcessLog(param));
}
@ResponseBody
@RequestMapping(value = "callExtractFinancialData", method = RequestMethod.POST)
public OperationResultDto callExtractFinancialData(@RequestBody DataExtractParam dataExtractParam) {
......
......@@ -46,7 +46,7 @@ import java.util.List;
@RestController
@RequestMapping(value = "api/v1/template")
public class TemplateController extends BaseController implements ServletContextAware {
public class TemplateController extends BaseController{
private ServletContext servletContext;
......@@ -242,7 +242,6 @@ public class TemplateController extends BaseController implements ServletContext
@RequestMapping(value = "file/downloadTemplate", method = RequestMethod.GET)
public void fileDownload(@RequestParam Integer fileType, @RequestParam(required=false) Integer serviceType, HttpServletResponse response){
//获取网站部署路径(通过ServletContext对象),用于确定下载文件位置,从而实现下载
String path = servletContext.getRealPath("/")+"\\WEB-INF\\classes";
String fileName = "";
if(serviceType == null){
fileName = getFileName(fileType);
......@@ -252,9 +251,8 @@ public class TemplateController extends BaseController implements ServletContext
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName="+fileName+".xlsx");
ServletOutputStream out;
File file = new File(path + "\\document\\DataImport\\" + fileName+".xlsx");
try {
FileInputStream inputStream = new FileInputStream(file);
InputStream inputStream = this.getClass().getResourceAsStream("/document/DataImport/" + fileName+".xlsx");
out = response.getOutputStream();
int b = 0;
byte[] buffer = new byte[512];
......@@ -314,9 +312,4 @@ public class TemplateController extends BaseController implements ServletContext
return null;
}
@Override
public void setServletContext(ServletContext servletContext) {
this.servletContext = servletContext;
}
}
......@@ -156,4 +156,17 @@ public class TemplateGroupController {
return OperationResultDto.error(ErrorMessage.SystemError);
}
@RequestMapping(value = "withoutTemplate", method = RequestMethod.POST)
public @ResponseBody OperationResultDto withoutTemplate(@RequestBody TemplateGroupDto templateGroupDto) {
try {
templateGroupService.addTemplateGroupWithoutTemplate(templateGroupDto);
return OperationResultDto.success();
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("withoutTemplate error.", e);
}
return OperationResultDto.error(ErrorMessage.SystemError);
}
}
package pwc.taxtech.atms.dto.dataimport;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
public class DataProcessParam {
private CamelPagingDto pageInfo;
//后续添加查询条件
public CamelPagingDto getPageInfo() {
return this.pageInfo;
}
public void setPageInfo(CamelPagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
......@@ -25,6 +25,7 @@ import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class CitImportExcelServiceImpl extends BaseService {
......@@ -172,6 +173,10 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLogError.setRecordSize(1);
//获取该行数据
Row rowData = sheet.getRow(rowNum);
if(rowData == null){
citDataImportLogError.setErrorMsg("数据错误,第"+(rowNum+1)+"整行为空");
citDataImportLogList.add(citDataImportLogError);
}
//拼接日记账调整版的实体
CitJournalEntryAdjust citJournal = new CitJournalEntryAdjust();
citJournal.setId(idService.nextId());
......@@ -180,12 +185,27 @@ public class CitImportExcelServiceImpl extends BaseService {
citJournal.setCreatedBy(currentUserName);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
citJournal.setAccountPeriod(new Integer(CitCommonUtil.getValue(rowData.getCell(2)).toString().replace("-", "")));
Object cellValue = CitCommonUtil.getValue(rowData.getCell(2));
if(cellValue == null){
citDataImportLogError.setErrorMsg("数据错误,第"+(rowNum+1)+"行会计期间为空");
citDataImportLogList.add(citDataImportLogError);
continue;
}
citJournal.setAccountPeriod(new Integer(cellValue.toString().replace("-", "")));
citJournal.setAccountingDate(sdf.parse(CitCommonUtil.getValue(rowData.getCell(3)).toString()));
citJournal.setVoucherNum(CitCommonUtil.getValue(rowData.getCell(7)).toString());
citJournal.setDescription(CitCommonUtil.getValue(rowData.getCell(8)).toString());
citJournal.setOrgCode(CitCommonUtil.getValue(rowData.getCell(9)).toString());
Object cellValue = CitCommonUtil.getValue(rowData.getCell(11));
cellValue = CitCommonUtil.getValue(rowData.getCell(9));
if(cellValue == null){
citDataImportLogError.setErrorMsg("数据错误,第"+(rowNum+1)+"行主体为空");
citDataImportLogList.add(citDataImportLogError);
continue;
}
citJournal.setOrgCode(cellValue.toString());
cellValue = CitCommonUtil.getValue(rowData.getCell(11));
if(cellValue == null){
citDataImportLogError.setErrorMsg("数据错误,第"+(rowNum+1)+"行科目代码为空");
citDataImportLogList.add(citDataImportLogError);
......@@ -518,7 +538,7 @@ public class CitImportExcelServiceImpl extends BaseService {
List<CitDataImportLog> citDataImportLogList = new ArrayList<>();
// Integer period = CitCommonUtil.getPeriod();
String companyName = CitCommonUtil.getValue(sheet.getRow(5).getCell(1)).toString();
List<Organization> organizations = getOrganizationByName(companyName);
List<Organization> organizations = getOrganizationByName(companyName).stream().filter(r->r.getCode()!=null&&!("".equals(r.getCode()))).collect(Collectors.toList());
String companyCode = "";
String orgId = "";
String taxPayerId = "";
......@@ -528,6 +548,7 @@ public class CitImportExcelServiceImpl extends BaseService {
if(!orgList.contains(orgId)){
saveResult.setResult(false);
saveResult.setData(false);
saveResult.setResultMsg(ErrorMessageCN.DoNotSelectCompany);
return saveResult;
}
......@@ -537,6 +558,7 @@ public class CitImportExcelServiceImpl extends BaseService {
}else{
saveResult.setResult(false);
saveResult.setData(false);
saveResult.setResultMsg(ErrorMessageCN.NoCompanyError);
return saveResult;
}
......@@ -573,7 +595,6 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLogList.add(citDataImportLogError);
continue;
}
System.out.println(cellValue);
citBSPrcAdjust.setBegBal(new BigDecimal(cellValue.toString().replace(",","")));
......@@ -869,7 +890,7 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLogList.add(citDataImportLogError);
continue;
}
String companyCode = cellValueCode.toString();
String companyCode = cellValueCode.toString().replace(".0","");
//根据code(主体)获取机构相关信息
List<Organization> organizations = getOrganizationByCode(companyCode);
String companyName = "";
......@@ -950,7 +971,9 @@ public class CitImportExcelServiceImpl extends BaseService {
citSalaryAdvanceMapper.deleteByExample(example);
updateImportLog(EnumCitImportType.SalaryAdvance.getCode());
}
int insertBatchNum = citSalaryAdvanceMapper.insertBatch(citSalaryAdvanceList);
if(citSalaryAdvanceList.size()>0){
int insertBatchNum = citSalaryAdvanceMapper.insertBatch(citSalaryAdvanceList);
}
//循环遍历成功导入的数据,组装日志记录实体并放入集合
for (Map.Entry<String, Integer> entry : companySuccessMap.entrySet()) {
......
......@@ -23,8 +23,10 @@ import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dpo.OrgSelectDto;
import pwc.taxtech.atms.dto.DataExtractParam;
import pwc.taxtech.atms.dto.DataImportLogDto;
import pwc.taxtech.atms.dto.DataValidateLogDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.dataimport.DataImportParam;
import pwc.taxtech.atms.dto.dataimport.DataProcessParam;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam;
import pwc.taxtech.atms.entity.*;
......@@ -55,6 +57,8 @@ public class DataImportService extends BaseService {
@Resource
private DataImportLogMapper dataImportLogMapper;
@Resource
private DataValidateLogMapper dataValidateLogMapper;
@Resource
private ProfitLossStatementMapper profitLossStatementMapper;
@Resource
private BalanceSheetManualMapper balanceSheetManualMapper;
......@@ -1628,7 +1632,6 @@ public class DataImportService extends BaseService {
return res;
}
/**
* 25/02/2019 18:52
*
......@@ -1662,6 +1665,35 @@ public class DataImportService extends BaseService {
return pageInfo;
}
/**
* 25/02/2019 18:52
*
* [type]
* @author Gary J Li
* @return
*
*/
public PageInfo<DataValidateLogDto> displayProcessLog(DataProcessParam param) {
DataValidateLogExample example = new DataValidateLogExample();
DataValidateLogExample.Criteria criteria =example.createCriteria();
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
List<String> orgIds = organizationService.getMyOrgList().stream().map(OrgSelectDto::getId).collect(Collectors.toList());
// 这里会导致任何人都可以看到未映射到主体的数据
orgIds.add("");
criteria.andOrganizationIdIn(orgIds);
example.setOrderByClause("update_time desc");
PageInfo<DataValidateLogDto> pageInfo = new PageInfo<>(dataValidateLogMapper.selectByExample(example).stream()
.map(o -> beanUtil.copyProperties(o, new DataValidateLogDto())).collect(Collectors.toList()));
pageInfo.setTotal(page.getTotal());
return pageInfo;
}
public OperationResultDto callExtractFinancialData(DataExtractParam dataExtractParam) {
// todo 调用滴滴的http财务数据抽取调用接口 List<String> codes, Integer period, List<Integer> dataTypes
OrganizationExample example = new OrganizationExample();
......
......@@ -38,10 +38,8 @@ import pwc.taxtech.atms.entity.TemplateGroup;
import pwc.taxtech.atms.entity.TemplateGroupExample;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.vat.dao.PeriodDataSourceMapper;
import pwc.taxtech.atms.vat.entity.PeriodCellData;
import pwc.taxtech.atms.vat.entity.PeriodDataSource;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.math.BigDecimal;
......@@ -527,6 +525,28 @@ public class TemplateGroupServiceImpl extends AbstractService {
}
@Transactional
public void addTemplateGroupWithoutTemplate(TemplateGroupDto templateGroupDto) throws ServiceException {
List<TemplateGroup> groupList = templateGroupDao.getByGroupName(templateGroupDto.getName());
if (CollectionUtils.isNotEmpty(groupList)) {
throw new ServiceException(TemplateMessage.TemplateGroupNameExist);
}
try {
TemplateGroup templateGroup=new TemplateGroup();
CommonUtils.copyProperties(templateGroupDto,templateGroup);
Long newGroupId = distributedIdService.nextId();
Date now = new Date();
templateGroup.setId(newGroupId);
templateGroup.setCreateTime(now);
templateGroup.setUpdateTime(now);
templateGroup.setName(templateGroupDto.getName());
templateGroupMapper.insertSelective(templateGroup);
} catch (Exception e) {
logger.error("addTemplateGroupWithoutTemplate error.", e);
throw new ServiceException(ErrorMessage.SystemError);
}
}
private List<CellTemplateConfig> getByTemplateId(Long id) {
CellTemplateConfigExample example = new CellTemplateConfigExample();
CellTemplateConfigExample.Criteria criteria = example.createCriteria();
......
......@@ -106,5 +106,5 @@ public interface CitSalaryAdvanceMapper extends MyMapper {
*/
int updateByPrimaryKey(CitSalaryAdvance record);
int insertBatch(List<CitSalaryAdvance> citSalaryAdvanceList);
int insertBatch(List<CitSalaryAdvance> list);
}
\ No newline at end of file
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entity.DataValidateLog;
import pwc.taxtech.atms.entity.DataValidateLogExample;
@Mapper
public interface DataValidateLogMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
long countByExample(DataValidateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int deleteByExample(DataValidateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int insert(DataValidateLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int insertSelective(DataValidateLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
List<DataValidateLog> selectByExampleWithRowbounds(DataValidateLogExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
List<DataValidateLog> selectByExample(DataValidateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
DataValidateLog selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") DataValidateLog record, @Param("example") DataValidateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int updateByExample(@Param("record") DataValidateLog record, @Param("example") DataValidateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(DataValidateLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int updateByPrimaryKey(DataValidateLog record);
}
\ No newline at end of file
......@@ -49,7 +49,7 @@
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.createBy != null">#{item.createdBy,jdbcType=VARCHAR},</when>
<when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
......
......@@ -49,7 +49,7 @@
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.createBy != null">#{item.createdBy,jdbcType=VARCHAR},</when>
<when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
......
......@@ -29,8 +29,8 @@
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.poNo != null">#{item.poNo,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
<when test="item.poNo != null">#{item.poNo,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.poSubjectCode != null">#{item.poSubjectCode,jdbcType=VARCHAR},</when>
......
......@@ -21,8 +21,8 @@
<select id="getTemplateUniqDtosByTemplateAndTemplateGroup" parameterType="map" resultMap="TemplateUniqDto">
SELECT
P.id as ID,
p.code as Code,
p.name as Name,
P.code as Code,
P.name as Name,
P.report_type as ReportType,
Q.id AS TEMPLATE_GROUP_ID,
Q.name AS TEMPLATE_GROUP_NAME,
......
......@@ -1420,6 +1420,24 @@ var dataImpModule = angular.module('app.dataImp', ['ui.grid', 'ui.router','ui.gr
sticky: true
});
$stateProvider.state({
name: 'recordProcessLog',
url: "/dataImportLog/dataProcessingCheck",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<process-log></process-log>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.dataImp),
sticky: true
});
$stateProvider.state({
name: 'certifiedInvoicesListImportDistribution',
url: "/importDistribution/certifiedInvoicesList",
......
......@@ -149,5 +149,6 @@
"ErrorMesssage": "Error Message",
"ImportPartialSuccess":"Import with some errors",
"ImportErrorMsg":"Three are {NumberOfError} error(s),Please revise and import again(only import the error record(s)).",
"CustomerImportDataFormatError" :"Import customer list with data format error"
}
\ No newline at end of file
"CustomerImportDataFormatError" :"Import customer list with data format error",
"UnSave": "You need save first!"
}
\ No newline at end of file
......@@ -1880,6 +1880,15 @@
"extractInvoiceData": "Extract Invoice Data",
"ExtractInvoiceDataTitle": "Extract Invoice Data",
"TBInterCompany": "Inter-Company",
"~MustBeEndOneApp": "I Must be the End One, please!",
"dataValidate" : "data Validate"
"dataValidate" : "data Validate",
"DataProcessLog": "Data Process Log",
"DataProcessLogTitle": "Data Process Log",
"ValidateContent": "Validate Content",
"ValidateResult": "Validate Result",
"ResultMsg": "Result Message",
"Operater": "Operater",
"OperateTime": "Operate Time",
"~MustBeEndOneApp": "I Must be the End One, please!"
}
\ No newline at end of file
......@@ -402,6 +402,7 @@
"VendorListManageVLNameRequired": "供应商名称不能为空",
"WordLibraryTitle": "字库",
"notAllowDisableMessage": "机构中已关联,不允许停用",
"UnSave": "未点击保存按钮!",
"~MustBeEndOneApp": "I Must be the End One, please!"
}
\ No newline at end of file
......@@ -2122,6 +2122,9 @@
"SelectedOrganization": "选择机构",
"SelectedDataType": "选择数据类型",
"DataProcessLog": "数据处理校验记录",
"DataProcessLogTitle": "数据处理校验记录",
"extractFinancialData": "财务数据抽取",
"ExtractFinancialDataTitle": "财务数据抽取",
......@@ -2147,7 +2150,7 @@
"RevenueGetOrgError": "获取机构信息失败",
"RevenueAddSuccess": "添加成功",
"RevenueUpdateSuccess": "更新成功",
"dataValidate" : "数据校验",
"dataValidate": "数据校验",
"RevDetail": "收入明细",
"RevSearchAccountCode": "科目代码",
"RevSearchAccountName": "科目名称",
......@@ -2173,61 +2176,43 @@
"RevDetailType": "收入类型",
"RevDetailCategory": "收入类别",
"RevDetailTaxOn": "计税方法",
"RevDetail": "收入明细",
"RevSearchAccountCode": "科目代码",
"RevSearchAccountName": "科目名称",
"RevSearchProfitCenterCode": "利润中心代码",
"RevSearchProfitCenterName": "利润中心名称",
"RevSearchProductCode": "产品代码",
"RevSearchProductName": "产品名称",
"RevSearchType": "收入类型",
"RevSearchCategory": "收入类别",
"RevSearchTaxOn": "计税方法",
"RevDetailSearch": "查询",
"RevDetailReset": "重置",
"RevDetailColSerialNo": "序号",
"RevDetailColSubject": "主体",
"RevDetailColAccount": "科目",
"RevDetailColProfitCenter": "利润中心",
"RevDetailProduct": "产品",
"RevDetailColSubjectExp": "主体说明",
"RevDetailColAccountExp": "科目说明",
"RevDetailColProfitCenterExp": "利润中心说明",
"RevDetailProductExp": "产品说明",
"RevDetailAmount": "发生额",
"RevDetailType": "收入类型",
"RevDetailCategory": "收入类别",
"RevDetailTaxOn": "计税方法",
"BillDetail": "开票明细",
"BillEditRevenueType": "编辑收入类型",
"BillDtlHandle": "操作",
"BillSearchType": "发票类型",
"BillSearchCustomer": "客户名称",
"BillSearchProfitCenter": "利润中心代码",
"BillSearchContent": "开票内容",
"BillSearchDate": "开票日期",
"BillSearchRevenueType": "收入类型",
"BillSearchDepartment": "申请部门",
"BillSearchTaxRate": "税率",
"BillSearchNumber": "发票号码",
"BillDtlSearch": "查询",
"BillDtlReset": "重置",
"BillDtlMoreSearch": "更多查询",
"BillDtlShrink": "收起",
"BillDtlColSerialNo": "序号",
"BillDtlColSubject": "开票主体",
"BillDtlColCustCompany": "客户公司名称",
"BillDtlColType": "发票类型",
"BillDtlColContent": "开票内容",
"BillDtlColAmount": "开票金额",
"BillDtlColTaxRate": "税率",
"BillDtlColTaxAmount": "税额",
"BillDtlColOANo": "OA申请单号",
"BillDtlColDepartment": "所属部门",
"BillDtlColDate": "开票日期",
"BillDtlColCode": "发票代码",
"BillDtlColNumber": "发票号码",
"BillDtlColRevenueType": "收入类型",
"BillDtlUpdateSuccess": "更新成功",
"BillDetail": "开票明细",
"BillEditRevenueType": "编辑收入类型",
"BillDtlHandle": "操作",
"BillSearchType": "发票类型",
"BillSearchCustomer": "客户名称",
"BillSearchProfitCenter": "利润中心代码",
"BillSearchContent": "开票内容",
"BillSearchDate": "开票日期",
"BillSearchRevenueType": "收入类型",
"BillSearchDepartment": "申请部门",
"BillSearchTaxRate": "税率",
"BillSearchNumber": "发票号码",
"BillDtlSearch": "查询",
"BillDtlReset": "重置",
"BillDtlMoreSearch": "更多查询",
"BillDtlShrink": "收起",
"BillDtlColSerialNo": "序号",
"BillDtlColSubject": "开票主体",
"BillDtlColCustCompany": "客户公司名称",
"BillDtlColType": "发票类型",
"BillDtlColContent": "开票内容",
"BillDtlColAmount": "开票金额",
"BillDtlColTaxRate": "税率",
"BillDtlColTaxAmount": "税额",
"BillDtlColOANo": "OA申请单号",
"BillDtlColDepartment": "所属部门",
"BillDtlColDate": "开票日期",
"BillDtlColCode": "发票代码",
"BillDtlColNumber": "发票号码",
"BillDtlColRevenueType": "收入类型",
"BillDtlUpdateSuccess": "更新成功",
"ValidateContent": "校验内容",
"ValidateResult": "校验结果",
"ResultMsg": "校验信息",
"Operater": "操作员",
"OperateTime": "操作时间",
"~MustBeEndOneApp": "我必须是最后一个!"
}
......@@ -2176,7 +2176,6 @@
},
function (isConfirm) {
if (isConfirm) {
// 选中
updateOrgExtraInfo($scope.selectCompany.id);
}
......@@ -2184,24 +2183,27 @@
};
var updateOrgExtraInfo = function (id) {
var data = $scope.editOrgExtraModel;
data.organizationId = id;
orgService.updateOrgExtraInfoByOrgId(data).success(function (data) {
if (data && !data.result) {
SweetAlert.warning($translate.instant(data.resultMsg));
debugger;
var editData = $scope.editOrgExtraModel;
editData.organizationId = id;
orgService.updateOrgExtraInfoByOrgId(editData).success(function (res) {
if (res && !res.result) {
SweetAlert.warning($translate.instant(res.resultMsg));
return;
}
orgService.getSingleOrgExtra(id).success(function (data) {
if (data==null) {
SweetAlert.warning($translate.instant(data.resultMsg));
return;
}
$scope.selectCompanyExtra = data;
$scope.editOrgExtraModel = angular.copy(data);
generalSelectCompanyExtraText();
$scope.updateOrgExtraCancel();
SweetAlert.success($translate.instant('OrganizationExtraInfoEditSuccess'));
});
if (res) {
orgService.getSingleOrgExtra(id).success(function (data) {
if (data == null) {
SweetAlert.warning($translate.instant(data.resultMsg));
return;
}
$scope.editOrgExtraModel = angular.copy(data);
generalSelectCompanyExtraText();
$scope.updateOrgExtraCancel();
$scope.selectCompanyExtra = data;
SweetAlert.success($translate.instant('OrganizationExtraInfoEditSuccess'));
});
}
});
};
......@@ -2232,16 +2234,19 @@
var generalSelectCompanyText = function(){
if($scope.selectCompany.engageNationalProhibitIndustry!=null){
$scope.selectCompany.engageNationalProhibitIndustry = $scope.selectCompany.engageNationalProhibitIndustry?"是":"否";
$scope.selectCompany.engageNationalProhibitIndustryStr = $scope.selectCompany.engageNationalProhibitIndustry?"是":"否";
}
if($scope.selectCompany.nationalEconomicIndustry!=null){
$scope.nationalEconomicIndustryList.map(function(value,index){
if (value.code === $scope.selectCompany.nationalEconomicIndustry) {
$scope.selectCompany.nationalEconomicIndustry = value.code+"-"+value.type;
$scope.selectCompany.nationalEconomicIndustryStr = value.code+"-"+value.type;
return;
}
});
if(null==$scope.selectCompany.nationalEconomicIndustryStr||""===$scope.selectCompany.nationalEconomicIndustryStr){
$scope.selectCompany.nationalEconomicIndustryStr=$scope.selectCompany.nationalEconomicIndustry;
}
}
};
......
......@@ -140,7 +140,7 @@
<div class="form-group" ng-show="!isInternational">
<div class="col-sm-12">
<span class="control-label"> {{'NationalEconomicIndustry' | translate}}:<span
title="{{selectCompany.nationalEconomicIndustry}}">{{selectCompany.nationalEconomicIndustry }}</span></span>
title="{{selectCompany.nationalEconomicIndustry}}">{{selectCompany.nationalEconomicIndustryStr }}</span></span>
</div>
</div>
<div class="form-group">
......@@ -203,7 +203,7 @@
<div class="form-group" ng-show="!isInternational">
<div class="col-sm-12">
<span class="control-label"> {{'EngageNationalProhibitIndustry' | translate}}:<span
title="{{selectCompany.engageNationalProhibitIndustry}}">{{selectCompany.engageNationalProhibitIndustry}}</span></span>
title="{{selectCompany.engageNationalProhibitIndustry}}">{{selectCompany.engageNationalProhibitIndustryStr}}</span></span>
</div>
</div>
</div>
......@@ -785,7 +785,7 @@
<div class="form-group" ng-show="isInternational">
<div class="col-sm-12">
<span class="control-label">{{'FiscalYearDeadline' | translate}}:<span
title="{{selectCompanyExtra.fiscalYearDeadline}}">{{selectCompanyExtra.fiscalYearDeadline }}</span>
title="{{selectCompanyExtra.fiscalYearDeadline}}">{{selectCompanyExtra.fiscalYearDeadline|date:'yyyy-MM-dd'}}</span>
<input class="input-group" style="display: none"
ng-model="editOrgExtraModel.fiscalYearDeadline"
title="{{selectCompanyExtra.fiscalYearDeadline}}"
......
......@@ -120,18 +120,14 @@
defaultValue = find;
$scope.templateGroupId = find.id;
}
else {
$scope.curTemplateGroup = null;
}
}
dxControl.renderTemplateGroupDropDown(templateGroupData, defaultValue);
if (templateGroupData && templateGroupData.length > 0) {
loadReportType();
} else {
$('#dx-select-template-groups').dxDropDownBox('instance').option('dataSource', []);
$('#dx-select-template').dxDropDownBox('instance').option('dataSource', []);
}
loadReportType();
});
}
};
......@@ -147,39 +143,48 @@
}
};
if ($scope.curTemplateGroup && $scope.curTemplateGroup.id) {
if ($scope.curServiceTypeId === enums.serviceType.CIT) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: citReportTypeList
});
$scope.detailReportTypeList.value = citReportTypeList[0].name;
$('#dx-select-report-type').dxSelectBox('instance').option($scope.detailReportTypeList);
$scope.reportType = citReportTypeList[0];
listTemplates();
} else if ($scope.curServiceTypeId === enums.serviceType.CF) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: cfReportTypeList
});
$scope.detailReportTypeList.value = cfReportTypeList[1].name;
$('#dx-select-report-type').dxSelectBox('instance').option($scope.detailReportTypeList);
$scope.reportType = cfReportTypeList[1];
listTemplates();
} else if ($scope.curServiceTypeId === enums.serviceType.Others) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: citReportTypeList
});
$scope.detailReportTypeList.value = citReportTypeList[0].name;
$('#dx-select-report-type').dxSelectBox('instance').option($scope.detailReportTypeList);
$scope.reportType = citReportTypeList[0];
listTemplates();
} else {
$('#dx-select-report-type').dxSelectBox('instance').option('dataSource', []);
$scope.reportType = null;
listTemplates();
}
if ($scope.curServiceTypeId === enums.serviceType.VAT) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
var ds = _.filter(citReportTypeList, function (item) { return item.value == 1 || item.value == 3 || item.value == 4 });
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: ds
});
$scope.detailReportTypeList.value = citReportTypeList[0].name;
$('#dx-select-report-type').dxSelectBox('instance').option($scope.detailReportTypeList);
$scope.reportType = citReportTypeList[0];
listTemplates();
} else if ($scope.curServiceTypeId === enums.serviceType.CIT) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: citReportTypeList
});
$scope.detailReportTypeList.value = citReportTypeList[0].name;
$('#dx-select-report-type').dxSelectBox('instance').option($scope.detailReportTypeList);
$scope.reportType = citReportTypeList[0];
listTemplates();
} else if ($scope.curServiceTypeId === enums.serviceType.CF) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: cfReportTypeList
});
$scope.detailReportTypeList.value = cfReportTypeList[1].name;
$('#dx-select-report-type').dxSelectBox('instance').option($scope.detailReportTypeList);
$scope.reportType = cfReportTypeList[1];
listTemplates();
} else if ($scope.curServiceTypeId === enums.serviceType.Others) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: citReportTypeList
});
$scope.detailReportTypeList.value = citReportTypeList[0].name;
$('#dx-select-report-type').dxSelectBox('instance').option($scope.detailReportTypeList);
$scope.reportType = citReportTypeList[0];
listTemplates();
} else {
$('#dx-select-report-type').dxSelectBox('instance').option('dataSource', []);
$scope.reportType = null;
listTemplates();
}
};
......@@ -315,31 +320,41 @@
//加载'报表'源数据
var listTemplates = function () {
templateGroupService.getTemplateList($scope.curTemplateGroup.id, $scope.reportType && $scope.reportType.value).success(function (templateData) {
templateData = _.filter(templateData, function (row) {
return row.isActiveAssociation;
});
if ($scope.curTemplateGroup && $scope.curTemplateGroup.id) {
templateGroupService.getTemplateList($scope.curTemplateGroup.id, $scope.reportType && $scope.reportType.value).success(function (templateData) {
var defaultValue = templateData[0];
if ($scope.currentTemplate && ($scope.currentTemplate.name || $scope.currentTemplate.id)) {
var find = _.find(templateData, function (row) {
return row.name === $scope.currentTemplate.name || row.id === $scope.currentTemplate;
templateData = _.filter(templateData, function (row) {
return row.isActiveAssociation;
});
if (find) {
defaultValue = find;
var defaultValue = templateData[0];
if ($scope.currentTemplate && ($scope.currentTemplate.name || $scope.currentTemplate.id)) {
var find = _.find(templateData, function (row) {
return row.name === $scope.currentTemplate.name || row.id === $scope.currentTemplate;
});
if (find) {
defaultValue = find;
}
else {
$scope.currentTemplate = null;
}
}
}
$scope.templates = templateData; //当前组下的所有模板数据
$scope.templates = templateData; //当前组下的所有模板数据
dxControl.renderTemplateDropDown(templateData, defaultValue);
//配置报表下拉框
if (templateData && templateData.length > 0) {
$scope.ToggleSaveAs = showSavebutton();
}
});
dxControl.renderTemplateDropDown(templateData, defaultValue);
//配置报表下拉框
if (templateData && templateData.length > 0) {
$scope.ToggleSaveAs = showSavebutton();
}
});
}
else {
$('#dx-select-template-groups').dxDropDownBox('instance').option('dataSource', []);
$scope.templates.length = 0;
$scope.currentTemplate = null;
}
};
//模板不是默认模板才可以编辑和保存
var showSavebutton = function () {
......
......@@ -28,15 +28,15 @@
<div class="templates-top">
<div class="form-group">
<span class="tab-content-select-lable" ng-show="curServiceTypeId !=='12'">{{'IndustryColon' | translate}}</span>
<div id="dx-select-industry" class="tab-content-select industry col-md-2" ng-show="curServiceTypeId !=='12'" dx-select-box="dataSourceIndustryList"
dx-item-alias="itemObj">
<div id="dx-select-industry" class="tab-content-select industry col-md-2" ng-show="curServiceTypeId !=='12'"
dx-select-box="dataSourceIndustryList" dx-item-alias="itemObj">
<div data-options="dxTemplate: { name: 'industryItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}">
{{itemObj.name}}
</div>
</div>
<span class="tab-content-select-lable" translate="ReportType" ng-show="curServiceTypeId === '2'"></span>
<div class="tab-content-select reportType col-md-2" id="dx-select-pay-tax-type" ng-show="curServiceTypeId === '2'" dx-select-box="dataSourcePayTaxTypeList"
dx-item-alias="itemObj">
<span class="tab-content-select-lable" ng-show="curServiceTypeId === '2'">{{'Ratepayer' | translate}}:</span>
<div class="tab-content-select reportType col-md-2" id="dx-select-pay-tax-type" ng-show="curServiceTypeId === '2'"
dx-select-box="dataSourcePayTaxTypeList" dx-item-alias="itemObj">
<div data-options="dxTemplate: { name: 'filingTypeItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}">
{{itemObj.name}}
</div>
......@@ -44,9 +44,9 @@
<span class="tab-content-select-lable">{{'SelectTemplateGroup' | translate}}</span>
<div class="tab-content-select selectTemplateGroup col-md-2" id="dx-select-template-groups">
</div>
<span class="tab-content-select-lable" translate="ReportType" ng-show="curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"></span>
<div class="tab-content-select reportType col-md-2" id="dx-select-report-type" ng-show="curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"
dx-select-box="detailReportTypeList" dx-item-alias="itemObj">
<span class="tab-content-select-lable" translate="ReportType" ng-show="curServiceTypeId === '2' ||curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"></span>
<div class="tab-content-select reportType col-md-2" id="dx-select-report-type" ng-show="curServiceTypeId === '2' ||curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"
dx-select-box="detailReportTypeList" dx-item-alias="itemObj">
<div data-options="dxTemplate: { name: 'reportTypeItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}">
{{itemObj.name}}
</div>
......
......@@ -240,15 +240,15 @@
}
&.reportType {
width: 130px;
width: 120px;
}
&.selectTemplateGroup {
width: 200px;
width: 150px;
}
&.selectReport {
width: 200px;
width: 150px;
}
}
}
......
......@@ -5,6 +5,10 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', '
var selectedModel = '.editEquityChangeControlPop'; //'#addOrgControlPop' + $scope.dimensionId;
$scope.pleaseSelect = $translate.instant('PleaseSelect');
$scope.startDate = new Date(new Date().getFullYear() - 20, 1, 1);
$scope.endDate = new Date(new Date().getFullYear() + 20, 1, 1);
$scope.viewMode = 1;
$scope.showPage = function (pageIndex) {
......@@ -233,6 +237,7 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', '
$scope.orgHasAccountMapping = false;
orgService.getSingleOrg(orgId).success(function (orgData) {
orgData.updateTime = $filter('date')(orgData.updateTime, 'yyyy-MM-dd');
$scope.selectCompany = orgData;
$scope.editOrgModel = orgData;
});
......@@ -449,11 +454,18 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', '
};
var initDatePicker = function () {
$('.changeDatepicker').datepicker({
format: "yyyy/mm/dd",
startDate: new Date().formatDateTime('yyyy-MM-dd'),
minuteStep: 10
var ele = $(".changeDatepicker");
ele.datepicker({
startDate: $scope.startDate,
endDate: $scope.endDate,
viewMode: $scope.viewMode,
minViewMode: $scope.viewMode,
autoclose: true, //选中之后自动隐藏日期选择框
clearBtn: true, //清除按钮
todayBtn: false, //今日按钮
format: 'yyyy-mm-dd' //日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
});
ele.datepicker("setDate", new Date().formatDateTime('yyyy-mm-dd'));
};
(function initialize() {
......
......@@ -6,6 +6,8 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
$scope.pleaseSelect = $translate.instant('PleaseSelect');
$scope.updated = false;
var defaultSelcectRegion = {
id: 0,
name: '',
......@@ -169,6 +171,7 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
equityService.insert(equities).success(function (data) {
if (data) {
refreshEquity($scope.selectedOrganization.id);
$scope.updated = true;
return;
}else{
SweetAlert.success($translate.instant('SaveFail'));
......@@ -185,6 +188,7 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
equityService.update(equityData).success(function (data) {
if (data) {
refreshEquity($scope.selectedOrganization.id);
$scope.updated = true;
return;
}else{
SweetAlert.success($translate.instant('UpdateFail'));
......@@ -200,6 +204,7 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
equityService.delete($scope.equityId,removeList).success(function (data) {
if (data) {
refreshEquity($scope.selectedOrganization.id);
$scope.updated = true;
return;
}else{
SweetAlert.success($translate.instant('DeleteFail'));
......@@ -364,36 +369,6 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
}
};
// 设置时间控件
var setDatepickerRow = function (rowData) {
$("#" + rowData.fromID).datepicker({
minViewMode: 1,
autoclose: true,
language: "zh-CN",
format: "yyyy-mm"
});
$("#" + rowData.toID).datepicker({
minViewMode: 1,
autoclose: true,
language: "zh-CN",
format: "yyyy-mm"
});
$("#" + rowData.fromID).on('changeDate', function () {
if ($("#" + rowData.fromID).val === '') {
} else {
$("#" + rowData.toID).datepicker('setStartDate', $("#" + rowData.fromID).val());
}
});
// 默认的错误信息先设置为空
rowData.startDateError = null;
rowData.endDateError = null;
};
// 说明
$scope.resources = {
OrganizationName: $translate.instant('OrganizationName'),
......@@ -450,6 +425,16 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
$scope.operateType = null;
});
$scope.confirm = function () {
if($scope.updated){
$scope.updated = false;
$('.confirmBtn').attr("data-dismiss","modal");
$scope.operateType = null;
}else{
SweetAlert.warning($translate.instant('UnSave'));
}
};
$scope.closeModal = function () {
$scope.operateType = null;
};
......
......@@ -49,7 +49,7 @@
<div class="modal-footer" id="orgModalFooter" style="padding-left:139px;">
<button type="submit" class="btn btn-primary" ng-click="closeModal()" data-dismiss="modal">
<button type="submit" class="btn btn-primary confirmBtn" ng-click="confirm()">
{{'Confirm' | translate}}
</button>
<button type="button" class="btn btn-third" ng-click="closeModal()" data-dismiss="modal">
......
......@@ -5,7 +5,9 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
var selectedModel = '.addOrgControlPop'; //'#addOrgControlPop' + $scope.dimensionId;
$scope.pleaseSelect = $translate.instant('PleaseSelect');
$scope.startDate = new Date(new Date().getFullYear() - 20, 1, 1);
$scope.endDate = new Date(new Date().getFullYear() + 20, 1, 1);
$scope.viewMode = 1;
var defaultSelcectRegion = {
id: 0,
......@@ -99,6 +101,20 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
this.orgControlForm.$setSubmitted();
var fail = false;
if($('.localRequired').attr("required")==="required"){
$('.localRequired').each( function (index,ele){
if(null==ele.value||""===ele.value){
SweetAlert.error("请检查必填项");
fail = true;
return false;
}
});
}
if(fail) return;
var hasSpecialChar = window.PWC.hasSpecialChar($scope.editOrgModel.name);
if (hasSpecialChar) {
$scope.editOrgModel.nameError = $translate.instant('SpecialChar');
......@@ -166,6 +182,11 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
if ($scope.componentSelectedArea) {
editModel.areaID = $scope.selectedAreaId;
}
if((typeof $scope.editOrgModel.foundationDate) ==="string"){
if (""!==($scope.editOrgModel.foundationDate)) {
$scope.editOrgModel.foundationDate = new Date(Date.parse($scope.editOrgModel.foundationDate.replace(/-/g, "/")));
}
}
//账套
if ($scope.orgAccountList) {
......@@ -941,19 +962,15 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope.changeInternational = function () {
// $('.local').attr('hidden','hidden');
// $('.international').removeAttr('hidden');
$scope.isLocal = false;
$scope.isInternational = true;
$('.localRequired').removeAttr("required");
};
$scope.changeLocal = function () {
// $('.international').attr('hidden','hidden');
// $('.local').removeAttr('hidden');
$scope.isLocal = true;
$scope.isInternational = false;
$('.localRequired').attr("required","true");
$('.localRequired').attr("required",true);
};
// 强制刷新机构控件里的机构
......@@ -981,8 +998,12 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 登记状态
$scope.regStatusList = constant.RegStatusList;
$scope.architectureTypeList = constant.ArchitectureTypeList;
$scope.nationalEconomicIndustryList = constant.NationalEconomicIndustryList;
$scope.trueFalse = constant.trueFalse;
$('.localRequired').attr("required","true");
debugger;
$('.localRequired').attr("required",true);
// $('.localRequired').attr("required","true"); required="required"
};
// 省改变时联动市
......@@ -1050,11 +1071,19 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
};
var initDatePicker = function () {
$('.startDatepicker').datepicker({
format: "yyyy/mm/dd",
startDate: new Date().formatDateTime('yyyy-MM-dd'),
minuteStep: 10
var ele = $(".startDatepicker");
ele.datepicker({
startDate: $scope.startDate,
endDate: $scope.endDate,
viewMode: $scope.viewMode,
minViewMode: $scope.viewMode,
autoclose: true, //选中之后自动隐藏日期选择框
clearBtn: true, //清除按钮
todayBtn: false, //今日按钮
format: 'yyyy/mm/dd' //日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
});
ele.datepicker("setDate", new Date().formatDateTime('yyyy/mm/dd'));
};
// 获取修改机构的时候,自定义维度列表
......
......@@ -47,9 +47,10 @@
| translate}}:</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.name.$invalid && (orgControlForm.name.$dirty || orgControlForm.$submitted)}">
<!--<input class="form-control localRequired" id="name" ng-model="editOrgModel.name"-->
<input class="form-control localRequired" id="name" ng-model="editOrgModel.name"
name="name" placeholder="{{resources.OrganizationName}}"
ng-keyup="nameKeyUp()" maxlength="100" >
ng-keyup="nameKeyUp()" maxlength="100">
<p ng-show="orgControlForm.name.$error.required && (orgControlForm.name.$dirty || orgControlForm.$submitted)"
class="has-error label">{{resources.OrganizationMsgNameRequired}}</p>
<p ng-show="editOrgModel.nameError" class="has-error label">
......@@ -62,14 +63,11 @@
<div class="form-group">
<label class="col-sm-3 control-label"></span>{{'OrganizationNameEn' |
translate}}:</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.englishName.$invalid && (orgControlForm.englishName.$dirty || orgControlForm.$submitted)}">
<div class="col-sm-9">
<input class="form-control" id="englishName"
ng-model="editOrgModel.englishName" name="englishName"
placeholder="{{resources.OrganizationNameEn}}"
ng-keyup="nameKeyUp()" maxlength="100" >
<p ng-show="editOrgModel.nameError" class="has-error label">
{{editOrgModel.nameError}}</p>
</div>
</div>
......@@ -114,14 +112,14 @@
<!--注册地-->
<div class="form-group" ng-show="isLocal">
<label for="registrationLocation" class="col-sm-3 control-label">{{'RegistrationLocation'
<label for="registerAddress" class="col-sm-3 control-label">{{'RegistrationLocation'
| translate}}:</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.registrationLocation.$invalid && (orgControlForm.registrationLocation.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="registrationLocation"
id="registrationLocation"
ng-model="editOrgModel.registrationLocation"
placeholder="{{resources.RegistrationLocation}}" maxlength="50">
ng-class="{'has-error':orgControlForm.registerAddress.$invalid && (orgControlForm.registerAddress.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="registerAddress"
id="registerAddress"
ng-model="editOrgModel.registerAddress"
placeholder="{{resources.registerAddress}}" maxlength="100">
</div>
</div>
......@@ -131,10 +129,10 @@
| translate}}:</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.registrationCapital.$invalid && (orgControlForm.registrationCapital.$dirty || orgControlForm.$submitted)}">
<input class="form-control localRequired" name="registrationCapital"
<input class="form-control" name="registrationCapital"
id="registrationCapital"
ng-model="editOrgModel.registrationCapital"
placeholder="{{resources.RegistrationCapital}}" maxlength="50">
placeholder="{{resources.RegistrationCapital}}" maxlength="50" required>
</div>
</div>
......@@ -144,10 +142,15 @@
| translate}}:</label>
<div class="col-sm-9"
ng-class="{'has-error':orgControlForm.nationalEconomicIndustry.$invalid && (orgControlForm.nationalEconomicIndustry.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="nationalEconomicIndustry"
<!--<input class="form-control" name="nationalEconomicIndustry"
id="nationalEconomicIndustry"
ng-model="editOrgModel.nationalEconomicIndustry"
placeholder="{{resources.NationalEconomicIndustry}}" maxlength="50">
placeholder="{{resources.NationalEconomicIndustry}}" maxlength="50">-->
<select class="form-control" id='nationalEconomicIndustry' name="nationalEconomicIndustry"
ng-model="editOrgModel.nationalEconomicIndustry"
ng-options="x.code as x.type for x in nationalEconomicIndustryList">
<option value="">{{resources.NationalEconomicIndustry}}</option>
</select>
</div>
</div>
......@@ -302,7 +305,7 @@
<select class="form-control" id='engageNationalProhibitIndustry' name="engageNationalProhibitIndustry"
ng-model="editOrgModel.engageNationalProhibitIndustry"
ng-options="x.code as x.type for x in trueFalse">
<option value="">{{resources.engageNationalProhibitIndustry}}</option>
<option value="">{{resources.EngageNationalProhibitIndustry}}</option>
</select>
<p ng-show="orgControlForm.engageNationalProhibitIndustry.$error.required && (orgControlForm.engageNationalProhibitIndustry.$dirty || orgControlForm.$submitted)"
class="has-error label">
......@@ -480,15 +483,8 @@
</div>
</div>
</div>
<div style="clear: both;"></div>
</div>
<div class="international" hidden="hidden">
</div>
</form>
</div>
......
commonModule.directive('editTemplateModal', ['$log',
function ($log) {
'use strict';
$log.debug('editUserModal.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/common/controls/edit-template-modal/edit-template-modal.html' + '?_=' + Math.random(),
replace: true,
controller: 'editTemplateModalController',
scope:
{
operateType:'=',
templateModel:'=?',
isUpdate:'=?',
onClosed: '&'
}
//,
//link: function (scope, element) {
// element.find('.selector-input').on('focus', function () {
// element.find('.org-tree-container').show();
// });
// $(document).on('click', function () {
// element.find('.org-tree-container').hide();
// }).on('click', '.org-tree-wrapper', function (e) {
// e.stopPropagation();
// });
//}
};
}
commonModule.directive('editTemplateModal', ['$log',
function ($log) {
'use strict';
$log.debug('editUserModal.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/common/controls/edit-template-modal/edit-template-modal.html' + '?_=' + Math.random(),
replace: true,
controller: 'editTemplateModalController',
scope:
{
operateType:'=',
templateModel:'=?',
isUpdate:'=?',
onClosed: '&'
}
//,
//link: function (scope, element) {
// element.find('.selector-input').on('focus', function () {
// element.find('.org-tree-container').show();
// });
// $(document).on('click', function () {
// element.find('.org-tree-container').hide();
// }).on('click', '.org-tree-wrapper', function (e) {
// e.stopPropagation();
// });
//}
};
}
]);
\ No newline at end of file
@import "~/app-resources/css/admin-theme.less";
.edit-template-modal-wrapper {
.radio-wrapper {
margin-left: 0px;
}
.control-label {
width: 100px!important;
font-weight: normal;
padding-left: 15px!important;
padding-right: 0px!important;
text-align: left;
}
.normal-label {
font-weight: normal;
padding-left: 0px!important;
padding-right: 0px!important;
input[type="radio"] {
margin: 0px 0.5em 0px 0px;
}
}
.col-sm-5,
.col-sm-7,
col-sm-9 {
padding-left: 0px!important;
padding-right: 0px!important;
}
.upload-sheet-wrapper {
padding-left: 0;
padding-right: 32px;
}
}
.edit-template-name-wrapper {
.modal-content {
width: 400px!important;
}
.must-input {
color: red;
}
.control-label {
width: 100px !important;
font-weight: normal;
padding-left: 15px;
padding-right: 0px;
text-align: left;
}
.col-sm-8 {
padding-left: 0px;
padding-right: 0px;
}
}
.margin-find{
margin: -10px -10px 10px -10px;
}
.margin-sheet{
margin: -10px -10px 10px -20px;
}
.tree-view-list {
.dx-checkbox-container {
padding: 4px;
.dx-checkbox-icon {
height: 16px;
width: 16px;
}
.dx-checkbox-icon {
font-size: 14px;
}
}
.dx-checkbox-indeterminate .dx-checkbox-icon:before {
width: 14px;
height: 14px;
left: 0px;
top: 0px;
}
}
.search-box {
margin: 6px -10px -10px -10px;
@import "~/app-resources/css/admin-theme.less";
.edit-template-modal-wrapper {
.radio-wrapper {
margin-left: 0px;
}
.control-label {
width: 100px!important;
font-weight: normal;
padding-left: 15px!important;
padding-right: 0px!important;
text-align: left;
}
.normal-label {
font-weight: normal;
padding-left: 0px!important;
padding-right: 0px!important;
input[type="radio"] {
margin: 0px 0.5em 0px 0px;
}
}
.col-sm-5,
.col-sm-7,
col-sm-9 {
padding-left: 0px!important;
padding-right: 0px!important;
}
.upload-sheet-wrapper {
padding-left: 0;
padding-right: 32px;
}
.checkbox {
margin-left: 100px;
}
}
.edit-template-name-wrapper {
.modal-content {
width: 400px!important;
}
.must-input {
color: red;
}
.control-label {
width: 100px !important;
font-weight: normal;
padding-left: 15px;
padding-right: 0px;
text-align: left;
}
.col-sm-8 {
padding-left: 0px;
padding-right: 0px;
}
}
.margin-find{
margin: -10px -10px 10px -10px;
}
.margin-sheet{
margin: -10px -10px 10px -20px;
}
.tree-view-list {
.dx-checkbox-container {
padding: 4px;
.dx-checkbox-icon {
height: 16px;
width: 16px;
}
.dx-checkbox-icon {
font-size: 14px;
}
}
.dx-checkbox-indeterminate .dx-checkbox-icon:before {
width: 14px;
height: 14px;
left: 0px;
top: 0px;
}
}
.search-box {
margin: 6px -10px -10px -10px;
}
\ No newline at end of file
......@@ -60,8 +60,8 @@
totalItems: 0, //总数据
totalPages: 10, //总页数
maxSize: 5, //分页数字的限制。
pageSize: constant.page.pageSizeArrary[3], //每页多少条数据,100条
pageSizeString: constant.page.pageSizeArrary[3].toString(),
pageSize: constant.page.pageSizeArrary[1], //每页多少条数据,100条
pageSizeString: constant.page.pageSizeArrary[1].toString(),
firstPage: $translate.instant('PagingFirstPage'),
previousPage: $translate.instant('PagingPreviousPage'),
nextPage: $translate.instant('PagingNextPage'),
......@@ -170,16 +170,22 @@
}).then(function (resp) {
$('#busy-indicator-container').hide();
deferred.resolve();
if (resp.data) {
if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess'));
} else {
if (resp.message && resp.message.length > 0) {
SweetAlert.warning($translate.instant(resp.message));
} else {
SweetAlert.error($translate.instant('ImportFailed'));
}
if (resp.resultMsg && resp.resultMsg.length > 0) {
SweetAlert.warning($translate.instant(resp.resultMsg));
} else {
SweetAlert.error($translate.instant('ImportFailed'));
}
logDto.UpdateState = $translate.instant('ImportFail');
vatOperationLogService.addOperationLog(logDto);
}
......@@ -395,7 +401,7 @@
ele1.datepicker("setDate", $scope.selectedDate);
};
$scope.initCompanyList = function () {
var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) {
if (data) {
$scope.companyList = data;
......@@ -494,6 +500,7 @@
$scope.setGridStyle = setGridStyle;
getUserPermission();
initCompanyList();
loadImportInfoDataGrid();
initDatePicker();
......
......@@ -4,7 +4,7 @@
/*background-color: @color-white;*/
padding-left: 20px;
/*min-height: 800px;*/
height: 96%;
height: 100%;
.nav-wrapper {
/*padding-bottom: 5px;
......
......@@ -57,8 +57,8 @@
totalItems: 0, //总数据
totalPages: 10, //总页数
maxSize: 5, //分页数字的限制。
pageSize: constant.page.pageSizeArrary[3], //每页多少条数据,100条
pageSizeString: constant.page.pageSizeArrary[3].toString(),
pageSize: constant.page.pageSizeArrary[1], //每页多少条数据,100条
pageSizeString: constant.page.pageSizeArrary[1].toString(),
firstPage: $translate.instant('PagingFirstPage'),
previousPage: $translate.instant('PagingPreviousPage'),
nextPage: $translate.instant('PagingNextPage'),
......@@ -162,7 +162,7 @@
}).then(function(resp) {
$('#busy-indicator-container').hide();
deferred.resolve();
if (resp.data) {
if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess'));
......
......@@ -4,7 +4,7 @@
/*background-color: @color-white;*/
padding-left: 20px;
/*min-height: 800px;*/
height: 96%;
height: 100%;
.nav-wrapper {
/*padding-bottom: 5px;
......
......@@ -57,8 +57,8 @@
totalItems: 0, //总数据
totalPages: 10, //总页数
maxSize: 5, //分页数字的限制。
pageSize: constant.page.pageSizeArrary[3], //每页多少条数据,100条
pageSizeString: constant.page.pageSizeArrary[3].toString(),
pageSize: constant.page.pageSizeArrary[1], //每页多少条数据,100条
pageSizeString: constant.page.pageSizeArrary[1].toString(),
firstPage: $translate.instant('PagingFirstPage'),
previousPage: $translate.instant('PagingPreviousPage'),
nextPage: $translate.instant('PagingNextPage'),
......@@ -161,7 +161,7 @@
}).then(function(resp) {
$('#busy-indicator-container').hide();
deferred.resolve();
if (resp.data) {
if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess'));
......
......@@ -4,7 +4,7 @@
/*background-color: @color-white;*/
padding-left: 20px;
/*min-height: 800px;*/
height: 96%;
height: 100%;
.nav-wrapper {
/*padding-bottom: 5px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment