Commit 164a799f authored by 耿迪迪's avatar 耿迪迪

停气监管

parent 0082962d
...@@ -101,4 +101,19 @@ public class TSupBalStopSupController extends BaseController ...@@ -101,4 +101,19 @@ public class TSupBalStopSupController extends BaseController
{ {
return toAjax(tSupBalStopSupService.deleteTSupBalStopSupByIds(fGasStopIds)); return toAjax(tSupBalStopSupService.deleteTSupBalStopSupByIds(fGasStopIds));
} }
/**
* 上传停气监管记录
* @param fGasStopId 停气监管记录主键
* @return
*/
@GetMapping("/reportSupBalStopSupRecInfo")
public AjaxResult reportSupBalStopSupRecInfo(Long fGasStopId){
try{
return toAjax(tSupBalStopSupService.reportSupBalStopSupRecInfo(fGasStopId));
}catch (Exception e){
logger.error("上传停气监管记录接口异常=====",e);
return AjaxResult.error("上传停气监管记录接口异常");
}
}
} }
...@@ -77,6 +77,14 @@ public class TSupBalStopSup extends BaseEntity ...@@ -77,6 +77,14 @@ public class TSupBalStopSup extends BaseEntity
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
@Excel(name = "政府端上报状态",readConverterExp = "0=未上报,1=已上报")
private String fGovUploadStatus;
/** 政府端上报时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "政府端上报时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date fGovUploadTime;
public void setfGasStopId(Long fGasStopId) public void setfGasStopId(Long fGasStopId)
{ {
this.fGasStopId = fGasStopId; this.fGasStopId = fGasStopId;
...@@ -213,6 +221,22 @@ public class TSupBalStopSup extends BaseEntity ...@@ -213,6 +221,22 @@ public class TSupBalStopSup extends BaseEntity
return remarks; return remarks;
} }
public String getfGovUploadStatus() {
return fGovUploadStatus;
}
public void setfGovUploadStatus(String fGovUploadStatus) {
this.fGovUploadStatus = fGovUploadStatus;
}
public Date getfGovUploadTime() {
return fGovUploadTime;
}
public void setfGovUploadTime(Date fGovUploadTime) {
this.fGovUploadTime = fGovUploadTime;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
package com.zehong.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 供需平衡-停气监管-停气进度操作历史记录对象 t_sup_bal_stop_sup_opr_press_log
*
* @author zehong
* @date 2024-07-16
*/
public class TSupBalStopSupOprPressLog extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long fOprPressLogId;
/** 关联-供需平衡-停气监管-表id */
@Excel(name = "关联-供需平衡-停气监管-表id")
private Long fGasStopId;
/** 停气进度,0-未停气,1-已停气,2-已恢复 */
@Excel(name = "停气进度,0-未停气,1-已停气,2-已恢复")
private String fStopProgress;
/** 操作停气进度时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "操作停气进度时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fOprDate;
public void setfOprPressLogId(Long fOprPressLogId)
{
this.fOprPressLogId = fOprPressLogId;
}
public Long getfOprPressLogId()
{
return fOprPressLogId;
}
public void setfGasStopId(Long fGasStopId)
{
this.fGasStopId = fGasStopId;
}
public Long getfGasStopId()
{
return fGasStopId;
}
public void setfStopProgress(String fStopProgress)
{
this.fStopProgress = fStopProgress;
}
public String getfStopProgress()
{
return fStopProgress;
}
public void setfOprDate(Date fOprDate)
{
this.fOprDate = fOprDate;
}
public Date getfOprDate()
{
return fOprDate;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fOprPressLogId", getfOprPressLogId())
.append("fGasStopId", getfGasStopId())
.append("fStopProgress", getfStopProgress())
.append("fOprDate", getfOprDate())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TSupBalStopSupOprPressLog;
/**
* 供需平衡-停气监管-停气进度操作历史记录Mapper接口
*
* @author zehong
* @date 2024-07-16
*/
public interface TSupBalStopSupOprPressLogMapper
{
/**
* 查询供需平衡-停气监管-停气进度操作历史记录
*
* @param fOprPressLogId 供需平衡-停气监管-停气进度操作历史记录ID
* @return 供需平衡-停气监管-停气进度操作历史记录
*/
public TSupBalStopSupOprPressLog selectTSupBalStopSupOprPressLogById(Long fOprPressLogId);
/**
* 查询供需平衡-停气监管-停气进度操作历史记录列表
*
* @param tSupBalStopSupOprPressLog 供需平衡-停气监管-停气进度操作历史记录
* @return 供需平衡-停气监管-停气进度操作历史记录集合
*/
public List<TSupBalStopSupOprPressLog> selectTSupBalStopSupOprPressLogList(TSupBalStopSupOprPressLog tSupBalStopSupOprPressLog);
/**
* 新增供需平衡-停气监管-停气进度操作历史记录
*
* @param tSupBalStopSupOprPressLog 供需平衡-停气监管-停气进度操作历史记录
* @return 结果
*/
public int insertTSupBalStopSupOprPressLog(TSupBalStopSupOprPressLog tSupBalStopSupOprPressLog);
/**
* 修改供需平衡-停气监管-停气进度操作历史记录
*
* @param tSupBalStopSupOprPressLog 供需平衡-停气监管-停气进度操作历史记录
* @return 结果
*/
public int updateTSupBalStopSupOprPressLog(TSupBalStopSupOprPressLog tSupBalStopSupOprPressLog);
/**
* 删除供需平衡-停气监管-停气进度操作历史记录
*
* @param fOprPressLogId 供需平衡-停气监管-停气进度操作历史记录ID
* @return 结果
*/
public int deleteTSupBalStopSupOprPressLogById(Long fOprPressLogId);
/**
* 批量删除供需平衡-停气监管-停气进度操作历史记录
*
* @param fOprPressLogIds 需要删除的数据ID
* @return 结果
*/
public int deleteTSupBalStopSupOprPressLogByIds(Long[] fOprPressLogIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TSupBalStopSupOprPressLog;
/**
* 供需平衡-停气监管-停气进度操作历史记录Service接口
*
* @author zehong
* @date 2024-07-16
*/
public interface ITSupBalStopSupOprPressLogService
{
/**
* 查询供需平衡-停气监管-停气进度操作历史记录
*
* @param fOprPressLogId 供需平衡-停气监管-停气进度操作历史记录ID
* @return 供需平衡-停气监管-停气进度操作历史记录
*/
public TSupBalStopSupOprPressLog selectTSupBalStopSupOprPressLogById(Long fOprPressLogId);
/**
* 查询供需平衡-停气监管-停气进度操作历史记录列表
*
* @param tSupBalStopSupOprPressLog 供需平衡-停气监管-停气进度操作历史记录
* @return 供需平衡-停气监管-停气进度操作历史记录集合
*/
public List<TSupBalStopSupOprPressLog> selectTSupBalStopSupOprPressLogList(TSupBalStopSupOprPressLog tSupBalStopSupOprPressLog);
/**
* 新增供需平衡-停气监管-停气进度操作历史记录
*
* @param tSupBalStopSupOprPressLog 供需平衡-停气监管-停气进度操作历史记录
* @return 结果
*/
public int insertTSupBalStopSupOprPressLog(TSupBalStopSupOprPressLog tSupBalStopSupOprPressLog);
/**
* 修改供需平衡-停气监管-停气进度操作历史记录
*
* @param tSupBalStopSupOprPressLog 供需平衡-停气监管-停气进度操作历史记录
* @return 结果
*/
public int updateTSupBalStopSupOprPressLog(TSupBalStopSupOprPressLog tSupBalStopSupOprPressLog);
/**
* 批量删除供需平衡-停气监管-停气进度操作历史记录
*
* @param fOprPressLogIds 需要删除的供需平衡-停气监管-停气进度操作历史记录ID
* @return 结果
*/
public int deleteTSupBalStopSupOprPressLogByIds(Long[] fOprPressLogIds);
/**
* 删除供需平衡-停气监管-停气进度操作历史记录信息
*
* @param fOprPressLogId 供需平衡-停气监管-停气进度操作历史记录ID
* @return 结果
*/
public int deleteTSupBalStopSupOprPressLogById(Long fOprPressLogId);
}
...@@ -58,4 +58,11 @@ public interface ITSupBalStopSupService ...@@ -58,4 +58,11 @@ public interface ITSupBalStopSupService
* @return 结果 * @return 结果
*/ */
public int deleteTSupBalStopSupById(Long fGasStopId); public int deleteTSupBalStopSupById(Long fGasStopId);
/**
* 上传停气监管记录
* @param fGasStopId 停气监管记录主键
* @return
*/
int reportSupBalStopSupRecInfo(Long fGasStopId);
} }
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TSupBalStopSupOprPressLogMapper;
import com.zehong.system.domain.TSupBalStopSupOprPressLog;
import com.zehong.system.service.ITSupBalStopSupOprPressLogService;
/**
* 供需平衡-停气监管-停气进度操作历史记录Service业务层处理
*
* @author zehong
* @date 2024-07-16
*/
@Service
public class TSupBalStopSupOprPressLogServiceImpl implements ITSupBalStopSupOprPressLogService
{
@Autowired
private TSupBalStopSupOprPressLogMapper tSupBalStopSupOprPressLogMapper;
/**
* 查询供需平衡-停气监管-停气进度操作历史记录
*
* @param fOprPressLogId 供需平衡-停气监管-停气进度操作历史记录ID
* @return 供需平衡-停气监管-停气进度操作历史记录
*/
@Override
public TSupBalStopSupOprPressLog selectTSupBalStopSupOprPressLogById(Long fOprPressLogId)
{
return tSupBalStopSupOprPressLogMapper.selectTSupBalStopSupOprPressLogById(fOprPressLogId);
}
/**
* 查询供需平衡-停气监管-停气进度操作历史记录列表
*
* @param tSupBalStopSupOprPressLog 供需平衡-停气监管-停气进度操作历史记录
* @return 供需平衡-停气监管-停气进度操作历史记录
*/
@Override
public List<TSupBalStopSupOprPressLog> selectTSupBalStopSupOprPressLogList(TSupBalStopSupOprPressLog tSupBalStopSupOprPressLog)
{
return tSupBalStopSupOprPressLogMapper.selectTSupBalStopSupOprPressLogList(tSupBalStopSupOprPressLog);
}
/**
* 新增供需平衡-停气监管-停气进度操作历史记录
*
* @param tSupBalStopSupOprPressLog 供需平衡-停气监管-停气进度操作历史记录
* @return 结果
*/
@Override
public int insertTSupBalStopSupOprPressLog(TSupBalStopSupOprPressLog tSupBalStopSupOprPressLog)
{
return tSupBalStopSupOprPressLogMapper.insertTSupBalStopSupOprPressLog(tSupBalStopSupOprPressLog);
}
/**
* 修改供需平衡-停气监管-停气进度操作历史记录
*
* @param tSupBalStopSupOprPressLog 供需平衡-停气监管-停气进度操作历史记录
* @return 结果
*/
@Override
public int updateTSupBalStopSupOprPressLog(TSupBalStopSupOprPressLog tSupBalStopSupOprPressLog)
{
return tSupBalStopSupOprPressLogMapper.updateTSupBalStopSupOprPressLog(tSupBalStopSupOprPressLog);
}
/**
* 批量删除供需平衡-停气监管-停气进度操作历史记录
*
* @param fOprPressLogIds 需要删除的供需平衡-停气监管-停气进度操作历史记录ID
* @return 结果
*/
@Override
public int deleteTSupBalStopSupOprPressLogByIds(Long[] fOprPressLogIds)
{
return tSupBalStopSupOprPressLogMapper.deleteTSupBalStopSupOprPressLogByIds(fOprPressLogIds);
}
/**
* 删除供需平衡-停气监管-停气进度操作历史记录信息
*
* @param fOprPressLogId 供需平衡-停气监管-停气进度操作历史记录ID
* @return 结果
*/
@Override
public int deleteTSupBalStopSupOprPressLogById(Long fOprPressLogId)
{
return tSupBalStopSupOprPressLogMapper.deleteTSupBalStopSupOprPressLogById(fOprPressLogId);
}
}
...@@ -99,4 +99,19 @@ public class TSupBalStopSupServiceImpl implements ITSupBalStopSupService ...@@ -99,4 +99,19 @@ public class TSupBalStopSupServiceImpl implements ITSupBalStopSupService
{ {
return tSupBalStopSupMapper.deleteTSupBalStopSupById(fGasStopId); return tSupBalStopSupMapper.deleteTSupBalStopSupById(fGasStopId);
} }
/**
* 上传停气监管记录
* @param fGasStopId 停气监管记录主键
* @return
*/
@Override
public int reportSupBalStopSupRecInfo(Long fGasStopId) {
TSupBalStopSup tSupBalStopSup = new TSupBalStopSup();
tSupBalStopSup.setfGasStopId(fGasStopId);
tSupBalStopSup.setfGovUploadStatus("1");
tSupBalStopSup.setfGovUploadTime(new Date());
return tSupBalStopSupMapper.updateTSupBalStopSup(tSupBalStopSup);
}
} }
...@@ -23,6 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -23,6 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="fGovUploadStatus" column="f_gov_upload_status" />
<result property="fGovUploadTime" column="f_gov_upload_time" />
</resultMap> </resultMap>
<sql id="selectTSupBalStopSupVo"> <sql id="selectTSupBalStopSupVo">
...@@ -45,6 +47,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -45,6 +47,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
st.update_time, st.update_time,
st.is_del, st.is_del,
st.remarks, st.remarks,
st.f_gov_upload_status,
st.f_gov_upload_time,
en.enterprise_name AS enterpriseName en.enterprise_name AS enterpriseName
FROM FROM
t_sup_bal_stop_sup st t_sup_bal_stop_sup st
...@@ -59,6 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -59,6 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fStopProgress != null and fStopProgress != ''"> and st.f_stop_progress = #{fStopProgress}</if> <if test="fStopProgress != null and fStopProgress != ''"> and st.f_stop_progress = #{fStopProgress}</if>
<if test="fRepStatus != null and fRepStatus != ''"> and st.f_rep_status = #{fRepStatus}</if> <if test="fRepStatus != null and fRepStatus != ''"> and st.f_rep_status = #{fRepStatus}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and en.enterprise_name like concat('%', #{enterpriseName}, '%')</if> <if test="enterpriseName != null and enterpriseName != ''"> and en.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="fGovUploadStatus != null and fGovUploadStatus != ''"> and st.f_gov_upload_status = #{fGovUploadStatus}</if>
<if test="fGovUploadTime != null "> and st.f_gov_upload_time = #{fGovUploadTime}</if>
</where> </where>
</select> </select>
...@@ -87,6 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -87,6 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if> <if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if> <if test="remarks != null">remarks,</if>
<if test="fGovUploadStatus != null">f_gov_upload_status,</if>
<if test="fGovUploadTime != null">f_gov_upload_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fCompanyInfoId != null">#{fCompanyInfoId},</if> <if test="fCompanyInfoId != null">#{fCompanyInfoId},</if>
...@@ -106,6 +114,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -106,6 +114,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if> <if test="remarks != null">#{remarks},</if>
<if test="fGovUploadStatus != null">#{fGovUploadStatus},</if>
<if test="fGovUploadTime != null">#{fGovUploadTime},</if>
</trim> </trim>
</insert> </insert>
...@@ -129,6 +139,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -129,6 +139,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if> <if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
<if test="fGovUploadStatus != null">f_gov_upload_status = #{fGovUploadStatus},</if>
<if test="fGovUploadTime != null">f_gov_upload_time = #{fGovUploadTime},</if>
</trim> </trim>
where f_gas_stop_id = #{fGasStopId} where f_gas_stop_id = #{fGasStopId}
</update> </update>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TSupBalStopSupOprPressLogMapper">
<resultMap type="TSupBalStopSupOprPressLog" id="TSupBalStopSupOprPressLogResult">
<result property="fOprPressLogId" column="f_opr_press_log_id" />
<result property="fGasStopId" column="f_gas_stop_id" />
<result property="fStopProgress" column="f_stop_progress" />
<result property="fOprDate" column="f_opr_date" />
</resultMap>
<sql id="selectTSupBalStopSupOprPressLogVo">
select f_opr_press_log_id, f_gas_stop_id, f_stop_progress, f_opr_date from t_sup_bal_stop_sup_opr_press_log
</sql>
<select id="selectTSupBalStopSupOprPressLogList" parameterType="TSupBalStopSupOprPressLog" resultMap="TSupBalStopSupOprPressLogResult">
<include refid="selectTSupBalStopSupOprPressLogVo"/>
<where>
<if test="fGasStopId != null "> and f_gas_stop_id = #{fGasStopId}</if>
<if test="fStopProgress != null and fStopProgress != ''"> and f_stop_progress = #{fStopProgress}</if>
<if test="fOprDate != null "> and f_opr_date = #{fOprDate}</if>
</where>
</select>
<select id="selectTSupBalStopSupOprPressLogById" parameterType="Long" resultMap="TSupBalStopSupOprPressLogResult">
<include refid="selectTSupBalStopSupOprPressLogVo"/>
where f_opr_press_log_id = #{fOprPressLogId}
</select>
<insert id="insertTSupBalStopSupOprPressLog" parameterType="TSupBalStopSupOprPressLog" useGeneratedKeys="true" keyProperty="fOprPressLogId">
insert into t_sup_bal_stop_sup_opr_press_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fGasStopId != null">f_gas_stop_id,</if>
<if test="fStopProgress != null and fStopProgress != ''">f_stop_progress,</if>
<if test="fOprDate != null">f_opr_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fGasStopId != null">#{fGasStopId},</if>
<if test="fStopProgress != null and fStopProgress != ''">#{fStopProgress},</if>
<if test="fOprDate != null">#{fOprDate},</if>
</trim>
</insert>
<update id="updateTSupBalStopSupOprPressLog" parameterType="TSupBalStopSupOprPressLog">
update t_sup_bal_stop_sup_opr_press_log
<trim prefix="SET" suffixOverrides=",">
<if test="fGasStopId != null">f_gas_stop_id = #{fGasStopId},</if>
<if test="fStopProgress != null and fStopProgress != ''">f_stop_progress = #{fStopProgress},</if>
<if test="fOprDate != null">f_opr_date = #{fOprDate},</if>
</trim>
where f_opr_press_log_id = #{fOprPressLogId}
</update>
<delete id="deleteTSupBalStopSupOprPressLogById" parameterType="Long">
delete from t_sup_bal_stop_sup_opr_press_log where f_opr_press_log_id = #{fOprPressLogId}
</delete>
<delete id="deleteTSupBalStopSupOprPressLogByIds" parameterType="String">
delete from t_sup_bal_stop_sup_opr_press_log where f_opr_press_log_id in
<foreach item="fOprPressLogId" collection="array" open="(" separator="," close=")">
#{fOprPressLogId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<el-table v-loading="loading" :data="supList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="supList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="企业名称" align="center" prop="enterpriseName" /> <el-table-column label="企业名称" align="center" prop="enterpriseName" :show-overflow-tooltip="true"/>
<el-table-column label="计划量/wm³" align="center" prop="fPlanQuan" /> <el-table-column label="计划量/wm³" align="center" prop="fPlanQuan" />
<el-table-column label="批复量/wm³" align="center" prop="fApprQuan" /> <el-table-column label="批复量/wm³" align="center" prop="fApprQuan" />
<el-table-column label="供气量/wm³" align="center" prop="fSupGasVol" /> <el-table-column label="供气量/wm³" align="center" prop="fSupGasVol" />
......
...@@ -30,10 +30,16 @@ ...@@ -30,10 +30,16 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="上报状态" prop="fRepStatus"> <el-form-item label="上报状态" prop="fRepStatus" v-if="-2 != $store.state.user.enterpriseId">
<el-select v-model="queryParams.fRepStatus" placeholder="请选择上报状态" clearable size="small"> <el-select v-model="queryParams.fRepStatus" placeholder="请选择上报状态" clearable size="small">
<el-option label="未上报" value="0" /> <el-option label="未上报" value="0" />
<el-option label="已上报" value="2" /> <el-option label="已上报" value="1" />
</el-select>
</el-form-item>
<el-form-item label="上报状态" prop="fGovUploadStatus" v-if="-2 == $store.state.user.enterpriseId">
<el-select v-model="queryParams.fGovUploadStatus" placeholder="请选择上报状态" clearable size="small">
<el-option label="未上报" value="0" />
<el-option label="已上报" value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -49,10 +55,11 @@ ...@@ -49,10 +55,11 @@
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
v-if="-2 != $store.state.user.enterpriseId"
@click="handleAdd" @click="handleAdd"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
...@@ -71,7 +78,7 @@ ...@@ -71,7 +78,7 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
>删除</el-button> >删除</el-button>
</el-col> </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -85,9 +92,9 @@ ...@@ -85,9 +92,9 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="supList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="supList">
<el-table-column type="selection" width="55" align="center" /> <!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="企业名称" align="center" prop="enterpriseName" /> <el-table-column label="企业名称" align="center" prop="enterpriseName" :show-overflow-tooltip="true"/>
<el-table-column label="停气开始日期" align="center" prop="fStartDate" width="150"> <el-table-column label="停气开始日期" align="center" prop="fStartDate" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.fStartDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.fStartDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
...@@ -107,14 +114,27 @@ ...@@ -107,14 +114,27 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上报状态" align="center" prop="fRepStatus"> <el-table-column label="上报状态" align="center" prop="fRepStatus" v-if="-2 != $store.state.user.enterpriseId">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.fRepStatus == '0'">未上报</span> <span v-if="scope.row.fRepStatus == '0'">未上报</span>
<span v-else-if="scope.row.fRepStatus == '1'">已上报</span> <span v-else-if="scope.row.fRepStatus == '1'">已上报</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="上报状态" align="center" prop="fGovUploadStatus" v-if="-2 == $store.state.user.enterpriseId">
<template slot-scope="scope">
<span v-if="scope.row.fGovUploadStatus == '0'">未上报</span>
<span v-else-if="scope.row.fGovUploadStatus == '1'">已上报</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报时间" align="center" prop="fRecoveryGasTime" width="150" v-if="-2 == $store.state.user.enterpriseId">
<template slot-scope="scope">
<span v-if="scope.row.fGovUploadTime">{{ parseTime(scope.row.fGovUploadTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -126,14 +146,27 @@ ...@@ -126,14 +146,27 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
v-if="scope.row.fRepStatus == '0'"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
v-if="scope.row.fRepStatus == '0'"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button> >删除</el-button>
<el-button
size="mini"
type="text"
@click="handleReport(scope.row)"
>上报</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.fRepStatus == '1' && -2 != $store.state.user.enterpriseId"
@click="handleStop(scope.row)"
>停气状态</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -189,7 +222,7 @@ ...@@ -189,7 +222,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <!--<el-col :span="12">
<el-form-item label="停气进度" prop="fStopProgress"> <el-form-item label="停气进度" prop="fStopProgress">
<el-select v-model="form.fStopProgress" style="width: 98%" placeholder="请选择停气进度"> <el-select v-model="form.fStopProgress" style="width: 98%" placeholder="请选择停气进度">
<el-option <el-option
...@@ -200,7 +233,7 @@ ...@@ -200,7 +233,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>-->
<el-col :span="12"> <el-col :span="12">
<el-form-item label="影响用户" prop="fInfluenceCus"> <el-form-item label="影响用户" prop="fInfluenceCus">
...@@ -233,8 +266,31 @@ ...@@ -233,8 +266,31 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm()"> </el-button> <el-button type="primary" @click="submitForm()"> </el-button>
<el-button @click="submitForm(1)"> </el-button> <!--<el-button @click="submitForm()"> </el-button>-->
<!--<el-button @click="cancel"> </el-button>--> <el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 停气状态弹框 -->
<el-dialog title="停气状态" :visible.sync="stopOpen" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="stopForm" :model="stopForm" :rules="stopRules" label-width="120px">
<el-form-item label="停气进度" prop="fStopProgress">
<el-select v-model="stopForm.fStopProgress" style="width: 98%" placeholder="请选择停气进度">
<el-option
v-for="dict in fStopProgressOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitStopForm()"> </el-button>
<!--<el-button @click="submitForm()"> </el-button>-->
<el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -245,7 +301,7 @@ ...@@ -245,7 +301,7 @@
</template> </template>
<script> <script>
import { listSup, getSup, delSup, addSup, updateSup, exportSup } from "@/api/supplybalance/stop"; import { listSup, getSup, delSup, addSup, updateSup, exportSup, reportSupBalStopSupRecInfo } from "@/api/supplybalance/stop";
// 如果只允许画一个,则用这个 // 如果只允许画一个,则用这个
// import DrawArea from "@/components/DrawArea"; // import DrawArea from "@/components/DrawArea";
// 如果需要画多个,则用这个 // 如果需要画多个,则用这个
...@@ -291,7 +347,8 @@ export default { ...@@ -291,7 +347,8 @@ export default {
fStopType: null, fStopType: null,
fStopProgress: null, fStopProgress: null,
fRepStatus: null, fRepStatus: null,
enterpriseName: null enterpriseName: null,
fGovUploadStatus: null
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -324,7 +381,14 @@ export default { ...@@ -324,7 +381,14 @@ export default {
[114.762751,38.056354], [114.762751,38.056354],
[114.657695,38.020932], [114.657695,38.020932],
[114.655978,38.020121] [114.655978,38.020121]
] ],
stopOpen: false,
stopForm: {},
stopRules: {
fStopProgress: [
{ required: true, message: "停气进度不能为空", trigger: "change" }
],
},
}; };
}, },
created() { created() {
...@@ -468,10 +532,10 @@ export default { ...@@ -468,10 +532,10 @@ export default {
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm(type) { submitForm() {
if(1 == type){ /*if(1 == type){
this.form.fRepStatus = '1'; this.form.fRepStatus = '1';
} }*/
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.fGasStopId != null) { if (this.form.fGasStopId != null) {
...@@ -523,6 +587,39 @@ export default { ...@@ -523,6 +587,39 @@ export default {
handleDetail(row){ handleDetail(row){
this.$refs.detail.getDetailInfo(row.fGasStopId); this.$refs.detail.getDetailInfo(row.fGasStopId);
}, },
handleReport(row) {
const that = this;
this.$confirm('是否确认上报停气监管编号为"' + row.fGasStopId + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
if(-2 == that.$store.state.user.enterpriseId){
return reportSupBalStopSupRecInfo({fGasStopId : row.fGasStopId});
}
return updateSup({fGasStopId : row.fGasStopId,fRepStatus : '1'});
}).then(() => {
this.getList();
this.msgSuccess("上报成功");
}).catch(() => {});
},
handleStop(row){
getSup(row.fGasStopId).then(res => {
if(res.code == 200 && res.data){
this.stopForm = res.data;
this.stopOpen = true;
}
})
},
submitStopForm(){
updateSup({fGasStopId:this.stopForm.fGasStopId,fStopProgress:this.stopForm.fStopProgress}).then(res =>{
if(res.code == 200){
this.msgSuccess("停气进度更新成功");
this.stopOpen = false;
this.getList();
}
})
}
} }
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment