Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -184,7 +184,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
|
||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||
if (hongXiangConveyorDeviceDriver.getDoor() == 1 && hongXiangConveyorDeviceDriver.getAction() == 1 && hongXiangConveyorDeviceDriver.getError1() == 0) {
|
||||
if (hongXiangConveyorDeviceDriver.getMode() == 1 && hongXiangConveyorDeviceDriver.getDoor() == 1 && hongXiangConveyorDeviceDriver.getAction() == 1 && hongXiangConveyorDeviceDriver.getError1() == 0) {
|
||||
this.writing("to_command", "2");
|
||||
this.setNow_steps_type(3);
|
||||
} else {
|
||||
@@ -232,7 +232,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||
if (hongXiangConveyorDeviceDriver.getDoor() == 1 && hongXiangConveyorDeviceDriver.getAction() == 1 && hongXiangConveyorDeviceDriver.getError1() == 0) {
|
||||
if (hongXiangConveyorDeviceDriver.getMode() == 1 && hongXiangConveyorDeviceDriver.getDoor() == 1 && hongXiangConveyorDeviceDriver.getAction() == 1 && hongXiangConveyorDeviceDriver.getError1() == 0) {
|
||||
this.writing("to_command", "4");
|
||||
this.setNow_steps_type(5);
|
||||
} else {
|
||||
|
||||
@@ -453,7 +453,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
this.writing("to_command1", "2");
|
||||
if (type == 1) {
|
||||
this.setNow_steps_type1(3);
|
||||
} else if (type == 2) {
|
||||
} else if (type == 3) {
|
||||
this.setNow_steps_type3(4);
|
||||
}
|
||||
} else {
|
||||
@@ -476,7 +476,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
this.writing("to_command1", "3");
|
||||
if (type == 1) {
|
||||
this.setNow_steps_type1(4);
|
||||
} else if (type == 2) {
|
||||
} else if (type == 3) {
|
||||
this.setNow_steps_type3(7);
|
||||
}
|
||||
} else {
|
||||
@@ -731,6 +731,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
flag = this.executeReadyBusiness(taskDto, getDeviceCodeList, backGetDeviceCodeList);
|
||||
if (flag) {
|
||||
notCreateInstMessage = "";
|
||||
notCreateTaskMessage = "";
|
||||
}
|
||||
} else {
|
||||
notCreateTaskMessage = "";
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
package org.nl.wms.basedata.master.rest;
|
||||
|
||||
|
||||
import org.nl.wms.basedata.master.service.InterfacebackService;
|
||||
import org.nl.wms.basedata.master.service.dto.InterfacebackDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @date 2022-12-09
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "接口回传设置管理")
|
||||
@RequestMapping("/api/interfaceback")
|
||||
@Slf4j
|
||||
public class InterfacebackController {
|
||||
|
||||
private final InterfacebackService interfacebackService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询接口回传设置")
|
||||
@ApiOperation("查询接口回传设置")
|
||||
//@SaCheckPermission("@el.check('interfaceback:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(interfacebackService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增接口回传设置")
|
||||
@ApiOperation("新增接口回传设置")
|
||||
//@SaCheckPermission("@el.check('interfaceback:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody InterfacebackDto dto) {
|
||||
interfacebackService.create(dto);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改接口回传设置")
|
||||
@ApiOperation("修改接口回传设置")
|
||||
//@SaCheckPermission("@el.check('interfaceback:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody InterfacebackDto dto) {
|
||||
interfacebackService.update(dto);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除接口回传设置")
|
||||
@ApiOperation("删除接口回传设置")
|
||||
//@SaCheckPermission("@el.check('interfaceback:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
interfacebackService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
|
||||
package org.nl.wms.basedata.master.service;
|
||||
|
||||
import org.nl.wms.basedata.master.service.dto.InterfacebackDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @description 服务接口
|
||||
* @date 2022-12-09
|
||||
**/
|
||||
public interface InterfacebackService {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
* @param whereJson 条件
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> queryAll(Map whereJson, Pageable page);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
*
|
||||
* @param whereJson 条件参数
|
||||
* @return List<InterfacebackDto>
|
||||
*/
|
||||
List<InterfacebackDto> queryAll(Map whereJson);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
*
|
||||
* @param interface_id ID
|
||||
* @return Interfaceback
|
||||
*/
|
||||
InterfacebackDto findById(Long interface_id);
|
||||
|
||||
/**
|
||||
* 根据编码查询
|
||||
*
|
||||
* @param code code
|
||||
* @return Interfaceback
|
||||
*/
|
||||
InterfacebackDto findByCode(String code);
|
||||
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param dto /
|
||||
*/
|
||||
void create(InterfacebackDto dto);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param dto /
|
||||
*/
|
||||
void update(InterfacebackDto dto);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
*
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.nl.wms.basedata.master.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @description /
|
||||
* @date 2022-12-09
|
||||
**/
|
||||
@Data
|
||||
public class InterfacebackDto implements Serializable {
|
||||
|
||||
/** 标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long interface_id;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String interface_type;
|
||||
|
||||
/**
|
||||
* 接口名称
|
||||
*/
|
||||
private String interface_name;
|
||||
|
||||
/**
|
||||
* 接口描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否回传
|
||||
*/
|
||||
private String is_back;
|
||||
|
||||
/**
|
||||
* 业务说明
|
||||
*/
|
||||
private String business_comment;
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
|
||||
package org.nl.wms.basedata.master.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.wms.basedata.master.service.InterfacebackService;
|
||||
import org.nl.wms.basedata.master.service.dto.InterfacebackDto;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.modules.common.utils.SecurityUtils;
|
||||
import org.nl.modules.wql.core.bean.ResultBean;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @description 服务实现
|
||||
* @date 2022-12-09
|
||||
**/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class InterfacebackServiceImpl implements InterfacebackService {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
String interface_name = MapUtil.getStr(whereJson, "interface_name");
|
||||
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "1");
|
||||
if (ObjectUtil.isNotEmpty(interface_name)) map.put("interface_name","%"+interface_name+"%");
|
||||
|
||||
JSONObject json = WQL.getWO("QMD_PB_INTERFACEBACK").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "interface_type ASC");
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InterfacebackDto> queryAll(Map whereJson) {
|
||||
WQLObject wo = WQLObject.getWQLObject("md_pb_interfaceback");
|
||||
JSONArray arr = wo.query().getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(InterfacebackDto.class);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InterfacebackDto findById(Long interface_id) {
|
||||
WQLObject wo = WQLObject.getWQLObject("md_pb_interfaceback");
|
||||
JSONObject json = wo.query("interface_id = '" + interface_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(json)) {
|
||||
return json.toJavaObject(InterfacebackDto.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InterfacebackDto findByCode(String code) {
|
||||
WQLObject wo = WQLObject.getWQLObject("md_pb_interfaceback");
|
||||
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(json)) {
|
||||
return json.toJavaObject(InterfacebackDto.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(InterfacebackDto dto) {
|
||||
dto.setInterface_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("md_pb_interfaceback");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
wo.insert(json);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(InterfacebackDto dto) {
|
||||
InterfacebackDto entity = this.findById(dto.getInterface_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("md_pb_interfaceback");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
wo.update(json);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteAll(Long[] ids) {
|
||||
WQLObject wo = WQLObject.getWQLObject("md_pb_interfaceback");
|
||||
for (Long interface_id : ids) {
|
||||
wo.delete("interface_id = '"+interface_id+"'");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
[交易说明]
|
||||
交易名: 接口回传设置分页查询
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.interface_name TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
md_pb_interfaceback
|
||||
WHERE
|
||||
1=1
|
||||
|
||||
OPTION 输入.interface_name <> ""
|
||||
interface_name like 输入.interface_name
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -48,7 +48,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
@Override
|
||||
public JSONObject boxQuery(JSONObject whereJson) {
|
||||
String box_no = whereJson.getString("box_no");
|
||||
//1-报废入库;2-生产入库;3-退货入库
|
||||
//1-报废入库;2-生产入库;3-退货入库; 4 - 拆分入库
|
||||
String option = whereJson.getString("option");
|
||||
|
||||
JSONArray rows = new JSONArray();
|
||||
@@ -69,6 +69,11 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
//查询状态为生成的子卷包装关系对应表
|
||||
rows = WQL.getWO("PDA_ST_01").addParamMap(map).process().getResultJSONArray(0);
|
||||
}
|
||||
if (option.equals("4")) {
|
||||
map.put("flag", "8");
|
||||
//查询状态为生成的子卷包装关系对应表
|
||||
rows = WQL.getWO("PDA_ST_01").addParamMap(map).process().getResultJSONArray(0);
|
||||
}
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("data", rows);
|
||||
|
||||
@@ -149,6 +149,31 @@
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "8"
|
||||
QUERY
|
||||
SELECT
|
||||
sub.package_box_SN,
|
||||
sub.container_name,
|
||||
sub.product_name,
|
||||
sub.product_description,
|
||||
sub.net_weight
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_SN = dis.box_no AND sub.container_name = dis.pcsn
|
||||
LEFT JOIN sch_base_task task ON task.vehicle_code = dis.storagevehicle_code
|
||||
WHERE
|
||||
mst.bill_type = '1005'
|
||||
AND sub.STATUS = '0'
|
||||
AND mst.is_delete = '0'
|
||||
AND mst.bill_status = '99'
|
||||
AND dis.work_status = '99'
|
||||
AND task.task_id IS NULL
|
||||
AND sub.package_box_SN = 输入.box_no
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "5"
|
||||
QUERY
|
||||
SELECT
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
WHEN '1002' THEN '报废出库'
|
||||
WHEN '1003' THEN '改切出库'
|
||||
WHEN '1004' THEN '调拨出库'
|
||||
WHEN '1005' THEN '拆分出库'
|
||||
WHEN '1009' THEN '手工出库'
|
||||
END
|
||||
) AS bill_type_name,
|
||||
|
||||
@@ -2100,6 +2100,11 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonSub.put("status", "3");
|
||||
}
|
||||
subTab.update(jsonSub);
|
||||
|
||||
// 更新分配明细执行状态为 - 99
|
||||
JSONObject jsonDis = wo_dis.query("iostorinvdis_id = '" + dis.getString("iostorinvdis_id") + "'").uniqueResult(0);
|
||||
jsonDis.put("work_status", "99");
|
||||
wo_dis.update(jsonDis);
|
||||
}
|
||||
|
||||
JSONObject out_jo = WQLObject.getWQLObject("ST_IVT_IOStorInv").query("iostorinv_id = '"+iostorinv_id+"'").uniqueResult(0);
|
||||
|
||||
@@ -216,6 +216,11 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
}
|
||||
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(jo_mst);
|
||||
}
|
||||
|
||||
// 拆分入库
|
||||
if (StrUtil.equals(bill_type, "1005")) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -762,6 +767,12 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(jo_mst);
|
||||
}
|
||||
|
||||
// 拆分入库
|
||||
if (StrUtil.equals(bill_type, "1005")) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
<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="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="接口名称">
|
||||
<el-input
|
||||
v-model="query.interface_name"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="接口名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="接口名称" prop="interface_name">
|
||||
<el-input v-model="form.interface_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="回传类型" prop="interface_type">
|
||||
<el-select
|
||||
v-model="form.interface_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.INTERFACEBACK_TYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="接口描述">
|
||||
<el-input v-model="form.remark" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否回传" prop="is_back">
|
||||
<el-radio v-model="form.is_back" label="1">是</el-radio>
|
||||
<el-radio v-model="form.is_back" label="0">否</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="业务说明">
|
||||
<el-input type="textarea" :rows="2" v-model="form.business_comment" style="width: 550px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="interface_type" label="回传类型" :formatter="formatType" :min-width="flexWidth('interface_type',crud.data,'类型')" />
|
||||
<el-table-column prop="interface_name" label="接口名称" :min-width="flexWidth('interface_name',crud.data,'接口名称')"/>
|
||||
<el-table-column prop="is_back" label="是否回传" :formatter="formatBack" :min-width="flexWidth('is_back',crud.data,'是否回传')"/>
|
||||
<el-table-column prop="remark" label="接口描述" :min-width="flexWidth('remark',crud.data,'接口描述')"/>
|
||||
<el-table-column prop="business_comment" label="业务说明" :min-width="flexWidth('business_comment',crud.data,'业务说明')"/>
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudInterfaceback from '@/views/wms/basedata/master/interfaceback/interfaceback'
|
||||
import CRUD, { crud, form, 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'
|
||||
|
||||
const defaultForm = {
|
||||
interface_id: null,
|
||||
interface_type: null,
|
||||
interface_name: null,
|
||||
remark: null,
|
||||
is_back: null,
|
||||
business_comment: null
|
||||
}
|
||||
export default {
|
||||
name: 'Interfaceback',
|
||||
dicts: ['INTERFACEBACK_TYPE', 'is_upload'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '接口回传设置',
|
||||
url: 'api/interfaceback',
|
||||
idField: 'interface_id',
|
||||
sort: 'interface_id,desc',
|
||||
crudMethod: { ...crudInterfaceback },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
interface_type: [
|
||||
{ required: true, message: '类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
interface_name: [
|
||||
{ required: true, message: '接口名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_back: [
|
||||
{ required: true, message: '是否回传不能为空', trigger: 'blur' }
|
||||
]
|
||||
} }
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
formatType(row) {
|
||||
return this.dict.label.INTERFACEBACK_TYPE[row.interface_type]
|
||||
},
|
||||
formatBack(row) {
|
||||
return this.dict.label.is_upload[row.is_back]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/interfaceback',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/interfaceback/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/interfaceback',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
Reference in New Issue
Block a user