Commit 0b624445ef9fbd86c017a3d450458870e788b719

Authored by 肖超群
1 parent 8005b274

1. 完善容器管理

Showing 36 changed files with 2824 additions and 10 deletions
jeecg-boot-master/ant-design-vue-jeecg/src/api/api.js
... ... @@ -45,7 +45,6 @@ const searchByKeywords = (params)=>getAction("/sys/sysDepart/searchBy",params)
45 45 const deleteByDepartId = (params)=>deleteAction("/sys/sysDepart/delete",params);
46 46  
47 47 //二级部门管理
48   -export const getWarehouseByUserCode = (params)=>postAction('/sys/getWarehouseByUserCode', params);
49 48 const queryDepartPermission = (params)=>getAction("/sys/permission/queryDepartPermission",params);
50 49 const saveDepartPermission = (params)=>postAction("/sys/permission/saveDepartPermission",params);
51 50 const queryTreeListForDeptRole = (params)=>getAction("/sys/sysDepartPermission/queryTreeListForDeptRole",params);
... ... @@ -94,6 +93,10 @@ const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', para
94 93 const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params);
95 94 const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}`
96 95  
  96 +export const getWarehouseByUserCode = (params)=>postAction('/sys/getWarehouseByUserCode', params);
  97 +export const getZoneList = (params)=>getAction('/config/zone/getZoneList', params);
  98 +export const getContainerTypeList = (params)=>getAction('/config/containerType/getContainerTypeList', params);
  99 +
97 100 // 中转HTTP请求
98 101 export const transitRESTful = {
99 102 get: (url, parameter) => getAction(getTransitURL(url), parameter),
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/ContainerCapacityList.vue 0 → 100644
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="容器类型">
  9 + <a-input placeholder="请输入容器类型" v-model="queryParam.containerTypeCode"></a-input>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="物料编码">
  14 + <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input>
  15 + </a-form-item>
  16 + </a-col>
  17 + <template v-if="toggleSearchStatus">
  18 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  19 + <a-form-item label="是否可用">
  20 + <j-dict-select-tag placeholder="请选择是否可用" v-model="queryParam.enable" dictCode="enable_status"/>
  21 + </a-form-item>
  22 + </a-col>
  23 + </template>
  24 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  25 + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  26 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  27 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  28 + <a @click="handleToggleSearch" style="margin-left: 8px">
  29 + {{ toggleSearchStatus ? '收起' : '展开' }}
  30 + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  31 + </a>
  32 + </span>
  33 + </a-col>
  34 + </a-row>
  35 + </a-form>
  36 + </div>
  37 + <!-- 查询区域-END -->
  38 +
  39 + <!-- 操作按钮区域 -->
  40 + <div class="table-operator">
  41 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  42 + <a-button type="primary" icon="download" @click="handleExportXls('容器容量管理')">导出</a-button>
  43 + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  44 + <a-button type="primary" icon="import">导入</a-button>
  45 + </a-upload>
  46 + <!-- 高级查询区域 -->
  47 + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  48 + <a-dropdown v-if="selectedRowKeys.length > 0">
  49 + <a-menu slot="overlay">
  50 + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  51 + </a-menu>
  52 + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  53 + </a-dropdown>
  54 + </div>
  55 +
  56 + <!-- table区域-begin -->
  57 + <div>
  58 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  59 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  60 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  61 + </div>
  62 +
  63 + <a-table
  64 + ref="table"
  65 + size="middle"
  66 + :scroll="{x:true}"
  67 + bordered
  68 + rowKey="id"
  69 + :columns="columns"
  70 + :dataSource="dataSource"
  71 + :pagination="ipagination"
  72 + :loading="loading"
  73 + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  74 + class="j-table-force-nowrap"
  75 + @change="handleTableChange">
  76 +
  77 + <template slot="htmlSlot" slot-scope="text">
  78 + <div v-html="text"></div>
  79 + </template>
  80 + <template slot="imgSlot" slot-scope="text">
  81 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  82 + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  83 + </template>
  84 + <template slot="fileSlot" slot-scope="text">
  85 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  86 + <a-button
  87 + v-else
  88 + :ghost="true"
  89 + type="primary"
  90 + icon="download"
  91 + size="small"
  92 + @click="downloadFile(text)">
  93 + 下载
  94 + </a-button>
  95 + </template>
  96 +
  97 + <span slot="action" slot-scope="text, record">
  98 + <a @click="handleEdit(record)">编辑</a>
  99 +
  100 + <a-divider type="vertical" />
  101 + <a-dropdown>
  102 + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  103 + <a-menu slot="overlay">
  104 + <a-menu-item>
  105 + <a @click="handleDetail(record)">详情</a>
  106 + </a-menu-item>
  107 + <a-menu-item>
  108 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  109 + <a>删除</a>
  110 + </a-popconfirm>
  111 + </a-menu-item>
  112 + </a-menu>
  113 + </a-dropdown>
  114 + </span>
  115 +
  116 + </a-table>
  117 + </div>
  118 +
  119 + <container-capacity-modal ref="modalForm" @ok="modalFormOk"></container-capacity-modal>
  120 + </a-card>
  121 +</template>
  122 +
  123 +<script>
  124 +
  125 + import '@/assets/less/TableExpand.less'
  126 + import { mixinDevice } from '@/utils/mixin'
  127 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  128 + import ContainerCapacityModal from './modules/ContainerCapacityModal'
  129 + import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  130 +
  131 + export default {
  132 + name: 'ContainerCapacityList',
  133 + mixins:[JeecgListMixin, mixinDevice],
  134 + components: {
  135 + ContainerCapacityModal
  136 + },
  137 + data () {
  138 + return {
  139 + description: '容器容量管理管理页面',
  140 + // 表头
  141 + columns: [
  142 + {
  143 + title: '#',
  144 + dataIndex: '',
  145 + key:'rowIndex',
  146 + width:60,
  147 + align:"center",
  148 + customRender:function (t,r,index) {
  149 + return parseInt(index)+1;
  150 + }
  151 + },
  152 + {
  153 + title:'容器类型',
  154 + align:"center",
  155 + dataIndex: 'containerTypeCode'
  156 + },
  157 + {
  158 + title:'仓库编码',
  159 + align:"center",
  160 + dataIndex: 'warehouseCode'
  161 + },
  162 + {
  163 + title:'货主',
  164 + align:"center",
  165 + dataIndex: 'companyCode'
  166 + },
  167 + {
  168 + title:'物料编码',
  169 + align:"center",
  170 + dataIndex: 'materialCode'
  171 + },
  172 + {
  173 + title:'物料名称',
  174 + align:"center",
  175 + dataIndex: 'materialName'
  176 + },
  177 + {
  178 + title:'物料单位',
  179 + align:"center",
  180 + dataIndex: 'materialUnit'
  181 + },
  182 + {
  183 + title:'存放数量',
  184 + align:"center",
  185 + dataIndex: 'qty'
  186 + },
  187 + {
  188 + title:'是否可用',
  189 + align:"center",
  190 + dataIndex: 'enable_dictText'
  191 + },
  192 + {
  193 + title:'创建人',
  194 + align:"center",
  195 + dataIndex: 'createBy'
  196 + },
  197 + {
  198 + title:'创建日期',
  199 + align:"center",
  200 + dataIndex: 'createTime'
  201 + },
  202 + {
  203 + title:'更新人',
  204 + align:"center",
  205 + dataIndex: 'updateBy'
  206 + },
  207 + {
  208 + title:'更新日期',
  209 + align:"center",
  210 + dataIndex: 'updateTime'
  211 + },
  212 + {
  213 + title: '操作',
  214 + dataIndex: 'action',
  215 + align:"center",
  216 + fixed:"right",
  217 + width:147,
  218 + scopedSlots: { customRender: 'action' }
  219 + }
  220 + ],
  221 + url: {
  222 + list: "/config/containerCapacity/list",
  223 + delete: "/config/containerCapacity/delete",
  224 + deleteBatch: "/config/containerCapacity/deleteBatch",
  225 + exportXlsUrl: "/config/containerCapacity/exportXls",
  226 + importExcelUrl: "config/containerCapacity/importExcel",
  227 +
  228 + },
  229 + dictOptions:{},
  230 + superFieldList:[],
  231 + }
  232 + },
  233 + created() {
  234 + this.getSuperFieldList();
  235 + },
  236 + computed: {
  237 + importExcelUrl: function(){
  238 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  239 + },
  240 + },
  241 + methods: {
  242 + initDictConfig(){
  243 + },
  244 + getSuperFieldList(){
  245 + let fieldList=[];
  246 + fieldList.push({type:'string',value:'containerTypeCode',text:'容器类型',dictCode:''})
  247 + fieldList.push({type:'string',value:'warehouseCode',text:'仓库编码',dictCode:''})
  248 + fieldList.push({type:'string',value:'companyCode',text:'货主',dictCode:''})
  249 + fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''})
  250 + fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''})
  251 + fieldList.push({type:'string',value:'materialUnit',text:'物料单位',dictCode:''})
  252 + fieldList.push({type:'BigDecimal',value:'qty',text:'存放数量',dictCode:''})
  253 + fieldList.push({type:'int',value:'enable',text:'是否可用',dictCode:'enable_status'})
  254 + fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
  255 + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
  256 + fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''})
  257 + fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'})
  258 + this.superFieldList = fieldList
  259 + }
  260 + }
  261 + }
  262 +</script>
  263 +<style scoped>
  264 + @import '~@assets/less/common.less';
  265 +</style>
0 266 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue 0 → 100644
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="容器编码">
  9 + <a-input placeholder="请输入容器编码" v-model="queryParam.code"></a-input>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="货主">
  14 + <a-input placeholder="请输入货主" v-model="queryParam.companyCode"></a-input>
  15 + </a-form-item>
  16 + </a-col>
  17 + <template v-if="toggleSearchStatus">
  18 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  19 + <a-form-item label="库位编码">
  20 + <a-input placeholder="请输入库位编码" v-model="queryParam.locationCode"></a-input>
  21 + </a-form-item>
  22 + </a-col>
  23 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  24 + <a-form-item label="容器类型">
  25 + <a-select
  26 + show-search
  27 + placeholder="请选择容器类型"
  28 + option-filter-prop="children"
  29 + :filter-option="filterOption"
  30 + v-model="queryParam.containerTypeCode"
  31 + style="width: 200px">
  32 + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option>
  33 + </a-select>
  34 + </a-form-item>
  35 + </a-col>
  36 +<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
  37 +<!-- <a-form-item label="容器类型">-->
  38 +<!-- <a-input placeholder="请输入容器类型" v-model="queryParam.containerTypeCode"></a-input>-->
  39 +<!-- </a-form-item>-->
  40 +<!-- </a-col>-->
  41 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  42 + <a-form-item label="容器状态">
  43 + <j-dict-select-tag placeholder="请选择容器状态" v-model="queryParam.status" dictCode="container_status"/>
  44 + </a-form-item>
  45 + </a-col>
  46 + </template>
  47 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  48 + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  49 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  50 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  51 + <a @click="handleToggleSearch" style="margin-left: 8px">
  52 + {{ toggleSearchStatus ? '收起' : '展开' }}
  53 + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  54 + </a>
  55 + </span>
  56 + </a-col>
  57 + </a-row>
  58 + </a-form>
  59 + </div>
  60 + <!-- 查询区域-END -->
  61 +
  62 + <!-- 操作按钮区域 -->
  63 + <div class="table-operator">
  64 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  65 + <a-button type="primary" icon="download" @click="handleExportXls('容器管理')">导出</a-button>
  66 + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  67 + <a-button type="primary" icon="import">导入</a-button>
  68 + </a-upload>
  69 + <!-- 高级查询区域 -->
  70 + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  71 + <a-dropdown v-if="selectedRowKeys.length > 0">
  72 + <a-menu slot="overlay">
  73 + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  74 + </a-menu>
  75 + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  76 + </a-dropdown>
  77 + </div>
  78 +
  79 + <!-- table区域-begin -->
  80 + <div>
  81 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  82 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  83 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  84 + </div>
  85 +
  86 + <a-table
  87 + ref="table"
  88 + size="middle"
  89 + :scroll="{x:true}"
  90 + bordered
  91 + rowKey="id"
  92 + :columns="columns"
  93 + :dataSource="dataSource"
  94 + :pagination="ipagination"
  95 + :loading="loading"
  96 + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  97 + class="j-table-force-nowrap"
  98 + @change="handleTableChange">
  99 +
  100 + <span slot="zoneCode" slot-scope="zoneCode">
  101 + <a-tag :key="zoneCode" color=blue>
  102 + {{ solutionZoneCode(zoneCode) }}
  103 + </a-tag>
  104 + </span>
  105 +
  106 + <span slot="containerTypeCode" slot-scope="containerTypeCode">
  107 + <a-tag :key="containerTypeCode" color=pink>
  108 + {{ solutionContainerType(containerTypeCode) }}
  109 + </a-tag>
  110 + </span>
  111 +
  112 + <template slot="htmlSlot" slot-scope="text">
  113 + <div v-html="text"></div>
  114 + </template>
  115 + <template slot="imgSlot" slot-scope="text">
  116 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  117 + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  118 + </template>
  119 + <template slot="fileSlot" slot-scope="text">
  120 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  121 + <a-button
  122 + v-else
  123 + :ghost="true"
  124 + type="primary"
  125 + icon="download"
  126 + size="small"
  127 + @click="downloadFile(text)">
  128 + 下载
  129 + </a-button>
  130 + </template>
  131 +
  132 + <span slot="action" slot-scope="text, record">
  133 + <a @click="handleEdit(record)">编辑</a>
  134 +
  135 + <a-divider type="vertical" />
  136 + <a-dropdown>
  137 + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  138 + <a-menu slot="overlay">
  139 + <a-menu-item>
  140 + <a @click="handleDetail(record)">详情</a>
  141 + </a-menu-item>
  142 + <a-menu-item>
  143 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  144 + <a>删除</a>
  145 + </a-popconfirm>
  146 + </a-menu-item>
  147 + </a-menu>
  148 + </a-dropdown>
  149 + </span>
  150 +
  151 + </a-table>
  152 + </div>
  153 +
  154 + <container-modal ref="modalForm" @ok="modalFormOk"></container-modal>
  155 + </a-card>
  156 +</template>
  157 +
  158 +<script>
  159 +
  160 + import '@/assets/less/TableExpand.less'
  161 + import { mixinDevice } from '@/utils/mixin'
  162 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  163 + import ContainerModal from './modules/ContainerModal'
  164 + import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  165 + import {getZoneList} from '@/api/api'
  166 + import {getContainerTypeList} from '@/api/api'
  167 +
  168 + export default {
  169 + name: 'ContainerList',
  170 + mixins:[JeecgListMixin, mixinDevice],
  171 + components: {
  172 + ContainerModal
  173 + },
  174 + data () {
  175 + return {
  176 + description: '容器管理管理页面',
  177 + zoneList:[],
  178 + containerTypeList:[],
  179 + // 表头
  180 + columns: [
  181 + {
  182 + title: '#',
  183 + dataIndex: '',
  184 + key:'rowIndex',
  185 + width:60,
  186 + align:"center",
  187 + customRender:function (t,r,index) {
  188 + return parseInt(index)+1;
  189 + }
  190 + },
  191 + {
  192 + title:'容器编码',
  193 + align:"center",
  194 + dataIndex: 'code'
  195 + },
  196 + {
  197 + title:'仓库编码',
  198 + align:"center",
  199 + dataIndex: 'warehouseCode'
  200 + },
  201 + {
  202 + title:'货主',
  203 + align:"center",
  204 + dataIndex: 'companyCode'
  205 + },
  206 + {
  207 + title:'库位编码',
  208 + align:"center",
  209 + dataIndex: 'locationCode'
  210 + },
  211 + // {
  212 + // title:'库区编码',
  213 + // align:"center",
  214 + // dataIndex: 'zoneCode',
  215 + // key: 'zoneCode',
  216 + // scopedSlots: { customRender: 'zoneCode' }
  217 + // },
  218 + {
  219 + title:'容器类型',
  220 + align:"center",
  221 + dataIndex: 'containerTypeCode',
  222 + key: 'containerTypeCode',
  223 + scopedSlots: { customRender: 'containerTypeCode' }
  224 + },
  225 + {
  226 + title:'容器状态',
  227 + align:"center",
  228 + dataIndex: 'status_dictText'
  229 + },
  230 + {
  231 + title:'创建人',
  232 + align:"center",
  233 + dataIndex: 'createBy'
  234 + },
  235 + {
  236 + title:'创建日期',
  237 + align:"center",
  238 + dataIndex: 'createTime'
  239 + },
  240 + {
  241 + title:'更新人',
  242 + align:"center",
  243 + dataIndex: 'updateBy'
  244 + },
  245 + {
  246 + title:'更新日期',
  247 + align:"center",
  248 + dataIndex: 'updateTime'
  249 + },
  250 + {
  251 + title: '操作',
  252 + dataIndex: 'action',
  253 + align:"center",
  254 + fixed:"right",
  255 + width:147,
  256 + scopedSlots: { customRender: 'action' }
  257 + }
  258 + ],
  259 + url: {
  260 + list: "/config/container/list",
  261 + delete: "/config/container/delete",
  262 + deleteBatch: "/config/container/deleteBatch",
  263 + exportXlsUrl: "/config/container/exportXls",
  264 + importExcelUrl: "config/container/importExcel",
  265 +
  266 + },
  267 + dictOptions:{},
  268 + superFieldList:[],
  269 + }
  270 + },
  271 + created() {
  272 + this.getSuperFieldList();
  273 + this.loadFrom();
  274 + },
  275 + computed: {
  276 + importExcelUrl: function(){
  277 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  278 + },
  279 + },
  280 + methods: {
  281 + initDictConfig(){
  282 + },
  283 + getSuperFieldList(){
  284 + let fieldList=[];
  285 + fieldList.push({type:'string',value:'code',text:'容器编码',dictCode:''})
  286 + fieldList.push({type:'string',value:'warehouseCode',text:'仓库编码',dictCode:''})
  287 + fieldList.push({type:'string',value:'companyCode',text:'货主',dictCode:''})
  288 + fieldList.push({type:'string',value:'locationCode',text:'库位编码',dictCode:''})
  289 + // fieldList.push({type:'string',value:'zoneCode',text:'库区编码',dictCode:''})
  290 + fieldList.push({type:'string',value:'containerTypeCode',text:'容器类型',dictCode:''})
  291 + fieldList.push({type:'string',value:'status',text:'容器状态',dictCode:'container_status'})
  292 + fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
  293 + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
  294 + fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''})
  295 + fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'})
  296 + this.superFieldList = fieldList
  297 + },
  298 + loadFrom() {
  299 + getZoneList().then((res) => {
  300 + if (res.success) {
  301 + this.zoneList = res.result
  302 + }
  303 + })
  304 + getContainerTypeList().then((res) => {
  305 + if (res.success) {
  306 + this.containerTypeList = res.result
  307 + }
  308 + })
  309 + },
  310 + solutionZoneCode(value) {
  311 + var actions = []
  312 + Object.keys(this.zoneList).some((key) => {
  313 + if (this.zoneList[key].code == ('' + value)) {
  314 + actions.push(this.zoneList[key].name)
  315 + return true
  316 + }
  317 + })
  318 + return actions.join('')
  319 + },
  320 + solutionContainerType(value) {
  321 + var actions = []
  322 + Object.keys(this.containerTypeList).some((key) => {
  323 + if (this.containerTypeList[key].code == ('' + value)) {
  324 + actions.push(this.containerTypeList[key].name)
  325 + return true
  326 + }
  327 + })
  328 + return actions.join('')
  329 + },
  330 + }
  331 + }
  332 +</script>
  333 +<style scoped>
  334 + @import '~@assets/less/common.less';
  335 +</style>
0 336 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/ContainerTypeList.vue 0 → 100644
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="编码">
  9 + <a-input placeholder="请输入编码" v-model="queryParam.code"></a-input>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="名称">
  14 + <a-input placeholder="请输入名称" v-model="queryParam.name"></a-input>
  15 + </a-form-item>
  16 + </a-col>
  17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  19 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  20 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  21 + <a @click="handleToggleSearch" style="margin-left: 8px">
  22 + {{ toggleSearchStatus ? '收起' : '展开' }}
  23 + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  24 + </a>
  25 + </span>
  26 + </a-col>
  27 + </a-row>
  28 + </a-form>
  29 + </div>
  30 + <!-- 查询区域-END -->
  31 +
  32 + <!-- 操作按钮区域 -->
  33 + <div class="table-operator">
  34 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  35 + <a-button type="primary" icon="download" @click="handleExportXls('容器类型')">导出</a-button>
  36 + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  37 + <a-button type="primary" icon="import">导入</a-button>
  38 + </a-upload>
  39 + <!-- 高级查询区域 -->
  40 + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  41 + <a-dropdown v-if="selectedRowKeys.length > 0">
  42 + <a-menu slot="overlay">
  43 + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  44 + </a-menu>
  45 + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  46 + </a-dropdown>
  47 + </div>
  48 +
  49 + <!-- table区域-begin -->
  50 + <div>
  51 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  52 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  53 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  54 + </div>
  55 +
  56 + <a-table
  57 + ref="table"
  58 + size="middle"
  59 + :scroll="{x:true}"
  60 + bordered
  61 + rowKey="id"
  62 + :columns="columns"
  63 + :dataSource="dataSource"
  64 + :pagination="ipagination"
  65 + :loading="loading"
  66 + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  67 + class="j-table-force-nowrap"
  68 + @change="handleTableChange">
  69 +
  70 + <template slot="htmlSlot" slot-scope="text">
  71 + <div v-html="text"></div>
  72 + </template>
  73 + <template slot="imgSlot" slot-scope="text">
  74 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  75 + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  76 + </template>
  77 + <template slot="fileSlot" slot-scope="text">
  78 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  79 + <a-button
  80 + v-else
  81 + :ghost="true"
  82 + type="primary"
  83 + icon="download"
  84 + size="small"
  85 + @click="downloadFile(text)">
  86 + 下载
  87 + </a-button>
  88 + </template>
  89 +
  90 + <span slot="action" slot-scope="text, record">
  91 + <a @click="handleEdit(record)">编辑</a>
  92 +
  93 + <a-divider type="vertical" />
  94 + <a-dropdown>
  95 + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  96 + <a-menu slot="overlay">
  97 + <a-menu-item>
  98 + <a @click="handleDetail(record)">详情</a>
  99 + </a-menu-item>
  100 + <a-menu-item>
  101 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  102 + <a>删除</a>
  103 + </a-popconfirm>
  104 + </a-menu-item>
  105 + </a-menu>
  106 + </a-dropdown>
  107 + </span>
  108 +
  109 + </a-table>
  110 + </div>
  111 +
  112 + <container-type-modal ref="modalForm" @ok="modalFormOk"></container-type-modal>
  113 + </a-card>
  114 +</template>
  115 +
  116 +<script>
  117 +
  118 + import '@/assets/less/TableExpand.less'
  119 + import { mixinDevice } from '@/utils/mixin'
  120 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  121 + import ContainerTypeModal from './modules/ContainerTypeModal'
  122 +
  123 + export default {
  124 + name: 'ContainerTypeList',
  125 + mixins:[JeecgListMixin, mixinDevice],
  126 + components: {
  127 + ContainerTypeModal
  128 + },
  129 + data () {
  130 + return {
  131 + description: '容器类型管理页面',
  132 + // 表头
  133 + columns: [
  134 + {
  135 + title: '#',
  136 + dataIndex: '',
  137 + key:'rowIndex',
  138 + width:60,
  139 + align:"center",
  140 + customRender:function (t,r,index) {
  141 + return parseInt(index)+1;
  142 + }
  143 + },
  144 + {
  145 + title:'编码',
  146 + align:"center",
  147 + dataIndex: 'code'
  148 + },
  149 + {
  150 + title:'名称',
  151 + align:"center",
  152 + dataIndex: 'name'
  153 + },
  154 + {
  155 + title:'仓库编码',
  156 + align:"center",
  157 + dataIndex: 'warehouseCode'
  158 + },
  159 + {
  160 + title:'货主编码',
  161 + align:"center",
  162 + dataIndex: 'companyCode'
  163 + },
  164 + {
  165 + title:'绑定的库位类型',
  166 + align:"center",
  167 + dataIndex: 'locationType'
  168 + },
  169 + {
  170 + title:'长',
  171 + align:"center",
  172 + dataIndex: 'length'
  173 + },
  174 + {
  175 + title:'宽',
  176 + align:"center",
  177 + dataIndex: 'width'
  178 + },
  179 + {
  180 + title:'高',
  181 + align:"center",
  182 + dataIndex: 'height'
  183 + },
  184 + {
  185 + title:'空容器重量',
  186 + align:"center",
  187 + dataIndex: 'emptyweight'
  188 + },
  189 + {
  190 + title:'容器最大承重',
  191 + align:"center",
  192 + dataIndex: 'maxweight'
  193 + },
  194 + {
  195 + title:'创建人',
  196 + align:"center",
  197 + dataIndex: 'createBy'
  198 + },
  199 + {
  200 + title:'创建日期',
  201 + align:"center",
  202 + dataIndex: 'createTime'
  203 + },
  204 + {
  205 + title:'更新人',
  206 + align:"center",
  207 + dataIndex: 'updateBy'
  208 + },
  209 + {
  210 + title:'更新日期',
  211 + align:"center",
  212 + dataIndex: 'updateTime'
  213 + },
  214 + {
  215 + title: '操作',
  216 + dataIndex: 'action',
  217 + align:"center",
  218 + fixed:"right",
  219 + width:147,
  220 + scopedSlots: { customRender: 'action' }
  221 + }
  222 + ],
  223 + url: {
  224 + list: "/config/containerType/list",
  225 + delete: "/config/containerType/delete",
  226 + deleteBatch: "/config/containerType/deleteBatch",
  227 + exportXlsUrl: "/config/containerType/exportXls",
  228 + importExcelUrl: "config/containerType/importExcel",
  229 +
  230 + },
  231 + dictOptions:{},
  232 + superFieldList:[],
  233 + }
  234 + },
  235 + created() {
  236 + this.getSuperFieldList();
  237 + },
  238 + computed: {
  239 + importExcelUrl: function(){
  240 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  241 + },
  242 + },
  243 + methods: {
  244 + initDictConfig(){
  245 + },
  246 + getSuperFieldList(){
  247 + let fieldList=[];
  248 + fieldList.push({type:'string',value:'code',text:'编码',dictCode:''})
  249 + fieldList.push({type:'string',value:'name',text:'名称',dictCode:''})
  250 + fieldList.push({type:'string',value:'warehouseCode',text:'仓库编码',dictCode:''})
  251 + fieldList.push({type:'string',value:'companyCode',text:'货主编码',dictCode:''})
  252 + fieldList.push({type:'string',value:'locationType',text:'绑定的库位类型',dictCode:''})
  253 + fieldList.push({type:'int',value:'length',text:'长',dictCode:''})
  254 + fieldList.push({type:'int',value:'width',text:'宽',dictCode:''})
  255 + fieldList.push({type:'int',value:'height',text:'高',dictCode:''})
  256 + fieldList.push({type:'int',value:'emptyweight',text:'空容器重量',dictCode:''})
  257 + fieldList.push({type:'int',value:'maxweight',text:'容器最大承重',dictCode:''})
  258 + fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
  259 + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
  260 + fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''})
  261 + fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'})
  262 + this.superFieldList = fieldList
  263 + }
  264 + }
  265 + }
  266 +</script>
  267 +<style scoped>
  268 + @import '~@assets/less/common.less';
  269 +</style>
0 270 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/MaterialList.vue
... ... @@ -17,7 +17,7 @@
17 17 <template v-if="toggleSearchStatus">
18 18 <a-col :xl="6" :lg="7" :md="8" :sm="24">
19 19 <a-form-item label="可用状态">
20   - <j-dict-select-tag placeholder="请选择可用状态" v-model="queryParam.enable" dictCode="enable_status"/>
  20 + <j-dict-select-tag placeholder="请选择可用状态" v-model="queryParam.enable" dictCode="enable_status" />
21 21 </a-form-item>
22 22 </a-col>
23 23 </template>
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/MaterialTypeList.vue
... ... @@ -152,14 +152,14 @@
152 152 dataIndex: 'name'
153 153 },
154 154 {
155   - title:'货主编码',
  155 + title:'仓库编码',
156 156 align:"center",
157   - dataIndex: 'companyCode'
  157 + dataIndex: 'warehouseCode'
158 158 },
159 159 {
160   - title:'仓库编码',
  160 + title:'货主编码',
161 161 align:"center",
162   - dataIndex: 'warehouseCode'
  162 + dataIndex: 'companyCode'
163 163 },
164 164 {
165 165 title:'ABC分类',
... ... @@ -251,7 +251,7 @@
251 251 deleteBatch: "/config/materialType/deleteBatch",
252 252 exportXlsUrl: "/config/materialType/exportXls",
253 253 importExcelUrl: "config/materialType/importExcel",
254   -
  254 +
255 255 },
256 256 dictOptions:{},
257 257 superFieldList:[],
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerCapacityForm.vue 0 → 100644
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-row>
  6 + <a-col :span="24">
  7 + <a-form-model-item label="容器类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerTypeCode">
  8 + <a-input v-model="model.containerTypeCode" placeholder="请输入容器类型" ></a-input>
  9 + </a-form-model-item>
  10 + </a-col>
  11 + <a-col :span="24">
  12 + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode">
  13 + <a-input v-model="model.companyCode" placeholder="请输入货主" ></a-input>
  14 + </a-form-model-item>
  15 + </a-col>
  16 + <a-col :span="24">
  17 + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
  18 + <a-input v-model="model.materialCode" placeholder="请输入物料编码" ></a-input>
  19 + </a-form-model-item>
  20 + </a-col>
  21 + <a-col :span="24">
  22 + <a-form-model-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName">
  23 + <a-input v-model="model.materialName" placeholder="请输入物料名称" ></a-input>
  24 + </a-form-model-item>
  25 + </a-col>
  26 + <a-col :span="24">
  27 + <a-form-model-item label="物料单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialUnit">
  28 + <a-input v-model="model.materialUnit" placeholder="请输入物料单位" ></a-input>
  29 + </a-form-model-item>
  30 + </a-col>
  31 + <a-col :span="24">
  32 + <a-form-model-item label="存放数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty">
  33 + <a-input-number v-model="model.qty" placeholder="请输入存放数量" style="width: 100%" />
  34 + </a-form-model-item>
  35 + </a-col>
  36 + <a-col :span="24">
  37 + <a-form-model-item label="是否可用" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enable">
  38 + <j-dict-select-tag type="list" v-model="model.enable" dictCode="enable_status" placeholder="请选择是否可用" />
  39 + </a-form-model-item>
  40 + </a-col>
  41 + </a-row>
  42 + </a-form-model>
  43 + </j-form-container>
  44 + </a-spin>
  45 +</template>
  46 +
  47 +<script>
  48 +
  49 + import { httpAction, getAction } from '@/api/manage'
  50 + import { validateDuplicateValue } from '@/utils/util'
  51 +
  52 + export default {
  53 + name: 'ContainerCapacityForm',
  54 + components: {
  55 + },
  56 + props: {
  57 + //表单禁用
  58 + disabled: {
  59 + type: Boolean,
  60 + default: false,
  61 + required: false
  62 + }
  63 + },
  64 + data () {
  65 + return {
  66 + model:{
  67 + },
  68 + labelCol: {
  69 + xs: { span: 24 },
  70 + sm: { span: 5 },
  71 + },
  72 + wrapperCol: {
  73 + xs: { span: 24 },
  74 + sm: { span: 16 },
  75 + },
  76 + confirmLoading: false,
  77 + validatorRules: {
  78 + containerTypeCode: [
  79 + { required: true, message: '请输入容器类型!'},
  80 + ],
  81 + materialCode: [
  82 + { required: true, message: '请输入物料编码!'},
  83 + ],
  84 + qty: [
  85 + { required: true, message: '请输入存放数量!'},
  86 + ],
  87 + enable: [
  88 + { required: true, message: '请输入是否可用!'},
  89 + ],
  90 + },
  91 + url: {
  92 + add: "/config/containerCapacity/add",
  93 + edit: "/config/containerCapacity/edit",
  94 + queryById: "/config/containerCapacity/queryById"
  95 + }
  96 + }
  97 + },
  98 + computed: {
  99 + formDisabled(){
  100 + return this.disabled
  101 + },
  102 + },
  103 + created () {
  104 + //备份model原始值
  105 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  106 + },
  107 + methods: {
  108 + add () {
  109 + this.edit(this.modelDefault);
  110 + },
  111 + edit (record) {
  112 + this.model = Object.assign({}, record);
  113 + this.visible = true;
  114 + },
  115 + submitForm () {
  116 + const that = this;
  117 + // 触发表单验证
  118 + this.$refs.form.validate(valid => {
  119 + if (valid) {
  120 + that.confirmLoading = true;
  121 + let httpurl = '';
  122 + let method = '';
  123 + if(!this.model.id){
  124 + httpurl+=this.url.add;
  125 + method = 'post';
  126 + }else{
  127 + httpurl+=this.url.edit;
  128 + method = 'put';
  129 + }
  130 + httpAction(httpurl,this.model,method).then((res)=>{
  131 + if(res.success){
  132 + that.$message.success(res.message);
  133 + that.$emit('ok');
  134 + }else{
  135 + that.$message.warning(res.message);
  136 + }
  137 + }).finally(() => {
  138 + that.confirmLoading = false;
  139 + })
  140 + }
  141 +
  142 + })
  143 + },
  144 + }
  145 + }
  146 +</script>
0 147 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerCapacityModal.Style#Drawer.vue 0 → 100644
  1 +<template>
  2 + <a-drawer
  3 + :title="title"
  4 + :width="width"
  5 + placement="right"
  6 + :closable="false"
  7 + @close="close"
  8 + destroyOnClose
  9 + :visible="visible">
  10 + <container-capacity-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></container-capacity-form>
  11 + <div class="drawer-footer">
  12 + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
  13 + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
  14 + </div>
  15 + </a-drawer>
  16 +</template>
  17 +
  18 +<script>
  19 +
  20 + import ContainerCapacityForm from './ContainerCapacityForm'
  21 +
  22 + export default {
  23 + name: 'ContainerCapacityModal',
  24 + components: {
  25 + ContainerCapacityForm
  26 + },
  27 + data () {
  28 + return {
  29 + title:"操作",
  30 + width:800,
  31 + visible: false,
  32 + disableSubmit: false
  33 + }
  34 + },
  35 + methods: {
  36 + add () {
  37 + this.visible=true
  38 + this.$nextTick(()=>{
  39 + this.$refs.realForm.add();
  40 + })
  41 + },
  42 + edit (record) {
  43 + this.visible=true
  44 + this.$nextTick(()=>{
  45 + this.$refs.realForm.edit(record);
  46 + });
  47 + },
  48 + close () {
  49 + this.$emit('close');
  50 + this.visible = false;
  51 + },
  52 + submitCallback(){
  53 + this.$emit('ok');
  54 + this.visible = false;
  55 + },
  56 + handleOk () {
  57 + this.$refs.realForm.submitForm();
  58 + },
  59 + handleCancel () {
  60 + this.close()
  61 + }
  62 + }
  63 + }
  64 +</script>
  65 +
  66 +<style lang="less" scoped>
  67 +/** Button按钮间距 */
  68 + .ant-btn {
  69 + margin-left: 30px;
  70 + margin-bottom: 30px;
  71 + float: right;
  72 + }
  73 + .drawer-footer{
  74 + position: absolute;
  75 + bottom: -8px;
  76 + width: 100%;
  77 + border-top: 1px solid #e8e8e8;
  78 + padding: 10px 16px;
  79 + text-align: right;
  80 + left: 0;
  81 + background: #fff;
  82 + border-radius: 0 0 2px 2px;
  83 + }
  84 +</style>
0 85 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerCapacityModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + switchFullscreen
  7 + @ok="handleOk"
  8 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <container-capacity-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></container-capacity-form>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import ContainerCapacityForm from './ContainerCapacityForm'
  18 + export default {
  19 + name: 'ContainerCapacityModal',
  20 + components: {
  21 + ContainerCapacityForm
  22 + },
  23 + data () {
  24 + return {
  25 + title:'',
  26 + width:800,
  27 + visible: false,
  28 + disableSubmit: false
  29 + }
  30 + },
  31 + methods: {
  32 + add () {
  33 + this.visible=true
  34 + this.$nextTick(()=>{
  35 + this.$refs.realForm.add();
  36 + })
  37 + },
  38 + edit (record) {
  39 + this.visible=true
  40 + this.$nextTick(()=>{
  41 + this.$refs.realForm.edit(record);
  42 + })
  43 + },
  44 + close () {
  45 + this.$emit('close');
  46 + this.visible = false;
  47 + },
  48 + handleOk () {
  49 + this.$refs.realForm.submitForm();
  50 + },
  51 + submitCallback(){
  52 + this.$emit('ok');
  53 + this.visible = false;
  54 + },
  55 + handleCancel () {
  56 + this.close()
  57 + }
  58 + }
  59 + }
  60 +</script>
0 61 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerForm.vue 0 → 100644
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-row>
  6 + <a-col :span="24">
  7 + <a-form-model-item label="容器类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerTypeCode">
  8 + <a-select
  9 + show-search
  10 + placeholder="请选择容器类型"
  11 + option-filter-prop="children"
  12 + :filter-option="filterOption"
  13 + v-model="model.containerTypeCode">
  14 + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option>
  15 + </a-select>
  16 + </a-form-model-item>
  17 + </a-col>
  18 + <a-col :span="24">
  19 + <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userdef1">
  20 + <a-input v-model="model.userdef1" placeholder="请输入数量" ></a-input>
  21 + </a-form-model-item>
  22 + </a-col>
  23 + </a-row>
  24 + </a-form-model>
  25 + </j-form-container>
  26 + </a-spin>
  27 +</template>
  28 +
  29 +<script>
  30 +
  31 + import { httpAction, getAction } from '@/api/manage'
  32 + import { validateDuplicateValue } from '@/utils/util'
  33 + import {getZoneList} from '@/api/api'
  34 + import {getContainerTypeList} from '@/api/api'
  35 +
  36 + export default {
  37 + name: 'ContainerForm',
  38 + components: {
  39 + },
  40 + props: {
  41 + //表单禁用
  42 + disabled: {
  43 + type: Boolean,
  44 + default: false,
  45 + required: false
  46 + }
  47 + },
  48 + data () {
  49 + return {
  50 + model:{
  51 + },
  52 + labelCol: {
  53 + xs: { span: 24 },
  54 + sm: { span: 5 },
  55 + },
  56 + wrapperCol: {
  57 + xs: { span: 24 },
  58 + sm: { span: 16 },
  59 + },
  60 + confirmLoading: false,
  61 + zoneList:[],
  62 + containerTypeList:[],
  63 + validatorRules: {
  64 + containerTypeCode: [
  65 + { required: true, message: '请选择容器类型!'},
  66 + ],
  67 + userdef1: [
  68 + { required: true, message: '请选择数量!'},
  69 + ],
  70 + },
  71 + url: {
  72 + add: "/config/container/add",
  73 + edit: "/config/container/edit",
  74 + queryById: "/config/container/queryById"
  75 + }
  76 + }
  77 + },
  78 + computed: {
  79 + formDisabled(){
  80 + return this.disabled
  81 + },
  82 + },
  83 + created () {
  84 + //备份model原始值
  85 + this.model.status = "empty";
  86 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  87 + this.loadFrom();
  88 + },
  89 + methods: {
  90 + add () {
  91 + this.edit(this.modelDefault);
  92 + },
  93 + edit (record) {
  94 + this.model = Object.assign({}, record);
  95 + this.visible = true;
  96 + },
  97 + loadFrom() {
  98 + getZoneList().then((res) => {
  99 + if (res.success) {
  100 + this.zoneList = res.result
  101 + }
  102 + });
  103 + getContainerTypeList().then((res) => {
  104 + if (res.success) {
  105 + this.containerTypeList = res.result
  106 + }
  107 + });
  108 + },
  109 + submitForm () {
  110 + const that = this;
  111 + // 触发表单验证
  112 + this.$refs.form.validate(valid => {
  113 + if (valid) {
  114 + that.confirmLoading = true;
  115 + let httpurl = '';
  116 + let method = '';
  117 + if(!this.model.id){
  118 + httpurl+=this.url.add;
  119 + method = 'post';
  120 + }else{
  121 + httpurl+=this.url.edit;
  122 + method = 'put';
  123 + }
  124 + httpAction(httpurl,this.model,method).then((res)=>{
  125 + if(res.success){
  126 + that.$message.success(res.message);
  127 + that.$emit('ok');
  128 + }else{
  129 + that.$message.warning(res.message);
  130 + }
  131 + }).finally(() => {
  132 + that.confirmLoading = false;
  133 + })
  134 + }
  135 +
  136 + })
  137 + },
  138 + }
  139 + }
  140 +</script>
0 141 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerModal.Style#Drawer.vue 0 → 100644
  1 +<template>
  2 + <a-drawer
  3 + :title="title"
  4 + :width="width"
  5 + placement="right"
  6 + :closable="false"
  7 + @close="close"
  8 + destroyOnClose
  9 + :visible="visible">
  10 + <container-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></container-form>
  11 + <div class="drawer-footer">
  12 + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
  13 + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
  14 + </div>
  15 + </a-drawer>
  16 +</template>
  17 +
  18 +<script>
  19 +
  20 + import ContainerForm from './ContainerForm'
  21 +
  22 + export default {
  23 + name: 'ContainerModal',
  24 + components: {
  25 + ContainerForm
  26 + },
  27 + data () {
  28 + return {
  29 + title:"操作",
  30 + width:800,
  31 + visible: false,
  32 + disableSubmit: false
  33 + }
  34 + },
  35 + methods: {
  36 + add () {
  37 + this.visible=true
  38 + this.$nextTick(()=>{
  39 + this.$refs.realForm.add();
  40 + })
  41 + },
  42 + edit (record) {
  43 + this.visible=true
  44 + this.$nextTick(()=>{
  45 + this.$refs.realForm.edit(record);
  46 + });
  47 + },
  48 + close () {
  49 + this.$emit('close');
  50 + this.visible = false;
  51 + },
  52 + submitCallback(){
  53 + this.$emit('ok');
  54 + this.visible = false;
  55 + },
  56 + handleOk () {
  57 + this.$refs.realForm.submitForm();
  58 + },
  59 + handleCancel () {
  60 + this.close()
  61 + }
  62 + }
  63 + }
  64 +</script>
  65 +
  66 +<style lang="less" scoped>
  67 +/** Button按钮间距 */
  68 + .ant-btn {
  69 + margin-left: 30px;
  70 + margin-bottom: 30px;
  71 + float: right;
  72 + }
  73 + .drawer-footer{
  74 + position: absolute;
  75 + bottom: -8px;
  76 + width: 100%;
  77 + border-top: 1px solid #e8e8e8;
  78 + padding: 10px 16px;
  79 + text-align: right;
  80 + left: 0;
  81 + background: #fff;
  82 + border-radius: 0 0 2px 2px;
  83 + }
  84 +</style>
0 85 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + switchFullscreen
  7 + @ok="handleOk"
  8 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <container-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></container-form>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import ContainerForm from './ContainerForm'
  18 + export default {
  19 + name: 'ContainerModal',
  20 + components: {
  21 + ContainerForm
  22 + },
  23 + data () {
  24 + return {
  25 + title:'',
  26 + width:800,
  27 + visible: false,
  28 + disableSubmit: false
  29 + }
  30 + },
  31 + methods: {
  32 + add () {
  33 + this.visible=true
  34 + this.$nextTick(()=>{
  35 + this.$refs.realForm.add();
  36 + })
  37 + },
  38 + edit (record) {
  39 + this.visible=true
  40 + this.$nextTick(()=>{
  41 + this.$refs.realForm.edit(record);
  42 + })
  43 + },
  44 + close () {
  45 + this.$emit('close');
  46 + this.visible = false;
  47 + },
  48 + handleOk () {
  49 + this.$refs.realForm.submitForm();
  50 + },
  51 + submitCallback(){
  52 + this.$emit('ok');
  53 + this.visible = false;
  54 + },
  55 + handleCancel () {
  56 + this.close()
  57 + }
  58 + }
  59 + }
  60 +</script>
0 61 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerTypeForm.vue 0 → 100644
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-row>
  6 + <a-col :span="24">
  7 + <a-form-model-item label="编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
  8 + <a-input v-model="model.code" placeholder="请输入编码" ></a-input>
  9 + </a-form-model-item>
  10 + </a-col>
  11 + <a-col :span="24">
  12 + <a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
  13 + <a-input v-model="model.name" placeholder="请输入名称" ></a-input>
  14 + </a-form-model-item>
  15 + </a-col>
  16 + <a-col :span="24">
  17 + <a-form-model-item label="货主编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode">
  18 + <a-input v-model="model.companyCode" placeholder="请输入货主编码" ></a-input>
  19 + </a-form-model-item>
  20 + </a-col>
  21 + <a-col :span="24">
  22 + <a-form-model-item label="绑定的库位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationType">
  23 + <a-input v-model="model.locationType" placeholder="请输入绑定的库位类型" ></a-input>
  24 + </a-form-model-item>
  25 + </a-col>
  26 + <a-col :span="24">
  27 + <a-form-model-item label="长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="length">
  28 + <a-input-number v-model="model.length" placeholder="请输入长" style="width: 100%" />
  29 + </a-form-model-item>
  30 + </a-col>
  31 + <a-col :span="24">
  32 + <a-form-model-item label="宽" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="width">
  33 + <a-input-number v-model="model.width" placeholder="请输入宽" style="width: 100%" />
  34 + </a-form-model-item>
  35 + </a-col>
  36 + <a-col :span="24">
  37 + <a-form-model-item label="高" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="height">
  38 + <a-input-number v-model="model.height" placeholder="请输入高" style="width: 100%" />
  39 + </a-form-model-item>
  40 + </a-col>
  41 + <a-col :span="24">
  42 + <a-form-model-item label="空容器重量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="emptyweight">
  43 + <a-input-number v-model="model.emptyweight" placeholder="请输入空容器重量" style="width: 100%" />
  44 + </a-form-model-item>
  45 + </a-col>
  46 + <a-col :span="24">
  47 + <a-form-model-item label="容器最大承重" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maxweight">
  48 + <a-input-number v-model="model.maxweight" placeholder="请输入容器最大承重" style="width: 100%" />
  49 + </a-form-model-item>
  50 + </a-col>
  51 + </a-row>
  52 + </a-form-model>
  53 + </j-form-container>
  54 + </a-spin>
  55 +</template>
  56 +
  57 +<script>
  58 +
  59 + import { httpAction, getAction } from '@/api/manage'
  60 + import { validateDuplicateValue } from '@/utils/util'
  61 +
  62 + export default {
  63 + name: 'ContainerTypeForm',
  64 + components: {
  65 + },
  66 + props: {
  67 + //表单禁用
  68 + disabled: {
  69 + type: Boolean,
  70 + default: false,
  71 + required: false
  72 + }
  73 + },
  74 + data () {
  75 + return {
  76 + model:{
  77 + },
  78 + labelCol: {
  79 + xs: { span: 24 },
  80 + sm: { span: 5 },
  81 + },
  82 + wrapperCol: {
  83 + xs: { span: 24 },
  84 + sm: { span: 16 },
  85 + },
  86 + confirmLoading: false,
  87 + validatorRules: {
  88 + code: [
  89 + { required: true, message: '请输入编码!'},
  90 + ],
  91 + name: [
  92 + { required: true, message: '请输入名称!'},
  93 + ],
  94 + },
  95 + url: {
  96 + add: "/config/containerType/add",
  97 + edit: "/config/containerType/edit",
  98 + queryById: "/config/containerType/queryById"
  99 + }
  100 + }
  101 + },
  102 + computed: {
  103 + formDisabled(){
  104 + return this.disabled
  105 + },
  106 + },
  107 + created () {
  108 + //备份model原始值
  109 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  110 + },
  111 + methods: {
  112 + add () {
  113 + this.edit(this.modelDefault);
  114 + },
  115 + edit (record) {
  116 + this.model = Object.assign({}, record);
  117 + this.visible = true;
  118 + },
  119 + submitForm () {
  120 + const that = this;
  121 + // 触发表单验证
  122 + this.$refs.form.validate(valid => {
  123 + if (valid) {
  124 + that.confirmLoading = true;
  125 + let httpurl = '';
  126 + let method = '';
  127 + if(!this.model.id){
  128 + httpurl+=this.url.add;
  129 + method = 'post';
  130 + }else{
  131 + httpurl+=this.url.edit;
  132 + method = 'put';
  133 + }
  134 + httpAction(httpurl,this.model,method).then((res)=>{
  135 + if(res.success){
  136 + that.$message.success(res.message);
  137 + that.$emit('ok');
  138 + }else{
  139 + that.$message.warning(res.message);
  140 + }
  141 + }).finally(() => {
  142 + that.confirmLoading = false;
  143 + })
  144 + }
  145 +
  146 + })
  147 + },
  148 + }
  149 + }
  150 +</script>
0 151 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerTypeModal.Style#Drawer.vue 0 → 100644
  1 +<template>
  2 + <a-drawer
  3 + :title="title"
  4 + :width="width"
  5 + placement="right"
  6 + :closable="false"
  7 + @close="close"
  8 + destroyOnClose
  9 + :visible="visible">
  10 + <container-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></container-type-form>
  11 + <div class="drawer-footer">
  12 + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
  13 + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
  14 + </div>
  15 + </a-drawer>
  16 +</template>
  17 +
  18 +<script>
  19 +
  20 + import ContainerTypeForm from './ContainerTypeForm'
  21 +
  22 + export default {
  23 + name: 'ContainerTypeModal',
  24 + components: {
  25 + ContainerTypeForm
  26 + },
  27 + data () {
  28 + return {
  29 + title:"操作",
  30 + width:800,
  31 + visible: false,
  32 + disableSubmit: false
  33 + }
  34 + },
  35 + methods: {
  36 + add () {
  37 + this.visible=true
  38 + this.$nextTick(()=>{
  39 + this.$refs.realForm.add();
  40 + })
  41 + },
  42 + edit (record) {
  43 + this.visible=true
  44 + this.$nextTick(()=>{
  45 + this.$refs.realForm.edit(record);
  46 + });
  47 + },
  48 + close () {
  49 + this.$emit('close');
  50 + this.visible = false;
  51 + },
  52 + submitCallback(){
  53 + this.$emit('ok');
  54 + this.visible = false;
  55 + },
  56 + handleOk () {
  57 + this.$refs.realForm.submitForm();
  58 + },
  59 + handleCancel () {
  60 + this.close()
  61 + }
  62 + }
  63 + }
  64 +</script>
  65 +
  66 +<style lang="less" scoped>
  67 +/** Button按钮间距 */
  68 + .ant-btn {
  69 + margin-left: 30px;
  70 + margin-bottom: 30px;
  71 + float: right;
  72 + }
  73 + .drawer-footer{
  74 + position: absolute;
  75 + bottom: -8px;
  76 + width: 100%;
  77 + border-top: 1px solid #e8e8e8;
  78 + padding: 10px 16px;
  79 + text-align: right;
  80 + left: 0;
  81 + background: #fff;
  82 + border-radius: 0 0 2px 2px;
  83 + }
  84 +</style>
0 85 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerTypeModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + switchFullscreen
  7 + @ok="handleOk"
  8 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <container-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></container-type-form>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import ContainerTypeForm from './ContainerTypeForm'
  18 + export default {
  19 + name: 'ContainerTypeModal',
  20 + components: {
  21 + ContainerTypeForm
  22 + },
  23 + data () {
  24 + return {
  25 + title:'',
  26 + width:800,
  27 + visible: false,
  28 + disableSubmit: false
  29 + }
  30 + },
  31 + methods: {
  32 + add () {
  33 + this.visible=true
  34 + this.$nextTick(()=>{
  35 + this.$refs.realForm.add();
  36 + })
  37 + },
  38 + edit (record) {
  39 + this.visible=true
  40 + this.$nextTick(()=>{
  41 + this.$refs.realForm.edit(record);
  42 + })
  43 + },
  44 + close () {
  45 + this.$emit('close');
  46 + this.visible = false;
  47 + },
  48 + handleOk () {
  49 + this.$refs.realForm.submitForm();
  50 + },
  51 + submitCallback(){
  52 + this.$emit('ok');
  53 + this.visible = false;
  54 + },
  55 + handleCancel () {
  56 + this.close()
  57 + }
  58 + }
  59 + }
  60 +</script>
0 61 \ No newline at end of file
... ...
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/MaterialForm.vue
... ... @@ -55,7 +55,7 @@
55 55 </a-col>
56 56 <a-col :span="24">
57 57 <a-form-model-item label="可用状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enable">
58   - <j-dict-select-tag type="list" v-model="model.enable" dictCode="enable_status" placeholder="请选择可用状态" />
  58 + <j-dict-select-tag type="list" v-model="model.enable" dictCode="enable_status" :trigger-change="true"/>
59 59 </a-form-model-item>
60 60 </a-col>
61 61 </a-row>
... ... @@ -127,6 +127,8 @@
127 127 methods: {
128 128 add () {
129 129 this.edit(this.modelDefault);
  130 + model.enable = 1;
  131 + this.form.setFieldsValue({enable:1});
130 132 },
131 133 edit (record) {
132 134 this.model = Object.assign({}, record);
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.container.controller;
  2 +
  3 +import java.util.Arrays;
  4 +import java.util.List;
  5 +import java.util.Map;
  6 +import java.util.stream.Collectors;
  7 +import java.io.IOException;
  8 +import java.io.UnsupportedEncodingException;
  9 +import java.net.URLDecoder;
  10 +import javax.servlet.http.HttpServletRequest;
  11 +import javax.servlet.http.HttpServletResponse;
  12 +import org.jeecg.common.api.vo.Result;
  13 +import org.jeecg.common.system.query.QueryGenerator;
  14 +import org.jeecg.common.system.util.JwtUtil;
  15 +import org.jeecg.common.util.oConvertUtils;
  16 +
  17 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  18 +import com.baomidou.mybatisplus.core.metadata.IPage;
  19 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  20 +import lombok.extern.slf4j.Slf4j;
  21 +
  22 +import org.jeecg.modules.wms.config.container.entity.Container;
  23 +import org.jeecg.modules.wms.config.container.service.IContainerService;
  24 +import org.jeecg.utils.StringUtils;
  25 +import org.jeecgframework.poi.excel.ExcelImportUtil;
  26 +import org.jeecgframework.poi.excel.def.NormalExcelConstants;
  27 +import org.jeecgframework.poi.excel.entity.ExportParams;
  28 +import org.jeecgframework.poi.excel.entity.ImportParams;
  29 +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
  30 +import org.jeecg.common.system.base.controller.JeecgController;
  31 +import org.springframework.beans.factory.annotation.Autowired;
  32 +import org.springframework.web.bind.annotation.*;
  33 +import org.springframework.web.multipart.MultipartFile;
  34 +import org.springframework.web.multipart.MultipartHttpServletRequest;
  35 +import org.springframework.web.servlet.ModelAndView;
  36 +import com.alibaba.fastjson.JSON;
  37 +import io.swagger.annotations.Api;
  38 +import io.swagger.annotations.ApiOperation;
  39 +import org.jeecg.common.aspect.annotation.AutoLog;
  40 +
  41 + /**
  42 + * @Description: 容器管理
  43 + * @Author: jeecg-boot
  44 + * @Date: 2022-10-25
  45 + * @Version: V1.0
  46 + */
  47 +@Api(tags="容器管理")
  48 +@RestController
  49 +@RequestMapping("/config/container")
  50 +@Slf4j
  51 +public class ContainerController extends JeecgController<Container, IContainerService> {
  52 + @Autowired
  53 + private IContainerService containerService;
  54 +
  55 + /**
  56 + * 分页列表查询
  57 + *
  58 + * @param container
  59 + * @param pageNo
  60 + * @param pageSize
  61 + * @param req
  62 + * @return
  63 + */
  64 + //@AutoLog(value = "容器管理-分页列表查询")
  65 + @ApiOperation(value="容器管理-分页列表查询", notes="容器管理-分页列表查询")
  66 + @GetMapping(value = "/list")
  67 + public Result<IPage<Container>> queryPageList(Container container,
  68 + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
  69 + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
  70 + HttpServletRequest req) {
  71 + QueryWrapper<Container> queryWrapper = QueryGenerator.initQueryWrapper(container, null);
  72 + Page<Container> page = new Page<Container>(pageNo, pageSize);
  73 + IPage<Container> pageList = containerService.page(page, queryWrapper);
  74 + return Result.OK(pageList);
  75 + }
  76 +
  77 + /**
  78 + * 添加
  79 + *
  80 + * @param container
  81 + * @return
  82 + */
  83 + @AutoLog(value = "容器管理-添加")
  84 + @ApiOperation(value="容器管理-添加", notes="容器管理-添加")
  85 + @PostMapping(value = "/add")
  86 + public Result<String> add(@RequestBody Container container, HttpServletRequest req) {
  87 + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
  88 + if(StringUtils.isNotEmpty(warehouseCode)) {
  89 + container.setWarehouseCode(warehouseCode);
  90 + }
  91 + int number = Integer.parseInt(container.getUserdef1());
  92 + Result result = containerService.batchAddContainers(container, number);
  93 + return result;
  94 + }
  95 +
  96 + /**
  97 + * 编辑
  98 + *
  99 + * @param container
  100 + * @return
  101 + */
  102 + @AutoLog(value = "容器管理-编辑")
  103 + @ApiOperation(value="容器管理-编辑", notes="容器管理-编辑")
  104 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
  105 + public Result<String> edit(@RequestBody Container container) {
  106 + containerService.updateById(container);
  107 + return Result.OK("编辑成功!");
  108 + }
  109 +
  110 + /**
  111 + * 通过id删除
  112 + *
  113 + * @param id
  114 + * @return
  115 + */
  116 + @AutoLog(value = "容器管理-通过id删除")
  117 + @ApiOperation(value="容器管理-通过id删除", notes="容器管理-通过id删除")
  118 + @DeleteMapping(value = "/delete")
  119 + public Result<String> delete(@RequestParam(name="id",required=true) String id) {
  120 + containerService.removeById(id);
  121 + return Result.OK("删除成功!");
  122 + }
  123 +
  124 + /**
  125 + * 批量删除
  126 + *
  127 + * @param ids
  128 + * @return
  129 + */
  130 + @AutoLog(value = "容器管理-批量删除")
  131 + @ApiOperation(value="容器管理-批量删除", notes="容器管理-批量删除")
  132 + @DeleteMapping(value = "/deleteBatch")
  133 + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
  134 + this.containerService.removeByIds(Arrays.asList(ids.split(",")));
  135 + return Result.OK("批量删除成功!");
  136 + }
  137 +
  138 + /**
  139 + * 通过id查询
  140 + *
  141 + * @param id
  142 + * @return
  143 + */
  144 + //@AutoLog(value = "容器管理-通过id查询")
  145 + @ApiOperation(value="容器管理-通过id查询", notes="容器管理-通过id查询")
  146 + @GetMapping(value = "/queryById")
  147 + public Result<Container> queryById(@RequestParam(name="id",required=true) String id) {
  148 + Container container = containerService.getById(id);
  149 + if(container==null) {
  150 + return Result.error("未找到对应数据");
  151 + }
  152 + return Result.OK(container);
  153 + }
  154 +
  155 + /**
  156 + * 导出excel
  157 + *
  158 + * @param request
  159 + * @param container
  160 + */
  161 + @RequestMapping(value = "/exportXls")
  162 + public ModelAndView exportXls(HttpServletRequest request, Container container) {
  163 + return super.exportXls(request, container, Container.class, "容器管理");
  164 + }
  165 +
  166 + /**
  167 + * 通过excel导入数据
  168 + *
  169 + * @param request
  170 + * @param response
  171 + * @return
  172 + */
  173 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  174 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  175 + return super.importExcel(request, response, Container.class);
  176 + }
  177 +
  178 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/entity/Container.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.container.entity;
  2 +
  3 +import java.io.Serializable;
  4 +import java.io.UnsupportedEncodingException;
  5 +import java.util.Date;
  6 +import java.math.BigDecimal;
  7 +import com.baomidou.mybatisplus.annotation.IdType;
  8 +import com.baomidou.mybatisplus.annotation.TableId;
  9 +import com.baomidou.mybatisplus.annotation.TableName;
  10 +import lombok.Data;
  11 +import com.fasterxml.jackson.annotation.JsonFormat;
  12 +import org.springframework.format.annotation.DateTimeFormat;
  13 +import org.jeecgframework.poi.excel.annotation.Excel;
  14 +import org.jeecg.common.aspect.annotation.Dict;
  15 +import io.swagger.annotations.ApiModel;
  16 +import io.swagger.annotations.ApiModelProperty;
  17 +import lombok.EqualsAndHashCode;
  18 +import lombok.experimental.Accessors;
  19 +
  20 +/**
  21 + * @Description: 容器管理
  22 + * @Author: jeecg-boot
  23 + * @Date: 2022-10-25
  24 + * @Version: V1.0
  25 + */
  26 +@Data
  27 +@TableName("container")
  28 +@Accessors(chain = true)
  29 +@EqualsAndHashCode(callSuper = false)
  30 +@ApiModel(value="container对象", description="容器管理")
  31 +public class Container implements Serializable {
  32 + private static final long serialVersionUID = 1L;
  33 +
  34 + /**主键*/
  35 + @TableId(value = "id", type = IdType.AUTO)
  36 + @ApiModelProperty(value = "主键")
  37 + private String id;
  38 + /**容器编码*/
  39 + @Excel(name = "容器编码", width = 15)
  40 + @ApiModelProperty(value = "容器编码")
  41 + private String code;
  42 + /**仓库编码*/
  43 + @Excel(name = "仓库编码", width = 15)
  44 + @ApiModelProperty(value = "仓库编码")
  45 + private String warehouseCode;
  46 + /**货主*/
  47 + @Excel(name = "货主", width = 15)
  48 + @ApiModelProperty(value = "货主")
  49 + private String companyCode;
  50 + /**库位编码*/
  51 + @Excel(name = "库位编码", width = 15)
  52 + @ApiModelProperty(value = "库位编码")
  53 + private String locationCode;
  54 + /**库区编码*/
  55 + @Excel(name = "库区编码", width = 15)
  56 + @ApiModelProperty(value = "库区编码")
  57 + private String zoneCode;
  58 + /**容器类型*/
  59 + @Excel(name = "容器类型", width = 15)
  60 + @ApiModelProperty(value = "容器类型")
  61 + private String containerTypeCode;
  62 + /**容器状态*/
  63 + @Excel(name = "容器状态", width = 15, dicCode = "container_status")
  64 + @Dict(dicCode = "container_status")
  65 + @ApiModelProperty(value = "容器状态")
  66 + private String status;
  67 + /**备用字段1*/
  68 + @Excel(name = "备用字段1", width = 15)
  69 + @ApiModelProperty(value = "备用字段1")
  70 + private String userdef1;
  71 + /**备用字段2*/
  72 + @Excel(name = "备用字段2", width = 15)
  73 + @ApiModelProperty(value = "备用字段2")
  74 + private String userdef2;
  75 + /**备用字段3*/
  76 + @Excel(name = "备用字段3", width = 15)
  77 + @ApiModelProperty(value = "备用字段3")
  78 + private String userdef3;
  79 + /**创建人*/
  80 + @ApiModelProperty(value = "创建人")
  81 + private String createBy;
  82 + /**创建日期*/
  83 + @ApiModelProperty(value = "创建日期")
  84 + private Date createTime;
  85 + /**更新人*/
  86 + @ApiModelProperty(value = "更新人")
  87 + private String updateBy;
  88 + /**更新日期*/
  89 + @ApiModelProperty(value = "更新日期")
  90 + private Date updateTime;
  91 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/mapper/ContainerMapper.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.container.mapper;
  2 +
  3 +import java.util.List;
  4 +
  5 +import org.apache.ibatis.annotations.Param;
  6 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  7 +import org.jeecg.modules.wms.config.container.entity.Container;
  8 +
  9 +/**
  10 + * @Description: 容器管理
  11 + * @Author: jeecg-boot
  12 + * @Date: 2022-10-25
  13 + * @Version: V1.0
  14 + */
  15 +public interface ContainerMapper extends BaseMapper<Container> {
  16 +
  17 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/mapper/xml/ContainerMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="org.jeecg.modules.wms.config.container.mapper.ContainerMapper">
  4 +
  5 +</mapper>
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.container.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import org.jeecg.common.api.vo.Result;
  5 +import org.jeecg.modules.wms.config.container.entity.Container;
  6 +
  7 +/**
  8 + * @Description: 容器管理
  9 + * @Author: jeecg-boot
  10 + * @Date: 2022-10-25
  11 + * @Version: V1.0
  12 + */
  13 +public interface IContainerService extends IService<Container> {
  14 +
  15 + Result batchAddContainers(Container container, int number);
  16 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.container.service.impl;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import org.jeecg.common.api.vo.Result;
  6 +import org.jeecg.modules.wms.config.container.entity.Container;
  7 +import org.jeecg.modules.wms.config.container.mapper.ContainerMapper;
  8 +import org.jeecg.modules.wms.config.container.service.IContainerService;
  9 +import org.jeecg.modules.wms.config.containerType.service.IContainerTypeService;
  10 +import org.springframework.stereotype.Service;
  11 +
  12 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.ArrayList;
  16 +import java.util.Date;
  17 +import java.util.List;
  18 +
  19 +/**
  20 + * @Description: 容器管理
  21 + * @Author: jeecg-boot
  22 + * @Date: 2022-10-25
  23 + * @Version: V1.0
  24 + */
  25 +@Service
  26 +public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container> implements IContainerService {
  27 +
  28 + @Resource
  29 + IContainerTypeService containerTypeService;
  30 + @Resource
  31 + IContainerService containerService;
  32 +
  33 + @Override
  34 + public Result batchAddContainers(Container container, int number) {
  35 + String containerTypeCode = container.getContainerTypeCode();
  36 + String warehouseCode = container.getWarehouseCode();
  37 + int startNumber = getStartNumber(containerTypeCode,
  38 + container.getWarehouseCode());
  39 + List<Container> containerList = new ArrayList<>();
  40 + for(int i = 0; i < number; i++) {
  41 + startNumber++;
  42 + Container container1 = new Container();
  43 + container1.setContainerTypeCode(containerTypeCode);
  44 + String code = String.format("%s%05d", containerTypeCode, startNumber);
  45 + container1.setCode(code);
  46 + container1.setStatus("empty");
  47 + container1.setWarehouseCode(warehouseCode);
  48 + containerList.add(container1);
  49 + }
  50 + boolean result = containerService.saveBatch(containerList);
  51 + if(result) {
  52 + Result.OK("添加成功!");
  53 + }
  54 + return Result.error("添加失败!");
  55 + }
  56 +
  57 +
  58 + private int getStartNumber(String containerTypeCode, String warehouseCode) {
  59 + LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery();
  60 + containerLambdaQueryWrapper.eq(Container::getContainerTypeCode, containerTypeCode)
  61 + .eq(Container::getWarehouseCode, warehouseCode)
  62 + .orderByDesc(Container::getId).last("Limit 1");
  63 + Container container = containerService.getOne(containerLambdaQueryWrapper);
  64 + //如果指定类型的最后的code存在,那么 code = 容器类型 + (排序号 + 1)
  65 + if (container != null && container.getCode() != null) {
  66 + Integer number = Integer.valueOf(container.getCode().substring(container.getCode().length() - 5, container.getCode().length()));
  67 + return number;
  68 + } else {
  69 + return 0;
  70 + }
  71 + }
  72 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerCapacity/controller/ContainerCapacityController.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.containerCapacity.controller;
  2 +
  3 +import java.util.Arrays;
  4 +import java.util.List;
  5 +import java.util.Map;
  6 +import java.util.stream.Collectors;
  7 +import java.io.IOException;
  8 +import java.io.UnsupportedEncodingException;
  9 +import java.net.URLDecoder;
  10 +import javax.servlet.http.HttpServletRequest;
  11 +import javax.servlet.http.HttpServletResponse;
  12 +import org.jeecg.common.api.vo.Result;
  13 +import org.jeecg.common.system.query.QueryGenerator;
  14 +import org.jeecg.common.util.oConvertUtils;
  15 +
  16 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  17 +import com.baomidou.mybatisplus.core.metadata.IPage;
  18 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  19 +import lombok.extern.slf4j.Slf4j;
  20 +
  21 +import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity;
  22 +import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService;
  23 +import org.jeecgframework.poi.excel.ExcelImportUtil;
  24 +import org.jeecgframework.poi.excel.def.NormalExcelConstants;
  25 +import org.jeecgframework.poi.excel.entity.ExportParams;
  26 +import org.jeecgframework.poi.excel.entity.ImportParams;
  27 +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
  28 +import org.jeecg.common.system.base.controller.JeecgController;
  29 +import org.springframework.beans.factory.annotation.Autowired;
  30 +import org.springframework.web.bind.annotation.*;
  31 +import org.springframework.web.multipart.MultipartFile;
  32 +import org.springframework.web.multipart.MultipartHttpServletRequest;
  33 +import org.springframework.web.servlet.ModelAndView;
  34 +import com.alibaba.fastjson.JSON;
  35 +import io.swagger.annotations.Api;
  36 +import io.swagger.annotations.ApiOperation;
  37 +import org.jeecg.common.aspect.annotation.AutoLog;
  38 +
  39 + /**
  40 + * @Description: 容器容量管理
  41 + * @Author: jeecg-boot
  42 + * @Date: 2022-10-26
  43 + * @Version: V1.0
  44 + */
  45 +@Api(tags="容器容量管理")
  46 +@RestController
  47 +@RequestMapping("/config/containerCapacity")
  48 +@Slf4j
  49 +public class ContainerCapacityController extends JeecgController<ContainerCapacity, IContainerCapacityService> {
  50 + @Autowired
  51 + private IContainerCapacityService containerCapacityService;
  52 +
  53 + /**
  54 + * 分页列表查询
  55 + *
  56 + * @param containerCapacity
  57 + * @param pageNo
  58 + * @param pageSize
  59 + * @param req
  60 + * @return
  61 + */
  62 + //@AutoLog(value = "容器容量管理-分页列表查询")
  63 + @ApiOperation(value="容器容量管理-分页列表查询", notes="容器容量管理-分页列表查询")
  64 + @GetMapping(value = "/list")
  65 + public Result<IPage<ContainerCapacity>> queryPageList(ContainerCapacity containerCapacity,
  66 + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
  67 + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
  68 + HttpServletRequest req) {
  69 + QueryWrapper<ContainerCapacity> queryWrapper = QueryGenerator.initQueryWrapper(containerCapacity, req.getParameterMap());
  70 + Page<ContainerCapacity> page = new Page<ContainerCapacity>(pageNo, pageSize);
  71 + IPage<ContainerCapacity> pageList = containerCapacityService.page(page, queryWrapper);
  72 + return Result.OK(pageList);
  73 + }
  74 +
  75 + /**
  76 + * 添加
  77 + *
  78 + * @param containerCapacity
  79 + * @return
  80 + */
  81 + @AutoLog(value = "容器容量管理-添加")
  82 + @ApiOperation(value="容器容量管理-添加", notes="容器容量管理-添加")
  83 + @PostMapping(value = "/add")
  84 + public Result<String> add(@RequestBody ContainerCapacity containerCapacity) {
  85 + containerCapacityService.save(containerCapacity);
  86 + return Result.OK("添加成功!");
  87 + }
  88 +
  89 + /**
  90 + * 编辑
  91 + *
  92 + * @param containerCapacity
  93 + * @return
  94 + */
  95 + @AutoLog(value = "容器容量管理-编辑")
  96 + @ApiOperation(value="容器容量管理-编辑", notes="容器容量管理-编辑")
  97 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
  98 + public Result<String> edit(@RequestBody ContainerCapacity containerCapacity) {
  99 + containerCapacityService.updateById(containerCapacity);
  100 + return Result.OK("编辑成功!");
  101 + }
  102 +
  103 + /**
  104 + * 通过id删除
  105 + *
  106 + * @param id
  107 + * @return
  108 + */
  109 + @AutoLog(value = "容器容量管理-通过id删除")
  110 + @ApiOperation(value="容器容量管理-通过id删除", notes="容器容量管理-通过id删除")
  111 + @DeleteMapping(value = "/delete")
  112 + public Result<String> delete(@RequestParam(name="id",required=true) String id) {
  113 + containerCapacityService.removeById(id);
  114 + return Result.OK("删除成功!");
  115 + }
  116 +
  117 + /**
  118 + * 批量删除
  119 + *
  120 + * @param ids
  121 + * @return
  122 + */
  123 + @AutoLog(value = "容器容量管理-批量删除")
  124 + @ApiOperation(value="容器容量管理-批量删除", notes="容器容量管理-批量删除")
  125 + @DeleteMapping(value = "/deleteBatch")
  126 + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
  127 + this.containerCapacityService.removeByIds(Arrays.asList(ids.split(",")));
  128 + return Result.OK("批量删除成功!");
  129 + }
  130 +
  131 + /**
  132 + * 通过id查询
  133 + *
  134 + * @param id
  135 + * @return
  136 + */
  137 + //@AutoLog(value = "容器容量管理-通过id查询")
  138 + @ApiOperation(value="容器容量管理-通过id查询", notes="容器容量管理-通过id查询")
  139 + @GetMapping(value = "/queryById")
  140 + public Result<ContainerCapacity> queryById(@RequestParam(name="id",required=true) String id) {
  141 + ContainerCapacity containerCapacity = containerCapacityService.getById(id);
  142 + if(containerCapacity==null) {
  143 + return Result.error("未找到对应数据");
  144 + }
  145 + return Result.OK(containerCapacity);
  146 + }
  147 +
  148 + /**
  149 + * 导出excel
  150 + *
  151 + * @param request
  152 + * @param containerCapacity
  153 + */
  154 + @RequestMapping(value = "/exportXls")
  155 + public ModelAndView exportXls(HttpServletRequest request, ContainerCapacity containerCapacity) {
  156 + return super.exportXls(request, containerCapacity, ContainerCapacity.class, "容器容量管理");
  157 + }
  158 +
  159 + /**
  160 + * 通过excel导入数据
  161 + *
  162 + * @param request
  163 + * @param response
  164 + * @return
  165 + */
  166 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  167 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  168 + return super.importExcel(request, response, ContainerCapacity.class);
  169 + }
  170 +
  171 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerCapacity/entity/ContainerCapacity.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.containerCapacity.entity;
  2 +
  3 +import java.io.Serializable;
  4 +import java.io.UnsupportedEncodingException;
  5 +import java.util.Date;
  6 +import java.math.BigDecimal;
  7 +import com.baomidou.mybatisplus.annotation.IdType;
  8 +import com.baomidou.mybatisplus.annotation.TableId;
  9 +import com.baomidou.mybatisplus.annotation.TableName;
  10 +import lombok.Data;
  11 +import com.fasterxml.jackson.annotation.JsonFormat;
  12 +import org.springframework.format.annotation.DateTimeFormat;
  13 +import org.jeecgframework.poi.excel.annotation.Excel;
  14 +import org.jeecg.common.aspect.annotation.Dict;
  15 +import io.swagger.annotations.ApiModel;
  16 +import io.swagger.annotations.ApiModelProperty;
  17 +import lombok.EqualsAndHashCode;
  18 +import lombok.experimental.Accessors;
  19 +
  20 +/**
  21 + * @Description: 容器容量管理
  22 + * @Author: jeecg-boot
  23 + * @Date: 2022-10-26
  24 + * @Version: V1.0
  25 + */
  26 +@Data
  27 +@TableName("container_capacity")
  28 +@Accessors(chain = true)
  29 +@EqualsAndHashCode(callSuper = false)
  30 +@ApiModel(value="container_capacity对象", description="容器容量管理")
  31 +public class ContainerCapacity implements Serializable {
  32 + private static final long serialVersionUID = 1L;
  33 +
  34 + /**主键*/
  35 + @TableId(type = IdType.ASSIGN_ID)
  36 + @ApiModelProperty(value = "主键")
  37 + private String id;
  38 + /**容器类型*/
  39 + @Excel(name = "容器类型", width = 15)
  40 + @ApiModelProperty(value = "容器类型")
  41 + private String containerTypeCode;
  42 + /**仓库编码*/
  43 + @Excel(name = "仓库编码", width = 15)
  44 + @ApiModelProperty(value = "仓库编码")
  45 + private String warehouseCode;
  46 + /**货主*/
  47 + @Excel(name = "货主", width = 15)
  48 + @ApiModelProperty(value = "货主")
  49 + private String companyCode;
  50 + /**物料编码*/
  51 + @Excel(name = "物料编码", width = 15)
  52 + @ApiModelProperty(value = "物料编码")
  53 + private String materialCode;
  54 + /**物料名称*/
  55 + @Excel(name = "物料名称", width = 15)
  56 + @ApiModelProperty(value = "物料名称")
  57 + private String materialName;
  58 + /**物料单位*/
  59 + @Excel(name = "物料单位", width = 15)
  60 + @ApiModelProperty(value = "物料单位")
  61 + private String materialUnit;
  62 + /**存放数量*/
  63 + @Excel(name = "存放数量", width = 15)
  64 + @ApiModelProperty(value = "存放数量")
  65 + private BigDecimal qty;
  66 + /**是否可用*/
  67 + @Excel(name = "是否可用", width = 15, dicCode = "enable_status")
  68 + @Dict(dicCode = "enable_status")
  69 + @ApiModelProperty(value = "是否可用")
  70 + private Integer enable;
  71 + /**备用字段1*/
  72 + @Excel(name = "备用字段1", width = 15)
  73 + @ApiModelProperty(value = "备用字段1")
  74 + private String userdef1;
  75 + /**备用字段2*/
  76 + @Excel(name = "备用字段2", width = 15)
  77 + @ApiModelProperty(value = "备用字段2")
  78 + private String userdef2;
  79 + /**备用字段3*/
  80 + @Excel(name = "备用字段3", width = 15)
  81 + @ApiModelProperty(value = "备用字段3")
  82 + private String userdef3;
  83 + /**创建人*/
  84 + @ApiModelProperty(value = "创建人")
  85 + private String createBy;
  86 + /**创建日期*/
  87 + @ApiModelProperty(value = "创建日期")
  88 + private Date createTime;
  89 + /**更新人*/
  90 + @ApiModelProperty(value = "更新人")
  91 + private String updateBy;
  92 + /**更新日期*/
  93 + @ApiModelProperty(value = "更新日期")
  94 + private Date updateTime;
  95 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerCapacity/mapper/ContainerCapacityMapper.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.containerCapacity.mapper;
  2 +
  3 +import java.util.List;
  4 +
  5 +import org.apache.ibatis.annotations.Param;
  6 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  7 +import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity;
  8 +
  9 +/**
  10 + * @Description: 容器容量管理
  11 + * @Author: jeecg-boot
  12 + * @Date: 2022-10-26
  13 + * @Version: V1.0
  14 + */
  15 +public interface ContainerCapacityMapper extends BaseMapper<ContainerCapacity> {
  16 +
  17 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerCapacity/mapper/xml/ContainerCapacityMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="org.jeecg.modules.wms.config.containerCapacity.mapper.ContainerCapacityMapper">
  4 +
  5 +</mapper>
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/IContainerCapacityService.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.containerCapacity.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity;
  5 +
  6 +/**
  7 + * @Description: 容器容量管理
  8 + * @Author: jeecg-boot
  9 + * @Date: 2022-10-26
  10 + * @Version: V1.0
  11 + */
  12 +public interface IContainerCapacityService extends IService<ContainerCapacity> {
  13 +
  14 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/impl/ContainerCapacityServiceImpl.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.containerCapacity.service.impl;
  2 +
  3 +import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity;
  4 +import org.jeecg.modules.wms.config.containerCapacity.mapper.ContainerCapacityMapper;
  5 +import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService;
  6 +import org.springframework.stereotype.Service;
  7 +
  8 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  9 +
  10 +/**
  11 + * @Description: 容器容量管理
  12 + * @Author: jeecg-boot
  13 + * @Date: 2022-10-26
  14 + * @Version: V1.0
  15 + */
  16 +@Service
  17 +public class ContainerCapacityServiceImpl extends ServiceImpl<ContainerCapacityMapper, ContainerCapacity> implements IContainerCapacityService {
  18 +
  19 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerType/controller/ContainerTypeController.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.containerType.controller;
  2 +
  3 +import java.util.Arrays;
  4 +import java.util.List;
  5 +import java.util.Map;
  6 +import java.util.stream.Collectors;
  7 +import java.io.IOException;
  8 +import java.io.UnsupportedEncodingException;
  9 +import java.net.URLDecoder;
  10 +import javax.servlet.http.HttpServletRequest;
  11 +import javax.servlet.http.HttpServletResponse;
  12 +
  13 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  14 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  15 +import org.jeecg.common.api.vo.Result;
  16 +import org.jeecg.common.system.query.QueryGenerator;
  17 +import org.jeecg.common.system.util.JwtUtil;
  18 +import org.jeecg.common.util.oConvertUtils;
  19 +
  20 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  21 +import com.baomidou.mybatisplus.core.metadata.IPage;
  22 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  23 +import lombok.extern.slf4j.Slf4j;
  24 +
  25 +import org.jeecg.modules.wms.config.containerType.entity.ContainerType;
  26 +import org.jeecg.modules.wms.config.containerType.service.IContainerTypeService;
  27 +import org.jeecg.modules.wms.config.zone.entity.Zone;
  28 +import org.jeecg.utils.StringUtils;
  29 +import org.jeecgframework.poi.excel.ExcelImportUtil;
  30 +import org.jeecgframework.poi.excel.def.NormalExcelConstants;
  31 +import org.jeecgframework.poi.excel.entity.ExportParams;
  32 +import org.jeecgframework.poi.excel.entity.ImportParams;
  33 +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
  34 +import org.jeecg.common.system.base.controller.JeecgController;
  35 +import org.springframework.beans.factory.annotation.Autowired;
  36 +import org.springframework.web.bind.annotation.*;
  37 +import org.springframework.web.multipart.MultipartFile;
  38 +import org.springframework.web.multipart.MultipartHttpServletRequest;
  39 +import org.springframework.web.servlet.ModelAndView;
  40 +import com.alibaba.fastjson.JSON;
  41 +import io.swagger.annotations.Api;
  42 +import io.swagger.annotations.ApiOperation;
  43 +import org.jeecg.common.aspect.annotation.AutoLog;
  44 +
  45 + /**
  46 + * @Description: 容器类型
  47 + * @Author: jeecg-boot
  48 + * @Date: 2022-10-25
  49 + * @Version: V1.0
  50 + */
  51 +@Api(tags="容器类型")
  52 +@RestController
  53 +@RequestMapping("/config/containerType")
  54 +@Slf4j
  55 +public class ContainerTypeController extends JeecgController<ContainerType, IContainerTypeService> {
  56 + @Autowired
  57 + private IContainerTypeService containerTypeService;
  58 +
  59 + /**
  60 + * 分页列表查询
  61 + *
  62 + * @param containerType
  63 + * @param pageNo
  64 + * @param pageSize
  65 + * @param req
  66 + * @return
  67 + */
  68 + //@AutoLog(value = "容器类型-分页列表查询")
  69 + @ApiOperation(value="容器类型-分页列表查询", notes="容器类型-分页列表查询")
  70 + @GetMapping(value = "/list")
  71 + public Result<IPage<ContainerType>> queryPageList(ContainerType containerType,
  72 + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
  73 + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
  74 + HttpServletRequest req) {
  75 + QueryWrapper<ContainerType> queryWrapper = QueryGenerator.initQueryWrapper(containerType, req.getParameterMap());
  76 + Page<ContainerType> page = new Page<ContainerType>(pageNo, pageSize);
  77 + IPage<ContainerType> pageList = containerTypeService.page(page, queryWrapper);
  78 + return Result.OK(pageList);
  79 + }
  80 +
  81 + /**
  82 + * 添加
  83 + *
  84 + * @param containerType
  85 + * @return
  86 + */
  87 + @AutoLog(value = "容器类型-添加")
  88 + @ApiOperation(value="容器类型-添加", notes="容器类型-添加")
  89 + @PostMapping(value = "/add")
  90 + public Result<String> add(@RequestBody ContainerType containerType, HttpServletRequest req) {
  91 + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
  92 + if(StringUtils.isNotEmpty(warehouseCode)) {
  93 + containerType.setWarehouseCode(warehouseCode);
  94 + }
  95 + containerTypeService.save(containerType);
  96 + return Result.OK("添加成功!");
  97 + }
  98 +
  99 + /**
  100 + * 编辑
  101 + *
  102 + * @param containerType
  103 + * @return
  104 + */
  105 + @AutoLog(value = "容器类型-编辑")
  106 + @ApiOperation(value="容器类型-编辑", notes="容器类型-编辑")
  107 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
  108 + public Result<String> edit(@RequestBody ContainerType containerType) {
  109 + containerTypeService.updateById(containerType);
  110 + return Result.OK("编辑成功!");
  111 + }
  112 +
  113 + /**
  114 + * 通过id删除
  115 + *
  116 + * @param id
  117 + * @return
  118 + */
  119 + @AutoLog(value = "容器类型-通过id删除")
  120 + @ApiOperation(value="容器类型-通过id删除", notes="容器类型-通过id删除")
  121 + @DeleteMapping(value = "/delete")
  122 + public Result<String> delete(@RequestParam(name="id",required=true) String id) {
  123 + containerTypeService.removeById(id);
  124 + return Result.OK("删除成功!");
  125 + }
  126 +
  127 + /**
  128 + * 批量删除
  129 + *
  130 + * @param ids
  131 + * @return
  132 + */
  133 + @AutoLog(value = "容器类型-批量删除")
  134 + @ApiOperation(value="容器类型-批量删除", notes="容器类型-批量删除")
  135 + @DeleteMapping(value = "/deleteBatch")
  136 + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
  137 + this.containerTypeService.removeByIds(Arrays.asList(ids.split(",")));
  138 + return Result.OK("批量删除成功!");
  139 + }
  140 +
  141 + /**
  142 + * 通过id查询
  143 + *
  144 + * @param id
  145 + * @return
  146 + */
  147 + //@AutoLog(value = "容器类型-通过id查询")
  148 + @ApiOperation(value="容器类型-通过id查询", notes="容器类型-通过id查询")
  149 + @GetMapping(value = "/queryById")
  150 + public Result<ContainerType> queryById(@RequestParam(name="id",required=true) String id) {
  151 + ContainerType containerType = containerTypeService.getById(id);
  152 + if(containerType==null) {
  153 + return Result.error("未找到对应数据");
  154 + }
  155 + return Result.OK(containerType);
  156 + }
  157 +
  158 + /**
  159 + * 导出excel
  160 + *
  161 + * @param request
  162 + * @param containerType
  163 + */
  164 + @RequestMapping(value = "/exportXls")
  165 + public ModelAndView exportXls(HttpServletRequest request, ContainerType containerType) {
  166 + return super.exportXls(request, containerType, ContainerType.class, "容器类型");
  167 + }
  168 +
  169 + /**
  170 + * 通过excel导入数据
  171 + *
  172 + * @param request
  173 + * @param response
  174 + * @return
  175 + */
  176 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  177 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  178 + return super.importExcel(request, response, ContainerType.class);
  179 + }
  180 +
  181 + /**
  182 + * 获得容器类型
  183 + * @param req
  184 + */
  185 + @RequestMapping(value = "/getContainerTypeList")
  186 + public Result<?> getContainerTypeList(HttpServletRequest req) {
  187 + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
  188 + LambdaQueryWrapper<ContainerType> containerTypeLambdaQueryWrapper = Wrappers.lambdaQuery();
  189 + containerTypeLambdaQueryWrapper.eq(ContainerType::getWarehouseCode, warehouseCode);
  190 + List<ContainerType> containerTypeList = containerTypeService.list(containerTypeLambdaQueryWrapper);
  191 + return Result.OK(containerTypeList);
  192 + }
  193 +
  194 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerType/entity/ContainerType.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.containerType.entity;
  2 +
  3 +import java.io.Serializable;
  4 +import java.io.UnsupportedEncodingException;
  5 +import java.util.Date;
  6 +import java.math.BigDecimal;
  7 +import com.baomidou.mybatisplus.annotation.IdType;
  8 +import com.baomidou.mybatisplus.annotation.TableId;
  9 +import com.baomidou.mybatisplus.annotation.TableName;
  10 +import lombok.Data;
  11 +import com.fasterxml.jackson.annotation.JsonFormat;
  12 +import org.springframework.format.annotation.DateTimeFormat;
  13 +import org.jeecgframework.poi.excel.annotation.Excel;
  14 +import org.jeecg.common.aspect.annotation.Dict;
  15 +import io.swagger.annotations.ApiModel;
  16 +import io.swagger.annotations.ApiModelProperty;
  17 +import lombok.EqualsAndHashCode;
  18 +import lombok.experimental.Accessors;
  19 +
  20 +/**
  21 + * @Description: 容器类型
  22 + * @Author: jeecg-boot
  23 + * @Date: 2022-10-25
  24 + * @Version: V1.0
  25 + */
  26 +@Data
  27 +@TableName("container_type")
  28 +@Accessors(chain = true)
  29 +@EqualsAndHashCode(callSuper = false)
  30 +@ApiModel(value="container_type对象", description="容器类型")
  31 +public class ContainerType implements Serializable {
  32 + private static final long serialVersionUID = 1L;
  33 +
  34 + /**主键*/
  35 + @TableId(type = IdType.ASSIGN_ID)
  36 + @ApiModelProperty(value = "主键")
  37 + private String id;
  38 + /**编码*/
  39 + @Excel(name = "编码", width = 15)
  40 + @ApiModelProperty(value = "编码")
  41 + private String code;
  42 + /**名称*/
  43 + @Excel(name = "名称", width = 15)
  44 + @ApiModelProperty(value = "名称")
  45 + private String name;
  46 + /**仓库编码*/
  47 + @Excel(name = "仓库编码", width = 15)
  48 + @ApiModelProperty(value = "仓库编码")
  49 + private String warehouseCode;
  50 + /**货主编码*/
  51 + @Excel(name = "货主编码", width = 15)
  52 + @ApiModelProperty(value = "货主编码")
  53 + private String companyCode;
  54 + /**绑定的库位类型*/
  55 + @Excel(name = "绑定的库位类型", width = 15)
  56 + @ApiModelProperty(value = "绑定的库位类型")
  57 + private String locationType;
  58 + /**长*/
  59 + @Excel(name = "长", width = 15)
  60 + @ApiModelProperty(value = "长")
  61 + private Integer length;
  62 + /**宽*/
  63 + @Excel(name = "宽", width = 15)
  64 + @ApiModelProperty(value = "宽")
  65 + private Integer width;
  66 + /**高*/
  67 + @Excel(name = "高", width = 15)
  68 + @ApiModelProperty(value = "高")
  69 + private Integer height;
  70 + /**空容器重量*/
  71 + @Excel(name = "空容器重量", width = 15)
  72 + @ApiModelProperty(value = "空容器重量")
  73 + private Integer emptyweight;
  74 + /**容器最大承重*/
  75 + @Excel(name = "容器最大承重", width = 15)
  76 + @ApiModelProperty(value = "容器最大承重")
  77 + private Integer maxweight;
  78 + /**备用字段1*/
  79 + @Excel(name = "备用字段1", width = 15)
  80 + @ApiModelProperty(value = "备用字段1")
  81 + private String userdef1;
  82 + /**备用字段2*/
  83 + @Excel(name = "备用字段2", width = 15)
  84 + @ApiModelProperty(value = "备用字段2")
  85 + private String userdef2;
  86 + /**备用字段3*/
  87 + @Excel(name = "备用字段3", width = 15)
  88 + @ApiModelProperty(value = "备用字段3")
  89 + private String userdef3;
  90 + /**创建人*/
  91 + @ApiModelProperty(value = "创建人")
  92 + private String createBy;
  93 + /**创建日期*/
  94 + @ApiModelProperty(value = "创建日期")
  95 + private Date createTime;
  96 + /**更新人*/
  97 + @ApiModelProperty(value = "更新人")
  98 + private String updateBy;
  99 + /**更新日期*/
  100 + @ApiModelProperty(value = "更新日期")
  101 + private Date updateTime;
  102 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerType/mapper/ContainerTypeMapper.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.containerType.mapper;
  2 +
  3 +import java.util.List;
  4 +
  5 +import org.apache.ibatis.annotations.Param;
  6 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  7 +import org.jeecg.modules.wms.config.containerType.entity.ContainerType;
  8 +
  9 +/**
  10 + * @Description: 容器类型
  11 + * @Author: jeecg-boot
  12 + * @Date: 2022-10-25
  13 + * @Version: V1.0
  14 + */
  15 +public interface ContainerTypeMapper extends BaseMapper<ContainerType> {
  16 +
  17 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerType/mapper/xml/ContainerTypeMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="org.jeecg.modules.demo.config.mapper.ContainerTypeMapper">
  4 +
  5 +</mapper>
0 6 \ No newline at end of file
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerType/service/IContainerTypeService.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.containerType.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import org.jeecg.modules.wms.config.containerType.entity.ContainerType;
  5 +
  6 +/**
  7 + * @Description: 容器类型
  8 + * @Author: jeecg-boot
  9 + * @Date: 2022-10-25
  10 + * @Version: V1.0
  11 + */
  12 +public interface IContainerTypeService extends IService<ContainerType> {
  13 +
  14 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerType/service/impl/ContainerTypeServiceImpl.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.containerType.service.impl;
  2 +
  3 +import org.jeecg.modules.wms.config.containerType.entity.ContainerType;
  4 +import org.jeecg.modules.wms.config.containerType.mapper.ContainerTypeMapper;
  5 +import org.jeecg.modules.wms.config.containerType.service.IContainerTypeService;
  6 +import org.springframework.stereotype.Service;
  7 +
  8 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  9 +
  10 +/**
  11 + * @Description: 容器类型
  12 + * @Author: jeecg-boot
  13 + * @Date: 2022-10-25
  14 + * @Version: V1.0
  15 + */
  16 +@Service
  17 +public class ContainerTypeServiceImpl extends ServiceImpl<ContainerTypeMapper, ContainerType> implements IContainerTypeService {
  18 +
  19 +}
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/zone/controller/ZoneController.java
... ... @@ -9,8 +9,12 @@ import java.io.UnsupportedEncodingException;
9 9 import java.net.URLDecoder;
10 10 import javax.servlet.http.HttpServletRequest;
11 11 import javax.servlet.http.HttpServletResponse;
  12 +
  13 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  14 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
12 15 import org.jeecg.common.api.vo.Result;
13 16 import org.jeecg.common.system.query.QueryGenerator;
  17 +import org.jeecg.common.system.util.JwtUtil;
14 18 import org.jeecg.common.util.oConvertUtils;
15 19  
16 20 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
... ... @@ -20,6 +24,7 @@ import lombok.extern.slf4j.Slf4j;
20 24  
21 25 import org.jeecg.modules.wms.config.zone.entity.Zone;
22 26 import org.jeecg.modules.wms.config.zone.service.IZoneService;
  27 +import org.jeecg.utils.StringUtils;
23 28 import org.jeecgframework.poi.excel.ExcelImportUtil;
24 29 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
25 30 import org.jeecgframework.poi.excel.entity.ExportParams;
... ... @@ -81,7 +86,11 @@ public class ZoneController extends JeecgController&lt;Zone, IZoneService&gt; {
81 86 @AutoLog(value = "库区管理-添加")
82 87 @ApiOperation(value="库区管理-添加", notes="库区管理-添加")
83 88 @PostMapping(value = "/add")
84   - public Result<String> add(@RequestBody Zone zone) {
  89 + public Result<String> add(@RequestBody Zone zone, HttpServletRequest req) {
  90 + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
  91 + if(StringUtils.isNotEmpty(warehouseCode)) {
  92 + zone.setWarehouseCode(warehouseCode);
  93 + }
85 94 zoneService.save(zone);
86 95 return Result.OK("添加成功!");
87 96 }
... ... @@ -168,4 +177,16 @@ public class ZoneController extends JeecgController&lt;Zone, IZoneService&gt; {
168 177 return super.importExcel(request, response, Zone.class);
169 178 }
170 179  
  180 + /**
  181 + * 获得库区信息
  182 + * @param req
  183 + */
  184 + @RequestMapping(value = "/getZoneList")
  185 + public Result<?> getZoneList(HttpServletRequest req) {
  186 + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
  187 + LambdaQueryWrapper<Zone> zoneLambdaQueryWrapper = Wrappers.lambdaQuery();
  188 + zoneLambdaQueryWrapper.eq(Zone::getWarehouseCode, warehouseCode);
  189 + List<Zone> zoneList = zoneService.list(zoneLambdaQueryWrapper);
  190 + return Result.OK(zoneList);
  191 + }
171 192 }
... ...
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml
... ... @@ -260,7 +260,7 @@ cas:
260 260 #Mybatis输出sql日志
261 261 logging:
262 262 level:
263   - org.jeecg.modules.system.mapper : info
  263 + org.jeecg.modules : debug
264 264 #swagger
265 265 knife4j:
266 266 #开启增强配置
... ...