| | |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<DocType> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | if(param.containsKey("doc_class")){ |
| | | Integer docClass = Integer.parseInt(param.get("doc_class").toString()); |
| | | wrapper.eq("doc_class",param.get("doc_class")); |
| | | param.remove("doc_class"); |
| | | } |
| | | convert(param, wrapper); |
| | | hostEq(wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | |
| | | private String docName; |
| | | |
| | | /** |
| | | * 单据类别 1: 入库单 2: 出库单 |
| | | */ |
| | | @ApiModelProperty(value= "单据类别 1: 入库单 2: 出库单 ") |
| | | @TableField("doc_class") |
| | | private Integer docClass; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | |
| | | |
| | | public DocType() {} |
| | | |
| | | public DocType(Long hostId, Long docId,String docName,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | public DocType(Long hostId, Long docId,String docName,Integer docClass, Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.hostId = hostId; |
| | | this.docId = docId; |
| | | this.docName = docName; |
| | | this.docClass = docClass; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | |
| | | this.docName = docName; |
| | | } |
| | | |
| | | public Integer getDocClass() { |
| | | return docClass; |
| | | } |
| | | public String getDocClass$(){ |
| | | if (null == this.docClass){ return null; } |
| | | switch (this.docClass){ |
| | | case 1: |
| | | return "入库单"; |
| | | case 2: |
| | | return "出库单"; |
| | | default: |
| | | return String.valueOf(this.docClass); |
| | | } |
| | | } |
| | | public void setDocClass(Integer docClass) { |
| | | this.docClass = docClass; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | |
| | | <id column="doc_id" property="docId" /> |
| | | <result column="host_id" property="hostId" /> |
| | | <result column="doc_name" property="docName" /> |
| | | <result column="doc_class" property="docClass" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | where: { |
| | | doc_class: 2,//出库单 |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | |
| | | |
| | | /* 表格搜索 */ |
| | | form.on('submit(docTypeTableSearch)', function (data) { |
| | | insTb.reload({where: {doc_name: data.field.docName}}); |
| | | insTb.reload({where: {doc_name: data.field.docName,doc_class:2}}); |
| | | return false; |
| | | }); |
| | | |