Commit 836b91c811d90ee79d37bb10edb9a759188b21d4

Authored by 肖超群
1 parent a17145c3

1.优化出库、入库

2.开发选择出库口功能
Showing 22 changed files with 580 additions and 91 deletions
jeecg-boot-master/ant-design-vue-jeecg/src/api/api.js
@@ -93,24 +93,46 @@ const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', para @@ -93,24 +93,46 @@ const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', para
93 const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params); 93 const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params);
94 const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}` 94 const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}`
95 95
  96 +//根据用户编码,获取仓库信息
96 export const getWarehouseByUserCode = (params)=>postAction('/sys/getWarehouseByUserCode', params); 97 export const getWarehouseByUserCode = (params)=>postAction('/sys/getWarehouseByUserCode', params);
  98 +//获取库区列表
97 export const getZoneList = (params)=>getAction('/config/zone/getZoneList', params); 99 export const getZoneList = (params)=>getAction('/config/zone/getZoneList', params);
  100 +//获取容器类型列表
98 export const getContainerTypeList = (params)=>getAction('/config/containerType/getContainerTypeList', params); 101 export const getContainerTypeList = (params)=>getAction('/config/containerType/getContainerTypeList', params);
  102 +//获取库位类型列表
99 export const getLocationTypeList = (params)=>getAction('/config/locationType/getLocationTypeList', params); 103 export const getLocationTypeList = (params)=>getAction('/config/locationType/getLocationTypeList', params);
  104 +//获取库位类高度列表
100 export const getLocationHighList = (params)=>postAction('/config/locationHigh/getLocationHighList', params); 105 export const getLocationHighList = (params)=>postAction('/config/locationHigh/getLocationHighList', params);
  106 +//获取货主列表
101 export const getCompanyList = (params)=>getAction('/config/company/getCompanyList', params); 107 export const getCompanyList = (params)=>getAction('/config/company/getCompanyList', params);
  108 +//获取承运商列表
102 export const getCarrierList = (params)=>getAction('/config/carrier/getCarrierList', params); 109 export const getCarrierList = (params)=>getAction('/config/carrier/getCarrierList', params);
  110 +//获取客户列表
103 export const getCustomerList = (params)=>getAction('/config/customer/getCustomerList', params); 111 export const getCustomerList = (params)=>getAction('/config/customer/getCustomerList', params);
  112 +//获取供应商列表
104 export const getSupplierList = (params)=>getAction('/config/supplier/getSupplierList', params); 113 export const getSupplierList = (params)=>getAction('/config/supplier/getSupplierList', params);
  114 +//获取入库类型列表
105 export const getReceiptTypeList = (params)=>getAction('/config/receiptType/getReceiptTypeList', params); 115 export const getReceiptTypeList = (params)=>getAction('/config/receiptType/getReceiptTypeList', params);
  116 +//获取出库类型列表
106 export const getShipmentTypeList = (params)=>getAction('/config/shipmentType/getShipmentTypeList', params); 117 export const getShipmentTypeList = (params)=>getAction('/config/shipmentType/getShipmentTypeList', params);
  118 +//根据物料编码查询物料信息
107 export const searchMaterialByCode = (params)=>postAction('/config/material/searchMaterialByCode', params); 119 export const searchMaterialByCode = (params)=>postAction('/config/material/searchMaterialByCode', params);
  120 +//根据入库单头ID查询入库单详情
108 export const listReceiveByReceiptId = (params)=>postAction('/receipt/receiveHeader/listReceiveByReceiptId', params); 121 export const listReceiveByReceiptId = (params)=>postAction('/receipt/receiveHeader/listReceiveByReceiptId', params);
  122 +//创建入库任务
109 export const createReceiptTask = (params)=>postAction('/receipt/receiptContainerHeader/createReceiptTask', params); 123 export const createReceiptTask = (params)=>postAction('/receipt/receiptContainerHeader/createReceiptTask', params);
  124 +//完成WMS任务
110 export const completeTaskByWMS = (params)=>postAction('/task/taskHeader/completeTaskByWMS', params); 125 export const completeTaskByWMS = (params)=>postAction('/task/taskHeader/completeTaskByWMS', params);
  126 +//下发任务给WCS
111 export const execute = (params)=>postAction('/task/taskHeader/execute', params); 127 export const execute = (params)=>postAction('/task/taskHeader/execute', params);
  128 +//自动配盘
112 export const autoCombination = (params)=>postAction('/shipment/shipmentCombination/autoCombination', params); 129 export const autoCombination = (params)=>postAction('/shipment/shipmentCombination/autoCombination', params);
  130 +//创建出库任务
113 export const createShipmentTask = (params)=>postAction('/shipment/shipmentCombination/createShipmentTask', params); 131 export const createShipmentTask = (params)=>postAction('/shipment/shipmentCombination/createShipmentTask', params);
  132 +//选择出库分拣口
  133 +export const selectSortingPort = (params)=>postAction('/shipment/shipmentCombination/selectSortingPort', params);
  134 +//选择入库分拣口
  135 +export const selectSupplePort = (params)=>postAction('/receipt/receiptContainerHeader/selectSupplePort', params);
114 136
115 // 中转HTTP请求 137 // 中转HTTP请求
116 export const transitRESTful = { 138 export const transitRESTful = {
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue
@@ -10,17 +10,12 @@ @@ -10,17 +10,12 @@
10 </a-form-item> 10 </a-form-item>
11 </a-col> 11 </a-col>
12 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 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> 13 + <a-form-item label="库位编码">
  14 + <a-input placeholder="请输入库位编码" v-model="queryParam.locationCode"></a-input>
15 </a-form-item> 15 </a-form-item>
16 </a-col> 16 </a-col>
17 <template v-if="toggleSearchStatus"> 17 <template v-if="toggleSearchStatus">
18 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 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="容器类型"> 19 <a-form-item label="容器类型">
25 <a-select 20 <a-select
26 show-search 21 show-search
@@ -188,11 +183,6 @@ @@ -188,11 +183,6 @@
188 dataIndex: 'code' 183 dataIndex: 'code'
189 }, 184 },
190 { 185 {
191 - title:'货主',  
192 - align:"center",  
193 - dataIndex: 'companyCode'  
194 - },  
195 - {  
196 title:'库位编码', 186 title:'库位编码',
197 align:"center", 187 align:"center",
198 dataIndex: 'locationCode' 188 dataIndex: 'locationCode'
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue
@@ -6,8 +6,15 @@ @@ -6,8 +6,15 @@
6 <a-form layout="inline" @keyup.enter.native="searchQuery"> 6 <a-form layout="inline" @keyup.enter.native="searchQuery">
7 <a-row :gutter="24"> 7 <a-row :gutter="24">
8 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 8 <a-col :xl="6" :lg="7" :md="8" :sm="24">
9 - <a-form-item label="货主编码">  
10 - <a-input placeholder="请输入货主编码" v-model="queryParam.companyCode"></a-input> 9 + <a-form-item label="货主">
  10 + <a-select
  11 + show-search
  12 + placeholder="请选择货主"
  13 + option-filter-prop="children"
  14 + :filter-option="filterOption"
  15 + v-model="queryParam.companyCode">
  16 + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option>
  17 + </a-select>
11 </a-form-item> 18 </a-form-item>
12 </a-col> 19 </a-col>
13 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 20 <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -88,6 +95,11 @@ @@ -88,6 +95,11 @@
88 :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" 95 :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
89 @change="handleTableChange"> 96 @change="handleTableChange">
90 97
  98 + <span slot="companyCode" slot-scope="companyCode">
  99 + <a-tag :key="companyCode" color=blue>
  100 + {{ solutionCompany(companyCode) }}
  101 + </a-tag>
  102 + </span>
91 <template slot="htmlSlot" slot-scope="text"> 103 <template slot="htmlSlot" slot-scope="text">
92 <div v-html="text"></div> 104 <div v-html="text"></div>
93 </template> 105 </template>
@@ -127,6 +139,7 @@ @@ -127,6 +139,7 @@
127 139
128 import { JeecgListMixin } from '@/mixins/JeecgListMixin' 140 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
129 import ReceiptContainerDetailModal from './modules/ReceiptContainerDetailModal' 141 import ReceiptContainerDetailModal from './modules/ReceiptContainerDetailModal'
  142 + import {getCompanyList} from '@/api/api'
130 143
131 export default { 144 export default {
132 name: "ReceiptContainerDetailList", 145 name: "ReceiptContainerDetailList",
@@ -156,6 +169,7 @@ @@ -156,6 +169,7 @@
156 return { 169 return {
157 description: '入库组盘管理页面', 170 description: '入库组盘管理页面',
158 disableMixinCreated:true, 171 disableMixinCreated:true,
  172 + companyList:[],
159 // 表头 173 // 表头
160 columns: [ 174 columns: [
161 { 175 {
@@ -164,9 +178,11 @@ @@ -164,9 +178,11 @@
164 dataIndex: 'id' 178 dataIndex: 'id'
165 }, 179 },
166 { 180 {
167 - title:'货主编码', 181 + title:'货主',
168 align:"center", 182 align:"center",
169 - dataIndex: 'companyCode' 183 + dataIndex: 'companyCode',
  184 + key: 'companyCode',
  185 + scopedSlots: { customRender: 'companyCode' }
170 }, 186 },
171 { 187 {
172 title:'物料编码', 188 title:'物料编码',
@@ -246,6 +262,7 @@ @@ -246,6 +262,7 @@
246 } 262 }
247 }, 263 },
248 created() { 264 created() {
  265 + this.loadFrom();
249 }, 266 },
250 computed: { 267 computed: {
251 importExcelUrl(){ 268 importExcelUrl(){
@@ -257,8 +274,24 @@ @@ -257,8 +274,24 @@
257 this.dataSource=[] 274 this.dataSource=[]
258 this.selectedRowKeys=[] 275 this.selectedRowKeys=[]
259 this.ipagination.current = 1 276 this.ipagination.current = 1
260 - }  
261 - 277 + },
  278 + loadFrom() {
  279 + getCompanyList().then((res) => {
  280 + if (res.success) {
  281 + this.companyList = res.result
  282 + }
  283 + });
  284 + },
  285 + solutionCompany(value) {
  286 + var actions = []
  287 + Object.keys(this.companyList).some((key) => {
  288 + if (this.companyList[key].code == ('' + value)) {
  289 + actions.push(this.companyList[key].name)
  290 + return true
  291 + }
  292 + })
  293 + return actions.join('')
  294 + },
262 } 295 }
263 } 296 }
264 </script> 297 </script>
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
@@ -114,7 +114,7 @@ @@ -114,7 +114,7 @@
114 <span slot="action" slot-scope="text, record"> 114 <span slot="action" slot-scope="text, record">
115 <a @click="handleEdit(record)">编辑</a> 115 <a @click="handleEdit(record)">编辑</a>
116 <a-divider type="vertical" /> 116 <a-divider type="vertical" />
117 - <a v-if="record.status == 0" @click="createTask(record)">生成任务</a> 117 + <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)">生成任务</a>
118 <a-divider type="vertical" /> 118 <a-divider type="vertical" />
119 <a-dropdown> 119 <a-dropdown>
120 <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> 120 <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@@ -138,6 +138,7 @@ @@ -138,6 +138,7 @@
138 </a-tabs> 138 </a-tabs>
139 139
140 <receiptContainerHeader-modal ref="modalForm" @ok="modalFormOk"></receiptContainerHeader-modal> 140 <receiptContainerHeader-modal ref="modalForm" @ok="modalFormOk"></receiptContainerHeader-modal>
  141 + <receiptContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></receiptContainerSelect-modal>
141 </a-card> 142 </a-card>
142 </template> 143 </template>
143 144
@@ -150,11 +151,13 @@ @@ -150,11 +151,13 @@
150 import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' 151 import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil'
151 import '@/assets/less/TableExpand.less' 152 import '@/assets/less/TableExpand.less'
152 import {createReceiptTask} from '@/api/api' 153 import {createReceiptTask} from '@/api/api'
  154 + import ReceiptContainerSelectModal from "./modules/ReceiptContainerSelectModal";
153 155
154 export default { 156 export default {
155 name: "ReceiptContainerHeaderList", 157 name: "ReceiptContainerHeaderList",
156 mixins:[JeecgListMixin], 158 mixins:[JeecgListMixin],
157 components: { 159 components: {
  160 + ReceiptContainerSelectModal,
158 ReceiptContainerDetailList, 161 ReceiptContainerDetailList,
159 ReceiptContainerHeaderModal 162 ReceiptContainerHeaderModal
160 }, 163 },
@@ -301,6 +304,11 @@ @@ -301,6 +304,11 @@
301 this.searchQuery(); 304 this.searchQuery();
302 }); 305 });
303 }, 306 },
  307 + selectPort(record) {
  308 + this.$refs.modalForm2.edit(record);
  309 + this.$refs.modalForm2.title = "选择分拣入库口";
  310 + console.log("selectPort");
  311 + },
304 loadData(arg) { 312 loadData(arg) {
305 if(!this.url.list){ 313 if(!this.url.list){
306 this.$message.error("请设置url.list属性!") 314 this.$message.error("请设置url.list属性!")
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue
@@ -122,7 +122,7 @@ @@ -122,7 +122,7 @@
122 :customRow="clickThenSelect" 122 :customRow="clickThenSelect"
123 @change="handleTableChange"> 123 @change="handleTableChange">
124 124
125 - <span slot="companyCode" slot-scope="companyCode"> 125 + <span slot="companyCode" slot-scope="companyCode">
126 <a-tag :key="companyCode" color=blue> 126 <a-tag :key="companyCode" color=blue>
127 {{ solutionCompany(companyCode) }} 127 {{ solutionCompany(companyCode) }}
128 </a-tag> 128 </a-tag>
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + :confirmLoading="confirmLoading"
  7 + switchFullscreen
  8 + @ok="handleOk"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <a-spin :spinning="confirmLoading">
  12 + <a-form-model ref="form" :model="model" :rules="validatorRules">
  13 + <a-row>
  14 + <a-col :span="24">
  15 + <a-form-model-item label="分拣入库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort">
  16 + <a-select
  17 + show-search
  18 + placeholder="请选择分拣入库口"
  19 + option-filter-prop="children"
  20 + :filter-option="filterOption"
  21 + v-model="model.toPort">
  22 + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option>
  23 + </a-select>
  24 + </a-form-model-item>
  25 + </a-col>
  26 + </a-row>
  27 + </a-form-model>
  28 + </a-spin>
  29 + </j-modal>
  30 +</template>
  31 +
  32 +<script>
  33 +
  34 + import { httpAction } from '@/api/manage'
  35 + import { validateDuplicateValue } from '@/utils/util'
  36 + import {createShipmentTask} from '@/api/api'
  37 + import {selectSupplePort} from '@/api/api'
  38 +
  39 + export default {
  40 + name: "ReceiptContainerSelectModal",
  41 + portList:[],
  42 + components: {
  43 + },
  44 + props:{
  45 + mainId:{
  46 + type:String,
  47 + required:false,
  48 + default:''
  49 + }
  50 + },
  51 + data () {
  52 + return {
  53 + title:"操作",
  54 + width:800,
  55 + visible: false,
  56 + model:{
  57 + },
  58 + labelCol: {
  59 + xs: { span: 24 },
  60 + sm: { span: 5 },
  61 + },
  62 + wrapperCol: {
  63 + xs: { span: 24 },
  64 + sm: { span: 16 },
  65 + },
  66 +
  67 + confirmLoading: false,
  68 + validatorRules: {
  69 + },
  70 + url: {
  71 + createTask: "/shipment/shipmentContainerHeader/createShipmentTask",
  72 + }
  73 +
  74 + }
  75 + },
  76 + created () {
  77 + //备份model原始值
  78 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  79 + },
  80 + methods: {
  81 + add () {
  82 + this.edit(this.modelDefault);
  83 + },
  84 + edit (record) {
  85 + console.log("edit");
  86 + this.getPortList(record);
  87 + },
  88 + close () {
  89 + this.$emit('close');
  90 + this.visible = false;
  91 + this.$refs.form.clearValidate();
  92 + },
  93 + handleOk () {
  94 + const that = this;
  95 + // 触发表单验证
  96 + this.$refs.form.validate(valid => {
  97 + if (valid) {
  98 + that.confirmLoading = true;
  99 + createShipmentTask(this.model).then((res) => {
  100 + if(res.success){
  101 + that.$message.success(res.message);
  102 + that.$emit('ok');
  103 + }else{
  104 + that.$message.warning(res.message);
  105 + }
  106 + }).finally(() => {
  107 + that.confirmLoading = false;
  108 + that.close();
  109 + });
  110 + }else{
  111 + return false
  112 + }
  113 + })
  114 + },
  115 + handleCancel () {
  116 + this.close()
  117 + },
  118 + getPortList(record) {
  119 + selectSupplePort(record).then((res) => {
  120 + if (res.success) {
  121 + this.portList = res.result;
  122 + this.model = Object.assign({}, record);
  123 + this.visible = true;
  124 + }
  125 + });
  126 + }
  127 +
  128 + }
  129 + }
  130 +</script>
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue
@@ -158,9 +158,6 @@ @@ -158,9 +158,6 @@
158 this.visible = false; 158 this.visible = false;
159 this.$refs.form.clearValidate(); 159 this.$refs.form.clearValidate();
160 }, 160 },
161 - loadData() {  
162 - this.searchReceive();  
163 - },  
164 searchReceive() { 161 searchReceive() {
165 const that = this; 162 const that = this;
166 that.querySource.receiptCode = that.model.code; 163 that.querySource.receiptCode = that.model.code;
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue
1 <template> 1 <template>
2 <a-card :bordered="false" :class="'cust-erp-sub-tab'"> 2 <a-card :bordered="false" :class="'cust-erp-sub-tab'">
  3 +
  4 + <!-- 查询区域 -->
  5 + <div class="table-page-search-wrapper">
  6 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  7 + <a-row :gutter="24">
  8 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  9 + <a-form-item label="货主">
  10 + <a-select
  11 + show-search
  12 + placeholder="请选择货主"
  13 + option-filter-prop="children"
  14 + :filter-option="filterOption"
  15 + v-model="queryParam.companyCode">
  16 + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option>
  17 + </a-select>
  18 + </a-form-item>
  19 + </a-col>
  20 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  21 + <a-form-item label="物料编码">
  22 + <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input>
  23 + </a-form-item>
  24 + </a-col>
  25 + <template v-if="toggleSearchStatus">
  26 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  27 + <a-form-item label="物料名称">
  28 + <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input>
  29 + </a-form-item>
  30 + </a-col>
  31 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  32 + <a-form-item label="库存状态">
  33 + <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/>
  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.batch"></a-input>
  39 + </a-form-item>
  40 + </a-col>
  41 + </template>
  42 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  43 + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  44 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  45 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  46 + <a @click="handleToggleSearch" style="margin-left: 8px">
  47 + {{ toggleSearchStatus ? '收起' : '展开' }}
  48 + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  49 + </a>
  50 + </span>
  51 + </a-col>
  52 + </a-row>
  53 + </a-form>
  54 + </div>
  55 + <!-- 查询区域-END -->
  56 +
3 <!-- 操作按钮区域 --> 57 <!-- 操作按钮区域 -->
4 <div class="table-operator" v-if="mainId"> 58 <div class="table-operator" v-if="mainId">
5 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> 59 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
@@ -41,6 +95,12 @@ @@ -41,6 +95,12 @@
41 :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" 95 :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
42 @change="handleTableChange"> 96 @change="handleTableChange">
43 97
  98 + <span slot="companyCode" slot-scope="companyCode">
  99 + <a-tag :key="companyCode" color=blue>
  100 + {{ solutionCompany(companyCode) }}
  101 + </a-tag>
  102 + </span>
  103 +
44 <template slot="htmlSlot" slot-scope="text"> 104 <template slot="htmlSlot" slot-scope="text">
45 <div v-html="text"></div> 105 <div v-html="text"></div>
46 </template> 106 </template>
@@ -80,6 +140,7 @@ @@ -80,6 +140,7 @@
80 140
81 import { JeecgListMixin } from '@/mixins/JeecgListMixin' 141 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
82 import ShipmentContainerDetailModal from './modules/ShipmentContainerDetailModal' 142 import ShipmentContainerDetailModal from './modules/ShipmentContainerDetailModal'
  143 + import {getCompanyList} from '@/api/api'
83 144
84 export default { 145 export default {
85 name: "ShipmentContainerDetailList", 146 name: "ShipmentContainerDetailList",
@@ -109,6 +170,7 @@ @@ -109,6 +170,7 @@
109 return { 170 return {
110 description: '出库组盘管理页面', 171 description: '出库组盘管理页面',
111 disableMixinCreated:true, 172 disableMixinCreated:true,
  173 + companyList:[],
112 // 表头 174 // 表头
113 columns: [ 175 columns: [
114 { 176 {
@@ -122,9 +184,11 @@ @@ -122,9 +184,11 @@
122 } 184 }
123 }, 185 },
124 { 186 {
125 - title:'货主编码', 187 + title:'货主',
126 align:"center", 188 align:"center",
127 - dataIndex: 'companyCode' 189 + dataIndex: 'companyCode',
  190 + key: 'companyCode',
  191 + scopedSlots: { customRender: 'companyCode' }
128 }, 192 },
129 { 193 {
130 title:'物料编码', 194 title:'物料编码',
@@ -154,7 +218,7 @@ @@ -154,7 +218,7 @@
154 { 218 {
155 title:'库存状态', 219 title:'库存状态',
156 align:"center", 220 align:"center",
157 - dataIndex: 'inventoryStatus' 221 + dataIndex: 'inventoryStatus_dictText'
158 }, 222 },
159 { 223 {
160 title:'批次', 224 title:'批次',
@@ -204,6 +268,7 @@ @@ -204,6 +268,7 @@
204 } 268 }
205 }, 269 },
206 created() { 270 created() {
  271 + this.loadFrom();
207 }, 272 },
208 computed: { 273 computed: {
209 importExcelUrl(){ 274 importExcelUrl(){
@@ -215,7 +280,24 @@ @@ -215,7 +280,24 @@
215 this.dataSource=[] 280 this.dataSource=[]
216 this.selectedRowKeys=[] 281 this.selectedRowKeys=[]
217 this.ipagination.current = 1 282 this.ipagination.current = 1
218 - } 283 + },
  284 + loadFrom() {
  285 + getCompanyList().then((res) => {
  286 + if (res.success) {
  287 + this.companyList = res.result
  288 + }
  289 + });
  290 + },
  291 + solutionCompany(value) {
  292 + var actions = []
  293 + Object.keys(this.companyList).some((key) => {
  294 + if (this.companyList[key].code == ('' + value)) {
  295 + actions.push(this.companyList[key].name)
  296 + return true
  297 + }
  298 + })
  299 + return actions.join('')
  300 + },
219 301
220 } 302 }
221 } 303 }
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
@@ -119,7 +119,7 @@ @@ -119,7 +119,7 @@
119 <span slot="action" slot-scope="text, record"> 119 <span slot="action" slot-scope="text, record">
120 <a @click="handleEdit(record)">编辑</a> 120 <a @click="handleEdit(record)">编辑</a>
121 <a-divider type="vertical" /> 121 <a-divider type="vertical" />
122 - <a v-if="record.status == 0" @click="createTask(record)">生成任务</a> 122 + <a v-if="record.status == 0" @click="selectPort(record)">生成任务</a>
123 <a-divider type="vertical" /> 123 <a-divider type="vertical" />
124 <a-dropdown> 124 <a-dropdown>
125 <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> 125 <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@@ -143,6 +143,7 @@ @@ -143,6 +143,7 @@
143 </a-tabs> 143 </a-tabs>
144 144
145 <shipmentContainerHeader-modal ref="modalForm" @ok="modalFormOk"></shipmentContainerHeader-modal> 145 <shipmentContainerHeader-modal ref="modalForm" @ok="modalFormOk"></shipmentContainerHeader-modal>
  146 + <shipmentContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></shipmentContainerSelect-modal>
146 </a-card> 147 </a-card>
147 </template> 148 </template>
148 149
@@ -155,11 +156,14 @@ @@ -155,11 +156,14 @@
155 import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' 156 import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil'
156 import '@/assets/less/TableExpand.less' 157 import '@/assets/less/TableExpand.less'
157 import {createShipmentTask} from '@/api/api' 158 import {createShipmentTask} from '@/api/api'
  159 + import {selectSortingPort} from '@/api/api'
  160 + import ShipmentContainerSelectModal from "./modules/ShipmentContainerSelectModal";
158 161
159 export default { 162 export default {
160 name: "ShipmentContainerHeaderList", 163 name: "ShipmentContainerHeaderList",
161 mixins:[JeecgListMixin], 164 mixins:[JeecgListMixin],
162 components: { 165 components: {
  166 + ShipmentContainerSelectModal,
163 ShipmentContainerDetailList, 167 ShipmentContainerDetailList,
164 ShipmentContainerHeaderModal 168 ShipmentContainerHeaderModal
165 }, 169 },
@@ -167,6 +171,7 @@ @@ -167,6 +171,7 @@
167 return { 171 return {
168 description: '出库组盘管理页面', 172 description: '出库组盘管理页面',
169 querySource:{}, 173 querySource:{},
  174 + portList:[],
170 // 表头 175 // 表头
171 columns: [ 176 columns: [
172 { 177 {
@@ -285,21 +290,9 @@ @@ -285,21 +290,9 @@
285 this.selectedRowKeys = selectedRowKeys; 290 this.selectedRowKeys = selectedRowKeys;
286 this.selectionRows = selectionRows; 291 this.selectionRows = selectionRows;
287 }, 292 },
288 - createTask(record) {  
289 - this.loading = true;  
290 - const that = this;  
291 - this.model = Object.assign({}, record);  
292 - that.querySource.id = record.id;  
293 - createShipmentTask(that.querySource).then((res) => {  
294 - this.loading = false;  
295 - if (res.success) {  
296 - this.$message.success(res.message);  
297 - }  
298 - else {  
299 - this.$message.error(res.message);  
300 - }  
301 - this.searchQuery();  
302 - }); 293 + selectPort(record) {
  294 + this.$refs.modalForm2.edit(record);
  295 + this.$refs.modalForm2.title = "选择出库口";
303 }, 296 },
304 loadData(arg) { 297 loadData(arg) {
305 if(!this.url.list){ 298 if(!this.url.list){
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentContainerSelectModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + :confirmLoading="confirmLoading"
  7 + switchFullscreen
  8 + @ok="handleOk"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <a-spin :spinning="confirmLoading">
  12 + <a-form-model ref="form" :model="model" :rules="validatorRules">
  13 + <a-row>
  14 + <a-col :span="24">
  15 + <a-form-model-item label="出库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort">
  16 + <a-select
  17 + show-search
  18 + placeholder="请选择出库口"
  19 + option-filter-prop="children"
  20 + :filter-option="filterOption"
  21 + v-model="model.toPort">
  22 + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option>
  23 + </a-select>
  24 + </a-form-model-item>
  25 + </a-col>
  26 + </a-row>
  27 + </a-form-model>
  28 + </a-spin>
  29 + </j-modal>
  30 +</template>
  31 +
  32 +<script>
  33 +
  34 + import { httpAction } from '@/api/manage'
  35 + import { validateDuplicateValue } from '@/utils/util'
  36 + import {createShipmentTask} from '@/api/api'
  37 + import {selectSortingPort} from '@/api/api'
  38 +
  39 + export default {
  40 + name: "ShipmentContainerSelectModal",
  41 + portList:[],
  42 + components: {
  43 + },
  44 + props:{
  45 + mainId:{
  46 + type:String,
  47 + required:false,
  48 + default:''
  49 + }
  50 + },
  51 + data () {
  52 + return {
  53 + title:"操作",
  54 + width:800,
  55 + visible: false,
  56 + model:{
  57 + },
  58 + labelCol: {
  59 + xs: { span: 24 },
  60 + sm: { span: 5 },
  61 + },
  62 + wrapperCol: {
  63 + xs: { span: 24 },
  64 + sm: { span: 16 },
  65 + },
  66 +
  67 + confirmLoading: false,
  68 + validatorRules: {
  69 + },
  70 + url: {
  71 + createTask: "/shipment/shipmentContainerHeader/createShipmentTask",
  72 + }
  73 +
  74 + }
  75 + },
  76 + created () {
  77 + //备份model原始值
  78 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  79 + },
  80 + methods: {
  81 + add () {
  82 + this.edit(this.modelDefault);
  83 + },
  84 + edit (record) {
  85 + this.getPortList(record);
  86 + },
  87 + close () {
  88 + this.$emit('close');
  89 + this.visible = false;
  90 + this.$refs.form.clearValidate();
  91 + },
  92 + handleOk () {
  93 + const that = this;
  94 + // 触发表单验证
  95 + this.$refs.form.validate(valid => {
  96 + if (valid) {
  97 + that.confirmLoading = true;
  98 + createShipmentTask(this.model).then((res) => {
  99 + if(res.success){
  100 + that.$message.success(res.message);
  101 + that.$emit('ok');
  102 + }else{
  103 + that.$message.warning(res.message);
  104 + }
  105 + }).finally(() => {
  106 + that.confirmLoading = false;
  107 + that.close();
  108 + });
  109 + }else{
  110 + return false
  111 + }
  112 + })
  113 + },
  114 + handleCancel () {
  115 + this.close()
  116 + },
  117 + getPortList(record) {
  118 + console.log("getPortList");
  119 + selectSortingPort(record).then((res) => {
  120 + if (res.success) {
  121 + this.portList = res.result;
  122 + console.log("getPortList11");
  123 + this.model = Object.assign({}, record);
  124 + this.visible = true;
  125 + }
  126 + });
  127 + }
  128 +
  129 + }
  130 + }
  131 +</script>
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
@@ -31,13 +31,13 @@ @@ -31,13 +31,13 @@
31 </a-form-item> 31 </a-form-item>
32 </a-col> 32 </a-col>
33 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 33 <a-col :xl="6" :lg="7" :md="8" :sm="24">
34 - <a-form-item label="是否重入">  
35 - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> 34 + <a-form-item label="起始出入口">
  35 + <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPort"></a-input>
36 </a-form-item> 36 </a-form-item>
37 </a-col> 37 </a-col>
38 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 38 <a-col :xl="6" :lg="7" :md="8" :sm="24">
39 - <a-form-item label="重入库位号">  
40 - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> 39 + <a-form-item label="目标出入口">
  40 + <a-input placeholder="请输入目标出入口" v-model="queryParam.toPort"></a-input>
41 </a-form-item> 41 </a-form-item>
42 </a-col> 42 </a-col>
43 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 43 <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -46,13 +46,13 @@ @@ -46,13 +46,13 @@
46 </a-form-item> 46 </a-form-item>
47 </a-col> 47 </a-col>
48 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 48 <a-col :xl="6" :lg="7" :md="8" :sm="24">
49 - <a-form-item label="起始出入口">  
50 - <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPort"></a-input> 49 + <a-form-item label="是否重入">
  50 + <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/>
51 </a-form-item> 51 </a-form-item>
52 </a-col> 52 </a-col>
53 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 53 <a-col :xl="6" :lg="7" :md="8" :sm="24">
54 - <a-form-item label="目标出入口">  
55 - <a-input placeholder="请输入目标出入口" v-model="queryParam.toPort"></a-input> 54 + <a-form-item label="重入库位号">
  55 + <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input>
56 </a-form-item> 56 </a-form-item>
57 </a-col> 57 </a-col>
58 <a-col :xl="10" :lg="11" :md="12" :sm="24"> 58 <a-col :xl="10" :lg="11" :md="12" :sm="24">
@@ -212,20 +212,10 @@ @@ -212,20 +212,10 @@
212 align:"center", 212 align:"center",
213 dataIndex: 'toLocationCode' 213 dataIndex: 'toLocationCode'
214 }, 214 },
215 - // {  
216 - // title:'是否空出',  
217 - // align:"center",  
218 - // dataIndex: 'isEmptyOut_dictText',  
219 - // },  
220 { 215 {
221 - title:'是否重入',  
222 - align:"center",  
223 - dataIndex: 'isDoubleIn_dictText',  
224 - },  
225 - {  
226 - title:'重入库位号', 216 + title:'目标出入口',
227 align:"center", 217 align:"center",
228 - dataIndex: 'originLocationCode' 218 + dataIndex: 'toPort'
229 }, 219 },
230 { 220 {
231 title:'任务状态', 221 title:'任务状态',
@@ -233,14 +223,14 @@ @@ -233,14 +223,14 @@
233 dataIndex: 'status_dictText', 223 dataIndex: 'status_dictText',
234 }, 224 },
235 { 225 {
236 - title:'起始出入口', 226 + title:'是否重入',
237 align:"center", 227 align:"center",
238 - dataIndex: 'fromPort' 228 + dataIndex: 'isDoubleIn_dictText',
239 }, 229 },
240 { 230 {
241 - title:'目标出入口', 231 + title:'重入库位号',
242 align:"center", 232 align:"center",
243 - dataIndex: 'toPort' 233 + dataIndex: 'originLocationCode'
244 }, 234 },
245 { 235 {
246 title:'创建人', 236 title:'创建人',
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
@@ -212,20 +212,10 @@ @@ -212,20 +212,10 @@
212 align:"center", 212 align:"center",
213 dataIndex: 'toLocationCode' 213 dataIndex: 'toLocationCode'
214 }, 214 },
215 - // {  
216 - // title:'是否空出',  
217 - // align:"center",  
218 - // dataIndex: 'isEmptyOut_dictText',  
219 - // },  
220 { 215 {
221 - title:'是否重入',  
222 - align:"center",  
223 - dataIndex: 'isDoubleIn_dictText',  
224 - },  
225 - {  
226 - title:'重入库位号', 216 + title:'目标出入口',
227 align:"center", 217 align:"center",
228 - dataIndex: 'originLocationCode' 218 + dataIndex: 'toPort'
229 }, 219 },
230 { 220 {
231 title:'任务状态', 221 title:'任务状态',
@@ -233,14 +223,9 @@ @@ -233,14 +223,9 @@
233 dataIndex: 'status_dictText', 223 dataIndex: 'status_dictText',
234 }, 224 },
235 { 225 {
236 - title:'起始出入口', 226 + title:'是否空出',
237 align:"center", 227 align:"center",
238 - dataIndex: 'fromPort'  
239 - },  
240 - {  
241 - title:'目标出入口',  
242 - align:"center",  
243 - dataIndex: 'toPort' 228 + dataIndex: 'isEmptyOut_dictText',
244 }, 229 },
245 { 230 {
246 title:'创建人', 231 title:'创建人',
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/controller/PortController.java
@@ -176,4 +176,5 @@ public class PortController extends JeecgController&lt;Port, IPortService&gt; { @@ -176,4 +176,5 @@ public class PortController extends JeecgController&lt;Port, IPortService&gt; {
176 return super.importExcel(request, response, Port.class); 176 return super.importExcel(request, response, Port.class);
177 } 177 }
178 178
  179 +
179 } 180 }
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/IPortService.java
1 package org.jeecg.modules.wms.config.port.service; 1 package org.jeecg.modules.wms.config.port.service;
2 2
3 import com.baomidou.mybatisplus.extension.service.IService; 3 import com.baomidou.mybatisplus.extension.service.IService;
  4 +import org.jeecg.common.api.vo.Result;
4 import org.jeecg.modules.wms.config.port.entity.Port; 5 import org.jeecg.modules.wms.config.port.entity.Port;
5 6
  7 +import java.util.List;
  8 +
6 /** 9 /**
7 * @Description: 出入口 10 * @Description: 出入口
8 * @Author: jeecg-boot 11 * @Author: jeecg-boot
@@ -11,4 +14,5 @@ import org.jeecg.modules.wms.config.port.entity.Port; @@ -11,4 +14,5 @@ import org.jeecg.modules.wms.config.port.entity.Port;
11 */ 14 */
12 public interface IPortService extends IService<Port> { 15 public interface IPortService extends IService<Port> {
13 16
  17 + List<Port> getPortListByType(int type, String zoneCode, String warehouseCode);
14 } 18 }
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/impl/PortServiceImpl.java
1 package org.jeecg.modules.wms.config.port.service.impl; 1 package org.jeecg.modules.wms.config.port.service.impl;
2 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;
3 import org.jeecg.modules.wms.config.port.entity.Port; 6 import org.jeecg.modules.wms.config.port.entity.Port;
4 import org.jeecg.modules.wms.config.port.mapper.PortMapper; 7 import org.jeecg.modules.wms.config.port.mapper.PortMapper;
5 import org.jeecg.modules.wms.config.port.service.IPortService; 8 import org.jeecg.modules.wms.config.port.service.IPortService;
@@ -7,6 +10,9 @@ import org.springframework.stereotype.Service; @@ -7,6 +10,9 @@ import org.springframework.stereotype.Service;
7 10
8 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 11 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
9 12
  13 +import javax.annotation.Resource;
  14 +import java.util.List;
  15 +
10 /** 16 /**
11 * @Description: 出入口 17 * @Description: 出入口
12 * @Author: jeecg-boot 18 * @Author: jeecg-boot
@@ -16,4 +22,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -16,4 +22,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
16 @Service 22 @Service
17 public class PortServiceImpl extends ServiceImpl<PortMapper, Port> implements IPortService { 23 public class PortServiceImpl extends ServiceImpl<PortMapper, Port> implements IPortService {
18 24
  25 + @Override
  26 + public List<Port> getPortListByType(int type, String zoneCode, String warehouseCode) {
  27 + LambdaQueryWrapper<Port> portLambdaQueryWrapper = Wrappers.lambdaQuery();
  28 + portLambdaQueryWrapper.eq(Port::getType, type)
  29 + .eq(Port::getZoneCode, zoneCode)
  30 + .eq(Port::getWarehouseCode, warehouseCode);
  31 + List<Port> portList = list(portLambdaQueryWrapper);
  32 + return portList;
  33 + }
19 } 34 }
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
@@ -8,12 +8,23 @@ import lombok.extern.slf4j.Slf4j; @@ -8,12 +8,23 @@ import lombok.extern.slf4j.Slf4j;
8 import org.jeecg.common.system.base.controller.JeecgController; 8 import org.jeecg.common.system.base.controller.JeecgController;
9 import org.jeecg.common.api.vo.Result; 9 import org.jeecg.common.api.vo.Result;
10 import org.jeecg.common.system.util.JwtUtil; 10 import org.jeecg.common.system.util.JwtUtil;
  11 +import org.jeecg.modules.wms.config.location.entity.Location;
  12 +import org.jeecg.modules.wms.config.location.service.ILocationService;
  13 +import org.jeecg.modules.wms.config.port.entity.Port;
  14 +import org.jeecg.modules.wms.config.port.service.IPortService;
  15 +import org.jeecg.modules.wms.config.zone.entity.Zone;
  16 +import org.jeecg.modules.wms.config.zone.service.IZoneService;
11 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerDetail; 17 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerDetail;
12 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; 18 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader;
13 import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerDetailService; 19 import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerDetailService;
14 import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerHeaderService; 20 import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerHeaderService;
  21 +import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader;
  22 +import org.jeecg.utils.StringUtils;
  23 +import org.jeecg.utils.constant.QuantityConstant;
15 import org.springframework.beans.factory.annotation.Autowired; 24 import org.springframework.beans.factory.annotation.Autowired;
16 import org.springframework.web.bind.annotation.*; 25 import org.springframework.web.bind.annotation.*;
  26 +
  27 +import javax.annotation.Resource;
17 import javax.servlet.http.HttpServletRequest; 28 import javax.servlet.http.HttpServletRequest;
18 import javax.servlet.http.HttpServletResponse; 29 import javax.servlet.http.HttpServletResponse;
19 import org.springframework.web.servlet.ModelAndView; 30 import org.springframework.web.servlet.ModelAndView;
@@ -54,6 +65,13 @@ public class ReceiptContainerHeaderController extends JeecgController&lt;ReceiptCon @@ -54,6 +65,13 @@ public class ReceiptContainerHeaderController extends JeecgController&lt;ReceiptCon
54 @Autowired 65 @Autowired
55 private IReceiptContainerDetailService receiptContainerDetailService; 66 private IReceiptContainerDetailService receiptContainerDetailService;
56 67
  68 + @Resource
  69 + private ILocationService locationService;
  70 + @Resource
  71 + private IZoneService zoneService;
  72 + @Resource
  73 + private IPortService portService;
  74 +
57 75
58 /*---------------------------------主表处理-begin-------------------------------------*/ 76 /*---------------------------------主表处理-begin-------------------------------------*/
59 77
@@ -303,5 +321,36 @@ public class ReceiptContainerHeaderController extends JeecgController&lt;ReceiptCon @@ -303,5 +321,36 @@ public class ReceiptContainerHeaderController extends JeecgController&lt;ReceiptCon
303 return receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode); 321 return receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode);
304 } 322 }
305 323
306 - 324 + /**
  325 + * 选择分拣口
  326 + * @return
  327 + */
  328 + @ApiOperation(value="出库组盘-选择分拣口", notes="出库组盘-选择分拣口")
  329 + @PostMapping("/selectSupplePort")
  330 + @ResponseBody
  331 + public Result selectSupplePort(@RequestBody ReceiptContainerHeader receiptContainerHeader, HttpServletRequest req) {
  332 + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
  333 + String fromLocationCode = receiptContainerHeader.getFromLocationCode();
  334 + if(StringUtils.isEmpty(fromLocationCode)) {
  335 + return Result.error("选择分拣口时, 起始库位号为空");
  336 + }
  337 + Location fromLocation = locationService.getLocationByCode(fromLocationCode, warehouseCode);
  338 + if(fromLocation == null) {
  339 + return Result.error("选择分拣口时, 根据库位号" + fromLocationCode + " 没有找到库位");
  340 + }
  341 + String zoneCode = fromLocation.getZoneCode();
  342 + if(StringUtils.isEmpty(zoneCode)) {
  343 + return Result.error("选择分拣口时, 库区编码为空");
  344 + }
  345 + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode);
  346 + if(zone == null) {
  347 + return Result.error("选择分拣口时, 库区为空");
  348 + }
  349 + int type = QuantityConstant.PORT_TYPE_PICK;
  350 + List<Port> portList = portService.getPortListByType(type, zoneCode, warehouseCode);
  351 + if(portList.size() == 0) {
  352 + return Result.error("选择分拣口时, 没有找到合适的分拣口");
  353 + }
  354 + return Result.OK(portList);
  355 + }
307 } 356 }
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
@@ -82,6 +82,9 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; imp @@ -82,6 +82,9 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; imp
82 if(containerStatus.equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { 82 if(containerStatus.equals(QuantityConstant.STATUS_CONTAINER_LOCK)) {
83 return Result.error("容器被锁定,不能用于收货"); 83 return Result.error("容器被锁定,不能用于收货");
84 } 84 }
  85 + if(containerStatus.equals(QuantityConstant.STATUS_CONTAINER_FULL)) {
  86 + return Result.error("容器已经是满盘,不能用于收货");
  87 + }
85 String containerTypeCode = container.getContainerTypeCode(); 88 String containerTypeCode = container.getContainerTypeCode();
86 if(StringUtils.isEmpty(containerTypeCode)) { 89 if(StringUtils.isEmpty(containerTypeCode)) {
87 return Result.error("容器类型编码为空"); 90 return Result.error("容器类型编码为空");
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/controller/shipmentCombinationController.java
@@ -8,6 +8,12 @@ import lombok.extern.slf4j.Slf4j; @@ -8,6 +8,12 @@ import lombok.extern.slf4j.Slf4j;
8 import org.jeecg.common.api.vo.Result; 8 import org.jeecg.common.api.vo.Result;
9 import org.jeecg.common.aspect.annotation.AutoLog; 9 import org.jeecg.common.aspect.annotation.AutoLog;
10 import org.jeecg.common.system.util.JwtUtil; 10 import org.jeecg.common.system.util.JwtUtil;
  11 +import org.jeecg.modules.wms.config.location.entity.Location;
  12 +import org.jeecg.modules.wms.config.location.service.ILocationService;
  13 +import org.jeecg.modules.wms.config.port.entity.Port;
  14 +import org.jeecg.modules.wms.config.port.service.IPortService;
  15 +import org.jeecg.modules.wms.config.zone.entity.Zone;
  16 +import org.jeecg.modules.wms.config.zone.service.IZoneService;
11 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; 17 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader;
12 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; 18 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader;
13 import org.jeecg.modules.wms.receipt.receiving.domain.Receive; 19 import org.jeecg.modules.wms.receipt.receiving.domain.Receive;
@@ -17,6 +23,7 @@ import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; @@ -17,6 +23,7 @@ import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail;
17 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; 23 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader;
18 import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; 24 import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService;
19 import org.jeecg.utils.StringUtils; 25 import org.jeecg.utils.StringUtils;
  26 +import org.jeecg.utils.constant.QuantityConstant;
20 import org.springframework.web.bind.annotation.*; 27 import org.springframework.web.bind.annotation.*;
21 28
22 import javax.annotation.Resource; 29 import javax.annotation.Resource;
@@ -36,6 +43,12 @@ public class shipmentCombinationController { @@ -36,6 +43,12 @@ public class shipmentCombinationController {
36 private IShipmentDetailService shipmentDetailService; 43 private IShipmentDetailService shipmentDetailService;
37 @Resource 44 @Resource
38 private IShipmentCombinationService shipmentCombinationService; 45 private IShipmentCombinationService shipmentCombinationService;
  46 + @Resource
  47 + private ILocationService locationService;
  48 + @Resource
  49 + private IZoneService zoneService;
  50 + @Resource
  51 + private IPortService portService;
39 52
40 /** 53 /**
41 * 获取单据列表 54 * 获取单据列表
@@ -71,14 +84,48 @@ public class shipmentCombinationController { @@ -71,14 +84,48 @@ public class shipmentCombinationController {
71 } 84 }
72 85
73 /** 86 /**
74 - * 创建任务 87 + * 创建出库任务
75 * @return 88 * @return
76 */ 89 */
77 - @ApiOperation(value="入库组盘-创建任务", notes="入库组盘-创建任务") 90 + @ApiOperation(value="出库组盘-创建出库任务", notes="出库组盘-创建出库任务")
78 @PostMapping("/createShipmentTask") 91 @PostMapping("/createShipmentTask")
79 @ResponseBody 92 @ResponseBody
80 public Result createShipmentTask(@RequestBody ShipmentContainerHeader shipmentContainerHeader, HttpServletRequest req) { 93 public Result createShipmentTask(@RequestBody ShipmentContainerHeader shipmentContainerHeader, HttpServletRequest req) {
81 String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); 94 String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
82 return shipmentCombinationService.createShipmentTask(shipmentContainerHeader, warehouseCode); 95 return shipmentCombinationService.createShipmentTask(shipmentContainerHeader, warehouseCode);
83 } 96 }
  97 +
  98 +
  99 + /**
  100 + * 选择分拣口
  101 + * @return
  102 + */
  103 + @ApiOperation(value="出库组盘-选择分拣口", notes="出库组盘-选择分拣口")
  104 + @PostMapping("/selectSortingPort")
  105 + @ResponseBody
  106 + public Result selectSortingPort(@RequestBody ShipmentContainerHeader shipmentContainerHeader, HttpServletRequest req) {
  107 + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
  108 + String fromLocationCode = shipmentContainerHeader.getFromLocationCode();
  109 + if(StringUtils.isEmpty(fromLocationCode)) {
  110 + return Result.error("选择分拣口时, 起始库位号为空");
  111 + }
  112 + Location fromLocation = locationService.getLocationByCode(fromLocationCode, warehouseCode);
  113 + if(fromLocation == null) {
  114 + return Result.error("选择分拣口时, 根据库位号" + fromLocationCode + " 没有找到库位");
  115 + }
  116 + String zoneCode = fromLocation.getZoneCode();
  117 + if(StringUtils.isEmpty(zoneCode)) {
  118 + return Result.error("选择分拣口时, 库区编码为空");
  119 + }
  120 + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode);
  121 + if(zone == null) {
  122 + return Result.error("选择分拣口时, 库区为空");
  123 + }
  124 + int type = QuantityConstant.PORT_TYPE_PICK;
  125 + List<Port> portList = portService.getPortListByType(type, zoneCode, warehouseCode);
  126 + if(portList.size() == 0) {
  127 + return Result.error("选择分拣口时, 没有找到合适的分拣口");
  128 + }
  129 + return Result.OK(portList);
  130 + }
84 } 131 }
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
@@ -415,7 +415,6 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi @@ -415,7 +415,6 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
415 if (shipmentContainerHeader == null) { 415 if (shipmentContainerHeader == null) {
416 return Result.error("生成出库任务时, 出库组盘头" + "未找到,操作中止"); 416 return Result.error("生成出库任务时, 出库组盘头" + "未找到,操作中止");
417 } 417 }
418 - shipmentContainerHeader = shipmentContainerHeaderService.getById(shipmentContainerHeader.getId());  
419 if (shipmentContainerHeader.getStatus() >= QuantityConstant.SHIPMENT_CONTAINER_TASK) { 418 if (shipmentContainerHeader.getStatus() >= QuantityConstant.SHIPMENT_CONTAINER_TASK) {
420 return Result.error("生成出库任务时, 出库组盘头" + shipmentContainerHeader.getId() + "已经生成任务,请不要重复生成,操作中止"); 419 return Result.error("生成出库任务时, 出库组盘头" + shipmentContainerHeader.getId() + "已经生成任务,请不要重复生成,操作中止");
421 } 420 }
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/entity/ShipmentContainerDetail.java
@@ -91,6 +91,7 @@ public class ShipmentContainerDetail implements Serializable { @@ -91,6 +91,7 @@ public class ShipmentContainerDetail implements Serializable {
91 private Integer inventoryDetailId; 91 private Integer inventoryDetailId;
92 /**库存状态*/ 92 /**库存状态*/
93 @Excel(name = "库存状态", width = 15) 93 @Excel(name = "库存状态", width = 15)
  94 + @Dict(dicCode = "inventory_status")
94 @ApiModelProperty(value = "库存状态") 95 @ApiModelProperty(value = "库存状态")
95 private String inventoryStatus; 96 private String inventoryStatus;
96 /**批次*/ 97 /**批次*/
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -622,6 +622,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -622,6 +622,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
622 } 622 }
623 List<InventoryTransaction> inventoryTransactionList = new ArrayList<>(); 623 List<InventoryTransaction> inventoryTransactionList = new ArrayList<>();
624 List<Integer> shipmentIdList = new ArrayList<>(); 624 List<Integer> shipmentIdList = new ArrayList<>();
  625 + List<ShipmentDetail> shipmentDetailList = new ArrayList<>();
625 for(TaskDetail taskDetail : taskDetailList) { 626 for(TaskDetail taskDetail : taskDetailList) {
626 ShipmentContainerDetail shipmentContainerDetail = 627 ShipmentContainerDetail shipmentContainerDetail =
627 shipmentContainerDetailService.getById(taskDetail.getShipmentContainerDetailId()); 628 shipmentContainerDetailService.getById(taskDetail.getShipmentContainerDetailId());
@@ -639,6 +640,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -639,6 +640,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
639 } else if(shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) < 0) { 640 } else if(shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) < 0) {
640 throw new ServiceException("完成出库任务时, 出库单 单据数量不能小于配盘数量"); 641 throw new ServiceException("完成出库任务时, 出库单 单据数量不能小于配盘数量");
641 } 642 }
  643 + shipmentDetailList.add(shipmentDetail);
642 InventoryDetail inventoryDetail = 644 InventoryDetail inventoryDetail =
643 inventoryDetailService.getById(taskDetail.getFromInventoryDetailId()); 645 inventoryDetailService.getById(taskDetail.getFromInventoryDetailId());
644 if(inventoryDetail == null) { 646 if(inventoryDetail == null) {
@@ -702,7 +704,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -702,7 +704,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
702 } 704 }
703 containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; 705 containerStatus = QuantityConstant.STATUS_CONTAINER_SOME;
704 } 706 }
705 - 707 + success = shipmentDetailService.updateBatchById(shipmentDetailList);
  708 + if(!success) {
  709 + throw new ServiceException("完成出库任务,更新出库详情失败");
  710 + }
706 success = inventoryTransactionService.saveBatch(inventoryTransactionList); 711 success = inventoryTransactionService.saveBatch(inventoryTransactionList);
707 if(!success) { 712 if(!success) {
708 throw new ServiceException("完成出库任务,保存库存详情失败"); 713 throw new ServiceException("完成出库任务,保存库存详情失败");
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
@@ -510,6 +510,10 @@ public class QuantityConstant { @@ -510,6 +510,10 @@ public class QuantityConstant {
510 public static final int EMPTY_OUT_PROSESS = 2; 510 public static final int EMPTY_OUT_PROSESS = 2;
511 public static final int NORMAL_OUT = 0; 511 public static final int NORMAL_OUT = 0;
512 512
  513 + public static final int PORT_TYPE_IN = 1;
  514 + public static final int PORT_TYPE_OUT = 2;
  515 + public static final int PORT_TYPE_PICK = 3;
  516 +
513 public static final String RECEIPT_TYPE_PRODUCTON = "SC"; //生产入库单 517 public static final String RECEIPT_TYPE_PRODUCTON = "SC"; //生产入库单
514 public static final String RECEIPT_TYPE_DIRECT_TRANSGER = "JS"; // 直接调拨单 518 public static final String RECEIPT_TYPE_DIRECT_TRANSGER = "JS"; // 直接调拨单
515 public static final String RECEIPT_TYPE_SALE = "SP"; //销售出库单 519 public static final String RECEIPT_TYPE_SALE = "SP"; //销售出库单