Explorar el Código

2022-03-09 21:11

王克恕 hace 3 años
padre
commit
fcc4701461

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

@@ -239,7 +239,7 @@ export default {
 	    // 启用子组件的按钮
 	    this.$refs.technology.currBtn = false
 	    // 查询【工艺管理】列表数据
-      this.$refs.technology.fetch({bomId: this.currentRow.id, bomVersionId: this.currentRow.id})
+      this.$refs.technology.getPageList({bomId: this.currentRow.id, bomVersionId: this.currentRow.id})
 	  },
   	// 跳转【版本管理】-;列表上的Btn事件
     factoryMgr() {

+ 10 - 2
imcs-ui/src/views/zuihou/prepareProductMgr/technologyMgr/components/TechnologyTable.vue

@@ -104,6 +104,7 @@
 	    	currBtn: true, // 默认不能用
 	    	processModeling: {}, // 工艺对象
 	    	audioStatus: [],
+	    	bomInfo: {}, // 零件对象信息
 	      dialog: {
 	        isVisible: false,
 	        title: ""
@@ -312,6 +313,13 @@
 	      this.dialog.title = this.$t("common.edit")
 	      this.dialog.isVisible = true
 	    },
+	    
+	    // 根据条件,查询数据
+	    getPageList(obj) {
+	    	this.bomInfo = obj;
+	    	this.search ();
+	    },
+	    
 	    fetch (params = {}) {
 	    	this.loading = true
 			
@@ -321,9 +329,9 @@
 	      
 				// 参数 bomVersionId  、bomId
 				// 获取Bom产品的id
-				this.queryParams.bomId = params.bomId
+				this.queryParams.bomId = this.bomInfo.bomId
 				// 获取版本id
-				this.queryParams.bomVersionId = params.bomVersionId
+				this.queryParams.bomVersionId = this.bomInfo.bomVersionId
 				// bizType = 0 ;是工艺版本的列表; 如果是1 的话,则是正式工艺的列表
 				this.queryParams.bizType = "1"
 				console.log("工艺参数:", this.queryParams)

+ 371 - 371
imcs-ui/src/views/zuihou/prepareProductMgr/trayMgr/components/Edit.vue

@@ -1,371 +1,371 @@
-<template>
-  <el-dialog
-  	:close-on-click-modal="false"
-  	:close-on-press-escape="false"
-  	:title="title"
-  	:append-to-body="true"
-  	:visible.sync="isVisible"
-  	:width="width"
-  	top="50px"
-  >
-    <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
-      <!--编码-->
-      <el-form-item :label='$t("prepare.table.tray.no")+":"' prop="no">
-        <el-input v-model="tenant.no" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-      <!--名称-->
-      <el-form-item :label='$t("prepare.table.tray.name")+":"' prop="name">
-        <el-input v-model="tenant.name" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-      <!--物料类型-->
-      <el-form-item :label='$t("prepare.table.tray.materialType")+":"' prop="materialType">
-        <el-input v-model="tenant.materialType" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-<!--      &lt;!&ndash;品牌&ndash;&gt;-->
-<!--    	<el-form-item :label='$t("prepare.table.tray.brand")+":"' prop="brand">-->
-<!--      	<el-select style="width:100%" :placeholder='$t("common.pleaseSelect")' v-model="tenant.brand.key" value>-->
-<!--          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.METERIAL_BRAND" />-->
-<!--        </el-select>-->
-<!--      </el-form-item>-->
-      <!--生产分厂/制造商-->
-      <el-form-item :label='$t("prepare.table.tray.factory")+":"' prop="factory">
-        <el-input v-model="tenant.factory" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-
-      <el-form-item :label='$t("prepare.table.tray.joinDate")+":"' prop="joinDate">
-        <el-date-picker
-          v-model="tenant.joinDate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tray.period")+":"' prop="period">
-        <el-input-number v-model="tenant.period" :min="1" :max="1000" label="12"></el-input-number>
-      </el-form-item>
-      <el-form-item :label="$t('prepare.table.tray.expiryDate')+':'" prop="expiryDate">
-        <el-input-number v-model="tenant.expiryDate" :min="1" :max="1000" label="12"></el-input-number>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tray.num")+":"' prop="num">
-        <el-input-number v-model="tenant.num" :min="1" :max="1000" label="1"></el-input-number>
-      </el-form-item>
-
-      <!--夹紧位置-->
-<!--      <el-form-item :label='$t("prepare.table.tray.positionSort")+":"'>-->
-<!--        &lt;!&ndash; 功能按钮 &ndash;&gt;-->
-<!--		    <el-row class="filter-container">-->
-<!--		    	<el-col>-->
-<!--		    		<el-button type="primary" icon="el-icon-plus" size="medium" @click="addRes">新增</el-button>-->
-<!--		    	</el-col>-->
-<!--		    </el-row>-->
-<!--		    &lt;!&ndash; Table数据 &ndash;&gt;-->
-<!--				<el-table-->
-<!--		      ref="table"-->
-<!--		      v-loading="loading"-->
-<!--		      :data="tableData"-->
-<!--		      border-->
-<!--		      fit-->
-<!--		      style="width: 100%;"-->
-<!--		      @selection-change="onSelectChange"-->
-<!--		    >-->
-<!--		      <el-table-column prop="positionSort" :label='$t("prepare.table.trayPosition.positionSort")' align="center" width="70px">-->
-<!--		      	<template slot-scope="{ row }">-->
-<!--		      		<span>{{row.positionSort}}</span>-->
-<!--		      	</template>-->
-<!--		      </el-table-column>-->
-<!--		      <el-table-column prop="size" :label='$t("prepare.table.trayPosition.size")' align="center" width="100px">-->
-<!--		      	<template slot-scope="{ row }">-->
-<!--		      		<el-input size="small" v-model="row.size" v-if="row.isEdit" :placeholder='$t("common.pleaseEnter")'></el-input>-->
-<!--		      		<span v-else>{{row.size}}</span>-->
-<!--		      	</template>-->
-<!--		      </el-table-column>-->
-<!--		      <el-table-column prop="remark" :label='$t("prepare.table.trayPosition.remark")'>-->
-<!--		      	<template slot-scope="{ row }">-->
-<!--		      		<el-input size="small" v-model="row.remark" v-if="row.isEdit" :placeholder='$t("common.pleaseEnter")'></el-input>-->
-<!--		      		<span v-else>{{row.remark}}</span>-->
-<!--		      	</template>-->
-<!--		      </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 v-if="type != 'add'" class="item" :content='$t("common.edit")' effect="dark" placement="top-start">-->
-<!--			          <i-->
-<!--			            class="el-icon-edit table-operation"-->
-<!--			            style="color: #2db7f5;"-->
-<!--			            @click="edit(row)"-->
-<!--			          />-->
-<!--			        </el-tooltip>-->
-<!--		          <el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">-->
-<!--			          <i-->
-<!--			            class="el-icon-delete table-operation"-->
-<!--			            style="color: #f50;"-->
-<!--			            @click="singleDelete(row)"-->
-<!--			          />-->
-<!--		          </el-tooltip>-->
-<!--		        </template>-->
-<!--		      </el-table-column>-->
-<!--		    </el-table>-->
-<!--      </el-form-item>-->
-      <el-form-item :label='$t("prepare.table.tools.status")+":"' prop="status">
-        <template>
-				  <el-radio v-model="tenant.status" label="1">{{$t("common.status.valid")}}</el-radio>
-				  <el-radio v-model="tenant.status" label="0">{{$t("common.frozen")}}</el-radio>
-				</template>
-      </el-form-item>
-    </el-form>
-    <div slot="footer" class="dialog-footer">
-      <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
-      <el-button plain type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('common.confirm') }}</el-button>
-    </div>
-  </el-dialog>
-</template>
-<script>
-// 【夹具管理】-API
-import trayMgrApi from "@/api/prepareProductMgr/trayMgr"
-
-export default {
-  name: 'TenantEdit',
-  props: {
-    dialogVisible: {
-      type: Boolean,
-      default: false
-    },
-    title: {
-      type: String,
-      default: ''
-    }
-  },
-  data () {
-    return {
-    	loading: false,
-      type: 'add',
-      tableData: [],
-      tenant: this.initTenant(),
-      screenWidth: 0,
-      width: this.initWidth(),
-      confirmDisabled: false,
-      dicts: {
-	      METERIAL_BRAND: {} //工具材料品牌
-	    },
-      roles: [],
-      rules: {
-        name: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  computed: {
-    isVisible: {
-      get () {
-        return this.dialogVisible
-      },
-      set () {
-        this.close()
-        this.reset()
-      }
-    }
-  },
-  mounted () {
-    window.onresize = () => {
-      return (() => {
-        this.width = this.initWidth()
-      })()
-    }
-  },
-  methods: {
-  	// 【新增】按钮-事件
-    addRes(){
-      this.tableData.push({
-      	key: "WKS_"+ Math.random(),
-      	id: '',
-      	positionSort: this.tableData.length + 1,
-      	size: '',
-      	remark: '',
-      	isEdit: true
-      })
-    },
-    // Table的选择事件
-    onSelectChange (selection) {
-      this.selection = selection
-    },
-    // 【删除】按钮事件
-    singleDelete(row){
-    	this.$confirm(this.$t("tips.comTips"), this.$t("common.tips"), {
-      	distinguishCancelAndClose: true,
-        confirmButtonText: this.$t("common.confirm"),
-        cancelButtonText: this.$t("common.cancel"),
-        type: "warning"
-      }).then(() => {
-      	// 过滤符合条件的数据
-      	let arr = this.tableData.filter(item => item.key != row.key || item.id != row.id)
-      	// 给数据排序
-    		arr.forEach((item, index) => {
-    			item.positionSort = index + 1
-    		})
-      	// 给新的数据赋值
-    		this.tableData = arr;
-
-      }).catch(() => {})
-    },
-    // 【修改】按钮事件
-    edit(row){
-    	let list = new Array();
-    	this.tableData.forEach((item, index) => {
-    		// 当前编辑行
-    		if(!!item.id && item.id == row.id){
-    			item.isEdit = true
-    		}
-    		list.push(item)
-    	})
-    	// 赋值给当前
-    	this.tableData = list
-    },
-    initTenant () {
-      return {
-      	model: '',
-        name: '',
-        category: {
-          key: ''
-        },
-        brand: {
-          key: ''
-        },
-        status: '1',
-        num: '1'
-      }
-    },
-    initWidth () {
-      this.screenWidth = document.body.clientWidth
-      if (this.screenWidth < 991) {
-        return '90%'
-      } else if (this.screenWidth < 1400) {
-        return '45%'
-      } else {
-        return '800px'
-      }
-    },
-    setTenant (val, dicts) {
-    	if(val){
-    		this.tenant = { ...val }
-    		// 根据id,查询规格列表数据
-    		this.getSpecsList(val)
-    	}
-      // 字典表
-      this.dicts = dicts
-    },
-    close () {
-      this.$emit('close')
-    },
-    reset () {
-      // 先清除校验,再清除表单,不然有奇怪的bug
-      this.$refs.form.clearValidate()
-      this.$refs.form.resetFields()
-      this.tenant = this.initTenant()
-      this.tableData = []  	//清空【规格】数据
-    },
-    submitForm () {
-    	// 添加夹紧位置数据
-    	this.tenant.trayPositionList = this.tableData
-    	//console.log("Form数据:", this.tenant)
-      this.$refs.form.validate((valid) => {
-        if (valid) {
-          this.confirmDisabled = true
-          if (this.type === 'add') {
-            this.save()
-          } else {
-            this.update()
-          }
-        } else {
-          return false
-        }
-      })
-    },
-    save () {
-      trayMgrApi.save(this.tenant)
-        .then((response) => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.isVisible = false
-            this.$message({
-              message: this.$t('tips.createSuccess'),
-              type: 'success'
-            })
-            // 通知列表
-	          this.$emit("success");
-	          // 通知列表-并关闭弹出框
-	          this.$emit("close");
-          }
-        }).finally(() => {
-          this.confirmDisabled = false
-          return true
-        })
-    },
-    update () {
-      trayMgrApi.update(this.tenant)
-        .then((response) => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.isVisible = false
-            this.$message({
-              message: this.$t('tips.updateSuccess'),
-              type: 'success'
-            })
-            // 通知列表
-	          this.$emit("success");
-	          // 通知列表-并关闭弹出框
-	          this.$emit("close");
-          }
-        }).finally(() => {
-          this.confirmDisabled = false
-          return true
-        })
-    },
-    // 根据【托盘】的id,查询,夹紧位置列表数据
-    getSpecsList(row){
-    	trayMgrApi.listSpecs(row).then(res => {
-    		res = res.data
-    		// console.log("夹紧位置数据:", res)
-    		if(res.isSuccess){
-    			this.tableData = res.data
-    		}
-    	})
-    }
-  }
-}
-</script>
-<style lang="scss" >
-.avatar-uploader .el-upload {
-  border: 1px dashed #d9d9d9;
-  border-radius: 6px;
-  cursor: pointer;
-  position: relative;
-  overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-  border-color: #409eff;
-}
-.avatar-uploader-icon {
-  font-size: 28px;
-  color: #8c939d;
-  width: 100px;
-  height: 100px;
-  line-height: 100px;
-  text-align: center;
-}
-.avatar {
-  width: 100px;
-  height: 100px;
-  display: block;
-}
-.checkUsed{
-	display: inline-block;
-	margin-left: 10px;
-	color: #1890ff;
-}
-</style>
+<template>
+  <el-dialog
+  	:close-on-click-modal="false"
+  	:close-on-press-escape="false"
+  	:title="title"
+  	:append-to-body="true"
+  	:visible.sync="isVisible"
+  	:width="width"
+  	top="50px"
+  >
+    <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
+      <!--编码-->
+      <el-form-item :label='$t("prepare.table.tray.no")+":"' prop="no">
+        <el-input v-model="tenant.no" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <!--名称-->
+      <el-form-item :label='$t("prepare.table.tray.name")+":"' prop="name">
+        <el-input v-model="tenant.name" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <!--物料类型-->
+      <el-form-item :label='$t("prepare.table.tray.materialType")+":"' prop="materialType">
+        <el-input v-model="tenant.materialType" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+<!--      &lt;!&ndash;品牌&ndash;&gt;-->
+<!--    	<el-form-item :label='$t("prepare.table.tray.brand")+":"' prop="brand">-->
+<!--      	<el-select style="width:100%" :placeholder='$t("common.pleaseSelect")' v-model="tenant.brand.key" value>-->
+<!--          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.METERIAL_BRAND" />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+      <!--生产分厂/制造商-->
+      <el-form-item :label='$t("prepare.table.tray.factory")+":"' prop="factory">
+        <el-input v-model="tenant.factory" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+
+      <el-form-item :label='$t("prepare.table.tray.joinDate")+":"' prop="joinDate">
+        <el-date-picker
+          v-model="tenant.joinDate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label='$t("prepare.table.tray.period")+":"' prop="period">
+        <el-input-number v-model="tenant.period" :min="1" :max="1000" label="12"></el-input-number>&nbsp;&nbsp;月
+      </el-form-item>
+      <el-form-item :label="$t('prepare.table.tray.expiryDate')+':'" prop="expiryDate">
+        <el-input-number v-model="tenant.expiryDate" :min="1" :max="1000" label="12"></el-input-number>&nbsp;&nbsp;月
+      </el-form-item>
+      <el-form-item :label='$t("prepare.table.tray.num")+":"' prop="num">
+        <el-input-number v-model="tenant.num" :min="1" :max="1000" label="1"></el-input-number>&nbsp;&nbsp;个
+      </el-form-item>
+
+      <!--夹紧位置-->
+<!--      <el-form-item :label='$t("prepare.table.tray.positionSort")+":"'>-->
+<!--        &lt;!&ndash; 功能按钮 &ndash;&gt;-->
+<!--		    <el-row class="filter-container">-->
+<!--		    	<el-col>-->
+<!--		    		<el-button type="primary" icon="el-icon-plus" size="medium" @click="addRes">新增</el-button>-->
+<!--		    	</el-col>-->
+<!--		    </el-row>-->
+<!--		    &lt;!&ndash; Table数据 &ndash;&gt;-->
+<!--				<el-table-->
+<!--		      ref="table"-->
+<!--		      v-loading="loading"-->
+<!--		      :data="tableData"-->
+<!--		      border-->
+<!--		      fit-->
+<!--		      style="width: 100%;"-->
+<!--		      @selection-change="onSelectChange"-->
+<!--		    >-->
+<!--		      <el-table-column prop="positionSort" :label='$t("prepare.table.trayPosition.positionSort")' align="center" width="70px">-->
+<!--		      	<template slot-scope="{ row }">-->
+<!--		      		<span>{{row.positionSort}}</span>-->
+<!--		      	</template>-->
+<!--		      </el-table-column>-->
+<!--		      <el-table-column prop="size" :label='$t("prepare.table.trayPosition.size")' align="center" width="100px">-->
+<!--		      	<template slot-scope="{ row }">-->
+<!--		      		<el-input size="small" v-model="row.size" v-if="row.isEdit" :placeholder='$t("common.pleaseEnter")'></el-input>-->
+<!--		      		<span v-else>{{row.size}}</span>-->
+<!--		      	</template>-->
+<!--		      </el-table-column>-->
+<!--		      <el-table-column prop="remark" :label='$t("prepare.table.trayPosition.remark")'>-->
+<!--		      	<template slot-scope="{ row }">-->
+<!--		      		<el-input size="small" v-model="row.remark" v-if="row.isEdit" :placeholder='$t("common.pleaseEnter")'></el-input>-->
+<!--		      		<span v-else>{{row.remark}}</span>-->
+<!--		      	</template>-->
+<!--		      </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 v-if="type != 'add'" class="item" :content='$t("common.edit")' effect="dark" placement="top-start">-->
+<!--			          <i-->
+<!--			            class="el-icon-edit table-operation"-->
+<!--			            style="color: #2db7f5;"-->
+<!--			            @click="edit(row)"-->
+<!--			          />-->
+<!--			        </el-tooltip>-->
+<!--		          <el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">-->
+<!--			          <i-->
+<!--			            class="el-icon-delete table-operation"-->
+<!--			            style="color: #f50;"-->
+<!--			            @click="singleDelete(row)"-->
+<!--			          />-->
+<!--		          </el-tooltip>-->
+<!--		        </template>-->
+<!--		      </el-table-column>-->
+<!--		    </el-table>-->
+<!--      </el-form-item>-->
+      <el-form-item :label='$t("prepare.table.tools.status")+":"' prop="status">
+        <template>
+				  <el-radio v-model="tenant.status" label="1">{{$t("common.status.valid")}}</el-radio>
+				  <el-radio v-model="tenant.status" label="0">{{$t("common.frozen")}}</el-radio>
+				</template>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
+      <el-button plain type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('common.confirm') }}</el-button>
+    </div>
+  </el-dialog>
+</template>
+<script>
+// 【夹具管理】-API
+import trayMgrApi from "@/api/prepareProductMgr/trayMgr"
+
+export default {
+  name: 'TenantEdit',
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+    	loading: false,
+      type: 'add',
+      tableData: [],
+      tenant: this.initTenant(),
+      screenWidth: 0,
+      width: this.initWidth(),
+      confirmDisabled: false,
+      dicts: {
+	      METERIAL_BRAND: {} //工具材料品牌
+	    },
+      roles: [],
+      rules: {
+        name: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  computed: {
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+        this.reset()
+      }
+    }
+  },
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+  	// 【新增】按钮-事件
+    addRes(){
+      this.tableData.push({
+      	key: "WKS_"+ Math.random(),
+      	id: '',
+      	positionSort: this.tableData.length + 1,
+      	size: '',
+      	remark: '',
+      	isEdit: true
+      })
+    },
+    // Table的选择事件
+    onSelectChange (selection) {
+      this.selection = selection
+    },
+    // 【删除】按钮事件
+    singleDelete(row){
+    	this.$confirm(this.$t("tips.comTips"), this.$t("common.tips"), {
+      	distinguishCancelAndClose: true,
+        confirmButtonText: this.$t("common.confirm"),
+        cancelButtonText: this.$t("common.cancel"),
+        type: "warning"
+      }).then(() => {
+      	// 过滤符合条件的数据
+      	let arr = this.tableData.filter(item => item.key != row.key || item.id != row.id)
+      	// 给数据排序
+    		arr.forEach((item, index) => {
+    			item.positionSort = index + 1
+    		})
+      	// 给新的数据赋值
+    		this.tableData = arr;
+
+      }).catch(() => {})
+    },
+    // 【修改】按钮事件
+    edit(row){
+    	let list = new Array();
+    	this.tableData.forEach((item, index) => {
+    		// 当前编辑行
+    		if(!!item.id && item.id == row.id){
+    			item.isEdit = true
+    		}
+    		list.push(item)
+    	})
+    	// 赋值给当前
+    	this.tableData = list
+    },
+    initTenant () {
+      return {
+      	model: '',
+        name: '',
+        category: {
+          key: ''
+        },
+        brand: {
+          key: ''
+        },
+        status: '1',
+        num: '1'
+      }
+    },
+    initWidth () {
+      this.screenWidth = document.body.clientWidth
+      if (this.screenWidth < 991) {
+        return '90%'
+      } else if (this.screenWidth < 1400) {
+        return '45%'
+      } else {
+        return '800px'
+      }
+    },
+    setTenant (val, dicts) {
+    	if(val){
+    		this.tenant = { ...val }
+    		// 根据id,查询规格列表数据
+    		this.getSpecsList(val)
+    	}
+      // 字典表
+      this.dicts = dicts
+    },
+    close () {
+      this.$emit('close')
+    },
+    reset () {
+      // 先清除校验,再清除表单,不然有奇怪的bug
+      this.$refs.form.clearValidate()
+      this.$refs.form.resetFields()
+      this.tenant = this.initTenant()
+      this.tableData = []  	//清空【规格】数据
+    },
+    submitForm () {
+    	// 添加夹紧位置数据
+    	this.tenant.trayPositionList = this.tableData
+    	//console.log("Form数据:", this.tenant)
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.confirmDisabled = true
+          if (this.type === 'add') {
+            this.save()
+          } else {
+            this.update()
+          }
+        } else {
+          return false
+        }
+      })
+    },
+    save () {
+      trayMgrApi.save(this.tenant)
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.isVisible = false
+            this.$message({
+              message: this.$t('tips.createSuccess'),
+              type: 'success'
+            })
+            // 通知列表
+	          this.$emit("success");
+	          // 通知列表-并关闭弹出框
+	          this.$emit("close");
+          }
+        }).finally(() => {
+          this.confirmDisabled = false
+          return true
+        })
+    },
+    update () {
+      trayMgrApi.update(this.tenant)
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.isVisible = false
+            this.$message({
+              message: this.$t('tips.updateSuccess'),
+              type: 'success'
+            })
+            // 通知列表
+	          this.$emit("success");
+	          // 通知列表-并关闭弹出框
+	          this.$emit("close");
+          }
+        }).finally(() => {
+          this.confirmDisabled = false
+          return true
+        })
+    },
+    // 根据【托盘】的id,查询,夹紧位置列表数据
+    getSpecsList(row){
+    	trayMgrApi.listSpecs(row).then(res => {
+    		res = res.data
+    		// console.log("夹紧位置数据:", res)
+    		if(res.isSuccess){
+    			this.tableData = res.data
+    		}
+    	})
+    }
+  }
+}
+</script>
+<style lang="scss" >
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 100px;
+  height: 100px;
+  line-height: 100px;
+  text-align: center;
+}
+.avatar {
+  width: 100px;
+  height: 100px;
+  display: block;
+}
+.checkUsed{
+	display: inline-block;
+	margin-left: 10px;
+	color: #1890ff;
+}
+</style>

+ 14 - 6
imcs-ui/src/views/zuihou/qualityCenter/unqualifiedMgr/Index.vue

@@ -3,12 +3,8 @@
 		<!-- 搜索模块 -->
     <div class="filter-container">
     	<span>
-    		<span>{{$t("lineSide.searchForm.typeName")}}:</span>
-    		<el-input v-model="queryParams.model.name" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
-    	</span>
-    	<span style="margin-left: 15px;">
     		<span>{{$t("lineSide.searchForm.status")}}:</span>
-    		<el-select v-model="queryParams.model.status" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
+    		<el-select v-model="queryParams.model.handleStatus" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
         	<el-option
 			      v-for="item in audioStatus"
 			      :key="item.value"
@@ -17,6 +13,18 @@
 			    </el-option>
       	</el-select>
     	</span>
+    	<span style="margin-left: 15px;">
+    		<span>{{$t("machining.table.unQuality.uniqueCode")}}:</span>
+    		<el-input v-model="queryParams.model.uniqueCode" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
+    	<span style="margin-left: 15px;">
+    		<span>订单名称:</span>
+    		<el-input v-model="queryParams.model.orderName" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
+    	<span style="margin-left: 15px;">
+    		<span>零件名称:</span>
+    		<el-input v-model="queryParams.model.bomName" :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">
 	        {{ $t("table.search") }}
@@ -228,7 +236,7 @@
 	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
 	  created() {
 	  	// 调用常量-审核状态
-	  	this.audioStatus = this.$constWKS.SHOWHIDE
+	  	this.audioStatus = this.$constWKS.WAITINGLIST
 	  	// 加载【字典】
 	  	initDicts(['NATION'], this.dicts);
 	  	// 加载列表数据