diff --git a/src/api/test/testSoRouting.js b/src/api/test/testSoRouting.js
new file mode 100644
index 0000000..0fded3d
--- /dev/null
+++ b/src/api/test/testSoRouting.js
@@ -0,0 +1,5 @@
+import {createAPI} from "../../utils/httpRequest";
+export const selectTestSoRoutingList = (data) => createAPI(`/test/soRouting/list`,'post',data)
+export const saveTestSoRouting = (data) => createAPI(`/test/soRouting/save`,'post',data)
+export const updateTestSoRouting = (data) => createAPI(`/test/soRouting/update`,'post',data)
+export const removeBatchTestSoRouting = (data) => createAPI(`/test/soRouting/remove`,'post',data)
diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue
index efc230c..159e481 100644
--- a/src/views/modules/test/requestForTest.vue
+++ b/src/views/modules/test/requestForTest.vue
@@ -272,6 +272,9 @@
@row-click="projectPartClickRow"
@selection-change="selectionProjectPart"
:row-key="getRowKeys"
+ @select="selectTestPart"
+ @select-all="selectAllTestPart"
+ header-cell-class-name="cellClass"
border
v-loading="dataListLoading"
style="width: 100%;">
@@ -301,18 +304,15 @@
-
+
-
- 新增
- 删除
-
+
- 保存
+ 保存
关闭
@@ -583,7 +583,10 @@
-
+
+
+
+
@@ -897,8 +900,11 @@
updateTestSoBom
} from "../../../api/test/testSoBom";
import TestTable from "./testSoBom/testTable.vue";
+ import TestRoutingTable from "./testSoRouting/testRoutingTable.vue";
+ import {selectTestSoRoutingList} from "../../../api/test/testSoRouting";
export default {
components: {
+ TestRoutingTable,
TestTable,
DictDataSelect,
Chooselist,
@@ -923,9 +929,11 @@
},
data () {
return {
+ testSoRoutingList:[],
testSoBomList:[],
activeTab:'part',
activeTabList:['part'],
+ clickTestRow:false,
// 导出
exportData: [],
exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
@@ -1805,6 +1813,14 @@
getRowKeys (row) {
return row.testPartNo;
},
+ // 勾选多选框
+ selectTestPart(selection,row){
+ this.$refs.projectPartTable.clearSelection();
+ this.$refs.projectPartTable.toggleRowSelection(row,true)
+ },
+ selectAllTestPart(selection){
+ this.$refs.projectPartTable.clearSelection();
+ },
/**
* 未知
* @returns {boolean}
@@ -2055,6 +2071,8 @@
}
this.confirmProjectPart();
if (this.modalData.flag === '1'){
+ this.testSoRoutingList = []
+ this.testSoBomList = []
this.saveTest()
}else {
this.updateTest()
@@ -2123,10 +2141,8 @@
this.activeTabList = ['part','product','process']
this.activeTab = 'product'
this.modalData.testNo = data.row
- this.testSoBomList = []
// this.modalFlag = false
this.$message.success("操作成功")
- this.selectTestSoBom();
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
@@ -2197,11 +2213,12 @@
// this.$refs.testTable.toggleRowSelection(row)
this.testCurrentRow = JSON.parse(JSON.stringify(row))
this.testDetailData = JSON.parse(JSON.stringify(row))
+ // 刷新组件
+ this.clickTestRow = false;
+ this.clickTestRow = true;
if (row){
- this.$nextTick(()=>{
- this.$refs.tabSoBom.clearTable();
- })
this.selectTestSoBom()
+ this.selectTestSoRoutingList()
}
},
/**
@@ -2608,6 +2625,7 @@
}
this.activeTab = 'part';
this.activeTabList = ['part']
+ this.$refs.projectPartTable.clearSelection()
},
checkSelectable(row,index){
if (this.modalData.flag === '1' && this.activeTabList.length === 1){
@@ -2658,13 +2676,20 @@
selectTestSoBom(params).then(({data})=>{
if (data && data.code === 0 ){
this.testSoBomList = data.rows
- }else {
- this.$message.error(data.msg)
}
- }).catch((error)=>{
- this.$message.error(error)
})
- }
+ },
+ selectTestSoRoutingList(){
+ let params = {
+ site:this.$store.state.user.site,
+ testNo:this.modalData.testNo?this.modalData.testNo:this.testCurrentRow.testNo,
+ }
+ selectTestSoRoutingList(params).then(({data})=>{
+ if (data && data.code === 0){
+ this.testSoRoutingList = data.rows
+ }
+ })
+ },
}
}
@@ -2686,5 +2711,14 @@
-moz-appearance: textfield;
padding-right: 5px !important;
}
+
+/deep/ .el-table .cellClass .cell .el-checkbox__inner{
+ display: none;
+ position: relative;
+}
+/deep/ .el-table .cellClass .cell:before{
+ content: "";
+ position: absolute;
+}
diff --git a/src/views/modules/test/testSoBom/testTable.vue b/src/views/modules/test/testSoBom/testTable.vue
index eccf6b9..71b1f73 100644
--- a/src/views/modules/test/testSoBom/testTable.vue
+++ b/src/views/modules/test/testSoBom/testTable.vue
@@ -96,7 +96,7 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100
+ columnWidth: 50
},{
userId: this.$store.state.user.name,
functionId: 102001,
@@ -309,7 +309,7 @@ export default {
},
created() {
if (this.columnList.length !== 0){
- this.testSoBomColumnList = this.columnList
+ this.testSoBomColumnList = [...this.columnList]
}
},
methods:{
@@ -348,7 +348,7 @@ export default {
this.saveOrUpdateFlag = true
},
removeBatchTestSoBom(){
- if (this.dataList.length === 0){
+ if (this.selectionTestSoBomList.length === 0){
this.$message.warning("请勾选需要删除的信息")
return
}
@@ -419,7 +419,6 @@ export default {
saveTestSoBomBtn(){
this.$refs.saveForm.validate((validate,objects)=>{
if (validate){
- console.log(this.testSoBom.itemNo)
if (this.testSoBom.itemNo !== undefined && this.testSoBom.itemNo !== null && this.testSoBom.itemNo !== ''){
updateTestSoBom(this.testSoBom).then(({data})=>{
if (data && data.code === 0){
@@ -569,7 +568,7 @@ export default {
-
diff --git a/src/views/modules/test/testSoRouting/testRoutingTable.vue b/src/views/modules/test/testSoRouting/testRoutingTable.vue
new file mode 100644
index 0000000..4f2caad
--- /dev/null
+++ b/src/views/modules/test/testSoRouting/testRoutingTable.vue
@@ -0,0 +1,687 @@
+
+
+
+
+
+ 新增
+ 删除
+
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+ 编辑
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 加工中心
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+
+
+