From f6290cf3aa9794fea7edb882ca034063c5afb919 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期二, 26 十一月 2024 15:03:01 +0800 Subject: [PATCH] -物料信息 工位信息 优化 --- billion-main/src/main/java/com/billion/main/bs/service/impl/BsMaterialInfoServiceImpl.java | 4 ++ billion-main/src/main/java/com/billion/main/bs/controller/BsLineInfoController.java | 9 ++++ billion-ui/src/api/main/bs/lineInfo.js | 8 ++++ billion-main/src/main/java/com/billion/main/bs/service/impl/BsLineInfoServiceImpl.java | 4 ++ billion-ui/src/views/main/bs/lineInfo/index.vue | 13 +++--- billion-main/src/main/java/com/billion/main/bs/service/impl/BsLocationInfoServiceImpl.java | 4 ++ billion-ui/src/views/main/bs/locationInfo/index.vue | 33 ++++++++++++---- billion-ui/src/views/main/bs/materialInfo/index.vue | 10 ++-- 8 files changed, 65 insertions(+), 20 deletions(-) diff --git a/billion-main/src/main/java/com/billion/main/bs/controller/BsLineInfoController.java b/billion-main/src/main/java/com/billion/main/bs/controller/BsLineInfoController.java index d6cd816..9dd1fea 100644 --- a/billion-main/src/main/java/com/billion/main/bs/controller/BsLineInfoController.java +++ b/billion-main/src/main/java/com/billion/main/bs/controller/BsLineInfoController.java @@ -35,6 +35,15 @@ private IBsLineInfoService bsLineInfoService; /** + * 浜х嚎涓嬫媺妗嗗垪琛� + */ + @GetMapping("/getLineOptions") + public AjaxResult getLineOptions() + { + return AjaxResult.success(bsLineInfoService.list()); + } + + /** * 鏌ヨ浜х嚎淇℃伅鍒楄〃 */ @PreAuthorize("@ss.hasPermi('bs:lineInfo:list')") diff --git a/billion-main/src/main/java/com/billion/main/bs/service/impl/BsLineInfoServiceImpl.java b/billion-main/src/main/java/com/billion/main/bs/service/impl/BsLineInfoServiceImpl.java index fc39aca..23fa983 100644 --- a/billion-main/src/main/java/com/billion/main/bs/service/impl/BsLineInfoServiceImpl.java +++ b/billion-main/src/main/java/com/billion/main/bs/service/impl/BsLineInfoServiceImpl.java @@ -10,6 +10,8 @@ import com.billion.main.bs.domain.BsLineInfo; import com.billion.main.bs.service.IBsLineInfoService; +import static org.apache.commons.lang3.SystemUtils.getUserName; + /** * 浜х嚎淇℃伅Service涓氬姟灞傚鐞� * @@ -56,6 +58,7 @@ public int insertBsLineInfo(BsLineInfo bsLineInfo) { bsLineInfo.setCreateTime(DateUtils.getNowDate()); + bsLineInfo.setCreateBy(getUserName()); return bsLineInfoMapper.insertBsLineInfo(bsLineInfo); } @@ -69,6 +72,7 @@ public int updateBsLineInfo(BsLineInfo bsLineInfo) { bsLineInfo.setUpdateTime(DateUtils.getNowDate()); + bsLineInfo.setUpdateBy(getUserName()); return bsLineInfoMapper.updateBsLineInfo(bsLineInfo); } diff --git a/billion-main/src/main/java/com/billion/main/bs/service/impl/BsLocationInfoServiceImpl.java b/billion-main/src/main/java/com/billion/main/bs/service/impl/BsLocationInfoServiceImpl.java index 2f04417..0f040ca 100644 --- a/billion-main/src/main/java/com/billion/main/bs/service/impl/BsLocationInfoServiceImpl.java +++ b/billion-main/src/main/java/com/billion/main/bs/service/impl/BsLocationInfoServiceImpl.java @@ -10,6 +10,8 @@ import com.billion.main.bs.domain.BsLocationInfo; import com.billion.main.bs.service.IBsLocationInfoService; +import static org.apache.commons.lang3.SystemUtils.getUserName; + /** * 宸ヤ綅淇℃伅Service涓氬姟灞傚鐞� * @@ -56,6 +58,7 @@ public int insertBsLocationInfo(BsLocationInfo bsLocationInfo) { bsLocationInfo.setCreateTime(DateUtils.getNowDate()); + bsLocationInfo.setCreateBy(getUserName()); return bsLocationInfoMapper.insertBsLocationInfo(bsLocationInfo); } @@ -69,6 +72,7 @@ public int updateBsLocationInfo(BsLocationInfo bsLocationInfo) { bsLocationInfo.setUpdateTime(DateUtils.getNowDate()); + bsLocationInfo.setUpdateBy(getUserName()); return bsLocationInfoMapper.updateBsLocationInfo(bsLocationInfo); } diff --git a/billion-main/src/main/java/com/billion/main/bs/service/impl/BsMaterialInfoServiceImpl.java b/billion-main/src/main/java/com/billion/main/bs/service/impl/BsMaterialInfoServiceImpl.java index 63c0452..3324eac 100644 --- a/billion-main/src/main/java/com/billion/main/bs/service/impl/BsMaterialInfoServiceImpl.java +++ b/billion-main/src/main/java/com/billion/main/bs/service/impl/BsMaterialInfoServiceImpl.java @@ -10,6 +10,8 @@ import com.billion.main.bs.domain.BsMaterialInfo; import com.billion.main.bs.service.IBsMaterialInfoService; +import static org.apache.commons.lang3.SystemUtils.getUserName; + /** * 鐗╂枡淇℃伅Service涓氬姟灞傚鐞� * @@ -56,6 +58,7 @@ public int insertBsMaterialInfo(BsMaterialInfo bsMaterialInfo) { bsMaterialInfo.setCreateTime(DateUtils.getNowDate()); + bsMaterialInfo.setCreateBy(getUserName()); return bsMaterialInfoMapper.insertBsMaterialInfo(bsMaterialInfo); } @@ -69,6 +72,7 @@ public int updateBsMaterialInfo(BsMaterialInfo bsMaterialInfo) { bsMaterialInfo.setUpdateTime(DateUtils.getNowDate()); + bsMaterialInfo.setUpdateBy(getUserName()); return bsMaterialInfoMapper.updateBsMaterialInfo(bsMaterialInfo); } diff --git a/billion-ui/src/api/main/bs/lineInfo.js b/billion-ui/src/api/main/bs/lineInfo.js index b2f634f..d70a73f 100644 --- a/billion-ui/src/api/main/bs/lineInfo.js +++ b/billion-ui/src/api/main/bs/lineInfo.js @@ -1,5 +1,13 @@ import request from '@/utils/request' +//浜х嚎涓嬫媺妗嗕俊鎭垪琛� +export function getLineOptions() { + return request({ + url: '/bs/lineInfo/getLineOptions', + method: 'get', + }) +} + // 鏌ヨ浜х嚎淇℃伅鍒楄〃 export function listLineInfo(query) { return request({ diff --git a/billion-ui/src/views/main/bs/lineInfo/index.vue b/billion-ui/src/views/main/bs/lineInfo/index.vue index a438be7..7a9c7af 100644 --- a/billion-ui/src/views/main/bs/lineInfo/index.vue +++ b/billion-ui/src/views/main/bs/lineInfo/index.vue @@ -70,17 +70,16 @@ <el-table border v-loading="loading" :data="lineInfoList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="涓婚敭id" align="center" prop="id" /> - <el-table-column show-overflow-tooltip="true" label="浜х嚎缂栧彿" align="center" prop="lineCode" /> - <el-table-column show-overflow-tooltip="true" label="浜х嚎鍚嶇О" align="center" prop="lineName" /> - <el-table-column show-overflow-tooltip="true" label="澶囨敞" align="center" prop="remarks" /> - <el-table-column show-overflow-tooltip="true" label="鍒涘缓鐢ㄦ埛" align="center" prop="createBy" /> + <el-table-column :show-overflow-tooltip="true" label="浜х嚎缂栧彿" align="center" prop="lineCode" /> + <el-table-column :show-overflow-tooltip="true" label="浜х嚎鍚嶇О" align="center" prop="lineName" /> + <el-table-column :show-overflow-tooltip="true" label="澶囨敞" align="center" prop="remarks" /> + <el-table-column :show-overflow-tooltip="true" label="鍒涘缓鐢ㄦ埛" align="center" prop="createBy" /> <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> </el-table-column> - <el-table-column show-overflow-tooltip="true" label="鏇存敼鐢ㄦ埛" align="center" prop="updateBy" /> + <el-table-column :show-overflow-tooltip="true" label="鏇存敼鐢ㄦ埛" align="center" prop="updateBy" /> <el-table-column label="鏇存敼鏃堕棿" align="center" prop="updateTime" width="180"> </el-table-column> - <el-table-column show-overflow-tooltip="true" label="鐘舵��" align="center" prop="status" /> + <el-table-column :show-overflow-tooltip="true" label="鐘舵��" align="center" prop="status" /> </el-table> <pagination diff --git a/billion-ui/src/views/main/bs/locationInfo/index.vue b/billion-ui/src/views/main/bs/locationInfo/index.vue index ed97152..71fed8d 100644 --- a/billion-ui/src/views/main/bs/locationInfo/index.vue +++ b/billion-ui/src/views/main/bs/locationInfo/index.vue @@ -88,19 +88,19 @@ <el-table border v-loading="loading" :data="locationInfoList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> - <el-table-column show-overflow-tooltip="true" label="宸ヤ綅缂栧彿" align="center" prop="locationCode" /> - <el-table-column show-overflow-tooltip="true" label="宸ヤ綅鍚嶇О" align="center" prop="locationName" /> + <el-table-column :show-overflow-tooltip="true" label="宸ヤ綅缂栧彿" align="center" prop="locationCode" /> + <el-table-column :show-overflow-tooltip="true" label="宸ヤ綅鍚嶇О" align="center" prop="locationName" /> <el-table-column label="宸ヤ綅绫诲瀷" align="center" prop="locationType"> <template slot-scope="scope"> <dict-tag :options="dict.type.location_type" :value="scope.row.locationType"/> </template> </el-table-column> - <el-table-column show-overflow-tooltip="true" label="浜х嚎缂栧彿" align="center" prop="lineCode" /> - <el-table-column show-overflow-tooltip="true" label="澶囨敞" align="center" prop="remarks" /> - <el-table-column show-overflow-tooltip="true" label="鍒涘缓鐢ㄦ埛" align="center" prop="createBy" /> + <el-table-column :show-overflow-tooltip="true" label="浜х嚎缂栧彿" align="center" prop="lineCode" /> + <el-table-column :show-overflow-tooltip="true" label="澶囨敞" align="center" prop="remarks" /> + <el-table-column :show-overflow-tooltip="true" label="鍒涘缓鐢ㄦ埛" align="center" prop="createBy" /> <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> </el-table-column> - <el-table-column show-overflow-tooltip="true" label="鏇存敼鐢ㄦ埛" align="center" prop="updateBy" /> + <el-table-column :show-overflow-tooltip="true" label="鏇存敼鐢ㄦ埛" align="center" prop="updateBy" /> <el-table-column label="鏇存敼鏃堕棿" align="center" prop="updateTime" width="180"> </el-table-column> </el-table> @@ -133,7 +133,15 @@ </el-select> </el-form-item> <el-form-item label="浜х嚎缂栧彿" prop="lineCode"> - <el-input v-model="form.lineCode" placeholder="璇疯緭鍏ヤ骇绾跨紪鍙�" /> +<!-- <el-input v-model="form.lineCode" placeholder="璇疯緭鍏ヤ骇绾跨紪鍙�" />--> + <el-select style="width: 100%" v-model="form.lineCode" placeholder="璇烽�夋嫨浜х嚎"> + <el-option + v-for="dict in lineOptions" + :key="dict.value" + :label="dict.lineName" + :value="dict.lineCode" + ></el-option> + </el-select> </el-form-item> <el-form-item label="澶囨敞" prop="remarks"> <el-input v-model="form.remarks" placeholder="璇疯緭鍏ュ娉�" /> @@ -149,6 +157,7 @@ <script> import { listLocationInfo, getLocationInfo, delLocationInfo, addLocationInfo, updateLocationInfo } from "@/api/main/bs/locationInfo"; +import {getLineOptions, listLineInfo} from "@/api/main/bs/lineInfo"; export default { name: "LocationInfo", @@ -189,13 +198,21 @@ id: [ { required: true, message: "涓婚敭id涓嶈兘涓虹┖", trigger: "blur" } ], - } + }, + lineOptions: [], }; }, created() { this.getList(); + this.getLineOptions() }, methods: { + getLineOptions() { + this.loading = true; + getLineOptions().then(response => { + this.lineOptions = response.data; + }); + }, /** 鏌ヨ宸ヤ綅淇℃伅鍒楄〃 */ getList() { this.loading = true; diff --git a/billion-ui/src/views/main/bs/materialInfo/index.vue b/billion-ui/src/views/main/bs/materialInfo/index.vue index a013862..b89ecc9 100644 --- a/billion-ui/src/views/main/bs/materialInfo/index.vue +++ b/billion-ui/src/views/main/bs/materialInfo/index.vue @@ -167,8 +167,8 @@ /> <!-- 娣诲姞鎴栦慨鏀圭墿鏂欎俊鎭璇濇 --> - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> + <el-form :inline="true" ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="鐗╂枡缂栧彿" prop="materialCode"> <el-input v-model="form.materialCode" placeholder="璇疯緭鍏ョ墿鏂欑紪鍙�" /> </el-form-item> @@ -179,7 +179,7 @@ <el-input v-model="form.materialView" placeholder="璇疯緭鍏ヨ鍥�" /> </el-form-item> <el-form-item label="绉嶇被" prop="typeZ"> - <el-select style="width: 100%" v-model="form.typeZ" placeholder="璇烽�夋嫨绉嶇被"> + <el-select v-model="form.typeZ" placeholder="璇烽�夋嫨绉嶇被"> <el-option v-for="dict in dict.type.type_z" :key="dict.value" @@ -189,7 +189,7 @@ </el-select> </el-form-item> <el-form-item label="绫诲瀷" prop="typeL"> - <el-select style="width: 100%" v-model="form.typeL" placeholder="璇烽�夋嫨绫诲瀷"> + <el-select v-model="form.typeL" placeholder="璇烽�夋嫨绫诲瀷"> <el-option v-for="dict in dict.type.type_l" :key="dict.value" @@ -199,7 +199,7 @@ </el-select> </el-form-item> <el-form-item label="鍗曚綅" prop="unit"> - <el-select style="width: 100%" v-model="form.unit" placeholder="璇烽�夋嫨鍗曚綅"> + <el-select v-model="form.unit" placeholder="璇烽�夋嫨鍗曚綅"> <el-option v-for="dict in dict.type.unit" :key="dict.value" -- Gitblit v1.9.3