add:入库新增导出功能
This commit is contained in:
@@ -61,4 +61,10 @@ public class CustomerController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getcust")
|
||||
@Log("获取客户")
|
||||
public ResponseEntity<Object> getcust() {
|
||||
return new ResponseEntity<>(iMdCsCustomerbaseService.getSupp(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdCsCustomerbase;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -43,4 +44,10 @@ public interface IMdCsCustomerbaseService extends IService<MdCsCustomerbase> {
|
||||
* @param ids 客户标识集合
|
||||
*/
|
||||
void delete(Set<String> ids);
|
||||
|
||||
/**
|
||||
* 获取客户
|
||||
* @return List<MdCsCustomerbase>
|
||||
*/
|
||||
List<MdCsCustomerbase> getSupp();
|
||||
}
|
||||
|
||||
@@ -16,9 +16,11 @@ import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||
import org.nl.wms.basedata_manage.service.IMdCsCustomerbaseService;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdCsCustomerbase;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.MdCsCustomerbaseMapper;
|
||||
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -59,7 +61,7 @@ public class MdCsCustomerbaseServiceImpl extends ServiceImpl<MdCsCustomerbaseMap
|
||||
.eq(MdCsCustomerbase::getCust_code, dto.getCust_code())
|
||||
);
|
||||
if (ObjectUtil.isNotEmpty(mdCsCustomerbase)) {
|
||||
throw new BadRequestException("当前客户编码已存在【"+dto.getCust_code()+"】");
|
||||
throw new BadRequestException("当前客户编码已存在【" + dto.getCust_code() + "】");
|
||||
}
|
||||
|
||||
// 新增
|
||||
@@ -93,4 +95,13 @@ public class MdCsCustomerbaseServiceImpl extends ServiceImpl<MdCsCustomerbaseMap
|
||||
public void delete(Set<String> ids) {
|
||||
this.baseMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MdCsCustomerbase> getSupp() {
|
||||
return this.baseMapper.selectList(
|
||||
new QueryWrapper<MdCsCustomerbase>().lambda()
|
||||
.eq(MdCsCustomerbase::getIs_used, IOSConstant.IS_DELETE_YES)
|
||||
.eq(MdCsCustomerbase::getIs_delete, IOSConstant.IS_DELETE_NO)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,6 +328,31 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
||||
if (ObjectUtil.isNotEmpty(attrDao.getStoragevehicle_code())) {
|
||||
throw new BadRequestException("当前点位已存在托盘!【" + attrDao.getStoragevehicle_code() + "】");
|
||||
}
|
||||
|
||||
// 判断当前载具与仓位是否符合
|
||||
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getByCode(whereJson.getString("storagevehicle_code"));
|
||||
String vehicle_type = "";
|
||||
switch (vehicleDao.getStoragevehicle_type()) {
|
||||
case "00":
|
||||
vehicle_type = IOSEnum.VEHICLE_TYPE_PUT.code("金属托盘");
|
||||
break;
|
||||
case "01":
|
||||
vehicle_type = IOSEnum.VEHICLE_TYPE_PUT.code("小料架");
|
||||
break;
|
||||
case "02":
|
||||
vehicle_type = IOSEnum.VEHICLE_TYPE_PUT.code("大料架(短边)");
|
||||
break;
|
||||
case "03":
|
||||
vehicle_type = IOSEnum.VEHICLE_TYPE_PUT.code("大料架(长边)");
|
||||
break;
|
||||
case "04":
|
||||
vehicle_type = IOSEnum.VEHICLE_TYPE_PUT.code("大料架(增高)");
|
||||
break;
|
||||
}
|
||||
if (!attrDao.getStoragevehicle_type().equals(vehicle_type)) {
|
||||
throw new BadRequestException("托盘类型与仓位存放载具类型不符合!");
|
||||
}
|
||||
|
||||
// 组织新增数据
|
||||
Map<String, Object> jsonMst = organizeInsertData(whereJson);
|
||||
// 调用服务新增数据
|
||||
|
||||
@@ -14,6 +14,8 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -114,4 +116,10 @@ public class RawAssistIStorController {
|
||||
public ResponseEntity<Object> getInBillTaskDtl(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(iRawAssistIStorService.getInBillTaskDtl(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
public void download(@RequestParam Map map, HttpServletResponse response) throws IOException {
|
||||
iRawAssistIStorService.download(map, response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,11 +47,11 @@ public enum IOSEnum {
|
||||
|
||||
// 存放载具类型
|
||||
VEHICLE_TYPE_PUT(MapOf.of("大料架(短边)", "1", "大料架(长边)", "2", "金属托盘", "3"
|
||||
, "小料架", "4")),
|
||||
, "小料架", "4", "大料架(增高)", "5")),
|
||||
|
||||
// 载具类型
|
||||
VEHICLE_TYPE(MapOf.of("金属托盘", "00", "小料架", "01", "大料架(短边)", "02"
|
||||
, "大料架(长边)", "03")),
|
||||
, "大料架(长边)", "03", "大料架(增高)", "04")),
|
||||
|
||||
// 点位状态
|
||||
POINT_STATUS(MapOf.of("无货", "1", "有货", "2" )),
|
||||
|
||||
@@ -13,6 +13,8 @@ import org.nl.wms.warehouse_management.service.dto.IOStorInvDisDto;
|
||||
import org.nl.wms.warehouse_management.service.dto.IOStorInvDtlDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -55,4 +57,13 @@ public interface IRawAssistIStorService extends IService<IOStorInv> {
|
||||
Structattr autoDis(JSONObject whereJson);
|
||||
|
||||
List<IOStorInvDisDto> getInBillTaskDtl(Map whereJson);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*
|
||||
* @param map 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(Map map, HttpServletResponse response) throws IOException;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.nl.wms.warehouse_management.service.dao.mapper;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInv;
|
||||
import org.nl.wms.warehouse_management.service.dto.GroupPlateDto;
|
||||
import org.nl.wms.warehouse_management.service.dto.IOStorInvDisDto;
|
||||
import org.nl.wms.warehouse_management.service.dto.IOStorInvDtlDto;
|
||||
|
||||
import java.util.List;
|
||||
@@ -19,12 +19,19 @@ import java.util.Map;
|
||||
@Mapper
|
||||
public interface IOStorInvMapper extends BaseMapper<IOStorInv> {
|
||||
|
||||
IPage<IOStorInv> queryAllByPage (IPage<IOStorInv> page,@Param("params") Map whereJson);
|
||||
IPage<IOStorInv> queryAllByPage(IPage<IOStorInv> page, @Param("params") Map whereJson);
|
||||
|
||||
IPage<GroupPlateDto> getGroupPlate (IPage<GroupPlateDto> page, @Param("params") Map whereJson);
|
||||
IPage<GroupPlateDto> getGroupPlate(IPage<GroupPlateDto> page, @Param("params") Map whereJson);
|
||||
|
||||
List<IOStorInvDtlDto> getIODtl (@Param("params") Map whereJson);
|
||||
List<IOStorInvDtlDto> getIODtl(@Param("params") Map whereJson);
|
||||
|
||||
IPage<IOStorInv> queryOutBillPage (IPage<IOStorInv> page,@Param("params") Map whereJson);
|
||||
IPage<IOStorInv> queryOutBillPage(IPage<IOStorInv> page, @Param("params") Map whereJson);
|
||||
|
||||
/**
|
||||
* 查询导出数据
|
||||
*
|
||||
* @param map 入参
|
||||
* @return List<JSONObject>
|
||||
*/
|
||||
List<JSONObject> queryAlldownload(@Param("params") Map map);
|
||||
}
|
||||
|
||||
@@ -182,4 +182,69 @@
|
||||
</where>
|
||||
ORDER BY ios.iostorinv_id Desc
|
||||
</select>
|
||||
|
||||
<select id="queryAlldownload" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
dis.*,
|
||||
ios.bill_code,
|
||||
ios.input_optname,
|
||||
ios.input_time,
|
||||
ios.confirm_optname,
|
||||
ios.confirm_time,
|
||||
maer.material_code,
|
||||
maer.material_name,
|
||||
(
|
||||
CASE ios.bill_status
|
||||
WHEN '10' THEN '生成'
|
||||
WHEN '20' THEN '分配中'
|
||||
WHEN '30' THEN '分配完'
|
||||
WHEN '99' THEN '完成'
|
||||
END
|
||||
) AS bill_status
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
INNER JOIN st_ivt_iostorinv ios ON ios.iostorinv_id = dis.iostorinv_id
|
||||
INNER JOIN md_me_materialbase maer ON maer.material_id = dis.material_id
|
||||
<where>
|
||||
ios.is_delete = '0'
|
||||
AND ios.io_type = '0'
|
||||
<if test="params.bill_code != null">
|
||||
AND
|
||||
ios.bill_code LIKE #{params.bill_code}
|
||||
</if>
|
||||
<if test="params.pcsn != null">
|
||||
AND
|
||||
dis.pcsn LIKE #{params.pcsn}
|
||||
</if>
|
||||
<if test="params.pcsn_in != null">
|
||||
AND
|
||||
dis.pcsn IN #{params.pcsn_in}
|
||||
</if>
|
||||
<if test="params.stor_id != null">
|
||||
AND
|
||||
ios.stor_id = #{params.stor_id}
|
||||
</if>
|
||||
<if test="params.bill_type != null">
|
||||
AND
|
||||
ios.bill_type = #{params.bill_type}
|
||||
</if>
|
||||
<if test="params.create_mode != null">
|
||||
AND
|
||||
ios.create_mode = #{params.create_mode}
|
||||
</if>
|
||||
<if test="params.bill_status != null">
|
||||
AND
|
||||
ios.bill_status = #{params.bill_status}
|
||||
</if>
|
||||
<if test="params.begin_time != null">
|
||||
AND
|
||||
ios.input_time >= #{params.begin_time}
|
||||
</if>
|
||||
<if test="params.end_time != null">
|
||||
AND
|
||||
ios.input_time <= #{params.end_time}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY ios.iostorinv_id Desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -15,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.common.utils.FileUtil;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
@@ -35,10 +37,7 @@ import org.nl.wms.sch_manage.service.util.tasks.StInTask;
|
||||
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||
import org.nl.wms.warehouse_management.service.IRawAssistIStorService;
|
||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInv;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInvDis;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInvDtl;
|
||||
import org.nl.wms.warehouse_management.service.dao.*;
|
||||
import org.nl.wms.warehouse_management.service.dao.mapper.GroupPlateMapper;
|
||||
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDisMapper;
|
||||
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDtlMapper;
|
||||
@@ -51,6 +50,8 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -747,6 +748,8 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
Structattr::getStoragevehicle_type, IOSEnum.VEHICLE_TYPE_PUT.code("大料架(短边)"))
|
||||
.eq(mdPbStoragevehicleinfo.getStoragevehicle_type().equals(IOSEnum.VEHICLE_TYPE.code("大料架(长边)")),
|
||||
Structattr::getStoragevehicle_type, IOSEnum.VEHICLE_TYPE_PUT.code("大料架(长边)"))
|
||||
.eq(mdPbStoragevehicleinfo.getStoragevehicle_type().equals(IOSEnum.VEHICLE_TYPE.code("大料架(增高)")),
|
||||
Structattr::getStoragevehicle_type, IOSEnum.VEHICLE_TYPE_PUT.code("大料架(增高)"))
|
||||
);
|
||||
if (ObjectUtil.isEmpty(structattrList)){
|
||||
throw new BadRequestException("该库区没有仓位");
|
||||
@@ -771,4 +774,69 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
String iostorinvdtl_id = (String) whereJson.get("iostorinvdtl_id");
|
||||
return ioStorInvDisMapper.getBillTaskDtl(iostorinvdtl_id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void download(Map whereJson, HttpServletResponse response) throws IOException {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("buss_type", (String) whereJson.get("buss_type"));
|
||||
map.put("stor_id", (String) whereJson.get("stor_id"));
|
||||
map.put("bill_type", (String) whereJson.get("bill_type"));
|
||||
map.put("create_mode", (String) whereJson.get("create_mode"));
|
||||
map.put("bill_status", (String) whereJson.get("bill_status"));
|
||||
|
||||
String bill_code = MapUtil.getStr(whereJson, "bill_code");
|
||||
String pcsn = MapUtil.getStr(whereJson, "pcsn");
|
||||
|
||||
if (!ObjectUtil.isEmpty(bill_code)) {
|
||||
map.put("bill_code", "%" + bill_code + "%");
|
||||
}
|
||||
|
||||
// 空格查询
|
||||
if (StrUtil.isNotEmpty(pcsn)) {
|
||||
// 判断是否有空格
|
||||
boolean matches = pcsn.matches(".*\\s.*");
|
||||
|
||||
if (matches) {
|
||||
String[] s = pcsn.split(" ");
|
||||
String pcsn_in = String.join("','", Arrays.asList(s));
|
||||
|
||||
map.put("pcsn_in", "('"+pcsn_in+"')");
|
||||
} else {
|
||||
map.put("pcsn", "%" + pcsn + "%");
|
||||
}
|
||||
}
|
||||
|
||||
String begin_time = (String) whereJson.get("begin_time");
|
||||
|
||||
if (!StrUtil.isEmpty(begin_time)) {
|
||||
map.put("begin_time", begin_time);
|
||||
}
|
||||
String end_time = (String) whereJson.get("end_time");
|
||||
if (!StrUtil.isEmpty(end_time)) {
|
||||
map.put("end_time", end_time);
|
||||
}
|
||||
List<JSONObject> disList = ioStorInvMapper.queryAlldownload(map);
|
||||
|
||||
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (JSONObject json : disList) {
|
||||
Map<String, Object> mp = new LinkedHashMap<>();
|
||||
mp.put("入库单编码", json.getString("bill_code"));
|
||||
mp.put("物料编码", json.getString("material_code"));
|
||||
mp.put("物料名称", json.getString("material_name"));
|
||||
mp.put("入库批次", json.getString("pcsn"));
|
||||
mp.put("入库载具", json.getString("storagevehicle_code"));
|
||||
mp.put("入库仓位", json.getString("struct_code"));
|
||||
mp.put("入库数量", json.getString("plan_qty"));
|
||||
mp.put("单位", json.getString("qty_unit_name"));
|
||||
mp.put("单据状态", json.getString("bill_status"));
|
||||
mp.put("创建人", json.getString("input_optname"));
|
||||
mp.put("创建时间", json.getString("input_time"));
|
||||
mp.put("完成人", json.getString("confirm_optname"));
|
||||
mp.put("完成时间", json.getString("confirm_time"));
|
||||
list.add(mp);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,11 @@ import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.common.utils.FileUtil;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.basedata_manage.service.IMdCsCustomerbaseService;
|
||||
import org.nl.wms.basedata_manage.service.IMdCsSupplierbaseService;
|
||||
import org.nl.wms.basedata_manage.service.IMdMeMaterialbaseService;
|
||||
import org.nl.wms.basedata_manage.service.IMdPbMeasureunitService;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdCsSupplierbase;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdCsCustomerbase;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdPbMeasureunit;
|
||||
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||
@@ -54,6 +55,9 @@ public class StIvtSalesorderServiceImpl extends ServiceImpl<StIvtSalesorderMappe
|
||||
@Autowired
|
||||
private IMdMeMaterialbaseService iMdMeMaterialbaseService;
|
||||
|
||||
@Autowired
|
||||
private IMdCsCustomerbaseService iMdCsCustomerbaseService;
|
||||
|
||||
@Autowired
|
||||
private IOutBillService iOutBillService;
|
||||
|
||||
@@ -95,13 +99,12 @@ public class StIvtSalesorderServiceImpl extends ServiceImpl<StIvtSalesorderMappe
|
||||
dao.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
dao.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
dao.setCreate_time(DateUtil.now());
|
||||
// 查询供应商编码
|
||||
|
||||
MdCsSupplierbase suppDao = iMdCsSupplierbaseService.getOne(
|
||||
new QueryWrapper<MdCsSupplierbase>().lambda()
|
||||
.eq(MdCsSupplierbase::getSupp_code, dao.getSupp_code())
|
||||
// 查询客户
|
||||
MdCsCustomerbase one = iMdCsCustomerbaseService.getOne(
|
||||
new QueryWrapper<MdCsCustomerbase>().lambda()
|
||||
.eq(MdCsCustomerbase::getCust_code, dao.getSupp_code())
|
||||
);
|
||||
dao.setSupp_name(suppDao.getSupp_name());
|
||||
dao.setSupp_name(one.getCust_name());
|
||||
// 默认数量个
|
||||
MdPbMeasureunit unitDao = iMdPbMeasureunitService.getByCode("EA");
|
||||
dao.setQty_unit_id(unitDao.getMeasure_unit_id());
|
||||
@@ -112,12 +115,12 @@ public class StIvtSalesorderServiceImpl extends ServiceImpl<StIvtSalesorderMappe
|
||||
@Override
|
||||
@Transactional
|
||||
public void update(StIvtSalesorder dao) {
|
||||
// 查询供应商编码
|
||||
MdCsSupplierbase suppDao = iMdCsSupplierbaseService.getOne(
|
||||
new QueryWrapper<MdCsSupplierbase>().lambda()
|
||||
.eq(MdCsSupplierbase::getSupp_code, dao.getSupp_code())
|
||||
// 查询客户
|
||||
MdCsCustomerbase one = iMdCsCustomerbaseService.getOne(
|
||||
new QueryWrapper<MdCsCustomerbase>().lambda()
|
||||
.eq(MdCsCustomerbase::getCust_code, dao.getSupp_code())
|
||||
);
|
||||
dao.setSupp_name(suppDao.getSupp_name());
|
||||
dao.setSupp_name(one.getCust_name());
|
||||
this.updateById(dao);
|
||||
}
|
||||
|
||||
@@ -207,7 +210,7 @@ public class StIvtSalesorderServiceImpl extends ServiceImpl<StIvtSalesorderMappe
|
||||
mp.put("客户编码", dao.getSupp_code());
|
||||
mp.put("客户名称", dao.getSupp_name());
|
||||
mp.put("销售数量", dao.getSale_qty());
|
||||
mp.put("单位", dao.getQty_unit_id());
|
||||
mp.put("单位", dao.getQty_unit_name());
|
||||
if (dao.getSale_status().equals(IOSEnum.SALE_STATUS.code("生成"))) {
|
||||
mp.put("状态", "生成");
|
||||
} else if (dao.getSale_status().equals(IOSEnum.SALE_STATUS.code("审核"))) {
|
||||
|
||||
@@ -24,4 +24,12 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export function getcust(data) {
|
||||
return request({
|
||||
url: 'api/customerbase/getcust',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getcust }
|
||||
|
||||
@@ -139,6 +139,17 @@
|
||||
>
|
||||
强制确认
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
@@ -221,6 +232,8 @@ import ViewDialog from '@/views/wms/st/inbill/ViewDialog'
|
||||
// import TaskDialog from '@/views/wms/st/inbill/TaskDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
import {download} from "@/api/data";
|
||||
import {downloadFile} from "@/utils";
|
||||
|
||||
export default {
|
||||
name: 'Rawassist',
|
||||
@@ -246,6 +259,7 @@ export default {
|
||||
edit: ['admin', 'inbill:edit'],
|
||||
del: ['admin', 'inbill:del']
|
||||
},
|
||||
showDtlLoading: false,
|
||||
audit_flag: true,
|
||||
dis_flag: true,
|
||||
task_flag: true,
|
||||
@@ -387,6 +401,19 @@ export default {
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
downdtl() {
|
||||
this.showDtlLoading = true
|
||||
if (this.crud.query.createTime !== undefined) {
|
||||
this.query.begin_time = this.crud.query.createTime[0]
|
||||
this.query.end_time = this.crud.query.createTime[1]
|
||||
}
|
||||
download('/api/in/rawAssist/download', this.crud.query).then(result => {
|
||||
downloadFile(result, '入库单', 'xlsx')
|
||||
this.showDtlLoading = false
|
||||
}).catch(() => {
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,9 +135,9 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="item in suppList"
|
||||
:key="item.supp_code"
|
||||
:label="item.supp_name"
|
||||
:value="item.supp_code"
|
||||
:key="item.cust_code"
|
||||
:label="item.cust_name"
|
||||
:value="item.cust_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
<script>
|
||||
import crudSaleorder from '@/views/wms/st/saleorder/saleorder'
|
||||
import crudSupplierbase from '@/views/wms/basedata/supp/supplierbase'
|
||||
import customerbase, {getcust} from '@/views/wms/basedata/customer/customerbase'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
@@ -275,7 +275,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudSupplierbase.getSupp({}).then(res => {
|
||||
customerbase.getcust({}).then(res => {
|
||||
this.suppList = res
|
||||
})
|
||||
this.initQuery()
|
||||
@@ -351,6 +351,10 @@ export default {
|
||||
},
|
||||
downdtl() {
|
||||
this.showDtlLoading = true
|
||||
if (this.crud.query.createTime !== undefined) {
|
||||
this.query.begin_time = this.crud.query.createTime[0]
|
||||
this.query.end_time = this.crud.query.createTime[1]
|
||||
}
|
||||
download('/api/salesorder/download', this.crud.query).then(result => {
|
||||
downloadFile(result, '销售单', 'xlsx')
|
||||
this.showDtlLoading = false
|
||||
|
||||
Reference in New Issue
Block a user