Browse Source

2022-02-16 22:20

王克恕 3 years ago
parent
commit
c84bef8e0c

+ 65 - 9
imcs-ui/src/views/zuihou/prepareProductMgr/technologyMgr/Index.vue

@@ -42,7 +42,7 @@
 	      :key="tableKey"
 	      ref="table"
 	      v-loading="loading"
-	      :data="tableData.data"
+	      :data="tableData.records"
 	      border
 	      fit
 	      row-key="id"
@@ -51,7 +51,63 @@
 	      style="width: 100%;"
 	      @current-change="handleCurrentChange"
 	    >
-	      <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 tableData.titleList" :key="item.id" :prop="item.field" :label='item.text' :show-overflow-tooltip="true" width="180px"></el-table-column>-->
+	      <!-- 序号 -->
+	      <el-table-column :label='$t("common.serialNo")' width="55px" align="center">
+		      <template slot-scope="scope">
+		        <div>
+		          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
+		        </div>
+		      </template>
+	      </el-table-column>
+	      <!-- 零部件编号 -->
+        <el-table-column
+          prop="partsNo"
+          :label="$t(&quot;runCenter.table.orderSldPro.partsNo&quot;)"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="150px"
+        >
+          <template slot-scope="{ row }">
+            <span>{{ row.partsNo }}</span>
+          </template>
+        </el-table-column>
+        <!-- 产品代号 -->
+        <el-table-column
+          prop="bomAlias"
+          :label="$t(&quot;runCenter.table.orderSldPro.bomAlias&quot;)"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120px"
+        />
+        <!-- 零件名称 -->
+        <el-table-column
+          prop="name"
+          :label="$t(&quot;runCenter.table.orderSldPro.name&quot;)"
+          align="center"
+        />
+        <!-- 零件代号 -->
+        <el-table-column
+          prop="partsAlias"
+          :label="$t(&quot;runCenter.table.orderSldPro.partsAlias&quot;)"
+          align="center"
+          width="150px"
+        />
+        <!-- 版本号 -->
+        <el-table-column
+          prop="version"
+          :label="$t(&quot;runCenter.table.orderSldPro.version&quot;)"
+          align="center"
+          width="150px"
+        />
+        <!-- 备注 -->
+        <el-table-column
+          prop="remark"
+          :label="$t(&quot;runCenter.table.orderSldPro.remark&quot;)"
+          align="center"
+          width="150px"
+        />
+        <!-- 操作 -->
 	      <el-table-column
 	        :label="$t('table.operation')"
 	        fixed="right"
@@ -71,10 +127,10 @@
 	      </el-table-column>
 	    </el-table>
 	    <pagination
-	      v-show="tableData.count > 0"
+	      v-show="tableData.total > 0"
 	      :limit.sync="queryParams.size"
 	      :page.sync="queryParams.current"
-	      :total="Number(tableData.count)"
+	      :total="Number(tableData.total)"
 	      @pagination="fetch"
 	    />
 		</div>
@@ -144,7 +200,7 @@ export default {
       currentRow: null,  // 当前选择的行数据对象
       loading: false,
       tableData: {
-        count: 0
+        total: 0
       },
       enums: {
         TenantTypeEnum: {},
@@ -381,19 +437,19 @@ export default {
       this.queryParams.size = params.size ? params.size : this.queryParams.size
       
       //必须传的参数--审核通过的,才能看到
-      this.queryParams.audit_status = '2'
+			this.queryParams.model.auditStatus = '2'
 			
 			// 测试数据,真实数据,请使用page
-      bomMgrApi.pageList(this.queryParams).then(response => {
+      bomMgrApi.page(this.queryParams).then(response => {
       	const res = response.data
         // console.log("列表的数据:", res)
         if (res.isSuccess) {
         	// 总数
         	this.tableData = res.data
         	// 如果有数据,默认选中第一条数据
-        	if(this.tableData.data.length > 0){
+        	if(this.tableData.records.length > 0){
         		// 选择第一行数据
-        		this.$refs.table.setCurrentRow(this.tableData.data[0])
+        		this.$refs.table.setCurrentRow(this.tableData.records[0])
         	}
         }
         // eslint-disable-next-line no-return-assign

+ 1 - 1
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/draftOrder/components/Select.vue

@@ -114,7 +114,7 @@
 
 	    <!-- 【分页组件】-->
 	    <pagination
-	      v-show="tableData.total > 9"
+	      v-show="tableData.total > 0"
 	      :limit.sync="queryParams.size"
 	      :page.sync="queryParams.current"
 	      :total="Number(tableData.total)"