Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -96,7 +96,8 @@
|
||||
<el-form-item>
|
||||
<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-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 style="float: right;" v-if="showWaybill" v-loading="loading">
|
||||
@@ -113,7 +114,10 @@
|
||||
@click="handleCheck">修正</el-button>
|
||||
</el-col> -->
|
||||
<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 :span="2" v-if="canExportAll">
|
||||
@@ -1454,6 +1458,7 @@ export default {
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.warehouseId = '';
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
@@ -1544,6 +1549,31 @@ export default {
|
||||
}, '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) {
|
||||
this.isCheck = true;
|
||||
this.loading = true;
|
||||
@@ -1717,6 +1747,10 @@ export default {
|
||||
const { orderBy, ...query } = this.queryParams;
|
||||
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() {
|
||||
if (!this.ids || this.ids.length === 0) {
|
||||
|
||||
@@ -165,16 +165,17 @@ export default {
|
||||
outputColumns: [],
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
// warehouseOptions: {
|
||||
// handler(newVal, oldVal) {
|
||||
// if (newVal !== oldVal) {
|
||||
// this.warehouseIds = newVal.map(item => item.value)
|
||||
// this.handleQuery()
|
||||
// }
|
||||
// },
|
||||
// }
|
||||
// },
|
||||
watch: {
|
||||
warehouseOptions: {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.warehouseIds = newVal.map(item => item.value)
|
||||
// this.handleQuery()
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
summary() {
|
||||
// 总钢卷数量、总重、均重
|
||||
|
||||
Reference in New Issue
Block a user