|
@@ -60,7 +60,7 @@
|
|
<input
|
|
<input
|
|
type="text"
|
|
type="text"
|
|
v-model="row.name"
|
|
v-model="row.name"
|
|
- :disabled="!row.isEditing"
|
|
|
|
|
|
+ :disabled="!row.isEditing || row.outnum > 0 || isReferenceTable(activeButtonId) || row.pronumDisabled"
|
|
|
|
|
|
:class="isReferenceTable(activeButtonId)? 'readonly-input' : ''"
|
|
:class="isReferenceTable(activeButtonId)? 'readonly-input' : ''"
|
|
:style="row.inputStyle"
|
|
:style="row.inputStyle"
|
|
@@ -71,7 +71,7 @@
|
|
<input
|
|
<input
|
|
type="text"
|
|
type="text"
|
|
v-model="row.pronum"
|
|
v-model="row.pronum"
|
|
- :disabled="!row.isEditing "
|
|
|
|
|
|
+ :disabled="!row.isEditing || row.outnum > 0 || isReferenceTable(activeButtonId) || row.pronumDisabled"
|
|
|
|
|
|
:class="isReferenceTable(activeButtonId)? 'readonly-input' : ''"
|
|
:class="isReferenceTable(activeButtonId)? 'readonly-input' : ''"
|
|
:style="row.inputStyle"
|
|
:style="row.inputStyle"
|
|
@@ -116,12 +116,12 @@
|
|
<div style="margin-left: 20px;" class="righttab">
|
|
<div style="margin-left: 20px;" class="righttab">
|
|
<div class="right-tables-wrapper" style="overflow-y: auto; max-height: 80vh;">
|
|
<div class="right-tables-wrapper" style="overflow-y: auto; max-height: 80vh;">
|
|
<div v-for="(rightTable, rightTableIndex) in rightTables" :key="rightTableIndex"
|
|
<div v-for="(rightTable, rightTableIndex) in rightTables" :key="rightTableIndex"
|
|
- :class="'right-table-container-' + rightTableIndex" @click="setActiveRightTable(rightTableIndex)"
|
|
|
|
|
|
+ :class="'right-table-container-' + rightTableIndex"
|
|
style="margin-top: 5px; width: 1110px; background-color: #f0f0f0; border-radius: 10px;"
|
|
style="margin-top: 5px; width: 1110px; background-color: #f0f0f0; border-radius: 10px;"
|
|
>
|
|
>
|
|
<div style="display: flex; align-items: center;">
|
|
<div style="display: flex; align-items: center;">
|
|
<input type="radio" name="rightTableIndex" :value="rightTableIndex+1" v-model="rightTable.isChecked"
|
|
<input type="radio" name="rightTableIndex" :value="rightTableIndex+1" v-model="rightTable.isChecked"
|
|
- @click="showInfo(rightTableIndex)"
|
|
|
|
|
|
+ @click="showInfo(rightTableIndex), setActiveRightTable(rightTableIndex)"
|
|
style="width: 20px; height: 20px; margin-right: 10px;"
|
|
style="width: 20px; height: 20px; margin-right: 10px;"
|
|
/>
|
|
/>
|
|
<div class="content" style="flex: 1;">
|
|
<div class="content" style="flex: 1;">
|
|
@@ -597,6 +597,7 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
const newItem = {
|
|
const newItem = {
|
|
|
|
+ id: '',
|
|
num: this.rightTables[selectedRightTableIndex].data.length + 1,
|
|
num: this.rightTables[selectedRightTableIndex].data.length + 1,
|
|
name: row.name,
|
|
name: row.name,
|
|
pronum: row.pronum,
|
|
pronum: row.pronum,
|
|
@@ -619,16 +620,17 @@ export default {
|
|
console.log('这是添加', res)
|
|
console.log('这是添加', res)
|
|
this.rightTableId = res.data
|
|
this.rightTableId = res.data
|
|
console.log("这是this.teamCode",this.teamCode)
|
|
console.log("这是this.teamCode",this.teamCode)
|
|
-
|
|
|
|
- initGroup(this.teamCode).then(res => {
|
|
|
|
- console.log("这是查到的小组的数据",res)
|
|
|
|
- this.loadInitialData(res)
|
|
|
|
- })
|
|
|
|
|
|
+ newItem.id = res.data
|
|
|
|
+ console.log('这是+对应的数据详情', newItem)
|
|
|
|
+ this.rightTables[selectedRightTableIndex].data.push(newItem)
|
|
|
|
+ this.$set(this.rightTables, selectedRightTableIndex, this.rightTables[selectedRightTableIndex])
|
|
|
|
+ this.increaseOutnum(rowIndex)
|
|
|
|
+ // initGroup(this.teamCode).then(res => {
|
|
|
|
+ // console.log("这是查到的小组的数据",res)
|
|
|
|
+ // this.loadInitialData(res)
|
|
|
|
+ // })
|
|
})
|
|
})
|
|
- console.log('这是+对应的数据详情', newItem)
|
|
|
|
- this.rightTables[selectedRightTableIndex].data.push(newItem)
|
|
|
|
- this.$set(this.rightTables, selectedRightTableIndex, this.rightTables[selectedRightTableIndex])
|
|
|
|
- this.increaseOutnum(rowIndex)
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
increaseOutnum(rowIndex) {
|
|
increaseOutnum(rowIndex) {
|
|
@@ -707,11 +709,15 @@ export default {
|
|
handleMinusClick(index, rightTableIndex) {
|
|
handleMinusClick(index, rightTableIndex) {
|
|
console.log('被删除的数据详情', this.rightTables[rightTableIndex].data[index])
|
|
console.log('被删除的数据详情', this.rightTables[rightTableIndex].data[index])
|
|
let id = this.rightTables[rightTableIndex].data[index].id
|
|
let id = this.rightTables[rightTableIndex].data[index].id
|
|
- if (id === '' || id === null || id === undefined) {
|
|
|
|
- id = this.rightTableId
|
|
|
|
- }
|
|
|
|
|
|
+ // if (id === '' || id === null || id === undefined) {
|
|
|
|
+ // id = this.rightTableId
|
|
|
|
+ // }
|
|
delInstance(id).then(response => {
|
|
delInstance(id).then(response => {
|
|
console.log('这是删除', response)
|
|
console.log('这是删除', response)
|
|
|
|
+ // initGroup(this.teamCode).then(res => {
|
|
|
|
+ // console.log("这是查到的小组的数据",res)
|
|
|
|
+ // this.loadInitialData(res)
|
|
|
|
+ // })
|
|
})
|
|
})
|
|
this.rightTables[rightTableIndex].data.splice(index, 1)
|
|
this.rightTables[rightTableIndex].data.splice(index, 1)
|
|
this.rightTables[rightTableIndex].data.forEach((item, newIndex) => {
|
|
this.rightTables[rightTableIndex].data.forEach((item, newIndex) => {
|