Browse Source

零件管理页面展示功能

oyq28 3 years ago
parent
commit
cc6d3cdc2a

+ 7 - 0
imcs-ui/src/lang/zh/prepare.js

@@ -101,6 +101,7 @@ export default {
 			parts_name: '零件名称',
 			partsAlias: '零件代号',
 			specification: '规格',
+			batchNo: '零件批号',
 			models: '型  号',
 			brand: '品牌',
 			model: '规格',
@@ -113,6 +114,12 @@ export default {
 			pgType: '位置程序类型',
 			auditStatus: '审核状态',
 			qiyongStatus: '启用状态',
+			materialBrandName: '材料牌号',
+			plateName: '托盘名称',
+			keyFlag: '是否关键件',
+			importantFlag: '是否关重件',
+			remark: '备注',
+			productModuleName: '工艺版本名称',
 			auditStatuss: {
 				zero: '新建零件',
 				one: '待审核',

+ 26 - 9
imcs-ui/src/views/zuihou/prepareProductMgr/bomMgr/Index.vue

@@ -2,7 +2,7 @@
   <div class="app-container">
     <div class="filter-container">
     	<span>
-	    	<el-radio-group v-model="queryParams.model.audit_status" @change="search()">
+	    	<el-radio-group v-model="queryParams.model.auditStatus" @change="search()">
 		      <el-radio-button label="2">{{$t("prepare.searchForm.auditStatuss.two")}}</el-radio-button>
 		      <el-radio-button label="1">{{$t("prepare.searchForm.auditStatuss.one")}}</el-radio-button>
 		      <el-radio-button label="3">{{$t("prepare.searchForm.auditStatuss.three")}}</el-radio-button>
@@ -48,11 +48,11 @@
     	</span>-->
     	<span>
     		<span>{{$t("prepare.searchForm.parts_no")}}:</span>
-    		<el-input v-model="queryParams.model.parts_no" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    		<el-input v-model="queryParams.model.partsNo" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
     	</span>
     	<span style="margin-left: 15px;">
     		<span>{{$t("prepare.searchForm.bomAlias")}}:</span>
-    		<el-input v-model="queryParams.model.bom_alias" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    		<el-input v-model="queryParams.model.bomAlias" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
     	</span>
     	<span style="margin-left: 15px;">
     		<span>{{$t("prepare.searchForm.parts_name")}}:</span>
@@ -60,7 +60,7 @@
     	</span>
       <span style="margin-left: 15px;">
     		<span>{{$t("prepare.searchForm.partsAlias")}}:</span>
-    		<el-input v-model="queryParams.model.parts_alias" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    		<el-input v-model="queryParams.model.partsAlias" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
     	</span>
       <span style="margin-left: 15px;">
 	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
@@ -93,7 +93,7 @@
       :key="tableKey"
       ref="table"
       v-loading="loading"
-      :data="tableData.data"
+      :data="tableData.records"
       border
       fit
       row-key="id"
@@ -106,7 +106,7 @@
       @cell-click="cellClick"
     >
       <el-table-column align="center" type="selection" width="40px" :reserve-selection="true" />
-      <el-table-column v-for="item in tableData.titleList" :key="item.id" :prop="item.field" :label='item.text' :show-overflow-tooltip="true" width="180px"></el-table-column>
+      <el-table-column v-for="item in titleList" :key="item.id" :prop="item.field" :label='item.text' :show-overflow-tooltip="true" width="180px" :formatter="textFormatter"></el-table-column>
       <!--<el-table-column prop="name" label="名称" :show-overflow-tooltip="true" width="250px"></el-table-column>
       <el-table-column prop="status" label="状态" align="center" width="90px">
         <template slot-scope="{ row }">
@@ -217,6 +217,7 @@
 </template>
 
 <script>
+import i18n from '@/lang'
 import Pagination from "@/components/Pagination"
 import TenantEdit from "./components/Edit"
 import TenantView from "./components/View"
@@ -234,6 +235,8 @@ export default {
     	expands: [], // 展开行的key
     	qiyongStatus: [], //状态
     	statusList: [], // 启用状态
+      titleList: [{"field":"partsNo","text":i18n.t("prepare.searchForm.parts_no")},{"field":"bomAlias","text":i18n.t("prepare.searchForm.bomAlias")},{"field":"name","text":i18n.t("prepare.searchForm.name")},{"field":"partsAlias","text":i18n.t("prepare.searchForm.partsAlias")},{"field":"batchNo","text":i18n.t("prepare.searchForm.batchNo")},{"field":"materialBrandName","text":i18n.t("prepare.searchForm.materialBrandName")},{"field":"batchNo","text":i18n.t("prepare.searchForm.batchNo")},
+                   {"field":"keyFlag","text":i18n.t("prepare.searchForm.keyFlag")},{"field":"importantFlag","text":i18n.t("prepare.searchForm.importantFlag")},{"field":"productModuleName","text":i18n.t("prepare.searchForm.productModuleName")},{"field":"remark","text":i18n.t("prepare.searchForm.remark")},{"field":"status","text":i18n.t("prepare.searchForm.status")},{"field":"auditStatus","text":i18n.t("prepare.searchForm.auditStatus")}],
       dialog: {
         isVisible: false,
         title: ""
@@ -400,7 +403,21 @@ export default {
     onSelectChange (selection) {
       this.selection = selection
     },
-    
+    textFormatter(row, column){
+      if (column.property == "keyFlag"){
+         return (row.keyFlag === '1')? "是" : "否"
+      }
+      else if (column.property == "importantFlag"){
+         return (row.importantFlag === '1')? "是" : "否"
+      }else if (column.property == "status"){
+         return (row.status === '1')? "启用" : "冻结"
+      }else if (column.property == "auditStatus"){
+         return (row.auditStatus === '0')? "新增" : (row.auditStatus === '1')? "未审核":(row.auditStatus === '2')? "审核通过" : "审核未通过"
+      }else{
+         return row[column.property]
+      }
+
+    },    
     // 搜索
     search () {
     	// 清空,table的选中函数
@@ -563,9 +580,9 @@ export default {
 			// 分页信息
       this.queryParams.current = params.current ? params.current : this.queryParams.current
       this.queryParams.size = params.size ? params.size : this.queryParams.size
-
+     
 			// 测试数据,真实数据,请使用page
-      bomMgrApi.pageList(this.queryParams).then(response => {
+      bomMgrApi.page(this.queryParams).then(response => {
       	const res = response.data
         console.log("列表的数据:", res)
         if (res.isSuccess) {