rev:半成品出入库、拼盘
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
<where>
|
||||
mst.is_delete = '0'
|
||||
AND
|
||||
io_type = '1'
|
||||
io_type = '0'
|
||||
<if test="query.start_time != null">
|
||||
and mst.create_time >= #{query.start_time}
|
||||
</if>
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
package org.nl.wms.storage_manage.rawmanage.service.structIvt.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pcs_manage.service.purchase.dto.PurchaseOrderQuery;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.structIvt.IStIvtStructivtYlService;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.structIvt.dao.StIvtStructivtYl;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.structIvt.dao.mapper.StIvtStructivtYlMapper;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.structIvt.IStIvtStructivtYlService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.structIvt.dto.StructIvtYLQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@@ -27,12 +25,10 @@ import java.util.Map;
|
||||
@Service
|
||||
public class StIvtStructivtYlServiceImpl extends ServiceImpl<StIvtStructivtYlMapper, StIvtStructivtYl> implements IStIvtStructivtYlService {
|
||||
|
||||
@Autowired
|
||||
private StIvtStructivtYlMapper structivtYlMapper;
|
||||
@Override
|
||||
public Object getRawIvt(StructIvtYLQuery query, PageQuery pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
List<Map> mst_detail = structivtYlMapper.getRawIvt(query, pageQuery);
|
||||
List<Map> mst_detail = this.baseMapper.getRawIvt(query, pageQuery);
|
||||
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
@@ -40,6 +36,6 @@ public class StIvtStructivtYlServiceImpl extends ServiceImpl<StIvtStructivtYlMap
|
||||
|
||||
@Override
|
||||
public List<Map> getStructIvt(StructIvtYLQuery query) {
|
||||
return structivtYlMapper.getStructIvt(query);
|
||||
return this.baseMapper.getStructIvt(query);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +0,0 @@
|
||||
//package org.nl.wms.storage_manage.semimanage.controller;
|
||||
//
|
||||
//import com.alibaba.fastjson.JSONObject;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
//import lombok.RequiredArgsConstructor;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.nl.common.anno.Log;
|
||||
//import org.nl.wms.storage_manage.service.product.SemiProductOutService;
|
||||
//import org.springframework.data.domain.Pageable;
|
||||
//import org.springframework.http.HttpStatus;
|
||||
//import org.springframework.http.ResponseEntity;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletResponse;
|
||||
//import java.io.IOException;
|
||||
//import java.util.Map;
|
||||
//
|
||||
//@RestController
|
||||
//@RequiredArgsConstructor
|
||||
//@Api(tags = "半成品出库")
|
||||
//@RequestMapping("/api/semiproductOut")
|
||||
//@Slf4j
|
||||
//public class SemiProductOutController{
|
||||
// private final SemiProductOutService semiProductOutService;
|
||||
//
|
||||
// @GetMapping
|
||||
// @Log("查询出库单")
|
||||
// @ApiOperation("查询出库单")
|
||||
// public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
||||
// return new ResponseEntity<>(semiProductOutService.pageQuery(whereJson,page), HttpStatus.OK);
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/addDtl")
|
||||
// @Log("查询库存")
|
||||
// @ApiOperation("查询库存")
|
||||
// public ResponseEntity<Object> queryAddDtl(@RequestParam Map whereJson, Pageable page){
|
||||
// return new ResponseEntity<>(semiProductOutService.queryAddDtl(whereJson,page), HttpStatus.OK);
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/queryDtl")
|
||||
// @Log("查询明细")
|
||||
// @ApiOperation("查询明细")
|
||||
// public ResponseEntity<Object> queryDtl(@RequestParam Map whereJson, Pageable page){
|
||||
// return new ResponseEntity<>(semiProductOutService.queryDtl(whereJson,page), HttpStatus.OK);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/getOutBillDtl")
|
||||
// @Log("查询分配明细")
|
||||
// @ApiOperation("查询分配明细")
|
||||
// public ResponseEntity<Object> getOutBillDtl(@RequestBody JSONObject whereJson){
|
||||
// return new ResponseEntity<>(semiProductOutService.getOutBillDtl(whereJson), HttpStatus.OK);
|
||||
// }
|
||||
//
|
||||
// @Log("删除出库单")
|
||||
// @ApiOperation("删除出库单")
|
||||
// @DeleteMapping
|
||||
// public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
// semiProductOutService.deleteAll(ids);
|
||||
// return new ResponseEntity<>(HttpStatus.OK);
|
||||
// }
|
||||
//
|
||||
// @PutMapping
|
||||
// @Log("修改出库单")
|
||||
// @ApiOperation("修改出库单")
|
||||
// public ResponseEntity<Object> update(@RequestBody JSONObject whereJson){
|
||||
// semiProductOutService.update(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @PostMapping()
|
||||
// @Log("新增出库单")
|
||||
// @ApiOperation("新增出库单")
|
||||
// public ResponseEntity<Object> insertDtl(@RequestBody JSONObject whereJson){
|
||||
// semiProductOutService.insertDtl(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/allDiv")
|
||||
// @Log("出库单全部分配")
|
||||
// @ApiOperation("出库单全部分配")
|
||||
// public ResponseEntity<Object> allDiv(@RequestBody JSONObject whereJson) {
|
||||
// semiProductOutService.allDiv(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/allDivOne")
|
||||
// @Log("分配一条出库明细")
|
||||
// @ApiOperation("分配一条出库明细")
|
||||
// public ResponseEntity<Object> allDivOne(@RequestBody JSONObject whereJson) {
|
||||
// semiProductOutService.allDivOne(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/allCancel")
|
||||
// @Log("出库单全部取消")
|
||||
// @ApiOperation("出库单全部取消")
|
||||
// public ResponseEntity<Object> allCancel(@RequestBody JSONObject whereJson) {
|
||||
// semiProductOutService.allCancel(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/oneCancel")
|
||||
// @Log("出库单全部取消")
|
||||
// @ApiOperation("出库单全部取消")
|
||||
// public ResponseEntity<Object> oneCancel(@RequestBody JSONObject whereJson) {
|
||||
// semiProductOutService.oneCancel(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/getOutBillDis")
|
||||
// @Log("查询出库单分配明细")
|
||||
// @ApiOperation("查询出库单分配明细")
|
||||
// public ResponseEntity<Object> getOutBillDis(@RequestBody JSONObject whereJson){
|
||||
// return new ResponseEntity<>(semiProductOutService.getOutBillDis(whereJson), HttpStatus.OK);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/allSetPoint")
|
||||
// @Log("设置全部站点")
|
||||
// @ApiOperation("设置全部站点")
|
||||
// public ResponseEntity<Object> allSetPoint(@RequestBody JSONObject whereJson) {
|
||||
// semiProductOutService.allSetPoint(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/manualDiv")
|
||||
// @Log("出库单手动分配")
|
||||
// @ApiOperation("出库单手动分配")
|
||||
// public ResponseEntity<Object> manualDiv(@RequestBody JSONObject whereJson) {
|
||||
// semiProductOutService.manualDiv(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/confirm")
|
||||
// @Log("出库单强制确认")
|
||||
// @ApiOperation("出库单强制确认")
|
||||
// public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
// semiProductOutService.confirm(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/finishTask")
|
||||
// @Log("出库任务手动完成")
|
||||
// @ApiOperation("出库任务手动完成")
|
||||
// public ResponseEntity<Object> finishTask(@RequestBody JSONObject whereJson) {
|
||||
// semiProductOutService.finishTask(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/backConfirm")
|
||||
// @Log("出库单强制确认")
|
||||
// @ApiOperation("出库单强制确认")
|
||||
// public ResponseEntity<Object> backConfirm(@RequestBody JSONObject whereJson) {
|
||||
// semiProductOutService.backConfirm(whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @Log("下载发货单Excel")
|
||||
// @ApiOperation("下载发货单Excel")
|
||||
// @GetMapping(value = "/downloadExcel")
|
||||
// public ResponseEntity<Object> downloadExcel(HttpServletResponse response, @RequestParam Map whereJson) throws IOException {
|
||||
// semiProductOutService.downloadExcel(response,whereJson);
|
||||
// return new ResponseEntity<>(HttpStatus.OK);
|
||||
// }
|
||||
//}
|
||||
@@ -0,0 +1,111 @@
|
||||
package org.nl.wms.storage_manage.semimanage.controller.iostorInv;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.IStIvtIostorinvBcpOutService;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.IStIvtIostorinvBcpService;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dao.StIvtIostorinvBcp;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dto.BcpIostorInvQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库记录表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-05-10
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "半成品出库")
|
||||
@RequestMapping("/api/out/semiproduct")
|
||||
@Slf4j
|
||||
@SaIgnore
|
||||
public class StIvtIostorinvBcpOutController {
|
||||
|
||||
@Autowired
|
||||
private IStIvtIostorinvBcpOutService bcpOutService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询入库单据")
|
||||
@ApiOperation("查询入库单据")
|
||||
public ResponseEntity<Object> query(BcpIostorInvQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(bcpOutService.queryDtl(query,page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Log("新增出库单")
|
||||
@ApiOperation("新增出库单")
|
||||
public ResponseEntity<Object> create(@RequestBody JSONObject form) {
|
||||
bcpOutService.create(form);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@Log("删除出入库单")
|
||||
@ApiOperation("删除出入库单")
|
||||
@PostMapping("/delete")
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
if (ids.length>0){
|
||||
bcpOutService.update(new UpdateWrapper<StIvtIostorinvBcp>()
|
||||
.set("is_delete","1")
|
||||
.in("iostorinv_id",ids));
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/update")
|
||||
@Log("修改出库单")
|
||||
@ApiOperation("修改出库单")
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject whereJson) {
|
||||
bcpOutService.updateBill(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/commit")
|
||||
@Log("出入单提交")
|
||||
@ApiOperation("出入单提交")
|
||||
public ResponseEntity<Object> commit(@RequestBody Map<String,Object> whereJson) {
|
||||
//semiProductInService.commit(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/getIODtl")
|
||||
@Log("查询入库分配明细")
|
||||
@ApiOperation("查询入库分配明细")
|
||||
public ResponseEntity<Object> getIODtl(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(bcpOutService.getIoDtl(whereJson.toJavaObject(BcpIostorInvQuery.class)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/confirm")
|
||||
@Log("完成单据")
|
||||
@ApiOperation("完成单据")
|
||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
bcpOutService.confirm(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/confirmTask")
|
||||
@Log("下发任务")
|
||||
@ApiOperation("下发任务")
|
||||
public ResponseEntity<Object> confirmTask(@RequestBody JSONObject whereJson) {
|
||||
bcpOutService.confirmTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
package org.nl.wms.storage_manage.semimanage.controller.shutFrame;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.wms.storage_manage.semimanage.service.shutFrame.IStIvtShutframeinvBcpService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -17,5 +26,13 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping("/stIvtShutframeinvBcp")
|
||||
public class StIvtShutframeinvBcpController {
|
||||
|
||||
// @Autowired
|
||||
// private IStIvtShutframeinvBcpService shutframeinvBcpService;
|
||||
// @PostMapping("/create")
|
||||
// @Log("创建拼盘单")
|
||||
// @ApiOperation("创建拼盘单")
|
||||
// public ResponseEntity<Object> create(@RequestBody JSONObject jo) {
|
||||
// return new ResponseEntity<>(shutframeinvBcpService.create(jo), HttpStatus.OK);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
package org.nl.wms.storage_manage.semimanage.controller.structLvt;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.structIvt.dto.StructIvtYLQuery;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.IStIvtStructivtBcpService;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dto.StructIvtBcpQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -14,8 +22,24 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @since 2023-05-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/stIvtStructivtBcp")
|
||||
@RequestMapping("/api/bcp")
|
||||
public class StIvtStructivtBcpController {
|
||||
|
||||
@Autowired
|
||||
private IStIvtStructivtBcpService bcpService;
|
||||
|
||||
@GetMapping("/getBcpIvt")
|
||||
@Log("查询可用的半成品库存")
|
||||
@ApiOperation("查询可用的半成品库存")
|
||||
public ResponseEntity<Object> getBcpIvt(StructIvtBcpQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(bcpService.getBcpIvt(query, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getBcpIvtInfo")
|
||||
@Log("查询可用的半成品库存")
|
||||
@ApiOperation("查询可用的半成品库存")
|
||||
public ResponseEntity<Object> getBcpIvtInfo(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(bcpService.getBcpIvtInfo(jo), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package org.nl.wms.storage_manage.semimanage.service.iostorInv;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dao.StIvtIostorinvBcp;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dto.BcpIostorInvQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库记录表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-05-10
|
||||
*/
|
||||
public interface IStIvtIostorinvBcpOutService extends IService<StIvtIostorinvBcp> {
|
||||
|
||||
|
||||
Object queryDtl(BcpIostorInvQuery query, PageQuery page);
|
||||
|
||||
List<Map> getIoDtl(BcpIostorInvQuery query);
|
||||
/**
|
||||
* 新增
|
||||
* @param form
|
||||
* @return
|
||||
*/
|
||||
void create(JSONObject form);
|
||||
/**
|
||||
* 完成
|
||||
* @param form
|
||||
* @return
|
||||
*/
|
||||
String confirm(JSONObject form);
|
||||
/**
|
||||
* 下发单据
|
||||
* @param form
|
||||
* @return
|
||||
*/
|
||||
String confirmTask(JSONObject form);
|
||||
/**
|
||||
* 修改单据
|
||||
* @param form
|
||||
* @return
|
||||
*/
|
||||
String updateBill(JSONObject form);
|
||||
|
||||
}
|
||||
@@ -146,12 +146,12 @@ public class StIvtIostorinvBcp implements Serializable {
|
||||
/**
|
||||
* 数量计量单位标识
|
||||
*/
|
||||
private String base_unit_id;
|
||||
private String qty_unit_id;
|
||||
|
||||
/**
|
||||
* 数量计量单位名称
|
||||
*/
|
||||
private String base_unit_name;
|
||||
private String qty_unit_name;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
package org.nl.wms.storage_manage.semimanage.service.iostorInv.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.jsonwebtoken.lang.Assert;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.publish.BussEventMulticaster;
|
||||
import org.nl.common.publish.event.PointEvent;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtBsrealstorattrService;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtSectattrService;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtStructattrService;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtBsrealstorattr;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtSectattr;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtStructattr;
|
||||
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
||||
import org.nl.wms.storage_manage.IOSEnum;
|
||||
import org.nl.wms.storage_manage.basedata.service.record.service.IStIvtStructivtflowService;
|
||||
import org.nl.wms.storage_manage.productmanage.util.DivRuleCpService;
|
||||
import org.nl.wms.storage_manage.productmanage.util.RuleUtil;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.IStIvtIostorinvBcpOutService;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dao.StIvtIostorinvBcp;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dao.mapper.StIvtIostorinvBcpMapper;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dto.BcpIostorInvQuery;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.IStIvtStructivtBcpService;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.StIvtStructivtBcp;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库记录表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-05-10
|
||||
*/
|
||||
@Service
|
||||
public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvBcpMapper, StIvtIostorinvBcp> implements IStIvtIostorinvBcpOutService {
|
||||
|
||||
@Autowired
|
||||
private IStIvtBsrealstorattrService storattrService;
|
||||
@Autowired
|
||||
private IStIvtStructivtBcpService structivtBcpService;
|
||||
@Autowired
|
||||
private IStIvtStructivtflowService structivtflowService;
|
||||
@Autowired
|
||||
private IStIvtStructattrService structattrService;
|
||||
@Autowired
|
||||
private DivRuleCpService divRuleCpService;
|
||||
@Autowired
|
||||
private IStIvtSectattrService sectattrService;
|
||||
|
||||
|
||||
@Override
|
||||
public Object queryDtl(BcpIostorInvQuery query, PageQuery pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
TableDataInfo build = TableDataInfo.build(this.getIoDtl(query));
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> getIoDtl(BcpIostorInvQuery query) {
|
||||
return this.baseMapper.getIostorinv(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void create(JSONObject form) {
|
||||
Assert.notNull(form, "参数不能为空");
|
||||
for (Object item : form.getJSONArray("tableData")) {
|
||||
StIvtIostorinvBcp mst = new StIvtIostorinvBcp();
|
||||
mst.setIostorinv_id(IdUtil.getStringId());
|
||||
mst.setBill_code(CodeUtil.getNewCode("IO_CODE"));
|
||||
mst.setBiz_date(form.getString("biz_date"));
|
||||
mst.setBill_type(form.getString("bill_type"));
|
||||
mst.setIo_type(IOSEnum.IO_TYPE.code("出库"));
|
||||
mst.setBill_status(IOSEnum.BILL_STATUS.code("生成"));
|
||||
mst.setRemark(form.getString("remark"));
|
||||
mst.setWorkshop_id(form.getString("product_code"));
|
||||
mst.setPoint_code(form.getString("point_code"));
|
||||
仓库数据:
|
||||
{
|
||||
StIvtBsrealstorattr stor = storattrService.getOne(new QueryWrapper<StIvtBsrealstorattr>().eq("stor_id", form.getString("stor_id")));
|
||||
mst.setStor_id(stor.getStor_id());
|
||||
mst.setStor_code(stor.getStor_code());
|
||||
mst.setStor_name(stor.getStor_name());
|
||||
}
|
||||
packageRow(mst, (JSONObject) item);
|
||||
mst.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
mst.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
mst.setCreate_time(DateUtil.now());
|
||||
this.save(mst);
|
||||
}
|
||||
}
|
||||
|
||||
private void packageRow(StIvtIostorinvBcp mst, JSONObject row) {
|
||||
mst.setMaterial_id(row.getString("material_id"));
|
||||
mst.setPcsn(StringUtils.isNotEmpty(row.getString("pcsn")) ? row.getString("pcsn") : DateUtil.today());
|
||||
mst.setPlan_qty(row.getBigDecimal("plan_qty"));
|
||||
mst.setQuality_scode(row.getString("quality_scode"));
|
||||
mst.setQty_unit_id(row.getString("qty_unit_id"));
|
||||
mst.setBase_bill_code(row.getString("base_bill_code"));
|
||||
mst.setQty_unit_name(row.getString("qty_unit_name"));
|
||||
mst.setUnit_weight(row.getBigDecimal("unit_weight"));
|
||||
mst.setStoragevehicle_code(row.getString("storagevehicle_code"));
|
||||
mst.setStoragevehicle_id(row.getString("storagevehicle_id"));
|
||||
mst.setSect_id(row.getString("sect_id"));
|
||||
mst.setSect_code(row.getString("sect_code"));
|
||||
mst.setSect_name(row.getString("sect_name"));
|
||||
mst.setStruct_id(row.getString("struct_id"));
|
||||
mst.setStruct_code(row.getString("struct_code"));
|
||||
mst.setStruct_name(row.getString("struct_name"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public String confirm(JSONObject form) {
|
||||
Assert.notNull(new Object[]{form, form.get("iostorinv_id")}, "请求参数不能为空");
|
||||
StIvtIostorinvBcp mst = this.getById(form.getString("iostorinv_id"));
|
||||
//checkParam(mst);
|
||||
if (StringUtils.isEmpty(mst.getStruct_code())) {
|
||||
throw new BadRequestException("当前入库单还未分配仓位!");
|
||||
}
|
||||
|
||||
mst.setBill_status(IOSEnum.BILL_STATUS.code("完成"));
|
||||
mst.setUpdate_time(DateUtil.now());
|
||||
mst.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
mst.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
this.updateById(mst);
|
||||
|
||||
//删除库存
|
||||
structivtBcpService.remove(new QueryWrapper<StIvtStructivtBcp>().eq("struct_id",mst.getStruct_id()));
|
||||
|
||||
/*structivtflowService.recordStructivtFlow(
|
||||
StIvtStructivtflowDto.builder()
|
||||
.bill_code(mst.getBill_code()).change_type_scode(CHANGE_BILL_TYPE_ENUM.IOSTORINV_IN_CONFIRM).bill_table("st_ivt_iostorinv_bcp")
|
||||
.material_id(mst.getMaterial_id()).pcsn(mst.getPcsn())
|
||||
.struct_code(mst.getStruct_code()).result_qty(structivtBcpService.getOne(new QueryWrapper<StIvtStructivtBcp>().eq("struct_code", mst.getStruct_code())).getCanuse_qty()).change_qty(mst.getPlan_qty())
|
||||
.task_id(mst.getTask_id())
|
||||
.storagevehicle_code(mst.getStoragevehicle_code())
|
||||
.build()
|
||||
);*/
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String confirmTask(JSONObject form) {
|
||||
Assert.notNull(new Object[]{form, form.get("iostorinv_id")}, "请求参数不能为空");
|
||||
StIvtIostorinvBcp mst = this.getById(form.getString("iostorinv_id"));
|
||||
checkParam(mst);
|
||||
|
||||
PointEvent event = PointEvent.builder()
|
||||
.type(CHANGE_BILL_TYPE_ENUM.IOSTORINV_IN_SEND.getCode())
|
||||
.point_code1(mst.getPoint_code())
|
||||
.point_code2(mst.getStruct_code())
|
||||
.callback((Consumer<String>) mst::setTask_id)
|
||||
.build();
|
||||
BussEventMulticaster.Publish(event);
|
||||
|
||||
mst.setWork_status(IOSEnum.WORK_STATUS.code("生成"));
|
||||
mst.setBill_status(IOSEnum.BILL_STATUS.code("分配完"));
|
||||
mst.setUpdate_time(DateUtil.now());
|
||||
mst.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
mst.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
this.updateById(mst);
|
||||
return mst.getTask_id();
|
||||
}
|
||||
|
||||
private void checkParam(StIvtIostorinvBcp mst) {
|
||||
if (mst == null || mst.getIs_delete() == true) {
|
||||
throw new BadRequestException("单据不存在");
|
||||
}
|
||||
if (!IOSEnum.BILL_STATUS.code("生成").equals(mst.getBill_status())) {
|
||||
throw new BadRequestException("单据" + mst.getBill_code() + "状态不是生成状态");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public String updateBill(JSONObject form) {
|
||||
Assert.notNull(new Object[]{form, form.get("iostorinv_id")}, "请求参数不能为空");
|
||||
StIvtIostorinvBcp mst = form.toJavaObject(StIvtIostorinvBcp.class);
|
||||
mst.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
mst.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
mst.setUpdate_time(DateUtil.now());
|
||||
for (Object item : form.getJSONArray("tableData")) {
|
||||
packageRow(mst, (JSONObject) item);
|
||||
}
|
||||
this.updateById(mst);
|
||||
return mst.getIostorinv_id();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -119,9 +119,9 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
||||
mst.setPcsn(StringUtils.isNotEmpty(row.getString("pcsn")) ? row.getString("pcsn") : DateUtil.today());
|
||||
mst.setPlan_qty(row.getBigDecimal("plan_qty"));
|
||||
mst.setQuality_scode(row.getString("quality_scode"));
|
||||
mst.setBase_unit_id(row.getString("base_unit_id"));
|
||||
mst.setQty_unit_id(row.getString("base_unit_id"));
|
||||
mst.setBase_bill_code(row.getString("base_bill_code"));
|
||||
mst.setBase_unit_name(row.getString("base_unit_name"));
|
||||
mst.setQty_unit_name(row.getString("base_unit_name"));
|
||||
mst.setUnit_weight(row.getBigDecimal("unit_weight"));
|
||||
mst.setStoragevehicle_code(row.getString("storagevehicle_code"));
|
||||
mst.setStoragevehicle_id(row.getString("storagevehicle_id"));
|
||||
@@ -153,11 +153,12 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
||||
.pcsn(mst.getPcsn())
|
||||
.ivt_level(mst.getIvt_level())
|
||||
.is_active(mst.getIs_active())
|
||||
.qty_unit_id(mst.getBase_unit_id())
|
||||
.qty_unit_id(mst.getQty_unit_id())
|
||||
.instorage_time(DateUtil.now())
|
||||
.stor_id(mst.getStor_id())
|
||||
.canuse_qty(mst.getPlan_qty())
|
||||
.workshop_id(mst.getWorkshop_id())
|
||||
.unit_weight(mst.getUnit_weight())
|
||||
.build()
|
||||
);
|
||||
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
package org.nl.wms.storage_manage.semimanage.service.structIvt;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.structIvt.dto.StructIvtYLQuery;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.StIvtStructivtBcp;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dto.StructIvtBcpQuery;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -21,4 +26,14 @@ public interface IStIvtStructivtBcpService extends IService<StIvtStructivtBcp> {
|
||||
|
||||
void updateCashByParam(CHANGE_BILL_TYPE_ENUM event, BigDecimal plan_qty,String struct_code);
|
||||
|
||||
/**
|
||||
* 分页查询可用的原料库存
|
||||
*
|
||||
* @param query,page /
|
||||
* @return JSONObject
|
||||
*/
|
||||
Object getBcpIvt(StructIvtBcpQuery query, PageQuery page);
|
||||
|
||||
List<Map> getBcpIvtInfo(JSONObject jo);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package org.nl.wms.storage_manage.semimanage.service.structIvt.dao.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.StIvtStructivtBcp;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.StIvtStructivtBcp;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dto.StructIvtBcpQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -19,5 +22,9 @@ public interface StIvtStructivtBcpMapper extends BaseMapper<StIvtStructivtBcp> {
|
||||
|
||||
int batchUpdateByParam(@Param("event") List<Map> event, @Param("struct_code")String struct_code);
|
||||
|
||||
List<Map> getBcpIvt(@Param("query") StructIvtBcpQuery query, @Param("pageQuery") PageQuery pageQuery);
|
||||
|
||||
List<Map> getBcpIvtInfo(@Param("map") JSONObject map);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,4 +19,69 @@
|
||||
where struct_code = #{struct_code}
|
||||
</update>
|
||||
|
||||
<select id="getBcpIvt" resultType="java.util.Map">
|
||||
SELECT
|
||||
ivt.*,
|
||||
mu.unit_name AS qty_unit_name,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
sa.sect_id,
|
||||
sa.sect_code,
|
||||
sa.sect_name,
|
||||
sa.struct_id,
|
||||
sa.struct_code,
|
||||
sa.struct_name,
|
||||
sa.storagevehicle_code
|
||||
FROM
|
||||
st_ivt_structivt_bcp ivt
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt.material_id
|
||||
LEFT JOIN st_ivt_structattr sa ON sa.struct_id = ivt.struct_id
|
||||
LEFT JOIN md_pb_measureunit mu ON mu.measure_unit_id = ivt.qty_unit_id
|
||||
<where>
|
||||
ivt.canuse_qty > 0
|
||||
AND
|
||||
sa.lock_type = '0'
|
||||
<if test="query.material_search != null and query.material_search != ''">
|
||||
and (mb.material_code = #{query.material_search} OR mb.material_name = #{query.material_search})
|
||||
</if>
|
||||
<if test="query.sect_id != null and query.sect_id != ''">
|
||||
and sa.sect_id = #{query.sect_id}
|
||||
</if>
|
||||
<if test="query.struct_search != null and query.struct_search != ''">
|
||||
and (sa.struct_code = #{query.struct_search} OR sa.struct_name = #{query.struct_search})
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getBcpIvtInfo" resultType="java.util.Map">
|
||||
SELECT
|
||||
ivt.*,
|
||||
mu.unit_name AS qty_unit_name,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
sa.sect_id,
|
||||
sa.sect_code,
|
||||
sa.sect_name,
|
||||
sa.struct_id,
|
||||
sa.struct_code,
|
||||
sa.struct_name,
|
||||
sa.storagevehicle_code
|
||||
FROM
|
||||
st_ivt_structivt_bcp ivt
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt.material_id
|
||||
LEFT JOIN st_ivt_structattr sa ON sa.struct_id = ivt.struct_id
|
||||
LEFT JOIN md_pb_measureunit mu ON mu.measure_unit_id = ivt.qty_unit_id
|
||||
<where>
|
||||
ivt.canuse_qty > 0
|
||||
AND
|
||||
sa.lock_type = '0'
|
||||
<if test="map.material_id != null and map.material_id != ''">
|
||||
and #{map.material_id} = ivt.material_id
|
||||
</if>
|
||||
<if test="map.stor_id != null and map.stor_id != ''">
|
||||
and ivt.stor_id = #{map.stor_id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.nl.wms.storage_manage.semimanage.service.structIvt.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.common.domain.query.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.StIvtStructivtBcp;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/4 19:49
|
||||
*/
|
||||
@Data
|
||||
public class StructIvtBcpQuery extends BaseQuery<StIvtStructivtBcp> {
|
||||
|
||||
|
||||
private String sect_id;
|
||||
|
||||
private String struct_search;
|
||||
|
||||
private String material_search;
|
||||
|
||||
private Boolean is_delete = false;
|
||||
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("material_search", QParam.builder().k(new String[]{"material_search"}).type(QueryTEnum.LK).build());
|
||||
super.doP.put("struct_search", QParam.builder().k(new String[]{"struct_search"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,15 +1,19 @@
|
||||
package org.nl.wms.storage_manage.semimanage.service.structIvt.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtStructattrService;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtStructattr;
|
||||
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.IStIvtStructivtBcpService;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.StIvtStructivtBcp;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.mapper.StIvtStructivtBcpMapper;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.IStIvtStructivtBcpService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dto.StructIvtBcpQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -33,29 +37,43 @@ public class StIvtStructivtBcpServiceImpl extends ServiceImpl<StIvtStructivtBcpM
|
||||
@Autowired
|
||||
private IStIvtStructattrService structattrService;
|
||||
|
||||
@Override
|
||||
public List<Map> getBcpIvtInfo(JSONObject jo) {
|
||||
return this.baseMapper.getBcpIvtInfo(jo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getBcpIvt(StructIvtBcpQuery query, PageQuery pageQuery) {
|
||||
com.github.pagehelper.Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
List<Map> mst_detail = this.baseMapper.getBcpIvt(query, pageQuery);
|
||||
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StIvtStructivtBcp> allocationRules(Integer num) {
|
||||
QueryWrapper<StIvtStructivtBcp> query = new QueryWrapper<StIvtStructivtBcp>()
|
||||
.eq("is_active", true)
|
||||
.isNull("material_id");
|
||||
Page<StIvtStructivtBcp> page = this.page(new Page<>(0, 3), query);
|
||||
List<StIvtStructivtBcp> records = page.getRecords();
|
||||
List<StIvtStructivtBcp> records = page.getRecords();
|
||||
return records;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCashByParam(CHANGE_BILL_TYPE_ENUM event, BigDecimal plan_qty, String struct_code) {
|
||||
if (!StringUtils.isEmpty(struct_code)){
|
||||
if (!StringUtils.isEmpty(struct_code)) {
|
||||
Map<String, Boolean> fieldRelation = event.getFieldRelation();
|
||||
ArrayList<Map> list = new ArrayList<>();
|
||||
for (Map.Entry<String, Boolean> entry : fieldRelation.entrySet()) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("field",entry.getKey());
|
||||
map.put("value",plan_qty);
|
||||
map.put("add",entry.getValue());
|
||||
map.put("field", entry.getKey());
|
||||
map.put("value", plan_qty);
|
||||
map.put("add", entry.getValue());
|
||||
list.add(map);
|
||||
}
|
||||
this.baseMapper.batchUpdateByParam(list,struct_code);
|
||||
this.baseMapper.batchUpdateByParam(list, struct_code);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
mes/qd/src/assets/icons/svg/拼托.svg
Normal file
1
mes/qd/src/assets/icons/svg/拼托.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1685428713417" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1574" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M475.2 127c60.089 0 108.8 48.711 108.8 108.8v276.4c0 60.089-48.711 108.8-108.8 108.8H198.8C138.711 621 90 572.289 90 512.2V235.8C90 175.711 138.711 127 198.8 127h276.4z m0 64H460v85c0 17.673-14.327 32-32 32H246c-17.673 0-32-14.327-32-32v-85h-15.2c-24.742 0-44.8 20.058-44.8 44.8v276.4c0 24.742 20.058 44.8 44.8 44.8h276.4c24.742 0 44.8-20.058 44.8-44.8V235.8c0-24.742-20.058-44.8-44.8-44.8z m-79.2 0H278v53h118v-53z m426 59c0-28.146-33.72-42.582-54.087-23.155l-130 124c-13.217 12.607-13.217 33.703 0 46.31l130 124C788.28 540.582 822 526.146 822 498v-34h104c17.496 0 31.713-14.042 31.996-31.47L958 432V316c0-17.673-14.327-32-32-32H822v-34z m-63.035 73.825l0.09 0.356C762.67 337.891 775.155 348 790 348h104v52H790c-14.845 0-27.33 10.11-30.945 23.819l-0.09 0.355L706.363 374l52.602-50.175zM926.5 665.5c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32h-62v104h63c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32h-830c-17.673 0-32-14.327-32-32 0-17.673 14.327-32 32-32h62v-104h-63c-17.673 0-32-14.327-32-32 0-17.673 14.327-32 32-32h830z m-553 64h-150v104h150v-104z m213 0h-149v104h149v-104z m214 0h-150v104h150v-104z" fill="#515151" p-id="1575"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -161,7 +161,8 @@
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="plan_qty" label="总数量" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="base_unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="unit_weight" label="单重" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="storagevehicle_code" label="载具号" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="point_code" label="入库点" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="struct_code" label="分配货位" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
@@ -257,7 +258,7 @@ export default {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
canUd(row) {
|
||||
return row.bill_status == '1002'
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
|
||||
@@ -0,0 +1,485 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
fullscreen
|
||||
width="1200px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:loading="crud.cu === 2"
|
||||
type="primary"
|
||||
@click="crud.submitCU"
|
||||
>保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form
|
||||
ref="form"
|
||||
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
||||
:inline="true"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
size="mini"
|
||||
label-width="85px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model.trim="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">仓 库:</label>
|
||||
<el-select
|
||||
v-model="form.stor_id"
|
||||
clearable
|
||||
placeholder="仓库"
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="损溢类型" prop="mol_type">
|
||||
<el-select
|
||||
v-model="form.mol_type"
|
||||
style="width: 210px"
|
||||
clearable
|
||||
class="filter-item"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="typeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_MOL_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="货位" prop="struct_code">
|
||||
<label slot="label">货 位:</label>
|
||||
<el-input v-model.trim="form.struct_code" style="width: 210px" disabled placeholder="选择货位">
|
||||
<el-button v-show="crud.status.view <= 0" slot="append" icon="el-icon-plus" @click="queryStruct()"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model.trim="form.dtl_num" size="mini" disabled style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input
|
||||
v-model.trim="form.remark"
|
||||
style="width: 380px;"
|
||||
rows="2"
|
||||
type="textarea"
|
||||
:disabled="crud.status.view > 0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left"/>
|
||||
<!--<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
:disabled="crud.status.view > 0"
|
||||
@click="resetTable()"
|
||||
>
|
||||
重置表格
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="mater_btn"
|
||||
@click="insertdtl()"
|
||||
>
|
||||
新增一行
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="material_code" label="物料编码" align="center" min-width="200" show-overflow-tooltip>
|
||||
<template scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.material_code" disabled class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryMater(scope.$index, scope.row)"/>
|
||||
</el-input>
|
||||
<span v-show="scope.row.edit">{{ scope.row.material_code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_name" label="物料名称" align="center" min-width="200" show-overflow-tooltip/>
|
||||
<el-table-column v-if="!crud.status.view > 0" prop="ivt_qty" label="库存重量" align="center"
|
||||
:formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="mol_qty" width="220" label="损溢重量" align="center">
|
||||
<template scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.mol_qty"
|
||||
:disabled="scope.row.edit"
|
||||
:precision="3"
|
||||
:controls="false"
|
||||
:min="0"
|
||||
style="width: 120px"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center"/>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="190" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, form.tableData)"
|
||||
/>
|
||||
<el-button
|
||||
v-show="!scope.row.edit"
|
||||
type="primary"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.$index, scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="scope.row.edit"
|
||||
type="success"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-check"
|
||||
@click="handleEdit(scope.$index, scope.row)"
|
||||
>完成
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<MaterDtl :dialog-show.sync="materShow" @setMaterValue="tableChanged2"/>
|
||||
<StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="tableChanged"/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import BucketDialog from '@/views/wms/storage_manage/rawproduct/rawproductmoreOrless/NewBucketDialog'
|
||||
import CRUD, {crud, form} from '@crud/crud'
|
||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import crudMoreOrless from '@/views/wms/storage_manage/rawproduct/rawproductmoreOrless/moreorless'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import StructDiv from '@/views/wms/storage_manage/rawproduct/rawproductmoreOrless/StructDiv'
|
||||
|
||||
const defaultForm = {
|
||||
mol_id: '',
|
||||
mol_code: '',
|
||||
mol_type: '',
|
||||
stor_id: '',
|
||||
total_qty: '0',
|
||||
dtl_num: '0',
|
||||
bill_type: '',
|
||||
remark: '',
|
||||
struct_id: '',
|
||||
sect_id: '',
|
||||
sect_name: '',
|
||||
struct_code: '',
|
||||
struct_name: '',
|
||||
tableData: []
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: {crudOperation, MaterDtl, StructDiv, BucketDialog},
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_used', 'ST_MOL_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bussConfig: {
|
||||
type: Object
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
bucketShow: false,
|
||||
structShow: false,
|
||||
materType: '',
|
||||
mater_btn: true,
|
||||
storlist: [],
|
||||
rules: {
|
||||
stor_id: [
|
||||
{required: true, message: '仓库不能为空', trigger: 'blur'}
|
||||
],
|
||||
bill_type: [
|
||||
{required: true, message: '业务类型不能为空', trigger: 'blur'}
|
||||
],
|
||||
biz_date: [
|
||||
{required: true, message: '业务日期不能为空', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
// 查询原材料库的仓库
|
||||
crudStorattr.getStor({'stor_type': '3'}).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
// 获取入库单明细
|
||||
crudMoreOrless.getMlDtl({'mol_id': this.form.mol_id}).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
this.$set(row, 'edit', false)
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
this.mater_btn = true
|
||||
crudMoreOrless.getMlDtl({ 'mol_id': this.form.mol_id }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
this.$set(row, 'edit', true)
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
if (!this.form.tableData[i].edit) {
|
||||
this.crud.notify('尚有未完成编辑的物料明细序号' + (i + 1) + ',请检查!')
|
||||
return false
|
||||
}
|
||||
const vehicle_code = this.form.tableData[i].storagevehicle_code
|
||||
const same = this.form.tableData.some(mater => mater.storagevehicle_code !== vehicle_code)
|
||||
if (same) {
|
||||
this.crud.notify('存在不同载具号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
billTypeChange(val) {
|
||||
this.form.tableData = []
|
||||
this.form.total_qty = 0
|
||||
this.form.dtl_num = 0
|
||||
},
|
||||
resetTable() {
|
||||
if (!this.form.struct_id) {
|
||||
this.crud.notify('请先选择货物!')
|
||||
return false
|
||||
}
|
||||
if (this.crud.status.add > 0) {
|
||||
crudMoreOrless.getStructIvt({'struct_id': this.form.struct_id}).then(res => {
|
||||
this.form.tableData = res
|
||||
this.form.dtl_num = this.form.tableData.length
|
||||
})
|
||||
}
|
||||
if (this.crud.status.edit > 0) {
|
||||
crudMoreOrless.queryMolDtl({'mol_id': this.form.mol_id, 'struct_id': this.form.struct_id}).then(res => {
|
||||
this.form.tableData = res
|
||||
this.form.dtl_num = this.form.tableData.length
|
||||
})
|
||||
}
|
||||
},
|
||||
tableChanged2(row) {
|
||||
// 新增一行物料时,给行进行赋值
|
||||
this.$set(this.nowrow, 'material_code', row.material_code)
|
||||
this.$set(this.nowrow, 'material_id', row.material_id)
|
||||
this.$set(this.nowrow, 'material_name', row.material_name)
|
||||
this.$set(this.nowrow, 'qty_unit_id', row.base_unit_id)
|
||||
this.$set(this.nowrow, 'qty_unit_name', row.base_unit_name)
|
||||
this.$set(this.nowrow, 'struct_id', this.form.struct_id)
|
||||
this.$set(this.nowrow, 'struct_code', this.form.struct_code)
|
||||
this.$set(this.nowrow, 'sect_id', this.form.sect_id)
|
||||
this.$set(this.nowrow, 'sect_name', this.form.sect_name)
|
||||
this.$set(this.nowrow, 'struct_name', this.form.struct_name)
|
||||
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||
},
|
||||
tableChanged(row) {
|
||||
this.form.struct_id = row.struct_id
|
||||
this.form.struct_code = row.struct_code
|
||||
this.form.sect_id = row.sect_id
|
||||
this.form.sect_name = row.sect_name
|
||||
this.form.struct_name = row.struct_name
|
||||
crudMoreOrless.getStructIvt({'struct_id': row.struct_id}).then(res => {
|
||||
this.form.tableData = res
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
this.$set(row, 'edit', false)
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
this.form.dtl_num = this.form.tableData.length
|
||||
})
|
||||
},
|
||||
|
||||
async queryMater(index, row) {
|
||||
this.materShow = true
|
||||
this.nowindex = index
|
||||
this.nowrow = row
|
||||
},
|
||||
async queryStruct() {
|
||||
if (!this.form.mol_type) {
|
||||
this.crud.notify('请先选择损溢类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.structShow = true
|
||||
this.$refs.child.getMsg(this.form.mol_type)
|
||||
},
|
||||
async queryBucket(index, row) {
|
||||
this.bucketShow = true
|
||||
this.nowindex = index
|
||||
this.nowrow = row
|
||||
},
|
||||
async insertdtl() {
|
||||
this.form.tableData.push({
|
||||
quality_scode: '02',
|
||||
ivt_qty: 0,
|
||||
mol_qty: 0,
|
||||
is_active: '1',
|
||||
ivt_level: '01',
|
||||
edit: false,
|
||||
is_add: true
|
||||
})
|
||||
this.form.dtl_num = this.form.tableData.length
|
||||
},
|
||||
typeChange(val) {
|
||||
if (val === '1') {
|
||||
this.mater_btn = false
|
||||
} else {
|
||||
this.mater_btn = true
|
||||
}
|
||||
this.form.tableData = []
|
||||
this.form.struct_id = ''
|
||||
this.form.struct_code = ''
|
||||
this.form.sect_id = ''
|
||||
this.form.sect_name = ''
|
||||
this.form.struct_name = ''
|
||||
},
|
||||
handleEdit(index, row) {
|
||||
if (!row.edit) {
|
||||
if (typeof (row.mol_qty) === 'undefined' | (parseFloat(row.mol_qty) <= 0)) {
|
||||
this.crud.notify('不允许损溢数量为0!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!row.material_id) {
|
||||
this.crud.notify('物料不可为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (this.form.mol_type === '0' && (parseFloat(row.ivt_qty) < parseFloat(row.mol_qty))) {
|
||||
this.crud.notify('不允许损数量大于库存数量!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
// 修改行的编辑状态
|
||||
row.edit = !row.edit
|
||||
this.form.tableData.splice(index, 1, row) // 通过splice 替换数据 触发视图更新
|
||||
if (row.edit) {
|
||||
this.form.total_qty = 0
|
||||
this.form.tableData.forEach((item) => {
|
||||
this.form.total_qty = this.form.total_qty + item.mol_qty
|
||||
})
|
||||
}
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].mol_qty)
|
||||
rows.splice(index, 1)
|
||||
this.form.dtl_num = this.form.tableData.length
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,365 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="拼盘单新增"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-input v-show="false" v-model="form.stor_code" placeholder="仓库编码" />
|
||||
<el-input v-show="false" v-model="form.stor_name" placeholder="仓库名称" />
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model.trim="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">仓 库:</label>
|
||||
<el-select
|
||||
v-model="form.stor_id"
|
||||
clearable
|
||||
placeholder="仓库"
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="storChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bill_type">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
clearable
|
||||
placeholder="业务类型"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_TYPE_SF"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="bill_status">
|
||||
<el-select
|
||||
v-model="form.bill_status"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.SHUTFRAME_BILL_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model.trim="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料" prop="material_code">
|
||||
<label slot="label">物 料:</label>
|
||||
<el-input v-model.trim="form.material_code" style="width: 210px" disabled class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryMater" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model.trim="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">拼盘明细</span>
|
||||
</div>
|
||||
<el-table
|
||||
v-if="crud.status.cu <= 0"
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="100" align="center" />
|
||||
<el-table-column prop="material_name" label="物料名称" align="center" min-width="120" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" width="110px" />
|
||||
<el-table-column show-overflow-tooltip prop="turnout_struct_code" label="移出货位" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="移出载具号" width="90" />
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="移出重量" width="120" align="center" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="qty_unit_name" label="重量单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="turnin_struct_code" label="移入货位" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code_in" label="移入载具号" width="90" />
|
||||
<el-table-column prop="quality_scode" label="品质类型" align="center" width="110px" :formatter="quality_scodeFormat" />
|
||||
<el-table-column prop="ivt_level" label="库存等级" align="center" width="100px" :formatter="ivt_levelFormat" />
|
||||
<el-table-column prop="is_active" label="是否可用" align="center" width="110px" :formatter="is_activeFormat" />
|
||||
</el-table>
|
||||
<el-row v-if="crud.status.cu > 0" :gutter="2">
|
||||
<el-col :span="12">
|
||||
<el-table
|
||||
ref="table1"
|
||||
:data="tableData1"
|
||||
style="width: 100%;"
|
||||
max-height="320"
|
||||
:highlight-current-row="true"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" :formatter="crud.formatNum3" label="数量" width="80px" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" width="70px" sortable />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" width="85px" />
|
||||
<el-table-column show-overflow-tooltip prop="unit_weight" label="单重" width="85px" />
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button type="danger" class="filter-item" icon="el-icon-right" @click.native.prevent="deleteRow1(scope.$index, tableData1)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
:highlight-current-row="true"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" fixed="left">
|
||||
<template scope="scope">
|
||||
<el-button type="danger" class="filter-item" icon="el-icon-back" @click.native.prevent="deleteRow(scope.$index, form.tableData)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="150px" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" width="110px" />
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="数量(个)" width="110px" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
|
||||
<el-table-column show-overflow-tooltip prop="unit_weight" label="单重" width="85px" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<MaterDialog :dialog-show.sync="materShow" @setMaterValue="tableChanged" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import shutframe from '@/views/wms/storage_manage/semiproduct/semiproductShutFrame/shutframe'
|
||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||
|
||||
const defaultForm = {
|
||||
bill_code: '',
|
||||
stor_id: '',
|
||||
stor_code: '',
|
||||
stor_name: '',
|
||||
bill_status: '10',
|
||||
total_qty: '0',
|
||||
detail_count: '0',
|
||||
bill_type: '51',
|
||||
remark: '',
|
||||
biz_date: '',
|
||||
create_mode: '',
|
||||
material_code: '',
|
||||
tableData: []
|
||||
}
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { MaterDialog },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
dicts: ['SHUTFRAME_BILL_STATUS', 'ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_usable', 'ST_INV_TYPE_SF'],
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
hasButtonTexts: true,
|
||||
storlist: [],
|
||||
tableData1: [],
|
||||
rules: {
|
||||
stor_id: [
|
||||
{ required: true, message: '仓库不能为空', trigger: 'blur' }
|
||||
],
|
||||
bill_type: [
|
||||
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
biz_date: [
|
||||
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
// 查询原材料库的仓库
|
||||
crudStorattr.getStor({ 'stor_type': '2' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.tableData1 = []
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
shutframe.getOutBillDtl({ 'shutframeinv_id': this.form.shutframeinv_id }).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
shutframe.getOutBillDtl2({ 'shutframeinv_id': this.form.shutframeinv_id }).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
quality_scodeFormat(row) {
|
||||
return this.dict.label.ST_QUALITY_SCODE[row.quality_scode]
|
||||
},
|
||||
ivt_levelFormat(row) {
|
||||
return this.dict.label.ST_IVT_LEVEL[row.ivt_level]
|
||||
},
|
||||
is_activeFormat(row) {
|
||||
return this.dict.label.is_usable[row.is_active]
|
||||
},
|
||||
storChange(row) {
|
||||
this.storlist.forEach((item) => {
|
||||
if (item.stor_id === row) {
|
||||
this.form.stor_code = item.stor_code
|
||||
this.form.stor_name = item.stor_name
|
||||
}
|
||||
})
|
||||
},
|
||||
async queryMater() {
|
||||
if (this.form.stor_id === '') {
|
||||
this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
this.materShow = true
|
||||
},
|
||||
tableChanged(row) {
|
||||
debugger
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_id = row.material_id
|
||||
this.tableData1 = []
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
|
||||
shutframe.getBcpIvtInfo({ 'material_id': row.material_id, 'stor_id': this.form.stor_id }).then(res => {
|
||||
this.tableData1 = res
|
||||
this.right_flag = false
|
||||
})
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
debugger
|
||||
const row = this.form.tableData[index]
|
||||
const nowList = []
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
debugger
|
||||
if (this.form.tableData[i].storagevehicle_code === row.storagevehicle_code) {
|
||||
this.tableData1.push(this.form.tableData[i])
|
||||
} else {
|
||||
nowList.push(this.form.tableData[i])
|
||||
}
|
||||
}
|
||||
this.form.tableData = nowList
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
deleteRow1(index, rows) {
|
||||
debugger
|
||||
const tablemap = new Map()
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
tablemap.set(this.form.tableData[i].storagevehicle_code, this.form.tableData[i].storagevehicle_code)
|
||||
}
|
||||
const row = this.tableData1[index]
|
||||
tablemap.set(row.storagevehicle_code, row.storagevehicle_code)
|
||||
if (tablemap.size > 2) {
|
||||
this.crud.notify('拼盘明细最多只能有两个载具!')
|
||||
return false
|
||||
}
|
||||
const nowList = []
|
||||
for (let i = 0; i < this.tableData1.length; i++) {
|
||||
if (this.tableData1[i].storagevehicle_code === row.storagevehicle_code) {
|
||||
this.form.tableData.push(this.tableData1[i])
|
||||
} else {
|
||||
nowList.push(this.tableData1[i])
|
||||
}
|
||||
}
|
||||
this.tableData1 = nowList
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
const tablemap = new Map()
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
tablemap.set(this.form.tableData[i].storagevehicle_code, this.form.tableData[i].storagevehicle_code)
|
||||
}
|
||||
if (tablemap.size !== 2) {
|
||||
this.crud.notify('拼盘明细必须有两个载具!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,300 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="单据号">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="拼盘单号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料查询">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属仓库">
|
||||
<el-select
|
||||
v-model="query.stor_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.SHUTFRAME_BILL_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="业务类型">
|
||||
<el-select
|
||||
v-model="query.bill_type"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="业务类型"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_TYPE_SF"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车间">
|
||||
<el-select
|
||||
v-model="query.workshop_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="work_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="taskOpen"
|
||||
>
|
||||
任务下发
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
:max-height="590"
|
||||
:highlight-current-row="true"
|
||||
size="mini"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="160"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:disabled-edit="canUd(scope.row)"
|
||||
:disabled-dle="canUd(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column prop="bill_code" min-width="140" label="订单编码">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :formatter="stateFormat" min-width="100" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" min-width="100" />
|
||||
<el-table-column prop="bill_type" :formatter="bill_typeFormat" min-width="100" label="业务类型" />
|
||||
<el-table-column min-width="135" prop="biz_date" label="业务日期" />
|
||||
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" min-width="100" />
|
||||
<el-table-column label="制单人" align="center" prop="input_optname" min-width="100" />
|
||||
<el-table-column prop="input_time" min-width="135" label="制单时间" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import shutframe from '@/views/wms/storage_manage/semiproduct/semiproductShutFrame/shutframe'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/storage_manage/semiproduct/semiproductShutFrame/AddDialog'
|
||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||
|
||||
export default {
|
||||
name: 'ShutFrame',
|
||||
components: { AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '拼盘',
|
||||
props: {
|
||||
// 每页数据条数
|
||||
size: 20
|
||||
},
|
||||
idField: 'shutframeinv_id', url: 'api/shutframe', crudMethod: { ...shutframe },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
reset: true,
|
||||
download: false
|
||||
}})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['SHUTFRAME_BILL_STATUS', 'ST_CREATE_MODE', 'ST_INV_TYPE_SF', 'product_area'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
work_flag: true,
|
||||
mstrow: {},
|
||||
currentRow: null,
|
||||
storlist: []
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudStorattr.getStor({ 'stor_type': '2' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.crud.query.busi_classs_code = '02'
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
stateFormat(row) {
|
||||
return this.dict.label.SHUTFRAME_BILL_STATUS[row.bill_status]
|
||||
},
|
||||
bill_typeFormat(row) {
|
||||
return this.dict.label.ST_INV_TYPE_SF[row.bill_type]
|
||||
},
|
||||
create_modeFormat(row) {
|
||||
return this.dict.label.ST_CREATE_MODE[row.create_mode]
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
this.buttonChange(row)
|
||||
} else if (val.length === 1) {
|
||||
this.buttonChange(row)
|
||||
}else{
|
||||
this.handleCurrentChange(null)
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
buttonChange(current) {
|
||||
if (current !== null) {
|
||||
this.currentRow = current
|
||||
if (current.bill_status === '10') {
|
||||
this.work_flag = false
|
||||
} else {
|
||||
this.work_flag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
handleCurrentChange(current) {
|
||||
if (current === null) {
|
||||
this.work_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
},
|
||||
taskOpen() {
|
||||
shutframe.handdown({ 'shutframeinv_id': this.currentRow.shutframeinv_id }).then(res => {
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
checkboxT(row) {
|
||||
return row.bill_status !== '99'
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
this.handleCurrentChange(null)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,110 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/shutframe',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/shutframe/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/shutframe',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getOutBillDtl(params) {
|
||||
return request({
|
||||
url: '/api/shutframe/getOutBillDtl',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function getOutBillDtl2(params) {
|
||||
return request({
|
||||
url: '/api/shutframe/getOutBillDtl2',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function getInvTypes() {
|
||||
return request({
|
||||
url: '/api/shutframe/getInvTypes',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function insertDtl(data) {
|
||||
return request({
|
||||
url: '/api/shutframe/insertDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getBcpIvtInfo(data) {
|
||||
return request({
|
||||
url: '/api/bcp/getBcpIvtInfo',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getStructIvt2(params) {
|
||||
return request({
|
||||
url: '/api/shutframe/getStructIvt2',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function getStruct(params) {
|
||||
return request({
|
||||
url: '/api/shutframe/getStruct',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function handdown(data) {
|
||||
return request({
|
||||
url: '/api/shutframe/handdown',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getOutBillTask(params) {
|
||||
return request({
|
||||
url: '/api/shutframe/getOutBillTask',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function issueTask(data) {
|
||||
return request({
|
||||
url: '/api/shutframe/issueTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function finishTask(data) {
|
||||
return request({
|
||||
url: '/api/shutframe/finishTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function allCancel(data) {
|
||||
return request({
|
||||
url: '/api/shutframe/allCancel',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, getOutBillDtl, allCancel, getBcpIvtInfo, getOutBillTask, finishTask, issueTask, getInvTypes, handdown, getOutBillDtl2, getStructIvt2, getStruct }
|
||||
@@ -11,23 +11,26 @@
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
<span/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary"
|
||||
@click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true"
|
||||
:model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px"
|
||||
value-format="yyyy-MM-dd" :disabled="crud.status.view > 0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">所属仓库:</label>
|
||||
@@ -99,7 +102,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
@@ -113,7 +116,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea"
|
||||
:disabled="crud.status.view > 0"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -121,7 +125,7 @@
|
||||
<div v-show="crud.status.add === 1" class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<slot name="left"/>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
@@ -130,7 +134,7 @@
|
||||
size="mini"
|
||||
@click="insertEvent()"
|
||||
>
|
||||
添加物料
|
||||
添加库存物料
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
@@ -143,58 +147,14 @@
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_code" label="订单号">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="form.tableData[scope.$index].base_bill_code"
|
||||
clearable
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
size="small"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="form.tableData[scope.$index].plan_qty"
|
||||
size="small"
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
precision="3"
|
||||
:min="0"
|
||||
@change="changeQty"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="unit_weight" label="单重">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="form.tableData[scope.$index].unit_weight"
|
||||
size="small"
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
precision="3"
|
||||
:min="0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="form.tableData[scope.$index].storagevehicle_code"
|
||||
clearable
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
size="small"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称"/>
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="数量"/>
|
||||
<el-table-column show-overflow-tooltip prop="unit_weight" label="单重"/>
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号"/>
|
||||
<el-table-column v-if="crud.status.add === 1" align="center" label="操作" width="170" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
@@ -212,16 +172,16 @@
|
||||
:dialog-show.sync="materShow"
|
||||
:is-single="false"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="tableChanged"
|
||||
@tableChanged="tableChanged"
|
||||
/>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import CRUD, {crud, form} from '@crud/crud'
|
||||
import crudsemiproductIn from '@/views/wms/storage_manage/semiproduct/semiproductIn/semiproductIn'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import MaterDtl from '@/views/wms/storage_manage/semiproduct/semiproductout/StructIvt'
|
||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -239,11 +199,11 @@ const defaultForm = {
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { MaterDtl },
|
||||
components: {MaterDtl},
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_QUALITY_SCODE', 'ST_INV_OUT_TYPE', 'product_area'],
|
||||
cruds() {
|
||||
return CRUD({ title: '入库新增', crudMethod: { ...crudsemiproductIn }})
|
||||
return CRUD({title: '入库新增', crudMethod: {...crudsemiproductIn}})
|
||||
},
|
||||
props: {
|
||||
dialogShow: {
|
||||
@@ -265,13 +225,19 @@ export default {
|
||||
billtypelist: [],
|
||||
rules: {
|
||||
product_code: [
|
||||
{ required: true, message: '生产车间不能为空', trigger: 'blur' }
|
||||
{ required: true, message: '生产车间不能为空', trigger: 'blur'}
|
||||
],
|
||||
bill_type: [
|
||||
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
|
||||
{ required: true, message: '业务类型不能为空', trigger: 'blur'}
|
||||
],
|
||||
biz_date: [
|
||||
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
|
||||
{ required: true, message: '业务日期不能为空', trigger: 'blur'}
|
||||
],
|
||||
stor_id: [
|
||||
{ required: true, message: '所属仓库不能为空', trigger: 'blur'}
|
||||
],
|
||||
point_code: [
|
||||
{ required: true, message: '出库点不能为空', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -285,7 +251,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudStorattr.getStor({ 'stor_type': '2' }).then(res => {
|
||||
crudStorattr.getStor({'stor_type': '2'}).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
@@ -294,7 +260,7 @@ export default {
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
// 获取入库单明细
|
||||
crudsemiproductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||
crudsemiproductIn.getIODtl({'iostorinv_id': this.form.iostorinv_id}).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
@@ -304,7 +270,7 @@ export default {
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
crudsemiproductIn.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||
crudsemiproductIn.getIODtl({'bill_code': this.form.bill_code}).then(res => {
|
||||
this.form.tableData = res.content
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
@@ -320,34 +286,6 @@ export default {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
if (!row.base_bill_code) {
|
||||
this.crud.notify('订单号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!row.plan_qty) {
|
||||
this.crud.notify('数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!this.form.stor_id) {
|
||||
this.crud.notify('所属仓库不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!this.form.point_code) {
|
||||
this.crud.notify('入库点不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!row.storagevehicle_code) {
|
||||
this.crud.notify('载具不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!row.unit_weight) {
|
||||
this.crud.notify('单重不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
const material_code = rows[index].material_code
|
||||
@@ -369,7 +307,7 @@ export default {
|
||||
rows.forEach((item) => {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((row) => {
|
||||
if (row.material_code === item.material_code) {
|
||||
if (row.material_code === item.material_code && row.struct_code === item.struct_code) {
|
||||
same_mater = false
|
||||
}
|
||||
})
|
||||
@@ -377,7 +315,7 @@ export default {
|
||||
item.quality_scode = '01'
|
||||
item.ivt_level = '01'
|
||||
item.is_active = '1'
|
||||
item.plan_qty = '1'
|
||||
item.plan_qty = item.canuse_qty
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
<!--suppress ALL -->
|
||||
<template>
|
||||
<el-dialog
|
||||
title="库存选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1200px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="库区/货位">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="库区/货位"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料">
|
||||
<el-input
|
||||
v-model="query.material_search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料"
|
||||
style="width: 230px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation/>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column show-overflow-tooltip width="100" prop="sect_code" label="库区"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="struct_name" label="货位"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" width="100" label="物料编号"/>
|
||||
<el-table-column show-overflow-tooltip width="300" prop="material_name" label="物料名称"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="canuse_qty" label="数量(个)"/>
|
||||
<el-table-column show-overflow-tooltip width="100" prop="unit_weight" label="单重"/>
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, {crud, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
||||
|
||||
const start = new Date()
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
components: {crudOperation, rrOperation, pagination, DateRangePicker},
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '半成品可用库存',
|
||||
url: '/api/bcp/getBcpIvt',
|
||||
crudMethod: {},
|
||||
optShow: {
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
rows: [],
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
objectSpanMethod({row, column, rowIndex, columnIndex}) {
|
||||
if (columnIndex === 0) {
|
||||
if (rowIndex % 2 === 0) {
|
||||
return {
|
||||
rowspan: 2,
|
||||
colspan: 1
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
open() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
this.$emit('tableChanged', this.rows)
|
||||
// this.form = this.$options.data().form
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -157,12 +157,11 @@
|
||||
<el-table-column prop="workshop_id" label="生产车间" width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="stor_name" label="仓库" width="130" show-overflow-tooltip />
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" label="业务类型" :formatter="bill_typeFormat" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_code" min-width="120" label="关联单据号" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="plan_qty" label="总数量" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="base_unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="point_code" label="入库点" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="qty_unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="point_code" label="出库点" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="struct_code" label="分配货位" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建人" align="center" prop="create_name" />
|
||||
@@ -257,7 +256,7 @@ export default {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
canUd(row) {
|
||||
return row.bill_status == '1002'
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
@@ -297,7 +296,7 @@ export default {
|
||||
}
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.bill_type[row.bill_type]
|
||||
return this.dict.label.ST_INV_OUT_TYPE[row.bill_type]
|
||||
},
|
||||
toView(row) {
|
||||
this.mstrow = row
|
||||
@@ -314,6 +313,7 @@ export default {
|
||||
}
|
||||
crudsemiproductout.confirm(this.currentRow).then(res => {
|
||||
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.refresh()
|
||||
})
|
||||
},
|
||||
confirmTask() {
|
||||
@@ -323,6 +323,7 @@ export default {
|
||||
}
|
||||
crudsemiproductout.confirmTask(this.currentRow).then(res => {
|
||||
this.crud.notify('单据下发任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.refresh()
|
||||
})
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/create',
|
||||
url: '/api/out/semiproduct/create',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/delete',
|
||||
url: '/api/out/semiproduct/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function del(ids) {
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/update',
|
||||
url: '/api/out/semiproduct/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -26,7 +26,7 @@ export function edit(data) {
|
||||
|
||||
export function getType(params) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/getType',
|
||||
url: '/api/out/semiproduct/getType',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
@@ -34,7 +34,7 @@ export function getType(params) {
|
||||
|
||||
export function getIODtl(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/getIODtl',
|
||||
url: '/api/out/semiproduct/getIODtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -42,7 +42,7 @@ export function getIODtl(data) {
|
||||
|
||||
export function insertDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/insertDtl',
|
||||
url: '/api/out/semiproduct/insertDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -50,7 +50,7 @@ export function insertDtl(data) {
|
||||
|
||||
export function commit(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/commit',
|
||||
url: '/api/out/semiproduct/commit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -58,7 +58,7 @@ export function commit(data) {
|
||||
|
||||
export function checkVehicle(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/checkVehicle',
|
||||
url: '/api/out/semiproduct/checkVehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -66,7 +66,7 @@ export function checkVehicle(data) {
|
||||
|
||||
export function confirmvehicle(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/confirmvehicle',
|
||||
url: '/api/out/semiproduct/confirmvehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -74,7 +74,7 @@ export function confirmvehicle(data) {
|
||||
|
||||
export function getDisDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/getDisDtl',
|
||||
url: '/api/out/semiproduct/getDisDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -82,7 +82,7 @@ export function getDisDtl(data) {
|
||||
|
||||
export function divStruct(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/divStruct',
|
||||
url: '/api/out/semiproduct/divStruct',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -90,7 +90,7 @@ export function divStruct(data) {
|
||||
|
||||
export function unDivStruct(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/unDivStruct',
|
||||
url: '/api/out/semiproduct/unDivStruct',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -98,7 +98,7 @@ export function unDivStruct(data) {
|
||||
|
||||
export function divPoint(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/divPoint',
|
||||
url: '/api/out/semiproduct/divPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -106,7 +106,7 @@ export function divPoint(data) {
|
||||
|
||||
export function bucketDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/bucketDtl',
|
||||
url: '/api/out/semiproduct/bucketDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -114,7 +114,7 @@ export function bucketDtl(data) {
|
||||
|
||||
export function updateTask(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/updateTask',
|
||||
url: '/api/out/semiproduct/updateTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -122,7 +122,7 @@ export function updateTask(data) {
|
||||
|
||||
export function confirmTask(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/confirmTask',
|
||||
url: '/api/out/semiproduct/confirmTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -130,7 +130,7 @@ export function confirmTask(data) {
|
||||
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/confirm',
|
||||
url: '/api/out/semiproduct/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -138,7 +138,7 @@ export function confirm(data) {
|
||||
|
||||
export function delDis(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/delDis',
|
||||
url: '/api/out/semiproduct/delDis',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -146,7 +146,7 @@ export function delDis(data) {
|
||||
|
||||
export function queryBoxMater(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/queryBoxMater',
|
||||
url: '/api/out/semiproduct/queryBoxMater',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -161,7 +161,7 @@ export function queryStor() {
|
||||
|
||||
export function getDisTask(data) {
|
||||
return request({
|
||||
url: '/api/in/semiproductIn/getDisTask',
|
||||
url: '/api/out/semiproduct/getDisTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user