diff --git a/ant-design-vue-jeecg/src/api/api.js b/ant-design-vue-jeecg/src/api/api.js index a67365b..1ad7127 100644 --- a/ant-design-vue-jeecg/src/api/api.js +++ b/ant-design-vue-jeecg/src/api/api.js @@ -104,7 +104,7 @@ export const getZoneList = (params) => getAction('/config/zone/getZoneList', par //获取容器类型列表 export const getContainerTypeList = (params) => getAction('/config/containerType/getContainerTypeList', params); //获取库位类型列表 -export const getLocationTypeList = (params) => getAction('/config/locationType/getLocationTypeList', params); +export const getLocationTypeList = (params) => getAction('/config/zone/getZoneList', params); //获取库位类高度列表 export const getLocationHighList = (params) => postAction('/config/locationHigh/getLocationHighList', params); //获取货主列表 @@ -177,6 +177,8 @@ export const getPrintContainer = (params) => postAction('/config/container/getPr export const getPrintLocation = (params) => postAction('/config/location/getPrintContent?ids=' + params, params); //获取物料打印数据 export const getMaterialLocation = (params) => postAction('/config/material/getPrintContent?ids=' + params, params); +//获取物料类别列表 +export const getMaterialTypeList = (params) => getAction('/config/materialType/getMaterialTypeList', params); //根据出库单头ID查询出库单详情 export const listShipmentByShipmentDetailId = (params) => postAction('/shipment/shipmentCombination/listShipmentByShipmentDetailId', params); //根据出库单详情选取库存 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 2928d3c..f57baad 100644 --- a/ant-design-vue-jeecg/src/views/system/config/BomDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/BomDetailList.vue @@ -129,11 +129,11 @@ export default { return parseInt(index) + 1; } }, - { - title: '货主', - align: "center", - dataIndex: 'companyCode' - }, + // { + // title: '货主', + // align: "center", + // dataIndex: 'companyCode' + // }, { title: '物料编码', align: "center", 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 8b531d0..fce023f 100644 --- a/ant-design-vue-jeecg/src/views/system/config/BomHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/config/BomHeaderList.vue @@ -62,6 +62,12 @@ :customRow="clickThenSelect" @change="handleTableChange"> + <span slot="companyCode" slot-scope="companyCode"> + <a-tag :key="companyCode" color=blue> + {{ solutionCompany(companyCode) }} + </a-tag> + </span> + <template slot="htmlSlot" slot-scope="text"> <div v-html="text"></div> </template> @@ -120,6 +126,7 @@ import {getAction} from '@/api/manage' import BomDetailList from './BomDetailList' import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' import '@/assets/less/TableExpand.less' +import { getCompanyList, getZoneList } from '@api/api' export default { name: "BomHeaderList", @@ -130,13 +137,16 @@ export default { }, data() { return { + companyList: [], description: 'bom主表管理页面', // 表头 columns: [ { - title: '货主', - align: "center", - dataIndex: 'companyCode' + title:'货主', + align:"center", + dataIndex: 'companyCode', + key: 'companyCode', + scopedSlots: {customRender: 'companyCode'} }, { title: '物料编码', @@ -219,6 +229,7 @@ export default { } }, created() { + this.loadFrom(); this.getSuperFieldList(); }, computed: { @@ -248,6 +259,13 @@ export default { this.selectedRowKeys = selectedRowKeys; this.selectionRows = selectionRows; }, + loadFrom() { + getCompanyList().then((res) => { + if (res.success) { + this.companyList = res.result + } + }); + }, loadData(arg) { if (!this.url.list) { this.$message.error("请设置url.list属性!") @@ -271,6 +289,17 @@ export default { this.loading = false; }) }, + solutionCompany(value) { + debugger + 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('') + }, getSuperFieldList() { let fieldList = []; fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''}) diff --git a/ant-design-vue-jeecg/src/views/system/config/modules/MaterialForm.vue b/ant-design-vue-jeecg/src/views/system/config/modules/MaterialForm.vue index 6107959..8d24df9 100644 --- a/ant-design-vue-jeecg/src/views/system/config/modules/MaterialForm.vue +++ b/ant-design-vue-jeecg/src/views/system/config/modules/MaterialForm.vue @@ -30,7 +30,16 @@ </a-col> <a-col :span="24"> <a-form-model-item label="类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> - <a-input v-model="model.type" placeholder="请输入类别"></a-input> + <a-select + show-search + placeholder="请输入类别" + option-filter-prop="children" + v-model="model.type"> + <a-select-option v-for="item in materialTypeList" :key="item.name" :value="item.code">{{ + item.name + }} + </a-select-option> + </a-select> </a-form-model-item> </a-col> <a-col :span="24"> @@ -68,6 +77,7 @@ import {httpAction, getAction} from '@/api/manage' import {validateDuplicateValue} from '@/utils/util' +import {getMaterialTypeList} from '@/api/api' export default { name: 'MaterialForm', @@ -82,6 +92,7 @@ export default { }, data() { return { + materialTypeList: [], model: {}, labelCol: { xs: {span: 24}, @@ -121,6 +132,7 @@ export default { created() { //备份model原始值 this.modelDefault = JSON.parse(JSON.stringify(this.model)); + this.loadFrom(); }, methods: { add() { @@ -132,6 +144,13 @@ export default { this.model = Object.assign({}, record); this.visible = true; }, + loadFrom() { + getMaterialTypeList().then((res) => { + if (res.success) { + this.materialTypeList = res.result + } + }); + }, submitForm() { const that = this; // 触发表单验证 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 d982af3..17891c6 100644 --- a/ant-design-vue-jeecg/src/views/system/inventory/InventoryMaterialSummaryList.vue +++ b/ant-design-vue-jeecg/src/views/system/inventory/InventoryMaterialSummaryList.vue @@ -78,6 +78,12 @@ </a-tag> </span> + <span slot="zoneCode" slot-scope="zoneCode"> + <a-tag :key="zoneCode" color=blue> + {{ solutionZoneCode(zoneCode) }} + </a-tag> + </span> + <template slot="htmlSlot" slot-scope="text"> <div v-html="text"></div> </template> @@ -116,7 +122,7 @@ import '@/assets/less/TableExpand.less' import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import {getCompanyList} from '@/api/api' + import { getCompanyList, getZoneList } from '@/api/api' import InventoryDetailList from './InventoryDetailList' import InventoryDetailSubTable from './subTables/InventoryDetailSubTable' @@ -129,6 +135,7 @@ }, data () { return { + zoneList: [], selectedMainId: '', description: '物料汇总主表管理页面', // 表头 @@ -145,9 +152,11 @@ // dataIndex: 'warehouseCode' // }, { - title:'库区', - align:"center", - dataIndex: 'zoneCode' + title: '库区', + align: "center", + dataIndex: 'zoneCode', + key: 'zoneCode', + scopedSlots: {customRender: 'zoneCode'} }, { title:'货主', @@ -202,7 +211,22 @@ }, }, methods: { + solutionZoneCode(value) { + var actions = [] + Object.keys(this.zoneList).some((key) => { + if (this.zoneList[key].code == ('' + value)) { + actions.push(this.zoneList[key].name) + return true + } + }) + return actions.join('') + }, loadFrom() { + getZoneList().then((res) => { + if (res.success) { + this.zoneList = res.result + } + }); getCompanyList().then((res) => { if (res.success) { this.companyList = res.result 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 a15ec6c..8da6c01 100644 --- a/ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue +++ b/ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue @@ -14,7 +14,7 @@ @change="refresh" style="width: 200px"> <a-select-option selected="0" id="zoneCode" v-for="item in locationTypeList" :key="item.name" - :value="item.code">{{ item.name }} + :value="item.locationTypeCode">{{ item.name }} </a-select-option> </a-select> </li> @@ -189,7 +189,7 @@ export default { if (res.success) { this.locationTypeList = res.result; if (this.locationTypeList.length > 0) { - this.zoneCode = this.locationTypeList[0].code; + this.zoneCode = this.locationTypeList[0].locationTypeCode; let _this = this; this.resetAjax(this.zoneCode); } @@ -228,7 +228,6 @@ export default { $("#editable-num").append("<option value='" + i + "'>" + i + "</option>") } } - alert($("#editable-select").val()) let type = $("#zoneCode").val(); this.resetAjax(this.zoneCode); 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 2fbea83..1ebad01 100644 --- a/ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue @@ -47,6 +47,12 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> + <span slot='companyCode' slot-scope='companyCode'> + <a-tag :key='companyCode' color='blue'> + {{ solutionCompany(companyCode) }} + </a-tag> + </span> + <template slot="htmlSlot" slot-scope="text"> <div v-html="text"></div> </template> @@ -91,6 +97,7 @@ import {JeecgListMixin} from '@/mixins/JeecgListMixin' import TaskDetailModal from './modules/TaskDetailModal' import AdjustmentDocModal from "../stocktaking/modules/AdjustmentDocModal"; +import { getCompanyList } from '@api/api' export default { name: "TaskDetailList", @@ -120,6 +127,7 @@ export default { return { description: '任务表管理页面', disableMixinCreated: true, + companyList: [], // 表头 columns: [ { @@ -130,7 +138,9 @@ export default { { title: '货主', align: "center", - dataIndex: 'companyCode' + dataIndex: 'companyCode', + key: 'companyCode', + scopedSlots: {customRender: 'companyCode'} }, { title: '物料编码', @@ -212,6 +222,7 @@ export default { } }, created() { + this.loadFrom(); }, computed: { importExcelUrl() { @@ -219,6 +230,23 @@ export default { } }, methods: { + loadFrom() { + 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)) { + actions.push(this.companyList[key].name) + return true + } + }) + return actions.join('') + }, clearList() { this.dataSource = [] this.selectedRowKeys = [] 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 22a59a0..87cd958 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 @@ -92,7 +92,7 @@ public class LocationMonitorController { 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::getZoneCode, type); + .eq(StringUtils.isNotEmpty(type), Location::getLocationTypeCode, type); List<Location> locations = locationService.list(locationLambdaQueryWrapper); List<Location> locationList = new ArrayList<>(); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/materialType/controller/MaterialTypeController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/materialType/controller/MaterialTypeController.java index a1972c0..ae5d9f4 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/materialType/controller/MaterialTypeController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/materialType/controller/MaterialTypeController.java @@ -10,9 +10,12 @@ 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 org.apache.shiro.authz.annotation.RequiresPermissions; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.wms.config.receiptType.entity.ReceiptType; import org.jeecg.utils.HuahengJwtUtil; import org.jeecg.common.util.oConvertUtils; @@ -170,4 +173,16 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater return super.importExcel(request, response, MaterialType.class); } + + /** + * 获取物料类别列表 + */ + @RequestMapping(value = "/getMaterialTypeList") + public Result<?> getMaterialTypeList(HttpServletRequest request) { + LambdaQueryWrapper<MaterialType> LambdaQueryWrapper = Wrappers.lambdaQuery(); + HuahengJwtUtil.setWarehouseCode(LambdaQueryWrapper, MaterialType.class, request); + List<MaterialType> materialTypes = materialTypeService.list(LambdaQueryWrapper); + return Result.OK(materialTypes); + } + }