演示2.1-2.4后台

dev
17602169347 2 years ago
parent 4e52e04d91
commit f6573bb833

@ -0,0 +1,185 @@
package org.jeecg.modules.demo.dailyprocessrpt.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.dailyprocessrpt.entity.TtDailyProcessRpt;
import org.jeecg.modules.demo.dailyprocessrpt.service.ITtDailyProcessRptService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: tt_daily_process_rpt
* @Author: jeecg-boot
* @Date: 2023-02-04
* @Version: V1.0
*/
@Api(tags="tt_daily_process_rpt")
@RestController
@RequestMapping("/dailyprocessrpt/ttDailyProcessRpt")
@Slf4j
public class TtDailyProcessRptController extends JeecgController<TtDailyProcessRpt, ITtDailyProcessRptService> {
@Autowired
private ITtDailyProcessRptService ttDailyProcessRptService;
/**
*
*
* @param ttDailyProcessRpt
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_daily_process_rpt-分页列表查询")
@ApiOperation(value="tt_daily_process_rpt-分页列表查询", notes="tt_daily_process_rpt-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtDailyProcessRpt>> queryPageList(TtDailyProcessRpt ttDailyProcessRpt,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtDailyProcessRpt> queryWrapper = QueryGenerator.initQueryWrapper(ttDailyProcessRpt, req.getParameterMap());
/*queryWrapper.eq("company_id", 1);
queryWrapper.eq("type_id", 2);*/
List<String> list = new ArrayList<>();
list.add("create_date");
list.add("create_time");
queryWrapper.orderByAsc(list);
Page<TtDailyProcessRpt> page = new Page<TtDailyProcessRpt>(pageNo, pageSize);
IPage<TtDailyProcessRpt> pageList = ttDailyProcessRptService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*
* @param ttDailyProcessRpt
* @return
*/
@AutoLog(value = "tt_daily_process_rpt-添加")
@ApiOperation(value="tt_daily_process_rpt-添加", notes="tt_daily_process_rpt-添加")
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtDailyProcessRpt ttDailyProcessRpt) {
ttDailyProcessRptService.save(ttDailyProcessRpt);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttDailyProcessRpt
* @return
*/
@AutoLog(value = "tt_daily_process_rpt-编辑")
@ApiOperation(value="tt_daily_process_rpt-编辑", notes="tt_daily_process_rpt-编辑")
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtDailyProcessRpt ttDailyProcessRpt) {
ttDailyProcessRptService.updateById(ttDailyProcessRpt);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_daily_process_rpt-通过id删除")
@ApiOperation(value="tt_daily_process_rpt-通过id删除", notes="tt_daily_process_rpt-通过id删除")
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttDailyProcessRptService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_daily_process_rpt-批量删除")
@ApiOperation(value="tt_daily_process_rpt-批量删除", notes="tt_daily_process_rpt-批量删除")
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttDailyProcessRptService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_daily_process_rpt-通过id查询")
@ApiOperation(value="tt_daily_process_rpt-通过id查询", notes="tt_daily_process_rpt-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtDailyProcessRpt> queryById(@RequestParam(name="id",required=true) String id) {
TtDailyProcessRpt ttDailyProcessRpt = ttDailyProcessRptService.getById(id);
if(ttDailyProcessRpt==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttDailyProcessRpt);
}
/**
* excel
*
* @param request
* @param ttDailyProcessRpt
*/
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtDailyProcessRpt ttDailyProcessRpt) {
return super.exportXls(request, ttDailyProcessRpt, TtDailyProcessRpt.class, "tt_daily_process_rpt");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtDailyProcessRpt.class);
}
}

@ -0,0 +1,233 @@
package org.jeecg.modules.demo.dailyprocessrpt.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_daily_process_rpt
* @Author: jeecg-boot
* @Date: 2023-02-04
* @Version: V1.0
*/
@Data
@TableName("tt_daily_process_rpt")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_daily_process_rpt对象", description="tt_daily_process_rpt")
public class TtDailyProcessRpt implements Serializable {
private static final long serialVersionUID = 1L;
/**id自增*/
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id自增")
private Integer id;
/**入库日期*/
@Excel(name = "入库日期", width = 15)
@ApiModelProperty(value = "入库日期")
private String inWhDate;
/**工序*/
@Excel(name = "工序", width = 15)
@ApiModelProperty(value = "工序")
private String process;
/**班次*/
@Excel(name = "班次", width = 15)
@ApiModelProperty(value = "班次")
private String shiftName;
/**作业员*/
@Excel(name = "作业员", width = 15)
@ApiModelProperty(value = "作业员")
private String operator;
/**机台*/
@Excel(name = "机台", width = 15)
@ApiModelProperty(value = "机台")
private String equipNo;
/**模具号*/
@Excel(name = "模具号", width = 15)
@ApiModelProperty(value = "模具号")
private String muldNo;
/**移动单号*/
@Excel(name = "移动单号", width = 15)
@ApiModelProperty(value = "移动单号")
private String mobileDocNo;
/**实际型腔*/
@Excel(name = "实际型腔", width = 15)
@ApiModelProperty(value = "实际型腔")
private String actualType;
/**片数*/
@Excel(name = "片数", width = 15)
@ApiModelProperty(value = "片数")
private BigDecimal pieces;
/**良品(Kg)*/
@Excel(name = "良品(Kg)", width = 15)
@ApiModelProperty(value = "良品(Kg)")
private BigDecimal okKg;
/**良品数量*/
@Excel(name = "良品数量", width = 15)
@ApiModelProperty(value = "良品数量")
private BigDecimal okQty;
/**不良(Kg)*/
@Excel(name = "不良(Kg)", width = 15)
@ApiModelProperty(value = "不良(Kg)")
private BigDecimal ngKg;
/**不良数量*/
@Excel(name = "不良数量", width = 15)
@ApiModelProperty(value = "不良数量")
private BigDecimal ngQty;
/**结案标记*/
@Excel(name = "结案标记", width = 15)
@ApiModelProperty(value = "结案标记")
private String finishFlag;
/**重复生产*/
@Excel(name = "重复生产", width = 15)
@ApiModelProperty(value = "重复生产")
private String dupProduct;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private String remark;
/**标准型腔*/
@Excel(name = "标准型腔", width = 15)
@ApiModelProperty(value = "标准型腔")
private String standardType;
/**前工序*/
@Excel(name = "前工序", width = 15)
@ApiModelProperty(value = "前工序")
private String preProcess;
/**前工序Kg*/
@Excel(name = "前工序Kg", width = 15)
@ApiModelProperty(value = "前工序Kg")
private BigDecimal preProcessKg;
/**前工序数量*/
@Excel(name = "前工序数量", width = 15)
@ApiModelProperty(value = "前工序数量")
private BigDecimal preProcessQty;
/**后工序*/
@Excel(name = "后工序", width = 15)
@ApiModelProperty(value = "后工序")
private String nextProcess;
/**录入用户*/
@ApiModelProperty(value = "录入用户")
private String createBy;
/**录入日期*/
@Excel(name = "录入日期", width = 15)
@ApiModelProperty(value = "录入日期")
private String createDate;
/**录入时间*/
@ApiModelProperty(value = "录入时间")
private String createTime;
/**修改用户*/
@Excel(name = "修改用户", width = 15)
@ApiModelProperty(value = "修改用户")
private String modifyBy;
/**修改日期*/
@Excel(name = "修改日期", width = 15)
@ApiModelProperty(value = "修改日期")
private String modifyDate;
/**审核*/
@Excel(name = "审核", width = 15)
@ApiModelProperty(value = "审核")
private String approveStatus;
/**工单状态*/
@Excel(name = "工单状态", width = 15)
@ApiModelProperty(value = "工单状态")
private String woStatus;
/**上线日期*/
@Excel(name = "上线日期", width = 15)
@ApiModelProperty(value = "上线日期")
private String onlineDate;
/**标准数量*/
@Excel(name = "标准数量", width = 15)
@ApiModelProperty(value = "标准数量")
private BigDecimal standardQty;
/**批次数量*/
@Excel(name = "批次数量", width = 15)
@ApiModelProperty(value = "批次数量")
private BigDecimal lotQty;
/**客户*/
@Excel(name = "客户", width = 15)
@ApiModelProperty(value = "客户")
private String customerName;
/**订单代号*/
@Excel(name = "订单代号", width = 15)
@ApiModelProperty(value = "订单代号")
private String orderNo;
/**计划数量*/
@Excel(name = "计划数量", width = 15)
@ApiModelProperty(value = "计划数量")
private BigDecimal planQty;
/**产品代号*/
@Excel(name = "产品代号", width = 15)
@ApiModelProperty(value = "产品代号")
private String partNo;
/**产品名称*/
@Excel(name = "产品名称", width = 15)
@ApiModelProperty(value = "产品名称")
private String partName;
/**规格描述*/
@Excel(name = "规格描述", width = 15)
@ApiModelProperty(value = "规格描述")
private String partSpec;
/**单位*/
@Excel(name = "单位", width = 15)
@ApiModelProperty(value = "单位")
private String partUnit;
/**单重*/
@Excel(name = "单重", width = 15)
@ApiModelProperty(value = "单重")
private BigDecimal partWeight;
/**形状*/
@Excel(name = "形状", width = 15)
@ApiModelProperty(value = "形状")
private String partShape;
/**包装规格*/
@Excel(name = "包装规格", width = 15)
@ApiModelProperty(value = "包装规格")
private String partPackSpec;
/**工艺类别*/
@Excel(name = "工艺类别", width = 15)
@ApiModelProperty(value = "工艺类别")
private String partRouteType;
/**工艺*/
@Excel(name = "工艺", width = 15)
@ApiModelProperty(value = "工艺")
private String partRoute;
/**产品类型*/
@Excel(name = "产品类型", width = 15)
@ApiModelProperty(value = "产品类型")
private String partType;
/**QC状态*/
@Excel(name = "QC状态", width = 15)
@ApiModelProperty(value = "QC状态")
private String qcStatus;
/**QC用户*/
@Excel(name = "QC用户", width = 15)
@ApiModelProperty(value = "QC用户")
private String qcUser;
/**QC时间*/
@Excel(name = "QC时间", width = 15)
@ApiModelProperty(value = "QC时间")
private String qcTime;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**公司id, 1表示老厂2表示新厂*/
@Excel(name = "公司id, 1表示老厂2表示新厂", width = 15)
@ApiModelProperty(value = "公司id, 1表示老厂2表示新厂")
private Integer companyId;
}

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.dailyprocessrpt.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.dailyprocessrpt.entity.TtDailyProcessRpt;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: tt_daily_process_rpt
* @Author: jeecg-boot
* @Date: 2023-02-04
* @Version: V1.0
*/
public interface TtDailyProcessRptMapper extends BaseMapper<TtDailyProcessRpt> {
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.dailyprocessrpt.mapper.TtDailyProcessRptMapper">
</mapper>

@ -0,0 +1,14 @@
package org.jeecg.modules.demo.dailyprocessrpt.service;
import org.jeecg.modules.demo.dailyprocessrpt.entity.TtDailyProcessRpt;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: tt_daily_process_rpt
* @Author: jeecg-boot
* @Date: 2023-02-04
* @Version: V1.0
*/
public interface ITtDailyProcessRptService extends IService<TtDailyProcessRpt> {
}

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.dailyprocessrpt.service.impl;
import org.jeecg.modules.demo.dailyprocessrpt.entity.TtDailyProcessRpt;
import org.jeecg.modules.demo.dailyprocessrpt.mapper.TtDailyProcessRptMapper;
import org.jeecg.modules.demo.dailyprocessrpt.service.ITtDailyProcessRptService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: tt_daily_process_rpt
* @Author: jeecg-boot
* @Date: 2023-02-04
* @Version: V1.0
*/
@Service
public class TtDailyProcessRptServiceImpl extends ServiceImpl<TtDailyProcessRptMapper, TtDailyProcessRpt> implements ITtDailyProcessRptService {
}

@ -0,0 +1,447 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_daily_process_rpt')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-daily-process-rpt-modal ref="modalForm" @ok="modalFormOk"></tt-daily-process-rpt-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtDailyProcessRptModal from './modules/TtDailyProcessRptModal'
export default {
name: 'TtDailyProcessRptList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtDailyProcessRptModal
},
data () {
return {
description: 'tt_daily_process_rpt',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'inWhDate'
},
{
title:'',
align:"center",
dataIndex: 'process'
},
{
title:'',
align:"center",
dataIndex: 'shiftName'
},
{
title:'',
align:"center",
dataIndex: 'operator'
},
{
title:'',
align:"center",
dataIndex: 'equipNo'
},
{
title:'',
align:"center",
dataIndex: 'muldNo'
},
{
title:'',
align:"center",
dataIndex: 'mobileDocNo'
},
{
title:'',
align:"center",
dataIndex: 'actualType'
},
{
title:'',
align:"center",
dataIndex: 'pieces'
},
{
title:'(Kg)',
align:"center",
dataIndex: 'okKg'
},
{
title:'',
align:"center",
dataIndex: 'okQty'
},
{
title:'(Kg)',
align:"center",
dataIndex: 'ngKg'
},
{
title:'',
align:"center",
dataIndex: 'ngQty'
},
{
title:'',
align:"center",
dataIndex: 'finishFlag'
},
{
title:'',
align:"center",
dataIndex: 'dupProduct'
},
{
title:'',
align:"center",
dataIndex: 'remark'
},
{
title:'',
align:"center",
dataIndex: 'standardType'
},
{
title:'',
align:"center",
dataIndex: 'preProcess'
},
{
title:'Kg',
align:"center",
dataIndex: 'preProcessKg'
},
{
title:'',
align:"center",
dataIndex: 'preProcessQty'
},
{
title:'',
align:"center",
dataIndex: 'nextProcess'
},
{
title:'',
align:"center",
dataIndex: 'createDate'
},
{
title:'',
align:"center",
dataIndex: 'modifyBy'
},
{
title:'',
align:"center",
dataIndex: 'modifyDate'
},
{
title:'',
align:"center",
dataIndex: 'approveStatus'
},
{
title:'',
align:"center",
dataIndex: 'woStatus'
},
{
title:'线',
align:"center",
dataIndex: 'onlineDate'
},
{
title:'',
align:"center",
dataIndex: 'standardQty'
},
{
title:'',
align:"center",
dataIndex: 'lotQty'
},
{
title:'',
align:"center",
dataIndex: 'customerName'
},
{
title:'',
align:"center",
dataIndex: 'orderNo'
},
{
title:'',
align:"center",
dataIndex: 'planQty'
},
{
title:'',
align:"center",
dataIndex: 'partNo'
},
{
title:'',
align:"center",
dataIndex: 'partName'
},
{
title:'',
align:"center",
dataIndex: 'partSpec'
},
{
title:'',
align:"center",
dataIndex: 'partUnit'
},
{
title:'',
align:"center",
dataIndex: 'partWeight'
},
{
title:'',
align:"center",
dataIndex: 'partShape'
},
{
title:'',
align:"center",
dataIndex: 'partPackSpec'
},
{
title:'',
align:"center",
dataIndex: 'partRouteType'
},
{
title:'',
align:"center",
dataIndex: 'partRoute'
},
{
title:'',
align:"center",
dataIndex: 'partType'
},
{
title:'QC',
align:"center",
dataIndex: 'qcStatus'
},
{
title:'QC',
align:"center",
dataIndex: 'qcUser'
},
{
title:'QC',
align:"center",
dataIndex: 'qcTime'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/dailyprocessrpt/ttDailyProcessRpt/list",
delete: "/dailyprocessrpt/ttDailyProcessRpt/delete",
deleteBatch: "/dailyprocessrpt/ttDailyProcessRpt/deleteBatch",
exportXlsUrl: "/dailyprocessrpt/ttDailyProcessRpt/exportXls",
importExcelUrl: "dailyprocessrpt/ttDailyProcessRpt/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'inWhDate',text:''})
fieldList.push({type:'string',value:'process',text:''})
fieldList.push({type:'string',value:'shiftName',text:''})
fieldList.push({type:'string',value:'operator',text:''})
fieldList.push({type:'string',value:'equipNo',text:''})
fieldList.push({type:'string',value:'muldNo',text:''})
fieldList.push({type:'string',value:'mobileDocNo',text:''})
fieldList.push({type:'string',value:'actualType',text:''})
fieldList.push({type:'number',value:'pieces',text:''})
fieldList.push({type:'number',value:'okKg',text:'(Kg)'})
fieldList.push({type:'number',value:'okQty',text:''})
fieldList.push({type:'number',value:'ngKg',text:'(Kg)'})
fieldList.push({type:'number',value:'ngQty',text:''})
fieldList.push({type:'string',value:'finishFlag',text:''})
fieldList.push({type:'string',value:'dupProduct',text:''})
fieldList.push({type:'string',value:'remark',text:''})
fieldList.push({type:'string',value:'standardType',text:''})
fieldList.push({type:'string',value:'preProcess',text:''})
fieldList.push({type:'number',value:'preProcessKg',text:'Kg'})
fieldList.push({type:'number',value:'preProcessQty',text:''})
fieldList.push({type:'string',value:'nextProcess',text:''})
fieldList.push({type:'string',value:'createDate',text:''})
fieldList.push({type:'string',value:'modifyBy',text:''})
fieldList.push({type:'string',value:'modifyDate',text:''})
fieldList.push({type:'string',value:'approveStatus',text:''})
fieldList.push({type:'string',value:'woStatus',text:''})
fieldList.push({type:'string',value:'onlineDate',text:'线'})
fieldList.push({type:'number',value:'standardQty',text:''})
fieldList.push({type:'number',value:'lotQty',text:''})
fieldList.push({type:'string',value:'customerName',text:''})
fieldList.push({type:'string',value:'orderNo',text:''})
fieldList.push({type:'number',value:'planQty',text:''})
fieldList.push({type:'string',value:'partNo',text:''})
fieldList.push({type:'string',value:'partName',text:''})
fieldList.push({type:'string',value:'partSpec',text:''})
fieldList.push({type:'string',value:'partUnit',text:''})
fieldList.push({type:'number',value:'partWeight',text:''})
fieldList.push({type:'string',value:'partShape',text:''})
fieldList.push({type:'string',value:'partPackSpec',text:''})
fieldList.push({type:'string',value:'partRouteType',text:''})
fieldList.push({type:'string',value:'partRoute',text:''})
fieldList.push({type:'string',value:'partType',text:''})
fieldList.push({type:'string',value:'qcStatus',text:'QC'})
fieldList.push({type:'string',value:'qcUser',text:'QC'})
fieldList.push({type:'string',value:'qcTime',text:'QC'})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/dailyprocessrpt
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023020410104510360', NULL, 'tt_daily_process_rpt', '/dailyprocessrpt/ttDailyProcessRptList', 'dailyprocessrpt/TtDailyProcessRptList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-04 10:10:36', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410104520361', '2023020410104510360', 'tt_daily_process_rpt', NULL, NULL, 0, NULL, NULL, 2, 'dailyprocessrpt:tt_daily_process_rpt:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:10:36', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410104520362', '2023020410104510360', 'tt_daily_process_rpt', NULL, NULL, 0, NULL, NULL, 2, 'dailyprocessrpt:tt_daily_process_rpt:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:10:36', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410104520363', '2023020410104510360', 'tt_daily_process_rpt', NULL, NULL, 0, NULL, NULL, 2, 'dailyprocessrpt:tt_daily_process_rpt:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:10:36', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410104520364', '2023020410104510360', 'tt_daily_process_rpt', NULL, NULL, 0, NULL, NULL, 2, 'dailyprocessrpt:tt_daily_process_rpt:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:10:36', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410104520365', '2023020410104510360', 'excel_tt_daily_process_rpt', NULL, NULL, 0, NULL, NULL, 2, 'dailyprocessrpt:tt_daily_process_rpt:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:10:36', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410104520366', '2023020410104510360', 'excel_tt_daily_process_rpt', NULL, NULL, 0, NULL, NULL, 2, 'dailyprocessrpt:tt_daily_process_rpt:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:10:36', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,334 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="入库日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inWhDate">
<a-input v-model="model.inWhDate" placeholder="请输入入库日期" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="process">
<a-input v-model="model.process" placeholder="请输入工序" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="班次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shiftName">
<a-input v-model="model.shiftName" placeholder="请输入班次" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="作业员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator">
<a-input v-model="model.operator" placeholder="请输入作业员" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机台" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipNo">
<a-input v-model="model.equipNo" placeholder="请输入机台" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="模具号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="muldNo">
<a-input v-model="model.muldNo" placeholder="请输入模具号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="移动单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mobileDocNo">
<a-input v-model="model.mobileDocNo" placeholder="请输入移动单号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="实际型腔" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="actualType">
<a-input v-model="model.actualType" placeholder="请输入实际型腔" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="片数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pieces">
<a-input-number v-model="model.pieces" placeholder="请输入片数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="良品(Kg)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="okKg">
<a-input-number v-model="model.okKg" placeholder="请输入良品(Kg)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="良品数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="okQty">
<a-input-number v-model="model.okQty" placeholder="请输入良品数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="不良(Kg)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ngKg">
<a-input-number v-model="model.ngKg" placeholder="请输入不良(Kg)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="不良数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ngQty">
<a-input-number v-model="model.ngQty" placeholder="请输入不良数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="结案标记" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finishFlag">
<a-input v-model="model.finishFlag" placeholder="请输入结案标记" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="重复生产" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dupProduct">
<a-input v-model="model.dupProduct" placeholder="请输入重复生产" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
<a-input v-model="model.remark" placeholder="请输入备注" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="标准型腔" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardType">
<a-input v-model="model.standardType" placeholder="请输入标准型腔" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="前工序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="preProcess">
<a-input v-model="model.preProcess" placeholder="请输入前工序" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="前工序Kg" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="preProcessKg">
<a-input-number v-model="model.preProcessKg" placeholder="请输入前工序Kg" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="前工序数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="preProcessQty">
<a-input-number v-model="model.preProcessQty" placeholder="请输入前工序数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="后工序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nextProcess">
<a-input v-model="model.nextProcess" placeholder="请输入后工序" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="录入日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createDate">
<a-input v-model="model.createDate" placeholder="请输入录入日期" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="修改用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modifyBy">
<a-input v-model="model.modifyBy" placeholder="请输入修改用户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="修改日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modifyDate">
<a-input v-model="model.modifyDate" placeholder="请输入修改日期" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approveStatus">
<a-input v-model="model.approveStatus" placeholder="请输入审核" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工单状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="woStatus">
<a-input v-model="model.woStatus" placeholder="请输入工单状态" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="上线日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="onlineDate">
<a-input v-model="model.onlineDate" placeholder="请输入上线日期" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="标准数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardQty">
<a-input-number v-model="model.standardQty" placeholder="请输入标准数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="批次数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lotQty">
<a-input-number v-model="model.lotQty" placeholder="请输入批次数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerName">
<a-input v-model="model.customerName" placeholder="请输入客户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="订单代号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNo">
<a-input v-model="model.orderNo" placeholder="请输入订单代号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="计划数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planQty">
<a-input-number v-model="model.planQty" placeholder="请输入计划数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品代号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNo">
<a-input v-model="model.partNo" placeholder="请输入产品代号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partName">
<a-input v-model="model.partName" placeholder="请输入产品名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partSpec">
<a-input v-model="model.partSpec" placeholder="请输入规格描述" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partUnit">
<a-input v-model="model.partUnit" placeholder="请输入单位" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单重" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partWeight">
<a-input-number v-model="model.partWeight" placeholder="请输入单重" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="形状" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partShape">
<a-input v-model="model.partShape" placeholder="请输入形状" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="包装规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partPackSpec">
<a-input v-model="model.partPackSpec" placeholder="请输入包装规格" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工艺类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partRouteType">
<a-input v-model="model.partRouteType" placeholder="请输入工艺类别" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工艺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partRoute">
<a-input v-model="model.partRoute" placeholder="请输入工艺" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partType">
<a-input v-model="model.partType" placeholder="请输入产品类型" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="QC状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qcStatus">
<a-input v-model="model.qcStatus" placeholder="请输入QC状态" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="QC用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qcUser">
<a-input v-model="model.qcUser" placeholder="请输入QC用户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="QC时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qcTime">
<a-input v-model="model.qcTime" placeholder="请输入QC时间" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示老厂2表示新厂" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示老厂2表示新厂" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtDailyProcessRptForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/dailyprocessrpt/ttDailyProcessRpt/add",
edit: "/dailyprocessrpt/ttDailyProcessRpt/edit",
queryById: "/dailyprocessrpt/ttDailyProcessRpt/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-daily-process-rpt-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-daily-process-rpt-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;"></a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
</div>
</a-drawer>
</template>
<script>
import TtDailyProcessRptForm from './TtDailyProcessRptForm'
export default {
name: 'TtDailyProcessRptModal',
components: {
TtDailyProcessRptForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-daily-process-rpt-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-daily-process-rpt-form>
</j-modal>
</template>
<script>
import TtDailyProcessRptForm from './TtDailyProcessRptForm'
export default {
name: 'TtDailyProcessRptModal',
components: {
TtDailyProcessRptForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,181 @@
package org.jeecg.modules.demo.inwhdata.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.inwhdata.entity.TtInWhData;
import org.jeecg.modules.demo.inwhdata.service.ITtInWhDataService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: tt_in_wh_data
* @Author: jeecg-boot
* @Date: 2023-02-04
* @Version: V1.0
*/
@Api(tags="tt_in_wh_data")
@RestController
@RequestMapping("/inwhdata/ttInWhData")
@Slf4j
public class TtInWhDataController extends JeecgController<TtInWhData, ITtInWhDataService> {
@Autowired
private ITtInWhDataService ttInWhDataService;
/**
*
*
* @param ttInWhData
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_in_wh_data-分页列表查询")
@ApiOperation(value="tt_in_wh_data-分页列表查询", notes="tt_in_wh_data-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtInWhData>> queryPageList(TtInWhData ttInWhData,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtInWhData> queryWrapper = QueryGenerator.initQueryWrapper(ttInWhData, req.getParameterMap());
/*queryWrapper.eq("company_id", 1);
queryWrapper.eq("type_id", 2);*/
queryWrapper.orderByAsc("doc_no");
Page<TtInWhData> page = new Page<TtInWhData>(pageNo, pageSize);
IPage<TtInWhData> pageList = ttInWhDataService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*
* @param ttInWhData
* @return
*/
@AutoLog(value = "tt_in_wh_data-添加")
@ApiOperation(value="tt_in_wh_data-添加", notes="tt_in_wh_data-添加")
//@RequiresPermissions("inwhdata:tt_in_wh_data:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtInWhData ttInWhData) {
ttInWhDataService.save(ttInWhData);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttInWhData
* @return
*/
@AutoLog(value = "tt_in_wh_data-编辑")
@ApiOperation(value="tt_in_wh_data-编辑", notes="tt_in_wh_data-编辑")
//@RequiresPermissions("inwhdata:tt_in_wh_data:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtInWhData ttInWhData) {
ttInWhDataService.updateById(ttInWhData);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_in_wh_data-通过id删除")
@ApiOperation(value="tt_in_wh_data-通过id删除", notes="tt_in_wh_data-通过id删除")
//@RequiresPermissions("inwhdata:tt_in_wh_data:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttInWhDataService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_in_wh_data-批量删除")
@ApiOperation(value="tt_in_wh_data-批量删除", notes="tt_in_wh_data-批量删除")
//@RequiresPermissions("inwhdata:tt_in_wh_data:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttInWhDataService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_in_wh_data-通过id查询")
@ApiOperation(value="tt_in_wh_data-通过id查询", notes="tt_in_wh_data-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtInWhData> queryById(@RequestParam(name="id",required=true) String id) {
TtInWhData ttInWhData = ttInWhDataService.getById(id);
if(ttInWhData==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttInWhData);
}
/**
* excel
*
* @param request
* @param ttInWhData
*/
//@RequiresPermissions("inwhdata:tt_in_wh_data:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtInWhData ttInWhData) {
return super.exportXls(request, ttInWhData, TtInWhData.class, "tt_in_wh_data");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("inwhdata:tt_in_wh_data:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtInWhData.class);
}
}

@ -0,0 +1,103 @@
package org.jeecg.modules.demo.inwhdata.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_in_wh_data
* @Author: jeecg-boot
* @Date: 2023-02-04
* @Version: V1.0
*/
@Data
@TableName("tt_in_wh_data")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_in_wh_data对象", description="tt_in_wh_data")
public class TtInWhData implements Serializable {
private static final long serialVersionUID = 1L;
/**入库单号*/
@Excel(name = "入库单号", width = 15)
@ApiModelProperty(value = "入库单号")
private String docNo;
/**项次*/
@Excel(name = "项次", width = 15)
@ApiModelProperty(value = "项次")
private String docItem;
/**日期*/
@Excel(name = "日期", width = 15)
@ApiModelProperty(value = "日期")
private String businessDate;
/**原始凭证*/
@Excel(name = "原始凭证", width = 15)
@ApiModelProperty(value = "原始凭证")
private String originalVoucher;
/**客户*/
@Excel(name = "客户", width = 15)
@ApiModelProperty(value = "客户")
private String customerName;
/**订单号码*/
@Excel(name = "订单号码", width = 15)
@ApiModelProperty(value = "订单号码")
private String orderDocNo;
/**成品代号*/
@Excel(name = "成品代号", width = 15)
@ApiModelProperty(value = "成品代号")
private String partNo;
/**成品名称*/
@Excel(name = "成品名称", width = 15)
@ApiModelProperty(value = "成品名称")
private String partName;
/**型号规格*/
@Excel(name = "型号规格", width = 15)
@ApiModelProperty(value = "型号规格")
private String partSpec;
/**单位*/
@Excel(name = "单位", width = 15)
@ApiModelProperty(value = "单位")
private String partUnit;
/**数量*/
@Excel(name = "数量", width = 15)
@ApiModelProperty(value = "数量")
private BigDecimal partQty;
/**状态*/
@Excel(name = "状态", width = 15)
@ApiModelProperty(value = "状态")
private String businessStatus;
/**入库方式*/
@Excel(name = "入库方式", width = 15)
@ApiModelProperty(value = "入库方式")
private String businessType;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private String remark;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**公司id, 1表示老厂2表示新厂*/
@Excel(name = "公司id, 1表示老厂2表示新厂", width = 15)
@ApiModelProperty(value = "公司id, 1表示老厂2表示新厂")
private Integer companyId;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
}

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.inwhdata.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.inwhdata.entity.TtInWhData;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: tt_in_wh_data
* @Author: jeecg-boot
* @Date: 2023-02-04
* @Version: V1.0
*/
public interface TtInWhDataMapper extends BaseMapper<TtInWhData> {
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.inwhdata.mapper.TtInWhDataMapper">
</mapper>

@ -0,0 +1,14 @@
package org.jeecg.modules.demo.inwhdata.service;
import org.jeecg.modules.demo.inwhdata.entity.TtInWhData;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: tt_in_wh_data
* @Author: jeecg-boot
* @Date: 2023-02-04
* @Version: V1.0
*/
public interface ITtInWhDataService extends IService<TtInWhData> {
}

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.inwhdata.service.impl;
import org.jeecg.modules.demo.inwhdata.entity.TtInWhData;
import org.jeecg.modules.demo.inwhdata.mapper.TtInWhDataMapper;
import org.jeecg.modules.demo.inwhdata.service.ITtInWhDataService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: tt_in_wh_data
* @Author: jeecg-boot
* @Date: 2023-02-04
* @Version: V1.0
*/
@Service
public class TtInWhDataServiceImpl extends ServiceImpl<TtInWhDataMapper, TtInWhData> implements ITtInWhDataService {
}

@ -0,0 +1,261 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_in_wh_data')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-in-wh-data-modal ref="modalForm" @ok="modalFormOk"></tt-in-wh-data-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtInWhDataModal from './modules/TtInWhDataModal'
export default {
name: 'TtInWhDataList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtInWhDataModal
},
data () {
return {
description: 'tt_in_wh_data',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'docNo'
},
{
title:'',
align:"center",
dataIndex: 'docItem'
},
{
title:'',
align:"center",
dataIndex: 'businessDate'
},
{
title:'',
align:"center",
dataIndex: 'originalVoucher'
},
{
title:'',
align:"center",
dataIndex: 'customerName'
},
{
title:'',
align:"center",
dataIndex: 'orderDocNo'
},
{
title:'',
align:"center",
dataIndex: 'partNo'
},
{
title:'',
align:"center",
dataIndex: 'partName'
},
{
title:'',
align:"center",
dataIndex: 'partSpec'
},
{
title:'',
align:"center",
dataIndex: 'partUnit'
},
{
title:'',
align:"center",
dataIndex: 'partQty'
},
{
title:'',
align:"center",
dataIndex: 'businessStatus'
},
{
title:'',
align:"center",
dataIndex: 'businessType'
},
{
title:'',
align:"center",
dataIndex: 'remark'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/inwhdata/ttInWhData/list",
delete: "/inwhdata/ttInWhData/delete",
deleteBatch: "/inwhdata/ttInWhData/deleteBatch",
exportXlsUrl: "/inwhdata/ttInWhData/exportXls",
importExcelUrl: "inwhdata/ttInWhData/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'docNo',text:''})
fieldList.push({type:'string',value:'docItem',text:''})
fieldList.push({type:'string',value:'businessDate',text:''})
fieldList.push({type:'string',value:'originalVoucher',text:''})
fieldList.push({type:'string',value:'customerName',text:''})
fieldList.push({type:'string',value:'orderDocNo',text:''})
fieldList.push({type:'string',value:'partNo',text:''})
fieldList.push({type:'string',value:'partName',text:''})
fieldList.push({type:'string',value:'partSpec',text:''})
fieldList.push({type:'string',value:'partUnit',text:''})
fieldList.push({type:'number',value:'partQty',text:''})
fieldList.push({type:'string',value:'businessStatus',text:''})
fieldList.push({type:'string',value:'businessType',text:''})
fieldList.push({type:'string',value:'remark',text:''})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/inwhdata
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023020410213670240', NULL, 'tt_in_wh_data', '/inwhdata/ttInWhDataList', 'inwhdata/TtInWhDataList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-04 10:21:24', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410213670241', '2023020410213670240', 'tt_in_wh_data', NULL, NULL, 0, NULL, NULL, 2, 'inwhdata:tt_in_wh_data:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:21:24', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410213670242', '2023020410213670240', 'tt_in_wh_data', NULL, NULL, 0, NULL, NULL, 2, 'inwhdata:tt_in_wh_data:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:21:24', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410213670243', '2023020410213670240', 'tt_in_wh_data', NULL, NULL, 0, NULL, NULL, 2, 'inwhdata:tt_in_wh_data:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:21:24', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410213670244', '2023020410213670240', 'tt_in_wh_data', NULL, NULL, 0, NULL, NULL, 2, 'inwhdata:tt_in_wh_data:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:21:24', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410213670245', '2023020410213670240', 'excel_tt_in_wh_data', NULL, NULL, 0, NULL, NULL, 2, 'inwhdata:tt_in_wh_data:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:21:24', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023020410213670246', '2023020410213670240', 'excel_tt_in_wh_data', NULL, NULL, 0, NULL, NULL, 2, 'inwhdata:tt_in_wh_data:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-04 10:21:24', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,179 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="入库单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="docNo">
<a-input v-model="model.docNo" placeholder="请输入入库单号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="项次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="docItem">
<a-input v-model="model.docItem" placeholder="请输入项次" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="businessDate">
<a-input v-model="model.businessDate" placeholder="请输入日期" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="原始凭证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="originalVoucher">
<a-input v-model="model.originalVoucher" placeholder="请输入原始凭证" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerName">
<a-input v-model="model.customerName" placeholder="请输入客户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="订单号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderDocNo">
<a-input v-model="model.orderDocNo" placeholder="请输入订单号码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="成品代号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNo">
<a-input v-model="model.partNo" placeholder="请输入成品代号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="成品名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partName">
<a-input v-model="model.partName" placeholder="请输入成品名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="型号规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partSpec">
<a-input v-model="model.partSpec" placeholder="请输入型号规格" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partUnit">
<a-input v-model="model.partUnit" placeholder="请输入单位" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partQty">
<a-input-number v-model="model.partQty" placeholder="请输入数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="businessStatus">
<a-input v-model="model.businessStatus" placeholder="请输入状态" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="入库方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="businessType">
<a-input v-model="model.businessType" placeholder="请输入入库方式" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
<a-input v-model="model.remark" placeholder="请输入备注" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示老厂2表示新厂" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示老厂2表示新厂" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtInWhDataForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/inwhdata/ttInWhData/add",
edit: "/inwhdata/ttInWhData/edit",
queryById: "/inwhdata/ttInWhData/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-in-wh-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-in-wh-data-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;"></a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
</div>
</a-drawer>
</template>
<script>
import TtInWhDataForm from './TtInWhDataForm'
export default {
name: 'TtInWhDataModal',
components: {
TtInWhDataForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-in-wh-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-in-wh-data-form>
</j-modal>
</template>
<script>
import TtInWhDataForm from './TtInWhDataForm'
export default {
name: 'TtInWhDataModal',
components: {
TtInWhDataForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
Loading…
Cancel
Save