This commit is contained in:
钱涛 2022-03-28 10:49:23 +08:00
parent 1db71a97ff
commit 00c0fe477e
3 changed files with 53 additions and 8 deletions

View File

@ -1,6 +1,9 @@
package com.engine.salary.cmd.TaxRate;
import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom;
import com.cloudstore.eccom.pc.table.WeaTableOperate;
import com.cloudstore.eccom.pc.table.WeaTableOperates;
import com.cloudstore.eccom.pc.table.WeaTablePopedom;
import com.cloudstore.eccom.result.WeaResultMsg;
import com.engine.common.biz.AbstractCommonCommand;
import com.engine.common.entity.BizLogContext;
@ -67,6 +70,30 @@ public class TaxRateListCmd extends AbstractCommonCommand<Map<String, Object>> {
table.setCheckboxList(checkboxpopedomList);
table.setCheckboxpopedom(null);
List<WeaTableOperate> operateList = new ArrayList<>();
WeaTableOperate editOperate = new WeaTableOperate("编辑", "", "0");
// editOperate.setOtherpara("column:system_type");
// editOperate.setIsalwaysshow("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom");
operateList.add(editOperate);
WeaTableOperate deleteOperate = new WeaTableOperate("删除", "", "1");
// deleteOperate.setOtherpara("column:system_type");
// deleteOperate.setIsalwaysshow("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom");
operateList.add(deleteOperate);
WeaTableOperate logOperate = new WeaTableOperate("操作日志", "", "3");
operateList.add(logOperate);
WeaTablePopedom popedom = new WeaTablePopedom();
popedom.setTransmethod("com.engine.salary.transmethod.TaxRateTransMethod.getOpratePopedomWithType");
popedom.setOtherpara("column:system_type");
WeaTableOperates weaTableOperates = new WeaTableOperates();
weaTableOperates.setOperate(operateList);
weaTableOperates.setPopedom(popedom);
table.setOperates(weaTableOperates);
WeaResultMsg result = new WeaResultMsg(false);
result.putAll(table.makeDataResult());

View File

@ -2,7 +2,6 @@ package com.engine.salary.entity.taxrate.vo;
import com.engine.salary.annotation.SalaryTable;
import com.engine.salary.annotation.SalaryTableColumn;
import com.engine.salary.annotation.SalaryTableOperate;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -21,14 +20,9 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
@SalaryTable(pageId = "a4f85287-e3f9-4275-9527-1206e54y6rj8",
fields = " create_time,creator,delete_type, description, id, name, system_type, tenant_key, update_time",
fields = "id, name, system_type, description, create_time,creator,delete_type, tenant_key, update_time",
orderby = "id desc",
primarykey = "id",
operates = {
@SalaryTableOperate(text = "编辑", index = "0"),
@SalaryTableOperate(text = "删除", index = "1"),
@SalaryTableOperate(text = "操作日志", index = "2")
}
primarykey = "id"
)
public class TaxRateTableVO {

View File

@ -1,5 +1,9 @@
package com.engine.salary.transmethod;
import org.apache.commons.lang.StringUtils;
import java.util.ArrayList;
public class TaxRateTransMethod {
public static String getSystemTypeName(String type) {
switch (type) {
@ -18,4 +22,24 @@ public class TaxRateTransMethod {
else
return "true";
}
/**
* @description 操作的显示隐藏
*/
public static ArrayList getOpratePopedomWithType(String type) throws Exception {
ArrayList returnList = new ArrayList();
String edit = "true";
String delete = "true";
String log = "true";
if(StringUtils.equals(type, "1")){
edit = "false";//启用状态显示禁用
delete = "false";
}
returnList.add(edit);
returnList.add(delete);
returnList.add(log);
return returnList;
}
}