feat(钢卷管理): 添加批量导出钢卷数据功能
- 新增exportAllMaterialCoil API接口用于导出所有钢卷数据 - 修改导出按钮事件处理为handleExportAll - 使用download方法实现数据导出功能
This commit is contained in:
@@ -120,3 +120,11 @@ export function distributionByActualItemType(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function exportAllMaterialCoil(query) {
|
||||
return request({
|
||||
url: '/wms/materialCoil/export',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
@@ -64,12 +64,12 @@
|
||||
@click="handleDelete">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportAll">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="materialCoilList" @selection-change="handleSelectionChange" >
|
||||
<el-table v-loading="loading" :data="materialCoilList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo" />
|
||||
<el-table-column label="当前钢卷号" align="center" prop="currentCoilNo" />
|
||||
@@ -191,26 +191,22 @@
|
||||
<div v-else>请先选择材料类型</div>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.materialType === '成品'" label="质量状态" prop="qualityStatus">
|
||||
<el-input v-model="form.qualityStatus" placeholder="请输入质量状态"
|
||||
:disabled="readonly">
|
||||
<el-input v-model="form.qualityStatus" placeholder="请输入质量状态" :disabled="readonly">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.materialType === '成品'" label="切边要求" prop="trimmingRequirement">
|
||||
<el-input v-model="form.trimmingRequirement" placeholder="请输入切边要求"
|
||||
:disabled="readonly">
|
||||
<el-input v-model="form.trimmingRequirement" placeholder="请输入切边要求" :disabled="readonly">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.materialType === '成品'" label="打包状态" prop="packingStatus">
|
||||
<el-input v-model="form.packingStatus" placeholder="请输入打包状态"
|
||||
:disabled="readonly">
|
||||
<el-input v-model="form.packingStatus" placeholder="请输入打包状态" :disabled="readonly">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.materialType === '成品'" label="包装要求" prop="packagingRequirement">
|
||||
<el-input v-model="form.packagingRequirement" placeholder="请输入包装要求"
|
||||
:disabled="readonly">
|
||||
<el-input v-model="form.packagingRequirement" placeholder="请输入包装要求" :disabled="readonly">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="毛重" prop="grossWeight">
|
||||
@@ -242,7 +238,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMaterialCoil, getMaterialCoil, delMaterialCoil, addMaterialCoil, updateMaterialCoilSimple, getMaterialCoilTrace } from "@/api/wms/coil";
|
||||
import { listMaterialCoil, getMaterialCoil, delMaterialCoil, addMaterialCoil, updateMaterialCoilSimple, getMaterialCoilTrace, exportAllMaterialCoil } from "@/api/wms/coil";
|
||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||
import QRCode from "../../print/components/QRCode.vue";
|
||||
import * as XLSX from 'xlsx'
|
||||
@@ -662,6 +658,11 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleExportAll() {
|
||||
this.download('wms/materialCoil/export', {
|
||||
...this.queryParams
|
||||
}, `materialCoil_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/** 导出选中数据操作 */
|
||||
handleExport() {
|
||||
// 1. 判断是否有选中数据
|
||||
|
||||
Reference in New Issue
Block a user