Bladeren bron

1.不合格品管理问题修改
2.质量管理问题修改

yejian 3 jaren geleden
bovenliggende
commit
9f6607e285

+ 1 - 1
imcs-ui/src/lang/zh/cuttingTool.js

@@ -13,7 +13,7 @@ export default {
     // 列表搜索表单名称
     searchForm: {
       machineCuttingtool: {
-        resourceName: '生产资源名称',
+        resourceName: '设备名称',
         resourceStatus: '在线状态',
       },
       customizeCuttingtool: {

+ 1 - 1
imcs-ui/src/lang/zh/order.js

@@ -31,7 +31,7 @@ export default {
 		form: {
       craftCard:{
         partName: '零件',
-        partCode: '零部件编号',
+        partCode: '零件唯一码',
         deliveryTime: '零件交货日期',
         partCount: '零件总数',
       }

+ 6 - 3
imcs-ui/src/views/zuihou/prepareProductMgr/cuttingToolMgr/components/machineCuttingTool/index.vue

@@ -25,7 +25,7 @@
     <!-- 功能按钮 -->
     <el-row class="filter-container">
       <el-col>
-        <el-button type="primary" icon="el-icon-loading" size="medium" @click="batchSysMachineCuttingTools">{{ $t("cuttingTool.buttons.machineCuttingtool.synCuttingtool") }}</el-button>
+        <el-button type="primary" icon="el-icon-upload" size="medium" @click="batchSysMachineCuttingTools">{{ $t("cuttingTool.buttons.machineCuttingtool.synCuttingtool") }}</el-button>
       </el-col>
     </el-row>
 
@@ -82,7 +82,7 @@
         <template slot-scope="{ row }">
           <el-tooltip class="item" :content='$t("cuttingTool.buttons.machineCuttingtool.synCuttingtool")' effect="dark" placement="top-start">
             <i
-              class="el-icon-loading table-operation"
+              class="el-icon-upload table-operation"
               style="color: #2db7f5;"
               @click="sysMachineCuttingTools(row)"
             />
@@ -347,7 +347,10 @@
     background: #00DD77;
   }
   .grid-content {
+    height: 50px;
     border-radius: 4px;
-    font-size: xx-large;
+    font-size: x-large;
+    line-height: 50px;
+    text-align: left;
   }
 </style>

+ 423 - 422
imcs-ui/src/views/zuihou/qualityCenter/qualityMgr/Index.vue

@@ -1,422 +1,423 @@
-<template>
-  <div class="app-container">
-		<!-- 搜索模块 -->
-    <div class="filter-container">
-    	<span>
-    		<span>{{$t("machining.table.qualityMgr.bomName")}}:</span>
-    		<el-input v-model="queryParams.model.bomName" :placeholder='$t("common.pleaseEnter")' style="width: 180px;" size="medium"/>
-    	</span>
-		<!--  -->
-    	<span style="margin-left: 15px;">
-    		<span>{{$t("machining.table.qualityMgr.orderName")}}:</span>
-    		<el-input v-model="queryParams.model.orderName" :placeholder='$t("common.pleaseEnter")' style="width: 180px;" size="medium"/>
-    	</span>
-<!--    	<span style="margin-left: 15px;">-->
-<!--    		<span>{{$t("machining.table.qualityMgr.produceStatus")}}:</span>-->
-<!--    		<el-select v-model="queryParams.model.produceStatus" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 180px;">-->
-<!--        	<el-option-->
-<!--			      v-for="item in audioStatus"-->
-<!--			      :key="item.value"-->
-<!--			      :label="item.label"-->
-<!--			      :value="item.value">-->
-<!--			    </el-option>-->
-<!--      	</el-select>-->
-<!--    	</span>-->
-    </div>
-    <div class="filter-container">
-<!--    	<span>-->
-<!--    		<span>{{$t("machining.common.jiaohuTime")}}:</span>-->
-<!--    		<el-date-picker-->
-<!--		      v-model="queryParams.timeRange"-->
-<!--		      type="daterange"-->
-<!--		      :picker-options="pickerOptions"-->
-<!--		      :range-separator='$t("common.separator")'-->
-<!--		      :start-placeholder='$t("common.startTime")'-->
-<!--		      :end-placeholder='$t("common.endTime")'-->
-<!--		      format="yyyy-MM-dd"-->
-<!--			  	value-format="yyyy-MM-dd"-->
-<!--		      align="right"-->
-<!--		      style="width: 350px;"-->
-<!--		    >-->
-<!--		    </el-date-picker>-->
-<!--    	</span>-->
-      <span style="margin-left: 15px;">
-	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
-	        {{ $t("table.search") }}
-	      </el-button>
-	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
-	        {{ $t("table.reset") }}
-	      </el-button>
-      </span>
-    </div>
-
-    <!-- 功能按钮 -->
-    <el-row class="filter-container">
-    	<el-col>
-    		<!--<el-button type="success" icon="el-icon-plus" size="medium" @click="add">{{ $t("machining.common.marking") }}</el-button>-->
-	      <el-button v-has-permission="['quality:view']" type="primary" icon="el-icon-view" size="medium" @click="viewOne">
-	        {{ $t("machining.common.viewOrder") }}
-	      </el-button>
-    	</el-col>
-    </el-row>
-
-		<!-- 列表数据 -->
-    <el-table
-      :key="tableKey"
-      ref="table"
-      v-loading="loading"
-      :data="tableData.records"
-      border
-      fit
-      row-key="id"
-      style="width: 100%;"
-      @selection-change="onSelectChange"
-      @cell-click="cellClick"
-    >
-    	<!-- 序号 -->
-    	<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 align="center" type="selection" width="50" :reserve-selection="true" />      
-      <!-- 零件简称 -->
-      <el-table-column prop="bomName" :label='$t("machining.table.qualityMgr.bomName")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 订单编号--> 
-      <el-table-column prop="orderName" :label='$t("machining.table.qualityMgr.orderName")' :show-overflow-tooltip="true"></el-table-column>
-	 <!-- 来源
-      <el-table-column prop="uniqueCode" :label='$t("machining.table.qualityMgr.uniqueCode")' width="100" :show-overflow-tooltip="true"></el-table-column>-->
-      <!-- 生产状态 -->
-      <el-table-column prop="produceStatus" :label='$t("machining.table.qualityMgr.produceStatus")' :show-overflow-tooltip="true">
-      	<template slot-scope="{ row }">
-          <el-tag v-if="row.produceStatus == '0'" type="warning">{{$t("runCenter.common.produceStatus.panse")}}</el-tag>
-          <el-tag v-if="row.produceStatus == '1'" type="info">{{$t("runCenter.common.produceStatus.noStart")}}</el-tag>
-          <el-tag v-if="row.produceStatus == '2'">{{$t("runCenter.common.produceStatus.run")}}</el-tag>
-          <el-tag v-if="row.produceStatus == '3'" type="success">{{$t("runCenter.common.produceStatus.finished")}}</el-tag>
-				</template>
-      </el-table-column>
-      <!-- 产品数量 -->
-      <el-table-column prop="bomNum" :label='$t("machining.table.qualityMgr.bomNum")' :show-overflow-tooltip="true"></el-table-column>
-      
-      <el-table-column prop="completeNum" :label='$t("machining.table.qualityMgr.completeNum")' :show-overflow-tooltip="true"></el-table-column>
-      <el-table-column prop="unqualifiedCount" :label='$t("machining.table.qualityMgr.unqualifiedCount")' :show-overflow-tooltip="true"></el-table-column>
-      <el-table-column prop="qualifiedCount" :label='$t("machining.table.qualityMgr.qualifiedCount")' :show-overflow-tooltip="true"></el-table-column>
-      <el-table-column prop="addOrderCount" :label='$t("machining.table.qualityMgr.addOrderCount")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 下单日期 -->
-      <el-table-column prop="orderDeliveryTime" :label='$t("machining.table.qualityMgr.orderDeliveryTime")' width="150" :show-overflow-tooltip="true"></el-table-column>
-      <!-- 操作 -->
-      <el-table-column
-        :label="$t('table.operation')"
-        fixed="right"
-        align="center"
-        column-key="operation"
-        width="80px"
-      >
-        <template slot-scope="{ row }">
-        	<el-tooltip class="item" :content="$t('machining.common.viewOrder')" effect="dark" placement="top-start">
-	          <i
-	            class="el-icon-view table-operation"
-	            style="color: #87d068;"
-	            @click="view(row)"
-	          />
-          </el-tooltip>
-        </template>
-      </el-table-column>
-    </el-table>
-    <pagination
-      v-show="tableData.total > 0"
-      :limit.sync="queryParams.size"
-      :page.sync="queryParams.current"
-      :total="Number(tableData.total)"
-      @pagination="fetch"
-    />
-    <tenant-edit
-      ref="edit"
-      :dialog-visible="dialog.isVisible"
-      :title="dialog.title"
-      @close="editClose"
-      @success="editSuccess"
-    />
-    <tenant-view
-      ref="view"
-      :dialog-visible="tenantViewVisible"
-      @close="viewClose"
-    />
-    
-    <el-dialog
-      v-el-drag-dialog
-      :close-on-click-modal="false"
-      :close-on-press-escape="true"
-      title="预览"
-      width="80%"
-      top="50px"
-      :visible.sync="preview.isVisible"
-    >
-      <el-scrollbar>
-        <div v-html="preview.context" />
-      </el-scrollbar>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-	// 【分页】组件
-	import Pagination from "@/components/Pagination"
-	// 【新增/修改】组件
-	import TenantEdit from "./components/Edit"
-	// 【查看】组件
-	import TenantView from "./components/View"
-	// 【不合格产品管理】-API
-	import unqualifiedMgrApi from "@/api/machiningClient/qualityMgr"
-	// 【弹出框】elementui组件
-	import elDragDialog from '@/directive/el-drag-dialog'
-	// 共通函数
-	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
-
-	export default {
-	  name: "UnqualifiedMgr",
-	  directives: { elDragDialog },
-	  components: { Pagination, TenantEdit, TenantView },
-	  props: {
-	  },
-	  data () {
-	    return {
-	    	audioStatus: [],
-	      dialog: {
-	        isVisible: false,
-	        title: ""
-	      },
-	      preview: {
-	        isVisible: false,
-	        context: ''
-	      },
-	      tenantViewVisible: false,
-	      tableKey: 0,
-	      queryParams: initQueryParams({}),
-	      selection: [],
-	      loading: false,
-	      tableData: {
-	        total: 0
-	      },
-	      dicts: {
-          NATION: {}
-        },
-	      enums: {
-	        TenantTypeEnum: {},
-	        TenantStatusEnum: {}
-	      },
-	      pickerOptions: {
-          shortcuts: [{
-            text: '最近一周',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: '最近一个月',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: '最近三个月',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-              picker.$emit('pick', [start, end]);
-            }
-          }]
-        }
-	    }
-	  },
-	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-	  created() {
-	  	// 调用常量-审核状态
-	  	this.audioStatus = this.$constWKS.SHOWHIDE
-	  	// 加载【字典】
-	  	initDicts(['NATION'], this.dicts);
-	  	// 加载列表数据
-	  	this.fetch()
-		},
-	  computed: {
-	    currentUser () {
-	      return this.$store.state.account.user
-	    },
-	    nationList() {
-        return convertEnum(this.dicts.NATION)
-      }
-	  },
-	  mounted () {
-
-	  },
-	  methods: {
-	    viewClose () {
-	      this.tenantViewVisible = false
-	    },
-	    editClose () {
-	      this.dialog.isVisible = false
-	    },
-	    editSuccess () {
-	      this.search()
-	    },
-	    onSelectChange (selection) {
-	      this.selection = selection
-	    },
-	    search () {
-	      this.fetch({
-	        ...this.queryParams
-	      })
-	    },
-	    reset () {
-	      this.queryParams = initQueryParams({})
-	      this.$refs.table.clearSort()
-	      this.$refs.table.clearFilter()
-	      this.search()
-	    },
-	    add () {
-	      this.$refs.edit.type = "add"
-	      this.dialog.title = this.$t("machining.common.marking")
-	      this.dialog.isVisible = true
-	    },
-	    singleDelete (row) {
-	      this.$refs.table.clearSelection()
-	      this.$refs.table.toggleRowSelection(row, true)
-	      this.batchDelete()
-	    },
-	    batchDelete () {
-	      if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-
-	      this.$confirm(this.$t("lineSide.tips.wareTips"), this.$t("common.tips"), {
-	      	distinguishCancelAndClose: true,
-	        confirmButtonText: this.$t("common.confirm"),
-	        cancelButtonText: this.$t("common.cancel"),
-	        type: "warning"
-	      }).then(() => {
-	      	const ids = []
-		      this.selection.forEach(item => {
-		        ids.push(item.id)
-		      })
-		      this.delete(ids)
-	      }).catch(() => {})
-	    },
-	    clearSelections () {
-	      this.$refs.table.clearSelection()
-	    },
-	    delete (ids) {
-	      unqualifiedMgrApi.remove({ ids: ids }).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.$message({
-	            message: this.$t("tips.deleteSuccess"),
-	            type: "success"
-	          })
-	          this.search()
-	          // 清理已经删除的数据
-	          this.$refs.table.clearSelection()
-	        }
-	      })
-	    },
-	    
-	    // 【查看补单】按钮-事件
-	    viewOne () {
-	    	if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	if (this.selection.length > 1) {
-	        this.$message({
-	          message: this.$t("tips.mustOne"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	this.view(this.selection[0]);
-	    },
-	    
-	    // 【查看补单-Row】按钮-事件
-	    view (row) {
-	      this.$refs.view.setTenant(row)
-	      this.tenantViewVisible = true
-	    },
-	    // 【修改】表头上Btn-事件
-	    editOne() {
-	    	if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	if (this.selection.length > 1) {
-	        this.$message({
-	          message: this.$t("tips.mustOne"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	this.edit(this.selection[0]);
-	    },
-	    edit (row) {
-	      this.$refs.edit.setTenant(row)
-	      this.$refs.edit.type = "edit"
-	      this.dialog.title = this.$t("machining.common.marking")
-	      this.dialog.isVisible = true
-	    },
-	    fetch (params = {}) {
-	      this.loading = true
-	      if (this.queryParams.timeRange) {
-	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-	      }
-
-	      this.queryParams.current = params.current ? params.current : this.queryParams.current
-	      this.queryParams.size = params.size ? params.size : this.queryParams.size
-
-           //处于生产状态中的订单
-          this.queryParams.model.produceStatus = '2'
-	      unqualifiedMgrApi.page(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData = res.data
-	        }
-	        // eslint-disable-next-line no-return-assign
-	      }).finally(() => this.loading = false)
-
-	    },
-	    cellClick (row, column) {
-	      if (column['columnKey'] === "operation") {
-	        return
-	      }
-	      let flag = false
-	      this.selection.forEach((item) => {
-	        if (item.id === row.id) {
-	          flag = true
-	          this.$refs.table.toggleRowSelection(row)
-	        }
-	      })
-
-	      if (!flag) {
-	        this.$refs.table.toggleRowSelection(row, true)
-	      }
-	    }
-	  }
-	}
-</script>
-<style lang="scss" scoped></style>
+<template>
+  <div class="app-container">
+		<!-- 搜索模块 -->
+    <div class="filter-container">
+    	<span>
+    		<span>{{$t("machining.table.qualityMgr.bomName")}}:</span>
+    		<el-input v-model="queryParams.model.bomName" :placeholder='$t("common.pleaseEnter")' style="width: 180px;" size="medium"/>
+    	</span>
+		<!--  -->
+    	<span style="margin-left: 15px;">
+    		<span>{{$t("machining.table.qualityMgr.orderName")}}:</span>
+    		<el-input v-model="queryParams.model.orderName" :placeholder='$t("common.pleaseEnter")' style="width: 180px;" size="medium"/>
+    	</span>
+<!--    	<span style="margin-left: 15px;">-->
+<!--    		<span>{{$t("machining.table.qualityMgr.produceStatus")}}:</span>-->
+<!--    		<el-select v-model="queryParams.model.produceStatus" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 180px;">-->
+<!--        	<el-option-->
+<!--			      v-for="item in audioStatus"-->
+<!--			      :key="item.value"-->
+<!--			      :label="item.label"-->
+<!--			      :value="item.value">-->
+<!--			    </el-option>-->
+<!--      	</el-select>-->
+<!--    	</span>-->
+    </div>
+    <div class="filter-container">
+<!--    	<span>-->
+<!--    		<span>{{$t("machining.common.jiaohuTime")}}:</span>-->
+<!--    		<el-date-picker-->
+<!--		      v-model="queryParams.timeRange"-->
+<!--		      type="daterange"-->
+<!--		      :picker-options="pickerOptions"-->
+<!--		      :range-separator='$t("common.separator")'-->
+<!--		      :start-placeholder='$t("common.startTime")'-->
+<!--		      :end-placeholder='$t("common.endTime")'-->
+<!--		      format="yyyy-MM-dd"-->
+<!--			  	value-format="yyyy-MM-dd"-->
+<!--		      align="right"-->
+<!--		      style="width: 350px;"-->
+<!--		    >-->
+<!--		    </el-date-picker>-->
+<!--    	</span>-->
+      <span style="margin-left: 15px;">
+	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
+	        {{ $t("table.search") }}
+	      </el-button>
+	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
+	        {{ $t("table.reset") }}
+	      </el-button>
+      </span>
+    </div>
+
+    <!-- 功能按钮 -->
+    <el-row class="filter-container">
+    	<el-col>
+    		<!--<el-button type="success" icon="el-icon-plus" size="medium" @click="add">{{ $t("machining.common.marking") }}</el-button>-->
+	      <el-button v-has-permission="['quality:view']" type="primary" icon="el-icon-view" size="medium" @click="viewOne">
+	        {{ $t("machining.common.viewOrder") }}
+	      </el-button>
+    	</el-col>
+    </el-row>
+
+		<!-- 列表数据 -->
+    <el-table
+      :key="tableKey"
+      ref="table"
+      v-loading="loading"
+      :data="tableData.records"
+      border
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange"
+      @cell-click="cellClick"
+    >
+    	<!-- 序号 -->
+    	<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 align="center" type="selection" width="50" :reserve-selection="true" />
+      <!-- 零件简称 -->
+      <el-table-column prop="bomName" :label='$t("machining.table.qualityMgr.bomName")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 订单编号-->
+      <el-table-column prop="orderName" :label='$t("machining.table.qualityMgr.orderName")' :show-overflow-tooltip="true"></el-table-column>
+	 <!-- 来源
+      <el-table-column prop="uniqueCode" :label='$t("machining.table.qualityMgr.uniqueCode")' width="100" :show-overflow-tooltip="true"></el-table-column>-->
+      <!-- 生产状态 -->
+      <el-table-column prop="produceStatus" :label='$t("machining.table.qualityMgr.produceStatus")' :show-overflow-tooltip="true">
+      	<template slot-scope="{ row }">
+          <el-tag v-if="row.produceStatus == '0'" type="warning">{{$t("runCenter.common.produceStatus.panse")}}</el-tag>
+          <el-tag v-if="row.produceStatus == '1'" type="info">{{$t("runCenter.common.produceStatus.noStart")}}</el-tag>
+          <el-tag v-if="row.produceStatus == '2'">{{$t("runCenter.common.produceStatus.run")}}</el-tag>
+          <el-tag v-if="row.produceStatus == '3'" type="success">{{$t("runCenter.common.produceStatus.panse")}}</el-tag>
+          <el-tag v-if="row.produceStatus == '4'" type="success">{{$t("runCenter.common.produceStatus.finished")}}</el-tag>
+        </template>
+      </el-table-column>
+      <!-- 产品数量 -->
+      <el-table-column prop="bomNum" :label='$t("machining.table.qualityMgr.bomNum")' :show-overflow-tooltip="true"></el-table-column>
+
+      <el-table-column prop="completeNum" :label='$t("machining.table.qualityMgr.completeNum")' :show-overflow-tooltip="true"></el-table-column>
+      <el-table-column prop="unqualifiedCount" :label='$t("machining.table.qualityMgr.unqualifiedCount")' :show-overflow-tooltip="true"></el-table-column>
+      <el-table-column prop="qualifiedCount" :label='$t("machining.table.qualityMgr.qualifiedCount")' :show-overflow-tooltip="true"></el-table-column>
+      <el-table-column prop="addOrderCount" :label='$t("machining.table.qualityMgr.addOrderCount")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 下单日期 -->
+      <el-table-column prop="orderDeliveryTime" :label='$t("machining.table.qualityMgr.orderDeliveryTime")' width="150" :show-overflow-tooltip="true"></el-table-column>
+      <!-- 操作 -->
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        width="80px"
+      >
+        <template slot-scope="{ row }">
+        	<el-tooltip class="item" :content="$t('machining.common.viewOrder')" effect="dark" placement="top-start">
+	          <i
+	            class="el-icon-view table-operation"
+	            style="color: #87d068;"
+	            @click="view(row)"
+	          />
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="tableData.total > 0"
+      :limit.sync="queryParams.size"
+      :page.sync="queryParams.current"
+      :total="Number(tableData.total)"
+      @pagination="fetch"
+    />
+    <tenant-edit
+      ref="edit"
+      :dialog-visible="dialog.isVisible"
+      :title="dialog.title"
+      @close="editClose"
+      @success="editSuccess"
+    />
+    <tenant-view
+      ref="view"
+      :dialog-visible="tenantViewVisible"
+      @close="viewClose"
+    />
+
+    <el-dialog
+      v-el-drag-dialog
+      :close-on-click-modal="false"
+      :close-on-press-escape="true"
+      title="预览"
+      width="80%"
+      top="50px"
+      :visible.sync="preview.isVisible"
+    >
+      <el-scrollbar>
+        <div v-html="preview.context" />
+      </el-scrollbar>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	// 【分页】组件
+	import Pagination from "@/components/Pagination"
+	// 【新增/修改】组件
+	import TenantEdit from "./components/Edit"
+	// 【查看】组件
+	import TenantView from "./components/View"
+	// 【不合格产品管理】-API
+	import unqualifiedMgrApi from "@/api/machiningClient/qualityMgr"
+	// 【弹出框】elementui组件
+	import elDragDialog from '@/directive/el-drag-dialog'
+	// 共通函数
+	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
+
+	export default {
+	  name: "UnqualifiedMgr",
+	  directives: { elDragDialog },
+	  components: { Pagination, TenantEdit, TenantView },
+	  props: {
+	  },
+	  data () {
+	    return {
+	    	audioStatus: [],
+	      dialog: {
+	        isVisible: false,
+	        title: ""
+	      },
+	      preview: {
+	        isVisible: false,
+	        context: ''
+	      },
+	      tenantViewVisible: false,
+	      tableKey: 0,
+	      queryParams: initQueryParams({}),
+	      selection: [],
+	      loading: false,
+	      tableData: {
+	        total: 0
+	      },
+	      dicts: {
+          NATION: {}
+        },
+	      enums: {
+	        TenantTypeEnum: {},
+	        TenantStatusEnum: {}
+	      },
+	      pickerOptions: {
+          shortcuts: [{
+            text: '最近一周',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近一个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近三个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit('pick', [start, end]);
+            }
+          }]
+        }
+	    }
+	  },
+	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+	  created() {
+	  	// 调用常量-审核状态
+	  	this.audioStatus = this.$constWKS.SHOWHIDE
+	  	// 加载【字典】
+	  	initDicts(['NATION'], this.dicts);
+	  	// 加载列表数据
+	  	this.fetch()
+		},
+	  computed: {
+	    currentUser () {
+	      return this.$store.state.account.user
+	    },
+	    nationList() {
+        return convertEnum(this.dicts.NATION)
+      }
+	  },
+	  mounted () {
+
+	  },
+	  methods: {
+	    viewClose () {
+	      this.tenantViewVisible = false
+	    },
+	    editClose () {
+	      this.dialog.isVisible = false
+	    },
+	    editSuccess () {
+	      this.search()
+	    },
+	    onSelectChange (selection) {
+	      this.selection = selection
+	    },
+	    search () {
+	      this.fetch({
+	        ...this.queryParams
+	      })
+	    },
+	    reset () {
+	      this.queryParams = initQueryParams({})
+	      this.$refs.table.clearSort()
+	      this.$refs.table.clearFilter()
+	      this.search()
+	    },
+	    add () {
+	      this.$refs.edit.type = "add"
+	      this.dialog.title = this.$t("machining.common.marking")
+	      this.dialog.isVisible = true
+	    },
+	    singleDelete (row) {
+	      this.$refs.table.clearSelection()
+	      this.$refs.table.toggleRowSelection(row, true)
+	      this.batchDelete()
+	    },
+	    batchDelete () {
+	      if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+
+	      this.$confirm(this.$t("lineSide.tips.wareTips"), this.$t("common.tips"), {
+	      	distinguishCancelAndClose: true,
+	        confirmButtonText: this.$t("common.confirm"),
+	        cancelButtonText: this.$t("common.cancel"),
+	        type: "warning"
+	      }).then(() => {
+	      	const ids = []
+		      this.selection.forEach(item => {
+		        ids.push(item.id)
+		      })
+		      this.delete(ids)
+	      }).catch(() => {})
+	    },
+	    clearSelections () {
+	      this.$refs.table.clearSelection()
+	    },
+	    delete (ids) {
+	      unqualifiedMgrApi.remove({ ids: ids }).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.$message({
+	            message: this.$t("tips.deleteSuccess"),
+	            type: "success"
+	          })
+	          this.search()
+	          // 清理已经删除的数据
+	          this.$refs.table.clearSelection()
+	        }
+	      })
+	    },
+
+	    // 【查看补单】按钮-事件
+	    viewOne () {
+	    	if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	this.view(this.selection[0]);
+	    },
+
+	    // 【查看补单-Row】按钮-事件
+	    view (row) {
+	      this.$refs.view.setTenant(row)
+	      this.tenantViewVisible = true
+	    },
+	    // 【修改】表头上Btn-事件
+	    editOne() {
+	    	if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	this.edit(this.selection[0]);
+	    },
+	    edit (row) {
+	      this.$refs.edit.setTenant(row)
+	      this.$refs.edit.type = "edit"
+	      this.dialog.title = this.$t("machining.common.marking")
+	      this.dialog.isVisible = true
+	    },
+	    fetch (params = {}) {
+	      this.loading = true
+	      if (this.queryParams.timeRange) {
+	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+	      }
+
+	      this.queryParams.current = params.current ? params.current : this.queryParams.current
+	      this.queryParams.size = params.size ? params.size : this.queryParams.size
+
+         //处于生产状态中的订单
+        this.queryParams.model.produceStatus = '2,4'
+	      unqualifiedMgrApi.page(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData = res.data
+	        }
+	        // eslint-disable-next-line no-return-assign
+	      }).finally(() => this.loading = false)
+
+	    },
+	    cellClick (row, column) {
+	      if (column['columnKey'] === "operation") {
+	        return
+	      }
+	      let flag = false
+	      this.selection.forEach((item) => {
+	        if (item.id === row.id) {
+	          flag = true
+	          this.$refs.table.toggleRowSelection(row)
+	        }
+	      })
+
+	      if (!flag) {
+	        this.$refs.table.toggleRowSelection(row, true)
+	      }
+	    }
+	  }
+	}
+</script>
+<style lang="scss" scoped></style>

+ 177 - 176
imcs-ui/src/views/zuihou/qualityCenter/qualityMgr/components/View.vue

@@ -1,176 +1,177 @@
-<template>
-  <el-dialog
-    title="补单信息"
-    width="1200px"
-    :append-to-body="true"
-    :visible.sync="isVisible"
-    class="tenant-view"
-  >
-    <div>
-    	<!-- 列表数据 -->
-	    <el-table
-	      :key="tableKey"
-	      ref="table"
-	      v-loading="loading"
-	      :data="tableData.records"
-	      border
-	      fit
-	      style="width: 100%;"
-	    >
-	    	<!-- 序号 -->
-	    	<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="bomName" label='产品名称' :show-overflow-tooltip="true" width="150px"></el-table-column>
-	      <el-table-column prop="uniqueCode" label='产品唯一码' :show-overflow-tooltip="true" width="200px"></el-table-column>
-		  	<el-table-column prop="testResult" label='质检结果' :show-overflow-tooltip="true" width="150px">
-		  		<template slot-scope="{ row }">
-		      	<el-tag v-if="row.testResult == '0'" type="warning">不合格</el-tag>
-		      	<el-tag v-if="row.testResult == '1'" type="success">合格</el-tag>
-					</template>
-		  	</el-table-column>
-	      <el-table-column prop="bomNum" label='数量' :show-overflow-tooltip="true" width="150px"></el-table-column>
-	      <el-table-column prop="factoryDate" label='质检人' :show-overflow-tooltip="true" width="150px"></el-table-column>
-	      <el-table-column prop="addOrderNo" label='补单单号' :show-overflow-tooltip="true" width="150px"></el-table-column>
-	      <el-table-column prop="orderNo" label='所属订单号' :show-overflow-tooltip="true" width="150px"></el-table-column>
-	      <el-table-column prop="planNo" label='所属计划' :show-overflow-tooltip="true" width="150px"></el-table-column>
-	      <el-table-column prop="createTime" label='生成单据时间' :show-overflow-tooltip="true" width="150px"></el-table-column>
-        <el-table-column prop="createUserName" label='生成人' :show-overflow-tooltip="true" width="150px"></el-table-column>
-        <el-table-column prop="handleTime" label='处理时间' :show-overflow-tooltip="true" width="150px"></el-table-column>
-        <el-table-column prop="handleUserName" label='处理人' :show-overflow-tooltip="true" width="150px"></el-table-column>
-	    </el-table>
-
-	    <!-- 分页组件 -->
-	    <pagination
-	      v-show="tableData.total > 0"
-	      :limit.sync="queryParams.size"
-	      :page.sync="queryParams.current"
-	      :total="Number(tableData.total)"
-	      @pagination="fetch"
-	    />
-    </div>
-  </el-dialog>
-</template>
-<script>
-	// 【分页】组件
-	import Pagination from "@/components/Pagination"
-	// 【不合格产品管理】-API
-	import unqualifiedMgrApi from "@/api/machiningClient/qualityMgr"
-	// 【共通-工具】
-	import { initQueryParams } from '@/utils/commons'
-export default {
-  name: 'TenantView',
-  components: { Pagination },
-  props: {
-    dialogVisible: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data () {
-    return {
-      screenWidth: 0,
-      width: this.initWidth(),
-      tenant: {},
-      tableKey: 0,
-      queryParams: initQueryParams({}),
-      selection: [],
-      loading: false,
-      tableData: {
-        total: 0
-      },
-    }
-  },
-  computed: {
-    isVisible: {
-      get () {
-        return this.dialogVisible
-      },
-      set () {
-        this.close()
-      }
-    }
-  },
-  mounted () {
-    window.onresize = () => {
-      return (() => {
-        this.width = this.initWidth()
-      })()
-    }
-  },
-  methods: {
-    initWidth () {
-      this.screenWidth = document.body.clientWidth
-      if (this.screenWidth < 550) {
-        return '95%'
-      } else if (this.screenWidth < 990) {
-        return '580px'
-      } else if (this.screenWidth < 1400) {
-        return '600px'
-      } else {
-        return '650px'
-      }
-    },
-    
-    // 接收来自其他组件的-函数
-    setTenant (val) {
-      this.tenant = { ...val }
-      // 获取列表数据
-			this.fetch();
-    },
-    
-    // 分页列表
-    fetch (params = {}) {
-      this.loading = true
-      if (this.queryParams.timeRange) {
-        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-      }
-			//
-      this.queryParams.current = params.current ? params.current : this.queryParams.current
-      this.queryParams.size = params.size ? params.size : this.queryParams.size
-      // 搜索条件添加-材料的id
-      this.queryParams.model.bomId = this.tenant.bomId;
-      unqualifiedMgrApi.bOrderPage(this.queryParams).then(response => {
-        const res = response.data
-        console.log("ddddddddd = ", res)
-        if (res.isSuccess) {
-          this.tableData = res.data
-        }
-        // eslint-disable-next-line no-return-assign
-      }).finally(() => this.loading = false)
-
-    },
-    
-    close () {
-      this.$emit('close')
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-.tenant-view {
-  .img-wrapper {
-    text-align: center;
-    margin-top: -1.5rem;
-    margin-bottom: 10px;
-    img {
-      width: 4rem;
-      border-radius: 50%;
-    }
-  }
-  .view-item {
-    margin: 7px;
-    i {
-      font-size: 0.97rem;
-    }
-    span {
-      margin-left: 5px;
-    }
-  }
-}
-</style>
+<template>
+  <el-dialog
+    title="补单信息"
+    width="1200px"
+    :append-to-body="true"
+    :visible.sync="isVisible"
+    class="tenant-view"
+  >
+    <div>
+    	<!-- 列表数据 -->
+	    <el-table
+	      :key="tableKey"
+	      ref="table"
+	      v-loading="loading"
+	      :data="tableData.records"
+	      border
+	      fit
+	      style="width: 100%;"
+	    >
+	    	<!-- 序号 -->
+	    	<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="bomName" label='产品名称' :show-overflow-tooltip="true" width="150px"></el-table-column>
+	      <el-table-column prop="uniqueCode" label='产品唯一码' :show-overflow-tooltip="true" width="200px"></el-table-column>
+		  	<el-table-column prop="testResult" label='质检结果' :show-overflow-tooltip="true" width="150px">
+		  		<template slot-scope="{ row }">
+		      	<el-tag v-if="row.testResult == '0'" type="warning">不合格</el-tag>
+		      	<el-tag v-if="row.testResult == '1'" type="success">合格</el-tag>
+					</template>
+		  	</el-table-column>
+	      <el-table-column prop="bomNum" label='数量' :show-overflow-tooltip="true" width="150px"></el-table-column>
+	      <el-table-column prop="factoryDate" label='质检人' :show-overflow-tooltip="true" width="150px"></el-table-column>
+	      <el-table-column prop="addOrderNo" label='补单单号' :show-overflow-tooltip="true" width="150px"></el-table-column>
+	      <el-table-column prop="orderNo" label='所属订单号' :show-overflow-tooltip="true" width="150px"></el-table-column>
+	      <el-table-column prop="planNo" label='所属计划' :show-overflow-tooltip="true" width="150px"></el-table-column>
+	      <el-table-column prop="createTime" label='生成单据时间' :show-overflow-tooltip="true" width="150px"></el-table-column>
+        <el-table-column prop="createUserName" label='生成人' :show-overflow-tooltip="true" width="150px"></el-table-column>
+        <el-table-column prop="handleTime" label='处理时间' :show-overflow-tooltip="true" width="150px"></el-table-column>
+        <el-table-column prop="handleUserName" label='处理人' :show-overflow-tooltip="true" width="150px"></el-table-column>
+	    </el-table>
+
+	    <!-- 分页组件 -->
+	    <pagination
+	      v-show="tableData.total > 0"
+	      :limit.sync="queryParams.size"
+	      :page.sync="queryParams.current"
+	      :total="Number(tableData.total)"
+	      @pagination="fetch"
+	    />
+    </div>
+  </el-dialog>
+</template>
+<script>
+	// 【分页】组件
+	import Pagination from "@/components/Pagination"
+	// 【不合格产品管理】-API
+	import unqualifiedMgrApi from "@/api/machiningClient/qualityMgr"
+	// 【共通-工具】
+	import { initQueryParams } from '@/utils/commons'
+export default {
+  name: 'TenantView',
+  components: { Pagination },
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      screenWidth: 0,
+      width: this.initWidth(),
+      tenant: {},
+      tableKey: 0,
+      queryParams: initQueryParams({}),
+      selection: [],
+      loading: false,
+      tableData: {
+        total: 0
+      },
+    }
+  },
+  computed: {
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+      }
+    }
+  },
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+    initWidth () {
+      this.screenWidth = document.body.clientWidth
+      if (this.screenWidth < 550) {
+        return '95%'
+      } else if (this.screenWidth < 990) {
+        return '580px'
+      } else if (this.screenWidth < 1400) {
+        return '600px'
+      } else {
+        return '650px'
+      }
+    },
+
+    // 接收来自其他组件的-函数
+    setTenant (val) {
+      this.tenant = { ...val }
+      // 获取列表数据
+			this.fetch();
+    },
+
+    // 分页列表
+    fetch (params = {}) {
+      this.loading = true
+      if (this.queryParams.timeRange) {
+        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+      }
+			//
+      this.queryParams.current = params.current ? params.current : this.queryParams.current
+      this.queryParams.size = params.size ? params.size : this.queryParams.size
+      // 搜索条件添加-材料的id
+      this.queryParams.model.planId = this.tenant.planId;
+      this.queryParams.model.handleStatus = '2';
+      console.log(this.tenant.planId);
+      unqualifiedMgrApi.bOrderPage(this.queryParams).then(response => {
+        const res = response.data
+        if (res.isSuccess) {
+          this.tableData = res.data
+        }
+        // eslint-disable-next-line no-return-assign
+      }).finally(() => this.loading = false)
+
+    },
+
+    close () {
+      this.$emit('close')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.tenant-view {
+  .img-wrapper {
+    text-align: center;
+    margin-top: -1.5rem;
+    margin-bottom: 10px;
+    img {
+      width: 4rem;
+      border-radius: 50%;
+    }
+  }
+  .view-item {
+    margin: 7px;
+    i {
+      font-size: 0.97rem;
+    }
+    span {
+      margin-left: 5px;
+    }
+  }
+}
+</style>

+ 2 - 1
imcs-ui/src/views/zuihou/qualityCenter/unqualifiedMgr/Index.vue

@@ -370,7 +370,8 @@
 
 	      this.queryParams.current = params.current ? params.current : this.queryParams.current
 	      this.queryParams.size = params.size ? params.size : this.queryParams.size
-	      unqualifiedMgrApi.page(this.queryParams).then(response => {
+        this.queryParams.model.testResult = '0'
+          unqualifiedMgrApi.page(this.queryParams).then(response => {
 	        const res = response.data
 	        if (res.isSuccess) {
 	          this.tableData = res.data