Merge remote-tracking branch 'origin/0.8.X' into 0.8.X

This commit is contained in:
2026-05-07 16:23:23 +08:00
2 changed files with 47 additions and 12 deletions

View File

@@ -96,7 +96,8 @@
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button icon="el-icon-download" size="mini" @click="handleNewExport" v-if="showNewExport">导出</el-button> <el-button icon="el-icon-download" size="mini" @click="handleNewExport" v-if="showNewExport">导出当前</el-button>
<el-button type="info" icon="el-icon-download" size="mini" @click="handleNewExportProps" v-if="showNewExport">导出全部</el-button>
</el-form-item> </el-form-item>
<!-- <el-form-item style="float: right;" v-if="showWaybill" v-loading="loading"> <!-- <el-form-item style="float: right;" v-if="showWaybill" v-loading="loading">
@@ -113,7 +114,10 @@
@click="handleCheck">修正</el-button> @click="handleCheck">修正</el-button>
</el-col> --> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportAll">导出</el-button> <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportAll">导出当前</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-download" size="mini" @click="handleExportAllProps">导出全部</el-button>
</el-col> </el-col>
<el-col :span="2" v-if="canExportAll"> <el-col :span="2" v-if="canExportAll">
@@ -1454,6 +1458,7 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams.warehouseId = '';
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
@@ -1544,6 +1549,31 @@ export default {
}, 'coil.xlsx') }, 'coil.xlsx')
} }
}, },
async handleNewExportProps(row) {
this.loading = true
let coilIds = ''
const query = {
...this.querys,
selectType: 'product',
pageSize: 9999,
pageNum: 1,
}
if (this.showWaybill) {
const res = await listBoundCoil(query)
coilIds = res.rows.map(item => item.coilId).join(',')
this.loading = false
this.download('/wms/materialCoil/exportDelivery', {
coilIds,
}, 'coil.xlsx')
} else {
const { rows: coils } = await listMaterialCoil(query)
coilIds = coils.map(item => item.coilId).join(',')
this.loading = false
this.download('wms/materialCoil/exportAll', {
coilIds,
}, 'coil.xlsx')
}
},
handleCheck(row) { handleCheck(row) {
this.isCheck = true; this.isCheck = true;
this.loading = true; this.loading = true;
@@ -1717,6 +1747,10 @@ export default {
const { orderBy, ...query } = this.queryParams; const { orderBy, ...query } = this.queryParams;
this.download('wms/materialCoil/export', query, `materialCoil_${new Date().getTime()}.xlsx`) this.download('wms/materialCoil/export', query, `materialCoil_${new Date().getTime()}.xlsx`)
}, },
handleExportAllProps() {
const query = this.querys;
this.download('wms/materialCoil/export', query, `materialCoil_${new Date().getTime()}.xlsx`)
},
/** 批量打印标签按钮 */ /** 批量打印标签按钮 */
handleBatchPrintLabel() { handleBatchPrintLabel() {
if (!this.ids || this.ids.length === 0) { if (!this.ids || this.ids.length === 0) {

View File

@@ -165,16 +165,17 @@ export default {
outputColumns: [], outputColumns: [],
} }
}, },
// watch: { watch: {
// warehouseOptions: { warehouseOptions: {
// handler(newVal, oldVal) { handler(newVal, oldVal) {
// if (newVal !== oldVal) { if (newVal !== oldVal) {
// this.warehouseIds = newVal.map(item => item.value) this.warehouseIds = newVal.map(item => item.value)
// this.handleQuery() // this.handleQuery()
// } }
// }, },
// } immediate: true,
// }, }
},
computed: { computed: {
summary() { summary() {
// 总钢卷数量、总重、均重 // 总钢卷数量、总重、均重