Browse Source

领料单发料优化

master
shenzhouyu 1 month ago
parent
commit
d24953000f
  1. 38
      src/views/modules/orderIssure/newSoIssueNotify.vue

38
src/views/modules/orderIssure/newSoIssueNotify.vue

@ -130,11 +130,14 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="searchSOSRouting()" style="margin-top: 5px" class="" :loading="seqNoModalLoading">添加</el-button> <el-button type="primary" @click="searchSOSRouting()" style="margin-top: 5px" class="" :loading="seqNoModalLoading">添加</el-button>
<el-button type="danger" @click="deleteSeqNoByOrderNo()" style="margin-top: 5px" class="">删除</el-button> <el-button type="danger" @click="deleteSeqNoByOrderNo()" style="margin-top: 5px" class="">删除</el-button>
<el-button type="danger" @click="deleteSelectedSeqNo()" style="margin-top: 5px" class="" :disabled="selectedSeqNoRows.length === 0">删除勾选</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-table :height="400" :data="seqNoList" border style="width: 100%;" class="choose-sos-table">
<el-table :height="400" :data="seqNoList" border style="width: 100%;" class="choose-sos-table"
@selection-change="handleSeqNoSelectionChange" ref="seqNoTable">
<el-table-column type="selection" width="55" header-align="center" align="center"></el-table-column>
<el-table-column v-for="(item,index) in columnList2" :key="index" :sortable="item.columnSortable" <el-table-column v-for="(item,index) in columnList2" :key="index" :sortable="item.columnSortable"
:prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip" :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth" :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
@ -481,6 +484,7 @@ export default {
endDate: '', endDate: '',
}, },
seqNoList: [], seqNoList: [],
selectedSeqNoRows: [], //
height: 200, height: 200,
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
@ -1902,6 +1906,38 @@ export default {
// //
}) })
}, },
//
handleSeqNoSelectionChange(selection) {
this.selectedSeqNoRows = selection
},
//
deleteSelectedSeqNo() {
if (this.selectedSeqNoRows.length === 0) {
this.$message.warning('请先勾选要删除的数据!')
return false
}
this.$confirm(`确定要删除选中的 ${this.selectedSeqNoRows.length} 条数据吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
// 使 orderNo + lineItemNo
const deleteKeys = this.selectedSeqNoRows.map(row => `${row.orderNo}_${row.lineItemNo || ''}`)
//
this.seqNoList = this.seqNoList.filter(row => {
const rowKey = `${row.orderNo}_${row.lineItemNo || ''}`
return !deleteKeys.includes(rowKey)
})
//
this.selectedSeqNoRows = []
if (this.$refs.seqNoTable) {
this.$refs.seqNoTable.clearSelection()
}
this.$message.success(`成功删除 ${deleteKeys.length} 条数据`)
}).catch(() => {
//
})
},
saveMaterialDetail() { saveMaterialDetail() {
for (let i = 0; i < this.sobomList.length; i++) { for (let i = 0; i < this.sobomList.length; i++) {
if ( if (

Loading…
Cancel
Save