|
@@ -8,7 +8,8 @@
|
|
|
<el-radio label="2">{{$t("prepare.common.idNeed.reception")}}</el-radio>
|
|
|
<el-radio label="3">{{$t("prepare.common.idNeed.need")}}</el-radio>
|
|
|
</el-radio-group>
|
|
|
- <el-button :disabled="showButton" type="primary" icon="el-icon-plus" size="small" @click="add" circle></el-button>
|
|
|
+ <!--<el-button :disabled="showButton" type="primary" icon="el-icon-plus" size="small" @click="add" circle></el-button>-->
|
|
|
+ <el-button :disabled="showButton" type="primary" icon="el-icon-plus" size="small" @click="editTools" circle></el-button>
|
|
|
<span style="margin-left: 50px;">
|
|
|
<el-checkbox v-model="armTrayConf" :disabled="showRadio">{{$t("prepare.common.armTrayConf")}}</el-checkbox>
|
|
|
<el-checkbox v-model="armFixtureConf" :disabled="showRadio">{{$t("prepare.common.armFixtureConf")}}</el-checkbox>
|
|
@@ -26,14 +27,13 @@
|
|
|
@current-change="handleCurrentChange"
|
|
|
style="width: 100%;"
|
|
|
header-row-class-name="technologTable"
|
|
|
- :span-method="objectSpanMethod"
|
|
|
>
|
|
|
<!-- 组序 -->
|
|
|
- <el-table-column prop="groupSort" :label='$t("prepare.table.toolGroup.groupSort")' align="center" width="70px"></el-table-column>
|
|
|
+ <!--<el-table-column prop="groupSort" :label='$t("prepare.table.toolGroup.groupSort")' align="center" width="70px"></el-table-column>-->
|
|
|
<!-- 优先级 -->
|
|
|
- <el-table-column prop="groupPrority" :label='$t("prepare.table.toolGroup.groupPrority")' align="center" width="80px"></el-table-column>
|
|
|
+ <!--<el-table-column prop="groupPrority" :label='$t("prepare.table.toolGroup.groupPrority")' align="center" width="80px"></el-table-column>-->
|
|
|
<!-- 类型 -->
|
|
|
- <el-table-column prop="category.data" :label='$t("prepare.table.toolGroup.category")' align="center" width="100px">
|
|
|
+ <!--<el-table-column prop="category.data" :label='$t("prepare.table.toolGroup.category")' align="center" width="100px">
|
|
|
<template slot-scope="{ row }">
|
|
|
<div v-if="type == 'view'">{{row.category.data}}</div>
|
|
|
<div v-else>
|
|
@@ -41,7 +41,7 @@
|
|
|
<el-button v-else type="text" @click="addRow(row)">{{row.category.data}}</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column>-->
|
|
|
<!-- 名称 -->
|
|
|
<el-table-column prop="name" :label='$t("prepare.table.toolGroup.name")' align="center" width="120px" :show-overflow-tooltip="true"></el-table-column>
|
|
|
<!-- 编号 -->
|
|
@@ -53,7 +53,7 @@
|
|
|
<!-- 使用加紧位置 -->
|
|
|
<el-table-column prop="positions" :label='$t("prepare.table.toolGroup.positions")' align="center" width="180px"></el-table-column>
|
|
|
<!-- 装甲方式 -->
|
|
|
- <el-table-column prop="armorPic" :label='$t("prepare.table.toolGroup.armorPic")' align="center" width="180px">
|
|
|
+ <!--<el-table-column prop="armorPic" :label='$t("prepare.table.toolGroup.armorPic")' align="center" width="180px">
|
|
|
<template slot-scope="{ row }" v-if="row.category.key == '02'">
|
|
|
<div v-if="row.jjImgList && row.jjImgList.length > 0" class="demo-image__preview">
|
|
|
<el-image
|
|
@@ -64,9 +64,9 @@
|
|
|
</div>
|
|
|
<el-button v-else type="text" @click="handleClick(row)">{{$t("common.uploadImg")}}</el-button>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column>-->
|
|
|
<!-- 备注 -->
|
|
|
- <el-table-column prop="remark" :label='$t("common.remark")' width="180px">
|
|
|
+ <el-table-column prop="remark" :label='$t("common.remark")'>
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-input size="small" v-model="row.remark" :placeholder='$t("common.pleaseEnter")'></el-input>
|
|
|
</template>
|
|
@@ -80,7 +80,8 @@
|
|
|
column-key="operation"
|
|
|
width="60px"
|
|
|
>
|
|
|
- <template slot-scope="{ row }" v-if="row.category.key == '03'">
|
|
|
+ <!--<template slot-scope="{ row }" v-if="row.category.key == '03'">-->
|
|
|
+ <template slot-scope="{ row }">
|
|
|
<!--<el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
|
|
|
<i
|
|
|
class="el-icon-edit table-operation"
|
|
@@ -381,6 +382,7 @@
|
|
|
this.fileList = Object.assign([],row.jjImgList)
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
// 上传成功,push到当前行的jjImgList数组中
|
|
|
handleSuccss(res, file, fileList) {
|
|
|
// console.log("图片:", res)
|
|
@@ -393,7 +395,8 @@
|
|
|
this.uploadQcVisible = false
|
|
|
this.closePic()
|
|
|
},
|
|
|
- //关闭对话框时,重载组件,并且把fileList清空,否则会有异常
|
|
|
+
|
|
|
+ //关闭对话框时,重载组件,并且把fileList清空,否则会有异常
|
|
|
closePic() {
|
|
|
this.timer = new Date().getTime()
|
|
|
this.fileList = []
|
|
@@ -425,6 +428,7 @@
|
|
|
this.$refs.table.clearFilter()
|
|
|
this.search()
|
|
|
},
|
|
|
+
|
|
|
// 【删除】按钮-事件 groupSort
|
|
|
domDelete(row){
|
|
|
|
|
@@ -449,6 +453,7 @@
|
|
|
this.$emit("setProgram", this.tableData.filter(item => item.category.key == '03'))
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
+
|
|
|
// 托盘【新增】按钮-事件
|
|
|
add () {
|
|
|
// 设置【组序】
|
|
@@ -460,6 +465,7 @@
|
|
|
this.dialogAdd.title = this.$t("common.add") + this.$t("prepare.common.tpJgroup")
|
|
|
this.dialogAdd.isVisible = true
|
|
|
},
|
|
|
+
|
|
|
// 托盘【修改】按钮-事件
|
|
|
addRow(row){
|
|
|
// 设置【组序】
|
|
@@ -468,10 +474,12 @@
|
|
|
this.dialogAdd.title = this.$t("common.edit") + this.$t("prepare.common.tpJgroup")
|
|
|
this.dialogAdd.isVisible = true
|
|
|
},
|
|
|
+
|
|
|
// 弹出框【取消】按钮-事件
|
|
|
editAddClose () {
|
|
|
this.dialogAdd.isVisible = false
|
|
|
},
|
|
|
+
|
|
|
// 弹出框【确定】按钮-事件
|
|
|
editAddSuccess (arr) {
|
|
|
// 通过深层复制,避免相同地址引起数据,一起改变
|
|
@@ -524,6 +532,7 @@
|
|
|
// 把值给父组件【程序】赋值
|
|
|
this.$emit("setProgram", this.tableData.filter(item => item.category.key == '03'))
|
|
|
},
|
|
|
+
|
|
|
// 设置数据前,需要合并
|
|
|
setDataMustSpan(data){
|
|
|
this.tableData = data
|
|
@@ -535,15 +544,39 @@
|
|
|
this.$emit("setProgram", this.tableData.filter(item => item.category.key == '03'))
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
// 【夹具】修改-事件
|
|
|
editTools(row){
|
|
|
this.dialog.title = this.$t("common.edit") + this.$t("prepare.common.tab5")
|
|
|
this.dialog.isVisible = true
|
|
|
},
|
|
|
+
|
|
|
editClose(){
|
|
|
this.dialog.isVisible = false
|
|
|
},
|
|
|
+
|
|
|
editSuccess(obj){
|
|
|
+ // 最新数组
|
|
|
+ let list = []
|
|
|
+ // 深度Copy,防止翻车
|
|
|
+ let tool = JSON.parse(obj);
|
|
|
+ let arr = tool.specification2.split(",");
|
|
|
+ let item = {
|
|
|
+ trayPositionId: tool.id,
|
|
|
+ trayId: tool.trayId, // 夹具id
|
|
|
+ no: tool.no, // 编号
|
|
|
+ name: tool.name, // 名称
|
|
|
+ brand: tool.brand, // 品牌
|
|
|
+ specification: arr[1], // 规格
|
|
|
+ specificationId: arr[0] // 规格id
|
|
|
+ };
|
|
|
+ // 添加数据
|
|
|
+ list.push(item);
|
|
|
+ // 重新赋值
|
|
|
+ this.tableData = [...this.tableData, ...list];
|
|
|
+ },
|
|
|
+
|
|
|
+ editSuccess_v1(obj){
|
|
|
// 深度Copy,防止翻车
|
|
|
let tool = JSON.parse(obj)
|
|
|
// console.log("选择的对象:", tool)
|
|
@@ -569,6 +602,7 @@
|
|
|
// 重新赋值
|
|
|
this.tableData = list
|
|
|
},
|
|
|
+
|
|
|
clearSelections () {
|
|
|
this.$refs.table.clearSelection()
|
|
|
},
|