feat(inventory): 添加订单执行跟踪导出功能
- 新增 exportExecution API 接口用于导出订单数据 - 在前端界面添加导出按钮并集成权限控制 - 更新服务层实现导出逻辑并调整表头字段顺序 - 增加订单生效时间和要求到货时间字段显示 - 完善后端控制器的导出接口权限验证机制dev_1.0.1^2
parent
e298748d45
commit
c759c8bc55
|
|
@ -70,6 +70,14 @@ export function recallExecution(id) {
|
||||||
params: { id }
|
params: { id }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function exportExecution(data) {
|
||||||
|
return request({
|
||||||
|
url: `/inventory/execution/vue/export`,
|
||||||
|
method: 'post',
|
||||||
|
data: { data },
|
||||||
|
headers: { 'Content-Type': 'multipart/form-data' },
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询出库预览信息
|
// 查询出库预览信息
|
||||||
export function getCheckOutPreview(data) {
|
export function getCheckOutPreview(data) {
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,13 @@
|
||||||
<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-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['project:order:export']">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
<el-table v-loading="loading" :data="executionList" @sort-change="handleSortChange">
|
<el-table v-loading="loading" :data="executionList" @sort-change="handleSortChange">
|
||||||
<el-table-column label="序号" type="index" width="55" align="center" />
|
<el-table-column label="序号" type="index" width="55" align="center" />
|
||||||
<el-table-column label="项目编号" align="center" prop="projectCode" />
|
<el-table-column label="项目编号" align="center" prop="projectCode" />
|
||||||
|
|
@ -212,11 +218,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listExecution, recallExecution, downloadSignFile } from "@/api/inventory/execution";
|
import { listExecution, recallExecution, downloadSignFile,exportExecution } from "@/api/inventory/execution";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import OrderDetailDrawer from '../../project/order/OrderDetailDrawer.vue';
|
import OrderDetailDrawer from '../../project/order/OrderDetailDrawer.vue';
|
||||||
import ProjectDetailDrawer from '../../project/info/ProjectDetailDrawer.vue';
|
import ProjectDetailDrawer from '../../project/info/ProjectDetailDrawer.vue';
|
||||||
import Edit from './edit.vue'; // Import the Edit component
|
import Edit from './edit.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Execution",
|
name: "Execution",
|
||||||
|
|
@ -328,6 +334,24 @@ export default {
|
||||||
};
|
};
|
||||||
this.upload.open = true;
|
this.upload.open = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleExport() {
|
||||||
|
const queryParams = this.queryParams;
|
||||||
|
this.$confirm('是否确认导出所有订单管理数据项?', "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.exportLoading = true;
|
||||||
|
return exportExecution(queryParams);
|
||||||
|
}).then(response => {
|
||||||
|
this.exportLoading = false;
|
||||||
|
console.log("response:", response)
|
||||||
|
const fileName = response.msg;
|
||||||
|
window.location.href = process.env.VUE_APP_BASE_API + "/common/download?fileName=" + encodeURIComponent(fileName) + "&delete=" + true;
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
this.upload.isUploading = true;
|
this.upload.isUploading = true;
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,25 @@ public class VueInventoryExecutionController extends BaseController
|
||||||
List<ProjectOrderInfo> list = projectOrderInfoService.selectProjectOrderInfoList(projectOrderInfo);
|
List<ProjectOrderInfo> list = projectOrderInfoService.selectProjectOrderInfoList(projectOrderInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查询订单执行跟踪列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("project:order:export")
|
||||||
|
@PostMapping("/export")
|
||||||
|
public AjaxResult export(ProjectOrderInfo projectOrderInfo)
|
||||||
|
{
|
||||||
|
projectOrderInfo.setOrderStatus(ProjectOrderInfo.OrderStatus.APPROVE_COMPLETE.getCode());
|
||||||
|
if (!inventoryAuthService.authAll()) {
|
||||||
|
List<String> productCodeList = inventoryAuthService.authProductCode();
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(productCodeList)) {
|
||||||
|
return AjaxResult.error("无数据导出");
|
||||||
|
}
|
||||||
|
projectOrderInfo.setProductCodeList(productCodeList);
|
||||||
|
}
|
||||||
|
String fileName = projectOrderInfoService.exportList(projectOrderInfo);
|
||||||
|
return AjaxResult.success(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取订单执行跟踪详细信息
|
* 获取订单执行跟踪详细信息
|
||||||
|
|
|
||||||
|
|
@ -793,6 +793,8 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
List<List<String>> headerList = new ArrayList<>();
|
List<List<String>> headerList = new ArrayList<>();
|
||||||
headerList.add(Collections.singletonList("项目编号"));
|
headerList.add(Collections.singletonList("项目编号"));
|
||||||
headerList.add(Collections.singletonList("下单时间"));
|
headerList.add(Collections.singletonList("下单时间"));
|
||||||
|
headerList.add(Collections.singletonList("订单生效时间"));
|
||||||
|
headerList.add(Collections.singletonList("要求到货时间"));
|
||||||
headerList.add(Collections.singletonList("合同编号"));
|
headerList.add(Collections.singletonList("合同编号"));
|
||||||
headerList.add(Collections.singletonList("项目名称"));
|
headerList.add(Collections.singletonList("项目名称"));
|
||||||
headerList.add(Collections.singletonList("代表处"));
|
headerList.add(Collections.singletonList("代表处"));
|
||||||
|
|
@ -977,7 +979,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
totalPrice = processProducts(deployList, maxDeployService, row, totalPrice);
|
totalPrice = processProducts(deployList, maxDeployService, row, totalPrice);
|
||||||
//添加维保
|
//添加维保
|
||||||
totalPrice = processProducts(maintenanceList, maxMaintenanceService, row, totalPrice);
|
totalPrice = processProducts(maintenanceList, maxMaintenanceService, row, totalPrice);
|
||||||
int insertIndex=21;
|
int insertIndex=23;
|
||||||
row.add(insertIndex++, wssDto.getQuantity());
|
row.add(insertIndex++, wssDto.getQuantity());
|
||||||
row.add(insertIndex++, wssDto.getAllPrice());
|
row.add(insertIndex++, wssDto.getAllPrice());
|
||||||
row.add(insertIndex++, wssDto.getTaxRate());
|
row.add(insertIndex++, wssDto.getTaxRate());
|
||||||
|
|
@ -1034,6 +1036,8 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
private void addBasicFields(ProjectOrderInfo info, List<Object> row) {
|
private void addBasicFields(ProjectOrderInfo info, List<Object> row) {
|
||||||
row.add(info.getProjectCode());
|
row.add(info.getProjectCode());
|
||||||
row.add(DateUtil.format(info.getEstimatedOrderTime(), "yyyy-MM-dd"));
|
row.add(DateUtil.format(info.getEstimatedOrderTime(), "yyyy-MM-dd"));
|
||||||
|
row.add(DateUtil.format(info.getApproveTime(), "yyyy-MM-dd"));
|
||||||
|
row.add(DateUtil.format(info.getDeliveryTime(), "yyyy-MM-dd"));
|
||||||
row.add(info.getOrderCode());
|
row.add(info.getOrderCode());
|
||||||
row.add(info.getProjectName());
|
row.add(info.getProjectName());
|
||||||
row.add(info.getAgentName());
|
row.add(info.getAgentName());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue