Browse Source

托盘重量

java8
han\hanst 3 months ago
parent
commit
fb497ec609
  1. 21
      src/views/modules/ecss/codelnotifyConfirm.vue
  2. 90
      src/views/modules/ecss/del_upload_excel.vue

21
src/views/modules/ecss/codelnotifyConfirm.vue

@ -1700,6 +1700,24 @@
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table4PalletQty',
tableId: "801002Table4",
tableName: "装箱栈板主表",
columnProp: "weight",
headerAlign: "center",
align: "right",
columnLabel: "重量(KG)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
@ -3076,6 +3094,9 @@
case 'palletQty':
sums[index] = `${values.reduce((a, b) => a + b, 0)}`;
break;
case 'weight':
sums[index] = `${values.reduce((a, b) => a + b, 0)}`;
break;
default:
sums[index] = '';
}

90
src/views/modules/ecss/del_upload_excel.vue

@ -36,16 +36,36 @@
<div v-if="showPreview" style="margin-top: 10px; margin-bottom: 10px;">
<!-- 可导入的发票表格 -->
<div v-if="validInvoices.length > 0">
<span style="color: #67C23A; ">
<i class="el-icon-success" style="margin-right: 8px;"></i>
可导入的发票 ({{ validInvoices.length }}个发票)
</span>
<el-table :data="validInvoices" border style="width: 100%" max-height="300" :show-overflow-tooltip="true" class="delClass valid-table">
<el-table-column label="操作" width="40" fixed="left">
<div style="display: flex; align-items: center; margin-bottom: 8px;">
<span style="color: #67C23A;">
<i class="el-icon-success" style="margin-right: 8px;"></i>
可导入的发票 ({{ validInvoices.length }}个发票)
</span>
<el-button
type="danger"
size="mini"
style="margin-left: 15px;"
:disabled="selectedRows.length === 0"
@click="batchDeleteRows">
<i class="el-icon-delete"></i>
批量删除 <span v-if="selectedRows.length > 0">({{ selectedRows.length }})</span>
</el-button>
</div>
<el-table
:data="validInvoices"
border
style="width: 100%"
max-height="300"
:show-overflow-tooltip="true"
class="delClass valid-table"
ref="validInvoicesTable"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="40" fixed="left" align="center"></el-table-column>
<!-- <el-table-column label="操作" width="50" fixed="left">
<template slot-scope="scope">
<a type="text" size="small" style="color: red" @click="deleteRow(scope.$index, scope.row)">删除</a>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column prop="cmcInvoice" label="发票号" width="120" fixed="left">
<template slot-scope="scope">
<div>
@ -275,8 +295,8 @@
<el-dialog :title="currentRow ? `为发票号 ${currentRow.cmcInvoice} 选择客户模板` : '客户模板'"
@close="templateFlag = false; currentRow = null" :visible.sync="templateFlag" width="1200px" v-drag>
<!-- 搜索表单 -->
<el-form :inline="true" :model="templateSearchData" label-width="100px" style="margin-bottom: 15px;">
<el-form-item label="模板名称:">
<el-form :inline="true" label-position="top" :model="templateSearchData" label-width="100px" >
<el-form-item label="模板名称">
<el-input
v-model="templateSearchData.templateName"
placeholder="请输入模板名称"
@ -284,7 +304,7 @@
clearable>
</el-input>
</el-form-item>
<el-form-item label="客户名称:">
<el-form-item label="客户名称">
<el-input
v-model="templateSearchData.customerName"
placeholder="请输入客户名称"
@ -292,8 +312,10 @@
clearable>
</el-input>
</el-form-item>
<el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="searchTemplateList">查询</el-button>
</el-form-item>
<el-form-item label=" ">
<el-button @click="resetTemplateSearch">重置</el-button>
</el-form-item>
</el-form>
@ -604,7 +626,9 @@
visible: false,
invoice: '',
materials: []
}
},
//
selectedRows: [] //
}
},
computed: {
@ -1439,6 +1463,46 @@
this.closeEditDialog()
},
//
handleSelectionChange(selection) {
this.selectedRows = selection
},
//
batchDeleteRows() {
if (this.selectedRows.length === 0) {
this.$message.warning('请先选择要删除的发票')
return
}
const invoiceNumbers = this.selectedRows.map(row => row.cmcInvoice).join('、')
this.$confirm(`确定要删除以下 ${this.selectedRows.length} 个发票吗?\n${invoiceNumbers}\n\n删除后将不会提交到后台。`, '批量删除确认', {
confirmButtonText: '确定删除',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
//
this.selectedRows.forEach(row => {
//
if (!this.deletedInvoices.includes(row.cmcInvoice)) {
this.deletedInvoices.push(row.cmcInvoice)
}
//
const previewIndex = this.previewData.findIndex(item => item.cmcInvoice === row.cmcInvoice)
if (previewIndex !== -1) {
this.previewData.splice(previewIndex, 1)
}
})
this.$message.success(`已成功删除 ${this.selectedRows.length} 个发票`)
//
this.selectedRows = []
//
this.saveToCache()
}).catch(() => {
//
})
},
//
deleteRow(index, row) {
this.$confirm(`确定要删除发票号 "${row.cmcInvoice}" 吗?删除后将不会提交到后台。`, '删除确认', {
@ -1456,6 +1520,8 @@
this.previewData.splice(previewIndex, 1)
}
this.$message.success(`发票号 "${row.cmcInvoice}" 已删除`)
//
this.selectedRows = this.selectedRows.filter(r => r.cmcInvoice !== row.cmcInvoice)
//
this.saveToCache()
}).catch(() => {

Loading…
Cancel
Save