@@ -44,9 +44,11 @@ public class PartyDataCustomHandler extends AbstractHandler { | |||||
public R checkRepetition(SwMap params, UserSession us) { | public R checkRepetition(SwMap params, UserSession us) { | ||||
DbEngine instance = DbEngine.getInstance(); | DbEngine instance = DbEngine.getInstance(); | ||||
String task = params.readString("task"); | |||||
if(task.length() == 4) task+="99"; | |||||
Integer cur_party_id = instance.queryInt("select count(*) from "+EntityHelper.getSchemaTableName(FillOut.ENTITY_NAME) | Integer cur_party_id = instance.queryInt("select count(*) from "+EntityHelper.getSchemaTableName(FillOut.ENTITY_NAME) | ||||
+" where fo_party_id = ? and fo_state != -1 and fo_task = ?" | +" where fo_party_id = ? and fo_state != -1 and fo_task = ?" | ||||
, us.getPartyId(),params.readLong("task")); | |||||
, us.getPartyId(),task); | |||||
if(cur_party_id != 0) { | if(cur_party_id != 0) { | ||||
return R.error("当前机构已有该任务的填报数据:"+params.readString("task_text")); | return R.error("当前机构已有该任务的填报数据:"+params.readString("task_text")); | ||||
} | } | ||||
@@ -49,6 +49,10 @@ window.$swEvent.setup("mztb.base.partyDataFill.partyDataFillList", { | |||||
$model.ds_1.data.form.task = undefined | $model.ds_1.data.form.task = undefined | ||||
$model.ds_1.data.form.task_text = '' | $model.ds_1.data.form.task_text = '' | ||||
} | } | ||||
const clearValue = () => { | |||||
$model.ds_1.data.form.task = undefined | |||||
$model.ds_1.data.form.task_text = '' | |||||
} | |||||
const setTypeDef =()=> { | const setTypeDef =()=> { | ||||
$model.ds_1.data.form.month = 1 | $model.ds_1.data.form.month = 1 | ||||
@@ -96,7 +100,7 @@ window.$swEvent.setup("mztb.base.partyDataFill.partyDataFillList", { | |||||
return { | return { | ||||
demoFunc,setValue,toPageEdit,selectHide,setTypeDef,edit_del_affirm_Hide,affirm_push_CancelHide | demoFunc,setValue,toPageEdit,selectHide,setTypeDef,edit_del_affirm_Hide,affirm_push_CancelHide | ||||
,logicDel,affirm,cancelAffirm,pushData | |||||
,logicDel,affirm,cancelAffirm,pushData,clearValue | |||||
} | } | ||||
} | } | ||||
}); | }); |