diff --git a/ant-design-vue-jeecg/.env.production b/ant-design-vue-jeecg/.env.production index e7ebd07..d6a41e8 100644 --- a/ant-design-vue-jeecg/.env.production +++ b/ant-design-vue-jeecg/.env.production @@ -1,6 +1,6 @@ NODE_ENV=production VUE_APP_ENV=production outputDir=dist -VUE_APP_API_BASE_URL=http://172.16.29.77:8081/wms +VUE_APP_API_BASE_URL=http://127.0.0.1:8080/wms VUE_APP_CAS_BASE_URL=http://localhost:8443/cas VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview \ No newline at end of file diff --git a/ant-design-vue-jeecg/pom.xml b/ant-design-vue-jeecg/pom.xml index ab63db4..767a245 100644 --- a/ant-design-vue-jeecg/pom.xml +++ b/ant-design-vue-jeecg/pom.xml @@ -68,7 +68,7 @@ <goal>npm</goal> </goals> <configuration> - <arguments>run build_development</arguments> + <arguments>run build</arguments> </configuration> </execution> </executions> diff --git a/ant-design-vue-jeecg/src/components/jeecg/modal/JPopupOnlReport.vue b/ant-design-vue-jeecg/src/components/jeecg/modal/JPopupOnlReport.vue index 96c1a15..cbb9780 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/modal/JPopupOnlReport.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/modal/JPopupOnlReport.vue @@ -8,22 +8,28 @@ wrapClassName="j-popup-modal" @ok="handleSubmit" @cancel="handleCancel" - cancelText="关闭"> - + cancelText="关闭" + > <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchByquery"> <a-row :gutter="24" v-if="showSearchFlag"> - <template v-for="(item,index) in queryInfo"> - <template v-if=" item.hidden==='1' "> - <a-col :md="8" :sm="24" :key=" 'query'+index " v-show="toggleSearchStatus"> - <online-query-form-item :queryParam="queryParam" :item="item" - :dictOptions="dictOptions"></online-query-form-item> + <template v-for="(item, index) in queryInfo"> + <template v-if="item.hidden === '1'"> + <a-col :md="8" :sm="24" :key="'query' + index" v-show="toggleSearchStatus"> + <online-query-form-item + :queryParam="queryParam" + :item="item" + :dictOptions="dictOptions" + ></online-query-form-item> </a-col> </template> <template v-else> - <a-col :md="8" :sm="24" :key=" 'query'+index "> - <online-query-form-item :queryParam="queryParam" :item="item" - :dictOptions="dictOptions"></online-query-form-item> + <a-col :md="8" :sm="24" :key="'query' + index"> + <online-query-form-item + :queryParam="queryParam" + :item="item" + :dictOptions="dictOptions" + ></online-query-form-item> </a-col> </template> </template> @@ -34,18 +40,17 @@ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a @click="handleToggleSearch" style="margin-left: 8px"> {{ toggleSearchStatus ? '收起' : '展开' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> </a> </span> </a-col> - </a-row> </a-form> </div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> - 已选择 <a style="font-weight: 600">{{ table.selectedRowKeys.length }}</a>项 + 已选择 <a style="font-weight: 600">{{ table.selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> <a v-if="!showSearchFlag" style="margin-left: 24px" @click="onlyReload">刷新</a> @@ -60,25 +65,29 @@ :dataSource="table.dataSource" :pagination="table.pagination" :loading="table.loading" - :rowSelection="{type:rowSelectionType,fixed:true,selectedRowKeys: table.selectedRowKeys, onChange: handleChangeInTableSelect}" + :rowSelection="{ + type: rowSelectionType, + fixed: true, + selectedRowKeys: table.selectedRowKeys, + onChange: handleChangeInTableSelect + }" @change="handleChangeInTable" style="min-height: 300px" :scroll="tableScroll" - :customRow="clickThenCheck"> + :customRow="clickThenCheck" + > </a-table> - - </j-modal> </template> <script> -import {getAction} from '@/api/manage' -import {filterObj} from '@/utils/util' -import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' -import {httpGroupRequest} from '@/api/GroupRequest.js' +import { getAction } from '@/api/manage' +import { filterObj } from '@/utils/util' +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' +import { httpGroupRequest } from '@/api/GroupRequest.js' import md5 from 'md5' -const MODAL_WIDTH = 1200; +const MODAL_WIDTH = 1200 export default { name: 'JPopupOnlReport', props: ['multi', 'code', 'sorter', 'groupId', 'param'], @@ -86,7 +95,7 @@ export default { data() { return { visible: false, - title: "", + title: '', confirmLoading: false, queryInfo: [], toggleSearchStatus: false, @@ -119,12 +128,12 @@ export default { total: 0 } }, - cgRpConfigId: "", + cgRpConfigId: '', modalWidth: MODAL_WIDTH, - tableScroll: {x: true}, + tableScroll: { x: true }, dynamicParam: {}, // 排序字段,默认无排序 - iSorter: null, + iSorter: null } }, mounted() { @@ -140,10 +149,10 @@ export default { // update--begin--autor:liusq-----date:20210706------for:JPopup组件在modal中使用报错#2729------ if (this.visible) { this.dynamicParamHandler() - this.loadData(); + this.loadData() } // update--begin--autor:liusq-----date:20210706------for:JPopup组件在modal中使用报错#2729------ - }, + } }, sorter: { immediate: true, @@ -151,7 +160,7 @@ export default { if (this.sorter) { let arr = this.sorter.split('=') if (arr.length === 2 && ['asc', 'desc'].includes(arr[1].toLowerCase())) { - this.iSorter = {column: arr[0], order: arr[1].toLowerCase()} + this.iSorter = { column: arr[0], order: arr[1].toLowerCase() } // 排序字段受控 this.table.columns.forEach(col => { if (col.dataIndex === this.iSorter.column) { @@ -164,8 +173,8 @@ export default { console.warn('【JPopup】sorter参数不合法') } } - }, - }, + } + } }, computed: { showSearchFlag() { @@ -174,7 +183,7 @@ export default { // 行选择框类型,根据是否多选来控制显示为单选框还是多选框 rowSelectionType() { return this.multi ? 'checkbox' : 'radio' - }, + } }, methods: { loadColumnsInfo() { @@ -186,15 +195,15 @@ export default { } httpGroupRequest(() => getAction(url), groupIdKey).then(res => { if (res.success) { - this.initDictOptionData(res.result.dictOptions); + this.initDictOptionData(res.result.dictOptions) this.cgRpConfigId = res.result.cgRpConfigId this.title = res.result.cgRpConfigName let currColumns = res.result.columns for (let a = 0; a < currColumns.length; a++) { if (currColumns[a].customRender) { - let dictCode = currColumns[a].customRender; - currColumns[a].customRender = (text) => { - return filterMultiDictText(this.dictOptions[dictCode], text + ""); + let dictCode = currColumns[a].customRender + currColumns[a].customRender = text => { + return filterMultiDictText(this.dictOptions[dictCode], text + '') } } // 排序字段受控 @@ -207,8 +216,14 @@ export default { } else { this.$error({ title: '出错了', - content: (<p>Popup初始化失败,请检查你的配置或稍后重试!<br/>错误信息如下:{res.message}</p>), - onOk: () => this.close(), + content: ( + <p> + Popup初始化失败,请检查你的配置或稍后重试! + <br /> + 错误信息如下:{res.message} + </p> + ), + onOk: () => this.close() }) } }) @@ -220,7 +235,7 @@ export default { if (this.groupId) { groupIdKey = this.groupId + url } - httpGroupRequest(() => getAction(url), groupIdKey).then((res) => { + httpGroupRequest(() => getAction(url), groupIdKey).then(res => { // console.log("获取查询条件", res); if (res.success) { this.dynamicParamHandler(res.result) @@ -242,7 +257,7 @@ export default { queryTemp[item.field] = '' } } - this.queryParam = {...queryTemp} + this.queryParam = { ...queryTemp } } let dynamicTemp = {} if (this.param) { @@ -258,13 +273,13 @@ export default { dynamicTemp[key] = this.param[key] }) } - this.dynamicParam = {...dynamicTemp} + this.dynamicParam = { ...dynamicTemp } }, loadData(arg) { if (arg == 1) { this.table.pagination.current = 1 } - let params = this.getQueryParams();//查询条件 + let params = this.getQueryParams() //查询条件 this.table.loading = true let url = `${this.url.getData}${this.cgRpConfigId}` //缓存key @@ -293,10 +308,10 @@ export default { paramTarget['self_' + key] = this.dynamicParam[key] }) } - let param = Object.assign(paramTarget, this.queryParam, this.iSorter); - param.pageNo = this.table.pagination.current; - param.pageSize = this.table.pagination.pageSize; - return filterObj(param); + let param = Object.assign(paramTarget, this.queryParam, this.iSorter) + param.pageNo = this.table.pagination.current + param.pageSize = this.table.pagination.pageSize + return filterObj(param) }, handleChangeInTableSelect(selectedRowKeys, selectionRows) { //update-begin-author:taoyan date:2020902 for:【issue】开源online的几个问题 LOWCOD-844 @@ -307,7 +322,7 @@ export default { } else { //当两者长度不一的时候 需要判断 let keys = this.table.selectedRowKeys - let rows = this.table.selectionRows; + let rows = this.table.selectionRows //这个循环 添加新的记录 for (let i = 0; i < selectionRows.length; i++) { let combineKey = this.combineRowKey(selectionRows[i]) @@ -350,20 +365,20 @@ export default { handleSubmit() { if (!this.multi) { if (this.table.selectionRows && this.table.selectionRows.length > 1) { - this.$message.warning("请选择一条记录") + this.$message.warning('请选择一条记录') return false } } if (!this.table.selectionRows || this.table.selectionRows.length == 0) { - this.$message.warning("请选择一条记录") + this.$message.warning('请选择一条记录') return false } - this.$emit('ok', this.table.selectionRows); + this.$emit('ok', this.table.selectionRows) this.close() }, close() { - this.$emit('close'); - this.visible = false; + this.$emit('close') + this.visible = false this.onClearSelected() }, show() { @@ -371,19 +386,19 @@ export default { this.loadColumnsInfo() }, handleToggleSearch() { - this.toggleSearchStatus = !this.toggleSearchStatus; + this.toggleSearchStatus = !this.toggleSearchStatus }, searchByquery() { - this.loadData(1); + this.loadData(1) }, onlyReload() { - this.loadData(); + this.loadData() }, searchReset() { Object.keys(this.queryParam).forEach(key => { - this.queryParam[key] = "" + this.queryParam[key] = '' }) - this.loadData(1); + this.loadData(1) }, onClearSelected() { this.table.selectedRowKeys = [] @@ -415,7 +430,8 @@ export default { click: () => { let rowKey = this.combineRowKey(record) if (!this.table.selectedRowKeys || this.table.selectedRowKeys.length == 0) { - let arr1 = [], arr2 = [] + let arr1 = [], + arr2 = [] arr1.push(record) arr2.push(rowKey) this.table.selectedRowKeys = arr2 @@ -426,8 +442,8 @@ export default { this.table.selectionRows.push(record) } else { let rowKey_index = this.table.selectedRowKeys.indexOf(rowKey) - this.table.selectedRowKeys.splice(rowKey_index, 1); - this.table.selectionRows.splice(rowKey_index, 1); + this.table.selectedRowKeys.splice(rowKey_index, 1) + this.table.selectionRows.splice(rowKey_index, 1) } } // 判断是否允许多选,如果不允许多选,就只存储最后一个选中的行 @@ -445,15 +461,13 @@ export default { Object.keys(dictOptions).map(k => { obj[k] = dictOptions[k].filter(item => { return item != null - }); - }); + }) + }) this.dictOptions = obj } - } } </script> <style scoped> - </style> \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/components/tools/DepartSelect.vue b/ant-design-vue-jeecg/src/components/tools/DepartSelect.vue index ea9e1ed..27fdee0 100644 --- a/ant-design-vue-jeecg/src/components/tools/DepartSelect.vue +++ b/ant-design-vue-jeecg/src/components/tools/DepartSelect.vue @@ -136,14 +136,14 @@ export default { }) }, show() { - //如果组件传值username此处就不用loadDepartList了 - this.loadDepartList().then(() => { - this.visible = true - if (!this.departList || this.departList.length <= 0) { - this.$message.warning("您尚未设置部门信息!") - this.departClear() - } - }) + // 如果组件传值username此处就不用loadDepartList了 + // this.loadDepartList().then(() => { + // this.visible = true + // if (!this.departList || this.departList.length <= 0) { + // this.$message.warning("您尚未设置部门信息!") + // this.departClear() + // } + // }) }, departClear() { this.departList = [] diff --git a/ant-design-vue-jeecg/src/components/tools/UserMenu.vue b/ant-design-vue-jeecg/src/components/tools/UserMenu.vue index a9135d6..7ccb213 100644 --- a/ant-design-vue-jeecg/src/components/tools/UserMenu.vue +++ b/ant-design-vue-jeecg/src/components/tools/UserMenu.vue @@ -40,12 +40,12 @@ <span v-if="isDesktop()">欢迎您,{{ nickname() }}</span> </span> <a-menu slot="overlay" class="user-dropdown-menu-wrapper"> - <a-menu-item key="0"> + <!-- <a-menu-item key="0"> <router-link :to="{ name: 'account-center' }"> <a-icon type="user"/> <span>个人中心</span> </router-link> - </a-menu-item> + </a-menu-item> --> <a-menu-item key="1"> <router-link :to="{ name: 'account-settings-base' }"> <a-icon type="setting"/> @@ -60,10 +60,10 @@ <a-icon type="setting"/> <span>密码修改</span> </a-menu-item> - <a-menu-item key="5" @click="updateCurrentDepart"> + <!-- <a-menu-item key="5" @click="updateCurrentDepart"> <a-icon type="cluster"/> <span>切换部门</span> - </a-menu-item> + </a-menu-item> --> <a-menu-item key="6" @click="clearCache"> <a-icon type="sync"/> <span>清理缓存</span> diff --git a/ant-design-vue-jeecg/src/views/account/settings/BaseSetting.vue b/ant-design-vue-jeecg/src/views/account/settings/BaseSetting.vue index 69f5f09..9077c6d 100644 --- a/ant-design-vue-jeecg/src/views/account/settings/BaseSetting.vue +++ b/ant-design-vue-jeecg/src/views/account/settings/BaseSetting.vue @@ -51,7 +51,7 @@ </a-form> </a-col> - <a-col :md="24" :lg="8" :style="{ minHeight: '180px' }"> + <!-- <a-col :md="24" :lg="8" :style="{ minHeight: '180px' }"> <div class="ant-upload-preview" @click="$refs.modal.edit(1)"> <a-icon type="cloud-upload-o" class="upload-icon"/> <div class="mask"> @@ -59,7 +59,7 @@ </div> <img :src="option.img"/> </div> - </a-col> + </a-col> --> </a-row> diff --git a/ant-design-vue-jeecg/src/views/jeecg/JeecgOrderMainList.vue b/ant-design-vue-jeecg/src/views/jeecg/JeecgOrderMainList.vue index 41564c2..51cb77b 100644 --- a/ant-design-vue-jeecg/src/views/jeecg/JeecgOrderMainList.vue +++ b/ant-design-vue-jeecg/src/views/jeecg/JeecgOrderMainList.vue @@ -57,7 +57,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/jeecg/TableExpandeSub.vue b/ant-design-vue-jeecg/src/views/jeecg/TableExpandeSub.vue index 039581f..67bdd5c 100644 --- a/ant-design-vue-jeecg/src/views/jeecg/TableExpandeSub.vue +++ b/ant-design-vue-jeecg/src/views/jeecg/TableExpandeSub.vue @@ -52,7 +52,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderCustomerList.vue b/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderCustomerList.vue index 52946b7..21113ab 100644 --- a/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderCustomerList.vue +++ b/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderCustomerList.vue @@ -22,7 +22,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderDMainList.vue b/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderDMainList.vue index e26f61d..41ce518 100644 --- a/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderDMainList.vue +++ b/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderDMainList.vue @@ -53,7 +53,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderTicketList.vue b/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderTicketList.vue index 1786c91..2ee9472 100644 --- a/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderTicketList.vue +++ b/ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderTicketList.vue @@ -22,7 +22,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/DataLogList.vue b/ant-design-vue-jeecg/src/views/system/DataLogList.vue index 4033ec7..e722e9c 100644 --- a/ant-design-vue-jeecg/src/views/system/DataLogList.vue +++ b/ant-design-vue-jeecg/src/views/system/DataLogList.vue @@ -34,8 +34,8 @@ <div> <!--已选择的清空 --> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> <a-table @@ -51,7 +51,7 @@ @change="handleTableChange" > <!-- 字符串超长截取省略号显示--> - <span slot="dataContent" slot-scope="text, record"> + <span slot="dataContent" slot-scope="text"> <j-ellipsis :value="text" :length="80"/> </span> </a-table> diff --git a/ant-design-vue-jeecg/src/views/system/DepartList2.vue b/ant-design-vue-jeecg/src/views/system/DepartList2.vue index de7a077..834568d 100644 --- a/ant-design-vue-jeecg/src/views/system/DepartList2.vue +++ b/ant-design-vue-jeecg/src/views/system/DepartList2.vue @@ -25,7 +25,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> <a-table diff --git a/ant-design-vue-jeecg/src/views/system/NewPermissionList.vue b/ant-design-vue-jeecg/src/views/system/NewPermissionList.vue index df095dc..02305aa 100644 --- a/ant-design-vue-jeecg/src/views/system/NewPermissionList.vue +++ b/ant-design-vue-jeecg/src/views/system/NewPermissionList.vue @@ -17,9 +17,9 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择 <a style="font-weight: 600">{{ + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length - }}</a>项 + }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/PermissionList.vue b/ant-design-vue-jeecg/src/views/system/PermissionList.vue index 49d85c8..a4dc83b 100644 --- a/ant-design-vue-jeecg/src/views/system/PermissionList.vue +++ b/ant-design-vue-jeecg/src/views/system/PermissionList.vue @@ -18,9 +18,9 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择 <a style="font-weight: 600">{{ + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length - }}</a>项 + }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/RoleList.vue b/ant-design-vue-jeecg/src/views/system/RoleList.vue index f113c7a..7167e81 100644 --- a/ant-design-vue-jeecg/src/views/system/RoleList.vue +++ b/ant-design-vue-jeecg/src/views/system/RoleList.vue @@ -56,8 +56,8 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/RoleUserList.vue b/ant-design-vue-jeecg/src/views/system/RoleUserList.vue index 9410086..708a192 100644 --- a/ant-design-vue-jeecg/src/views/system/RoleUserList.vue +++ b/ant-design-vue-jeecg/src/views/system/RoleUserList.vue @@ -31,23 +31,22 @@ </a-form> </div> <!-- 操作按钮区域 --> - <div class="table-operator" style="margin: 5px 0 10px 2px"> + <div class="table-operator"> <a-button @click="handleAdd" v-has="'role:add'" type="primary" icon="plus">新建角色</a-button> <!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>--> - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" - :action="importExcelUrl" @change="handleImportExcel"> + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> <a-button v-has="'role:import'" type="primary" icon="import">导入</a-button> </a-upload> <a-button v-has="'role:export'" type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button> </div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"> - </i> 已选择 <a><b>{{ selectedRowKeys1.length }}</b></a>项 - <a style="margin-left: 24px" @click="onClearSelected1">清空</a> - </div> + <div> + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <i class="anticon anticon-info-circle ant-alert-icon"> + </i> 已选择 <a><b>{{ selectedRowKeys1.length }}</b></a> 项 + <a style="margin-left: 24px" @click="onClearSelected1">清空</a> + </div> - <div style="margin-top: 15px"> <a-table style="height:500px" ref="table" @@ -60,30 +59,26 @@ :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}" @change="handleTableChange"> - <span slot="action" slot-scope="text, record"> - <a @click="handleOpen(record)">用户</a> - <a-divider type="vertical"/> - - - <a-dropdown> - <a class="ant-dropdown-link"> - 更多 <a-icon type="down"/> - </a> - <a-menu slot="overlay"> - <a-menu-item> - <a v-has="'role:authorize'" @click="handlePerssion(record.id)">授权</a> - </a-menu-item> - <a-menu-item> - <a v-has="'role:edit'" @click="handleEdit(record)">编辑</a> - </a-menu-item> - <a-menu-item> - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)"> - <a v-has="'role:delete'">删除</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> + <span slot="action" slot-scope="text, record"> + <a @click="handleOpen(record)">用户</a> + <a-divider type="vertical"/> + <a-dropdown> + <a class="ant-dropdown-link">更多<a-icon type="down"/></a> + <a-menu slot="overlay"> + <a-menu-item> + <a v-has="'role:authorize'" @click="handlePerssion(record.id)">授权</a> + </a-menu-item> + <a-menu-item> + <a v-has="'role:edit'" @click="handleEdit(record)">编辑</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)"> + <a v-has="'role:delete'">删除</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> </a-table> </div> <!-- 右侧的角色权限配置 --> diff --git a/ant-design-vue-jeecg/src/views/system/SysAnnouncementList.vue b/ant-design-vue-jeecg/src/views/system/SysAnnouncementList.vue index 2f75cdf..7e291cc 100644 --- a/ant-design-vue-jeecg/src/views/system/SysAnnouncementList.vue +++ b/ant-design-vue-jeecg/src/views/system/SysAnnouncementList.vue @@ -52,7 +52,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/SysCategoryList.vue b/ant-design-vue-jeecg/src/views/system/SysCategoryList.vue index 45d7bdb..c562191 100644 --- a/ant-design-vue-jeecg/src/views/system/SysCategoryList.vue +++ b/ant-design-vue-jeecg/src/views/system/SysCategoryList.vue @@ -26,7 +26,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/SysPositionList.vue b/ant-design-vue-jeecg/src/views/system/SysPositionList.vue index 1d366da..2ba60c6 100644 --- a/ant-design-vue-jeecg/src/views/system/SysPositionList.vue +++ b/ant-design-vue-jeecg/src/views/system/SysPositionList.vue @@ -64,7 +64,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/SysUserOnlineList.vue b/ant-design-vue-jeecg/src/views/system/SysUserOnlineList.vue index 6f9d2bc..525e218 100644 --- a/ant-design-vue-jeecg/src/views/system/SysUserOnlineList.vue +++ b/ant-design-vue-jeecg/src/views/system/SysUserOnlineList.vue @@ -24,7 +24,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/TenantList.vue b/ant-design-vue-jeecg/src/views/system/TenantList.vue index a6de515..205ab42 100644 --- a/ant-design-vue-jeecg/src/views/system/TenantList.vue +++ b/ant-design-vue-jeecg/src/views/system/TenantList.vue @@ -29,7 +29,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/UserList.vue b/ant-design-vue-jeecg/src/views/system/UserList.vue index 001d60f..f1eeacd 100644 --- a/ant-design-vue-jeecg/src/views/system/UserList.vue +++ b/ant-design-vue-jeecg/src/views/system/UserList.vue @@ -61,7 +61,7 @@ </div> <!-- 操作按钮区域 --> - <div class="table-operator" style="border-top: 5px"> + <div class="table-operator"> <a-button v-has="'user:add'" @click="handleAdd" type="primary" icon="plus">添加用户</a-button> <a-button v-has="'user:export'" type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button> <a-upload v-has="'user:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @@ -97,8 +97,8 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue b/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue index 9689495..1122922 100644 --- a/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue +++ b/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue @@ -23,6 +23,25 @@ /> </a-form-item> </a-col> + <a-col :xl="12" :lg="14" :md="16" :sm="24"> + <a-form-item label="任务创建时间"> + <j-date + :show-time="true" + date-format="YYYY-MM-DD HH:mm:ss" + placeholder="请选择开始时间" + class="query-group-cust" + v-model="queryParam.taskCreateTimeBegin" + ></j-date> + <span class="query-group-split-cust"></span> + <j-date + :show-time="true" + date-format="YYYY-MM-DD HH:mm:ss" + placeholder="请选择结束时间" + class="query-group-cust" + v-model="queryParam.taskCreateTimeEnd" + ></j-date> + </a-form-item> + </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> @@ -90,20 +109,40 @@ export default { required: false } }, + watch: { mainId: { immediate: true, handler(val) { - if (!this.mainId) { - this.clearList() - } else { - this.queryParam['locationCode'] = val - this.loadData(1) - } + var nowDate = new Date() + this.queryParam['taskCreateTimeBegin'] = new Date(nowDate.getTime() - 90 * 24 * 60 * 60 * 1000).format('yyyy-MM-dd hh:mm:ss') + this.queryParam['taskCreateTimeEnd'] = nowDate.format('yyyy-MM-dd hh:mm:ss') + this.queryParam['locationCode'] = val + this.loadData(1) } } }, data() { + Date.prototype.format = function(fmt) { + var o = { + 'M+': this.getMonth() + 1, //月份 + 'd+': this.getDate(), //日 + 'h+': this.getHours(), //小时 + 'm+': this.getMinutes(), //分 + 's+': this.getSeconds(), //秒 + 'q+': Math.floor((this.getMonth() + 3) / 3), //季度 + S: this.getMilliseconds() //毫秒 + } + if (/(y+)/.test(fmt)) { + fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)) + } + for (var k in o) { + if (new RegExp('(' + k + ')').test(fmt)) { + fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)) + } + } + return fmt + } return { description: '库位任务信息比较页面', disableMixinCreated: true, @@ -227,7 +266,6 @@ export default { } }) } - // 获取 wcs_task_status if (getDictItemsFromCache('wcs_task_status')) { this.wcsTaskStatusList = getDictItemsFromCache('wcs_task_status') diff --git a/ant-design-vue-jeecg/src/views/system/config/AddressList.vue b/ant-design-vue-jeecg/src/views/system/config/AddressList.vue index 0fa91dd..343e81b 100644 --- a/ant-design-vue-jeecg/src/views/system/config/AddressList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/AddressList.vue @@ -49,7 +49,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/AgvPortList.vue b/ant-design-vue-jeecg/src/views/system/config/AgvPortList.vue index e499b26..c7da03b 100644 --- a/ant-design-vue-jeecg/src/views/system/config/AgvPortList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/AgvPortList.vue @@ -47,7 +47,7 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/BomDetailList.vue b/ant-design-vue-jeecg/src/views/system/config/BomDetailList.vue index f57baad..78ca2ce 100644 --- a/ant-design-vue-jeecg/src/views/system/config/BomDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/BomDetailList.vue @@ -31,7 +31,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/BomHeaderList.vue b/ant-design-vue-jeecg/src/views/system/config/BomHeaderList.vue index fce023f..08b881c 100644 --- a/ant-design-vue-jeecg/src/views/system/config/BomHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/BomHeaderList.vue @@ -43,7 +43,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/CarrierList.vue b/ant-design-vue-jeecg/src/views/system/config/CarrierList.vue index 0054478..bb6322d 100644 --- a/ant-design-vue-jeecg/src/views/system/config/CarrierList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/CarrierList.vue @@ -34,7 +34,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/CompanyList.vue b/ant-design-vue-jeecg/src/views/system/config/CompanyList.vue index e8cc7af..4a3553b 100644 --- a/ant-design-vue-jeecg/src/views/system/config/CompanyList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/CompanyList.vue @@ -20,7 +20,7 @@ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a @click="handleToggleSearch" style="margin-left: 8px"> {{ toggleSearchStatus ? '收起' : '展开' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> </a> </span> </a-col> @@ -33,19 +33,27 @@ <div class="table-operator"> <a-button @click="handleAdd" v-has="'company:add'" type="primary" icon="plus">新增</a-button> <a-button v-has="'company:export'" type="primary" icon="download" @click="handleExportXls('货主')">导出</a-button> - <a-upload v-has="'company:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" - @change="handleImportExcel"> + <a-upload + v-has="'company:import'" + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > <a-button type="primary" icon="import">导入</a-button> </a-upload> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" v-has="'company:deleteBatch'"> <a-menu-item key="1" @click="batchDel"> - <a-icon type="deleteBatch"/> + <a-icon type="deleteBatch" /> 删除 </a-menu-item> </a-menu> - <a-button style="margin-left: 8px"> 批量操作 - <a-icon type="down"/> + <a-button style="margin-left: 8px"> + 批量操作 + <a-icon type="down" /> </a-button> </a-dropdown> </div> @@ -53,49 +61,47 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> <a-table ref="table" size="middle" - :scroll="{x:true}" + :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap" - @change="handleTableChange"> - + @change="handleTableChange" + > <template slot="htmlSlot" slot-scope="text"> <div v-html="text"></div> </template> <template slot="imgSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> - <img v-else :src="getImgView(text)" height="25px" alt="" - style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img + v-else + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> 下载 </a-button> </template> <span slot="action" slot-scope="text, record"> - <a v-has="'company:edit'" @click="handleEdit(record)">编辑</a> - <a-divider type="vertical"/> + <a v-has="'company:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical" /></a> <a-dropdown> <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> <a-menu slot="overlay"> @@ -110,7 +116,6 @@ </a-menu> </a-dropdown> </span> - </a-table> </div> @@ -119,10 +124,9 @@ </template> <script> - import '@/assets/less/TableExpand.less' -import {mixinDevice} from '@/utils/mixin' -import {JeecgListMixin} from '@/mixins/JeecgListMixin' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' import CompanyModal from './modules/CompanyModal' export default { @@ -141,105 +145,103 @@ export default { dataIndex: '', key: 'rowIndex', width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, { title: '货主编码', - align: "center", + align: 'center', dataIndex: 'code' }, { title: '货主名称', - align: "center", + align: 'center', dataIndex: 'name' }, { title: '地址', - align: "center", + align: 'center', dataIndex: 'address' }, { title: '区县', - align: "center", + align: 'center', dataIndex: 'district' }, { title: '城市', - align: "center", + align: 'center', dataIndex: 'city' }, { title: '省份', - align: "center", + align: 'center', dataIndex: 'province' }, { title: '国家', - align: "center", + align: 'center', dataIndex: 'country' }, { title: '邮编', - align: "center", + align: 'center', dataIndex: 'postalcode' }, { title: '联系人', - align: "center", + align: 'center', dataIndex: 'attentionto' }, { title: '联系电话', - align: "center", + align: 'center', dataIndex: 'phonenum' }, { title: '操作', dataIndex: 'action', - align: "center", - fixed: "right", + align: 'center', + fixed: 'right', width: 147, - scopedSlots: {customRender: 'action'} + scopedSlots: { customRender: 'action' } } ], url: { - list: "/config/company/list", - delete: "/config/company/delete", - deleteBatch: "/config/company/deleteBatch", - exportXlsUrl: "/config/company/exportXls", - importExcelUrl: "config/company/importExcel", - + list: '/config/company/list', + delete: '/config/company/delete', + deleteBatch: '/config/company/deleteBatch', + exportXlsUrl: '/config/company/exportXls', + importExcelUrl: 'config/company/importExcel' }, dictOptions: {}, - superFieldList: [], + superFieldList: [] } }, created() { - this.getSuperFieldList(); + this.getSuperFieldList() }, computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, methods: { - initDictConfig() { - }, + initDictConfig() {}, getSuperFieldList() { - let fieldList = []; - fieldList.push({type: 'string', value: 'code', text: '货主编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'name', text: '货主名称', dictCode: ''}) - fieldList.push({type: 'string', value: 'address', text: '地址', dictCode: ''}) - fieldList.push({type: 'string', value: 'district', text: '区县', dictCode: ''}) - fieldList.push({type: 'string', value: 'city', text: '城市', dictCode: ''}) - fieldList.push({type: 'string', value: 'province', text: '省份', dictCode: ''}) - fieldList.push({type: 'string', value: 'country', text: '国家', dictCode: ''}) - fieldList.push({type: 'string', value: 'postalcode', text: '邮编', dictCode: ''}) - fieldList.push({type: 'string', value: 'attentionto', text: '联系人', dictCode: ''}) - fieldList.push({type: 'string', value: 'phonenum', text: '联系电话', dictCode: ''}) + let fieldList = [] + fieldList.push({ type: 'string', value: 'code', text: '货主编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'name', text: '货主名称', dictCode: '' }) + fieldList.push({ type: 'string', value: 'address', text: '地址', dictCode: '' }) + fieldList.push({ type: 'string', value: 'district', text: '区县', dictCode: '' }) + fieldList.push({ type: 'string', value: 'city', text: '城市', dictCode: '' }) + fieldList.push({ type: 'string', value: 'province', text: '省份', dictCode: '' }) + fieldList.push({ type: 'string', value: 'country', text: '国家', dictCode: '' }) + fieldList.push({ type: 'string', value: 'postalcode', text: '邮编', dictCode: '' }) + fieldList.push({ type: 'string', value: 'attentionto', text: '联系人', dictCode: '' }) + fieldList.push({ type: 'string', value: 'phonenum', text: '联系电话', dictCode: '' }) this.superFieldList = fieldList } } diff --git a/ant-design-vue-jeecg/src/views/system/config/ContainerCapacityList.vue b/ant-design-vue-jeecg/src/views/system/config/ContainerCapacityList.vue index 6f08fe6..af39123 100644 --- a/ant-design-vue-jeecg/src/views/system/config/ContainerCapacityList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/ContainerCapacityList.vue @@ -6,7 +6,16 @@ <a-row :gutter="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="容器类型"> - <a-input placeholder="请输入容器类型" v-model="queryParam.containerTypeCode"></a-input> + <a-select + show-search + placeholder="请选择容器类型" + option-filter-prop="children" + v-model="queryParam.containerTypeCode" + > + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code"> + {{ item.name }} + </a-select-option> + </a-select> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> @@ -14,21 +23,15 @@ <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input> </a-form-item> </a-col> - <template v-if="toggleSearchStatus"> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="是否可用"> - <j-dict-select-tag placeholder="请选择是否可用" v-model="queryParam.enable" dictCode="enable_status"/> - </a-form-item> - </a-col> - </template> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="是否可用"> + <j-dict-select-tag placeholder="请选择是否可用" v-model="queryParam.enable" dictCode="enable_status" /> + </a-form-item> + </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> - <a @click="handleToggleSearch" style="margin-left: 8px"> - {{ toggleSearchStatus ? '收起' : '展开' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> - </a> </span> </a-col> </a-row> @@ -39,20 +42,35 @@ <!-- 操作按钮区域 --> <div class="table-operator"> <a-button @click="handleAdd" v-has="'containerCapacity:add'" type="primary" icon="plus">新增</a-button> - <a-button v-has="'containerCapacity:export'" type="primary" icon="download" @click="handleExportXls('容器容量管理')">导出</a-button> - <a-upload v-has="'containerCapacity:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" - @change="handleImportExcel"> + <a-button + v-has="'containerCapacity:export'" + type="primary" + icon="download" + @click="handleExportXls('容器容量管理')" + > + 导出 + </a-button> + <a-upload + v-has="'containerCapacity:import'" + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > <a-button type="primary" icon="import">导入</a-button> </a-upload> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" v-has="'containerCapacity:deleteBatch'"> <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> + <a-icon type="delete" /> 删除 </a-menu-item> </a-menu> - <a-button style="margin-left: 8px"> 批量操作 - <a-icon type="down"/> + <a-button style="margin-left: 8px"> + 批量操作 + <a-icon type="down" /> </a-button> </a-dropdown> </div> @@ -60,50 +78,52 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> <a-table ref="table" size="middle" - :scroll="{x:true}" + :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap" - @change="handleTableChange"> + @change="handleTableChange" + > + <span slot="containerTypeCode" slot-scope="containerTypeCode"> + <a-tag :key="containerTypeCode" color="pink"> + {{ solutionContainerType(containerTypeCode) }} + </a-tag> + </span> <template slot="htmlSlot" slot-scope="text"> <div v-html="text"></div> </template> <template slot="imgSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> - <img v-else :src="getImgView(text)" height="25px" alt="" - style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img + v-else + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> 下载 </a-button> </template> - <span slot="action" slot-scope="text, record"> - <a v-has="'containerCapacity:edit'" @click="handleEdit(record)">编辑</a> - - <a-divider type="vertical"/> + <a v-has="'containerCapacity:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> <a-dropdown> <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> <a-menu slot="overlay"> @@ -118,7 +138,6 @@ </a-menu> </a-dropdown> </span> - </a-table> </div> @@ -127,13 +146,12 @@ </template> <script> - import '@/assets/less/TableExpand.less' -import {mixinDevice} from '@/utils/mixin' -import {JeecgListMixin} from '@/mixins/JeecgListMixin' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' import ContainerCapacityModal from './modules/ContainerCapacityModal' -import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' -import {getZoneList} from '@/api/api' +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' +import { getZoneList, getContainerTypeList } from '@/api/api' export default { name: 'ContainerCapacityList', @@ -144,6 +162,7 @@ export default { data() { return { description: '容器容量管理管理页面', + containerTypeList: [], // 表头 columns: [ { @@ -151,112 +170,125 @@ export default { dataIndex: '', key: 'rowIndex', width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, { title: '容器类型', - align: "center", - dataIndex: 'containerTypeCode' - }, - { - title: '货主', - align: "center", - dataIndex: 'companyCode' + align: 'center', + dataIndex: 'containerTypeCode', + key: 'containerTypeCode', + scopedSlots: { customRender: 'containerTypeCode' } }, { title: '物料编码', - align: "center", + align: 'center', dataIndex: 'materialCode' }, { title: '物料名称', - align: "center", + align: 'center', dataIndex: 'materialName' }, { title: '物料单位', - align: "center", + align: 'center', dataIndex: 'materialUnit' }, { title: '存放数量', - align: "center", + align: 'center', dataIndex: 'qty' }, { title: '是否可用', - align: "center", + align: 'center', dataIndex: 'enable_dictText' }, { title: '创建人', - align: "center", + align: 'center', dataIndex: 'createBy' }, { title: '创建日期', - align: "center", + align: 'center', dataIndex: 'createTime' }, { title: '更新人', - align: "center", + align: 'center', dataIndex: 'updateBy' }, { title: '更新日期', - align: "center", + align: 'center', dataIndex: 'updateTime' }, { title: '操作', dataIndex: 'action', - align: "center", - fixed: "right", + align: 'center', + fixed: 'right', width: 147, - scopedSlots: {customRender: 'action'} + scopedSlots: { customRender: 'action' } } ], url: { - list: "/config/containerCapacity/list", - delete: "/config/containerCapacity/delete", - deleteBatch: "/config/containerCapacity/deleteBatch", - exportXlsUrl: "/config/containerCapacity/exportXls", - importExcelUrl: "config/containerCapacity/importExcel", - + list: '/config/containerCapacity/list', + delete: '/config/containerCapacity/delete', + deleteBatch: '/config/containerCapacity/deleteBatch', + exportXlsUrl: '/config/containerCapacity/exportXls', + importExcelUrl: 'config/containerCapacity/importExcel' }, dictOptions: {}, - superFieldList: [], + superFieldList: [] } }, created() { - this.getSuperFieldList(); + this.getSuperFieldList() + this.loadFrom() }, computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, methods: { - initDictConfig() { + initDictConfig() {}, + solutionContainerType(value) { + var actions = [] + Object.keys(this.containerTypeList).some(key => { + if (this.containerTypeList[key].code == '' + value) { + actions.push(this.containerTypeList[key].name) + return true + } + }) + return actions.join('') + }, + loadFrom() { + getContainerTypeList().then(res => { + if (res.success) { + this.containerTypeList = res.result + } + }) }, getSuperFieldList() { - let fieldList = []; - fieldList.push({type: 'string', value: 'containerTypeCode', text: '容器类型', dictCode: ''}) - fieldList.push({type: 'string', value: 'warehouseCode', text: '仓库编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''}) - fieldList.push({type: 'string', value: 'materialCode', text: '物料编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'materialName', text: '物料名称', dictCode: ''}) - fieldList.push({type: 'string', value: 'materialUnit', text: '物料单位', dictCode: ''}) - fieldList.push({type: 'BigDecimal', value: 'qty', text: '存放数量', dictCode: ''}) - fieldList.push({type: 'int', value: 'enable', text: '是否可用', dictCode: 'enable_status'}) - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) + let fieldList = [] + fieldList.push({ type: 'string', value: 'containerTypeCode', text: '容器类型', dictCode: '' }) + fieldList.push({ type: 'string', value: 'warehouseCode', text: '仓库编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'companyCode', text: '货主', dictCode: '' }) + fieldList.push({ type: 'string', value: 'materialCode', text: '物料编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' }) + fieldList.push({ type: 'string', value: 'materialUnit', text: '物料单位', dictCode: '' }) + fieldList.push({ type: 'BigDecimal', value: 'qty', text: '存放数量', dictCode: '' }) + fieldList.push({ type: 'int', value: 'enable', text: '是否可用', dictCode: 'enable_status' }) + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) this.superFieldList = fieldList } } diff --git a/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue b/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue index 2969d75..c7a21ec 100644 --- a/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue @@ -21,18 +21,30 @@ show-search placeholder="请选择容器类型" option-filter-prop="children" - - v-model="queryParam.containerTypeCode"> - <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code">{{ - item.name - }} + v-model="queryParam.containerTypeCode" + > + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code" + >{{ item.name }} </a-select-option> </a-select> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="容器状态"> - <j-dict-select-tag placeholder="请选择容器状态" v-model="queryParam.status" dictCode="container_status"/> + <j-dict-select-tag + placeholder="请选择容器状态" + v-model="queryParam.status" + dictCode="container_status" + /> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="容器填充状态"> + <j-dict-select-tag + placeholder="请选择容器填充状态" + v-model="queryParam.fillStatus" + dictCode="fill_status" + /> </a-form-item> </a-col> </template> @@ -42,7 +54,7 @@ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a @click="handleToggleSearch" style="margin-left: 8px"> {{ toggleSearchStatus ? '收起' : '展开' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> </a> </span> </a-col> @@ -54,21 +66,30 @@ <!-- 操作按钮区域 --> <div class="table-operator"> <a-button @click="handleAdd" v-has="'container:add'" type="primary" icon="plus">新增</a-button> - <a-button v-has="'container:export'" type="primary" icon="download" @click="handleExportXls('容器管理')">导出</a-button> - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" - @change="handleImportExcel"> + <a-button v-has="'container:export'" type="primary" icon="download" @click="handleExportXls('容器管理')"> + 导出 + </a-button> + <a-upload + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > <a-button v-has="'container:import'" type="primary" icon="import">导入</a-button> </a-upload> <a-button v-has="'container:print'" @click="batchPrint()" type="primary">打印</a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" v-has="'container:deleteBatch'"> <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> + <a-icon type="delete" /> 删除 </a-menu-item> </a-menu> - <a-button style="margin-left: 8px"> 批量操作 - <a-icon type="down"/> + <a-button style="margin-left: 8px"> + 批量操作 + <a-icon type="down" /> </a-button> </a-dropdown> </div> @@ -76,33 +97,33 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> <a-table ref="table" size="middle" - :scroll="{x:true}" + :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap" - @change="handleTableChange"> - + @change="handleTableChange" + > <span slot="zoneCode" slot-scope="zoneCode"> - <a-tag :key="zoneCode" color=blue> + <a-tag :key="zoneCode" color="blue"> {{ solutionZoneCode(zoneCode) }} </a-tag> </span> <span slot="containerTypeCode" slot-scope="containerTypeCode"> - <a-tag :key="containerTypeCode" color=pink> + <a-tag :key="containerTypeCode" color="pink"> {{ solutionContainerType(containerTypeCode) }} </a-tag> </span> @@ -112,26 +133,23 @@ </template> <template slot="imgSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> - <img v-else :src="getImgView(text)" height="25px" alt="" - style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img + v-else + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> 下载 </a-button> </template> <span slot="action" slot-scope="text, record"> - <a v-has="'container:add'" @click="editForm(record)">编辑</a> - - <a-divider type="vertical"/> + <a v-has="'container:add'" @click="editForm(record)">编辑<a-divider type="vertical"/></a> <a-dropdown> <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> <a-menu slot="overlay"> @@ -146,7 +164,6 @@ </a-menu> </a-dropdown> </span> - </a-table> </div> @@ -157,16 +174,15 @@ </template> <script> - import '@/assets/less/TableExpand.less' -import {mixinDevice} from '@/utils/mixin' -import {JeecgListMixin} from '@/mixins/JeecgListMixin' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' import ContainerModal from './modules/ContainerModal' -import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' -import {getZoneList} from '@/api/api' -import {getContainerTypeList} from '@/api/api' -import ContainerEditModal from "./modules/ContainerEditModal"; -import ContainerPrintModal from "./modules/ContainerPrintModal"; +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' +import { getZoneList } from '@/api/api' +import { getContainerTypeList } from '@/api/api' +import ContainerEditModal from './modules/ContainerEditModal' +import ContainerPrintModal from './modules/ContainerPrintModal' export default { name: 'ContainerList', @@ -188,125 +204,132 @@ export default { dataIndex: '', key: 'rowIndex', width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, { title: '容器编码', - align: "center", + align: 'center', dataIndex: 'code' }, { title: '库位编码', - align: "center", + align: 'center', dataIndex: 'locationCode' }, { title: '容器类型', - align: "center", + align: 'center', dataIndex: 'containerTypeCode', key: 'containerTypeCode', - scopedSlots: {customRender: 'containerTypeCode'} + scopedSlots: { customRender: 'containerTypeCode' } }, { title: '容器状态', - align: "center", + align: 'center', dataIndex: 'status_dictText' }, { + title: '容器填充状态', + align: 'center', + dataIndex: 'fillStatus_dictText' + }, + { title: '创建人', - align: "center", + align: 'center', dataIndex: 'createBy' }, { title: '创建日期', - align: "center", + align: 'center', dataIndex: 'createTime' }, { title: '更新人', - align: "center", + align: 'center', dataIndex: 'updateBy' }, { title: '更新日期', - align: "center", + align: 'center', dataIndex: 'updateTime' }, { title: '操作', dataIndex: 'action', - align: "center", - fixed: "right", + align: 'center', + fixed: 'right', width: 147, - scopedSlots: {customRender: 'action'} + scopedSlots: { customRender: 'action' } } ], url: { - list: "/config/container/list", - delete: "/config/container/delete", - deleteBatch: "/config/container/deleteBatch", - exportXlsUrl: "/config/container/exportXls", - importExcelUrl: "config/container/importExcel", - + list: '/config/container/list', + delete: '/config/container/delete', + deleteBatch: '/config/container/deleteBatch', + exportXlsUrl: '/config/container/exportXls', + importExcelUrl: 'config/container/importExcel' }, dictOptions: {}, - superFieldList: [], + superFieldList: [] } }, created() { - this.getSuperFieldList(); - this.loadFrom(); + this.getSuperFieldList() + this.loadFrom() }, computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, methods: { - initDictConfig() { - }, + initDictConfig() {}, getSuperFieldList() { - let fieldList = []; - fieldList.push({type: 'string', value: 'code', text: '容器编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''}) - fieldList.push({type: 'string', value: 'locationCode', text: '库位编码', dictCode: ''}) + let fieldList = [] + fieldList.push({ type: 'string', value: 'code', text: '容器编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'companyCode', text: '货主', dictCode: '' }) + fieldList.push({ type: 'string', value: 'locationCode', text: '库位编码', dictCode: '' }) // fieldList.push({type:'string',value:'zoneCode',text:'库区编码',dictCode:''}) - fieldList.push({type: 'string', value: 'containerTypeCode', text: '容器类型', dictCode: ''}) - fieldList.push({type: 'string', value: 'status', text: '容器状态', dictCode: 'container_status'}) - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) + fieldList.push({ type: 'string', value: 'containerTypeCode', text: '容器类型', dictCode: '' }) + fieldList.push({ type: 'string', value: 'status', text: '容器状态', dictCode: 'container_status' }) + fieldList.push({ type: 'string', value: 'fillStatus', text: '容器填充状态', dictCode: 'fill_status' }) + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) this.superFieldList = fieldList }, editForm(record) { - this.$refs.modalEditForm.edit(record); - this.$refs.modalEditForm.title = "编辑容器"; - this.$refs.modalEditForm.disableSubmit = false; + this.$refs.modalEditForm.edit(record) + this.$refs.modalEditForm.title = '编辑容器' + this.$refs.modalEditForm.disableSubmit = false }, batchPrint() { if (this.selectedRowKeys.length <= 0) { - this.$message.warning('请选择一条记录!'); - return; + this.$message.warning('请选择一条记录!') + return } else { - var ids = ""; + var ids = '' for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ","; + ids += this.selectedRowKeys[a] + ',' } - window.open(window._CONFIG['domianURL'] + "/jmreport/view/768644669245833216/?id=" + ids, "newWindow", "toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100"); - + window.open( + window._CONFIG['domianURL'] + '/jmreport/view/768644669245833216/?id=' + ids, + 'newWindow', + 'toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100' + ) } }, loadFrom() { - getZoneList().then((res) => { + getZoneList().then(res => { if (res.success) { this.zoneList = res.result } }) - getContainerTypeList().then((res) => { + getContainerTypeList().then(res => { if (res.success) { this.containerTypeList = res.result } @@ -314,8 +337,8 @@ export default { }, solutionZoneCode(value) { var actions = [] - Object.keys(this.zoneList).some((key) => { - if (this.zoneList[key].code == ('' + value)) { + Object.keys(this.zoneList).some(key => { + if (this.zoneList[key].code == '' + value) { actions.push(this.zoneList[key].name) return true } @@ -324,14 +347,14 @@ export default { }, solutionContainerType(value) { var actions = [] - Object.keys(this.containerTypeList).some((key) => { - if (this.containerTypeList[key].code == ('' + value)) { + Object.keys(this.containerTypeList).some(key => { + if (this.containerTypeList[key].code == '' + value) { actions.push(this.containerTypeList[key].name) return true } }) return actions.join('') - }, + } } } </script> diff --git a/ant-design-vue-jeecg/src/views/system/config/ContainerTypeList.vue b/ant-design-vue-jeecg/src/views/system/config/ContainerTypeList.vue index bd9c519..7fbc700 100644 --- a/ant-design-vue-jeecg/src/views/system/config/ContainerTypeList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/ContainerTypeList.vue @@ -20,7 +20,7 @@ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a @click="handleToggleSearch" style="margin-left: 8px"> {{ toggleSearchStatus ? '收起' : '展开' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> </a> </span> </a-col> @@ -32,20 +32,30 @@ <!-- 操作按钮区域 --> <div class="table-operator"> <a-button @click="handleAdd" v-has="'containerType:add'" type="primary" icon="plus">新增</a-button> - <a-button v-has="'containerType:export'" type="primary" icon="download" @click="handleExportXls('容器类型')">导出</a-button> - <a-upload v-has="'containerType:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" - @change="handleImportExcel"> + <a-button v-has="'containerType:export'" type="primary" icon="download" @click="handleExportXls('容器类型')"> + 导出 + </a-button> + <a-upload + v-has="'containerType:import'" + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > <a-button type="primary" icon="import">导入</a-button> </a-upload> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" v-has="'containerType:deleteBatch'"> <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> + <a-icon type="delete" /> 删除 </a-menu-item> </a-menu> - <a-button style="margin-left: 8px"> 批量操作 - <a-icon type="down"/> + <a-button style="margin-left: 8px"> + 批量操作 + <a-icon type="down" /> </a-button> </a-dropdown> </div> @@ -53,50 +63,59 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> <a-table ref="table" size="middle" - :scroll="{x:true}" + :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap" - @change="handleTableChange"> + @change="handleTableChange" + > + <span slot="companyCode" slot-scope="companyCode"> + <a-tag :key="companyCode" color=blue> + {{ solutionCompany(companyCode) }} + </a-tag> + </span> + + <span slot="locationTypes" slot-scope="locationTypes" > + <a-tag v-for="locationType in locationTypes" :key="locationType" color=pink> + {{ solutionLocationType(locationType) }} + </a-tag> + </span> <template slot="htmlSlot" slot-scope="text"> <div v-html="text"></div> </template> <template slot="imgSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> - <img v-else :src="getImgView(text)" height="25px" alt="" - style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img + v-else + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> 下载 </a-button> </template> <span slot="action" slot-scope="text, record"> - <a v-has="'containerType:edit'" @click="handleEdit(record)">编辑</a> - - <a-divider type="vertical"/> + <a v-has="'containerType:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> <a-dropdown> <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> <a-menu slot="overlay"> @@ -111,7 +130,6 @@ </a-menu> </a-dropdown> </span> - </a-table> </div> @@ -120,11 +138,11 @@ </template> <script> - import '@/assets/less/TableExpand.less' -import {mixinDevice} from '@/utils/mixin' -import {JeecgListMixin} from '@/mixins/JeecgListMixin' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' import ContainerTypeModal from './modules/ContainerTypeModal' +import {getCompanyList, getLocationTypeList } from '@/api/api' export default { name: 'ContainerTypeList', @@ -134,6 +152,8 @@ export default { }, data() { return { + companyList: [], + locationTypeList: [], description: '容器类型管理页面', // 表头 columns: [ @@ -142,123 +162,158 @@ export default { dataIndex: '', key: 'rowIndex', width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, { title: '编码', - align: "center", + align: 'center', dataIndex: 'code' }, { title: '名称', - align: "center", + align: 'center', dataIndex: 'name' }, - { - title: '货主编码', - align: "center", - dataIndex: 'companyCode' - }, + // { + // title: '货主', + // align: 'center', + // dataIndex: 'companyCode', + // key: 'companyCode', + // scopedSlots: {customRender: 'companyCode'} + // }, { title: '绑定的库位类型', - align: "center", - dataIndex: 'locationType' + align: 'center', + dataIndex: 'locationTypes', + key: 'locationTypes', + scopedSlots: {customRender: 'locationTypes'} }, { title: '长', - align: "center", + align: 'center', dataIndex: 'length' }, { title: '宽', - align: "center", + align: 'center', dataIndex: 'width' }, { title: '高', - align: "center", + align: 'center', dataIndex: 'height' }, { title: '空容器重量', - align: "center", + align: 'center', dataIndex: 'emptyweight' }, { title: '容器最大承重', - align: "center", + align: 'center', dataIndex: 'maxweight' }, { title: '创建人', - align: "center", + align: 'center', dataIndex: 'createBy' }, { title: '创建日期', - align: "center", + align: 'center', dataIndex: 'createTime' }, { title: '更新人', - align: "center", + align: 'center', dataIndex: 'updateBy' }, { title: '更新日期', - align: "center", + align: 'center', dataIndex: 'updateTime' }, { title: '操作', dataIndex: 'action', - align: "center", - fixed: "right", + align: 'center', + fixed: 'right', width: 147, - scopedSlots: {customRender: 'action'} + scopedSlots: { customRender: 'action' } } ], url: { - list: "/config/containerType/list", - delete: "/config/containerType/delete", - deleteBatch: "/config/containerType/deleteBatch", - exportXlsUrl: "/config/containerType/exportXls", - importExcelUrl: "config/containerType/importExcel", - + list: '/config/containerType/list', + delete: '/config/containerType/delete', + deleteBatch: '/config/containerType/deleteBatch', + exportXlsUrl: '/config/containerType/exportXls', + importExcelUrl: 'config/containerType/importExcel' }, dictOptions: {}, - superFieldList: [], + superFieldList: [] } }, created() { - this.getSuperFieldList(); + this.getSuperFieldList() + this.loadFrom() }, computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, methods: { - initDictConfig() { + initDictConfig() {}, + loadFrom() { + getCompanyList().then((res) => { + if (res.success) { + this.companyList = res.result + } + }); + getLocationTypeList().then(res => { + if (res.success) { + this.locationTypeList = res.result + } + }); + }, + solutionCompany(value) { + var actions = [] + Object.keys(this.companyList).some((key) => { + if (this.companyList[key].code == ('' + value)) { + actions.push(this.companyList[key].name) + return true + } + }) + return actions.join('') + }, + solutionLocationType(value) { + var actions = [] + Object.keys(this.locationTypeList).some(key => { + if (this.locationTypeList[key].code == '' + value) { + actions.push(this.locationTypeList[key].name) + return true + } + }) + return actions.join('') }, getSuperFieldList() { - let fieldList = []; - fieldList.push({type: 'string', value: 'code', text: '编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'name', text: '名称', dictCode: ''}) - fieldList.push({type: 'string', value: 'companyCode', text: '货主编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'locationType', text: '绑定的库位类型', dictCode: ''}) - fieldList.push({type: 'int', value: 'length', text: '长', dictCode: ''}) - fieldList.push({type: 'int', value: 'width', text: '宽', dictCode: ''}) - fieldList.push({type: 'int', value: 'height', text: '高', dictCode: ''}) - fieldList.push({type: 'int', value: 'emptyweight', text: '空容器重量', dictCode: ''}) - fieldList.push({type: 'int', value: 'maxweight', text: '容器最大承重', dictCode: ''}) - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) + let fieldList = [] + fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'name', text: '名称', dictCode: '' }) + fieldList.push({ type: 'string', value: 'companyCode', text: '货主编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'locationType', text: '绑定的库位类型', dictCode: '' }) + fieldList.push({ type: 'int', value: 'length', text: '长', dictCode: '' }) + fieldList.push({ type: 'int', value: 'width', text: '宽', dictCode: '' }) + fieldList.push({ type: 'int', value: 'height', text: '高', dictCode: '' }) + fieldList.push({ type: 'int', value: 'emptyweight', text: '空容器重量', dictCode: '' }) + fieldList.push({ type: 'int', value: 'maxweight', text: '容器最大承重', dictCode: '' }) + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) this.superFieldList = fieldList } } diff --git a/ant-design-vue-jeecg/src/views/system/config/CustomerList.vue b/ant-design-vue-jeecg/src/views/system/config/CustomerList.vue index 14fcda5..cf0b7e5 100644 --- a/ant-design-vue-jeecg/src/views/system/config/CustomerList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/CustomerList.vue @@ -34,7 +34,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/CycleCountPreferenceList.vue b/ant-design-vue-jeecg/src/views/system/config/CycleCountPreferenceList.vue index d8672b8..852e50e 100644 --- a/ant-design-vue-jeecg/src/views/system/config/CycleCountPreferenceList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/CycleCountPreferenceList.vue @@ -34,7 +34,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/LocationHighList.vue b/ant-design-vue-jeecg/src/views/system/config/LocationHighList.vue index e84b866..226b794 100644 --- a/ant-design-vue-jeecg/src/views/system/config/LocationHighList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/LocationHighList.vue @@ -54,7 +54,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/LocationList.vue b/ant-design-vue-jeecg/src/views/system/config/LocationList.vue index a5985b7..8f3f701 100644 --- a/ant-design-vue-jeecg/src/views/system/config/LocationList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/LocationList.vue @@ -16,7 +16,7 @@ </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="状态"> - <j-dict-select-tag placeholder="请选择状态" v-model="queryParam.status" dictCode="location_status"/> + <j-dict-select-tag placeholder="请选择状态" v-model="queryParam.status" dictCode="location_status" /> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> @@ -25,10 +25,10 @@ show-search placeholder="请选择库位类型" option-filter-prop="children" - - v-model="queryParam.locationTypeCode"> + v-model="queryParam.locationTypeCode" + > <a-select-option v-for="item in locationTypeList" :key="item.name" :value="item.code"> - {{item.name}} + {{ item.name }} </a-select-option> </a-select> </a-form-item> @@ -40,10 +40,10 @@ show-search placeholder="请选择库区编码" option-filter-prop="children" - - v-model="queryParam.zoneCode"> + v-model="queryParam.zoneCode" + > <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code"> - {{item.name}} + {{ item.name }} </a-select-option> </a-select> </a-form-item> @@ -70,17 +70,17 @@ </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="高低位"> - <j-dict-select-tag placeholder="请输入高低位" v-model="queryParam.high" dictCode="high_status"/> + <j-dict-select-tag placeholder="请输入高低位" v-model="queryParam.high" dictCode="high_status" /> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="内外侧"> - <j-dict-select-tag placeholder="请选择内外侧" v-model="queryParam.rowFlag" dictCode="row_type"/> + <j-dict-select-tag placeholder="请选择内外侧" v-model="queryParam.rowFlag" dictCode="row_type" /> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="是否可用"> - <j-dict-select-tag placeholder="请选择是否可用" v-model="queryParam.enable" dictCode="enable_status"/> + <j-dict-select-tag placeholder="请选择是否可用" v-model="queryParam.enable" dictCode="enable_status" /> </a-form-item> </a-col> </template> @@ -90,7 +90,7 @@ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a @click="handleToggleSearch" style="margin-left: 8px"> {{ toggleSearchStatus ? '收起' : '展开' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> </a> </span> </a-col> @@ -103,21 +103,31 @@ <div class="table-operator"> <a-button @click="batchAdd()" v-has="'location:batchAdd'" type="primary" icon="plus">批量新增</a-button> <a-button v-has="'location:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> - <a-button v-has="'location:export'" type="primary" icon="download" @click="handleExportXls('库位管理')">导出</a-button> - <a-upload v-has="'location:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" - @change="handleImportExcel"> + <a-button v-has="'location:export'" type="primary" icon="download" @click="handleExportXls('库位管理')"> + 导出 + </a-button> + <a-upload + v-has="'location:import'" + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > <a-button type="primary" icon="import">导入</a-button> </a-upload> <a-button v-has="'material:print'" @click="batchPrint()" type="primary">打印</a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" v-has="'location:deleteBatch'"> <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> + <a-icon type="delete" /> 删除 </a-menu-item> </a-menu> - <a-button style="margin-left: 8px"> 批量操作 - <a-icon type="down"/> + <a-button style="margin-left: 8px"> + 批量操作 + <a-icon type="down" /> </a-button> </a-dropdown> </div> @@ -125,33 +135,33 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> <a-table ref="table" size="middle" - :scroll="{x:true}" + :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap" - @change="handleTableChange"> - - <span slot="locationTypeCode" slot-scope="locationTypeCode"> - <a-tag :key="locationTypeCode" color=pink> + @change="handleTableChange" + > + <span slot="locationTypeCode" slot-scope="locationTypeCode"> + <a-tag :key="locationTypeCode" color="pink"> {{ solutionLocationType(locationTypeCode) }} </a-tag> </span> <span slot="zoneCode" slot-scope="zoneCode"> - <a-tag :key="zoneCode" color=blue> + <a-tag :key="zoneCode" color="blue"> {{ solutionZoneCode(zoneCode) }} </a-tag> </span> @@ -161,26 +171,23 @@ </template> <template slot="imgSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> - <img v-else :src="getImgView(text)" height="25px" alt="" - style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img + v-else + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> 下载 </a-button> </template> <span slot="action" slot-scope="text, record"> - <a v-has="'location:edit'" @click="handleEdit(record)">编辑</a> - - <a-divider type="vertical"/> + <a v-has="'location:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> <a-dropdown> <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> <a-menu slot="overlay"> @@ -195,7 +202,6 @@ </a-menu> </a-dropdown> </span> - </a-table> </div> @@ -206,15 +212,14 @@ </template> <script> - import '@/assets/less/TableExpand.less' -import {mixinDevice} from '@/utils/mixin' -import {JeecgListMixin} from '@/mixins/JeecgListMixin' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' import LocationModal from './modules/LocationModal' -import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' -import {getLocationTypeList} from '@/api/api' -import {getZoneList} from '@/api/api' -import LocationBatchAddModal from "./modules/LocationBatchAddModal"; +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' +import { getLocationTypeList } from '@/api/api' +import { getZoneList } from '@/api/api' +import LocationBatchAddModal from './modules/LocationBatchAddModal' import LocationPrintModal from './modules/LocationPrintModal' export default { @@ -234,114 +239,113 @@ export default { columns: [ { title: 'ID', - align: "center", + align: 'center', dataIndex: 'id' }, { title: '库位编码', - align: "center", + align: 'center', dataIndex: 'code' }, { title: '容器编码', - align: "center", + align: 'center', dataIndex: 'containerCode' }, { title: '状态', - align: "center", + align: 'center', dataIndex: 'status_dictText' }, { title: '库区', - align: "center", + align: 'center', dataIndex: 'zoneCode', key: 'zoneCode', - scopedSlots: {customRender: 'zoneCode'} + scopedSlots: { customRender: 'zoneCode' } }, { title: '库位类型', - align: "center", + align: 'center', dataIndex: 'locationTypeCode', key: 'locationTypeCode', - scopedSlots: {customRender: 'locationTypeCode'} + scopedSlots: { customRender: 'locationTypeCode' } }, { title: '巷道', - align: "center", + align: 'center', dataIndex: 'roadWay' }, { title: '行', - align: "center", + align: 'center', dataIndex: 'row' }, { title: '列', - align: "center", + align: 'center', dataIndex: 'icolumn' }, { title: '层', - align: "center", + align: 'center', dataIndex: 'layer' }, { title: '高低位', - align: "center", + align: 'center', dataIndex: 'high_dictText' }, { title: '内外侧', - align: "center", + align: 'center', dataIndex: 'rowFlag_dictText' }, { title: '物料分区存放', - align: "center", + align: 'center', dataIndex: 'materialAreaCode' }, { title: '是否可用', - align: "center", + align: 'center', dataIndex: 'enable_dictText' }, { title: '创建人', - align: "center", + align: 'center', dataIndex: 'createBy' }, { title: '创建日期', - align: "center", + align: 'center', dataIndex: 'createTime' }, { title: '更新人', - align: "center", + align: 'center', dataIndex: 'updateBy' }, { title: '更新日期', - align: "center", + align: 'center', dataIndex: 'updateTime' }, { title: '操作', dataIndex: 'action', - align: "center", - fixed: "right", + align: 'center', + fixed: 'right', width: 147, - scopedSlots: {customRender: 'action'} + scopedSlots: { customRender: 'action' } } ], url: { - list: "/config/location/list", - delete: "/config/location/delete", - deleteBatch: "/config/location/deleteBatch", - exportXlsUrl: "/config/location/exportXls", - importExcelUrl: "config/location/importExcel", - + list: '/config/location/list', + delete: '/config/location/delete', + deleteBatch: '/config/location/deleteBatch', + exportXlsUrl: '/config/location/exportXls', + importExcelUrl: 'config/location/importExcel' }, /* 分页参数 */ ipagination: { @@ -349,83 +353,86 @@ export default { pageSize: 10, pageSizeOptions: ['10', '20', '50'], showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 共" + total + "条" + return range[0] + '-' + range[1] + ' 共' + total + '条' }, showQuickJumper: true, showSizeChanger: true, total: 0 }, dictOptions: {}, - superFieldList: [], + superFieldList: [] } }, created() { - this.getSuperFieldList(); - this.loadFrom(); + this.getSuperFieldList() + this.loadFrom() }, computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, methods: { - initDictConfig() { - }, + initDictConfig() {}, getSuperFieldList() { - let fieldList = []; - fieldList.push({type: 'string', value: 'code', text: '库位编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'zoneCode', text: '库区编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'locationTypeCode', text: '库位类型', dictCode: ''}) - fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'status', text: '状态', dictCode: 'location_status'}) - fieldList.push({type: 'int', value: 'roadWay', text: '巷道', dictCode: ''}) - fieldList.push({type: 'int', value: 'row', text: '行', dictCode: ''}) - fieldList.push({type: 'int', value: 'icolumn', text: '列', dictCode: ''}) - fieldList.push({type: 'int', value: 'layer', text: '层', dictCode: ''}) - fieldList.push({type: 'int', value: 'grid', text: '格', dictCode: ''}) - fieldList.push({type: 'int', value: 'high', text: '高低位', dictCode: ''}) - fieldList.push({type: 'int', value: 'rowFlag', text: '内外侧', dictCode: 'row_type'}) - fieldList.push({type: 'string', value: 'materialAreaCode', text: '物料分区存放', dictCode: ''}) - fieldList.push({type: 'int', value: 'enable', text: '是否可用', dictCode: 'enable_status'}) - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) + let fieldList = [] + fieldList.push({ type: 'string', value: 'code', text: '库位编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'zoneCode', text: '库区编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'locationTypeCode', text: '库位类型', dictCode: '' }) + fieldList.push({ type: 'string', value: 'containerCode', text: '容器编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'status', text: '状态', dictCode: 'location_status' }) + fieldList.push({ type: 'int', value: 'roadWay', text: '巷道', dictCode: '' }) + fieldList.push({ type: 'int', value: 'row', text: '行', dictCode: '' }) + fieldList.push({ type: 'int', value: 'icolumn', text: '列', dictCode: '' }) + fieldList.push({ type: 'int', value: 'layer', text: '层', dictCode: '' }) + fieldList.push({ type: 'int', value: 'grid', text: '格', dictCode: '' }) + fieldList.push({ type: 'int', value: 'high', text: '高低位', dictCode: '' }) + fieldList.push({ type: 'int', value: 'rowFlag', text: '内外侧', dictCode: 'row_type' }) + fieldList.push({ type: 'string', value: 'materialAreaCode', text: '物料分区存放', dictCode: '' }) + fieldList.push({ type: 'int', value: 'enable', text: '是否可用', dictCode: 'enable_status' }) + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) this.superFieldList = fieldList }, loadFrom() { - getZoneList().then((res) => { + getZoneList().then(res => { if (res.success) { this.zoneList = res.result } - }); - getLocationTypeList().then((res) => { + }) + getLocationTypeList().then(res => { if (res.success) { this.locationTypeList = res.result } }) }, batchAdd() { - this.$refs.batchAddModalForm.add(); - this.$refs.batchAddModalForm.title = "批量新增"; - this.$refs.batchAddModalForm.disableSubmit = false; + this.$refs.batchAddModalForm.add() + this.$refs.batchAddModalForm.title = '批量新增' + this.$refs.batchAddModalForm.disableSubmit = false }, batchPrint() { if (this.selectedRowKeys.length <= 0) { - this.$message.warning('请选择一条记录!'); - return; + this.$message.warning('请选择一条记录!') + return } else { - var ids = ""; + var ids = '' for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ","; + ids += this.selectedRowKeys[a] + ',' } - window.open(window._CONFIG['domianURL'] + "/jmreport/view/768700106074832896/?id=" + ids, "newWindow", "toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100"); + window.open( + window._CONFIG['domianURL'] + '/jmreport/view/768700106074832896/?id=' + ids, + 'newWindow', + 'toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100' + ) } }, solutionZoneCode(value) { var actions = [] - Object.keys(this.zoneList).some((key) => { - if (this.zoneList[key].code == ('' + value)) { + Object.keys(this.zoneList).some(key => { + if (this.zoneList[key].code == '' + value) { actions.push(this.zoneList[key].name) return true } @@ -434,14 +441,14 @@ export default { }, solutionLocationType(value) { var actions = [] - Object.keys(this.locationTypeList).some((key) => { - if (this.locationTypeList[key].code == ('' + value)) { + Object.keys(this.locationTypeList).some(key => { + if (this.locationTypeList[key].code == '' + value) { actions.push(this.locationTypeList[key].name) return true } }) return actions.join('') - }, + } } } </script> diff --git a/ant-design-vue-jeecg/src/views/system/config/LocationTypeList.vue b/ant-design-vue-jeecg/src/views/system/config/LocationTypeList.vue index 7405c17..35706bd 100644 --- a/ant-design-vue-jeecg/src/views/system/config/LocationTypeList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/LocationTypeList.vue @@ -20,7 +20,7 @@ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a @click="handleToggleSearch" style="margin-left: 8px"> {{ toggleSearchStatus ? '收起' : '展开' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> </a> </span> </a-col> @@ -32,20 +32,30 @@ <!-- 操作按钮区域 --> <div class="table-operator"> <a-button v-has="'locationType:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> - <a-button v-has="'locationType:export'" type="primary" icon="download" @click="handleExportXls('库位类型')">导出</a-button> - <a-upload v-has="'locationType:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" - @change="handleImportExcel"> + <a-button v-has="'locationType:export'" type="primary" icon="download" @click="handleExportXls('库位类型')"> + 导出 + </a-button> + <a-upload + v-has="'locationType:import'" + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > <a-button type="primary" icon="import">导入</a-button> </a-upload> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" v-has="'locationType:deleteBatch'"> <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> + <a-icon type="delete" /> 删除 </a-menu-item> </a-menu> - <a-button style="margin-left: 8px"> 批量操作 - <a-icon type="down"/> + <a-button style="margin-left: 8px"> + 批量操作 + <a-icon type="down" /> </a-button> </a-dropdown> </div> @@ -53,50 +63,47 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> <a-table ref="table" size="middle" - :scroll="{x:true}" + :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap" - @change="handleTableChange"> - + @change="handleTableChange" + > <template slot="htmlSlot" slot-scope="text"> <div v-html="text"></div> </template> <template slot="imgSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> - <img v-else :src="getImgView(text)" height="25px" alt="" - style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img + v-else + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> 下载 </a-button> </template> <span slot="action" slot-scope="text, record"> - <a v-has="'locationType:edit'" @click="handleEdit(record)">编辑</a> - - <a-divider type="vertical"/> + <a v-has="'locationType:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> <a-dropdown> <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> <a-menu slot="overlay"> @@ -111,7 +118,6 @@ </a-menu> </a-dropdown> </span> - </a-table> </div> @@ -120,10 +126,9 @@ </template> <script> - import '@/assets/less/TableExpand.less' -import {mixinDevice} from '@/utils/mixin' -import {JeecgListMixin} from '@/mixins/JeecgListMixin' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' import LocationTypeModal from './modules/LocationTypeModal' export default { @@ -142,114 +147,111 @@ export default { dataIndex: '', key: 'rowIndex', width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, { title: '编码', - align: "center", + align: 'center', dataIndex: 'code' }, { title: '名称', - align: "center", + align: 'center', dataIndex: 'name' }, { title: '库区', - align: "center", + align: 'center', dataIndex: 'zoneCode' }, { title: '长度', - align: "center", + align: 'center', dataIndex: 'length' }, { title: '宽度', - align: "center", + align: 'center', dataIndex: 'weight' }, { title: '高度', - align: "center", + align: 'center', dataIndex: 'height' }, { title: '最大承重', - align: "center", + align: 'center', dataIndex: 'maxWeight' }, { title: '创建人', - align: "center", + align: 'center', dataIndex: 'createBy' }, { title: '创建日期', - align: "center", + align: 'center', dataIndex: 'createTime' }, { title: '更新人', - align: "center", + align: 'center', dataIndex: 'updateBy' }, { title: '更新日期', - align: "center", + align: 'center', dataIndex: 'updateTime' }, { title: '操作', dataIndex: 'action', - align: "center", - fixed: "right", + align: 'center', + fixed: 'right', width: 147, - scopedSlots: {customRender: 'action'} + scopedSlots: { customRender: 'action' } } ], url: { - list: "/config/locationType/list", - delete: "/config/locationType/delete", - deleteBatch: "/config/locationType/deleteBatch", - exportXlsUrl: "/config/locationType/exportXls", - importExcelUrl: "config/locationType/importExcel", - + list: '/config/locationType/list', + delete: '/config/locationType/delete', + deleteBatch: '/config/locationType/deleteBatch', + exportXlsUrl: '/config/locationType/exportXls', + importExcelUrl: 'config/locationType/importExcel' }, dictOptions: {}, - superFieldList: [], + superFieldList: [] } }, created() { - this.getSuperFieldList(); - this.loadFrom(); + this.getSuperFieldList() }, computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, methods: { - initDictConfig() { - }, + initDictConfig() {}, getSuperFieldList() { - let fieldList = []; - fieldList.push({type: 'string', value: 'code', text: '编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'name', text: '名称', dictCode: ''}) - fieldList.push({type: 'int', value: 'length', text: '长度', dictCode: ''}) - fieldList.push({type: 'int', value: 'weight', text: '宽度', dictCode: ''}) - fieldList.push({type: 'int', value: 'height', text: '高度', dictCode: ''}) - fieldList.push({type: 'int', value: 'maxWeight', text: '最大承重', dictCode: ''}) - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) + let fieldList = [] + fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'name', text: '名称', dictCode: '' }) + fieldList.push({ type: 'int', value: 'length', text: '长度', dictCode: '' }) + fieldList.push({ type: 'int', value: 'weight', text: '宽度', dictCode: '' }) + fieldList.push({ type: 'int', value: 'height', text: '高度', dictCode: '' }) + fieldList.push({ type: 'int', value: 'maxWeight', text: '最大承重', dictCode: '' }) + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) this.superFieldList = fieldList - }, - }, + } + } } </script> <style scoped> diff --git a/ant-design-vue-jeecg/src/views/system/config/MaterialAreaList.vue b/ant-design-vue-jeecg/src/views/system/config/MaterialAreaList.vue index 9e549ec..bd3de02 100644 --- a/ant-design-vue-jeecg/src/views/system/config/MaterialAreaList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/MaterialAreaList.vue @@ -34,7 +34,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/MaterialList.vue b/ant-design-vue-jeecg/src/views/system/config/MaterialList.vue index bfecbd1..1d2c6cd 100644 --- a/ant-design-vue-jeecg/src/views/system/config/MaterialList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/MaterialList.vue @@ -62,7 +62,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/MaterialMultipleList.vue b/ant-design-vue-jeecg/src/views/system/config/MaterialMultipleList.vue index e7b5ec0..13fbe40 100644 --- a/ant-design-vue-jeecg/src/views/system/config/MaterialMultipleList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/MaterialMultipleList.vue @@ -34,7 +34,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/MaterialTypeList.vue b/ant-design-vue-jeecg/src/views/system/config/MaterialTypeList.vue index ebf3bdf..5b91b7d 100644 --- a/ant-design-vue-jeecg/src/views/system/config/MaterialTypeList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/MaterialTypeList.vue @@ -54,7 +54,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/MaterialUnitList.vue b/ant-design-vue-jeecg/src/views/system/config/MaterialUnitList.vue index 546f404..c97df89 100644 --- a/ant-design-vue-jeecg/src/views/system/config/MaterialUnitList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/MaterialUnitList.vue @@ -61,7 +61,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/MaterialWarningList.vue b/ant-design-vue-jeecg/src/views/system/config/MaterialWarningList.vue index 13eaf37..c6bf168 100644 --- a/ant-design-vue-jeecg/src/views/system/config/MaterialWarningList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/MaterialWarningList.vue @@ -54,7 +54,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/ParameterConfigurationList.vue b/ant-design-vue-jeecg/src/views/system/config/ParameterConfigurationList.vue index 9334b02..96e294e 100644 --- a/ant-design-vue-jeecg/src/views/system/config/ParameterConfigurationList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/ParameterConfigurationList.vue @@ -61,7 +61,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/PortList.vue b/ant-design-vue-jeecg/src/views/system/config/PortList.vue index 88ed6f1..2cab57c 100644 --- a/ant-design-vue-jeecg/src/views/system/config/PortList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/PortList.vue @@ -61,7 +61,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/ReceiptTypeList.vue b/ant-design-vue-jeecg/src/views/system/config/ReceiptTypeList.vue index 1e7f6d1..1a41022 100644 --- a/ant-design-vue-jeecg/src/views/system/config/ReceiptTypeList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/ReceiptTypeList.vue @@ -53,7 +53,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/ShipmentTypeList.vue b/ant-design-vue-jeecg/src/views/system/config/ShipmentTypeList.vue index 73b0057..6baca34 100644 --- a/ant-design-vue-jeecg/src/views/system/config/ShipmentTypeList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/ShipmentTypeList.vue @@ -53,7 +53,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/StrategyList.vue b/ant-design-vue-jeecg/src/views/system/config/StrategyList.vue index 8c2985a..9de5b95 100644 --- a/ant-design-vue-jeecg/src/views/system/config/StrategyList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/StrategyList.vue @@ -29,7 +29,7 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/SupplierList.vue b/ant-design-vue-jeecg/src/views/system/config/SupplierList.vue index 0e5e5f0..21a7cb0 100644 --- a/ant-design-vue-jeecg/src/views/system/config/SupplierList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/SupplierList.vue @@ -61,7 +61,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/SysUserWarehouseList.vue b/ant-design-vue-jeecg/src/views/system/config/SysUserWarehouseList.vue index 27bff7d..2bf3ba9 100644 --- a/ant-design-vue-jeecg/src/views/system/config/SysUserWarehouseList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/SysUserWarehouseList.vue @@ -49,7 +49,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/WarehouseList.vue b/ant-design-vue-jeecg/src/views/system/config/WarehouseList.vue index b4fee76..e0c23be 100644 --- a/ant-design-vue-jeecg/src/views/system/config/WarehouseList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/WarehouseList.vue @@ -56,7 +56,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/config/ZoneList.vue b/ant-design-vue-jeecg/src/views/system/config/ZoneList.vue index ba37c1a..00abf86 100644 --- a/ant-design-vue-jeecg/src/views/system/config/ZoneList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/ZoneList.vue @@ -20,7 +20,7 @@ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a @click="handleToggleSearch" style="margin-left: 8px"> {{ toggleSearchStatus ? '收起' : '展开' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> </a> </span> </a-col> @@ -32,20 +32,30 @@ <!-- 操作按钮区域 --> <div class="table-operator"> <a-button v-has="'zone:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> - <a-button v-has="'zone:export'" type="primary" icon="download" @click="handleExportXls('库区管理')">导出</a-button> - <a-upload v-has="'zone:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" - @change="handleImportExcel"> + <a-button v-has="'zone:export'" type="primary" icon="download" @click="handleExportXls('库区管理')" + >导出</a-button + > + <a-upload + v-has="'zone:import'" + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > <a-button type="primary" icon="import">导入</a-button> </a-upload> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" v-has="'zone:deleteBatch'"> <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> + <a-icon type="delete" /> 删除 </a-menu-item> </a-menu> - <a-button style="margin-left: 8px"> 批量操作 - <a-icon type="down"/> + <a-button style="margin-left: 8px"> + 批量操作 + <a-icon type="down" /> </a-button> </a-dropdown> </div> @@ -53,27 +63,27 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> <a-table ref="table" size="middle" - :scroll="{x:true}" + :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap" - @change="handleTableChange"> - - <span slot="locationTypeCode" slot-scope="locationTypeCode"> - <a-tag :key="locationTypeCode" color=pink> + @change="handleTableChange" + > + <span slot="locationTypeCodes" slot-scope="locationTypeCodes" > + <a-tag v-for="locationTypeCode in locationTypeCodes" :key="locationTypeCode" color=pink> {{ solutionLocationType(locationTypeCode) }} </a-tag> </span> @@ -83,26 +93,23 @@ </template> <template slot="imgSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> - <img v-else :src="getImgView(text)" height="25px" alt="" - style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img + v-else + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> 下载 </a-button> </template> <span slot="action" slot-scope="text, record"> - <a v-has="'zone:edit'" @click="handleEdit(record)">编辑</a> - - <a-divider type="vertical"/> + <a v-has="'zone:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> <a-dropdown> <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> <a-menu slot="overlay"> @@ -117,7 +124,6 @@ </a-menu> </a-dropdown> </span> - </a-table> </div> @@ -126,12 +132,11 @@ </template> <script> - import '@/assets/less/TableExpand.less' -import {mixinDevice} from '@/utils/mixin' -import {JeecgListMixin} from '@/mixins/JeecgListMixin' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' import ZoneModal from './modules/ZoneModal' -import {getLocationTypeList} from '@/api/api' +import { getLocationTypeList } from '@/api/api' export default { name: 'ZoneList', @@ -150,93 +155,93 @@ export default { dataIndex: '', key: 'rowIndex', width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, { title: '编码', - align: "center", + align: 'center', dataIndex: 'code' }, { title: '名称', - align: "center", + align: 'center', dataIndex: 'name' }, { title: '包含库位类型', - align: "center", - dataIndex: 'locationTypeCode', + align: 'center', + dataIndex: 'locationTypeCodes', + key: 'locationTypeCodes', + scopedSlots: {customRender: 'locationTypeCodes'} }, { title: '创建人', - align: "center", + align: 'center', dataIndex: 'createBy' }, { title: '创建日期', - align: "center", + align: 'center', dataIndex: 'createTime' }, { title: '更新人', - align: "center", + align: 'center', dataIndex: 'updateBy' }, { title: '更新日期', - align: "center", + align: 'center', dataIndex: 'updateTime' }, { title: '操作', dataIndex: 'action', - align: "center", - fixed: "right", + align: 'center', + fixed: 'right', width: 147, - scopedSlots: {customRender: 'action'} + scopedSlots: { customRender: 'action' } } ], url: { - list: "/config/zone/list", - delete: "/config/zone/delete", - deleteBatch: "/config/zone/deleteBatch", - exportXlsUrl: "/config/zone/exportXls", - importExcelUrl: "config/zone/importExcel", - + list: '/config/zone/list', + delete: '/config/zone/delete', + deleteBatch: '/config/zone/deleteBatch', + exportXlsUrl: '/config/zone/exportXls', + importExcelUrl: 'config/zone/importExcel' }, dictOptions: {}, - superFieldList: [], + superFieldList: [] } }, created() { - this.getSuperFieldList(); - this.loadFrom(); + this.getSuperFieldList() + this.loadFrom() }, computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, methods: { - initDictConfig() { - }, + initDictConfig() {}, getSuperFieldList() { - let fieldList = []; - fieldList.push({type: 'string', value: 'code', text: '编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'name', text: '名称', dictCode: ''}) - fieldList.push({type: 'string', value: 'companyCode', text: '货主编码', dictCode: ''}) - fieldList.push({type: 'string', value: 'locationTypeCode', text: '库位类型', dictCode: ''}) - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) + let fieldList = [] + fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'name', text: '名称', dictCode: '' }) + fieldList.push({ type: 'string', value: 'companyCode', text: '货主编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'locationTypeCode', text: '库位类型', dictCode: '' }) + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) this.superFieldList = fieldList }, loadFrom() { - getLocationTypeList().then((res) => { + getLocationTypeList().then(res => { if (res.success) { this.locationTypeList = res.result } @@ -244,8 +249,8 @@ export default { }, solutionLocationType(value) { var actions = [] - Object.keys(this.locationTypeList).some((key) => { - if (this.locationTypeList[key].code == ('' + value)) { + Object.keys(this.locationTypeList).some(key => { + if (this.locationTypeList[key].code == '' + value) { actions.push(this.locationTypeList[key].name) return true } diff --git a/ant-design-vue-jeecg/src/views/system/config/modules/ContainerCapacityForm.vue b/ant-design-vue-jeecg/src/views/system/config/modules/ContainerCapacityForm.vue index 48cab6a..ea7b1dc 100644 --- a/ant-design-vue-jeecg/src/views/system/config/modules/ContainerCapacityForm.vue +++ b/ant-design-vue-jeecg/src/views/system/config/modules/ContainerCapacityForm.vue @@ -5,12 +5,15 @@ <a-row> <a-col :span="24"> <a-form-model-item label="容器类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerTypeCode"> - <a-input v-model="model.containerTypeCode" placeholder="请输入容器类型"></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> - <a-input v-model="model.companyCode" placeholder="请输入货主"></a-input> + <a-select + show-search + placeholder="请选择容器类型" + option-filter-prop="children" + v-model="model.containerTypeCode"> + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code"> + {{ item.name }} + </a-select-option> + </a-select> </a-form-model-item> </a-col> <a-col :span="24"> @@ -19,18 +22,8 @@ </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> - <a-input v-model="model.materialName" placeholder="请输入物料名称"></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="物料单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialUnit"> - <a-input v-model="model.materialUnit" placeholder="请输入物料单位"></a-input> - </a-form-model-item> - </a-col> - <a-col :span="24"> - <a-form-model-item label="存放数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty"> - <a-input-number v-model="model.qty" placeholder="请输入存放数量" style="width: 100%"/> + <a-form-model-item label="容量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty"> + <a-input-number v-model="model.qty" placeholder="请输入容量" style="width: 100%"/> </a-form-model-item> </a-col> <a-col :span="24"> @@ -48,6 +41,7 @@ import {httpAction, getAction} from '@/api/manage' import {validateDuplicateValue} from '@/utils/util' +import {getContainerTypeList} from '@/api/api' export default { name: 'ContainerCapacityForm', @@ -63,6 +57,7 @@ export default { data() { return { model: {}, + containerTypeList: [], labelCol: { xs: {span: 24}, sm: {span: 5}, @@ -80,10 +75,10 @@ export default { {required: true, message: '请输入物料编码!'}, ], qty: [ - {required: true, message: '请输入存放数量!'}, + {required: true, message: '请输入容量!'}, ], enable: [ - {required: true, message: '请输入是否可用!'}, + {required: true, message: '请选择是否可用!'}, ], }, url: { @@ -101,8 +96,16 @@ export default { created() { //备份model原始值 this.modelDefault = JSON.parse(JSON.stringify(this.model)); + this.loadFrom(); }, methods: { + loadFrom() { + getContainerTypeList().then((res) => { + if (res.success) { + this.containerTypeList = res.result + } + }); + }, add() { this.edit(this.modelDefault); }, diff --git a/ant-design-vue-jeecg/src/views/system/config/modules/ContainerForm.vue b/ant-design-vue-jeecg/src/views/system/config/modules/ContainerForm.vue index 139cfaa..9e9a18c 100644 --- a/ant-design-vue-jeecg/src/views/system/config/modules/ContainerForm.vue +++ b/ant-design-vue-jeecg/src/views/system/config/modules/ContainerForm.vue @@ -9,11 +9,9 @@ show-search placeholder="请选择容器类型" option-filter-prop="children" - v-model="model.containerTypeCode"> - <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code">{{ - item.name - }} + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code"> + {{ item.name }} </a-select-option> </a-select> </a-form-model-item> diff --git a/ant-design-vue-jeecg/src/views/system/config/modules/ContainerTypeForm.vue b/ant-design-vue-jeecg/src/views/system/config/modules/ContainerTypeForm.vue index 0499a79..437e79e 100644 --- a/ant-design-vue-jeecg/src/views/system/config/modules/ContainerTypeForm.vue +++ b/ant-design-vue-jeecg/src/views/system/config/modules/ContainerTypeForm.vue @@ -13,14 +13,26 @@ <a-input v-model="model.name" placeholder="请输入名称"></a-input> </a-form-model-item> </a-col> - <a-col :span="24"> - <a-form-model-item label="货主编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> - <a-input v-model="model.companyCode" placeholder="请输入货主编码"></a-input> + <!-- <a-col :span="24"> + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> + <a-select + show-search + placeholder="请选择货主编码" + option-filter-prop="children" + v-model="model.companyCode"> + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code"> + {{ item.name }} + </a-select-option> + </a-select> </a-form-model-item> - </a-col> + </a-col> --> <a-col :span="24"> <a-form-model-item label="绑定的库位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationType"> - <a-input v-model="model.locationType" placeholder="请输入绑定的库位类型"></a-input> + <j-select-multiple + v-model="model.locationType" + :options="locationTypeOptions" + placeholder="请选择库位类型"> + </j-select-multiple> </a-form-model-item> </a-col> <a-col :span="24"> @@ -57,7 +69,7 @@ <script> import {httpAction, getAction} from '@/api/manage' -import {validateDuplicateValue} from '@/utils/util' +import {getLocationTypeList, getCompanyList} from '@/api/api' export default { name: 'ContainerTypeForm', @@ -73,6 +85,8 @@ export default { data() { return { model: {}, + companyList: [], + locationTypeOptions: [], labelCol: { xs: {span: 24}, sm: {span: 5}, @@ -90,7 +104,7 @@ export default { {required: true, message: '请输入名称!'}, ], locationType: [ - {required: true, message: '请输入库位类型!'}, + {required: true, message: '请选择库位类型!'}, ], }, url: { @@ -110,10 +124,26 @@ export default { this.modelDefault = JSON.parse(JSON.stringify(this.model)); }, methods: { + loadFrom() { + getCompanyList().then((res) => { + if (res.success) { + this.companyList = res.result + } + }); + getLocationTypeList().then((res) => { + if (res.success) { + this.locationTypeOptions = res.result.map((item, index, arr) => { + return {label: item.name, value: item.code} + }) + } + }); + }, add() { + this.loadFrom(); this.edit(this.modelDefault); }, edit(record) { + this.loadFrom(); this.model = Object.assign({}, record); this.visible = true; }, diff --git a/ant-design-vue-jeecg/src/views/system/config/modules/ZoneForm.vue b/ant-design-vue-jeecg/src/views/system/config/modules/ZoneForm.vue index 724350a..0d8c3d8 100644 --- a/ant-design-vue-jeecg/src/views/system/config/modules/ZoneForm.vue +++ b/ant-design-vue-jeecg/src/views/system/config/modules/ZoneForm.vue @@ -15,7 +15,7 @@ </a-col> <a-col :span="24"> <a-form-model-item label="包含库位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationTypeCode"> - <a-input v-model="model.locationTypeCode" placeholder="请输入库位类型编码"></a-input> + <a-input v-model="model.locationTypeCode" placeholder="请输入包含库位类型编码,用英文逗号分割"></a-input> </a-form-model-item> </a-col> </a-row> diff --git a/ant-design-vue-jeecg/src/views/system/inventory/InventoryChildList.vue b/ant-design-vue-jeecg/src/views/system/inventory/InventoryChildList.vue index 8db4fe4..f417a11 100644 --- a/ant-design-vue-jeecg/src/views/system/inventory/InventoryChildList.vue +++ b/ant-design-vue-jeecg/src/views/system/inventory/InventoryChildList.vue @@ -106,7 +106,7 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> @@ -143,12 +143,9 @@ 下载 </a-button> </template> - <span slot="action" slot-scope="text, record"> <a v-has="'inventoryChild:edit'" @click="handleEdit(record)">编辑</a> - </span> - </a-table> </div> diff --git a/ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue b/ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue index 2241fe0..e26d09b 100644 --- a/ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue @@ -3,7 +3,9 @@ <!-- 操作按钮区域 --> <div class="table-operator" v-if="mainId"> <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> - <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')">导出</a-button> + <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')" + >导出</a-button + > <a-upload v-has="'inventoryDetail:import'" name="file" @@ -11,18 +13,20 @@ :multiple="false" :headers="tokenHeader" :action="importExcelUrl" - @change="handleImportExcel"> + @change="handleImportExcel" + > <a-button type="primary" icon="import">导入</a-button> </a-upload> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" v-has="'inventoryDetail:deleteBatch'"> <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> + <a-icon type="delete" /> 删除 </a-menu-item> </a-menu> - <a-button style="margin-left: 8px"> 批量操作 - <a-icon type="down"/> + <a-button style="margin-left: 8px"> + 批量操作 + <a-icon type="down" /> </a-button> </a-dropdown> </div> @@ -30,8 +34,8 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> @@ -40,16 +44,16 @@ size="middle" bordered rowKey="id" - :scroll="{x:true}" + :scroll="{ x: true }" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> - + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" + @change="handleTableChange" + > <span slot="companyCode" slot-scope="companyCode"> - <a-tag :key="companyCode" color=blue> + <a-tag :key="companyCode" color="blue"> {{ solutionCompany(companyCode) }} </a-tag> </span> @@ -59,31 +63,27 @@ </template> <template slot="imgSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> - <img v-else :src="getImgView(text)" height="25px" alt="" - style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img + v-else + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> 下载 </a-button> </template> <span slot="action" slot-scope="text, record"> - <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑</a> - <a-divider type="vertical"/> - + <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a v-has="'inventoryDetail:delete'">删除</a> </a-popconfirm> </span> - </a-table> </div> @@ -92,15 +92,14 @@ </template> <script> - -import {JeecgListMixin} from '@/mixins/JeecgListMixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' import InventoryDetailModal from './modules/InventoryDetailModal' -import {getCompanyList} from '@/api/api' +import { getCompanyList } from '@/api/api' export default { - name: "InventoryDetailList", + name: 'InventoryDetailList', mixins: [JeecgListMixin], - components: {InventoryDetailModal}, + components: { InventoryDetailModal }, props: { mainId: { type: String, @@ -116,7 +115,7 @@ export default { this.clearList() } else { this.queryParam['inventoryHeaderId'] = val - this.loadData(1); + this.loadData(1) } } } @@ -130,15 +129,15 @@ export default { columns: [ { title: '库存详情ID', - align: "center", + align: 'center', dataIndex: 'id' }, { title: '货主', - align: "center", + align: 'center', dataIndex: 'companyCode', key: 'companyCode', - scopedSlots: {customRender: 'companyCode'} + scopedSlots: { customRender: 'companyCode' } }, // { // title: '库区', @@ -147,130 +146,138 @@ export default { // }, { title: '容器编码', - align: "center", + align: 'center', dataIndex: 'containerCode' }, { title: '库位编码', - align: "center", + align: 'center', dataIndex: 'locationCode' }, { title: '物料编码', - align: "center", + align: 'center', dataIndex: 'materialCode' }, { title: '物料名称', - align: "center", + align: 'center', dataIndex: 'materialName' }, { title: '物料规格', - align: "center", + align: 'center', dataIndex: 'materialSpec' }, { title: '物料单位', - align: "center", + align: 'center', dataIndex: 'materialUnit' }, { title: '数量', - align: "center", + align: 'center', dataIndex: 'qty' }, { title: '任务锁定数量', - align: "center", + align: 'center', dataIndex: 'taskQty' }, { + title: '托盘填充度', + align: 'center', + dataIndex: 'fillDensity', + customRender: text => { + return text == null ? '' : text + '%' + } + }, + { title: '库存状态', - align: "center", - dataIndex: 'inventoryStatus_dictText', + align: 'center', + dataIndex: 'inventoryStatus_dictText' }, { title: '批次', - align: "center", + align: 'center', dataIndex: 'batch' }, - { - title: '唯一号', - align: "center", - dataIndex: 'uniqueCode' - }, + // { + // title: '唯一号', + // align: "center", + // dataIndex: 'uniqueCode' + // }, { title: '入库日期', - align: "center", + align: 'center', dataIndex: 'receiptDate' }, { title: '库龄(天)', - align: "center", + align: 'center', dataIndex: 'inventoryAge' }, { title: '创建人', - align: "center", + align: 'center', dataIndex: 'createBy' }, { title: '创建日期', - align: "center", + align: 'center', dataIndex: 'createTime' }, { title: '更新人', - align: "center", + align: 'center', dataIndex: 'updateBy' }, { title: '更新日期', - align: "center", + align: 'center', dataIndex: 'updateTime' }, { title: '操作', dataIndex: 'action', - align: "center", - fixed: "right", + align: 'center', + fixed: 'right', width: 147, - scopedSlots: {customRender: 'action'}, + scopedSlots: { customRender: 'action' } } ], url: { - list: "/inventory/inventoryHeader/listInventoryDetailByMainId", - delete: "/inventory/inventoryHeader/deleteInventoryDetail", - deleteBatch: "/inventory/inventoryHeader/deleteBatchInventoryDetail", - exportXlsUrl: "/inventory/inventoryHeader/exportInventoryDetail", - importUrl: "/inventory/inventoryHeader/importInventoryDetail", + list: '/inventory/inventoryHeader/listInventoryDetailByMainId', + delete: '/inventory/inventoryHeader/deleteInventoryDetail', + deleteBatch: '/inventory/inventoryHeader/deleteBatchInventoryDetail', + exportXlsUrl: '/inventory/inventoryHeader/exportInventoryDetail', + importUrl: '/inventory/inventoryHeader/importInventoryDetail' }, dictOptions: { - containerStatus: [], + containerStatus: [] } } }, created() { - this.loadFrom(); + this.loadFrom() }, computed: { importExcelUrl() { - return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}` } }, methods: { loadFrom() { - getCompanyList().then((res) => { + getCompanyList().then(res => { if (res.success) { this.companyList = res.result } - }); + }) }, solutionCompany(value) { var actions = [] - Object.keys(this.companyList).some((key) => { - if (this.companyList[key].code == ('' + value)) { + Object.keys(this.companyList).some(key => { + if (this.companyList[key].code == '' + value) { actions.push(this.companyList[key].name) return true } @@ -282,10 +289,9 @@ export default { this.selectedRowKeys = [] this.ipagination.current = 1 } - } } </script> <style scoped> -@import '~@assets/less/common.less' +@import '~@assets/less/common.less'; </style> diff --git a/ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue b/ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue index fa27ae7..e02ef36 100644 --- a/ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue @@ -73,7 +73,7 @@ <div> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> <!-- </div>--> diff --git a/ant-design-vue-jeecg/src/views/system/inventory/InventoryMaterialSummaryList.vue b/ant-design-vue-jeecg/src/views/system/inventory/InventoryMaterialSummaryList.vue index 17891c6..ce2c1a4 100644 --- a/ant-design-vue-jeecg/src/views/system/inventory/InventoryMaterialSummaryList.vue +++ b/ant-design-vue-jeecg/src/views/system/inventory/InventoryMaterialSummaryList.vue @@ -53,7 +53,7 @@ <!-- table区域-begin --> <div> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> -<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> +<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> <!-- </div>--> @@ -113,7 +113,7 @@ </a-tab-pane> </a-tabs> - <inventory-material-summary-modal ref="modalForm" @ok="modalFormOk"></inventory-material-summary-modal> + <!-- <inventory-material-summary-modal ref="modalForm" @ok="modalFormOk"></inventory-material-summary-modal> --> </a-card> </template> @@ -213,8 +213,8 @@ methods: { solutionZoneCode(value) { var actions = [] - Object.keys(this.zoneList).some((key) => { - if (this.zoneList[key].code == ('' + value)) { + Object.keys(this.zoneList).some(key => { + if (this.zoneList[key].code == '' + value) { actions.push(this.zoneList[key].name) return true } @@ -255,9 +255,7 @@ }, initDictConfig(){ }, - solutionCompany(value) { - debugger var actions = [] Object.keys(this.companyList).some((key) => { if (this.companyList[key].code == ('' + value)) { diff --git a/ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue b/ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue index 4f1a326..49d6b7d 100644 --- a/ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue +++ b/ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue @@ -10,7 +10,6 @@ show-search placeholder="请选择货主" option-filter-prop="children" - v-model="queryParam.companyCode"> <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ item.name @@ -121,7 +120,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> @@ -361,7 +360,7 @@ export default { fieldList.push({type: 'string', value: 'materialName', text: '物料名称', dictCode: ''}) fieldList.push({type: 'string', value: 'materialSpec', text: '物料规格', dictCode: ''}) fieldList.push({type: 'string', value: 'materialUnit', text: '物料单位', dictCode: ''}) - fieldList.push({type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: ''}) + fieldList.push({type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: 'inventory_status'}) fieldList.push({type: 'BigDecimal', value: 'qty', text: '数量', dictCode: ''}) fieldList.push({type: 'string', value: 'batch', text: '批次', dictCode: ''}) fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) diff --git a/ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue b/ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue index da0f38b..6b5894b 100644 --- a/ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue @@ -47,7 +47,11 @@ </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="库存状态"> - <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/> + <j-dict-select-tag + placeholder="请选择库存状态" + v-model="queryParam.inventoryStatus" + dictCode="inventory_status" + /> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> @@ -55,14 +59,19 @@ <a-input placeholder="请输入批次" v-model="queryParam.batch"></a-input> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="唯一号"> <a-input placeholder="请输入唯一号" v-model="queryParam.uniqueCode"></a-input> </a-form-item> - </a-col> + </a-col> --> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="入库日期"> - <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择入库日期" v-model="queryParam.receiptDate"></j-date> + <j-date + :show-time="true" + date-format="YYYY-MM-DD HH:mm:ss" + placeholder="请选择入库日期" + v-model="queryParam.receiptDate" + ></j-date> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> @@ -77,7 +86,7 @@ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a @click="handleToggleSearch" style="margin-left: 8px"> {{ toggleSearchStatus ? '收起' : '展开' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> </a> </span> </a-col> @@ -89,70 +98,81 @@ <!-- 操作按钮区域 --> <div class="table-operator"> <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> - <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')">导出</a-button> - <a-upload v-has="'inventoryDetail:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> + <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')" + >导出</a-button + > + <a-upload + v-has="'inventoryDetail:import'" + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > <a-button type="primary" icon="import">导入</a-button> </a-upload> <!-- 高级查询区域 --> - <j-super-query :fieldList="superFieldList" v-has="'inventoryDetail:superSearch'" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> -<!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> -<!-- <a-menu slot="overlay">--> -<!-- <a-menu-item v-has="'inventoryDetail:delete'" key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> -<!-- </a-menu>--> -<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> -<!-- </a-dropdown>--> + <j-super-query + :fieldList="superFieldList" + v-has="'inventoryDetail:superSearch'" + ref="superQueryModal" + @handleSuperQuery="handleSuperQuery" + ></j-super-query> + <!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> + <!-- <a-menu slot="overlay">--> + <!-- <a-menu-item v-has="'inventoryDetail:delete'" key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> + <!-- </a-menu>--> + <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> + <!-- </a-dropdown>--> </div> <!-- table区域-begin --> <div> -<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> -<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> -<!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> -<!-- </div>--> + <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> + <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> + <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> + <!-- </div>--> <a-table ref="table" size="middle" - :scroll="{x:true}" + :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap" - @change="handleTableChange"> - + @change="handleTableChange" + > <template slot="htmlSlot" slot-scope="text"> <div v-html="text"></div> </template> <template slot="imgSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> - <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img + v-else + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> 下载 </a-button> </template> - <span slot="action" slot-scope="text, record"> - <a v-has="'inventoryDetail:edit'"@click="handleEdit(record)">编辑</a> - - <a-divider type="vertical" /> + <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> <a-popconfirm v-has="'inventoryDetail:delete'" title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a>删除</a> </a-popconfirm> </span> - </a-table> </div> @@ -161,187 +181,192 @@ </template> <script> +import '@/assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import SimpleInventoryDetailModal from './modules/SimpleInventoryDetailModal' +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' - import '@/assets/less/TableExpand.less' - import { mixinDevice } from '@/utils/mixin' - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import SimpleInventoryDetailModal from './modules/SimpleInventoryDetailModal' - import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' - - export default { - name: 'InventoryDetailList', - mixins:[JeecgListMixin, mixinDevice], - components: { - SimpleInventoryDetailModal - }, - data () { - return { - description: '库存详情管理页面', - // 表头 - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title:'货主', - align:"center", - dataIndex: 'companyCode' - }, - { - title:'库区', - align:"center", - dataIndex: 'zoneCode' - }, - { - title:'容器编码', - align:"center", - dataIndex: 'containerCode' - }, - { - title:'库位编码', - align:"center", - dataIndex: 'locationCode' - }, - { - title:'物料编码', - align:"center", - dataIndex: 'materialCode' - }, - { - title:'物料名称', - align:"center", - dataIndex: 'materialName' - }, - { - title:'物料规格', - align:"center", - dataIndex: 'materialSpec' - }, - { - title:'物料单位', - align:"center", - dataIndex: 'materialUnit' - }, - { - title:'数量', - align:"center", - dataIndex: 'qty' - }, - { - title:'任务锁定数量', - align:"center", - dataIndex: 'taskQty' - }, - { - title:'库存状态', - align:"center", - dataIndex: 'inventoryStatus_dictText' - }, - { - title:'批次', - align:"center", - dataIndex: 'batch' - }, - { - title:'唯一号', - align:"center", - dataIndex: 'uniqueCode' - }, - { - title:'入库日期', - align:"center", - dataIndex: 'receiptDate' - }, - { - title:'库龄(天)', - align:"center", - dataIndex: 'inventoryAge' - }, - { - title:'创建人', - align:"center", - dataIndex: 'createBy' - }, - { - title:'创建日期', - align:"center", - dataIndex: 'createTime' - }, - { - title:'更新人', - align:"center", - dataIndex: 'updateBy' - }, - { - title:'更新日期', - align:"center", - dataIndex: 'updateTime' - }, - { - title: '操作', - dataIndex: 'action', - align:"center", - fixed:"right", - width:147, - scopedSlots: { customRender: 'action' } +export default { + name: 'InventoryDetailList', + mixins: [JeecgListMixin, mixinDevice], + components: { + SimpleInventoryDetailModal + }, + data() { + return { + description: '库存详情管理页面', + // 表头 + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } - ], - url: { - list: "/inventory/inventoryDetail/list", - delete: "/inventory/inventoryDetail/delete", - deleteBatch: "/inventory/inventoryDetail/deleteBatch", - exportXlsUrl: "/inventory/inventoryDetail/exportXls", - importExcelUrl: "inventory/inventoryDetail/importExcel", - }, - dictOptions:{}, - superFieldList:[], - } - }, - created() { - this.getSuperFieldList(); - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, - }, - methods: { - initDictConfig(){ + { + title: '货主', + align: 'center', + dataIndex: 'companyCode' + }, + { + title: '库区', + align: 'center', + dataIndex: 'zoneCode' + }, + { + title: '容器编码', + align: 'center', + dataIndex: 'containerCode' + }, + { + title: '库位编码', + align: 'center', + dataIndex: 'locationCode' + }, + { + title: '物料编码', + align: 'center', + dataIndex: 'materialCode' + }, + { + title: '物料名称', + align: 'center', + dataIndex: 'materialName' + }, + { + title: '物料规格', + align: 'center', + dataIndex: 'materialSpec' + }, + { + title: '物料单位', + align: 'center', + dataIndex: 'materialUnit' + }, + { + title: '数量', + align: 'center', + dataIndex: 'qty' + }, + { + title: '任务锁定数量', + align: 'center', + dataIndex: 'taskQty' + }, + { + title: '托盘填充度', + align: 'center', + dataIndex: 'fillDensity', + customRender: text => { + return text == null ? '' : text + '%' + } + }, + { + title: '库存状态', + align: 'center', + dataIndex: 'inventoryStatus_dictText' + }, + { + title: '批次', + align: 'center', + dataIndex: 'batch' + }, + // { + // title:'唯一号', + // align:"center", + // dataIndex: 'uniqueCode' + // }, + { + title: '入库日期', + align: 'center', + dataIndex: 'receiptDate' + }, + { + title: '库龄(天)', + align: 'center', + dataIndex: 'inventoryAge' + }, + { + title: '创建人', + align: 'center', + dataIndex: 'createBy' + }, + { + title: '创建日期', + align: 'center', + dataIndex: 'createTime' + }, + { + title: '更新人', + align: 'center', + dataIndex: 'updateBy' + }, + { + title: '更新日期', + align: 'center', + dataIndex: 'updateTime' + }, + { + title: '操作', + dataIndex: 'action', + align: 'center', + fixed: 'right', + width: 147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: '/inventory/inventoryDetail/list', + delete: '/inventory/inventoryDetail/delete', + deleteBatch: '/inventory/inventoryDetail/deleteBatch', + exportXlsUrl: '/inventory/inventoryDetail/exportXls', + importExcelUrl: 'inventory/inventoryDetail/importExcel' }, - getSuperFieldList(){ - let fieldList=[]; - fieldList.push({type:'string',value:'companyCode',text:'货主',dictCode:''}) - fieldList.push({type:'string',value:'zoneCode',text:'库区',dictCode:''}) - fieldList.push({type:'string',value:'containerCode',text:'容器编码',dictCode:''}) - fieldList.push({type:'string',value:'locationCode',text:'库位编码',dictCode:''}) - fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''}) - fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''}) - fieldList.push({type:'string',value:'materialSpec',text:'物料规格',dictCode:''}) - fieldList.push({type:'string',value:'materialUnit',text:'物料单位',dictCode:''}) - fieldList.push({type:'BigDecimal',value:'qty',text:'数量',dictCode:''}) - fieldList.push({type:'BigDecimal',value:'taskQty',text:'任务锁定数量',dictCode:''}) - fieldList.push({type:'string',value:'inventoryStatus',text:'库存状态',dictCode:'inventory_status'}) - fieldList.push({type:'string',value:'batch',text:'批次',dictCode:''}) - fieldList.push({type:'string',value:'uniqueCode',text:'唯一号',dictCode:''}) - fieldList.push({type:'datetime',value:'receiptDate',text:'入库日期'}) - fieldList.push({type:'int',value:'inventoryAge',text:'库龄(天)',dictCode:''}) - fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) - fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) - fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) - fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) - this.superFieldList = fieldList - } + dictOptions: {}, + superFieldList: [] + } + }, + created() { + this.getSuperFieldList() + }, + computed: { + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } + }, + methods: { + initDictConfig() {}, + getSuperFieldList() { + let fieldList = [] + fieldList.push({ type: 'string', value: 'companyCode', text: '货主', dictCode: '' }) + fieldList.push({ type: 'string', value: 'zoneCode', text: '库区', dictCode: '' }) + fieldList.push({ type: 'string', value: 'containerCode', text: '容器编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'locationCode', text: '库位编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'materialCode', text: '物料编码', dictCode: '' }) + fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' }) + fieldList.push({ type: 'string', value: 'materialSpec', text: '物料规格', dictCode: '' }) + fieldList.push({ type: 'string', value: 'materialUnit', text: '物料单位', dictCode: '' }) + fieldList.push({ type: 'BigDecimal', value: 'qty', text: '数量', dictCode: '' }) + fieldList.push({ type: 'BigDecimal', value: 'taskQty', text: '任务锁定数量', dictCode: '' }) + fieldList.push({ type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: 'inventory_status' }) + fieldList.push({ type: 'string', value: 'batch', text: '批次', dictCode: '' }) + // fieldList.push({type:'string',value:'uniqueCode',text:'唯一号',dictCode:''}) + fieldList.push({ type: 'datetime', value: 'receiptDate', text: '入库日期' }) + fieldList.push({ type: 'int', value: 'inventoryAge', text: '库龄(天)', dictCode: '' }) + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) + this.superFieldList = fieldList } } +} </script> <style scoped> - @import '~@assets/less/common.less'; +@import '~@assets/less/common.less'; </style> \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/system/inventory/subTables/InventoryDetailSubTable.vue b/ant-design-vue-jeecg/src/views/system/inventory/subTables/InventoryDetailSubTable.vue index 13e2394..90b2b2d 100644 --- a/ant-design-vue-jeecg/src/views/system/inventory/subTables/InventoryDetailSubTable.vue +++ b/ant-design-vue-jeecg/src/views/system/inventory/subTables/InventoryDetailSubTable.vue @@ -30,7 +30,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/modules/DeptRoleInfo.vue b/ant-design-vue-jeecg/src/views/system/modules/DeptRoleInfo.vue index 188286c..b86d236 100644 --- a/ant-design-vue-jeecg/src/views/system/modules/DeptRoleInfo.vue +++ b/ant-design-vue-jeecg/src/views/system/modules/DeptRoleInfo.vue @@ -38,7 +38,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600"> - {{ selectedRowKeys.length }}</a>项 + {{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> <a-table diff --git a/ant-design-vue-jeecg/src/views/system/monitor/ApkInfoList.vue b/ant-design-vue-jeecg/src/views/system/monitor/ApkInfoList.vue new file mode 100644 index 0000000..a7fa3a3 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/system/monitor/ApkInfoList.vue @@ -0,0 +1,277 @@ +<template> + <a-card :bordered="false"> + <!-- 查询区域 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="应用名称"> + <a-input placeholder="请输入应用名称" v-model="queryParam.pkgname"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="版本号"> + <a-input placeholder="请输入版本号" v-model="queryParam.versioncode"></a-input> + </a-form-item> + </a-col> + <template v-if="toggleSearchStatus"> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="版本名称"> + <a-input placeholder="请输入版本名称" v-model="queryParam.versionname"></a-input> + </a-form-item> + </a-col> + </template> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> + <a @click="handleToggleSearch" style="margin-left: 8px"> + {{ toggleSearchStatus ? '收起' : '展开' }} + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + </a> + </span> + </a-col> + </a-row> + </a-form> + </div> + <!-- 查询区域-END --> + + <!-- 操作按钮区域 --> + <div class="table-operator"> + <a-upload + name="file" + :multiple="false" + :action="uploadAction" + :headers="tokenHeader" + :showUploadList="false" + :beforeUpload="beforeUpload" + @change="handleChange"> + <a-button> + <a-icon type="upload"/> + 上传APK + </a-button> + </a-upload> + <!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> + <a-button type="primary" icon="download" @click="handleExportXls('apk_info')">导出</a-button> + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> + <a-button type="primary" icon="import">导入</a-button> + </a-upload> + <!-- 高级查询区域 --> + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> + <a-dropdown v-if="selectedRowKeys.length > 0"> + <a-menu slot="overlay"> + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> + </a-menu> + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> + </a-dropdown> + </div> + + <!-- table区域-begin --> + <div> + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <a style="margin-left: 24px" @click="onClearSelected">清空</a> + </div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + class="j-table-force-nowrap" + @change="handleTableChange"> + + <template slot="htmlSlot" slot-scope="text"> + <div v-html="text"></div> + </template> + <template slot="imgSlot" slot-scope="text"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + </template> + <template slot="fileSlot" slot-scope="text"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> + <a-button + v-else + :ghost="true" + type="primary" + icon="download" + size="small" + @click="downloadFile(text)"> + 下载 + </a-button> + </template> + + <span slot="action" slot-scope="text, record"> + <!--<a @click="handleEdit(record)">编辑</a>--> +<a @click="handleDetail(record)">详情</a> + <a-divider type="vertical" /> + <a-dropdown> + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> + <a>删除</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + + <apk-info-modal ref="modalForm" @ok="modalFormOk"></apk-info-modal> + </a-card> +</template> + +<script> + import {httpAction, getAction} from '@/api/manage' + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import ApkInfoModal from './modules/ApkInfoModal' + + export default { + name: 'ApkInfoList', + mixins:[JeecgListMixin, mixinDevice], + components: { + ApkInfoModal + }, + data () { + return { + description: 'apk_info管理页面', + // 表头 + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'应用名称', + align:"center", + dataIndex: 'pkgname' + }, + { + title:'版本号', + align:"center", + dataIndex: 'versioncode' + }, + { + title:'版本名称', + align:"center", + dataIndex: 'versionname' + }, + { + title:'下载地址', + align:"center", + dataIndex: 'url', + customRender: function (t, r, index) { + return window._CONFIG['domianURL'] + t + } + }, + { + title:'md5校验码', + align:"center", + dataIndex: 'md5' + }, + { + title: '操作', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/monitor/apkinfo/list", + delete: "/monitor/apkinfo/delete", + deleteBatch: "/monitor/apkinfo/deleteBatch", + exportXlsUrl: "/monitor/apkinfo/exportXls", + importExcelUrl: "monitor/apkinfo/importExcel", + upload: "/sys/common/upload", + parse: "/monitor/apkinfo/parseApk" + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + uploadAction() { + return window._CONFIG['domianURL'] + this.url.upload; + }, + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + beforeUpload(file) { + var fileType = file.type; + if (fileType === 'image') { + if (fileType.indexOf('image') < 0) { + this.$message.warning('请上传图片'); + return false; + } + } else if (fileType === 'file') { + if (fileType.indexOf('image') >= 0) { + this.$message.warning('请上传文件'); + return false; + } + } + return true + }, + handleChange(info) { + if (info.file.status === 'done') { + if (info.file.response.success) { + this.loadData() + this.$message.success(`${info.file.name} 上传成功!`); + this.$options.methods.parseApk(this, info.file.name) + } else { + this.$message.error(`${info.file.response.message}`); + } + } else if (info.file.status === 'error') { + this.$message.error(`${info.file.response.message}`); + } + }, + + parseApk(parent, filename){ + getAction(parent.url.parse, {filename: filename}).then((res) => { + if (res.success) { + parent.loadData() + }else{ + alert("解析apk失败!") + } + }) + }, + initDictConfig(){ + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'pkgname',text:'应用名称',dictCode:''}) + fieldList.push({type:'int',value:'versioncode',text:'版本号',dictCode:''}) + fieldList.push({type:'string',value:'versionname',text:'版本名称',dictCode:''}) + fieldList.push({type:'string',value:'url',text:'下载地址',dictCode:''}) + fieldList.push({type:'string',value:'md5',text:'md5校验码',dictCode:''}) + this.superFieldList = fieldList + } + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue b/ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue index 2b43681..dc41fa2 100644 --- a/ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue +++ b/ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue @@ -8,13 +8,12 @@ <li> <a-select show-search - placeholder="请选择库位类型" + placeholder="请选择库区" option-filter-prop="children" v-model="zoneCode" @change="refresh" style="width: 200px"> - <a-select-option selected="0" id="zoneCode" v-for="item in locationTypeList" :key="item.name" - :value="item.locationTypeCode">{{ item.name }} + <a-select-option selected="0" id="zoneCode" v-for="item in zoneList" :key="item.name" :value="item.code">{{ item.name }} </a-select-option> </a-select> </li> @@ -84,7 +83,7 @@ <ul id="info_list"> <li><span>库位:</span><input type="text" id="code" disabled/></li> <li><span>容器编码:</span><input type="text" id="containerCode" disabled/></li> - <li><span>物料信息:<select id="material" style="width: auto"><option>无</option></select></span></li> + <li><span>物料信息:<select id="material" style="width: auto;"><option>无</option></select></span></li> </ul> </div> </form> @@ -156,7 +155,7 @@ export default { showPrise: false, // loading:true, zoneCode: '', - locationTypeList: [], + zoneList: [], model: {}, locationContent: '' } @@ -172,23 +171,21 @@ export default { }, mounted() { - //监听浏览器宽度的改变 - // window.onresize = function(){ - // _this.changeMargin(); - // _this.border() - // }; - // - // this.changeMargin(); - // - // this.border() + // 监听浏览器宽度的改变 + const resizeObserver = new ResizeObserver(entries => { + for (let entry of entries) { + this.changeMargin(); + } + }); + resizeObserver.observe(document.querySelector('.location')); }, methods: { loadFrom() { getZoneList().then((res) => { if (res.success) { - this.locationTypeList = res.result; - if (this.locationTypeList.length > 0) { - this.zoneCode = this.locationTypeList[0].locationTypeCode; + this.zoneList = res.result; + if (this.zoneList.length > 0) { + this.zoneCode = this.zoneList[0].code; let _this = this; this.resetAjax(this.zoneCode); } @@ -200,7 +197,7 @@ export default { url: window._CONFIG['domianURL'] + prefix + "/getAllLocation", type: "post", data: { - type: this.zoneCode + zoneCode: this.zoneCode }, headers: { "X-Access-Token": Vue.ls.get(ACCESS_TOKEN) @@ -227,7 +224,7 @@ export default { } } - let type = $("#zoneCode").val(); + let zoneCode = $("#zoneCode").val(); this.resetAjax(this.zoneCode); // this.show(); }, @@ -252,7 +249,7 @@ export default { }); $("#zoneCode").change(function () { - let type = $("#zoneCode").val(); + let zoneCode = $("#zoneCode").val(); this.resetAjax(this.zoneCode); }); }, @@ -266,7 +263,10 @@ export default { //格子宽度 changeMargin() { - let box_width = document.getElementById("location").offsetWidth; + let box_width = 0; + if (document.getElementById("location") != null) { + box_width = document.getElementById("location").offsetWidth; + } box_width = box_width - 80; let num = $("#editable-select").val(); let grid_width; @@ -535,13 +535,13 @@ export default { }, //页面初始化请求 - resetAjax(type) { + resetAjax(zoneCode) { var _this = this; $.ajax({ url: window._CONFIG['domianURL'] + prefix + "/getAllLocation", type: "post", data: { - type: type + zoneCode: zoneCode }, headers: { "X-Access-Token": Vue.ls.get(ACCESS_TOKEN) @@ -575,7 +575,6 @@ export default { $("#editable-num").append("<option value='" + i + "'>" + i + "</option>") } } - _this.changeMargin(); _this.Search(); } }); @@ -596,7 +595,7 @@ export default { let data; this.seachZone(); if (index === "row") { - data = {type: this.zoneCode, row: num}; + data = {zoneCode: this.zoneCode, row: num}; $("#location").children().remove(); for (let i = grid_layer; i > 0; i--) { $(".location").append("<br><span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + i + "层</span>"); @@ -604,10 +603,10 @@ export default { $(".location").append("<img data-i=" + num + " data-j=" + j + " data-k=" + i + " class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>"); } } - this.changeMargin(); + // this.changeMargin(); this.ajaxGrid(index, data); } else if (index === "line") { - data = {type: this.zoneCode, line: num}; + data = {zoneCode: this.zoneCode, line: num}; $("#location").children().remove(); for (let k = grid_layer; k > 0; k--) { $(".location").append("<br><span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + k + "层</span>"); @@ -615,10 +614,10 @@ export default { $(".location").append("<img data-i=" + l + " data-j=" + num + " data-k=" + k + " class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>"); } } - this.changeMargin(); + // this.changeMargin(); this.ajaxGrid(index, data); } else if (index === "layer") { - data = {type: this.zoneCode, layer: num}; + data = {zoneCode: this.zoneCode, layer: num}; $("#location").children().remove(); for (let m = 1; m <= grid_row; m++) { $(".location").append("<br><span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + m + "行</span>"); @@ -626,7 +625,7 @@ export default { $(".location").append("<img data-i=" + m + " data-j=" + n + " data-k=" + num + " class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>"); } } - this.changeMargin(); + // this.changeMargin(); this.ajaxGrid(index, data); } }, diff --git a/ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoForm.vue b/ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoForm.vue new file mode 100644 index 0000000..6c85f94 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoForm.vue @@ -0,0 +1,139 @@ +<template> + <a-spin :spinning="confirmLoading"> + <j-form-container :disabled="formDisabled"> + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="应用名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pkgname"> + <a-input v-model="model.pkgname" placeholder="请输入应用名称" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="版本号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="versioncode"> + <a-input-number v-model="model.versioncode" placeholder="请输入版本号" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="版本名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="versionname"> + <a-input v-model="model.versionname" placeholder="请输入版本名称" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="下载地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url"> + <a-input v-model="model.url" placeholder="请输入下载地址" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="md5校验码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="md5"> + <a-input v-model="model.md5" placeholder="请输入md5校验码" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </j-form-container> + </a-spin> +</template> + +<script> + + import { httpAction, getAction } from '@/api/manage' + import { validateDuplicateValue } from '@/utils/util' + + export default { + name: 'ApkInfoForm', + components: { + }, + props: { + //表单禁用 + disabled: { + type: Boolean, + default: false, + required: false + } + }, + data () { + return { + model:{ + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + confirmLoading: false, +validatorRules: { + pkgname: [ + { required: true, message: '请输入应用名称!'}, + ], + versioncode: [ + { required: true, message: '请输入版本号!'}, + ], + versionname: [ + { required: true, message: '请输入版本名称!'}, + ], + url: [ + { required: true, message: '请输入下载地址!'}, + ], + md5: [ + { required: true, message: '请输入md5校验码!'}, + ], +}, + url: { + add: "/monitor/apkinfo/add", + edit: "/monitor/apkinfo/edit", + queryById: "/monitor/apkinfo/queryById" + } + } + }, + computed: { + formDisabled(){ + return this.disabled + }, + }, + created () { + //备份model原始值 + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add () { + this.edit(this.modelDefault); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + submitForm () { + const that = this; + // 触发表单验证 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + let httpurl = ''; + let method = ''; + if(!this.model.id){ + httpurl+=this.url.add; + method = 'post'; + }else{ + httpurl+=this.url.edit; + method = 'put'; + } + httpAction(httpurl,this.model,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.$emit('ok'); + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + + }) + }, + } + } +</script> \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoModal.Style#Drawer.vue b/ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoModal.Style#Drawer.vue new file mode 100644 index 0000000..813db95 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoModal.Style#Drawer.vue @@ -0,0 +1,84 @@ +<template> + <a-drawer + :title="title" + :width="width" + placement="right" + :closable="false" + @close="close" + destroyOnClose + :visible="visible"> + <apk-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></apk-info-form> + <div class="drawer-footer"> + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> + </div> + </a-drawer> +</template> + +<script> + + import ApkInfoForm from './ApkInfoForm' + + export default { + name: 'ApkInfoModal', + components: { + ApkInfoForm + }, + data () { + return { + title:"操作", + width:800, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }); + }, + close () { + this.$emit('close'); + this.visible = false; + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + handleCancel () { + this.close() + } + } + } +</script> + +<style lang="less" scoped> +/** Button按钮间距 */ + .ant-btn { + margin-left: 30px; + margin-bottom: 30px; + float: right; + } + .drawer-footer{ + position: absolute; + bottom: -8px; + width: 100%; + border-top: 1px solid #e8e8e8; + padding: 10px 16px; + text-align: right; + left: 0; + background: #fff; + border-radius: 0 0 2px 2px; + } +</style> \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoModal.vue b/ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoModal.vue new file mode 100644 index 0000000..10b148a --- /dev/null +++ b/ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoModal.vue @@ -0,0 +1,60 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + @ok="handleOk" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + @cancel="handleCancel" + cancelText="关闭"> + <apk-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></apk-info-form> + </j-modal> +</template> + +<script> + + import ApkInfoForm from './ApkInfoForm' + export default { + name: 'ApkInfoModal', + components: { + ApkInfoForm + }, + data () { + return { + title:'', + width:800, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }) + }, + close () { + this.$emit('close'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleCancel () { + this.close() + } + } + } +</script> \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue b/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue index db8cb57..f1c87e6 100644 --- a/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue @@ -88,7 +88,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue b/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue index 6365bd0..b1709fa 100644 --- a/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue @@ -106,6 +106,8 @@ </a-button> </template> <span slot="action" slot-scope="text, record"> + <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:fill'">生成任务<a-divider type="vertical"/></a> + <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:fill'">生成任务<a-divider type="vertical"/></a> <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a> <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a> <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> @@ -124,6 +126,8 @@ <receiptContainerHeader-modal ref="modalForm" @ok="modalFormOk"></receiptContainerHeader-modal> <receiptContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></receiptContainerSelect-modal> + <receiptContainerFillSelect-modal ref="modalForm3" @ok="modalFormOk"></receiptContainerFillSelect-modal> + <receiptContainerStatusSelect-modal ref="modalForm4" @ok="modalFormOk"></receiptContainerStatusSelect-modal> </a-card> </template> @@ -137,6 +141,8 @@ import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelec import '@/assets/less/TableExpand.less' import {createReceiptTask} from '@/api/api' import ReceiptContainerSelectModal from "./modules/ReceiptContainerSelectModal"; +import ReceiptContainerFillSelectModal from "./modules/ReceiptContainerFillSelectModal"; +import ReceiptContainerStatusSelectModal from "./modules/ReceiptContainerStatusSelectModal"; export default { name: "ReceiptContainerHeaderList", @@ -144,7 +150,9 @@ export default { components: { ReceiptContainerSelectModal, ReceiptContainerDetailList, - ReceiptContainerHeaderModal + ReceiptContainerHeaderModal, + ReceiptContainerStatusSelectModal, + ReceiptContainerFillSelectModal }, data() { return { @@ -291,6 +299,16 @@ export default { this.$refs.modalForm2.title = "选择分拣入库口"; console.log("selectPort"); }, + selectFillPort(record) { + this.$refs.modalForm3.edit(record); + this.$refs.modalForm3.title = "选择分拣入库口"; + console.log("selectFillPort"); + }, + selectContainerStatus(record) { + this.$refs.modalForm4.edit(record); + this.$refs.modalForm4.title = "选择容器状态"; + console.log("selectContainerStatus"); + }, loadData(arg) { if (!this.url.list) { this.$message.error("请设置url.list属性!") diff --git a/ant-design-vue-jeecg/src/views/system/receipt/ReceiptDetailList.vue b/ant-design-vue-jeecg/src/views/system/receipt/ReceiptDetailList.vue index cbcec8a..2eafe6e 100644 --- a/ant-design-vue-jeecg/src/views/system/receipt/ReceiptDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/receipt/ReceiptDetailList.vue @@ -32,7 +32,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerFillSelectModal.vue b/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerFillSelectModal.vue new file mode 100644 index 0000000..4f4d4ce --- /dev/null +++ b/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerFillSelectModal.vue @@ -0,0 +1,143 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + :confirmLoading="confirmLoading" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="关闭"> + <div class="table-page-search-wrapper"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" layout="inline"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="分拣入库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort" style="margin-left:14px"> + <a-select + show-search + placeholder="请选择分拣入库口" + option-filter-prop="children" + v-model="model.toPort"> + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ + item.name + }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="容器填充状态" prop="containerFillStatus"> + <j-dict-select-tag + v-model="model.containerFillStatus" + type="radioButton" + title="容器填充状态" + dictCode="container_fill_status" + placeholder="请选择容器填充状态" + /> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </div> + </j-modal> +</template> + +<script> + +import {httpAction} from '@/api/manage' +import {validateDuplicateValue} from '@/utils/util' +import {createReceiptTask} from '@/api/api' +import {selectSupplePort} from '@/api/api' + +export default { + name: "ReceiptContainerSelectModal", + components: {}, + props: { + mainId: { + type: String, + required: false, + default: '' + } + }, + data() { + return { + title: "操作", + portList: [], + width: 500, + visible: false, + model: {}, + labelCol: { + xs: {span: 24}, + sm: {span: 5}, + }, + wrapperCol: { + xs: {span: 24}, + sm: {span: 16}, + }, + confirmLoading: false, + validatorRules: { + toPort: [{ required: true, message: '请选择分拣口!' }], + containerFillStatus: [{ required: true, message: '请选择容器填充状态!' }] + }, + url: { + } + } + }, + created() { + //备份model原始值 + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add() { + this.edit(this.modelDefault); + }, + edit(record) { + console.log("edit"); + this.getPortList(record); + }, + close() { + this.$emit('close'); + this.visible = false; + this.$refs.form.clearValidate(); + }, + handleOk() { + const that = this; + // 触发表单验证 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + createReceiptTask(this.model).then((res) => { + if (res.success) { + that.$message.success(res.message); + that.$emit('ok'); + } else { + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + that.close(); + }); + } else { + return false + } + }) + }, + handleCancel() { + this.close() + }, + getPortList(record) { + selectSupplePort(record).then((res) => { + if (res.success) { + this.portList = res.result; + this.model = Object.assign({}, record); + this.visible = true; + } else { + this.$message.warning(res.message); + } + }); + } + } +} +</script> diff --git a/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue b/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue index 0dd6642..a17dd0f 100644 --- a/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue +++ b/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue @@ -8,26 +8,28 @@ @ok="handleOk" @cancel="handleCancel" cancelText="关闭"> - <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :model="model" :rules="validatorRules"> - <a-row> - <a-col :span="24"> - <a-form-model-item label="分拣入库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort"> - <a-select - show-search - placeholder="请选择分拣入库口" - option-filter-prop="children" - v-model="model.toPort"> - <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ - item.name - }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </a-spin> + <div class="table-page-search-wrapper"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" > + <a-row> + <a-col :span="24"> + <a-form-model-item label="分拣入库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort" style="margin-left:14px"> + <a-select + show-search + placeholder="请选择分拣入库口" + option-filter-prop="children" + v-model="model.toPort"> + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ + item.name + }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </div> </j-modal> </template> @@ -63,13 +65,12 @@ export default { xs: {span: 24}, sm: {span: 16}, }, - confirmLoading: false, - validatorRules: {}, + validatorRules: { + toPort: [{ required: true, message: '请选择分拣口!' }] + }, url: { - createTask: "/shipment/shipmentContainerHeader/createShipmentTask", } - } }, created() { @@ -125,7 +126,6 @@ export default { } }); } - } } </script> diff --git a/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerStatusSelectModal.vue b/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerStatusSelectModal.vue new file mode 100644 index 0000000..f8547f2 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerStatusSelectModal.vue @@ -0,0 +1,121 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + :confirmLoading="confirmLoading" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="关闭" + > + <div class="table-page-search-wrapper"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" layout="inline"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="容器填充状态" prop="containerFillStatus"> + <j-dict-select-tag + v-model="model.containerFillStatus" + type="radioButton" + title="容器填充状态" + dictCode="container_fill_status" + placeholder="请选择容器填充状态" + /> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </div> + </j-modal> +</template> + +<script> +import { httpAction } from '@/api/manage' +import { validateDuplicateValue } from '@/utils/util' +import { createReceiptTask } from '@/api/api' + +export default { + name: 'ReceiptContainerSelectModal', + components: {}, + props: { + mainId: { + type: String, + required: false, + default: '' + } + }, + data() { + return { + title: '操作', + width: 500, + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + + confirmLoading: false, + validatorRules: { + containerFillStatus: [{ required: true, message: '请选择容器填充状态!' }] + }, + url: { + } + } + }, + created() { + //备份model原始值 + this.modelDefault = JSON.parse(JSON.stringify(this.model)) + }, + methods: { + add() { + this.edit(this.modelDefault) + }, + edit(record) { + this.getPortList(record) + }, + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + }, + handleOk() { + const that = this + // 触发表单验证 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + createReceiptTask(this.model) + .then(res => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + } else { + that.$message.warning(res.message) + } + }) + .finally(() => { + that.confirmLoading = false + that.close() + }) + } else { + return false + } + }) + }, + handleCancel() { + this.close() + }, + getPortList(record) { + this.model = Object.assign({}, record) + this.visible = true + } + } +} +</script> diff --git a/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue b/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue index c858d24..8dd5060 100644 --- a/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue +++ b/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue @@ -7,46 +7,38 @@ switchFullscreen @ok="handleOk" @cancel="handleCancel" - cancelText="关闭"> + cancelText="关闭" + > <a-spin :spinning="confirmLoading"> <a-form-model ref="form" :model="model" :rules="validatorRules"> <a-row> <a-col :span="24"> <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> - <a-input v-model="model.containerCode" placeholder="请输入容器编码" style="width: 100%"/> + <a-input v-model="model.containerCode" placeholder="请输入容器编码" style="width: 100%" /> </a-form-model-item> </a-col> </a-row> </a-form-model> </a-spin> - - <a-table - ref="table" - rowKey="id" - size="middle" - :columns="columns" - :dataSource="dataSource" - :pagination="false"> - <span slot="action" slot-scope="text, record"> - <a-input-number - placeholder="" - v-model="record.taskQty" - :value="text" - /> - </span> + <a-table ref="table" rowKey="id" size="middle" :columns="columns" :dataSource="dataSource" :pagination="false"> + <span slot="action" slot-scope="text, record"> + <a-input-number placeholder="" v-model="record.taskQty" :value="text" /> + </span> </a-table> </j-modal> </template> <script> - -import {httpAction} from '@/api/manage' -import {validateDuplicateValue} from '@/utils/util' -import {searchMaterialByCode} from '@/api/api' -import {listReceiveByReceiptId} from '@/api/api' +import { httpAction } from '@/api/manage' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' +import { validateDuplicateValue } from '@/utils/util' +import { searchMaterialByCode } from '@/api/api' +import { listReceiveByReceiptId } from '@/api/api' export default { - name: "ReceiveModal", + name: 'ReceiveModal', components: {}, props: { mainId: { @@ -57,7 +49,7 @@ export default { }, data() { return { - title: "操作", + title: '操作', width: 800, visible: false, materialList: {}, @@ -65,126 +57,137 @@ export default { dataSource: [], model: {}, labelCol: { - xs: {span: 24}, - sm: {span: 5}, + xs: { span: 24 }, + sm: { span: 5 } }, wrapperCol: { - xs: {span: 24}, - sm: {span: 16}, + xs: { span: 24 }, + sm: { span: 16 } }, columns: [ { title: '物料编码', dataIndex: 'materialCode', - align: "center", - width: 124, - key: 'materialCode' + align: 'center', + width: 124 }, { title: '物料名称', dataIndex: 'materialName', - width: 96, - key: 'materialName' + align: 'center', + width: 96 }, { title: '物料规格', dataIndex: 'materialSpec', - width: 96, - key: 'materialSpec' + align: 'center', + width: 96 }, { title: '库存状态', dataIndex: 'inventoryStatus', - key: 'inventoryStatus', - width: 96, + align: 'center', + width: 96 }, { title: '批次', dataIndex: 'batch', - key: 'batch' + align: 'center' }, { title: '可收数量', dataIndex: 'qty', - width: 80, - key: 'qty' + align: 'center', + width: 80 }, { title: '收货数量', dataIndex: 'action', - scopedSlots: {customRender: 'action'}, + align: 'center', + key: 'action', + scopedSlots: { customRender: 'action' } } ], confirmLoading: false, validatorRules: { - containerCode: [ - {required: true, message: '请输入容器编码!'}, - ], + containerCode: [{ required: true, message: '请输入容器编码!' }] }, + dictOptions: {}, + superFieldList:[], url: { - add: "/receipt/receiveHeader/receiving", - edit: "/receipt/receiptHeader/editReceiptDetail", + add: '/receipt/receiveHeader/receiving', + edit: '/receipt/receiptHeader/editReceiptDetail' } - } }, created() { //备份model原始值 - console.log("created"); - this.modelDefault = JSON.parse(JSON.stringify(this.model)); - this.searchReceive(); + // this.searchReceive() + this.getSuperFieldList() + // this.modelDefault = JSON.parse(JSON.stringify(this.model)) }, methods: { - add() { - console.log("add 1"); - this.edit(this.modelDefault); - this.model.inventoryStatus = "good"; - }, + // add() { + // this.edit(this.modelDefault) + // this.model.inventoryStatus = 'good' + // }, edit(record) { - console.log("edit 1"); - this.model = Object.assign({}, record); - this.visible = true; - this.searchReceive(); - }, - show(record) { - this.model = Object.assign({}, record); - this.visible = true; + this.model = Object.assign({}, record) + this.visible = true + this.searchReceive() }, + // show(record) { + // this.model = Object.assign({}, record) + // this.visible = true + // }, close() { - this.$emit('close'); - this.visible = false; - this.$refs.form.clearValidate(); + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() }, searchReceive() { - const that = this; - that.querySource.receiptCode = that.model.code; - listReceiveByReceiptId(that.querySource).then((res) => { - that.dataSource = res.result; + const that = this + that.querySource.receiptCode = that.model.code + listReceiveByReceiptId(that.querySource).then(res => { + that.dataSource = res.result }) }, + initDictConfig() {}, + getSuperFieldList() { + let fieldList = [] + fieldList.push({type:'string',value:'inventoryStatus',text:'库存状态',dictCode:'inventory_status'}) + this.superFieldList = fieldList + }, handleOk() { - console.log("handleOk"); - const that = this; + console.log('handleOk') + const that = this // 触发表单验证 this.$refs.form.validate(valid => { if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - httpurl += this.url.add; - method = 'post'; - this.dataSource[0].containerCode = this.model.containerCode; - httpAction(httpurl, this.dataSource, method).then((res) => { - if (res.success) { - that.$message.success(res.message); - that.$emit('ok'); - } else { - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) + that.confirmLoading = true + let httpurl = '' + let method = '' + httpurl += this.url.add + method = 'post' + if (this.dataSource[0] == null) { + that.confirmLoading = false + that.$message.warning('入库单没有详情!') + return + } + this.dataSource[0].containerCode = this.model.containerCode + httpAction(httpurl, this.dataSource, method) + .then(res => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + that.close() + } else { + that.$message.warning(res.message) + } + }) + .finally(() => { + that.confirmLoading = false + }) } else { return false } @@ -192,9 +195,7 @@ export default { }, handleCancel() { this.close() - }, - - + } } } </script> diff --git a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue index 3204eec..49921cb 100644 --- a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue @@ -88,7 +88,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue index 3b1c0ed..f353e1a 100644 --- a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue @@ -80,7 +80,7 @@ <div> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> <!-- </div>--> diff --git a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailHistoryList.vue b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailHistoryList.vue index d46abf7..316e6f9 100644 --- a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailHistoryList.vue +++ b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailHistoryList.vue @@ -30,7 +30,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue index 4dd44b7..3ac0df0 100644 --- a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue @@ -31,7 +31,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderHistoryList.vue b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderHistoryList.vue index b079e15..b4b71c1 100644 --- a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderHistoryList.vue +++ b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderHistoryList.vue @@ -112,7 +112,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue index 58be62c..7686cd9 100644 --- a/ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue @@ -120,7 +120,7 @@ <div> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> <!-- </div>--> diff --git a/ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountHeaderList.vue b/ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountHeaderList.vue index d65b610..0b3b830 100644 --- a/ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountHeaderList.vue @@ -27,7 +27,7 @@ <!-- table区域-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue b/ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue index 9e2f4f7..10edd7b 100644 --- a/ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue @@ -64,7 +64,7 @@ <!-- table区域-begin --> <div> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> -<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> +<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> <!-- </div>--> diff --git a/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue b/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue index 634a07f..7413773 100644 --- a/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue @@ -94,7 +94,7 @@ <div> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> <!-- </div>--> diff --git a/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue b/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue index 016d63c..e919aad 100644 --- a/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue @@ -88,7 +88,7 @@ <div> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> <!-- </div>--> @@ -188,8 +188,8 @@ export default { description: '任务表管理页面', zoneList: [], isorter: { - column: 'status', - order: 'asc', + column: 'id', + order: 'desc', }, // 表头 columns: [ diff --git a/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue b/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue index e4d459f..9780144 100644 --- a/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue @@ -88,7 +88,7 @@ <div> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> <!-- </div>--> diff --git a/ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue b/ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue index 1ebad01..b2cf175 100644 --- a/ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue @@ -30,7 +30,7 @@ <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 <a style="margin-left: 24px" @click="onClearSelected">清空</a> </div> diff --git a/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue b/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue index 449059c..3d508a4 100644 --- a/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue @@ -94,7 +94,7 @@ <div> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> <!-- </div>--> diff --git a/ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue b/ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue index 190ee4b..610d7e1 100644 --- a/ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue +++ b/ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue @@ -100,12 +100,12 @@ export default { let multi_depart = loginResult.multi_depart //0:无部门 1:一个部门 2:多个部门 if (multi_depart == 0) { - this.$notification.warn({ - message: '提示', - description: `您尚未归属部门,请确认账号信息`, - duration: 3 - }); - this.isMultiDepart = false + // this.$notification.warn({ + // message: '提示', + // description: `您尚未归属部门,请确认账号信息`, + // duration: 3 + // }); + // this.isMultiDepart = false } else if (multi_depart == 2) { this.visible = true this.isMultiDepart = true diff --git a/huaheng-wms-core/pom.xml b/huaheng-wms-core/pom.xml index 047e798..076d6fe 100644 --- a/huaheng-wms-core/pom.xml +++ b/huaheng-wms-core/pom.xml @@ -42,12 +42,18 @@ <groupId>org.redisson</groupId> <artifactId>redisson</artifactId> </dependency> + <dependency> <groupId>cn.monitor4all</groupId> <artifactId>log-record-starter</artifactId> <version>1.3.1</version> </dependency> <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk15on</artifactId> + <version>1.69</version> + </dependency> + <dependency> <groupId>com.googlecode.log4jdbc</groupId> <artifactId>log4jdbc</artifactId> <version>1.2</version> @@ -122,6 +128,12 @@ <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> + <!--获取apk信息--> + <dependency> + <groupId>net.dongliu</groupId> + <artifactId>apk-parser</artifactId> + <version>2.5.3</version> + </dependency> </dependencies> <build> diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/CommonController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/CommonController.java index e120e59..feb48ba 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/CommonController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/CommonController.java @@ -245,7 +245,7 @@ public class CommonController { File file = new File(filePath); if (!file.exists()) { response.setStatus(404); - throw new RuntimeException("文件[" + imgPath + "]不存在.."); + return; } response.setContentType("application/force-download");// 设置强制下载不打开 response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"), "iso-8859-1")); @@ -277,7 +277,6 @@ public class CommonController { } } } - } // /** diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementSendController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementSendController.java index c78587b..cb56948 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementSendController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementSendController.java @@ -31,6 +31,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; @@ -198,7 +199,7 @@ public class SysAnnouncementSendController { String anntId = json.getString("anntId"); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId().toString(); - LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); + LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = Wrappers.lambdaUpdate(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where annt_id ='" + anntId + "' and user_id ='" + userId + "'"); @@ -237,7 +238,7 @@ public class SysAnnouncementSendController { Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId().toString(); - LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); + LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = Wrappers.lambdaUpdate(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where user_id ='" + userId + "'"); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java index 2d5898a..3a44e03 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java @@ -48,6 +48,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.google.common.base.Joiner; @@ -507,7 +508,7 @@ public class SysBaseApiImpl implements ISysBaseAPI { if (announcement != null) { LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId().toString(); - LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); + LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = Wrappers.lambdaUpdate(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where annt_id ='" + announcement.getId() + "' and user_id ='" + userId + "'"); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/controller/AcsController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/controller/AcsController.java index 02ddaa7..149f899 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/controller/AcsController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/controller/AcsController.java @@ -42,7 +42,6 @@ public class AcsController extends HuahengBaseController { // @ApiLogger(apiName = "API接口第三方Token校验测试", from = "TEST") @ResponseBody @PostMapping(value = "/testTokenCheck") - @OperationLog(bizType = "'物料追踪'", tag = "'入库完成'", bizId = "#paramMap.get('bizId')", extra = "#jsonString", msg = "'测试操作日志'", recordReturnValue = true) public Result<?> testTokenCheck(@RequestBody Map<String, String> paramMap, HttpServletRequest request) { return Result.ok(); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/servuce/impl/MesServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/servuce/impl/MesServiceImpl.java index 75d8689..67ebc44 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/servuce/impl/MesServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/servuce/impl/MesServiceImpl.java @@ -126,7 +126,7 @@ public class MesServiceImpl implements IMesService { receive.setContainerCode(containerCode); receive.setMaterialCode(materialCode); receive.setMaterialName(receiptDetail.getMaterialName()); - receive.setMateiralSpec(receiptDetail.getMaterialSpec()); + receive.setMaterialSpec(receiptDetail.getMaterialSpec()); receive.setMaterialUnit(receiptDetail.getMaterialUnit()); receive.setInventoryStatus(receiptDetail.getInventoryStatus()); receive.setQty(receiptDetail.getQty()); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/controller/MobileController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/controller/MobileController.java index 96a1a66..6fce763 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/controller/MobileController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/controller/MobileController.java @@ -1,27 +1,27 @@ package org.jeecg.modules.wms.api.mobile.controller; +import com.alibaba.fastjson.JSONException; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.jeecg.common.api.vo.Result; import org.jeecg.modules.system.entity.SysDictItem; import org.jeecg.modules.system.service.impl.SysDictItemServiceImpl; import org.jeecg.modules.wms.api.mobile.entity.TvTaskVo; +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; +import org.jeecg.modules.wms.monitor.apkinfo.service.IApkInfoService; import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskDetailServiceImpl; import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskHeaderServiceImpl; import org.jeecg.utils.StringUtils; import org.jeecg.utils.constant.QuantityConstant; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; +import java.util.*; /** */ @@ -30,6 +30,12 @@ import java.util.List; @RequestMapping("/api/mobile") public class MobileController { + @Value(value = "${server.servlet.context-path}") + private String ctx; + + @Resource + private IApkInfoService apkInfoService; + @Resource private TaskHeaderServiceImpl taskHeaderService; @@ -87,4 +93,31 @@ public class MobileController { } return Result.OK("", list); } + + @PostMapping("/getUpdateApkInfo") + @ApiOperation("获取apk更新信息") + public Result getUpdateApkInfo(@RequestBody Map<String, String> param) { + System.out.println("getUpdateApkInfo pkgName:" + param.get("pkgName")); + String pkgName = param.get("pkgName"); + String versionCode = param.get("versionCode"); + if (StringUtils.isEmpty(pkgName)) { + throw new JSONException("pkgName不能为空"); + } + if (StringUtils.isEmpty(versionCode)) { + throw new JSONException("versionCode不能为空"); + } + + LambdaQueryWrapper<ApkInfo> query = Wrappers.lambdaQuery(); + query.eq(ApkInfo::getPkgname, pkgName) + .orderByDesc(ApkInfo::getVersioncode) + .last(" limit 1"); + ApkInfo apkInfo = apkInfoService.getOne(query); + if (apkInfo == null ){ + return Result.error("服务器上找不到安装包:" + pkgName); + }else if(apkInfo.getVersioncode() <= Integer.parseInt(versionCode)){ + return Result.ok("当前已经是最新版本"); + } + apkInfo.setUrl(ctx + apkInfo.getUrl()); + return Result.ok(apkInfo); + } } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/service/impl/MobileService.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/service/impl/MobileService.java index dca962d..bbda1c9 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/service/impl/MobileService.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/service/impl/MobileService.java @@ -169,7 +169,7 @@ public class MobileService implements IMobileService { v.setMaterialCode(d.getMaterialCode()); v.setMaterialName(d.getMaterialName()); v.setBatch(d.getBatch()); - v.setMateiralSpec(d.getMaterialSpec()); + v.setMaterialSpec(d.getMaterialSpec()); v.setMaterialUnit(d.getMaterialUnit()); v.setContainerCode(bean.getContainerCode()); receiveList.add(v); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java index 64ec2bb..f24e52e 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java @@ -166,19 +166,16 @@ public class WcsServiceImpl implements WcsService { if (StringUtils.isEmpty(locationCode)) { return Result.error("分配库位时,没有库位可分配"); } - boolean success = - locationService.updateStatusByOriginStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); + boolean success = locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("分配库位时,更新库位状态失败"); } if (StringUtils.isNotEmpty(taskHeader.getToLocationCode()) && !locationCode.equals(taskHeader.getToLocationCode())) { - success = locationService.updateStatusByOriginStatus(taskHeader.getToLocationCode(), QuantityConstant.STATUS_LOCATION_EMPTY, - QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); + success = locationService.updateStatus(taskHeader.getToLocationCode(), QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("分配库位时,更新之前分配的库位状态失败"); } } - List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>(); if (taskType == QuantityConstant.TASK_TYPE_WHOLERECEIPT || taskType == QuantityConstant.TASK_TYPE_EMPTYRECEIPT) { for (TaskDetail taskDetail : taskDetailList) { @@ -594,8 +591,7 @@ public class WcsServiceImpl implements WcsService { } } // 6. 锁定WMS分配的库位 - boolean success = - locationService.updateStatusByOriginStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); + boolean success = locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("重入处理失败, 更新库位状态失败"); } @@ -686,7 +682,8 @@ public class WcsServiceImpl implements WcsService { @Transactional(rollbackFor = Exception.class) public Result manyEmptyOut(String zoneCode, String port, String warehouseCode) { LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); - containerLambdaQueryWrapper.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_MANY).eq(Container::getWarehouseCode, warehouseCode); + containerLambdaQueryWrapper.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_EMPTY) + .eq(Container::getFillStatus, QuantityConstant.STATUS_CONTAINER_FILL_MANY).eq(Container::getWarehouseCode, warehouseCode); List<Container> containerList = containerService.list(containerLambdaQueryWrapper); List<Container> removeContainerList = new ArrayList<>(); if (containerList != null && containerList.size() > 0) { diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java index 6315208..985994d 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java @@ -94,11 +94,10 @@ public class ContainerController extends JeecgController<Container, IContainerSe @ApiOperation(value = "容器管理-添加", notes = "容器管理-添加") @PostMapping(value = "/add") @RequiresPermissions("container:add") - public Result<String> add(@RequestBody Container container, HttpServletRequest req) { + public Result<?> add(@RequestBody Container container, HttpServletRequest req) { HuahengJwtUtil.setWarehouseCode(req, container); int number = Integer.parseInt(container.getUserdef1()); - Result result = containerService.batchAddContainers(container, number); - return result; + return containerService.batchAddContainers(container, number); } /** diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/entity/Container.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/entity/Container.java index 7ab00ff..b2c3e40 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/entity/Container.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/entity/Container.java @@ -65,10 +65,10 @@ public class Container implements Serializable { @Dict(dicCode = "container_status") @ApiModelProperty(value = "容器状态") private String status; - /** 上次容器状态 */ - @Excel(name = "上次容器状态", width = 15) - @ApiModelProperty(value = "上次容器状态") - private String lastStatus; + @Excel(name = "填充状态", width = 15, dicCode = "fill_status") + @Dict(dicCode = "fill_status") + @ApiModelProperty(value = "填充状态") + private String fillStatus; /** 备用字段1 */ @Excel(name = "备用字段1", width = 15) @ApiModelProperty(value = "备用字段1") diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java index 571e139..2a21b56 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java @@ -19,22 +19,12 @@ public interface IContainerService extends IService<Container> { Container getContainerByCode(String containCode, String warehouseCode); - boolean updateStatus(String containerCode, String status, String wareohuseCode); - - /** - * 更新容器状态status,条件是originStatus,如果originStatus条件不满足,那么返回false - * @param containerCode - * @param status - * @param originStatus - * @param wareohuseCode - * @return - */ - boolean updateStatusByOriginStatus(String containerCode, String status, String originStatus, String wareohuseCode); - - boolean restoreContainer(String containerCode, String wareohuseCode); + boolean updateStatus(String containerCode, String status, String warehouseCode); boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode); + boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String fillStatus, String warehouseCode); + // 创建零时容器 Container createLSContainer(String warehouseCode); @@ -45,5 +35,5 @@ public interface IContainerService extends IService<Container> { */ boolean havaLocationCodeByContainer(String locationCode, String containerCode, String warehouseCode); - List<Container> getContainerListByCodeList(List<String> containCodeList, String warehouseCode); + List<Container> getContainerListByCodeList(List<String> containerCodeList, String warehouseCode); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java index 0c40a69..f0c154a 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java @@ -19,6 +19,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -50,6 +51,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container String code = String.format("%s%05d", containerTypeCode, startNumber); container1.setCode(code); container1.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); + container1.setFillStatus(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY); container1.setWarehouseCode(warehouseCode); containerList.add(container1); } @@ -69,60 +71,27 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container } @Override - public boolean updateStatus(String containerCode, String status, String wareohuseCode) { - Container container = this.getContainerByCode(containerCode, wareohuseCode); - if (container == null) { - return false; - } - container.setLastStatus(container.getStatus()); - container.setStatus(status); - boolean result = this.updateById(container); - return result; - } - - @Override - public boolean updateStatusByOriginStatus(String containerCode, String status, String originStatus, String wareohuseCode) { - Container container = this.getContainerByCode(containerCode, wareohuseCode); - if (container == null) { - return false; - } - container.setLastStatus(container.getStatus()); - container.setStatus(status); - LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); - containerLambdaQueryWrapper.eq(Container::getCode, containerCode).eq(Container::getStatus, originStatus).eq(Container::getWarehouseCode, wareohuseCode); - boolean result = this.update(container, containerLambdaQueryWrapper); - return result; + public boolean updateStatus(String containerCode, String status, String warehouseCode) { + LambdaUpdateWrapper<Container> updateWrapper = Wrappers.lambdaUpdate(); + updateWrapper.ne(Container::getStatus, status).eq(Container::getCode, containerCode).eq(Container::getWarehouseCode, warehouseCode).set(Container::getStatus, + status); + return update(updateWrapper); } @Override - public boolean restoreContainer(String containerCode, String wareohuseCode) { - Container container = this.getContainerByCode(containerCode, wareohuseCode); - if (container == null) { - return false; - } - container.setLastStatus(container.getStatus()); - container.setStatus(container.getLastStatus()); - boolean result = this.updateById(container); - return result; + public boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode) { + LambdaUpdateWrapper<Container> updateWrapper = Wrappers.lambdaUpdate(); + updateWrapper.ne(Container::getStatus, status).eq(Container::getCode, containerCode).eq(Container::getWarehouseCode, warehouseCode) + .set(Container::getLocationCode, locationCode).set(Container::getStatus, status); + return update(updateWrapper); } @Override - public boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode) { - Container container = getContainerByCode(containerCode, warehouseCode); - if (container == null) { - return false; - } - boolean success = false; - if (StringUtils.isNotEmpty(locationCode)) { - success = havaLocationCodeByContainer(locationCode, containerCode, warehouseCode); - if (success) { - throw new JeecgBootException("容器表已经存在这个库位号,不能再写入"); - } - } - container.setStatus(status); - container.setLocationCode(locationCode); - success = updateById(container); - return success; + public boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String fillStatus, String warehouseCode) { + LambdaUpdateWrapper<Container> updateWrapper = Wrappers.lambdaUpdate(); + updateWrapper.ne(Container::getStatus, status).eq(Container::getCode, containerCode).eq(Container::getWarehouseCode, warehouseCode) + .set(Container::getLocationCode, locationCode).set(Container::getStatus, status).set(Container::getFillStatus, fillStatus); + return update(updateWrapper); } @Override @@ -132,6 +101,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container container.setCode(code); container.setWarehouseCode(warehouseCode); container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); + container.setFillStatus(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY); if (!save(container)) { throw new JeecgBootException("新增容器失败"); } @@ -159,9 +129,9 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container } @Override - public List<Container> getContainerListByCodeList(List<String> containCodeList, String warehouseCode) { + public List<Container> getContainerListByCodeList(List<String> containerCodeList, String warehouseCode) { LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); - containerLambdaQueryWrapper.in(Container::getCode, containCodeList).eq(Container::getWarehouseCode, warehouseCode); + containerLambdaQueryWrapper.in(Container::getCode, containerCodeList).eq(Container::getWarehouseCode, warehouseCode); List<Container> containerList = list(containerLambdaQueryWrapper); return containerList; } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/controller/ContainerCapacityController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/controller/ContainerCapacityController.java index de93ed1..9dcc10f 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/controller/ContainerCapacityController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/controller/ContainerCapacityController.java @@ -1,44 +1,49 @@ package org.jeecg.modules.wms.config.containerCapacity.controller; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; +import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; +import org.jeecg.modules.wms.config.location.entity.Location; +import org.jeecg.modules.wms.config.material.entity.Material; +import org.jeecg.modules.wms.config.material.service.IMaterialService; import org.jeecg.utils.HuahengJwtUtil; -import org.jeecg.common.util.oConvertUtils; +import org.jeecg.utils.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.extern.slf4j.Slf4j; -import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; -import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; -import org.jeecg.utils.StringUtils; -import org.jeecgframework.poi.excel.ExcelImportUtil; -import org.jeecgframework.poi.excel.def.NormalExcelConstants; -import org.jeecgframework.poi.excel.entity.ExportParams; -import org.jeecgframework.poi.excel.entity.ImportParams; -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; -import org.jeecg.common.system.base.controller.JeecgController; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.MultipartHttpServletRequest; -import org.springframework.web.servlet.ModelAndView; -import com.alibaba.fastjson.JSON; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.jeecg.common.aspect.annotation.AutoLog; +import lombok.extern.slf4j.Slf4j; /** * @Description: 容器容量管理 @@ -54,6 +59,9 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci @Autowired private IContainerCapacityService containerCapacityService; + @Autowired + private IMaterialService materialService; + /** * 分页列表查询 * @param containerCapacity @@ -71,6 +79,28 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci QueryWrapper<ContainerCapacity> queryWrapper = QueryGenerator.initQueryWrapper(containerCapacity, req.getParameterMap()); Page<ContainerCapacity> page = new Page<ContainerCapacity>(pageNo, pageSize); IPage<ContainerCapacity> pageList = containerCapacityService.page(page, queryWrapper); + List<ContainerCapacity> containerCapacityList = pageList.getRecords(); + Map<String, Material> materialMap = new HashMap<String, Material>(); + if (!CollectionUtils.isEmpty(containerCapacityList)) { + Set<String> materialCodeSet = + containerCapacityList.stream().filter(t -> StringUtils.isNotEmpty(t.getMaterialCode())).map(t -> t.getMaterialCode()).collect(Collectors.toSet()); + if (!CollectionUtils.isEmpty(materialCodeSet)) { + LambdaQueryWrapper<Material> materialLambdaQueryWrapper = Wrappers.lambdaQuery(); + HuahengJwtUtil.setWarehouseCode(materialLambdaQueryWrapper, Material.class, req); + materialLambdaQueryWrapper.in(Material::getCode, materialCodeSet); + List<Material> materialList = materialService.list(materialLambdaQueryWrapper); + if (!CollectionUtils.isEmpty(materialList)) { + materialMap.putAll(materialList.stream().collect(Collectors.toMap(Material::getCode, Function.identity(), (key1, key2) -> key2))); + } + } + } + for (ContainerCapacity pageObject : containerCapacityList) { + Material material = materialMap.get(pageObject.getMaterialCode()); + if (material != null) { + pageObject.setMaterialName(material.getName()); + pageObject.setMaterialUnit(material.getUnit()); + } + } return Result.OK(pageList); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/entity/ContainerCapacity.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/entity/ContainerCapacity.java index 5f8df28..8173511 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/entity/ContainerCapacity.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/entity/ContainerCapacity.java @@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException; import java.util.Date; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -35,60 +36,57 @@ public class ContainerCapacity implements Serializable { @TableId(type = IdType.AUTO) @ApiModelProperty(value = "主键") private Integer id; + /** 容器类型 */ @Excel(name = "容器类型", width = 15) @ApiModelProperty(value = "容器类型") private String containerTypeCode; + /** 仓库编码 */ @Excel(name = "仓库编码", width = 15) @ApiModelProperty(value = "仓库编码") private String warehouseCode; - /** 货主 */ - @Excel(name = "货主", width = 15) - @ApiModelProperty(value = "货主") - private String companyCode; + /** 物料编码 */ @Excel(name = "物料编码", width = 15) @ApiModelProperty(value = "物料编码") private String materialCode; + /** 物料名称 */ - @Excel(name = "物料名称", width = 15) + // @Excel(name = "物料名称", width = 15) @ApiModelProperty(value = "物料名称") + @TableField(exist = false) private String materialName; + /** 物料单位 */ - @Excel(name = "物料单位", width = 15) + // @Excel(name = "物料单位", width = 15) @ApiModelProperty(value = "物料单位") + @TableField(exist = false) private String materialUnit; - /** 存放数量 */ - @Excel(name = "存放数量", width = 15) - @ApiModelProperty(value = "存放数量") + + /** 容量 */ + @Excel(name = "容量", width = 15) + @ApiModelProperty(value = "容量") private BigDecimal qty; + /** 是否可用 */ @Excel(name = "是否可用", width = 15, dicCode = "enable_status") @Dict(dicCode = "enable_status") @ApiModelProperty(value = "是否可用") private Integer enable; - /** 备用字段1 */ - @Excel(name = "备用字段1", width = 15) - @ApiModelProperty(value = "备用字段1") - private String userdef1; - /** 备用字段2 */ - @Excel(name = "备用字段2", width = 15) - @ApiModelProperty(value = "备用字段2") - private String userdef2; - /** 备用字段3 */ - @Excel(name = "备用字段3", width = 15) - @ApiModelProperty(value = "备用字段3") - private String userdef3; + /** 创建人 */ @ApiModelProperty(value = "创建人") private String createBy; + /** 创建日期 */ @ApiModelProperty(value = "创建日期") private Date createTime; + /** 更新人 */ @ApiModelProperty(value = "更新人") private String updateBy; + /** 更新日期 */ @ApiModelProperty(value = "更新日期") private Date updateTime; diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/IContainerCapacityService.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/IContainerCapacityService.java index d5ba30b..f340f45 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/IContainerCapacityService.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/IContainerCapacityService.java @@ -11,4 +11,14 @@ import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; */ public interface IContainerCapacityService extends IService<ContainerCapacity> { + /** + * 容器物品容量查询 + * @author TanYibin + * @createDate 2023年4月10日 + * @param warehouseCode + * @param containerTypeCode + * @param materialCode + * @return + */ + public ContainerCapacity queryOne(String warehouseCode, String containerTypeCode, String materialCode); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/impl/ContainerCapacityServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/impl/ContainerCapacityServiceImpl.java index 642e52a..47f37e3 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/impl/ContainerCapacityServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/impl/ContainerCapacityServiceImpl.java @@ -3,8 +3,12 @@ package org.jeecg.modules.wms.config.containerCapacity.service.impl; import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; import org.jeecg.modules.wms.config.containerCapacity.mapper.ContainerCapacityMapper; import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; +import org.jeecg.utils.StringUtils; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** @@ -16,4 +20,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service public class ContainerCapacityServiceImpl extends ServiceImpl<ContainerCapacityMapper, ContainerCapacity> implements IContainerCapacityService { + @Override + @Cacheable(cacheNames = "queryContainerCapacity#60", + key = "#root.methodName + '_' + #warehouseCode + '_' + #containerTypeCode + '_' + #materialCode") + public ContainerCapacity queryOne(String warehouseCode, String containerTypeCode, String materialCode) { + LambdaQueryWrapper<ContainerCapacity> containerCapacityWrapper = Wrappers.lambdaQuery(); + containerCapacityWrapper.eq(ContainerCapacity::getWarehouseCode, warehouseCode) + .eq(StringUtils.isNotEmpty(containerTypeCode), ContainerCapacity::getContainerTypeCode, containerTypeCode) + .eq(StringUtils.isNotEmpty(materialCode), ContainerCapacity::getMaterialCode, materialCode); + return getOne(containerCapacityWrapper); + } + } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerType/entity/ContainerType.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerType/entity/ContainerType.java index 67c9cd2..8a15dca 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerType/entity/ContainerType.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerType/entity/ContainerType.java @@ -2,9 +2,12 @@ package org.jeecg.modules.wms.config.containerType.entity; import java.io.Serializable; import java.io.UnsupportedEncodingException; +import java.util.Arrays; import java.util.Date; +import java.util.List; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -35,67 +38,94 @@ public class ContainerType implements Serializable { @TableId(type = IdType.AUTO) @ApiModelProperty(value = "主键") private Integer id; + /** 编码 */ @Excel(name = "编码", width = 15) @ApiModelProperty(value = "编码") private String code; + /** 名称 */ @Excel(name = "名称", width = 15) @ApiModelProperty(value = "名称") private String name; + /** 仓库编码 */ @Excel(name = "仓库编码", width = 15) @ApiModelProperty(value = "仓库编码") private String warehouseCode; + /** 货主编码 */ @Excel(name = "货主编码", width = 15) @ApiModelProperty(value = "货主编码") private String companyCode; + /** 绑定的库位类型 */ @Excel(name = "绑定的库位类型", width = 15) @ApiModelProperty(value = "绑定的库位类型") private String locationType; + + public void setLocationType(String locationType) { + if (locationType != null) { + this.locationType = locationType; + this.locationTypes = Arrays.asList(locationType.split(",")); + } + } + + @TableField(exist = false) + private List<String> locationTypes; + /** 长 */ @Excel(name = "长", width = 15) @ApiModelProperty(value = "长") private Integer length; + /** 宽 */ @Excel(name = "宽", width = 15) @ApiModelProperty(value = "宽") private Integer width; + /** 高 */ @Excel(name = "高", width = 15) @ApiModelProperty(value = "高") private Integer height; + /** 空容器重量 */ @Excel(name = "空容器重量", width = 15) @ApiModelProperty(value = "空容器重量") private Integer emptyweight; + /** 容器最大承重 */ @Excel(name = "容器最大承重", width = 15) @ApiModelProperty(value = "容器最大承重") private Integer maxweight; + /** 备用字段1 */ @Excel(name = "备用字段1", width = 15) @ApiModelProperty(value = "备用字段1") private String userdef1; + /** 备用字段2 */ @Excel(name = "备用字段2", width = 15) @ApiModelProperty(value = "备用字段2") private String userdef2; + /** 备用字段3 */ @Excel(name = "备用字段3", width = 15) @ApiModelProperty(value = "备用字段3") private String userdef3; + /** 创建人 */ @ApiModelProperty(value = "创建人") private String createBy; + /** 创建日期 */ @ApiModelProperty(value = "创建日期") private Date createTime; + /** 更新人 */ @ApiModelProperty(value = "更新人") private String updateBy; + /** 更新日期 */ @ApiModelProperty(value = "更新日期") private Date updateTime; diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/controller/LocationController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/controller/LocationController.java index 3e33a59..03de7ab 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/controller/LocationController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/controller/LocationController.java @@ -121,7 +121,7 @@ public class LocationController extends JeecgController<Location, ILocationServi @ApiOperation(value = "库位管理-批量添加", notes = "库位管理-批量添加") @RequiresPermissions("location:batchAdd") @PostMapping(value = "/batchAdd") - public Result<String> batchAdd(@RequestBody BatchLocation batchLocation, HttpServletRequest req) { + public Result<?> batchAdd(@RequestBody BatchLocation batchLocation, HttpServletRequest req) { HuahengJwtUtil.setWarehouseCode(req, batchLocation); batchLocation.setStatus(QuantityConstant.STATUS_LOCATION_EMPTY); Result result = locationService.batchAdd(batchLocation); @@ -252,7 +252,7 @@ public class LocationController extends JeecgController<Location, ILocationServi String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); String containerCode = location.getContainerCode(); String locationCode = location.getCode(); - List<Location> locationList = locationService.getContainerInLocation(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, locationCode, warehouseCode); + List<Location> locationList = locationService.getContainerInLocation(containerCode, QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, locationCode, warehouseCode); return Result.OK(locationList); } @@ -268,7 +268,8 @@ public class LocationController extends JeecgController<Location, ILocationServi String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); String containerCode = location.getContainerCode(); String locationCode = location.getCode(); - List<Location> locationList = locationService.getContainerInLocation(containerCode, QuantityConstant.STATUS_CONTAINER_MANY, locationCode, warehouseCode); + List<Location> locationList = + locationService.getContainerInLocation(containerCode, QuantityConstant.STATUS_CONTAINER_FILL_MANY, locationCode, warehouseCode); return Result.OK(locationList); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/dto/QueryCompareLocationTaskDto.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/dto/QueryCompareLocationTaskDto.java index d42009c..d6500bb 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/dto/QueryCompareLocationTaskDto.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/dto/QueryCompareLocationTaskDto.java @@ -25,6 +25,12 @@ public class QueryCompareLocationTaskDto { /** 数据状态 */ private Integer consistencyStatus; + /** 任务创建时间开始区间 */ + private String taskCreateTimeBegin; + + /** 任务创建时间结束区间 */ + private String taskCreateTimeEnd; + /** 页码 */ private Integer pageNo = 1; diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/mapper/xml/LocationMapper.xml b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/mapper/xml/LocationMapper.xml index 091784a..b85acd7 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/mapper/xml/LocationMapper.xml +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/mapper/xml/LocationMapper.xml @@ -9,7 +9,7 @@ IFNULL(max(grid),0) as maxGrid, IFNULL(min(row),0) as minRow FROM location - WHERE location_type_code = #{locationTypeCode} + WHERE zone_code = #{zoneCode} <if test="warehouseCode != null and warehouseCode !=''"> AND warehouse_code = #{warehouseCode} </if> diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java index a88e0d4..c734189 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java @@ -34,16 +34,6 @@ public interface ILocationService extends IService<Location> { boolean updateStatus(String locationCode, String status, String warehouseCode); - /** - * 更新库位状态status,条件是originStatus,如果originStatus条件不满足,那么返回false - * @param locationCode - * @param status - * @param originStatus - * @param warehouseCode - * @return - */ - boolean updateStatusByOriginStatus(String locationCode, String status, String originStatus, String warehouseCode); - boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode); Location getNear(Location location); @@ -60,7 +50,7 @@ public interface ILocationService extends IService<Location> { boolean haveUncompleteTaskInNear(Location location); - Result batchAdd(BatchLocation batchLocation); + Result<?> batchAdd(BatchLocation batchLocation); LocationInfo getAllLocation(Location location); @@ -71,7 +61,7 @@ public interface ILocationService extends IService<Location> { */ boolean havaContainerCodeInLocation(String containerCode, String locationCode, String warehouseCode); - List<Location> getContainerInLocation(String containerCode, String containerStatus, String locationCode, String warehouseCode); + List<Location> getContainerInLocation(String containerCode, String containerFillStatus, String locationCode, String warehouseCode); PageUtil<CompareLocationDto> compareWcsLocation(QueryCompareLocationDto queryCompareLocationDto); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java index 014772b..d0cd069 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java @@ -53,6 +53,7 @@ import org.springframework.transaction.annotation.Transactional; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -121,46 +122,18 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i @Override public boolean updateStatus(String locationCode, String status, String warehouseCode) { - Location location = getLocationByCode(locationCode, warehouseCode); - if (location == null) { - return false; - } - location.setStatus(status); - boolean result = updateById(location); - return result; - } - - @Override - public boolean updateStatusByOriginStatus(String locationCode, String status, String originStatus, String warehouseCode) { - Location location = getLocationByCode(locationCode, warehouseCode); - if (location == null) { - return false; - } - LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); - locationLambdaQueryWrapper.eq(Location::getStatus, originStatus).eq(Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode); - location.setStatus(status); - boolean result = update(location, locationLambdaQueryWrapper); - return result; + LambdaUpdateWrapper<Location> updateWrapper = Wrappers.lambdaUpdate(); + updateWrapper.ne(Location::getStatus, status).eq(Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode).set(Location::getStatus, + status); + return update(updateWrapper); } @Override public boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode) { - Location location = getLocationByCode(locationCode, warehouseCode); - if (location == null) { - return false; - } - boolean success = false; - // 如果这个托盘号已经在库位表里,那么不能再写入 - if (StringUtils.isNotEmpty(containerCode)) { - success = havaContainerCodeInLocation(containerCode, locationCode, warehouseCode); - if (success) { - throw new JeecgBootException("库位表已经存在这个容器号,不能再写入"); - } - } - location.setContainerCode(containerCode); - location.setStatus(status); - success = updateById(location); - return success; + LambdaUpdateWrapper<Location> updateWrapper = Wrappers.lambdaUpdate(); + updateWrapper.ne(Location::getStatus, status).eq(Location::getCode, locationCode) + .eq(Location::getWarehouseCode, warehouseCode).set(Location::getContainerCode, containerCode).set(Location::getStatus, status); + return update(updateWrapper); } @Override @@ -308,7 +281,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i @Override @Transactional(rollbackFor = Exception.class) - public Result batchAdd(BatchLocation batchLocation) { + public Result<?> batchAdd(BatchLocation batchLocation) { String prefix = batchLocation.getPrefix(); Integer firstRow = batchLocation.getFirstRow(); Integer lastRow = batchLocation.getLastRow(); @@ -408,9 +381,9 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i } @Override - public List<Location> getContainerInLocation(String containerCode, String containerStatus, String locationCode, String warehouseCode) { + public List<Location> getContainerInLocation(String containerCode, String containerFillStatus, String locationCode, String warehouseCode) { LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); - locationLambdaQueryWrapper.eq(Location::getStatus, QuantityConstant.STATUS_CONTAINER_EMPTY).ne(Location::getContainerCode, QuantityConstant.EMPTY_STRING) + locationLambdaQueryWrapper.eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY).ne(Location::getContainerCode, QuantityConstant.EMPTY_STRING) .eq(StringUtils.isNotEmpty(containerCode), Location::getContainerCode, containerCode) .eq(StringUtils.isNotEmpty(locationCode), Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode); List<Location> locationList = list(locationLambdaQueryWrapper); @@ -418,11 +391,11 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i if (locationList.size() != 0) { List<String> containerCodeList = locationList.stream().map(Location::getContainerCode).collect(Collectors.toList()); List<Container> containerList = containerService.getContainerListByCodeList(containerCodeList, warehouseCode); - for (Location location1 : locationList) { + for (Location location : locationList) { for (Container container : containerList) { - if (location1.getContainerCode().equals(container.getCode())) { - if (!container.getStatus().equals(containerStatus)) { - removeLocationList.add(location1); + if (location.getContainerCode().equals(container.getCode())) { + if (!container.getFillStatus().equals(containerFillStatus)) { + removeLocationList.add(location); } } } @@ -458,7 +431,6 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i Map<String, List<WcsLocationDto>> wcsLocationMap = new HashMap<String, List<WcsLocationDto>>(); // 1.获取WMS库位表库位信息 - Page<Location> page = new Page<Location>(queryCompareLocationDto.getPageNo(), queryCompareLocationDto.getPageSize()); LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); locationLambdaQueryWrapper.select(Location::getWarehouseCode, Location::getCode, Location::getContainerCode, Location::getStatus) .eq(Location::getWarehouseCode, queryCompareLocationDto.getWarehouseCode()) @@ -568,9 +540,9 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i @Override public PageUtil<CompareLocationTaskDto> compareWcsLocationTask(QueryCompareLocationTaskDto queryCompareLocationTaskDto) { List<CompareLocationTaskDto> finalCompareLocationTaskList = new ArrayList<CompareLocationTaskDto>(); - if (queryCompareLocationTaskDto.getLocationCode() == null) { - return PageUtil.create(finalCompareLocationTaskList, queryCompareLocationTaskDto.getPageNo(), queryCompareLocationTaskDto.getPageSize()); - } +// if (queryCompareLocationTaskDto.getLocationCode() == null) { +// return PageUtil.create(finalCompareLocationTaskList, queryCompareLocationTaskDto.getPageNo(), queryCompareLocationTaskDto.getPageSize()); +// } // 只查询近90天的数据 // String queryCreateTime = DateUtil.format(DateUtil.offsetDay(new Date(), -90), DatePattern.NORM_DATE_PATTERN); // 1.获取WMS任务信息 @@ -579,12 +551,14 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i .select(TaskHeader::getId, TaskHeader::getWarehouseCode, TaskHeader::getTaskType, TaskHeader::getFromLocationCode, TaskHeader::getToLocationCode, TaskHeader::getContainerCode, TaskHeader::getStatus, TaskHeader::getCreateTime) .eq(TaskHeader::getWarehouseCode, queryCompareLocationTaskDto.getWarehouseCode()) + .gt(StringUtils.isNotEmpty(queryCompareLocationTaskDto.getTaskCreateTimeBegin()), TaskHeader::getCreateTime, queryCompareLocationTaskDto.getTaskCreateTimeBegin()) + .lt(StringUtils.isNotEmpty(queryCompareLocationTaskDto.getTaskCreateTimeEnd()),TaskHeader::getCreateTime, queryCompareLocationTaskDto.getTaskCreateTimeEnd()); // .ge(TaskHeader::getCreateTime, queryCreateTime) - .and(t -> t.eq(StringUtils.isNotEmpty(queryCompareLocationTaskDto.getLocationCode()), TaskHeader::getFromLocationCode, - queryCompareLocationTaskDto.getLocationCode()).or().eq(StringUtils.isNotEmpty(queryCompareLocationTaskDto.getLocationCode()), - TaskHeader::getToLocationCode, queryCompareLocationTaskDto.getLocationCode())); + if (StringUtils.isNotEmpty(queryCompareLocationTaskDto.getLocationCode())) { + taskHeaderLambdaQueryWrapper.and(t -> t.eq(TaskHeader::getFromLocationCode, queryCompareLocationTaskDto.getLocationCode()).or() + .eq(TaskHeader::getToLocationCode, queryCompareLocationTaskDto.getLocationCode())); + } List<TaskHeader> taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper); - // 2.获取WCS任务信息 String url = addressService.getUrlByParam(QuantityConstant.ADDRESS_WCS_TAKS_INFOS); Map<String, Object> queryParamMap = new HashMap<String, Object>(); @@ -594,6 +568,12 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i if (StringUtils.isNotEmpty(queryCompareLocationTaskDto.getLocationCode())) { queryParamMap.put("location", queryCompareLocationTaskDto.getLocationCode()); } + if (StringUtils.isNotEmpty(queryCompareLocationTaskDto.getTaskCreateTimeBegin())) { + queryParamMap.put("begin", queryCompareLocationTaskDto.getTaskCreateTimeBegin()); + } + if (StringUtils.isNotEmpty(queryCompareLocationTaskDto.getTaskCreateTimeEnd())) { + queryParamMap.put("end", queryCompareLocationTaskDto.getTaskCreateTimeEnd()); + } // queryParamMap.put("begin", queryCreateTime); String jsonStringResult = OkHttpUtils.sendPostByJsonStr(url, JSON.toJSONString(queryParamMap)); WcsResultDto<List<WcsTaskDto>> wcsResult = JSON.parseObject(jsonStringResult, new TypeReference<WcsResultDto<List<WcsTaskDto>>>() {}); @@ -686,8 +666,8 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i finalCompareLocationTaskList.stream().filter(t -> queryCompareLocationTaskDto.getWcsId().equals(t.getWcsId())).collect(Collectors.toList()); } if (queryCompareLocationTaskDto.getConsistencyStatus() != null) { - finalCompareLocationTaskList = finalCompareLocationTaskList.stream().filter(t -> queryCompareLocationTaskDto.getConsistencyStatus().equals(t.getConsistencyStatus())) - .collect(Collectors.toList()); + finalCompareLocationTaskList = finalCompareLocationTaskList.stream() + .filter(t -> queryCompareLocationTaskDto.getConsistencyStatus().equals(t.getConsistencyStatus())).collect(Collectors.toList()); } return PageUtil.create(finalCompareLocationTaskList, queryCompareLocationTaskDto.getPageNo(), queryCompareLocationTaskDto.getPageSize()); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/locationMonitor/controller/LocationMonitorController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/locationMonitor/controller/LocationMonitorController.java index 87cd958..acb9d5d 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/locationMonitor/controller/LocationMonitorController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/locationMonitor/controller/LocationMonitorController.java @@ -51,29 +51,38 @@ public class LocationMonitorController { */ @GetMapping("/getStatus") @ResponseBody - public Result getStatus(String zoneCode, HttpServletRequest req) { + public Result<?> getStatus(String zoneCode, HttpServletRequest req) { LambdaQueryWrapper<Location> queryWrapper = Wrappers.lambdaQuery(); HuahengJwtUtil.setWarehouseCode(queryWrapper, Location.class, req); - queryWrapper.select(Location::getStatus, Location::getContainerCode).eq(Location::getLocationTypeCode, zoneCode); + queryWrapper.select(Location::getCode, Location::getStatus, Location::getContainerCode).eq(Location::getZoneCode, zoneCode); List<Location> locationList = locationService.list(queryWrapper); + List<String> locationCodeList = locationList.stream().map(Location::getCode).collect(Collectors.toList()); + HashMap<String, Integer> map = new HashMap<>(); map.put("location", locationList.size()); // 换stream进行数据拣选速度更快 - List<Location> emptyLocationList = locationList.stream().filter(t -> StringUtils.isEmpty(t.getContainerCode())).collect(Collectors.toList()); + List<Location> emptyLocationList = + locationList.stream().filter(t -> QuantityConstant.STATUS_LOCATION_EMPTY.equals(t.getStatus())).collect(Collectors.toList()); map.put("emptyLocation", emptyLocationList.size()); + // 查询库位上的托盘信息 LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); HuahengJwtUtil.setWarehouseCode(containerLambdaQueryWrapper, Container.class, req); - containerLambdaQueryWrapper.select(Container::getCode, Container::getStatus); + containerLambdaQueryWrapper.select(Container::getCode, Container::getStatus, Container::getFillStatus).in(Container::getLocationCode, locationCodeList); List<Container> containerList = containerService.list(containerLambdaQueryWrapper); - List<String> containerCodeList = - containerList.stream().filter(t -> t.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)).map(Container::getCode).collect(Collectors.toList()); - List<Location> haveEmptyContainLocation = locationList.stream().filter(t -> t.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY) - && StringUtils.isNotEmpty(t.getContainerCode()) && containerCodeList.contains(t.getContainerCode())).collect(Collectors.toList()); + + List<String> containerCodeList = containerList.stream() + .filter( + t -> QuantityConstant.STATUS_CONTAINER_FILL_EMPTY.equals(t.getFillStatus()) || QuantityConstant.STATUS_CONTAINER_FILL_MANY.equals(t.getFillStatus())) + .map(Container::getCode).collect(Collectors.toList()); + List<Location> haveEmptyContainLocation = locationList.stream().filter(t -> containerCodeList.contains(t.getContainerCode())).collect(Collectors.toList()); map.put("haveContainLocation", haveEmptyContainLocation.size()); - List<String> containerCodeList1 = - containerList.stream().filter(t -> t.getStatus().equals(QuantityConstant.STATUS_CONTAINER_SOME)).map(Container::getCode).collect(Collectors.toList()); - List<Location> haveInventoryLocationList = locationList.stream().filter(t -> t.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY) - && StringUtils.isNotEmpty(t.getContainerCode()) && containerCodeList1.contains(t.getContainerCode())).collect(Collectors.toList()); + + List<String> containerCodeList1 = containerList.stream() + .filter( + t -> QuantityConstant.STATUS_CONTAINER_FILL_SOME.equals(t.getFillStatus()) || QuantityConstant.STATUS_CONTAINER_FILL_FULL.equals(t.getFillStatus())) + .map(Container::getCode).collect(Collectors.toList()); + + List<Location> haveInventoryLocationList = locationList.stream().filter(t -> containerCodeList1.contains(t.getContainerCode())).collect(Collectors.toList()); map.put("haveInventoryLocation", haveInventoryLocationList.size()); return Result.ok(map); } @@ -83,16 +92,16 @@ public class LocationMonitorController { */ @PostMapping("/getLocationInfo") @ResponseBody - public Result getLocationInfo(String type, String row, String line, String layer, String grid, HttpServletRequest req) { - if (StringUtils.isEmpty(type)) { - return Result.error("type不能为空"); + public Result<?> getLocationInfo(String zoneCode, String row, String line, String layer, String grid, HttpServletRequest req) { + if (StringUtils.isEmpty(zoneCode)) { + return Result.error("zoneCode 不能为空"); } /* 查询库位信息 */ LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); HuahengJwtUtil.setWarehouseCode(locationLambdaQueryWrapper, Location.class, req); locationLambdaQueryWrapper.eq(StringUtils.isNotEmpty(row), Location::getRow, row).eq(StringUtils.isNotEmpty(line), Location::getIcolumn, line) .eq(StringUtils.isNotEmpty(layer), Location::getLayer, layer).eq(StringUtils.isNotEmpty(grid), Location::getGrid, grid) - .eq(StringUtils.isNotEmpty(type), Location::getLocationTypeCode, type); + .eq(StringUtils.isNotEmpty(zoneCode), Location::getZoneCode, zoneCode); List<Location> locations = locationService.list(locationLambdaQueryWrapper); List<Location> locationList = new ArrayList<>(); @@ -103,7 +112,6 @@ public class LocationMonitorController { for (Location location1 : locations) { InventoryDetail inventoryDetail = null; - String materialName = null; for (InventoryDetail inventoryDetail2 : inventoryDetailList) { if (location1.getCode().equals(inventoryDetail2.getLocationCode())) { inventoryDetail = inventoryDetail2; @@ -160,12 +168,12 @@ public class LocationMonitorController { */ @PostMapping("/getAllLocation") @ResponseBody - public Result getAllLocation(@RequestParam(name = "type") String type, HttpServletRequest req) { - if (StringUtils.isEmpty(type)) { - return Result.error("type不能为空"); + public Result<?> getAllLocation(@RequestParam(name = "zoneCode") String zoneCode, HttpServletRequest req) { + if (StringUtils.isEmpty(zoneCode)) { + return Result.error("zoneCode 不能为空"); } Location location = new Location(); - location.setLocationTypeCode(type); + location.setZoneCode(zoneCode); HuahengJwtUtil.setWarehouseCode(req, location); return Result.ok(locationService.getAllLocation(location)); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/entity/Zone.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/entity/Zone.java index 3f93318..2c073a2 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/entity/Zone.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/entity/Zone.java @@ -2,9 +2,12 @@ package org.jeecg.modules.wms.config.zone.entity; import java.io.Serializable; import java.io.UnsupportedEncodingException; +import java.util.Arrays; import java.util.Date; +import java.util.List; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -35,46 +38,68 @@ public class Zone implements Serializable { @TableId(type = IdType.AUTO) @ApiModelProperty(value = "主键") private Integer id; + /** 编码 */ @Excel(name = "编码", width = 15) @ApiModelProperty(value = "编码") private String code; + /** 名称 */ @Excel(name = "名称", width = 15) @ApiModelProperty(value = "名称") private String name; + /** 仓库编码 */ @Excel(name = "仓库编码", width = 15) @ApiModelProperty(value = "仓库编码") private String warehouseCode; + /** 货主编码 */ @Excel(name = "货主编码", width = 15) @ApiModelProperty(value = "货主编码") private String companyCode; + /** 库位类型 */ @Excel(name = "库位类型", width = 15) @ApiModelProperty(value = "库位类型") private String locationTypeCode; + + public void setLocationTypeCode(String locationTypeCode) { + if (locationTypeCode != null) { + this.locationTypeCode = locationTypeCode; + this.locationTypeCodes = Arrays.asList(locationTypeCode.split(",")); + } + } + + @TableField(exist = false) + private List<String> locationTypeCodes; + /** 创建人 */ @ApiModelProperty(value = "创建人") private String createBy; + /** 创建日期 */ @ApiModelProperty(value = "创建日期") private Date createTime; + /** 更新人 */ @ApiModelProperty(value = "更新人") private String updateBy; + /** 更新日期 */ @ApiModelProperty(value = "更新日期") private Date updateTime; + /** 自定义字段1 */ @Excel(name = "自定义字段1", width = 15) @ApiModelProperty(value = "自定义字段1") private String userdef1; + /** 自定义字段2 */ @Excel(name = "自定义字段2", width = 15) @ApiModelProperty(value = "自定义字段2") private String userdef2; + /** 自定义字段3 */ @Excel(name = "自定义字段3", width = 15) @ApiModelProperty(value = "自定义字段3") diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/TestController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/TestController.java index 44eeee4..aa39b51 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/TestController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/TestController.java @@ -102,7 +102,7 @@ public class TestController extends HuahengBaseController { // @Override // @Transactional(timeout = 10) // public Result<?> doProcess() throws Exception { -// LambdaUpdateWrapper<SysDataLog> updateWrapper = new UpdateWrapper().lambda(); +// LambdaUpdateWrapper<SysDataLog> updateWrapper = Wrappers.lambdaUpdate(); // updateWrapper.set(SysDataLog::getUpdateTime, new Date()); // updateWrapper.eq(SysDataLog::getId, 10); // Thread.sleep(1000); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryDetail/controller/InventoryDetailController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryDetail/controller/InventoryDetailController.java index 20d0424..dd5d4c9 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryDetail/controller/InventoryDetailController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryDetail/controller/InventoryDetailController.java @@ -11,6 +11,7 @@ import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; +import org.jeecg.utils.HuahengJwtUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -50,10 +51,10 @@ public class InventoryDetailController extends JeecgController<InventoryDetail, @GetMapping(value = "/list") public Result<IPage<InventoryDetail>> queryPageList(InventoryDetail inventoryDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { + HuahengJwtUtil.setWarehouseCode(req, inventoryDetail); QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, req.getParameterMap()); Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); - IPage<InventoryDetail> pageList = inventoryDetailService.page(page, queryWrapper); - return Result.OK(pageList); + return Result.OK(inventoryDetailService.queryPage(page, queryWrapper)); } /** diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/controller/InventoryHeaderController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/controller/InventoryHeaderController.java index 4ea1919..3b1e302 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/controller/InventoryHeaderController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/controller/InventoryHeaderController.java @@ -22,7 +22,6 @@ import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; import org.jeecg.utils.HuahengJwtUtil; -import org.jeecg.utils.StringUtils; import org.jeecg.utils.constant.QuantityConstant; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; @@ -30,7 +29,15 @@ import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ImportParams; import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.servlet.ModelAndView; @@ -167,11 +174,11 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, @GetMapping(value = "/listInventoryDetailByMainId") public Result<IPage<InventoryDetail>> listInventoryDetailByMainId(InventoryDetail inventoryDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, req.getParameterMap()); + HttpServletRequest request) { + HuahengJwtUtil.setWarehouseCode(request, inventoryDetail); + QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, request.getParameterMap()); Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); - IPage<InventoryDetail> pageList = inventoryDetailService.page(page, queryWrapper); - return Result.OK(pageList); + return Result.OK(inventoryDetailService.queryPage(page, queryWrapper)); } /** @@ -261,7 +268,7 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, } /** - * 有货非锁定列表查询 + * 非锁定列表查询 * @param inventoryHeader * @param pageNo * @param pageSize @@ -269,12 +276,12 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, * @return */ // @AutoLog(value = "库存表-分页列表查询") - @ApiOperation(value = "库存表-有货非锁定列表查询", notes = "库存表-有货非锁定列表查询") + @ApiOperation(value = "库存表-非锁定列表查询", notes = "库存表-非锁定列表查询") @GetMapping(value = "/freeList") public Result<IPage<InventoryHeader>> freeList(InventoryHeader inventoryHeader, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { QueryWrapper<InventoryHeader> queryWrapper = QueryGenerator.initQueryWrapper(inventoryHeader, req.getParameterMap()); - queryWrapper.eq("container_status", QuantityConstant.STATUS_CONTAINER_SOME); + queryWrapper.eq("container_status", QuantityConstant.STATUS_CONTAINER_EMPTY); Page<InventoryHeader> page = new Page<InventoryHeader>(pageNo, pageSize); IPage<InventoryHeader> pageList = inventoryHeaderService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/entity/InventoryDetail.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/entity/InventoryDetail.java index 745c4e1..3c1dad5 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/entity/InventoryDetail.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/entity/InventoryDetail.java @@ -7,6 +7,7 @@ import org.jeecg.common.aspect.annotation.Dict; import org.jeecgframework.poi.excel.annotation.Excel; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -82,6 +83,10 @@ public class InventoryDetail implements Serializable { @Excel(name = "任务锁定数量", width = 15) @ApiModelProperty(value = "任务锁定数量") private java.math.BigDecimal taskQty; + /** 托盘填充度 */ + @ApiModelProperty(value = "托盘填充度") + @TableField(exist = false) + private java.math.BigDecimal fillDensity; /** 库存状态 */ @Excel(name = "库存状态", width = 15) @Dict(dicCode = "inventory_status") diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryDetailService.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryDetailService.java index f8c59b3..0d5e80d 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryDetailService.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryDetailService.java @@ -3,8 +3,13 @@ package org.jeecg.modules.wms.inventory.inventoryHeader.service; import java.math.BigDecimal; import java.util.List; +import javax.servlet.http.HttpServletRequest; + import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; /** @@ -26,4 +31,14 @@ public interface IInventoryDetailService extends IService<InventoryDetail> { // 求一种物料的可出库存之和 BigDecimal getAvailSumQty(InventoryDetail inventoryDetail); + + /** + * 分页查询库存明细,组装容器填充度 + * @author TanYibin + * @createDate 2023年4月7日 + * @param page + * @param queryWrapper + * @return + */ + IPage<InventoryDetail> queryPage(Page<InventoryDetail> page, QueryWrapper<InventoryDetail> queryWrapper); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java index 28b58d6..210e341 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java @@ -1,17 +1,36 @@ package org.jeecg.modules.wms.inventory.inventoryHeader.service.impl; import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Function; +import java.util.stream.Collectors; +import javax.servlet.http.HttpServletRequest; + +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.wms.config.container.entity.Container; +import org.jeecg.modules.wms.config.container.service.IContainerService; +import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; +import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; +import org.jeecg.modules.wms.config.location.entity.Location; +import org.jeecg.modules.wms.config.material.entity.Material; import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryDetailMapper; import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; import org.jeecg.utils.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.RequestParam; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** @@ -26,6 +45,12 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe @Autowired private InventoryDetailMapper inventoryDetailMapper; + @Autowired + private IContainerService containerService; + + @Autowired + private IContainerCapacityService containerCapacityService; + @Override public List<InventoryDetail> selectByMainId(String mainId) { return inventoryDetailMapper.selectByMainId(mainId); @@ -82,4 +107,44 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe BigDecimal totalQty = inventoryDetailList.stream().map(InventoryDetail::getQty).reduce(BigDecimal.ZERO, BigDecimal::add); return totalQty; } + + @Override + public IPage<InventoryDetail> queryPage(Page<InventoryDetail> page, QueryWrapper<InventoryDetail> queryWrapper) { + IPage<InventoryDetail> pageResult = this.page(page, queryWrapper); + List<InventoryDetail> inventoryDetailList = pageResult.getRecords(); + if (!CollectionUtils.isEmpty(inventoryDetailList)) { + this.calculateFillDensity(inventoryDetailList); + } + return pageResult; + } + + /** + * 计算库存明细托盘填充度 + * @author TanYibin + * @createDate 2023年4月7日 + * @param inventoryDetailList + */ + private void calculateFillDensity(List<InventoryDetail> inventoryDetailList) { + // 根据仓库编码分组库存明细 + Map<String, List<InventoryDetail>> warehouseInventoryDetailMap = + inventoryDetailList.stream().collect(Collectors.groupingBy(InventoryDetail::getWarehouseCode)); + for (String warehouseCode : warehouseInventoryDetailMap.keySet()) { + List<InventoryDetail> warehouseInventoryDetailList = warehouseInventoryDetailMap.get(warehouseCode); + List<String> containerCodeList = warehouseInventoryDetailList.stream().filter(t -> StringUtils.isNotEmpty(t.getContainerCode())) + .map(t -> t.getContainerCode()).collect(Collectors.toList()); + // 获取 容器信息 + List<Container> containerList = containerService.getContainerListByCodeList(containerCodeList, warehouseCode); + Map<String, Container> containerMap = containerList.stream().collect(Collectors.toMap(Container::getCode, Function.identity(), (key1, key2) -> key2)); + for (InventoryDetail inventoryDetail : warehouseInventoryDetailList) { + Container container = containerMap.get(inventoryDetail.getContainerCode()); + ContainerCapacity containerCapacity = + containerCapacityService.queryOne(warehouseCode, container.getContainerTypeCode(), inventoryDetail.getMaterialCode()); + if (containerCapacity != null && containerCapacity.getQty() != null && containerCapacity.getQty().compareTo(BigDecimal.ZERO) > 0) { + // 进行填充度计算 保留2位小数 + BigDecimal fillDensity = inventoryDetail.getQty().divide(containerCapacity.getQty(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + inventoryDetail.setFillDensity(fillDensity); + } + } + } + } } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/controller/ApkInfoController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/controller/ApkInfoController.java new file mode 100644 index 0000000..76d9a2d --- /dev/null +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/controller/ApkInfoController.java @@ -0,0 +1,216 @@ +package org.jeecg.modules.wms.monitor.apkinfo.controller; + +import java.io.File; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import net.dongliu.apk.parser.ApkFile; +import net.dongliu.apk.parser.bean.ApkMeta; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.IPUtils; +import org.jeecg.common.util.MD5Util; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; +import org.jeecg.modules.wms.monitor.apkinfo.service.IApkInfoService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: apk_info + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +@Api(tags="apk_info") +@RestController +@RequestMapping("/monitor/apkinfo") +@Slf4j +public class ApkInfoController extends JeecgController<ApkInfo, IApkInfoService> { + + @Value(value = "${jeecg.path.upload}") + private String uploadpath; + + @Value(value = "${server.servlet.context-path}") + private String ctx; + + @Autowired + private IApkInfoService apkInfoService; + + /** + * 分页列表查询 + * + * @param apkInfo + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "apk_info-分页列表查询") + @ApiOperation(value="apk_info-分页列表查询", notes="apk_info-分页列表查询") + @GetMapping(value = "/list") + public Result<IPage<ApkInfo>> queryPageList(ApkInfo apkInfo, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper<ApkInfo> queryWrapper = QueryGenerator.initQueryWrapper(apkInfo, req.getParameterMap()); + queryWrapper.orderByDesc("id"); + Page<ApkInfo> page = new Page<ApkInfo>(pageNo, pageSize); + IPage<ApkInfo> pageList = apkInfoService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param apkInfo + * @return + */ + @AutoLog(value = "apk_info-添加") + @ApiOperation(value="apk_info-添加", notes="apk_info-添加") + @PostMapping(value = "/add") + public Result<String> add(@RequestBody ApkInfo apkInfo) { + apkInfoService.save(apkInfo); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param apkInfo + * @return + */ + @AutoLog(value = "apk_info-编辑") + @ApiOperation(value="apk_info-编辑", notes="apk_info-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result<String> edit(@RequestBody ApkInfo apkInfo) { + apkInfoService.updateById(apkInfo); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "apk_info-通过id删除") + @ApiOperation(value="apk_info-通过id删除", notes="apk_info-通过id删除") + @DeleteMapping(value = "/delete") + public Result<String> delete(@RequestParam(name="id",required=true) String id) { + apkInfoService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "apk_info-批量删除") + @ApiOperation(value="apk_info-批量删除", notes="apk_info-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.apkInfoService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "apk_info-通过id查询") + @ApiOperation(value="apk_info-通过id查询", notes="apk_info-通过id查询") + @GetMapping(value = "/queryById") + public Result<ApkInfo> queryById(@RequestParam(name="id",required=true) String id) { + ApkInfo apkInfo = apkInfoService.getById(id); + if(apkInfo==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(apkInfo); + } + + @ApiOperation(value="解析apk", notes="解析apk") + @GetMapping(value = "/parseApk") + public Result<ApkInfo> parseApk(@RequestParam(name="filename",required=true) String filename) { + try { + File file = new File(uploadpath + File.separator + filename); + String md5 = MD5Util.MD5Encode(filename, "utf-8"); + ApkFile apkFile = new ApkFile(file.getAbsoluteFile()); + ApkMeta apkMeta = apkFile.getApkMeta(); + + LambdaQueryWrapper<ApkInfo> query = Wrappers.lambdaQuery(); + query.eq(ApkInfo::getPkgname, apkMeta.getPackageName()) + .eq(ApkInfo::getVersioncode, apkMeta.getVersionCode()); + + ApkInfo apkinfo = apkInfoService.getOne(query); + + apkinfo.setUrl("/sys/common/static/" + filename); + apkinfo.setPkgname(apkMeta.getPackageName()); + apkinfo.setVersioncode(apkMeta.getVersionCode().intValue()); + apkinfo.setVersionname(apkMeta.getVersionName()); + apkinfo.setMd5(md5); + apkInfoService.saveOrUpdate(apkinfo); + + return Result.OK(apkinfo); + }catch (Exception e){ + return Result.error(e.getMessage()); + } + } + + /** + * 导出excel + * + * @param request + * @param apkInfo + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ApkInfo apkInfo) { + return super.exportXls(request, apkInfo, ApkInfo.class, "apk_info"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ApkInfo.class); + } + +} diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/entity/ApkInfo.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/entity/ApkInfo.java new file mode 100644 index 0000000..b317d9e --- /dev/null +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/entity/ApkInfo.java @@ -0,0 +1,70 @@ +package org.jeecg.modules.wms.monitor.apkinfo.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: apk_info + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +@Data +@TableName("apk_info") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="apk_info对象", description="apk_info") +public class ApkInfo implements Serializable { + private static final long serialVersionUID = 1L; + + /**id*/ + @TableId(type = IdType.AUTO) + @ApiModelProperty(value = "id") + private java.lang.Integer id; + /**应用名称*/ + @Excel(name = "应用名称", width = 15) + @ApiModelProperty(value = "应用名称") + private java.lang.String pkgname; + /**版本号*/ + @Excel(name = "版本号", width = 15) + @ApiModelProperty(value = "版本号") + private java.lang.Integer versioncode; + /**版本名称*/ + @Excel(name = "版本名称", width = 15) + @ApiModelProperty(value = "版本名称") + private java.lang.String versionname; + /**下载地址*/ + @Excel(name = "下载地址", width = 15) + @ApiModelProperty(value = "下载地址") + private java.lang.String url; + /**md5校验码*/ + @Excel(name = "md5校验码", width = 15) + @ApiModelProperty(value = "md5校验码") + private java.lang.String md5; + /** 创建人 */ + @ApiModelProperty(value = "创建人") + private String createBy; + /** 创建日期 */ + @ApiModelProperty(value = "创建日期") + private Date createTime; + /** 更新人 */ + @ApiModelProperty(value = "更新人") + private String updateBy; + /** 更新日期 */ + @ApiModelProperty(value = "更新日期") + private Date updateTime; +} diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/mapper/ApkInfoMapper.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/mapper/ApkInfoMapper.java new file mode 100644 index 0000000..0a4a481 --- /dev/null +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/mapper/ApkInfoMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.wms.monitor.apkinfo.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: apk_info + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +public interface ApkInfoMapper extends BaseMapper<ApkInfo> { + +} diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/mapper/xml/ApkInfoMapper.xml b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/mapper/xml/ApkInfoMapper.xml new file mode 100644 index 0000000..f7bc50e --- /dev/null +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/mapper/xml/ApkInfoMapper.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="org.jeecg.modules.wms.monitor.apkinfo.mapper.ApkInfoMapper"> + +</mapper> \ No newline at end of file diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/service/IApkInfoService.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/service/IApkInfoService.java new file mode 100644 index 0000000..8f70ed1 --- /dev/null +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/service/IApkInfoService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.wms.monitor.apkinfo.service; + +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: apk_info + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +public interface IApkInfoService extends IService<ApkInfo> { + +} diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/service/impl/ApkInfoServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/service/impl/ApkInfoServiceImpl.java new file mode 100644 index 0000000..97e4075 --- /dev/null +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/service/impl/ApkInfoServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.wms.monitor.apkinfo.service.impl; + +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; +import org.jeecg.modules.wms.monitor.apkinfo.mapper.ApkInfoMapper; +import org.jeecg.modules.wms.monitor.apkinfo.service.IApkInfoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: apk_info + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +@Service +public class ApkInfoServiceImpl extends ServiceImpl<ApkInfoMapper, ApkInfo> implements IApkInfoService { + +} diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/entity/ReceiptContainerHeader.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/entity/ReceiptContainerHeader.java index f3bc142..b5267ce 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/entity/ReceiptContainerHeader.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/entity/ReceiptContainerHeader.java @@ -4,6 +4,7 @@ import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import org.jeecgframework.poi.excel.annotation.Excel; @@ -68,6 +69,10 @@ public class ReceiptContainerHeader implements Serializable { @Excel(name = "目标出入口", width = 15) @ApiModelProperty(value = "目标出入口") private String toPort; + /** 物料填充状态 */ + @ApiModelProperty(value = "物料填充状态") + @TableField(exist = false) + private String containerFillStatus; /** 备用字段1 */ @Excel(name = "备用字段1", width = 15) @ApiModelProperty(value = "备用字段1") diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java index a083d81..239edf5 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java @@ -127,8 +127,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai String fromLocationCode = receiptContainerHeader.getFromLocationCode(); String toLocaitonCode = receiptContainerHeader.getToLocationCode(); if (StringUtils.isNotEmpty(fromLocationCode)) { - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, - warehouseCode); + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("更新起始库位状态失败"); } @@ -136,8 +135,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai String zoneCode = null; if (StringUtils.isNotEmpty(toLocaitonCode)) { if (!toLocaitonCode.equals(fromLocationCode)) { - success = locationService.updateStatusByOriginStatus(toLocaitonCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, - warehouseCode); + success = locationService.updateStatus(toLocaitonCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("更新目标库位状态失败"); } @@ -161,8 +159,13 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai if (!success) { throw new JeecgBootException("更新入库组盘头状态失败"); } + String containerFillStatus = QuantityConstant.STATUS_CONTAINER_FILL_SOME; + if (!StringUtils.isEmpty(receiptContainerHeader.getContainerFillStatus())) { + containerFillStatus = receiptContainerHeader.getContainerFillStatus(); + } TaskHeader taskHeader = new TaskHeader(); taskHeader.setContainerCode(containerCode); + taskHeader.setContainerFillStatus(containerFillStatus); taskHeader.setTaskType(receiptContainerHeader.getTaskType()); taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_RECEIPT); taskHeader.setFromLocationCode(fromLocationCode); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/controller/ReceiveController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/controller/ReceiveController.java index 1249e4b..33d462b 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/controller/ReceiveController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/controller/ReceiveController.java @@ -42,7 +42,6 @@ public class ReceiveController { * 通过详情ID查询 * @return */ - @AutoLog("入库单详情-通过详情ID查询") @ApiOperation(value = "入库单详情-通过详情ID查询", notes = "入库单详情-通过详情ID查询") @PostMapping("/listReceiveByReceiptId") @ResponseBody @@ -55,7 +54,7 @@ public class ReceiveController { receive.setId(receiptDetail.getId()); receive.setMaterialCode(receiptDetail.getMaterialCode()); receive.setMaterialName(receiptDetail.getMaterialName()); - receive.setMateiralSpec(receiptDetail.getMaterialSpec()); + receive.setMaterialSpec(receiptDetail.getMaterialSpec()); receive.setMaterialUnit(receiptDetail.getMaterialUnit()); receive.setInventoryStatus(receiptDetail.getInventoryStatus()); receive.setBatch(receiptDetail.getBatch()); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/domain/Receive.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/domain/Receive.java index 3a11474..d9f20df 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/domain/Receive.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/domain/Receive.java @@ -2,20 +2,35 @@ package org.jeecg.modules.wms.receipt.receiving.domain; import lombok.Data; +import java.io.Serializable; import java.math.BigDecimal; +import org.jeecg.common.aspect.annotation.Dict; + @Data -public class Receive { +public class Receive implements Serializable { + private static final long serialVersionUID = 1L; private Integer id;// 入库详情ID + private String containerCode; // 托盘号 + private String uniqueCode;// 唯一号 + private String materialCode; + private String materialName; - private String mateiralSpec; + + private String materialSpec; + private String materialUnit; + + @Dict(dicCode = "inventory_status") private String inventoryStatus; + private String batch; + private BigDecimal qty; // 可收数量 + private BigDecimal taskQty; // 实收数量 } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java index d5a8fb8..fc74450 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java @@ -30,6 +30,7 @@ import org.jeecg.utils.StringUtils; import org.jeecg.utils.constant.QuantityConstant; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import com.alibaba.fastjson.JSON; import org.jeecg.common.exception.JeecgBootException; @@ -48,18 +49,25 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl @Resource private IReceiptDetailService receiptDetailService; + @Resource private IContainerService containerService; + @Resource private IMaterialService materialService; + @Resource private IReceiptContainerHeaderService receiptContainerHeaderService; + @Resource private IContainerTypeService containerTypeService; + @Resource private IReceiptContainerDetailService receiptContainerDetailService; + @Resource private IReceiptHeaderService receiptHeaderService; + @Resource private IParameterConfigurationService parameterConfigurationService; @@ -108,10 +116,11 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl } String containerStatus = container.getStatus(); if (containerStatus.equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { - return Result.error("容器被锁定,不能用于收货"); + return Result.error("容器被锁定,不能用于收货"); } - if (containerStatus.equals(QuantityConstant.STATUS_CONTAINER_FULL)) { - return Result.error("容器已经是满盘,不能用于收货"); + String containerFillStatus = container.getFillStatus(); + if (!StringUtils.isEmpty(containerFillStatus) && containerFillStatus.equals(QuantityConstant.STATUS_CONTAINER_FILL_FULL)) { + return Result.error("容器已经是满盘,不能用于收货"); } String containerTypeCode = container.getContainerTypeCode(); if (StringUtils.isEmpty(containerTypeCode)) { @@ -121,15 +130,10 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl if (containerType == null) { return Result.error("容器类型为空"); } - BigDecimal sumQty = receiveList.stream().map(Receive::getTaskQty).reduce(BigDecimal.ZERO, BigDecimal::add); - if (sumQty.compareTo(BigDecimal.ZERO) <= 0) { - return Result.error("总的收货数量必须大于0"); - } int taskType = QuantityConstant.TASK_TYPE_WHOLERECEIPT; String fromLocationCode = container.getLocationCode(); if (StringUtils.isNotEmpty(fromLocationCode)) { taskType = QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT; - } ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getUnCompleteReceiptContainerByCode(containerCode, warehouseCode); if (receiptContainerHeader != null) { @@ -156,7 +160,6 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl throw new JeecgBootException("保存入库组盘头失败"); } } - List<ReceiptDetail> receiptDetailList = new ArrayList<>(); List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>(); for (Receive receive : receiveList) { @@ -165,24 +168,25 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl // 收货数量 BigDecimal taskQty = receive.getTaskQty(); if (qty == null || taskQty == null) { - throw new JeecgBootException("收货数量或可收数量为空"); + throw new JeecgBootException("物料编码:" + receive.getMaterialCode() + " 收货数量或可收数量为空"); } if (taskQty.compareTo(qty) > 0) { - throw new JeecgBootException("收货数量不能大于可收数量,收货数量:" + taskQty + "可收数量:" + qty); + throw new JeecgBootException("物料编码:" + receive.getMaterialCode() + " 收货数量不能大于可收数量,收货数量:" + taskQty + "可收数量:" + qty); } + // 入库单明细为0 跳过组盘 if (taskQty.compareTo(BigDecimal.ZERO) <= 0) { continue; } ReceiptDetail receiptDetail = receiptDetailService.getById(receive.getId()); if (receiptDetail == null) { - throw new JeecgBootException("没有找到入库单详情,id:" + receive.getId()); + throw new JeecgBootException("没有找到入库单详情ID:" + receive.getId()); } ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId()); if (receiptHeader == null) { - throw new JeecgBootException("没有找到入库单,id:" + receiptDetail.getReceiptId()); + throw new JeecgBootException("没有找到入库单ID:" + receiptDetail.getReceiptId()); } if (!receiptHeader.getWarehouseCode().equals(warehouseCode)) { - throw new JeecgBootException("仓库编码不一致,不能操作"); + throw new JeecgBootException("入库单操作仓库错误,请选择 " + receiptHeader.getWarehouseCode() + " 操作"); } String materialCode = receiptDetail.getMaterialCode(); if (StringUtils.isEmpty(materialCode)) { @@ -196,7 +200,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl BigDecimal receiptTaskQty = receiptDetail.getTaskQty(); receiptTaskQty = receiptTaskQty.add(taskQty); if (receiptTaskQty.compareTo(receiptQty) > 0) { - throw new JeecgBootException("收货数量必须小于单据数量"); + throw new JeecgBootException("收货数量不能大于单据数量"); } receiptDetail.setTaskQty(receiptTaskQty); receiptDetailList.add(receiptDetail); @@ -233,12 +237,13 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl receiptContainerDetailList.add(receiptContainerDetail); } } - + if (CollectionUtils.isEmpty(receiptDetailList)) { + throw new JeecgBootException("请填入收货数量"); + } result = receiptDetailService.updateBatchById(receiptDetailList); if (!result) { throw new JeecgBootException("批量更新入库单详情失败"); } - if (receiptContainerDetailList.size() > 0) { result = receiptContainerDetailService.saveBatch(receiptContainerDetailList); if (!result) { diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java index 72f7fcd..07ebbe0 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java @@ -255,7 +255,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi return Result.error("配盘时, 没有找到容器, 编码" + containerCode); } if (container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { - return Result.error("配盘时, 托盘已经锁定,不能再组盘"); + return Result.error("配盘时, 容器已经锁定,不能再组盘"); } BigDecimal shipmentDetailQty = shipmentDetail.getQty(); BigDecimal shipmentDetailTaskQty = shipmentDetail.getTaskQty(); @@ -470,13 +470,11 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi if (container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { return Result.error("生成出库任务时, 托盘已经锁定" + containerCode); } - container.setStatus(QuantityConstant.STATUS_CONTAINER_LOCK); - boolean success = containerService.updateById(container); + boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("生成出库任务时, 更新容器失败" + containerCode); } - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, - warehouseCode); + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("生成出库任务时, 更新库位失败" + fromLocationCode); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java index e521da6..2b9ef67 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java @@ -223,8 +223,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap } // 生成任务同时锁定库位 - boolean success = locationService.updateStatusByOriginStatus(location.getCode(), QuantityConstant.STATUS_LOCATION_LOCK, - QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); + boolean success = locationService.updateStatus(location.getCode(), QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("更新库位状态失败"); } @@ -313,11 +312,10 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap // lambdaQueryWrapper.eq(InventoryDetail::getContainerCode,task.getContainerCode()); // List<InventoryDetail> inventoryDetails = inventoryDetailService.list(lambdaQueryWrapper); - Result result = new Result(); - result.setResult(cycleCountHeader.getId()); + Result<Integer> result = new Result<Integer>(); result.setCode(200); result.setMessage("盘点任务生成成功"); - + result.setResult(cycleCountHeader.getId()); return result; } @@ -359,11 +357,10 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap cycleCountDetailChild.setCountedQty(countedQty); cycleCountDetailChildServiceImpl.save(cycleCountDetailChild); - Result result = new Result(); + Result<Integer> result = new Result<Integer>(); result.setCode(200); result.setMessage("成功"); result.setResult(cycleCountDetail.getCycleCountHeadId()); - return result; } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java index 4a73a54..eccb092 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java @@ -167,12 +167,13 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl if (container == null) { throw new JeecgBootException("取消AGV任务。 根据容器号没有找到容器"); } - String containerStatus = QuantityConstant.STATUS_CONTAINER_EMPTY; - List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); - if (inventoryDetailList.size() != 0) { - containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; - } - success = containerService.updateStatusByOriginStatus(containerCode, containerStatus, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); + // 2023-04-11 托盘状态与填充状态分离 +// String containerStatus = QuantityConstant.STATUS_CONTAINER_EMPTY; +// List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); +// if (inventoryDetailList.size() != 0) { +// containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; +// } + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("取消AGV任务。 更新容器状态失败"); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java index 1c672ee..6d2a2ad 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java @@ -102,7 +102,6 @@ public class TaskHeaderController extends HuahengBaseController { @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { HuahengJwtUtil.setWarehouseCode(req, taskHeader); QueryWrapper<TaskHeader> queryWrapper = QueryGenerator.initQueryWrapper(taskHeader, req.getParameterMap()); - queryWrapper.orderByDesc("id"); Page<TaskHeader> page = new Page<TaskHeader>(pageNo, pageSize); IPage<TaskHeader> pageList = taskHeaderService.page(page, queryWrapper); return Result.OK(pageList); @@ -387,7 +386,6 @@ public class TaskHeaderController extends HuahengBaseController { if (taskHeader == null) { return Result.error("taskHeader不能为空"); } - Integer taskId = taskHeader.getId(); Result result = huahengMultiHandlerService.sendTaskToWcs(taskHeader); return result; } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java index 226c0e3..588ebf3 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java @@ -9,6 +9,7 @@ import org.jeecg.common.aspect.annotation.Dict; import org.jeecgframework.poi.excel.annotation.Excel; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -62,6 +63,10 @@ public class TaskHeader implements Serializable { @Dict(dicCode = "task_type") @ApiModelProperty(value = "任务类型") private Integer taskType; + /** 容器填充状态 */ + @Excel(name = "容器填充状态", width = 15) + @ApiModelProperty(value = "容器填充状态") + private String containerFillStatus; /** 内部任务类型 */ @Excel(name = "内部任务类型", width = 15) @ApiModelProperty(value = "内部任务类型") diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java index ed776c8..4efe245 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java @@ -246,20 +246,21 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea return Result.error("创建移库任务时,目标库位和源库位不在同一个区域"); } - // 2. 记住移库前的容器类型,因为空托盘组无法区分 - Container container = containerService.getContainerByCode(fromLocation.getContainerCode(), warehouseCode); - container.setLastStatus(container.getStatus()); - boolean success = containerService.updateById(container); - if (!success) { - throw new JeecgBootException("创建移库任务时,更新容器状态失败,容器号" + fromLocation.getContainerCode()); - } + // 2023-04-11 托盘状态与填充状态分离 无需再更新字段 +// // 2. 记住移库前的容器类型,因为空托盘组无法区分 +// Container container = containerService.getContainerByCode(fromLocation.getContainerCode(), warehouseCode); +// container.setLastStatus(container.getStatus()); +// boolean success = containerService.updateById(container); +// if (!success) { +// throw new JeecgBootException("创建移库任务时,更新容器状态失败,容器号" + fromLocation.getContainerCode()); +// } // 3. 判断源库位旁边有托盘但是没有任务,那么不允许移库 if (fromLocation.getRowFlag() == QuantityConstant.ROW_OUT) { // 内侧库位 - Location location1 = locationService.getNear(fromLocation); - String locationCode = location1.getCode(); - if (StringUtils.isNotEmpty(location1.getContainerCode())) { + Location location = locationService.getNear(fromLocation); + String locationCode = location.getCode(); + if (StringUtils.isNotEmpty(location.getContainerCode())) { TaskHeader taskHeader = getUnCompleteTaskByFromLocationCode(fromLocationCode, warehouseCode); if (taskHeader != null) { preTaskNo = taskHeader.getId(); @@ -285,18 +286,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea taskHeader.setToLocationCode(toLocationCode); taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); taskHeader.setPreTaskNo(preTaskNo); - success = taskHeaderService.save(taskHeader); + boolean success = taskHeaderService.save(taskHeader); if (!success) { throw new JeecgBootException("创建移库任务时,创建任务失败"); } - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, - warehouseCode); + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("创建移库任务时, 起始库位" + fromLocationCode + "更新失败"); } - success = - locationService.updateStatusByOriginStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); + success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("创建移库任务时, 终点库位" + toLocationCode + "更新失败"); } @@ -353,8 +352,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea throw new JeecgBootException("创建出库查看任务时,更新库存详情失败"); } } - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, - warehouseCode); + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("创建出库查看任务时,更新库位状态失败"); } @@ -403,6 +401,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea return Result.error("创建跨站任务时,容器为空"); } if (!container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)) { + return Result.error("创建跨站任务时, 容器状态不为空闲状态"); + } + if (!container.getFillStatus().equals(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY)) { return Result.error("创建跨站任务时,容器状态不为空托盘"); } Port fromPort = portService.getPortByCode(fromPortCode, warehouseCode); @@ -516,7 +517,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea return Result.error("创建空托盘组入库任务时, 容器已在库位" + container.getLocationCode() + "上"); } if (!container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)) { - return Result.error("创建空托盘组入库任务时,容器状态不为空容器"); + return Result.error("创建空托盘组入库任务时,容器状态不为空闲状态"); + } + if (!container.getFillStatus().equals(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY)) { + return Result.error("创建空托盘组入库任务时,容器状态不为空托盘"); } boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); if (!success) { @@ -530,8 +534,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!toLocation.getStatus().equals(QuantityConstant.STATUS_LOCATION_EMPTY)) { return Result.error("创建空托盘组入库任务时,目标库位状态不是空闲"); } - success = locationService.updateStatusByOriginStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, - warehouseCode); + success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("创建空托盘组入库任务时, 更新库位状态失败"); } @@ -568,8 +571,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (container == null) { return Result.error("创建空托盘组出库任务时, 没有找到容器:" + containerCode); } - if (!QuantityConstant.STATUS_CONTAINER_MANY.equals(container.getStatus())) { - return Result.error("创建空托盘组出库任务时, 容器状态不为空托盘组状态"); + if (!QuantityConstant.STATUS_CONTAINER_EMPTY.equals(container.getStatus())) { + return Result.error("创建空托盘组出库任务时, 容器状态不为空闲状态"); + } + if (!QuantityConstant.STATUS_CONTAINER_FILL_MANY.equals(container.getFillStatus())) { + return Result.error("创建空托盘组出库任务时, 容器填充状态不为空托盘组状态"); } String fromLocationCode = container.getLocationCode(); if (StringUtils.isEmpty(fromLocationCode)) { @@ -583,13 +589,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (StringUtils.isEmpty(zoneCode)) { return Result.error("创建空托盘组出库任务时, 库区为空"); } - boolean success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_MANY, - warehouseCode); + boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("创建空托盘组出库任务时, 更新容器状态失败"); } - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, - warehouseCode); + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("创建空托盘组出库任务时, 更新库位状态失败"); } @@ -658,9 +662,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (fronLocation == null) { return Result.error("处理空出失败,没有找到库位"); } - // 5、删除容器上的库位号,并设置状态为空盘 - boolean success = - containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); + // 5、删除容器上的库位号,并设置状态为空闲,填充度状态为空盘 + boolean success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, + QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("处理空出失败, 更新容器状态失败"); } @@ -984,15 +988,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!QuantityConstant.STATUS_LOCATION_EMPTY.equals(toLocation.getStatus())) { return Result.error("创建空托盘入库时, 目标库位非空闲"); } - boolean success = locationService.updateStatusByOriginStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, - QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); + boolean success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("创建空托盘入库时,更新库位状态失败"); } } - - boolean success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, - warehouseCode); + boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("创建空托盘入库时,更新容器状态失败"); } @@ -1052,13 +1053,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (port == null) { return Result.error("创建空托盘出库时, 没有找到出库口" + toPortCode); } - boolean success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, - warehouseCode); + boolean success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("创建空托盘出库时,更新库位状态失败"); } - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, - warehouseCode); + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); if (!success) { throw new JeecgBootException("创建空托盘出库时,更新容器状态失败"); } @@ -1139,7 +1138,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea inventoryHeader.setLocationCode(toLocationCode); inventoryHeader.setTotalWeight(taskHeader.getWeight()); inventoryHeader.setCreateBy(taskHeader.getCreateBy()); - inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_SOME); + inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); inventoryHeader.setEnable(QuantityConstant.STATUS_ENABLE); if (!inventoryHeaderService.save(inventoryHeader)) { throw new JeecgBootException("添加库存头失败"); @@ -1219,7 +1218,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea throw new JeecgBootException("完成入库任务时,保存库存交易失败"); } - if (StringUtils.isNotEmpty(fromLocationCode)) { + if (StringUtils.isNotEmpty(fromLocationCode) && !fromLocationCode.equals(toLocationCode)) { success = locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); if (!success) { @@ -1237,7 +1236,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!success) { throw new JeecgBootException("完成入库任务时,更新任务失败"); } - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, + taskHeader.getContainerFillStatus(), warehouseCode); if (!success) { throw new JeecgBootException("完成入库任务时,更新容器失败"); } @@ -1343,7 +1343,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea } if (inventoryDetail.getQty().compareTo(BigDecimal.ZERO) == 0) { if (inventoryDetail.getTaskQty().compareTo(BigDecimal.ZERO) != 0) { - throw new JeecgBootException("完成出库任务,扣减库存的库存详情任务数量不为0"); + throw new JeecgBootException("完成出库任务,已无库存量可以扣减"); } success = inventoryDetailService.removeById(inventoryDetail.getId()); if (!success) { @@ -1377,20 +1377,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea inventoryTransactionList.add(inventoryTransaction); shipmentIdList.add(taskDetail.getShipmentId()); } - String containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByInventoryHeaderId(inventoryHeader.getId()); if (inventoryDetailList.size() == 0) { success = inventoryHeaderService.removeById(inventoryHeader.getId()); if (!success) { throw new JeecgBootException("完成出库任务,删除库存头失败"); } - containerStatus = QuantityConstant.STATUS_CONTAINER_EMPTY; } else { if (taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT) { throw new JeecgBootException("完成整盘出库任务,不能还剩库存详情"); } - containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; - inventoryHeader.setContainerStatus(containerStatus); + inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); inventoryHeader.setLocationCode(toLocationCode); success = inventoryHeaderService.updateById(inventoryHeader); if (!success) { @@ -1412,7 +1409,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!success) { throw new JeecgBootException("完成整盘出库任务,更新源库位失败"); } - containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); + success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, + QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("完成整盘出库任务,更新容器失败"); } @@ -1426,7 +1424,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!success) { throw new JeecgBootException("完成分拣出库任务,更新目标库位失败"); } - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, containerStatus, warehouseCode); + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, + inventoryDetailList.size() == 0 ? QuantityConstant.STATUS_CONTAINER_FILL_EMPTY : QuantityConstant.STATUS_CONTAINER_FILL_SOME, warehouseCode); if (!success) { throw new JeecgBootException("完成分拣出库任务,更新容器失败"); } @@ -1590,7 +1589,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (StringUtils.isEmpty(toLocationCode)) { return Result.error("完成盘点任务时,目标库位号为空"); } - LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); +// LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED); // 1.先拿到盘点单主单据 @@ -1797,17 +1796,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); if (inventoryDetailList.size() != 0) { if (fromLocationCode.equals(toLocationCode)) { - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, QuantityConstant.STATUS_CONTAINER_LOCK, - warehouseCode); + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); } else { - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); } if (!success) { throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); } } else { - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_LOCK, - warehouseCode); + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); } @@ -1933,23 +1930,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!success) { throw new JeecgBootException("完成移库任务时, 更新任务失败"); } - if (inventoryDetailList.size() > 0) { - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); - if (!success) { - throw new JeecgBootException("完成移库任务时, 更新容器状态失败"); - } - } else { - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); - if (!success) { - throw new JeecgBootException("完成移库任务时, 更新容器状态失败"); - } - } - Container container = containerService.getContainerByCode(containerCode, warehouseCode); - container.setLastStatus(QuantityConstant.EMPTY_STRING); - success = containerService.updateById(container); + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("完成移库任务时, 更新容器状态失败"); } + // 2023-04-11 托盘状态与填充状态分离 无需再更新字段 +// Container container = containerService.getContainerByCode(containerCode, warehouseCode); +// container.setLastStatus(QuantityConstant.EMPTY_STRING); +// success = containerService.updateById(container); +// if (!success) { +// throw new JeecgBootException("完成移库任务时, 更新容器状态失败"); +// } success = locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); if (!success) { @@ -2033,18 +2024,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea throw new JeecgBootException("完成出库查看任务时,更新库存头失败"); } if (fromLocationCode.equals(toLocationCode)) { - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, QuantityConstant.STATUS_CONTAINER_LOCK, - warehouseCode); + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); } else { - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); } if (!success) { throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); } } else { if (fromLocationCode.equals(toLocationCode)) { - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_LOCK, - warehouseCode); + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); } else { success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); } @@ -2110,8 +2099,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!success) { throw new JeecgBootException("创建跨站任务时, 更新任务失败"); } - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_LOCK, - warehouseCode); + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("创建跨站任务时, 更新容器状态失败"); } @@ -2151,7 +2139,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!success) { throw new JeecgBootException("完成空托盘组入库任务时, 更新任务失败"); } - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_MANY, warehouseCode); + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, + QuantityConstant.STATUS_CONTAINER_FILL_MANY, warehouseCode); if (!success) { throw new JeecgBootException("完成空托盘组入库任务时, 更新容器失败"); } @@ -2199,7 +2188,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!success) { throw new JeecgBootException("完成空托盘组出库任务时, 更新任务失败"); } - success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); + success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, + QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("完成空托盘组出库任务时, 更新容器失败"); } @@ -2269,8 +2259,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea boolean success = false; if (StringUtils.isNotEmpty(fromLocationCode)) { - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, QuantityConstant.STATUS_LOCATION_LOCK, - warehouseCode); + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("取消任务时, 更新起始库位状态失败"); } @@ -2287,28 +2276,25 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea throw new JeecgBootException("取消任务时, 没有找到容器"); } if (inventoryHeader != null) { - container.setStatus(QuantityConstant.STATUS_CONTAINER_SOME); - inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_SOME); + inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); success = inventoryHeaderService.updateById(inventoryHeader); if (!success) { throw new JeecgBootException("取消任务时, 更新库存成功"); } - } else { - container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); - } - String lastStatus = container.getLastStatus(); - if (StringUtils.isNotEmpty(lastStatus)) { - container.setStatus(lastStatus); // 解决空托盘组移库问题 } +// String lastStatus = container.getLastStatus(); +// if (StringUtils.isNotEmpty(lastStatus)) { +// container.setStatus(lastStatus); // 解决空托盘组移库问题 +// } // if (StringUtils.isNotEmpty(fromLocationCode)) { // success = containerService.havaLocationCodeByContainer(fromLocationCode, warehouseCode); // if (success) { // throw new JeecgBootException("库位表已经存在这个容器号,不能再写入"); // } // } - container.setLastStatus(QuantityConstant.EMPTY_STRING); +// container.setLastStatus(QuantityConstant.EMPTY_STRING); // container.setLocationCode(fromLocationCode); - success = containerService.updateById(container); + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("取消任务时, 更新容器失败"); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/utils/HuahengJwtUtil.java b/huaheng-wms-core/src/main/java/org/jeecg/utils/HuahengJwtUtil.java index 651a396..c1be785 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/utils/HuahengJwtUtil.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/utils/HuahengJwtUtil.java @@ -43,6 +43,9 @@ public class HuahengJwtUtil { /** 全仓CODE */ public static final String ALL_WAREHOUSE_CODE = "ALL_WAREHOUSE"; + + /** 定时任务操作人 */ + public static final String TASK_AUDIENCE_NAME = "SYSTEM_TASK"; public static final String SYSTEM_ACTIVATION_CODE_FILE_NAME = "ActivationCode.txt"; @@ -230,7 +233,12 @@ public class HuahengJwtUtil { * @return */ public static String getCurrentOperator() { - LoginUser loginUser = SecurityUtils.getSubject().getPrincipal() != null ? (LoginUser)SecurityUtils.getSubject().getPrincipal() : null; + LoginUser loginUser = null; + try { + loginUser = SecurityUtils.getSubject().getPrincipal() != null ? (LoginUser)SecurityUtils.getSubject().getPrincipal() : null; + } catch (Exception e) { + loginUser = null; + } if (loginUser != null) { return loginUser.getRealname(); } @@ -253,3 +261,4 @@ public class HuahengJwtUtil { } } } + diff --git a/huaheng-wms-core/src/main/java/org/jeecg/utils/aspect/TaskBuildAudienceAspect.java b/huaheng-wms-core/src/main/java/org/jeecg/utils/aspect/TaskBuildAudienceAspect.java new file mode 100644 index 0000000..cf92c41 --- /dev/null +++ b/huaheng-wms-core/src/main/java/org/jeecg/utils/aspect/TaskBuildAudienceAspect.java @@ -0,0 +1,32 @@ +package org.jeecg.utils.aspect; + +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.annotation.Pointcut; +import org.jeecg.utils.HuahengJwtUtil; +import org.jeecg.utils.support.ApiAuthentication; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.stereotype.Component; + +import lombok.extern.slf4j.Slf4j; + +/** + * 构建定时任务操作人拦截器 + * @author TanYibin + * @createDate 2023年4月4日 + */ +@Slf4j +@Aspect +@Component +@EnableAsync +public class TaskBuildAudienceAspect { + + @Pointcut("execution(* org.jeecg.modules.wms.monitor.job.*Task.execute(..))") + public void executeTask() {} + + @Before("executeTask()") + public void doBefore(JoinPoint joinPoint) throws NoSuchMethodException, Throwable { + new ApiAuthentication.ApiAuthenticationBuild().audience(HuahengJwtUtil.TASK_AUDIENCE_NAME).bulid(); + } +} diff --git a/huaheng-wms-core/src/main/java/org/jeecg/utils/config/HuahengRedisConfig.java b/huaheng-wms-core/src/main/java/org/jeecg/utils/config/HuahengRedisConfig.java index 214b6e6..61028a0 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/utils/config/HuahengRedisConfig.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/utils/config/HuahengRedisConfig.java @@ -38,7 +38,7 @@ public class HuahengRedisConfig { // 配置序列化(解决乱码的问题) RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ofMillis(-1)) .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer)) - .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer)).disableCachingNullValues(); + .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer)); RedisCacheWriter cacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(factory); /* diff --git a/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java b/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java index a1318e6..b311387 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java @@ -434,12 +434,14 @@ public class QuantityConstant { public static final int STATION_PICK_AND_OUT = 4; public static final String EMPTY_STRING = ""; - + public static final String STATUS_CONTAINER_EMPTY = "empty"; public static final String STATUS_CONTAINER_LOCK = "lock"; - public static final String STATUS_CONTAINER_SOME = "some"; - public static final String STATUS_CONTAINER_FULL = "full"; - public static final String STATUS_CONTAINER_MANY = "many"; + + public static final String STATUS_CONTAINER_FILL_EMPTY = "empty"; + public static final String STATUS_CONTAINER_FILL_SOME = "some"; + public static final String STATUS_CONTAINER_FILL_FULL = "full"; + public static final String STATUS_CONTAINER_FILL_MANY = "many"; public static final String STATUS_LOCATION_EMPTY = "empty"; public static final String STATUS_LOCATION_LOCK = "lock"; diff --git a/huaheng-wms-core/src/main/java/org/jeecg/utils/support/ExceptionHandlerAdvice.java b/huaheng-wms-core/src/main/java/org/jeecg/utils/support/ExceptionHandlerAdvice.java index fd65281..59a5058 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/utils/support/ExceptionHandlerAdvice.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/utils/support/ExceptionHandlerAdvice.java @@ -1,7 +1,6 @@ package org.jeecg.utils.support; import java.util.HashMap; -import java.util.Map; import org.jeecg.common.api.vo.Result; import org.springframework.validation.FieldError; @@ -19,7 +18,6 @@ public class ExceptionHandlerAdvice { */ @ExceptionHandler(value = MethodArgumentNotValidException.class) public Object handerConstraintViolationException(MethodArgumentNotValidException exception) { - Result<Map> result = new Result<Map>(); HashMap<String, Object> errors = new HashMap<>(); exception.getBindingResult().getAllErrors().forEach(error -> { FieldError fieldError = (FieldError)error; diff --git a/huaheng-wms-core/src/main/resources/application-prod.yml b/huaheng-wms-core/src/main/resources/application-prod.yml index cfa85c4..4831464 100644 --- a/huaheng-wms-core/src/main/resources/application-prod.yml +++ b/huaheng-wms-core/src/main/resources/application-prod.yml @@ -294,9 +294,9 @@ logging: level: org.jeecg.common: ERROR org.jeecg.modules: ERROR - org.jeecg.modules.wms: INFO + org.jeecg.modules.wms: DEBUG org.jeecg.config.shiro: ERROR - org.jeecg.utils: ERROR + org.jeecg.utils: INFO #swagger knife4j: #开启增强配置 diff --git a/huaheng-wms-core/src/main/resources/application.yml b/huaheng-wms-core/src/main/resources/application.yml index eea43bd..9823b9d 100644 --- a/huaheng-wms-core/src/main/resources/application.yml +++ b/huaheng-wms-core/src/main/resources/application.yml @@ -8,4 +8,4 @@ huaheng: system: verson: '@project.version@' artifactId: '@project.artifactId@' - checkSystemActivationCode: true \ No newline at end of file + checkSystemActivationCode: false \ No newline at end of file diff --git a/huaheng-wms-core/src/main/resources/logback-spring.xml b/huaheng-wms-core/src/main/resources/logback-spring.xml index 001a80a..d161a0d 100644 --- a/huaheng-wms-core/src/main/resources/logback-spring.xml +++ b/huaheng-wms-core/src/main/resources/logback-spring.xml @@ -71,10 +71,10 @@ <!-- 每天生成一个html格式的日志结束 --> <!--myibatis log configure --> - <logger name="com.apache.ibatis" level="TRACE" /> - <logger name="java.sql.Connection" level="INFO" /> - <logger name="java.sql.Statement" level="INFO" /> - <logger name="java.sql.PreparedStatement" level="INFO" /> +<!-- <logger name="com.apache.ibatis" level="TRACE" /> --> +<!-- <logger name="java.sql.Connection" level="DEBUG" /> --> +<!-- <logger name="java.sql.Statement" level="DEBUG" /> --> +<!-- <logger name="java.sql.PreparedStatement" level="DEBUG" /> --> <logger name="jdbc.connection" additivity="false" level="off"> <appender-ref ref="STDOUT" />