Merge remote-tracking branch 'origin/master'
| | |
| | | * ç¼åKEY-åºå
¥åºé
置信æ¯ç¼å |
| | | */ |
| | | public static final String CACHE_INOUT_CONF_LIST = "INOUT_CONF"; |
| | | |
| | | public static final String MODEL_KEY_LOGIN_USER = "loginUser"; |
| | | |
| | | // ä»åºå表 |
| | | public static final String MODEL_KEY_DEPOT_LIST = "listDepot"; |
| | | |
| | | |
| | | // å®æç¶æ-æªå®æ |
| | | /** |
| | | * éç¥åç¶æ |
| | | */ |
| | | public static final String COMPLETE_STATUS_NONE = "NONE"; |
| | | // åºå
¥åºç±»å-å
¥åº |
| | | public static final String COMPLETE_STATUS_COMPLETE = "COMPLETE"; |
| | | /** |
| | | * åéªç»æ |
| | | */ |
| | | public static final String STATUS_NONE = "NONE"; |
| | | public static final String STATUS_PASS = "PASS"; |
| | | |
| | | /** |
| | | * åºå
¥åºç±»å |
| | | */ |
| | | public static final String TYPE_IN = "IN"; |
| | | // åºå
¥åºç±»å-åºåº |
| | | public static final String TYPE_OUT = "OUT"; |
| | | |
| | | /** |
| | | * åºå
¥åºæµç¨ |
| | | */ |
| | | // æµç¨-ç»è®° |
| | | public static final String PROGRESS_REGISTER = "REGISTER"; |
| | | // æµç¨-å
¥åºè´¨æ£ |
| | |
| | | * æºæ
§å¡ |
| | | */ |
| | | public static final String CONF_TYPE_80 = "80"; |
| | | |
| | | /** |
| | | * ç¼å-å
¥åºID |
| | | */ |
| | | public static final String CACHE_RECORD_ID = "RECORD_ID"; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.igds.constant; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @Description |
| | | * @Author CZT |
| | | * @Date 2025/11/29 16:33 |
| | | */ |
| | | @Getter |
| | | public enum RespCodeEnum { |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | CODE_0000("0000", "æå"), |
| | | CODE_1111("1111", "å端æå¡å¼å¸¸"), |
| | | CODE_1001("1001","æ°æ®æ ¼å¼æ ¡éªå¤±è´¥"), |
| | | CODE_1002("1002","该åºç¨æ æ¿æ´»ææ"), |
| | | CODE_1003("1003","该åºç¨å·²ç»æææå"), |
| | | CODE_1004("1004","设å¤é讯失败"), |
| | | CODE_1005("1005","该设å¤ä¸åå¨"), |
| | | CODE_1006("1006","å½åç»å½äººå·²æçº¿"), |
| | | CODE_1007("1007","请æ±åæ°å¼å¸¸"), |
| | | CODE_1008("1008","æµç¨ä¸æ£ç¡®"), |
| | | CODE_2000("2000","ååºæ°æ®ä¸ºç©º") |
| | | ; |
| | | |
| | | private String code; |
| | | private String msg; |
| | | |
| | | RespCodeEnum(String code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | } |
| | |
| | | package com.fzzy.igds.data; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | |
| | | private String key;//èªå®ä¹å
³é®å |
| | | |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date start; |
| | | |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date end; |
| | | |
| | | private int limit = 10;// LAYUI ä¸ç¨ï¼æ¯é¡µæ¾ç¤ºçæ¡æ°ãlaypageå°ä¼åå© count å limit 计ç®åºåé¡µæ° |
| | | |
| | | private int curr = 1;// LAYUI ä¸ç¨ èµ·å§é¡µãä¸è¬ç¨äºå·æ°ç±»åç跳页以åHASH跳页 |
| | | |
| | | private int page = 1;// ç®æ é¡µé¢ |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.igds.data; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description åºå
¥åºç页é¢åæ°å®ä¹ |
| | | * @Author CZT |
| | | * @Date 2025/11/29 16:33 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class InoutParam extends IgdsBaseParam { |
| | | |
| | | public String plateNum; |
| | | |
| | | private String id; |
| | | |
| | | private String progress; |
| | | |
| | | private String type; |
| | | |
| | | private String foodVariety; |
| | | |
| | | private String foodType; |
| | | |
| | | private String checkStatus; |
| | | |
| | | private String customerName; |
| | | |
| | | private String recordStatus; |
| | | |
| | | private String userId; |
| | | |
| | | private String year; |
| | | |
| | | private double weight;//ééä¿¡æ¯ |
| | | |
| | | private Double deOther; |
| | | |
| | | private Double fullWeight; |
| | | |
| | | private String fullWeightUser; |
| | | |
| | | private Date fullWeightTime; |
| | | |
| | | private Double emptyWeight; |
| | | |
| | | private Date emptyWeightTime; |
| | | |
| | | private Date completeTime; |
| | | |
| | | private String emptyWeightUser; |
| | | |
| | | private Double netWeight; |
| | | |
| | | private Double settleWeight; |
| | | |
| | | private Double recordWeight; |
| | | |
| | | private Double price; |
| | | |
| | | private String settleBizType; |
| | | |
| | | private String settleTag; |
| | | |
| | | private Double settleMoney; |
| | | |
| | | private Date updateTime = new Date(); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.igds.data; |
| | | |
| | | import com.fzzy.igds.constant.RespCodeEnum; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description ç³»ç»é¡µé¢è°ç¨æ¥å£ï¼åæ°è¿å对象å°è£
|
| | | * @Author CZT |
| | | * @Date 2025/11/29 16:33 |
| | | */ |
| | | @Data |
| | | public class PageResponse<T> implements Serializable { |
| | | |
| | | private String DATE_FORMAT_YMDHMS = "yyyy-MM-dd HH:mm:ss"; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ååºç |
| | | */ |
| | | private String code; |
| | | /** |
| | | * ååºä¿¡æ¯ |
| | | */ |
| | | private String msg; |
| | | |
| | | /** |
| | | * ååºæ¶é´ |
| | | */ |
| | | private String respDateTime; |
| | | |
| | | /** |
| | | * è¿åæ°æ® |
| | | */ |
| | | private T data; |
| | | |
| | | public PageResponse() { |
| | | super(); |
| | | } |
| | | |
| | | public PageResponse(String code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public PageResponse(String code, String msg, T data) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | this.data = data; |
| | | this.respDateTime = DateFormatUtils.format(new Date(), DATE_FORMAT_YMDHMS); |
| | | } |
| | | |
| | | public PageResponse(RespCodeEnum code, T data) { |
| | | this.code = code.getCode(); |
| | | this.data = data; |
| | | this.msg = code.getMsg(); |
| | | this.respDateTime = DateFormatUtils.format(new Date(), DATE_FORMAT_YMDHMS); |
| | | } |
| | | } |
| | |
| | | @TableField("food_variety") |
| | | private String foodVariety; |
| | | |
| | | @Column(name = "food_locationId", columnDefinition = "varchar(40) COMMENT 'ç²®é£äº§å°'") |
| | | @TableField("food_locationId") |
| | | @Column(name = "food_location_id", columnDefinition = "varchar(40) COMMENT 'ç²®é£äº§å°'") |
| | | @TableField("food_location_id") |
| | | private String foodLocationId; |
| | | |
| | | @Column(name = "food_location", columnDefinition = "varchar(40) COMMENT 'ç²®é£äº§å°'") |
| | |
| | | @TableField("food_level") |
| | | private String foodLevel; |
| | | |
| | | @Column(name = "check_status", columnDefinition = "varchar(10) COMMENT 'è´¨æ£ç»æ'") |
| | | @Column(name = "check_status", columnDefinition = "varchar(10) COMMENT 'åéªç¶æ'") |
| | | @TableField("check_status") |
| | | private String checkStatus = "NONE"; |
| | | private String checkStatus = Constant.STATUS_NONE; |
| | | |
| | | @Column(name = "check_user", columnDefinition = "varchar(40) COMMENT 'è´¨æ£äºº'") |
| | | @TableField("check_user") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.igds.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.fzzy.igds.domain.InoutRecord; |
| | | |
| | | /** |
| | | * @Description |
| | | * @Author CZT |
| | | * @Date 2025/12/2 10:36 |
| | | */ |
| | | public interface InoutRecordMapper extends BaseMapper<InoutRecord> { |
| | | } |
| | |
| | | list.add(new SysDictData("ä¸é¥å½¢", Constant.CABLE_CONE_2)); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @return |
| | | */ |
| | | public List<SysDictData> getInoutType() { |
| | | |
| | | List<SysDictData> list = new ArrayList<SysDictData>(); |
| | | list.add(new SysDictData("å
¥åº", Constant.TYPE_IN)); |
| | | list.add(new SysDictData("åºåº", Constant.TYPE_OUT)); |
| | | return list; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.igds.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fzzy.igds.constant.Constant; |
| | | import com.fzzy.igds.constant.RedisConst; |
| | | import com.fzzy.igds.data.InoutParam; |
| | | import com.fzzy.igds.domain.InoutRecord; |
| | | import com.fzzy.igds.mapper.InoutRecordMapper; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description |
| | | * @Author CZT |
| | | * @Date 2025/12/2 10:36 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class InoutRecordService { |
| | | |
| | | @Resource |
| | | private InoutRecordMapper inoutRecordMapper; |
| | | @Resource |
| | | private RedisCache redisCache; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢æ°æ® |
| | | * @param page |
| | | * @param param |
| | | */ |
| | | public void listPageInout(Page<InoutRecord> page, InoutParam param) { |
| | | QueryWrapper<InoutRecord> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | param.setCompanyId(ContextUtil.getCompanyId()); |
| | | param.setDeptId(ContextUtil.subDeptId(null)); |
| | | queryWrapper.eq("company_id", param.getCompanyId()); |
| | | queryWrapper.eq("dept_id", param.getDeptId()); |
| | | |
| | | if (StringUtils.isNotBlank(param.getDepotId())) { |
| | | queryWrapper.eq("depot_id", param.getDepotId()); |
| | | } |
| | | if (StringUtils.isNotBlank(param.getType())) { |
| | | queryWrapper.eq("type", param.getType()); |
| | | } |
| | | queryWrapper.orderByDesc("create_time"); |
| | | inoutRecordMapper.selectPage(page, queryWrapper); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢æ°æ® |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public InoutRecord selectById(String id) { |
| | | if(StringUtils.isBlank(id)){ |
| | | return null; |
| | | |
| | | } |
| | | return inoutRecordMapper.selectById(id); |
| | | } |
| | | |
| | | /** |
| | | * éªè¯è½¦çå·æ¯å¦å¨æµç¨ä¸ |
| | | * @param companyId |
| | | * @param plateNum |
| | | * @return |
| | | */ |
| | | public int checkExist(String companyId, String plateNum) { |
| | | if (StringUtils.isEmpty(companyId)) { |
| | | companyId = ContextUtil.getCompanyId(); |
| | | } |
| | | QueryWrapper<InoutRecord> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | queryWrapper.eq("company_id", companyId); |
| | | queryWrapper.eq("plate_num", plateNum); |
| | | queryWrapper.ne("progress", Constant.PROGRESS_RECORD); |
| | | queryWrapper.eq("record_status", "NORMAL"); |
| | | |
| | | return inoutRecordMapper.selectCount(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºå
¥åºè®°å½ |
| | | * |
| | | * @param data |
| | | * @return |
| | | */ |
| | | public int addInoutRecord(InoutRecord data) { |
| | | |
| | | if (StringUtils.isBlank(data.getId())) { |
| | | String id = this.createId(data.getRegisterTime(), data.getCompanyId()); |
| | | if (Constant.TYPE_IN.equals(data.getType())) { |
| | | data.setId("R_" + id); |
| | | } else if (Constant.TYPE_OUT.equals(data.getType())) { |
| | | data.setId("C_" + id); |
| | | }else { |
| | | data.setId("M_" + id); |
| | | } |
| | | } |
| | | data.setCreateBy(ContextUtil.getLoginUserName()); |
| | | data.setCreateTime(new Date()); |
| | | data.setUpdateBy(ContextUtil.getLoginUserName()); |
| | | data.setUpdateTime(new Date()); |
| | | |
| | | int num = inoutRecordMapper.insert(data); |
| | | //TODO æ´æ°ç¼å |
| | | //updateInoutCache(data); |
| | | return num; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºå
¥åºè®°å½ |
| | | * |
| | | * @param data |
| | | * @return |
| | | */ |
| | | public int updateInoutRecord(InoutRecord data) { |
| | | |
| | | data.setUpdateBy(ContextUtil.getLoginUserName()); |
| | | data.setUpdateTime(new Date()); |
| | | |
| | | int num = inoutRecordMapper.updateById(data); |
| | | //TODO æ´æ°ç¼å |
| | | //updateInoutCache(data); |
| | | return num; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * åºå
¥åºæµç¨IDå建 202001030001 202001030001 |
| | | * @param registerTime |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | public String createId(Date registerTime, String companyId) { |
| | | |
| | | // æ¶é´æ³æ ç¾ |
| | | String timeKey = DateFormatUtils.format(registerTime, "yyyyMMdd"); |
| | | |
| | | // ä»ç¼åä¸è·åå·²æçç»ç»ç¼ç |
| | | String cacheKey = RedisConst.buildKey(companyId, Constant.CACHE_RECORD_ID); |
| | | |
| | | String cacheId = (String) redisCache.getCacheObject(cacheKey); |
| | | |
| | | if (null != cacheId && cacheId.indexOf(timeKey) >= 0) { |
| | | String temp = cacheId.substring(cacheId.length() - 4); |
| | | Integer i = Integer.valueOf(temp); |
| | | i++; |
| | | temp = String.valueOf(i); |
| | | if (temp.length() == 1) { |
| | | cacheId = timeKey + "000" + temp; |
| | | } |
| | | if (temp.length() == 2) { |
| | | cacheId = timeKey + "00" + temp; |
| | | } |
| | | if (temp.length() == 3) { |
| | | cacheId = timeKey + "0" + temp; |
| | | } |
| | | if (temp.length() == 4) { |
| | | cacheId = timeKey + temp; |
| | | } |
| | | } else { |
| | | String result = this.getMaxId(companyId, timeKey); |
| | | if (null == result) { |
| | | cacheId = timeKey + "0001"; |
| | | } else { |
| | | // è·åæååä½ |
| | | int i = Integer.valueOf(result.substring(result.length() - 4)); |
| | | i++; |
| | | String temp = String.valueOf(i); |
| | | if (temp.length() == 1) { |
| | | cacheId = timeKey + "000" + temp; |
| | | } |
| | | if (temp.length() == 2) { |
| | | cacheId = timeKey + "00" + temp; |
| | | } |
| | | if (temp.length() == 3) { |
| | | cacheId = timeKey + "0" + temp; |
| | | } |
| | | if (temp.length() == 4) { |
| | | cacheId = timeKey + temp; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æ´æ°ç¼å |
| | | redisCache.setCacheObject(cacheKey, cacheId); |
| | | |
| | | return cacheId; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æå¤§idå·ï¼ä¸ºç©ºåè¿ånull |
| | | * @param companyId |
| | | * @param timeKey |
| | | * @return |
| | | */ |
| | | public String getMaxId(String companyId, String timeKey) { |
| | | |
| | | if (StringUtils.isEmpty(companyId)) { |
| | | companyId = ContextUtil.getCompanyId(); |
| | | } |
| | | QueryWrapper<InoutRecord> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | queryWrapper.eq("company_id", companyId); |
| | | queryWrapper.like("id", timeKey); |
| | | queryWrapper.orderByDesc("create_time"); |
| | | |
| | | List<InoutRecord> inoutRecords = inoutRecordMapper.selectList(queryWrapper); |
| | | if(null == inoutRecords || inoutRecords.isEmpty()){ |
| | | return null; |
| | | }else { |
| | | return inoutRecords.get(0).getId(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.fzzy.sys.controller.inout; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fzzy.igds.constant.Constant; |
| | | import com.fzzy.igds.data.InoutParam; |
| | | import com.fzzy.igds.data.PageResponse; |
| | | import com.fzzy.igds.domain.Depot; |
| | | import com.fzzy.igds.domain.InoutConf; |
| | | import com.fzzy.igds.domain.InoutRecord; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.igds.utils.DateUtil; |
| | | import com.fzzy.sys.manager.common.CommonManager; |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Date; |
| | |
| | | return prefix + "/inout-weight"; |
| | | } |
| | | |
| | | /** |
| | | * åºåºç»è®° |
| | | * |
| | | * @param sort 表示使ç¨çåºå
¥åºè®¾å¤é
å¥å·ï¼ä¸ä¼ éé»è®¤ä¸º1 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/out-register") |
| | | public String outRegister(HttpServletRequest httpRequest, |
| | | @RequestParam(value = "sort", required = false) String sort, |
| | | ModelMap view) { |
| | | |
| | | SysUser user = ContextUtil.getLoginUser(); |
| | | view.put(Constant.MODEL_KEY_LOGIN_USER, user); |
| | | |
| | | if (StringUtils.isEmpty(sort)) { |
| | | sort = inoutManager.getInoutWeightByClient(httpRequest); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(sort)) { |
| | | sort = "1"; |
| | | } |
| | | |
| | | String deptId = ContextUtil.subDeptId(user); |
| | | view.put("type", Constant.TYPE_OUT); |
| | | view.put("deptId", deptId); |
| | | |
| | | // ç±»å |
| | | List<SysDictData> listInoutType = commonManager.getInoutType(); |
| | | view.put("listInoutType", listInoutType); |
| | | |
| | | //å
¥åºæµç¨ |
| | | String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), ContextUtil.subDeptId(user), Constant.TYPE_OUT); |
| | | view.put("inoutProgress", inoutProgress); |
| | | // å½åæµç¨èç¹ |
| | | view.put("progress", Constant.PROGRESS_REGISTER); |
| | | |
| | | // è·ååºå
¥åºé
ç½®ä¿¡æ¯ |
| | | List<InoutConf> listInoutConf = inoutManager.getListInoutConf(user.getCompanyId(), deptId); |
| | | |
| | | // 车çè¯å«åæ°å°è£
|
| | | InoutConf conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_10, Constant.PROGRESS_REGISTER, 1); |
| | | view.put("lprDto", conf); |
| | | |
| | | return prefix + "/out-register"; |
| | | } |
| | | |
| | | /** |
| | | * åºåºç®ææä½é¡µé¢ |
| | | * |
| | | * @param sort 表示使ç¨çåºå
¥åºè®¾å¤é
å¥å·ï¼ä¸ä¼ éé»è®¤ä¸º1 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/out-easy") |
| | | public String outEasy(@RequestParam(value = "sort", required = false) String sort, |
| | | @RequestParam(value = "type", required = false) String type, |
| | | ModelMap view) { |
| | | |
| | | SysUser user = ContextUtil.getLoginUser(); |
| | | view.put(Constant.MODEL_KEY_LOGIN_USER, user); |
| | | |
| | | view.put("type", Constant.TYPE_OUT); |
| | | String deptId = ContextUtil.subDeptId(user); |
| | | view.put("deptId", deptId); |
| | | |
| | | // ä»åºå表å䏿æ¡ä½¿ç¨ |
| | | List<Depot> listDepot = commonManager.listDepotByDeptId(deptId); |
| | | view.put(Constant.MODEL_KEY_DEPOT_LIST, listDepot); |
| | | |
| | | //å
¥åºæµç¨ |
| | | String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), |
| | | ContextUtil.subDeptId(user), Constant.TYPE_IN); |
| | | view.put("inoutProgress", inoutProgress); |
| | | |
| | | |
| | | // ç²®é£åç§ä¸ææ¡ |
| | | List<SysDictData> listFoodVariety = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId()); |
| | | view.put("listFoodVariety", listFoodVariety); |
| | | |
| | | // ç²®é£æ§è´¨ä¸ææ¡ |
| | | List<SysDictData> listFoodType = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_TYPE, user.getCompanyId()); |
| | | view.put("listFoodType", listFoodType); |
| | | |
| | | // ç²®é£ççº§ä¸ææ¡ |
| | | List<SysDictData> listFoodLevel = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId()); |
| | | view.put("listFoodLevel", listFoodLevel); |
| | | |
| | | // ç±»å |
| | | List<SysDictData> listInoutType = commonManager.getInoutType(); |
| | | view.put("listInoutType", listInoutType); |
| | | |
| | | // å½åæµç¨æ ç¾ |
| | | view.put("progress", Constant.PROGRESS_WEIGHT_TAG); |
| | | |
| | | // è·ååºå
¥åºé
ç½®ä¿¡æ¯ |
| | | List<InoutConf> listInoutConf = inoutManager.getListInoutConf(user.getCompanyId(), deptId); |
| | | |
| | | // è·åå°ç£
ä¿¡æ¯ |
| | | InoutConf weightDto = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_30); |
| | | view.put("weightDto", weightDto); |
| | | |
| | | // è¿ç¨æå头1 |
| | | InoutConf conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 1); |
| | | view.put("snapDto1", conf); |
| | | |
| | | // è¿ç¨æå头2 |
| | | conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 2); |
| | | view.put("snapDto2", conf); |
| | | |
| | | // è¿ç¨æå头3 |
| | | conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 3); |
| | | view.put("snapDto3", conf); |
| | | |
| | | //é»è®¤æ¥è¯¢æ¶é´ |
| | | view.put("endTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd")); |
| | | view.put("startTime", DateFormatUtils.format(DateUtil.getNewByDay(null, -30), "yyyy-MM-dd")); |
| | | |
| | | return prefix + "/out-easy"; |
| | | } |
| | | |
| | | /** |
| | | * å页è·åæµç¨æªå®æçæ°æ® |
| | | * |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @RequestMapping("/page-inout-data") |
| | | @ResponseBody |
| | | public PageResponse<Page<InoutRecord>> pageInoutData(@RequestBody InoutParam param) { |
| | | return inoutManager.pageInoutData(param); |
| | | } |
| | | |
| | | /** |
| | | * åºå
¥åºæ°æ®æ¥è¯¢ï¼æ ¹æ®æ¡ä»¶æ¥è¯¢æ°æ®ï¼åºå
¥åºæ°æ®ä¿¡æ¯ |
| | | * |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @RequestMapping("/inout-query") |
| | | @ResponseBody |
| | | public PageResponse<InoutRecord> inoutQuery(@RequestBody InoutParam param) { |
| | | if (null == param.getCompanyId()) param.setCompanyId(ContextUtil.getCompanyId()); |
| | | return inoutManager.inoutQuery(param); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * åºå
¥åºç»è®°æäº¤ |
| | | * |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @RequestMapping("/submit-register") |
| | | @ResponseBody |
| | | public PageResponse<InoutRecord> submitRegister(@RequestBody InoutRecord data) { |
| | | |
| | | return inoutManager.submitRegister(data); |
| | | } |
| | | |
| | | /** |
| | | * åºå
¥åºåéªä¿¡æ¯æäº¤ |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @RequestMapping("/submit-check") |
| | | @ResponseBody |
| | | public PageResponse<InoutRecord> submitCheck(@RequestBody InoutRecord data) { |
| | | |
| | | return inoutManager.submitCheck(data); |
| | | } |
| | | |
| | | /** |
| | | * åºå
¥åºç§°éç¯èæäº¤ |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @RequestMapping("/submit-weight") |
| | | @ResponseBody |
| | | public PageResponse<InoutRecord> submitWeight(@RequestBody InoutRecord data) { |
| | | |
| | | return inoutManager.submitWeight(data); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * åºå
¥åºç§°éç¯èæäº¤ï¼è¯·æ³¨æï¼å¼ä»ææäº¤çæ°æ®éåºå
¥åºæµæ°´å®æ´ä¿¡æ¯ï¼ä¸è½ç´æ¥è°ç¨updateæ¹æ³ |
| | | * |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @RequestMapping("/submit-handle") |
| | | @Transactional |
| | | @ResponseBody |
| | | public PageResponse<InoutRecord> submitHandle(@RequestBody InoutRecord data) { |
| | | |
| | | log.debug("-------------submitHandle------------------"); |
| | | return inoutManager.submitHandle(data); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | return depotService.getCacheDepotList(ContextUtil.getCompanyId(), deptId); |
| | | } |
| | | |
| | | /** |
| | | * @return |
| | | */ |
| | | public List<SysDictData> getInoutType() { |
| | | return dicService.getInoutType(); |
| | | } |
| | | } |
| | |
| | | package com.fzzy.sys.manager.inout; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fzzy.igds.constant.Constant; |
| | | import com.fzzy.igds.constant.RespCodeEnum; |
| | | import com.fzzy.igds.data.InoutParam; |
| | | import com.fzzy.igds.data.PageResponse; |
| | | import com.fzzy.igds.domain.InoutConf; |
| | | import com.fzzy.igds.domain.InoutRecord; |
| | | import com.fzzy.igds.domain.InoutSysConf; |
| | | import com.fzzy.igds.service.InoutConfService; |
| | | import com.fzzy.igds.service.InoutRecordService; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.igds.utils.SystemUtil; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private RedisCache redisCache; |
| | | @Resource |
| | | private InoutConfService inoutConfService; |
| | | @Resource |
| | | private InoutRecordService inoutRecordService; |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·è¯·æ±ä¿¡æ¯ï¼æ ¹æ®å½å客æ·çµèIPï¼è·ååºå
¥åºç§°é䏿¬¡éæ©çå°ç£
|
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®é
ç½®è·ååºå
¥åºçé
ç½®åæ° |
| | | * @param listInoutConf |
| | | * @param type |
| | | * @return |
| | | */ |
| | | public List<InoutConf> getInoutConf(List<InoutConf> listInoutConf, String type) { |
| | | List<InoutConf> result = new ArrayList<>(); |
| | | if (null == listInoutConf) return result; |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®é
ç½®è·ååºå
¥åºçé
ç½®åæ° |
| | | * @param listInoutConf |
| | | * @param sort |
| | | * @param type |
| | | * @return |
| | | */ |
| | | public InoutConf getInoutConf(List<InoutConf> listInoutConf, String sort, String type) { |
| | | if (null == listInoutConf) return new InoutConf(sort); |
| | | if (StringUtils.isEmpty(sort)) sort = "1"; |
| | |
| | | |
| | | return weightEditTag; |
| | | } |
| | | |
| | | /** |
| | | * åºå
¥åºæ³¨åæ°æ®æäº¤ï¼åºå
¥åºç»è®°ä½¿ç¨åä¸ä¸ªæ¹æ³ |
| | | * |
| | | * @param data |
| | | * @return |
| | | */ |
| | | public PageResponse<InoutRecord> submitRegister(InoutRecord data) { |
| | | SysUser user = ContextUtil.getLoginUser(); |
| | | if (StringUtils.isEmpty(data.getCompanyId())) { |
| | | data.setCompanyId(user.getCompanyId()); |
| | | } |
| | | if (StringUtils.isEmpty(data.getDeptId())) { |
| | | data.setDeptId(ContextUtil.subDeptId(user)); |
| | | } |
| | | |
| | | int num = inoutRecordService.checkExist(data.getCompanyId(), data.getPlateNum()); |
| | | if (num > 0) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "å½å车çå·æ£å¨æ§è¡æµç¨æªç»æï¼è¯·æ ¸æ¥è½¦çæè系管çå", data); |
| | | } |
| | | |
| | | // è·åç³»ç»åæ°é
ç½® |
| | | InoutSysConf inoutSysConf = inoutConfService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId()); |
| | | if (null == inoutSysConf) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "æç¤ºï¼å½ååºåºæªé
ç½®åºå
¥åºæµç¨ä¿¡æ¯ï¼è¯·è系管çå", data); |
| | | } |
| | | |
| | | // è·åä¸ä¸ä¸ªæµç¨ç¶æ |
| | | String curProgress = data.getProgress(); |
| | | String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf); |
| | | data.setProgress(nextProgress); |
| | | |
| | | //å»é¤èº«ä»½è¯å·ä¸çç©ºæ ¼ |
| | | if (StringUtils.isNotEmpty(data.getUserId())) { |
| | | data.setUserId(data.getUserId().trim()); |
| | | } |
| | | //å»é¤å§åä¸çç©ºæ ¼ |
| | | if (StringUtils.isNotEmpty(data.getUserName())) { |
| | | data.setUserName(data.getUserName().trim()); |
| | | } |
| | | //ç»è®°äººåç»è®°æ¶é´ |
| | | data.setRegisterUser(user.getUserName()); |
| | | data.setRegisterTime(new Date()); |
| | | |
| | | num = inoutRecordService.addInoutRecord(data); |
| | | |
| | | if (num == 0) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "ç»è®°å¤±è´¥ï¼", data); |
| | | } |
| | | |
| | | //TODO éä»¶å¤ç |
| | | // List<FileData> files = data.getFiles(); |
| | | // if (null != files && files.size() > 0) { |
| | | // // æ§è¡éä»¶ä¿¡æ¯ |
| | | // fileService.saveInoutFiles(files, data.getCompanyId(), data.getId(), curProgress); |
| | | // } |
| | | |
| | | return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "ç»è®°æåï¼", data); |
| | | } |
| | | |
| | | /** |
| | | * åéªä¿¡æ¯æäº¤ |
| | | * @param data |
| | | * @return |
| | | */ |
| | | public PageResponse<InoutRecord> submitCheck(InoutRecord data) { |
| | | SysUser user = ContextUtil.getLoginUser(); |
| | | if (StringUtils.isEmpty(data.getCompanyId())) { |
| | | data.setCompanyId(user.getCompanyId()); |
| | | } |
| | | if (StringUtils.isEmpty(data.getDeptId())) { |
| | | data.setDeptId(ContextUtil.subDeptId(user)); |
| | | } |
| | | |
| | | //åéªäººåæ¶é´ |
| | | data.setCheckUser(user.getUserName()); |
| | | data.setCheckTime(new Date()); |
| | | data.setCheckStatus(Constant.STATUS_PASS); |
| | | |
| | | int num = inoutRecordService.updateInoutRecord(data); |
| | | |
| | | if (num == 0) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "æäº¤å¤±è´¥ï¼", data); |
| | | } |
| | | |
| | | return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "æäº¤æåï¼", data); |
| | | } |
| | | |
| | | /** |
| | | * ç§°éæäº¤ï¼å
å«ç§°éç»è®°æäº¤ååç¬ç§°éæäº¤ |
| | | * @param data |
| | | * @return |
| | | */ |
| | | public PageResponse<InoutRecord> submitWeight(InoutRecord data) { |
| | | |
| | | // è·åç³»ç»åæ°é
ç½® |
| | | InoutSysConf inoutSysConf = inoutConfService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId()); |
| | | if (null == inoutSysConf) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "æç¤ºï¼å½åç³»ç»ä¸æµç¨é
ç½®å¼å¸¸ï¼è¯·è系管çå", data); |
| | | } |
| | | |
| | | // è·åä¸ä¸ä¸ªæµç¨ç¶æ |
| | | String curProgress = data.getProgress(); |
| | | String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf); |
| | | data.setProgress(nextProgress); |
| | | |
| | | int num; |
| | | if(StringUtils.isBlank(data.getId())){ |
| | | data.setRegisterTime(new Date()); |
| | | data.setRegisterUser(ContextUtil.getLoginUserName()); |
| | | |
| | | //è®¾ç½®åæ¬¡æäº¤æ¶ç§°éæ¶é´ä¿¡æ¯ |
| | | if(data.getFullWeight() > 0){ |
| | | data.setFullWeightUser(ContextUtil.getLoginUserName()); |
| | | data.setFullWeightTime(new Date()); |
| | | } |
| | | if(data.getEmptyWeight() > 0){ |
| | | data.setEmptyWeightUser(ContextUtil.getLoginUserName()); |
| | | data.setEmptyWeightTime(new Date()); |
| | | } |
| | | //ç§°éç»è®° |
| | | num = inoutRecordService.addInoutRecord(data); |
| | | }else { |
| | | if (Constant.PROGRESS_WEIGHT_EMPTY.equals(curProgress)) { |
| | | data.setEmptyWeightTime(new Date()); |
| | | data.setEmptyWeightUser(ContextUtil.getLoginUserName()); |
| | | } |
| | | if (Constant.PROGRESS_WEIGHT_FULL.equals(curProgress)) { |
| | | data.setFullWeightTime(new Date()); |
| | | data.setFullWeightUser(ContextUtil.getLoginUserName()); |
| | | } |
| | | //ç§°éæ´æ° |
| | | num = inoutRecordService.updateInoutRecord(data); |
| | | } |
| | | |
| | | if (num == 0) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "æäº¤å¤±è´¥ï¼", data); |
| | | } |
| | | |
| | | //TODO éä»¶å¤ç |
| | | // List<FileData> files = data.getFiles(); |
| | | // if (null != files && files.size() > 0) { |
| | | // // æ§è¡éä»¶ä¿¡æ¯ |
| | | // fileService.saveInoutFiles(files, data.getCompanyId(), data.getId(), curProgress); |
| | | // } |
| | | |
| | | return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "æ§è¡æå", data); |
| | | } |
| | | |
| | | /** |
| | | * å¼ä»ä¿¡æ¯æäº¤ |
| | | * @param data |
| | | * @return |
| | | */ |
| | | public PageResponse<InoutRecord> submitHandle(InoutRecord data) { |
| | | |
| | | // è·åç³»ç»åæ°é
ç½® |
| | | InoutSysConf inoutSysConf = inoutConfService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId()); |
| | | if (null == inoutSysConf) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "æç¤ºï¼å½åç³»ç»ä¸æµç¨é
ç½®å¼å¸¸ï¼è¯·è系管çå", data); |
| | | } |
| | | |
| | | // è·åä¸ä¸ä¸ªæµç¨ç¶æ |
| | | String curProgress = data.getProgress(); |
| | | String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf); |
| | | data.setProgress(nextProgress); |
| | | |
| | | data.setHandleEnd(new Date()); |
| | | data.setHandleUser(ContextUtil.getLoginUserName()); |
| | | // æ§è¡æ°æ®æ´æ° |
| | | int num = inoutRecordService.updateInoutRecord(data); |
| | | |
| | | if (num == 0) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "æäº¤å¤±è´¥ï¼", data); |
| | | } |
| | | |
| | | //TODO éä»¶å¤ç |
| | | // List<FileData> files = data.getFiles(); |
| | | // if (null != files && files.size() > 0) { |
| | | // // æ§è¡éä»¶ä¿¡æ¯ |
| | | // fileService.saveInoutFiles(files, data.getCompanyId(), data.getId(), curProgress); |
| | | // } |
| | | |
| | | return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "æäº¤æå", data); |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸ä¸æµç¨ |
| | | * |
| | | * @param curProgress |
| | | * @param type |
| | | * @param sysConf |
| | | * @return |
| | | */ |
| | | private String getNextProgress(String curProgress, String type, InoutSysConf sysConf) { |
| | | String nextProgress = null; |
| | | List<String> list = null; |
| | | if (Constant.TYPE_IN.equals(type)) { |
| | | list = Arrays.asList(sysConf.getProgressIn().split("-")); |
| | | } |
| | | if (Constant.TYPE_OUT.equals(type)) { |
| | | list = Arrays.asList(sysConf.getProgressOut().split("-")); |
| | | } |
| | | if (list != null) { |
| | | for (int i = 0; i < list.size() - 1; i++) { |
| | | if (curProgress.equals(list.get(i))) { |
| | | nextProgress = list.get(i + 1); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return nextProgress; |
| | | } |
| | | |
| | | /** |
| | | * å页æ¥è¯¢æ°æ® |
| | | * @param param |
| | | * @return |
| | | */ |
| | | public PageResponse<Page<InoutRecord>> pageInoutData(InoutParam param) { |
| | | if (StringUtils.isEmpty(param.getCompanyId())) { |
| | | param.setCompanyId(ContextUtil.getCompanyId()); |
| | | } |
| | | if (StringUtils.isEmpty(param.getDeptId())) { |
| | | param.setDeptId(ContextUtil.subDeptId(null)); |
| | | } |
| | | |
| | | Page<InoutRecord> corePage = new Page<>(param.getPage(), param.getLimit()); |
| | | inoutRecordService.listPageInout(corePage, param); |
| | | |
| | | if (null == corePage.getRecords() || corePage.getRecords().isEmpty()) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(), "è·åå°æ°æ®ä¿¡æ¯ä¸ºç©º"); |
| | | } |
| | | |
| | | return new PageResponse<>(RespCodeEnum.CODE_0000, corePage); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ°æ® |
| | | * @param param |
| | | * @return |
| | | */ |
| | | public PageResponse<InoutRecord> inoutQuery(InoutParam param) { |
| | | if (StringUtils.isEmpty(param.getId())) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1007.getCode(), "æ¥è¯¢åæ°ä¸å®æ´ï¼æ¥è¯¢å¤±è´¥ï¼"); |
| | | } |
| | | |
| | | InoutRecord result = inoutRecordService.selectById(param.getId()); |
| | | if (null == result) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(), |
| | | "ç³»ç»æªæ¥è¯¢å°æ§è¡ä¸çåæ®ä¿¡æ¯", null); |
| | | } |
| | | return new PageResponse<>(RespCodeEnum.CODE_0000, result); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | .rkbk-search-input.bg-date { |
| | | background: #eff4f6 url(../img/web/inout/icon-date.png) 98% center no-repeat; |
| | | background: #FFFFFF url(../img/web/inout/icon-date.png) 98% center no-repeat; |
| | | } |
| | | |
| | | |
| | |
| | | padding: 20px; |
| | | background: #fff; |
| | | margin-top: 20px; |
| | | height: 782px; |
| | | } |
| | | |
| | | .qyzj-con-top .layui-input-block { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | //å½åèç¹ å
¥åºè´¨æ£ |
| | | var layer; |
| | | var form; |
| | | var table; |
| | | var upload; |
| | | var page = 1; |
| | | var limit = 15; |
| | | var recordData = null; |
| | | var selectData = null; //åéçä¿¡æ¯ |
| | | var snapData;//ç³»ç»ææå¯¹è±¡ä¿¡æ¯ |
| | | var timerWeight; |
| | | var img1, img2, img3;// 页é¢ä¸çå¾çä¸ä¼ åç§° |
| | | |
| | | $(function () { |
| | | layui.use(['layer', 'laydate', 'form', 'table', 'util', 'upload'], function () { |
| | | var util = layui.util; |
| | | upload = layui.upload; |
| | | layer = layui.layer; |
| | | form = layui.form; |
| | | table = layui.table; |
| | | var laydate = layui.laydate; |
| | | |
| | | laydate.render({ |
| | | elem: '#start', |
| | | theme: '#7b8e9f', |
| | | value: startTime |
| | | }); |
| | | |
| | | laydate.render({ |
| | | elem: '#end', |
| | | theme: '#7b8e9f', |
| | | value: endTime |
| | | }); |
| | | |
| | | laydate.render({ |
| | | elem: '#foodYear', |
| | | theme: '#7b8e9f', |
| | | type: 'year' |
| | | }); |
| | | //ä¸ä¼ |
| | | upload.render({ |
| | | elem: '#kccz-r-btn1', |
| | | url: '../file/update-file', //ä¸ä¼ æ¥å£ |
| | | size: 4 * 1024, //é嶿件大å°ï¼åä½KB, æå¤§ä¸ä¼ 4MB |
| | | accept: 'images', |
| | | before: function (obj) { |
| | | var plateNum = $("#plateNum").val(); |
| | | this.data = {"plateNum": plateNum, "type": "1"};//æºå¸¦åæ° |
| | | //é¢è¯»æ¬å°æä»¶ç¤ºä¾ï¼ä¸æ¯æie8 |
| | | obj.preview(function (index, file, result) { |
| | | $('#kccz-r-img1').attr('src', result); //å¾ç龿¥ï¼base64ï¼ |
| | | }); |
| | | }, |
| | | done: function (res) { |
| | | //妿ä¸ä¼ 失败 |
| | | if (res.code > 0) { |
| | | layer.msg("å¾çä¸ä¼ 失败ï¼"); |
| | | } |
| | | //ä¸ä¼ æå |
| | | img1 = res.msg; |
| | | layer.msg("å¾çä¸ä¼ æåï¼"); |
| | | //console.log(img1); |
| | | } |
| | | }); |
| | | upload.render({ |
| | | elem: '#kccz-r-btn2', |
| | | url: '../file/update-file', //ä¸ä¼ æ¥å£ |
| | | size: 4 * 1024, //é嶿件大å°ï¼åä½KB, æå¤§ä¸ä¼ 4MB |
| | | accept: 'images', |
| | | before: function (obj) { |
| | | var plateNum = $("#plateNum").val(); |
| | | this.data = {"plateNum": plateNum, "type": "1"};//æºå¸¦åæ° |
| | | //é¢è¯»æ¬å°æä»¶ç¤ºä¾ï¼ä¸æ¯æie8 |
| | | obj.preview(function (index, file, result) { |
| | | $('#kccz-r-img2').attr('src', result); //å¾ç龿¥ï¼base64ï¼ |
| | | }); |
| | | }, |
| | | done: function (res) { |
| | | //妿ä¸ä¼ 失败 |
| | | if (res.code > 0) { |
| | | layer.msg("å¾çä¸ä¼ 失败ï¼"); |
| | | } |
| | | //ä¸ä¼ æå |
| | | img2 = res.msg; |
| | | layer.msg("å¾çä¸ä¼ æåï¼"); |
| | | // console.log(img2); |
| | | } |
| | | }); |
| | | upload.render({ |
| | | elem: '#kccz-r-btn3', |
| | | url: '../file/update-file', //ä¸ä¼ æ¥å£ |
| | | size: 4 * 1024, //é嶿件大å°ï¼åä½KB, æå¤§ä¸ä¼ 4MB |
| | | accept: 'images', |
| | | before: function (obj) { |
| | | var plateNum = $("#plateNum").val(); |
| | | this.data = {"plateNum": plateNum}; //æºå¸¦åæ° |
| | | //é¢è¯»æ¬å°æä»¶ç¤ºä¾ï¼ä¸æ¯æie8 |
| | | obj.preview(function (index, file, result) { |
| | | $('#kccz-r-img3').attr('src', result); //å¾ç龿¥ï¼base64ï¼ |
| | | }); |
| | | }, |
| | | done: function (res) { |
| | | //妿ä¸ä¼ 失败 |
| | | if (res.code > 0) { |
| | | layer.msg("å¾çä¸ä¼ 失败ï¼"); |
| | | } |
| | | //ä¸ä¼ æå |
| | | img3 = res.msg; |
| | | layer.msg("å¾çä¸ä¼ æåï¼"); |
| | | } |
| | | }); |
| | | |
| | | // çå¬è¡å·¥å
·äºä»¶ |
| | | table.on('tool(tableData)', function (obj) { |
| | | if (obj.event === 'edit') { |
| | | //å±ç¤ºå¼¹çª |
| | | afreshGetData(obj); |
| | | } |
| | | }); |
| | | |
| | | // çå¬ä»åºéæ©ï¼éæ©åèªå¨è°ç¨ä»åºçç²®åç§å产å°ä¿¡æ¯ |
| | | form.on('select(select_depotId)', function (obj) { |
| | | updateFoodVarietyByDepot(obj.value); |
| | | }); |
| | | // åå§åè¡¨åæ°æ® |
| | | renderTable(); |
| | | }); |
| | | |
| | | //æ¾ç¤ºç§°éå¼¹çªæµç¨ |
| | | showProgress(); |
| | | |
| | | // ç嬿¯ä¾å¼å¡«å |
| | | $(".per").blur(function () { |
| | | deAutoByPer(); |
| | | }); |
| | | |
| | | // ç嬿¯ä¾å¼å¡«å |
| | | $(".weight").blur(function () { |
| | | deAutoByWeight(); |
| | | }); |
| | | //åå§åWebSocket |
| | | // initWS(deptId, bizType, progress, userId); |
| | | }); |
| | | |
| | | window.onload = function () { |
| | | //èªå¨è¿æ¥å°ç£
ä¿¡æ¯ï¼2.5ç§è·å䏿¬¡å°ç£
ééä¿¡æ¯ |
| | | clearInterval(timerWeight); |
| | | timerWeight = setInterval(function () { |
| | | flushWeight(); |
| | | }, 2500); |
| | | |
| | | // å è½½è§é¢ |
| | | initVideo(lprDto, snapDto1, snapDto2); |
| | | |
| | | //设置å°ç£
|
| | | $("#scaleName").val(weightDto.sort); |
| | | |
| | | //çå¬å°ç£
éæ© |
| | | $("#scaleName").change(function () { |
| | | layer.confirm('è°æ´å°ç£
ééæ°å 载页é¢ï¼ç¡®å®è°æ´ï¼', { |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | }, function () { |
| | | updateWeight(); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | //æ ¹æ®æ¡ä»¶æ¥è¯¢æ°æ® |
| | | function flushData() { |
| | | var index = layer.load(); |
| | | var param = form.val("form-param"); |
| | | table.reload('tableData', { |
| | | url: "/basic/inout/page-inout-data", |
| | | where: param |
| | | }); |
| | | $("thead tr").css({ |
| | | "border-bottom": "2px solid #53adce", |
| | | "background": "#eff4f6" |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | |
| | | //è¡¨åæ¸
空 |
| | | function resetForm() { |
| | | $("#form-param")[0].reset(); |
| | | form.render(); |
| | | } |
| | | |
| | | // 渲æè¡¨åæ°æ® |
| | | function renderTable() { |
| | | var param = form.val("form-param"); |
| | | // æ¸
ç©ºæ°æ® |
| | | $("#tableData").empty(); |
| | | table.render({ |
| | | elem: '#tableData', |
| | | url: '/basic/inout/page-inout-data', |
| | | page: true, |
| | | limit: limit, |
| | | even: true, |
| | | method: 'POST', |
| | | contentType: "application/json;charset=UTF-8", |
| | | cols: [[{ |
| | | type: 'numbers', |
| | | title: 'åºå·' |
| | | }, { |
| | | field: 'id', |
| | | title: 'åæ®å·', |
| | | width: '13%', |
| | | style: 'color: #f67d06;font-weight: bold' |
| | | }, { |
| | | field: 'plateNum', |
| | | title: '车ç', |
| | | width: '11%', |
| | | style: 'font-weight: bold' |
| | | }, { |
| | | field: 'type', |
| | | title: 'ç±»å', |
| | | templet: function (item) { |
| | | var result = item.type; |
| | | return result == "IN" ? "å
¥åº" : "åºåº"; |
| | | } |
| | | }, { |
| | | field: 'customerName', |
| | | title: 'åè´§åä½' |
| | | }, { |
| | | field: 'deptName', |
| | | title: 'æ¶è´§åä½' |
| | | }, { |
| | | field: 'depotId', |
| | | title: 'è£
å¸ä»åº', |
| | | width: '10%', |
| | | templet: function (item) { |
| | | var result = item.depotId; |
| | | $.each(listDepot, function (index, data) { |
| | | if (item.depotId == data.id) { |
| | | result = data.name; |
| | | return true; |
| | | } |
| | | }); |
| | | return result == null ? "" : result; |
| | | } |
| | | }, { |
| | | field: 'foodVariety', |
| | | title: 'åç§', |
| | | width: '10%', |
| | | templet: function (item) { |
| | | var result = item.foodVariety; |
| | | $.each(listFoodVariety, function (index, data) { |
| | | if (item.foodVariety == data.code) { |
| | | result = data.name; |
| | | return true; |
| | | } |
| | | }); |
| | | return result == null ? "" : result; |
| | | } |
| | | }, { |
| | | field: 'progress', |
| | | title: 'æµç¨è¿åº¦', |
| | | width: '10%', |
| | | style: 'font-weight: bold', |
| | | templet: function (item) { |
| | | return INOUT_PROGRESS_MSG(item.progress); |
| | | } |
| | | }, { |
| | | field: '', |
| | | title: 'æä½', |
| | | width: '9%', |
| | | toolbar: "#barControl" |
| | | }]], |
| | | where: param, |
| | | parseData: function (res) { |
| | | if ("0000" == res.code) { |
| | | return { |
| | | "code": "0", |
| | | "msg": res.msg, |
| | | "count": res.data.total, |
| | | "data": res.data.records |
| | | } |
| | | } else { |
| | | return { |
| | | "code": "1", |
| | | "msg": res.msg |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | $("thead tr").css({ |
| | | "border-bottom": "2px solid #53adce", |
| | | "background": "#eff4f6" |
| | | }); |
| | | } |
| | | |
| | | /*-----------------------å¼¹çªæ¾ç¤ºæ¸²æ-å¼å§------------------------------*/ |
| | | |
| | | //æä½åï¼éæ°æµæ°´æ°æ®å½åä¿¡æ¯ |
| | | function afreshGetData(obj) { |
| | | var index = layer.load(); |
| | | recordData = null; |
| | | var data = obj.data; |
| | | var param = { |
| | | userId: data.userId, |
| | | plateNum: data.plateNum, |
| | | id: data.id |
| | | }; |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../basic/inout/inout-query", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(param), |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | layer.alert("è¯·å·æ°é¡µé¢åï¼éæ°æä½ï¼ï¼"); |
| | | } else { |
| | | recordData = result.data; |
| | | showWindows(recordData.progress); |
| | | } |
| | | layer.close(index); |
| | | }, |
| | | error: function () { |
| | | layer.close(index); |
| | | layer.alert("è¯·å·æ°é¡µé¢åï¼éæ°æä½ï¼ï¼"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //æ¾ç¤ºæµç¨æä½å¼¹çª |
| | | function quickRegister() { |
| | | //ç»è®°æé®æ¾å¼ |
| | | $("#btn_register").css("display", "block"); |
| | | //ç§°éæä½å¼¹çª |
| | | var pro = 'ç»è®°'; |
| | | updateEditAndProgress(); |
| | | flushPage(); |
| | | layer.open({ |
| | | type: 1, |
| | | title: pro, |
| | | area: ['1283px', '815px'], |
| | | cancel: function (index, layero) { |
| | | $("#weightDetail").css("display", "none"); |
| | | }, |
| | | shade: 0, |
| | | scrollbar: 0, |
| | | content: $('#weightDetail'), |
| | | offset: ['16px', '16px'] |
| | | }); |
| | | } |
| | | |
| | | //æ¾ç¤ºæµç¨æä½å¼¹çª |
| | | function showWindows(progress) { |
| | | console.log(progress); |
| | | if (progress == 'WEIGHT_FULL' || progress == 'WEIGHT_EMPTY') { |
| | | //ç»è®°æé®æ¾å¼ |
| | | $("#btn_register").css("display", "none"); |
| | | //ç§°éæä½å¼¹çª |
| | | var pro = '空车称é'; |
| | | if (progress == 'WEIGHT_FULL') { |
| | | pro = '满车称é'; |
| | | } |
| | | updateEditAndProgress(); |
| | | flushPage(); |
| | | layer.open({ |
| | | type: 1, |
| | | title: "ç§°é" + pro + " - åå·ï¼" + recordData.id, |
| | | area: ['1283px', '815px'], |
| | | cancel: function (index, layero) { |
| | | $("#weightDetail").css("display", "none"); |
| | | }, |
| | | shade: 0, |
| | | scrollbar: 0, |
| | | content: $('#weightDetail'), |
| | | offset: ['16px', '16px'] |
| | | }); |
| | | } else if (progress == 'HANDLE') { |
| | | //å¼ä»æä½å¼¹çª |
| | | form.val("form-handle", recordData); |
| | | form.render(); |
| | | layer.open({ |
| | | type: 1, |
| | | title: "å¼ä» - åå·ï¼" + recordData.id, |
| | | area: ['1283px', '815px'], |
| | | cancel: function (index, layero) { |
| | | $("#handleDetail").css("display", "none"); |
| | | }, |
| | | shade: 0, |
| | | scrollbar: 0, |
| | | content: $('#handleDetail'), |
| | | offset: ['16px', '16px'] |
| | | }); |
| | | } else { |
| | | layer.alert("请å°å¯¹åºé¡µé¢è¿è¡æä½ï¼ï¼ï¼"); |
| | | } |
| | | } |
| | | |
| | | //ç§°éå¼¹çªä¸æµç¨ç¯èæ¾ç¤º |
| | | function showProgress() { |
| | | if (!inoutProgress) { |
| | | return; |
| | | } |
| | | if (inoutProgress.indexOf("REGISTER") == -1) { |
| | | $("#progress-register").css("display", "none"); |
| | | } |
| | | if (inoutProgress.indexOf("WEIGHT_FULL") == -1) { |
| | | $("#progress-fullWeight").css("display", "none"); |
| | | } |
| | | if (inoutProgress.indexOf("HANDLE") == -1) { |
| | | $("#progress-hand").css("display", "none"); |
| | | } |
| | | if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) { |
| | | $("#progress-emptyWeight").css("display", "none"); |
| | | } |
| | | if (inoutProgress.indexOf("CARD_BACK") == -1) { |
| | | $("#progress-cardBack").css("display", "none"); |
| | | } |
| | | } |
| | | |
| | | //ç§°éå¼¹çªä¸æ´æ°æµç¨èç¹ |
| | | function updateEditAndProgress() { |
| | | if (recordData) { |
| | | if (InoutProgress.WEIGHT_EMPTY == recordData.progress) { |
| | | $("#emptyWeight").removeClass("rkbk-search-input"); |
| | | $("#emptyWeight").attr("disabled", false); |
| | | |
| | | $("#progress-hand").removeClass("active"); |
| | | $("#progress-fullWeight").removeClass("active"); |
| | | |
| | | $("#fullWeight").addClass("rkbk-search-input"); |
| | | $("#fullWeight").attr("disabled", true); |
| | | } |
| | | |
| | | if (InoutProgress.WEIGHT_FULL == recordData.progress) { |
| | | $("#fullWeight").removeClass("rkbk-search-input"); |
| | | $("#fullWeight").attr("disabled", false); |
| | | |
| | | $("#progress-hand").addClass("active"); |
| | | $("#progress-fullWeight").addClass("active"); |
| | | |
| | | $("#emptyWeight").addClass("rkbk-search-input"); |
| | | $("#emptyWeight").attr("disabled", true); |
| | | } |
| | | } else { |
| | | $("#fullWeight").addClass("rkbk-search-input"); |
| | | $("#fullWeight").attr("disabled", true); |
| | | |
| | | $("#emptyWeight").addClass("rkbk-search-input"); |
| | | $("#emptyWeight").attr("disabled", true); |
| | | |
| | | $("#progress-hand").removeClass("active"); |
| | | $("#progress-fullWeight").removeClass("active"); |
| | | } |
| | | } |
| | | |
| | | /*-----------------------å¼¹çªæ¾ç¤ºæ¸²æ-ç»æ------------------------------*/ |
| | | |
| | | /*-----------------------ç§°éæä½-å¼å§------------------------------*/ |
| | | |
| | | //èªå¨è¿æ¥å°ç£
ä¿¡æ¯ï¼2.5ç§è·å䏿¬¡å°ç£
ééä¿¡æ¯ |
| | | function timerGetWeight() { |
| | | clearInterval(timerWeight); |
| | | timerWeight = setInterval(function () { |
| | | flushWeight(); |
| | | }, 2500); |
| | | } |
| | | |
| | | //åé请æ±è·åç§°éæ°æ® |
| | | function flushWeight() { |
| | | var ip = "127.0.0.1"; |
| | | if (weightDto.ip) { |
| | | ip = weightDto.ip; |
| | | } |
| | | var port = "9111"; |
| | | if (weightDto.port) { |
| | | port = weightDto.port; |
| | | } |
| | | var sn = "WEIGHT"; |
| | | if (weightDto.sn) { |
| | | sn = weightDto.sn; |
| | | } |
| | | var url = "http://" + ip + ":" + port + "/" + sn; |
| | | $.ajax({ |
| | | type: "GET", |
| | | async: true, |
| | | timeout: 2000, |
| | | url: url, |
| | | data: {}, |
| | | dataType: "json", |
| | | success: function (json) { |
| | | var data = json.content; |
| | | if (!data) data = 0.0; |
| | | weightDto.weight = data; |
| | | $("#weightValue").text(data); |
| | | $("#img_scale_statule").attr("src", "/img/web/inout/icon-gree.png"); |
| | | }, |
| | | error: function () { |
| | | weightDto.weight = 0.0; |
| | | $("#weightValue").text("0.0"); |
| | | $("#img_scale_statule").attr("src", "/img/web/inout/icon-red.png"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ç¹å»ç§°é |
| | | function weight() { |
| | | // 没æä¸å¡æ°æ®ä¸å¯æ§è¡ |
| | | if (!recordData) { |
| | | layer.alert("æ²¡ææ¥è¯¢å°ä¸å¡æ°æ®ï¼æ§è¡è¢«æç»ï¼ï¼"); |
| | | return; |
| | | } |
| | | // 妿æ¯ç©ºè½¦ç§°é |
| | | if (InoutProgress.WEIGHT_EMPTY == recordData.progress) { |
| | | form.val("form-weight", { |
| | | emptyWeight: weightDto.weight |
| | | }); |
| | | } |
| | | // å¦ææ¯æ»¡è½¦ç§°é |
| | | if (InoutProgress.WEIGHT_FULL == recordData.progress) { |
| | | form.val("form-weight", { |
| | | fullWeight: weightDto.weight |
| | | }); |
| | | } |
| | | form.render(); |
| | | snapData == null; |
| | | |
| | | //ç¹å»ç§°éæ¶åèªå¨æææ°æ® |
| | | layer.msg("ç³»ç»èªå¨ææä¿çè®°å½â¦â¦"); |
| | | snapData = { |
| | | companyId: companyId, |
| | | deptId: deptId, |
| | | bizTag: recordData.progress, |
| | | bizType: bizType, |
| | | plateNum: recordData.plateNum + "-" + recordData.carNum, |
| | | |
| | | id1: (null != lprDto) ? lprDto.id : null, |
| | | id2: (null != snapDto1) ? snapDto1.id : null, |
| | | id3: (null != snapDto2) ? snapDto2.id : null |
| | | }; |
| | | |
| | | console.log(snapData); |
| | | //å½åAJAXæå¡ä¸ºåæ¥æå¡ï¼è¿åæ°æ®å
è£
ç
§çä¿¡æ¯ |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | sync: false, |
| | | type: "POST", |
| | | url: "../../basic/inout/snap-img", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(snapData), |
| | | success: function (result) { |
| | | layer.close(index); |
| | | if (result.code != "0000") { |
| | | layer.alert(result.msg); |
| | | } else { |
| | | snapData = result.data; |
| | | } |
| | | }, |
| | | error: function () { |
| | | layer.close(index); |
| | | layer.msg("åå°è°ç¨æªå¾å¤±è´¥ï¼è¯·éæ°å°è¯ï¼ï¼"); |
| | | } |
| | | }); |
| | | //äºæ¬¡ç§°éåï¼èªå¨è°ç¨ä¸èªå¨è®¡ç® |
| | | if (InoutProgress.WEIGHT_EMPTY == recordData.progress) { |
| | | deAutoByPer(); |
| | | } |
| | | flushBtn("btn-weight"); |
| | | } |
| | | |
| | | // èªå¨è®¡ç®ï¼æ³¨æï¼åºåºæ°´åæ¯ +ï¼å
¥åºæ°´åéè¦ - |
| | | function deAutoByPer() { |
| | | var curData = form.val("form-weight"); |
| | | |
| | | var netWeight = 0, deImpurity = 0, deWet = 0, deSum = 0, settleWeight = 0; |
| | | |
| | | if (curData.fullWeight == 0 || curData.emptyWeight == 0) { |
| | | return; |
| | | } |
| | | // 计ç®åé |
| | | netWeight = curData.fullWeight - curData.emptyWeight; |
| | | |
| | | if (netWeight <= 0) { |
| | | layer.msg("åéå°äºçäº0ï¼å½å计ç®ä¸æ£ç¡®ï¼"); |
| | | return; |
| | | } |
| | | |
| | | // æè´¨æ£é |
| | | if (curData.impurity > 0) { |
| | | deImpurity = (netWeight * curData.impurity / 100.00).toFixed(0); |
| | | } |
| | | // æ°´åå¢é |
| | | if (curData.wet > 0) { |
| | | deWet = (netWeight * curData.wet / 100.00).toFixed(0); |
| | | } |
| | | |
| | | |
| | | // æ»æ£é |
| | | deSum = Number(deImpurity) + Number(curData.deOther) |
| | | + Number(curData.deHandle); |
| | | deSum = deSum.toFixed(0); |
| | | |
| | | // ç»ç®åéï¼ææ°´åæ·»å è¿æ¥ |
| | | settleWeight = Number(netWeight) - Number(deSum) + Number(deWet); |
| | | settleWeight = settleWeight.toFixed(0); |
| | | |
| | | form.val("form-weight", { |
| | | netWeight: netWeight, |
| | | deImpurity: deImpurity, |
| | | deWet: deWet, |
| | | deSum: deSum, |
| | | settleWeight: settleWeight |
| | | }); |
| | | form.render(); |
| | | } |
| | | |
| | | // èªå¨è®¡ç® |
| | | function deAutoByWeight() { |
| | | var curData = form.val("form-weight"); |
| | | |
| | | var netWeight = 0, impurity = 0, wet = 0, deSum = 0, settleWeight = 0; |
| | | |
| | | if (curData.fullWeight == 0 || curData.emptyWeight == 0) { |
| | | return; |
| | | } |
| | | // åé |
| | | netWeight = curData.fullWeight - curData.emptyWeight; |
| | | |
| | | if (netWeight <= 0) { |
| | | layer.msg("åéå°äºçäº0ï¼å½å计ç®ä¸æ£ç¡®ï¼"); |
| | | return; |
| | | } |
| | | |
| | | // æè´¨-ç¾åæ¯ |
| | | if (curData.deImpurity > 0) { |
| | | impurity = (curData.deImpurity / netWeight * 100).toFixed(2); |
| | | } |
| | | // æ°´å -ç¾åæ¯ |
| | | if (curData.deWet > 0) { |
| | | wet = (curData.deWet / netWeight * 100).toFixed(2); |
| | | } |
| | | |
| | | // æ»æ£é= æè´¨æ£é + ä¸å®åæ£é + æ°ä½æ£é + å¼ä»æ£é + å
è£
æ£é |
| | | deSum = Number(curData.deImpurity) |
| | | + Number(curData.deOther) + Number(curData.deHandle); |
| | | |
| | | deSum = deSum.toFixed(0); |
| | | |
| | | // ç»ç®åéï¼ææ°´åæ·»å è¿æ¥ |
| | | settleWeight = Number(netWeight) - Number(deSum) + Number(curData.deWet); |
| | | settleWeight = settleWeight.toFixed(0); |
| | | |
| | | form.val("form-weight", { |
| | | netWeight: netWeight, |
| | | impurity: impurity, |
| | | wet: wet, |
| | | deSum: deSum, |
| | | settleWeight: settleWeight |
| | | }); |
| | | form.render(); |
| | | } |
| | | |
| | | //æ ¹æ®å½åæä½çæé®IDæ´æ°å
¶ä»æé®ç¶æ |
| | | function flushBtn(btnId) { |
| | | if ("btn-weight" == btnId) {// ç§°éåå¯ä»¥ç¹å»å®æç§°é |
| | | $("#btn-submit").removeClass("layui-btn-disabled"); |
| | | $("#btn-submit").attr("disabled", false); |
| | | } |
| | | if ("btn-submit" == btnId) { |
| | | $("#btn-submit").addClass("layui-btn-disabled"); |
| | | $("#btn-submit").attr("disabled", true); |
| | | flushData(); |
| | | if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {// åºåºï¼å¦ææ¯ç©ºè½¦ç§°éï¼å®ææ¶ç´æ¥å·æ°é¡µé¢ |
| | | layer.closeAll(); |
| | | } else { |
| | | // å®æç§°éåæ§å¶æé® |
| | | $("#btn-weight").addClass("layui-btn-disabled"); |
| | | $("#btn-weight").attr("disabled", true); |
| | | |
| | | $("#btn-printBill").removeClass("layui-btn-disabled"); |
| | | $("#btn-printBill").attr("disabled", false); |
| | | addDisabled(); |
| | | } |
| | | } |
| | | if ("btn-printBill" == btnId) {// æå°è¿ç£
åï¼è¯´æä¸å¡å®æ |
| | | $("#btn-weight").removeClass("layui-btn-disabled"); |
| | | $("#btn-weight").attr("disabled", false); |
| | | |
| | | $("#btn-submit").addClass("layui-btn-disabled"); |
| | | $("#btn-submit").attr("disabled", true); |
| | | |
| | | $("#btn-printBill").addClass("layui-btn-disabled"); |
| | | $("#btn-printBill").attr("disabled", true); |
| | | layer.closeAll(); |
| | | flushData(); |
| | | } |
| | | } |
| | | |
| | | //æ´æ¹æ£éä¿¡æ¯æ¡ä¸å¯ç¼è¾ |
| | | function addDisabled() { |
| | | //æè´¨ |
| | | $("#impurity").attr("disabled", true); |
| | | $("#deImpurity").attr("disabled", true); |
| | | //æ°´å |
| | | $("#wet").attr("disabled", true); |
| | | $("#deWet").attr("disabled", true); |
| | | //å¼ä» |
| | | $("#deHandle").attr("disabled", true); |
| | | //å
¶ä» |
| | | $("#deOther").attr("disabled", true); |
| | | } |
| | | |
| | | //æ¢å¤æ£éä¿¡æ¯æ¡ç¼è¾ç¶æ |
| | | function delDisabled() { |
| | | //æè´¨ |
| | | $("#impurity").attr("disabled", false); |
| | | $("#deImpurity").attr("disabled", false); |
| | | //æ°´å |
| | | $("#wet").attr("disabled", false); |
| | | $("#deWet").attr("disabled", false); |
| | | //å¼ä» |
| | | $("#deHandle").attr("disabled", false); |
| | | //å
¶ä» |
| | | $("#deOther").attr("disabled", false); |
| | | } |
| | | |
| | | // ç¹å»æå°ï¼ç³»ç»å¤ææ¯å¦å·²ç»æ§è¡å®æï¼å¦æå·²ç»å®æï¼ç´æ¥æå°ï¼å¦ææªå®æåå
æ§è¡å®æ |
| | | function printBill() { |
| | | if (!recordData) { |
| | | layer.alert("没æè·åå°ä¸å¡æ°æ®ï¼ä¸æ¯ææå°ï¼"); |
| | | return; |
| | | } |
| | | // ä»åå°è·å模çå¹¶æå° |
| | | var data = form.val("form-weight"); |
| | | // åå¹¶æ´æ°ç¶åç¼è¾æ°æ® |
| | | Object.assign(recordData, data); |
| | | |
| | | printBillStep2(); |
| | | }; |
| | | |
| | | // ç¹å»æå°ï¼å
æ§è¡ç³»ç»é»è®¤æ§è¡å®æå¡åæ¶ |
| | | function printBillStep2() { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../basic/inout-report/inout-bill-weight", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(recordData), |
| | | success: function (result) { |
| | | layer.close(index); |
| | | if (result.code != "0000") { |
| | | layer.msg(result.msg); |
| | | } else { |
| | | layer.msg("å¼å§æ¸²ææå°åâ¦â¦"); |
| | | printWeight(result.data); |
| | | // å·æ°æé® |
| | | flushBtn("btn-printBill"); |
| | | } |
| | | }, |
| | | error: function () { |
| | | layer.close(index); |
| | | layer.msg("è·åæå°æ¨¡ç失败ï¼è¯·è系管ç忥çåå ï¼ï¼"); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | //å®æç§°é |
| | | function submitWeight() { |
| | | if (null == recordData) { |
| | | notify("æ²¡ææ°æ®å¯ä»¥æäº¤", null); |
| | | return; |
| | | } |
| | | var data = form.val("form-weight"); |
| | | if (!data.depotId) { |
| | | notify("è£
å¸ä»åºå¿
须填å", null); |
| | | return; |
| | | } |
| | | // æ ¡éª-åºåºç©ºè½¦ |
| | | if (InoutProgress.WEIGHT_EMPTY == recordData.progress) { |
| | | if (data.emptyWeight <= 0.0) { |
| | | notify("空车称éä¿¡æ¯å¿
å¡«", null); |
| | | return; |
| | | } |
| | | if (!data.customerName) { |
| | | notify("徿¥åä½ä¿¡æ¯å¿
å¡«", null); |
| | | return; |
| | | } |
| | | } else { |
| | | if (data.fullWeight <= 0.0) { |
| | | notify("满车称éä¿¡æ¯å¿
å¡«", null); |
| | | return; |
| | | } |
| | | if (!data.foodVariety) { |
| | | notify("ç²®é£åç§å¿
å¡«", null); |
| | | return; |
| | | } |
| | | if (!data.foodLocation) { |
| | | notify("ç²®é£äº§å°å¿
å¡«", null); |
| | | return; |
| | | } |
| | | if (!data.settleWeight || data.settleWeight <= 0.0) { |
| | | notify("æ£éååä¿¡æ¯ä¸æ£ç¡®ï¼è¯·æ ¸å®è®¡ç®", null); |
| | | return; |
| | | } |
| | | } |
| | | // åå¹¶æ´æ°ç¶åç¼è¾æ°æ® |
| | | Object.assign(recordData, data); |
| | | |
| | | // è·åç
§ç |
| | | var files = [{ |
| | | fileName: snapData.fileName1 |
| | | }, { |
| | | fileName: snapData.fileName2 |
| | | }, { |
| | | fileName: snapData.fileName3 |
| | | }]; |
| | | recordData.files = files; |
| | | |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../basic/inout/inout-next-step", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(recordData), |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | layer.alert("æ°æ®æäº¤å¤±è´¥ï¼è¯·éè¯ï¼ï¼"); |
| | | } else { |
| | | clearInterval(timerWeight); |
| | | layer.alert("æ°æ®æäº¤æåï¼ï¼"); |
| | | // æ´æ°æé®æ¾ç¤º |
| | | flushBtn("btn-submit"); |
| | | } |
| | | layer.close(index); |
| | | }, |
| | | error: function () { |
| | | layer.close(index); |
| | | layer.alert("æäº¤å¤±è´¥ï¼è¯·éæ°å°è¯ï¼ï¼"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //éæ°ç§°éæ¶ï¼è¡¨å䏿¸
ç©ºï¼æé®éç½® |
| | | function flushPage() { |
| | | |
| | | weightDto.weight = 0.0; |
| | | $("#weightValue").text("0.0"); |
| | | $("#img_scale_statule").attr("src", "/img/web/inout/icon-red.png"); |
| | | timerGetWeight(); |
| | | |
| | | //æ£éä¿¡æ¯æ¡æ¢å¤ä¸ºå¯ç¼è¾ |
| | | delDisabled(); |
| | | //è¡¨åæ°æ®éç½® |
| | | form.val("form-weight", recordData); |
| | | form.render(); |
| | | } |
| | | |
| | | //æ ¹æ®éæ©çä»åºä¿¡æ¯,æ´æ°ç²®é£åç§ |
| | | function updateFoodVarietyByDepot(selectId) { |
| | | var selectDepot; |
| | | $.each(listDepot, function (index, data) { |
| | | if (data.id === selectId) { |
| | | selectDepot = data; |
| | | return false; |
| | | } |
| | | }); |
| | | |
| | | if (selectDepot) { |
| | | form.val("form-weight", { |
| | | foodVariety: selectDepot.foodVariety, |
| | | foodLocation: selectDepot.foodLocation, |
| | | foodLevel: selectDepot.foodLevel, |
| | | noticeId: selectDepot.noticeId |
| | | }); |
| | | form.render(); |
| | | } |
| | | } |
| | | |
| | | /*-----------------------ç§°éæä½-ç»æ------------------------------*/ |
| | | |
| | | /*-----------------------å¼ä»æä½-å¼å§------------------------------*/ |
| | | |
| | | //å¼ä»æäº¤ |
| | | function submitHandle() { |
| | | if (null == recordData) { |
| | | layer.alert("æ²¡ææ°æ®å¯ä»¥æäº¤ï¼ï¼ï¼"); |
| | | return; |
| | | } |
| | | var index = layer.load(); |
| | | var data = form.val("form-handle"); |
| | | |
| | | // åå¹¶æ´æ°ç¶åç¼è¾æ°æ® |
| | | Object.assign(recordData, data); |
| | | |
| | | // è·åå¾çåç§° |
| | | recordData.files = [{ |
| | | fileName: img1 |
| | | }, { |
| | | fileName: img2 |
| | | }, { |
| | | fileName: img3 |
| | | }]; |
| | | |
| | | console.log(recordData); |
| | | |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../basic/inout/inout-next-step", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(recordData), |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | layer.alert("æäº¤å¤±è´¥ï¼è¯·éæ°å°è¯ï¼ï¼"); |
| | | } else { |
| | | layer.alert("å¼ä»å®æï¼ï¼"); |
| | | layer.closeAll(); |
| | | flushData(); |
| | | } |
| | | layer.close(index); |
| | | }, |
| | | error: function () { |
| | | layer.close(index); |
| | | layer.alert("æäº¤å¤±è´¥ï¼è¯·éæ°å°è¯ï¼ï¼"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // ---------------------------徿¥å使ä½--å¼å§ -------------------// |
| | | // å¼¹åºå¾æ¥åä½ä¸ææ¡ |
| | | function showCustomer() { |
| | | var index = layer.load(); |
| | | |
| | | // 渲æå¾æ¥åä½å表 |
| | | table.render({ |
| | | elem: '#tableCustomer', |
| | | url: '../../basic/inout/list-out-customer', |
| | | page: false, |
| | | // skin : "nob", |
| | | // size : 'sm', |
| | | toolbar: '#toolbarCustomer', |
| | | even: true, |
| | | method: 'POST', |
| | | contentType: "application/json;charset=UTF-8", |
| | | cols: [[{ |
| | | field: 'id', |
| | | title: 'ç¼ç ' |
| | | }, { |
| | | field: 'name', |
| | | title: 'åç§°' |
| | | }, { |
| | | field: 'cardId', |
| | | title: '身份è¯' |
| | | }]], |
| | | parseData: function (res) { |
| | | if ("0000" == res.code) { |
| | | return { |
| | | "code": "0", |
| | | "msg": res.msg, |
| | | "data": res.data |
| | | } |
| | | } else { |
| | | return { |
| | | "code": "1", |
| | | "msg": res.msg |
| | | } |
| | | } |
| | | }, |
| | | done: function (res) { |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | |
| | | //å廿¾ç¤ºé䏿°æ® |
| | | table.on('rowDouble(tableCustomer)', function (obj) { |
| | | var data = obj.data; |
| | | // èµå¼ |
| | | form.val("form-weight", { |
| | | customerId: data.id, |
| | | customerName: data.name |
| | | }); |
| | | // å
³é |
| | | layer.close(index2); |
| | | }); |
| | | |
| | | // å¼¹åºå¯¹è¯æ¡ |
| | | var index2 = layer.open({ |
| | | type: 1, |
| | | title: "鿩徿¥åä½", |
| | | area: ['600px', '600px'], |
| | | shade: 0, |
| | | content: $('#listCustomer'), |
| | | btn: 0, |
| | | btn: ['åæ¶'], |
| | | yes: function () { |
| | | layer.close(index2); |
| | | }, |
| | | closeBtn: 0 |
| | | }); |
| | | } |
| | | |
| | | // å·æ°å¾æ¥å使°æ® |
| | | function flushCustomer() { |
| | | var key = $("#key").val(); |
| | | var param = { |
| | | key: key |
| | | }; |
| | | table.reload('tableCustomer', { |
| | | url: "../../basic/inout/list-out-customer", |
| | | where: param, |
| | | done: function (res) { |
| | | if (key) { |
| | | $("#key").val(key); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // ---------------------------徿¥å使ä½--ç»æ-------------------// |
| | | |
| | | /** |
| | | * å¼¹åºæéæ¡ |
| | | * @param msg æéä¿¡æ¯ |
| | | * @param data æ°æ®ä¿¡æ¯ï¼å¯è½ä¸ºç©º |
| | | */ |
| | | function notify(msg, data) { |
| | | if (data) { |
| | | //èµå¼ |
| | | $("#resultMsg").text(msg); |
| | | $("#resultUserName").text(data.userName); |
| | | $("#resultPlateNum").text(data.plateNum); |
| | | if ("IN" == data.type) { |
| | | $("#resultType").text("å
¥åº-" + INOUT_PROGRESS_MSG(data.progress)); |
| | | } else { |
| | | $("#resultType").text("åºåº-" + INOUT_PROGRESS_MSG(data.progress)); |
| | | } |
| | | $("#resultIntelCard").text(data.intelCard); |
| | | |
| | | layer.open({ |
| | | type: 1, |
| | | offset: ['150px', '200px'], |
| | | area: '450px;', |
| | | shade: 0.8, |
| | | id: 'dialog_notify_info', |
| | | btn: ['ç¡®å®'], |
| | | content: $('#dialog-from-notify'), |
| | | yes: function (index) { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } else { |
| | | layer.alert(msg, {offset: ['300px', '300px']}); |
| | | } |
| | | }; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | var layer; |
| | | var form; |
| | | var snapData;//ç»è®°ç
§ç |
| | | |
| | | $(function () { |
| | | layui.use(['layer', 'laydate', 'form', 'util'], function () { |
| | | var util = layui.util; |
| | | var laydate = layui.laydate; |
| | | layer = layui.layer; |
| | | form = layui.form; |
| | | laydate.render({ |
| | | elem: '#userBirthday' |
| | | }); |
| | | }); |
| | | |
| | | showProgress(); |
| | | |
| | | var rightH = $(".rkbk-left-wrap").height(); |
| | | $(".rkbk-right-wrap").height(rightH); |
| | | |
| | | $(window).resize(function () { |
| | | var rightH = $(".rkbk-left-wrap").height(); |
| | | $(".rkbk-right-wrap").height(rightH); |
| | | }); |
| | | |
| | | // åå§åWebSocket |
| | | // initWS(deptId, bizType, progress, userId); |
| | | }); |
| | | |
| | | window.onload = function () { |
| | | // å è½½è§é¢ |
| | | initVideo(lprDto, null, null); |
| | | }; |
| | | |
| | | |
| | | //æ§å¶æµç¨ç¯èæ¾ç¤º |
| | | function showProgress() { |
| | | if (!inoutProgress) { |
| | | return; |
| | | } |
| | | if (inoutProgress.indexOf("REGISTER") == -1) { |
| | | $("#progress-register").css("display", "none"); |
| | | } |
| | | if (inoutProgress.indexOf("WEIGHT_FULL") == -1) { |
| | | $("#progress-fullWeight").css("display", "none"); |
| | | } |
| | | if (inoutProgress.indexOf("HANDLE") == -1) { |
| | | $("#progress-hand").css("display", "none"); |
| | | } |
| | | if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) { |
| | | $("#progress-emptyWeight").css("display", "none"); |
| | | } |
| | | if (inoutProgress.indexOf("CARD_BACK") == -1) { |
| | | $("#progress-cardBack").css("display", "none"); |
| | | } |
| | | } |
| | | |
| | | // socketä¿¡æ¯è¿åèç |
| | | function socketOnMessage(packet) { |
| | | |
| | | }; |
| | | |
| | | //ä½¿ç¨æä»¶è¯»åèº«ä»½è¯ |
| | | function flushIdCard() { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | async: true, |
| | | url: "http://127.0.0.1:9111/IDCARD", |
| | | data: {}, |
| | | dataType: "json", |
| | | success: function (json) { |
| | | layer.close(index); |
| | | var data = json; |
| | | if (data.code === "200" || data.code == 200) { |
| | | // 临æ¶èµå¼ |
| | | $("#userName").val(data.cnName); |
| | | $("#userSex").val(data.sex); |
| | | $("#userNation").val(data.nation); |
| | | $("#userAddress").val(data.address); |
| | | //$("#id_img_pers").attr("src",data.Image); |
| | | var time = data.birthdate; |
| | | if (time.length == 8) { |
| | | time = time.substring(0, 4) + "-" + time.substring(4, 6) + "-" + time.substring(6); |
| | | } |
| | | $("#userBirthday").val(time); |
| | | $("#userId").val(data.idNum); |
| | | if (data.Image) { |
| | | $("#id_img_pers").attr("src", data.Image); |
| | | } |
| | | getPhone(); |
| | | }else{ |
| | | alertError("没æè·åå°èº«ä»½è¯ä¿¡æ¯ï¼"); |
| | | return; |
| | | } |
| | | |
| | | }, |
| | | error: function () { |
| | | layer.alert("身份è¯è¯»å失败ï¼", { |
| | | offset: ['300px', '300px'] |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | //ä½¿ç¨æä»¶è¯»åæºæ
§å¡å· |
| | | function flushICCard() { |
| | | $("#intelCard").val(null); |
| | | $.ajax({ |
| | | type: "GET", |
| | | async: true, |
| | | url: "http://127.0.0.1:9111/ICCARD", |
| | | data: {}, |
| | | dataType: "json", |
| | | // jsonp: "callback", |
| | | // jsonpCallback: "jsonpCallback", |
| | | success: function (json) { |
| | | //console.log(json); |
| | | var data = json; |
| | | //console.log(data); |
| | | if (data.code === "200" || data.code == 200) { |
| | | $("#intelCard").val(data.no); |
| | | } else { |
| | | layer.alert("è¯·éæ°è¯»å¡ï¼", {offset: ['300px', '300px']}); |
| | | } |
| | | }, |
| | | error: function () { |
| | | layer.alert("ICå¡è¯»ååºéï¼", {offset: ['300px', '300px']}); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | //è·åèç³»æ¹å¼ |
| | | function getPhone() { |
| | | var userId = $("#userId").val(); |
| | | var data = { |
| | | userId: userId |
| | | }; |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../basic/inout/driver-phone", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(data), |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | layer.msg("æªè·åå°å¸æºä¿¡æ¯ï¼è¯·å¡«åèç³»æ¹å¼"); |
| | | } else { |
| | | $("#userContact").val(result.data.mobile); |
| | | } |
| | | }, |
| | | error: function () { |
| | | layer.msg("æªè·åå°å¸æºä¿¡æ¯ï¼è¯·å¡«åèç³»æ¹å¼"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | //读å车çå· |
| | | function flushPlateNum() { |
| | | var param = JSON.stringify(lprDto); |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../inout/api/get-plateNum", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: param, |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | alertError(result.msg); |
| | | } else { |
| | | $("#plateNum").val(result.data.plateNum); |
| | | $("#plateNum2").val(result.data.plateNum); |
| | | if (plateTag === "Y") { |
| | | plateNumImg(result.data.plateNum, result.data.platePath); |
| | | } |
| | | } |
| | | layer.close(index); |
| | | getPlateNumAfter() |
| | | }, |
| | | error: function () { |
| | | layer.close(index); |
| | | alertError("车çè¯å«å¤±è´¥ï¼"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | //è·åæè½¦å· |
| | | function getPlateNumAfter() { |
| | | var plateNum = $("#plateNum").val(); |
| | | var data = { |
| | | plateNum: plateNum |
| | | }; |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../basic/inout/plate-num", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(data), |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | layer.msg("æªè·åå°è½¦çä¿¡æ¯ï¼è¯·å¡«åæè½¦å·"); |
| | | } else { |
| | | $("#plateNumAfter").val(result.data.plateNumAfter); |
| | | } |
| | | }, |
| | | error: function () { |
| | | layer.msg("æªè·åå°è½¦çä¿¡æ¯ï¼è¯·å¡«åæè½¦å·"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | ///é置车çè¯å«ä¿¡æ¯ |
| | | function resetPlateNum() { |
| | | var index = layer.load(); |
| | | var param = JSON.stringify(lprDto); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../inout/api/reset-lpr", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: param, |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | layer.alert(result.msg, { |
| | | offset: ['300px', '300px'] |
| | | }); |
| | | } else { |
| | | layer.alert("éç½®æåï¼è¯·éæ°è·å车çä¿¡æ¯", { |
| | | offset: ['300px', '300px'] |
| | | }); |
| | | } |
| | | layer.close(index); |
| | | }, |
| | | error: function () { |
| | | layer.close(index); |
| | | layer.alert("éç½®æ§è¡å¤±è´¥", { |
| | | offset: ['300px', '300px'] |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // è¡¨åæ¸
空 |
| | | function resetForm() { |
| | | $("#form-data")[0].reset(); |
| | | form.render(); |
| | | // 身份è¯éç½® |
| | | $("#id_img_pers").attr("src", "../../static/images/rkbk-photo_03.png"); |
| | | $("#pz-img").removeClass("kccz-r-img-red"); |
| | | $("#pz-text").text("èªå¨ææ"); |
| | | } |
| | | |
| | | // å½å宿 |
| | | function submit() { |
| | | var data = form.val("form-data"); |
| | | if (!data.plateNum) { |
| | | alertError("æ¿è¿äººè½¦çå·ä¸è½ä¸ºç©º"); |
| | | return; |
| | | } |
| | | if (!data.userName) { |
| | | alertError("æ¿è¿äººå§åä¸è½ä¸ºç©º"); |
| | | return; |
| | | } |
| | | if (!data.userId) { |
| | | alertError("æ¿è¿äººèº«ä»½è¯å·ä¸è½ä¸ºç©º"); |
| | | return; |
| | | } |
| | | if (!data.userContact) { |
| | | alertError("æ¿è¿äººèç³»æ¹å¼ä¸è½ä¸ºç©º"); |
| | | return; |
| | | } |
| | | var isPhone = checkPhone(data.userContact); |
| | | if (!isPhone) { |
| | | alertError("ææºå·æ ¼å¼ä¸å¯¹ï¼è¯·æ£æ¥ä¸ä¸ææºå·"); |
| | | return; |
| | | } |
| | | var isUserId = checkPsidno(data.userId); |
| | | if (!isUserId) { |
| | | alertError("身份è¯å·æ ¼å¼ä¸å¯¹ï¼è¯·æ£æ¥ä¸ä¸èº«ä»½è¯å·"); |
| | | return; |
| | | } |
| | | var isPlateNum = checkPlateNum(data.plateNum); |
| | | if (!isPlateNum) { |
| | | alertError("车çå·æ ¼å¼ä¸å¯¹ï¼è¯·æ£æ¥ä¸ä¸è½¦çå·"); |
| | | return; |
| | | } |
| | | |
| | | //ç³»ç»ææ |
| | | layer.msg("ç³»ç»èªå¨ææè®°å½â¦â¦"); |
| | | snapData = { |
| | | companyId: companyId, |
| | | deptId: deptId, |
| | | progress: progress, |
| | | bizType: type, |
| | | plateNum: data.plateNum, |
| | | id1: (null != lprDto) ? lprDto.id : null, |
| | | id2: (null != lprDto) ? lprDto.id : null, |
| | | }; |
| | | $.ajax({ |
| | | sync: false, |
| | | type: "POST", |
| | | url: "../../inout/api/snap-img", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(snapData), |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | layer.alert(result.msg); |
| | | submitData(data); |
| | | } else { |
| | | snapData = result.data; |
| | | |
| | | $("#pz-img").addClass("kccz-r-img-red"); |
| | | $("#pz-text").text("å·²æç
§"); |
| | | |
| | | submitData(data); |
| | | } |
| | | }, |
| | | error: function () { |
| | | layer.msg("åå°è°ç¨æªå¾å¤±è´¥ï¼è¯·éæ°å°è¯ï¼ï¼"); |
| | | submitData(data); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //æ§è¡ä¿åæ°æ® |
| | | function submitData(data) { |
| | | var index = layer.load(); |
| | | |
| | | var files = [{ |
| | | fileName: snapData.fileName1 |
| | | },{ |
| | | fileName: snapData.fileName2 |
| | | }]; |
| | | data.files = files; |
| | | |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../basic/inout/submit-register", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(data), |
| | | success: function (result) { |
| | | layer.close(index); |
| | | if (result.code != "0000") { |
| | | notify(result.msg, result.data); |
| | | } else { |
| | | notify("æ°æ®æäº¤æå", result.data); |
| | | // éç½®é¡µé¢ |
| | | resetForm(); |
| | | } |
| | | }, |
| | | error: function () { |
| | | layer.close(index); |
| | | layer.alert("æäº¤å¤±è´¥ï¼è¯·éæ°å°è¯ï¼ï¼"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * å¼¹åºæéæ¡ |
| | | * @param msg æéä¿¡æ¯ |
| | | * @param data æ°æ®ä¿¡æ¯ï¼å¯è½ä¸ºç©º |
| | | */ |
| | | function notify(msg, data) { |
| | | if (data) { |
| | | //èµå¼ |
| | | $("#resultMsg").text(msg); |
| | | $("#resultUserName").text(data.userName); |
| | | $("#resultPlateNum").text(data.plateNum); |
| | | if ("IN" == data.type) { |
| | | $("#resultType").text("å
¥åº-" + INOUT_PROGRESS_MSG(data.progress)); |
| | | } else { |
| | | $("#resultType").text("åºåº-" + INOUT_PROGRESS_MSG(data.progress)); |
| | | } |
| | | $("#resultIntelCard").text(data.intelCard); |
| | | |
| | | layer.open({ |
| | | type: 1, |
| | | offset: ['150px', '200px'], |
| | | area: '450px;', |
| | | shade: 0.8, |
| | | id: 'dialog_notify_info', |
| | | btn: ['ç¡®å®'], |
| | | content: $('#dialog-from-notify'), |
| | | yes: function (index) { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } else { |
| | | layer.alert(msg, {offset: ['300px', '300px']}); |
| | | } |
| | | } |
| | | |
| | | function checkPhone(str) { |
| | | var reg = /^1[3456789]\d{9}$/; |
| | | // ^1 以1å¼å¤´ |
| | | // [3456789] 第2ä½ï¼ä½¿ç¨åå表éçä»»æä¸ä¸ªååé½å¯ä»¥ |
| | | // \d{9}$ 第ä¸ä½ æåå¯ä»¥æ¯ä»»ææ°å 并䏿åç»å°¾å¿
é¡»æ¯æ°å |
| | | |
| | | if (reg.test(str)) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description : æ ¡éªèº«ä»½è¯å·æ¯å¦åè§ï¼18ä½ã15ä½ï¼ |
| | | * @param value |
| | | * @return {Boolean} true-åè§ false-ä¸åè§ |
| | | */ |
| | | function checkPsidno(value) { |
| | | var psidno = String(value) |
| | | // 1.æ ¡éªèº«ä»½è¯å·æ ¼å¼åé¿åº¦ |
| | | var regPsidno = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[X])$)$/ |
| | | if (!regPsidno.test(psidno)) { |
| | | return false; |
| | | } |
| | | // 2.æ ¡éªå两ä½çç份ç¼ç æ¯å¦æ£ç¡® |
| | | var province = { |
| | | 11: 'å京', |
| | | 12: '天津', |
| | | 13: 'æ²³å', |
| | | 14: '山西', |
| | | 15: 'å
èå¤', |
| | | 21: 'è¾½å®', |
| | | 22: 'åæ', |
| | | 23: 'é»é¾æ± ', |
| | | 31: '䏿µ·', |
| | | 32: 'æ±è', |
| | | 33: 'æµæ±', |
| | | 34: 'å®å¾½', |
| | | 35: 'ç¦å»º', |
| | | 36: 'æ±è¥¿', |
| | | 37: 'å±±ä¸', |
| | | 41: 'æ²³å', |
| | | 42: 'æ¹å ', |
| | | 43: 'æ¹å', |
| | | 44: '广ä¸', |
| | | 45: '广西', |
| | | 46: 'æµ·å', |
| | | 50: 'éåº', |
| | | 51: 'åå·', |
| | | 52: 'è´µå·', |
| | | 53: 'äºå', |
| | | 54: '西è ', |
| | | 61: 'é西', |
| | | 62: 'çè', |
| | | 63: 'éæµ·', |
| | | 64: 'å®å¤', |
| | | 65: 'æ°ç', |
| | | 71: 'å°æ¹¾', |
| | | 81: '馿¸¯', |
| | | 82: 'æ¾³é¨', |
| | | 91: 'å½å¤' |
| | | } |
| | | if (!province[Number(psidno.slice(0, 2))]) { |
| | | return false; |
| | | } |
| | | var reg; |
| | | var arrSplit; |
| | | var year; |
| | | var month; |
| | | var day; |
| | | // 3.æ ¡éªåºçæ¥æ |
| | | if (psidno.length === 15) { |
| | | // 15ä½å·ç çï¼2ä½ï¼å¸ï¼2ä½ï¼å¿ï¼2ä½ï¼å¹´ï¼2ä½ï¼æï¼2ä½ï¼æ¥ï¼2ä½ï¼æ ¡éªç ï¼3ä½ï¼ |
| | | reg = new RegExp(/^(\d{6})(\d{2})(\d{2})(\d{2})(\d{3})$/) |
| | | arrSplit = psidno.match(reg) |
| | | // 15ä½å·ç å¨å¹´ä»½åè¡¥ 19 æ 20 |
| | | year = Number(arrSplit[2].charAt(0)) > 0 ? '19' + arrSplit[2] : '20' + arrSplit[2] |
| | | month = arrSplit[3] |
| | | day = arrSplit[4] |
| | | if (!validateBirthday(year, month, day)) { |
| | | return false; |
| | | } |
| | | } else if (psidno.length === 18) { |
| | | // 18ä½å·ç çï¼2ä½ï¼å¸ï¼2ä½ï¼å¿ï¼2ä½ï¼å¹´ï¼4ä½ï¼æï¼2ä½ï¼æ¥ï¼2ä½ï¼æ ¡éªç ï¼4ä½ï¼ |
| | | reg = new RegExp(/^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/) |
| | | arrSplit = psidno.match(reg) |
| | | year = arrSplit[2] |
| | | month = arrSplit[3] |
| | | day = arrSplit[4] |
| | | if (!validateBirthday(year, month, day)) { |
| | | return false; |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | // 4.18ä½å·ç æ ¡éªçæçæ ¡éªç |
| | | if (psidno.length === 18) { |
| | | var Wi = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2] // å æå å |
| | | var parity = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'] // æ ¡éªç |
| | | var sum = 0; |
| | | for (var i = 0; i < 17; i++) { |
| | | sum += Number(psidno.charAt(i)) * Wi[i]; |
| | | } |
| | | if (parity[sum % 11] !== psidno[17]) { |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | // æ ¡éªåºçæ¥ææ¯å¦åç |
| | | function validateBirthday(year, month, day) { |
| | | year = Number(year) // å¹´ |
| | | month = Number(month) // æ |
| | | day = Number(day) // æ¥ |
| | | var nowTime = new Date().getTime() // å½åæ¶é´æ³ |
| | | var birthTime = new Date(year, month, day).getTime() // è·ååºçæ¥æçæ¶é´æ³ |
| | | // ä¸è½æ¯æå¤©åºççå§ |
| | | if (birthTime > nowTime) { |
| | | return false; |
| | | } |
| | | // ä¸è¬äººæ´»ä¸å°150å²å§ |
| | | var nowYear = new Date().getFullYear() |
| | | if ((nowYear - year) > 150) { |
| | | return false; |
| | | } |
| | | // ä¸è½æ¯13æåºççå§ |
| | | if (month < 1 || month > 12) { |
| | | return false; |
| | | } |
| | | // ä¸è½æ¯2æ30å·ã4æ31å·ã5æ32å·åºççå§ |
| | | var date = new Date(year, month, 0) // è·å彿çæåä¸å¤© |
| | | if (day < 1 || day > date.getDate()) { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | //车çå·éªè¯æ¹æ³ |
| | | |
| | | function checkPlateNum(plateNum) { |
| | | |
| | | var xreg = /^[京津沪æ¸å豫äºè¾½é»æ¹ç鲿°èæµèµ£éæ¡çæèéåé½è´µç²¤éèå·å®ç¼ä½¿é¢A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/; |
| | | |
| | | var creg = /^[京津沪æ¸å豫äºè¾½é»æ¹ç鲿°èæµèµ£éæ¡çæèéåé½è´µç²¤éèå·å®ç¼ä½¿é¢A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9æå¦è¦æ¸¯æ¾³]{1}$/; |
| | | |
| | | if (plateNum.length === 7) { |
| | | return creg.test(plateNum); |
| | | } else if (plateNum.length === 8) { |
| | | return xreg.test(plateNum); |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¼¹åºæéæ¡ |
| | | * @param plateNum æéä¿¡æ¯ |
| | | * @param platePath æ°æ®ä¿¡æ¯ï¼å¯è½ä¸ºç©º |
| | | */ |
| | | plateNumImg = function (plateNum, platePath) { |
| | | var mainDiv = $("#plateNumId"); |
| | | mainDiv.empty(); |
| | | var html = "" |
| | | if (!plateNum) { |
| | | console.log("1") |
| | | html += "<div style=\"color: red; font-size: 50px; text-align: center;\"><span>æªè¯»åå°è½¦çå·</span></div>"; |
| | | } else { |
| | | console.log(plateNum) |
| | | html += "<div style=\"color: red; font-size: 50px; text-align: center;\"><span>" + plateNum + "</span></div>"; |
| | | } |
| | | |
| | | html += "<div style=\"text-align: center\"><img class ='cut-img' src='../../basic/common/getImg?filePath=" + platePath + "' /></div>"; |
| | | |
| | | mainDiv.html(html); |
| | | |
| | | layer.open({ |
| | | type: 1, |
| | | title: "车çå·å¯¹æ¯", |
| | | offset: 'l', |
| | | shade: 0.8, |
| | | area: ['55%', '90%'], |
| | | id: 'dialog_plate_img', |
| | | btn: ['ç¡®å®'], |
| | | content: $('#plateNumImg'), |
| | | yes: function (index) { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | }; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh-cn" xmlns:th=http://www.thymeleaf.org> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <meta name="viewport" |
| | | content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="renderer" content="webkit"> |
| | | <title>åºå
¥åºç®¡ç-åºåºç®ææä½</title> |
| | | |
| | | <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/layui/css/layui.css}"/> |
| | | <link rel="stylesheet" type="text/css" th:href="@{/inout/inout-style.css}"> |
| | | |
| | | <!--ä½¿ç¨æå°æä»¶ éèå½åæä»¶ --> |
| | | <script th:src="@{/js/plugins/lodop/LodopFuncs.js}"></script> |
| | | <style type="text/css"> |
| | | .qyzj-tabBox { |
| | | margin-top: 0px !important; |
| | | overflow: hidden; |
| | | width: 100%; |
| | | } |
| | | |
| | | .layui-table, .layui-table-view { |
| | | margin: 0; |
| | | } |
| | | |
| | | #layui-table-page1 { |
| | | text-align: right !important; |
| | | } |
| | | |
| | | .display-none { |
| | | display: none; |
| | | } |
| | | |
| | | .control-btn { |
| | | height: 35px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | .tip-red { |
| | | text-align: right; |
| | | padding-left: 40px; |
| | | font-size: 16px; |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | thead span { |
| | | font-weight: bold |
| | | } |
| | | |
| | | .red-color { |
| | | color: red; |
| | | } |
| | | |
| | | .layui-select-disabled .layui-disabled { |
| | | color: #000 !important; |
| | | } |
| | | |
| | | .layui-table td { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .depot-food input { |
| | | line-height: 34px; |
| | | padding-right: 10px; |
| | | font-size: 16px; |
| | | color: #666; |
| | | background: #eff4f6; |
| | | } |
| | | |
| | | .rk-main { |
| | | margin: 0 16px; |
| | | } |
| | | |
| | | .qyzj-con { |
| | | margin-top: 0; |
| | | padding: 15px; |
| | | } |
| | | |
| | | .kccz-con { |
| | | margin: 16px 0; |
| | | } |
| | | |
| | | .kccz-r-item { |
| | | height: 265px; |
| | | } |
| | | |
| | | .kccz-r-con { |
| | | height: unset; |
| | | padding-right: unset; |
| | | } |
| | | |
| | | .kccz-r-vedio { |
| | | height: 215px; |
| | | } |
| | | |
| | | .layui-flow-more a *, .layui-laypage input, .layui-table-view select[lay-ignore] { |
| | | display: none; |
| | | } |
| | | |
| | | .layui-laypage .layui-laypage-skip { |
| | | display: none; |
| | | } |
| | | |
| | | .color-red { |
| | | color: red !important; |
| | | } |
| | | |
| | | .rkbk-search-input { |
| | | background: #FFFFFF; |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | | |
| | | <body> |
| | | <div class="l-container layui-clear"> |
| | | <div class="rk-main"> |
| | | <div class="kccz-con"> |
| | | <div class="kccz-left fl" style="width: 76%;"> |
| | | <div class="qyzj-con radius-6"> |
| | | <div class="qyzj-con-top layui-row" style="margin-top: 5px;"> |
| | | <form class="layui-form" action="" id="form-param" |
| | | lay-filter="form-param"> |
| | | |
| | | <div class="layui-form-item display-none"> |
| | | <label class="layui-form-label">éè-ç±»å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="type" th:value="${type}" |
| | | autocomplete="off" class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item display-none"> |
| | | <label class="layui-form-label">éè-åºåºç¼ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="deptId" th:value="${deptId}" |
| | | autocomplete="off" class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="checkId" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">ç®æ ä»åº</label> |
| | | <div class="layui-input-block rkbk-selBox"> |
| | | <select name="depotId"> |
| | | <option value=""></option> |
| | | <option th:each="depot,depotSet:${listDepot}" |
| | | th:value="${depot.id}" th:text="${depot.name}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">徿¥åä½</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="customerName" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">å¼å§æ¶é´</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="start" placeholder="è¯·éæ©" |
| | | autocomplete="off" |
| | | class="layui-input rkbk-search-input bg-date" id="start"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">ç»ææ¶é´</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="end" placeholder="è¯·éæ©" |
| | | autocomplete="off" |
| | | class="layui-input rkbk-search-input bg-date" id="end"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-text-right"> |
| | | <input type="button" style="border-radius: 50px;background-color: #1c84c6 !important;width: 94px;height: 32px;line-height: 32px;font-size: 14px;" value="æç´¢" class="qyzj-top-btn layui-btn btn-blue" onclick="flushData()"/> |
| | | <input type="button" style="border-radius: 50px;background-color: #f8ac59 !important;width: 94px;height: 32px;line-height: 32px;font-size: 14px;" value="éç½®" class="qyzj-top-btn layui-btn btn-red" onclick="resetForm()"/> |
| | | <input type="button" style="border-radius: 50px;background-color: #1ab394 !important;width: 94px;height: 32px;line-height: 32px;font-size: 14px;" value="ç»è®°" class="qyzj-top-btn layui-btn btn-group" onclick="quickRegister()"/> |
| | | </div> |
| | | |
| | | </form> |
| | | </div> |
| | | <!--qyzj-con-oop end--> |
| | | |
| | | <div class="qyzj-tabBox"> |
| | | <table class="layui-table" lay-skin="nob" id="tableData" |
| | | lay-filter="tableData"> |
| | | <colgroup> |
| | | <col width="10%"> |
| | | <col width="10%"> |
| | | <col width="10%"> |
| | | <col width="10%"> |
| | | <col width="10%"> |
| | | <col width="10%"> |
| | | <col width="10%"> |
| | | <col width=""> |
| | | <col width="15%"> |
| | | </colgroup> |
| | | <thead> |
| | | <tr class="qyzj-table-tit"> |
| | | <th>åæ®å·</th> |
| | | <th>车çå·</th> |
| | | <th>ç±»å</th> |
| | | <th>åè´§åä½</th> |
| | | <th>æ¶è´§åä½</th> |
| | | <th>è£
å¸ä»åº</th> |
| | | <th>ç²®é£åç§</th> |
| | | <th>æµç¨è¿åº¦</th> |
| | | <th>æä½</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | </tbody> |
| | | </table> |
| | | |
| | | </div> |
| | | <!--qyzj-tabBox end--> |
| | | |
| | | <!--qyzj-page-wrap end--> |
| | | |
| | | </div> |
| | | <!--qyzj-con end--> |
| | | </div> |
| | | |
| | | <!--kccz-left end--> |
| | | <div class="kccz-right fr" style=" width: 23%;"> |
| | | <div class="kccz-r-item radius-6"> |
| | | <div class="kccz-r-box"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>è¿ç¨ææè§é¢1</h3> |
| | | </div> |
| | | <div class="kccz-r-con"> |
| | | <div class="kccz-r-vedio" id="kccz-r-video1"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <!--kccz-r-item end--> |
| | | |
| | | <div class="kccz-r-item radius-6 mt-10"> |
| | | <div class="kccz-r-box"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>è¿ç¨ææè§é¢2</h3> |
| | | </div> |
| | | <div class="kccz-r-con"> |
| | | <div class="kccz-r-vedio" id="kccz-r-video2"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <!--kccz-r-item end--> |
| | | |
| | | <div class="kccz-r-item radius-6 mt-10"> |
| | | <div class="kccz-r-box"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>è¿ç¨ææè§é¢3</h3> |
| | | </div> |
| | | <div class="kccz-r-con"> |
| | | <div class="kccz-r-vedio" id="kccz-r-video3"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <!--kccz-r-item end--> |
| | | |
| | | </div> |
| | | </div> |
| | | <!--kccz-con end--> |
| | | |
| | | </div> |
| | | <!--rk-main end--> |
| | | |
| | | </div> |
| | | <!--l-container end--> |
| | | |
| | | <script th:src="@{/ajax/libs/layui/layui.js}"></script> |
| | | <script th:src="@{/js/jquery.min.js}"></script> |
| | | <script th:src="@{/common/constant.js}"></script> |
| | | <script th:src="@{/common/igds-common.js}"></script> |
| | | <script th:src="@{/inout/inout-common.js}"></script> |
| | | <script th:src="@{/inout/inout-print.js}"></script> |
| | | <script th:src="@{/inout/video-play.js}"></script> |
| | | <script th:src="@{/inout/weight.js}"></script> |
| | | <script th:src="@{/inout/out-easy.js}"></script> |
| | | |
| | | <script th:inline="javascript"> |
| | | //æµç¨ç¯è |
| | | var inoutProgress = [[${inoutProgress}]]; |
| | | //åºåºç¼ç |
| | | var deptId = [[${deptId}]]; |
| | | //ä»åºå表 |
| | | var listDepot = [[${listDepot}]]; |
| | | //ä¸å¡æ¥éª¤ |
| | | var bizType = [[${bizType}]]; |
| | | //userId |
| | | var userId = [[${loginUser.loginName}]]; |
| | | //åºå
¥åºç±»å |
| | | var type = [[${type}]]; |
| | | var companyId = [[${loginUser.companyId}]]; |
| | | //åç§ |
| | | var listFoodVariety = [[${listFoodVariety}]]; |
| | | //å½åæµç¨ |
| | | var progress = [[${progress}]]; |
| | | //å°ç£
ä¿¡æ¯ |
| | | var weightDto = [[${weightDto}]]; |
| | | |
| | | //æææåæº |
| | | var snapDto1 = [[${snapDto1}]]; |
| | | var snapDto2 = [[${snapDto2}]]; |
| | | var snapDto3 = [[${snapDto3}]]; |
| | | //é»è®¤æ¥è¯¢æ¶é´ |
| | | var startTime = [[${startTime}]]; |
| | | var endTime = [[${endTime}]]; |
| | | </script> |
| | | |
| | | <script type="text/html" id="barControl"> |
| | | <a class="layui-btn control-btn" lay-event="edit">æä½</a> |
| | | </script> |
| | | <script type="text/html" id="toolbarCustomer"> |
| | | <div class=""> |
| | | <div class="layui-col-xs6"> |
| | | <input type="text" id="key" placeholder="è¾å
¥ç¼ç æè
åç§°â¦â¦" class="layui-input"> |
| | | </div> |
| | | <div class="layui-col-xs6" style="padding-left: 10px;"> |
| | | <button class="layui-btn layui-btn-sm" onclick="flushCustomer()">æ¥è¯¢</button> |
| | | </div> |
| | | </div> |
| | | </script> |
| | | </body> |
| | | |
| | | <!-- --------------å¼¹åºå¾æ¥åä½å表-------------- --> |
| | | <div class="layui-tab-content" id="listCustomer" style="display: none;"> |
| | | <table class="layui-table" lay-skin="nob" id="tableCustomer" |
| | | lay-filter="tableCustomer" style="margin: 0px;"></table> |
| | | </div> |
| | | <!-- --------------ç§°éæä½å¼¹çª-------------- --> |
| | | <div class="layui-tab-content" id="weightDetail" style="display: none;padding: 10px 10px;"> |
| | | <div class="rk-main" style="margin: 0;"> |
| | | <div class="qyzj-btnbox layui-clear" style="margin-top: unset;"> |
| | | <div class="rkbk-quick fl" style="line-height: 60px"> |
| | | <button class="rkbk-quick-btn layui-btn btn-blue" onclick="weight()"> |
| | | <i><img th:src="@{/img/web/inout/icon-chengzhong.png}"/></i>æ¥éª¤1ï¼ç§°éåææ |
| | | </button> |
| | | <button class="rkbk-quick-btn layui-btn btn-green" onclick="submit()"> |
| | | <i><img th:src="@{/img/web/inout/icon-ok.png}"/></i>æ¥éª¤2ï¼å®æç§°é |
| | | </button> |
| | | <button class="rkbk-quick-btn layui-btn btn-blue" onclick="printBill()"> |
| | | <i><img th:src="@{/img/web/inout/icon-dayin.png}"/></i>æ¥éª¤3ï¼æå°è¿ç£
å |
| | | </button> |
| | | <button class="rkbk-quick-btn layui-btn btn-violet" |
| | | onclick="flushPage()"> |
| | | <i><img th:src="@{/img/web/inout/icon-shuaxin2.png}"/></i>å·æ°é¡µé¢ |
| | | </button> |
| | | </div> |
| | | <!-- æµç¨å¼å¯¼ --> |
| | | <div class="rk-step-wrap fr" style="padding: unset;border-bottom: unset"> |
| | | <ul class="rk-step"> |
| | | <li id="progress-register" class="active rk-step-first"> |
| | | <span class="rk-step-span"> |
| | | <img th:src="@{/img/web/inout/icon-dengji.png}"/> |
| | | </span> |
| | | <p>å
¥åºç»è®°</p> |
| | | </li> |
| | | <li id="progress-fullWeight"> |
| | | <span class="rk-step-span"> |
| | | <img th:src="@{/img/web/inout/icon-chengzhong.png}"/> |
| | | </span> |
| | | <p>满车称é</p> |
| | | </li> |
| | | <li id="progress-hand" class=""> |
| | | <span class="rk-step-span"> |
| | | <img th:src="@{/img/web/inout/icon-xiehuo.png}"/> |
| | | </span> |
| | | <p>å
¥åºå¼ä»</p> |
| | | </li> |
| | | <li id="progress-emptyWeight" class=""> |
| | | <span class="rk-step-span"> |
| | | <img th:src="@{/img/web/inout/icon-chengzhong.png}"/> |
| | | </span> |
| | | <p>空车称é</p> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <!-- æµç¨å¼å¯¼EDN --> |
| | | </div> |
| | | <!--qyzj-btnbox end--> |
| | | <div class="kccz-con" style="margin: 5px 0 0 0"> |
| | | <div class="kccz-left fl" style="width: 100%"> |
| | | <div class="kccz-left-box1 radius-6" style="padding: 1px 20px 10px 20px"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <div> |
| | | <h3 style="width: 150px; float: left;">ç»è®°ä¿¡æ¯</h3> |
| | | <div id="btn_register" style="display: none"> |
| | | <input type="button" value="读身份è¯" style="right: 120px;width: unset;" |
| | | class="rkbk-search-btn layui-btn" onclick="flushIdCard()"> |
| | | <input type="button" value="车çè¯å«" style="width: unset;" |
| | | class="rkbk-search-btn layui-btn" onclick="flushICCard()"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="kccz-data-form layui-row"> |
| | | <form class="layui-form" action="" id="form-data-regster" |
| | | lay-filter="form-data-regster"> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">æ¿è¿äºº</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="userName1" placeholder="请è¾å
¥" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">身份è¯å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="userId1" id="userId1" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">车çå·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="plateNum1" id="plateNum1" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">èç³»çµè¯</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="userContact" id="userContact" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">å° å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="userAddress" id="userAddress" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <!--kccz-czxx-wrap end--> |
| | | |
| | | </div> |
| | | <div class="kccz-left-box1 mt-10 radius-6"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <div> |
| | | <h3 style="width: 150px; float: left;">ç§°éä¿¡æ¯</h3> |
| | | <div style="float: right;"> |
| | | <div class="kccz-czxx-left fl"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">å½åå°ç£
</label> |
| | | <div class="layui-input-block"> |
| | | <select name="depotId" id="scaleName" lay-filter="select_scaleName"> |
| | | <option th:each="dto,weightSet:${listWeight}" |
| | | th:value="${dto.sort}" th:text="${dto.name}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="kccz-czxx-right fr"> |
| | | <dl class="kccz-czxx-dl" style="padding-left: 15px;"> |
| | | <dt> |
| | | <i><img id="img_scale_statule" |
| | | th:src="@{/img/web/inout/icon-red.png}"/></i> |
| | | </dt> |
| | | </dl> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="kccz-czxx-wrap"> |
| | | <div class="kccz-czxx-num"> |
| | | <span id="weightValue">0.00</span><em>KG</em> |
| | | </div> |
| | | </div> |
| | | <!--kccz-czxx-wrap end--> |
| | | |
| | | </div> |
| | | <!--kccz-left-box1 end--> |
| | | |
| | | <div class="kccz-left-box2 mt-10 radius-6" style="height: unset;"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>ä¸å¡æ°æ®</h3> |
| | | </div> |
| | | <div class="kccz-data-form layui-row" style="margin-top: unset;padding: 10px 0 0 0;"> |
| | | <form class="layui-form" action="" id="form-data" |
| | | lay-filter="form-data"> |
| | | <div class="layui-form-item display-none"> |
| | | <input type="text" name="id"> |
| | | </div> |
| | | <div class="layui-form-item display-none"> |
| | | <input type="text" name="progress"> |
| | | </div> |
| | | <div class="layui-form-item display-none"> |
| | | <input type="text" name="type"> |
| | | </div> |
| | | <div class="layui-form-item display-none"> |
| | | <input type="text" name="foodLocationId"> |
| | | </div> |
| | | <div class="layui-form-item display-none"> |
| | | <input type="text" name="noticeId"> |
| | | </div> |
| | | <div class="layui-form-item display-none"> |
| | | <input type="text" name="foodType"> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red" id="depotIdLabel">è£
å¸ä»åº</label> |
| | | <div class="layui-input-block"> |
| | | <select name="depotId" id="depotId" lay-filter="select_depotId"> |
| | | <option value=""></option> |
| | | <option th:each="depot,depotSet:${listDepot}" |
| | | th:value="${depot.id}" th:text="${depot.name}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">æ¯é(满车)</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="fullWeight" id="fullWeight" autocomplete="off" |
| | | placeholder="å°ç£
èªå¨å¸¦å
¥" class="layui-input rkbk-search-input" disabled> |
| | | <em |
| | | class="kccz-data-dw">KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">ç®é(空车)</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="emptyWeight" id="emptyWeight" autocomplete="off" |
| | | placeholder="å°ç£
èªå¨å¸¦å
¥" class="layui-input weight rkbk-search-input" |
| | | disabled> |
| | | <em |
| | | class="kccz-data-dw">KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">éç¥å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="customerName" placeholder="è¯·éæ©" |
| | | autocomplete="off" class="layui-input" disabled="disabled"> <em |
| | | class="kccz-data-dw cursor" onclick="showNotice()">â¦â¦</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">ç²®é£åç§</label> |
| | | <div class="layui-input-block"> |
| | | <select name="foodVariety" id="foodVariety"> |
| | | <option value=""></option> |
| | | <option th:each="dic,dicSet:${listFoodVariety}" |
| | | th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">å é</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="netWeight" autocomplete="off" |
| | | placeholder="èªå¨è®¡ç®ï¼ä¸å¯ç¼è¾" class="layui-input rkbk-search-input" |
| | | disabled> <em class="kccz-data-dw">KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">ç²®é£äº§å°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="foodLocation" placeholder="è¯·éæ©" |
| | | autocomplete="off" class="layui-input" disabled="disabled"> <em |
| | | class="kccz-data-dw cursor" onclick="showFoodLocation()">â¦â¦</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">æ°´å</label> |
| | | <div class="layui-input-block"> |
| | | <input id="perWet" type="text" name="perWet" autocomplete="off" |
| | | placeholder="请è¾å
¥" class="layui-input weight"> <em |
| | | class="kccz-data-dw">%</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">æ£é</label> |
| | | <div class="layui-input-block"> |
| | | <input id="deOther" type="text" name="deOther" autocomplete="off" |
| | | placeholder="请è¾å
¥" class="layui-input weight"> <em |
| | | class="kccz-data-dw">KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">åä»·</label> |
| | | <div class="layui-input-block"> |
| | | <input id="price" type="text" name="price" autocomplete="off" |
| | | placeholder="请è¾å
¥" class="layui-input weight"> <em |
| | | class="kccz-data-dw">å
</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">æè´¨</label> |
| | | <div class="layui-input-block"> |
| | | <input id="perImpurity" type="text" name="perImpurity" autocomplete="off" |
| | | placeholder="请è¾å
¥" class="layui-input weight"> <em |
| | | class="kccz-data-dw">%</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">å
¥åºéé</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="recordWeight" placeholder="èªå¨è®¡ç®" |
| | | autocomplete="off" class="layui-input rkbk-search-input" |
| | | disabled> <em class="kccz-data-dw">KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">夿³¨è¯´æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="remarks" placeholder="请è¾å
¥å
容" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">ç»ç®éé</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="settleWeight" placeholder="èªå¨è®¡ç®" |
| | | autocomplete="off" class="layui-input rkbk-search-input" |
| | | disabled> <em class="kccz-data-dw">KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | <!--kccz-left-box2 end--> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- --------------å¼ä»æä½å¼¹çª-------------- --> |
| | | <div class="layui-tab-content" id="handleDetail" style="display: none;padding: 15px 10px;" > |
| | | <div class="rk-main" style="margin: 0;"> |
| | | <!--qyzj-btnbox end--> |
| | | <div class="kccz-con" style="margin: 0;"> |
| | | <div class="kccz-left radius-6 fl" style="width: 70%"> |
| | | <div class="kccz-left-box1" style="background: #FFFFFF;padding: 1px 20px 10px 20px;"> |
| | | <button class="rkbk-quick-btn layui-btn btn-green btn-sm" |
| | | onclick="submitHandle()"> |
| | | <i><img th:src="@{/img/web/inout/icon-ok.png}"/></i>å¼ä»å®æ |
| | | </button> |
| | | </div> |
| | | <div class="kccz-left-box2 bg-ef" style="height: unset"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>åæ®ä¿¡æ¯</h3> |
| | | </div> |
| | | <div class="kccz-data-form layui-row"> |
| | | <form class="layui-form" action="" id="form-handle" |
| | | lay-filter="form-handle"> |
| | | <div class="layui-form-item display-none"> |
| | | <label class="layui-form-label">éèåæ®µ-æµæ°´å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="id" autocomplete="off" |
| | | class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item display-none"> |
| | | <label class="layui-form-label">éèåæ®µ-ç»ç»ç¼ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="companyId" autocomplete="off" |
| | | class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item display-none"> |
| | | <label class="layui-form-label">éèåæ®µ-æå±åºåº</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="deptId" autocomplete="off" |
| | | class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item display-none"> |
| | | <label class="layui-form-label">éèåæ®µ-æµç¨èç¹</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="progress" autocomplete="off" |
| | | class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item display-none"> |
| | | <label class="layui-form-label">éèåæ®µ-éç¥åid</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="noticeId" autocomplete="off" |
| | | class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">ä¸å¡ç±»å</label> |
| | | <div class="layui-input-block"> |
| | | <select name="type"> |
| | | <option th:each="dic,dicSet:${listInoutType}" |
| | | th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">è£
å¸ä»åº</label> |
| | | <div class="layui-input-block"> |
| | | <select name="depotId"> |
| | | <option th:each="depot,depotSet:${listDepot}" |
| | | th:value="${depot.id}" th:text="${depot.name}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">车çå·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="plateNum" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">满车称é</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="fullWeight" autocomplete="off" placeholder="ä¸å¯æ¹" |
| | | class="layui-input rkbk-search-input" disabled> <em |
| | | class="kccz-data-dw">KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">身份è¯å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="userId" |
| | | placeholder="æ¿è¿äººèº«ä»½è¯å·" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">空车称é</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="emptyWeight" autocomplete="off" placeholder="ä¸å¯æ¹" |
| | | class="layui-input rkbk-search-input" disabled> <em |
| | | class="kccz-data-dw">KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">徿¥åä½</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="customerName" placeholder="ä¸å¯æ¹" |
| | | autocomplete="off" class="layui-input rkbk-search-input" |
| | | disabled> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">å é</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="netWeight" autocomplete="off" placeholder="ä¸å¯æ¹" |
| | | class="layui-input rkbk-search-input" disabled> <em |
| | | class="kccz-data-dw">KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">ç²®é£åç§</label> |
| | | <div class="layui-input-block"> |
| | | <select name="foodVariety"> |
| | | <option th:each="dic,dicSet:${listFoodVariety}" |
| | | th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">æ£é</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="deOther" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input"> <em class="kccz-data-dw">KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">ç²®é£ç级</label> |
| | | <div class="layui-input-block"> |
| | | <select name="foodLevel" id="foodLevel"> |
| | | <option value="">ä¸å¯æ¹</option> |
| | | <option th:each="dic,dicSet:${listFoodLevel}" |
| | | th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">åä»·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="price" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input"> <em |
| | | class="kccz-data-dw">å
/KG</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">è´¨æ£æ°´å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="perWet" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input"> <em class="kccz-data-dw">%</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">è´¨æ£æè´¨</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="perImpurity" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input"> <em class="kccz-data-dw">%</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">å¤ æ³¨</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="remarks" placeholder="请è¾å
¥å
容" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | <!--kccz-left-box2 end--> |
| | | |
| | | </div> |
| | | <!--kccz-left end--> |
| | | <div class="kccz-right fr" style="width: 29%;margin-top: 5px;"> |
| | | <div class="kccz-r-item" style="height: unset"> |
| | | <div class="kccz-r-box" style="padding: 0;"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>å¼ä»è®°å½1</h3> |
| | | </div> |
| | | <div class="kccz-r-con" style="padding-right: 80px;background: #f3f5f8;"> |
| | | <div class="kccz-r-vedio" style="height: 170px"><img id="kccz-r-img1"></div> |
| | | <div class="kccz-r-btnbox" style="width: 78px;background: #FFFFFF;"> |
| | | <a href="javascript:;" class="kccz-r-btn" id="kccz-r-btn1" style="width: 76px"> <span |
| | | class="kccz-r-img"></span> |
| | | <p>ä¸ä¼ å¾ç</p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <!--kccz-r-item end--> |
| | | |
| | | <div class="kccz-r-item" style="height: unset"> |
| | | <div class="kccz-r-box" style="padding: 0;"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>å¼ä»è®°å½2</h3> |
| | | </div> |
| | | <div class="kccz-r-con" style="padding-right: 80px;background: #f3f5f8;"> |
| | | <div class="kccz-r-vedio" style="height: 170px"><img id="kccz-r-img2"></div> |
| | | <div class="kccz-r-btnbox" style="width: 78px;background: #FFFFFF;"> |
| | | <a href="javascript:;" class="kccz-r-btn" id="kccz-r-btn2" style="width: 76px"> <span |
| | | class="kccz-r-img"></span> |
| | | <p>ä¸ä¼ å¾ç</p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <!--kccz-r-item end--> |
| | | |
| | | <div class="kccz-r-item" style="height: unset"> |
| | | <div class="kccz-r-box" style="padding: 0;"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>å¼ä»è®°å½3</h3> |
| | | </div> |
| | | <div class="kccz-r-con" style="padding-right: 80px;background: #f3f5f8;"> |
| | | <div class="kccz-r-vedio" style="height: 170px"><img id="kccz-r-img3"></div> |
| | | <div class="kccz-r-btnbox" style="width: 78px;background: #FFFFFF;"> |
| | | <a href="javascript:;" class="kccz-r-btn" id="kccz-r-btn3" style="width: 76px"> <span |
| | | class="kccz-r-img"></span> |
| | | <p>ä¸ä¼ å¾ç</p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <!--kccz-r-item end--> |
| | | |
| | | </div> |
| | | </div> |
| | | <!--kccz-con end--> |
| | | |
| | | </div> |
| | | </div> |
| | | </html> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh-cn" xmlns:th=http://www.thymeleaf.org> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="renderer" content="webkit"> |
| | | <title>åºå
¥åºç®¡ç-åºåºç»è®°</title> |
| | | |
| | | <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/layui/css/layui.css}"/> |
| | | <link rel="stylesheet" type="text/css" th:href="@{/inout/inout-style.css}"> |
| | | |
| | | <style> |
| | | .display-none { |
| | | display: none; |
| | | } |
| | | |
| | | .kccz-r-con2 { |
| | | /* height: 230px; */ |
| | | padding-right: 120px; |
| | | position: relative; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .kccz-r-vedio { |
| | | width: 100%; |
| | | height: 280px; |
| | | /* background: #dee6ec; */ |
| | | background: #000; |
| | | color: #FFF; |
| | | text-align: center; |
| | | } |
| | | |
| | | .kccz-r-btnbox { |
| | | width: 100px; |
| | | position: absolute; |
| | | right: 0px; |
| | | top: 0px; |
| | | z-index: 99; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .ckdj-radiobox .layui-form-item { |
| | | margin-bottom: 0px; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .rk-step-wrap { |
| | | padding: 0px; |
| | | border-bottom: 0px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .qyzj-btnbox .rkbk-quick { |
| | | margin-top: 15px !important; |
| | | } |
| | | |
| | | .color-red { |
| | | color: red !important; |
| | | } |
| | | |
| | | .layui-form-item .layui-input-inline { |
| | | width: unset; |
| | | } |
| | | |
| | | .rkbk-search-input { |
| | | background: #FFF !important; |
| | | } |
| | | |
| | | .rkbk-search-input.bg-date { |
| | | background: #FFF !important; |
| | | } |
| | | .video { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="l-container layui-clear"> |
| | | <div class="rk-main"> |
| | | |
| | | <div class="qyzj-btnbox layui-clear"> |
| | | <!-- æä½èå--> |
| | | <div class="rkbk-quick fl"> |
| | | <button class="rkbk-quick-btn layui-btn btn-red" |
| | | onclick="resetForm()"> |
| | | <i><img th:src="@{/img/web/inout/icon-clear.png}"/></i> æ¸
ç©ºæ°æ® |
| | | </button> |
| | | <button class="rkbk-quick-btn layui-btn btn-green" |
| | | onclick="submit()"> |
| | | <i><img th:src="@{/img/web/inout/icon-ok.png}"/></i> 宿ç»è®° |
| | | </button> |
| | | </div> |
| | | |
| | | <!--æµç¨å¼å¯¼--> |
| | | <div class="rk-step-wrap fr"> |
| | | <ul class="rk-step"> |
| | | <li id="progress-register" class="active rk-step-first"> |
| | | <span class="rk-step-span"> |
| | | <img th:src="@{/img/web/inout/icon-dengji.png}"/> |
| | | </span> |
| | | <p>åºåºç»è®°</p> |
| | | </li> |
| | | <li id="progress-emptyWeight"> |
| | | <span class="rk-step-span"> |
| | | <img th:src="@{/img/web/inout/icon-chengzhong.png}"/> |
| | | </span> |
| | | <p>空车称é</p> |
| | | </li> |
| | | <li id="progress-hand"> |
| | | <span class="rk-step-span"> |
| | | <img th:src="@{/img/web/inout/icon-xiehuo.png}"/> |
| | | </span> |
| | | <p>åºåºå¼ä»</p> |
| | | </li> |
| | | <li id="progress-fullWeight"> |
| | | <span class="rk-step-span"> |
| | | <img th:src="@{/img/web/inout/icon-chengzhong.png}"/> |
| | | </span> |
| | | <p>满车称é</p> |
| | | </li> |
| | | <li id="progress-cardBack"> |
| | | <span class="rk-step-span"> |
| | | <img th:src="@{/img/web/inout/icon-banli.png}"/> |
| | | </span> |
| | | <p>离åºç¡®è®¤</p> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <!--æµç¨å¼å¯¼ç»æ--> |
| | | </div> |
| | | |
| | | <form class="layui-form" action="" id="form-data" |
| | | lay-filter="form-data"> |
| | | |
| | | <div class="rkbk-con"> |
| | | |
| | | <div class="radius-6 rkbk-left-wrap fl"> |
| | | <div class="rkbk-left"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>æ¿è¿äººä¿¡æ¯</h3> |
| | | </div> |
| | | <div class="rkbk-left-form"> |
| | | |
| | | <div class="rkbk-form-box1"> |
| | | |
| | | <div class="layui-form-item display-none"> |
| | | <label class="layui-form-label">éèåæ®µ-ç±»å</label> |
| | | <input type="text" name="type" th:value="${type}"> |
| | | </div> |
| | | |
| | | <div class="rkbk-form-left"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">å§ åï¼</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="userName" id="userName" required |
| | | lay-verify="required" placeholder="å¿
å¡«ä¿¡æ¯" autocomplete="off" |
| | | class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">身份è¯å·ï¼</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="userId" id="userId" required |
| | | lay-verify="required" placeholder="å¿
å¡«ä¿¡æ¯" autocomplete="off" |
| | | oninput="getPhone()" class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">èç³»æ¹å¼ï¼</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="userContact" id="userContact" |
| | | placeholder="请è¾å
¥" autocomplete="off" |
| | | class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">å° åï¼</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="userNation" id="userNation" |
| | | required lay-verify="required" placeholder="请è¾å
¥" |
| | | autocomplete="off" class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--rk-form-left end--> |
| | | |
| | | <div class="rkbk-photo"> |
| | | <a href="#"><img id="id_img_pers" |
| | | th:src="@{/img/web/inout/rkbk-photo_03.png}"/></a> |
| | | </div> |
| | | |
| | | </div> |
| | | <!--rkbk-form-box1 end--> |
| | | <!--rkbk-form-box2 end--> |
| | | |
| | | <div class="rkbk-quick layui-text-center"> |
| | | <button id="button_readID" type="button" |
| | | onclick="flushIdCard()" |
| | | class="rkbk-quick-btn layui-btn btn-blue">读åèº«ä»½è¯ |
| | | </button> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <!--rkbk-left end--> |
| | | |
| | | <div class="radius-6 rkbk-right-wrap fr" style="height: 512px;"> |
| | | <div class="rkbk-left"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>è¿è¾ä¿¡æ¯</h3> |
| | | </div> |
| | | |
| | | <div class="rkbk-left-form rkbk-right-form"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label color-red">ä¸å¡ç±»åï¼</label> |
| | | <div class="layui-input-block"> |
| | | <select name="type"> |
| | | <option th:each="dic,dicSet:${listInoutType}" |
| | | th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <input type="button" value="读车ç" |
| | | class="rkbk-r-btn fr layui-btn layui-btn-normal" |
| | | onclick="flushPlateNum()"/> |
| | | <label class="layui-form-label color-red">è¿è¾è½¦çï¼</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="plateNum" id="plateNum" required placeholder="å¡«åå车çå·" |
| | | lay-verify="required" autocomplete="off" |
| | | class="layui-input rkbk-search-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <!-- è§é¢ --> |
| | | <div class="rkbk-left"> |
| | | <div class="rkbk-tit"> |
| | | <i></i> |
| | | <h3>ç»è®°è§é¢</h3> |
| | | </div> |
| | | <div class="kccz-r-con2"> |
| | | <div class="kccz-r-vedio" id="kccz-r-video1"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--rkbk-right end--> |
| | | </div> |
| | | <!--rkbk-con end--> |
| | | </form> |
| | | </div> |
| | | <!--rk-main end--> |
| | | |
| | | </div> |
| | | <!--l-container end--> |
| | | |
| | | <script th:inline="javascript"> |
| | | //æµç¨ç¯è |
| | | var inoutProgress = [[${inoutProgress}]]; |
| | | //å½åèç¹ |
| | | var progress = [[${progress}]]; |
| | | var deptId = [[${deptId}]]; |
| | | //åºå
¥åºç±»å |
| | | var type = [[${type}]]; |
| | | var userId = [[${loginUser.loginName}]]; |
| | | var companyId = [[${loginUser.companyId}]]; |
| | | //车çè¯å« |
| | | var lprDto = [[${lprDto}]]; |
| | | var plateTag = [[${plateTag}]]; |
| | | var ship = null; //æ¯å¦è¹è¿é¡µé¢æ è¯ |
| | | </script> |
| | | |
| | | <script th:src="@{/ajax/libs/layui/layui.js}"></script> |
| | | <script th:src="@{/js/jquery.min.js}"></script> |
| | | <script th:src="@{/common/constant.js}"></script> |
| | | <script th:src="@{/common/igds-common.js}"></script> |
| | | <script th:src="@{/inout/inout-common.js}"></script> |
| | | <script th:src="@{/inout/video-play.js}"></script> |
| | | <script th:src="@{/inout/out-register.js}"></script> |
| | | |
| | | <!-- å¼¹åºæ¡çä¿¡æ¯ --> |
| | | <div class="layui-tab-content" id="dialog-from-notify" style="display: none;"> |
| | | <table class="layui-table"> |
| | | <colgroup> |
| | | <col width="100"> |
| | | </colgroup> |
| | | <tbody> |
| | | <tr> |
| | | <td>è¿åä¿¡æ¯</td> |
| | | <td id="resultMsg" style="color: red;font-weight: bold;"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>æ¿è¿äºº</td> |
| | | <td id="resultUserName" style="font-weight: bold;"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>车çå·</td> |
| | | <td id="resultPlateNum" style="font-weight: bold;"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>ä¸ä¸æ¥</td> |
| | | <td id="resultType" style="font-weight: bold;"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>æºæ
§å¡å·</td> |
| | | <td id="resultIntelCard" style="font-weight: bold;"></td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </body> |
| | | |
| | | </html> |