修复
This commit is contained in:
@@ -92,6 +92,7 @@ public class MatPurchaseInDetailVo {
|
|||||||
/**
|
/**
|
||||||
* 厂家
|
* 厂家
|
||||||
*/
|
*/
|
||||||
|
@ExcelProperty(value = "厂家")
|
||||||
private String factory;
|
private String factory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ public class GearStockIoOrderBo extends BaseEntity {
|
|||||||
|
|
||||||
private Long supplierId;
|
private Long supplierId;
|
||||||
|
|
||||||
|
private Integer materialTypeSnapshot;
|
||||||
|
|
||||||
private Date planArrivalTime;
|
private Date planArrivalTime;
|
||||||
|
|
||||||
private Date actualArrivalTime;
|
private Date actualArrivalTime;
|
||||||
|
|||||||
@@ -46,6 +46,12 @@ public class GearPurchasePlanDetailVo {
|
|||||||
@ExcelProperty(value = "原材料名称")
|
@ExcelProperty(value = "原材料名称")
|
||||||
private String rawMaterialName;
|
private String rawMaterialName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂家
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "厂家")
|
||||||
|
private String factory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 负责人
|
* 负责人
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -103,4 +103,6 @@ public class GearStockIoOrderVo extends BaseEntity {
|
|||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
private String materialNames;
|
private String materialNames;
|
||||||
|
|
||||||
|
private String factoryNames;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.gear.oa.mapper;
|
package com.gear.oa.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.gear.oa.domain.GearPurchasePlanDetail;
|
import com.gear.oa.domain.GearPurchasePlanDetail;
|
||||||
@@ -8,6 +7,8 @@ import com.gear.oa.domain.vo.GearPurchasePlanDetailVo;
|
|||||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购计划明细Mapper接口
|
* 采购计划明细Mapper接口
|
||||||
*
|
*
|
||||||
@@ -17,4 +18,6 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
public interface GearPurchasePlanDetailMapper extends BaseMapperPlus<GearPurchasePlanDetailMapper, GearPurchasePlanDetail, GearPurchasePlanDetailVo> {
|
public interface GearPurchasePlanDetailMapper extends BaseMapperPlus<GearPurchasePlanDetailMapper, GearPurchasePlanDetail, GearPurchasePlanDetailVo> {
|
||||||
|
|
||||||
Page<GearPurchasePlanDetailVo> selectVoPagePlus(Page<Object> build,@Param("ew") QueryWrapper<GearPurchasePlanDetail> lqw);
|
Page<GearPurchasePlanDetailVo> selectVoPagePlus(Page<Object> build,@Param("ew") QueryWrapper<GearPurchasePlanDetail> lqw);
|
||||||
|
|
||||||
|
List<GearPurchasePlanDetailVo> selectVoListPlus(@Param("ew") QueryWrapper<GearPurchasePlanDetail> lqw);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
public interface MatMaterialSimpleMapper {
|
public interface MatMaterialSimpleMapper {
|
||||||
|
|
||||||
@Select("select material_id as materialId, material_name as materialName, material_type as materialType, unit as unit, current_stock as currentStock " +
|
@Select("select material_id as materialId, material_name as materialName, material_type as materialType, unit as unit, factory as factory, current_stock as currentStock " +
|
||||||
"from mat_material where material_id = #{materialId} and del_flag = 0 limit 1")
|
"from mat_material where material_id = #{materialId} and del_flag = 0 limit 1")
|
||||||
Map<String, Object> selectSnapshot(@Param("materialId") Long materialId);
|
Map<String, Object> selectSnapshot(@Param("materialId") Long materialId);
|
||||||
|
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ public class GearPurchasePlanDetailServiceImpl implements IGearPurchasePlanDetai
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<GearPurchasePlanDetailVo> queryList(GearPurchasePlanDetailBo bo) {
|
public List<GearPurchasePlanDetailVo> queryList(GearPurchasePlanDetailBo bo) {
|
||||||
LambdaQueryWrapper<GearPurchasePlanDetail> lqw = buildQueryWrapper(bo);
|
QueryWrapper<GearPurchasePlanDetail> lqw = buildQueryWrapperPlus(bo);
|
||||||
return baseMapper.selectVoList(lqw);
|
return baseMapper.selectVoListPlus(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
private LambdaQueryWrapper<GearPurchasePlanDetail> buildQueryWrapper(GearPurchasePlanDetailBo bo) {
|
private LambdaQueryWrapper<GearPurchasePlanDetail> buildQueryWrapper(GearPurchasePlanDetailBo bo) {
|
||||||
|
|||||||
@@ -102,26 +102,43 @@ public class GearStockIoOrderServiceImpl implements IGearStockIoOrderService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Map<Long, LinkedHashSet<String>> namesMap = new HashMap<>();
|
Map<Long, LinkedHashSet<String>> namesMap = new HashMap<>();
|
||||||
|
Map<Long, LinkedHashSet<String>> factoryMap = new HashMap<>();
|
||||||
|
Map<Long, String> materialFactoryCache = new HashMap<>();
|
||||||
for (GearStockIoOrderDetail d : details) {
|
for (GearStockIoOrderDetail d : details) {
|
||||||
if (d == null || d.getOrderId() == null) {
|
if (d == null || d.getOrderId() == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String name = d.getItemName();
|
String name = d.getItemName();
|
||||||
if (StringUtils.isBlank(name)) {
|
if (StringUtils.isNotBlank(name)) {
|
||||||
|
namesMap.computeIfAbsent(d.getOrderId(), k -> new LinkedHashSet<>()).add(name);
|
||||||
|
}
|
||||||
|
if (!"material".equals(d.getItemType()) || d.getItemId() == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
namesMap.computeIfAbsent(d.getOrderId(), k -> new LinkedHashSet<>()).add(name);
|
String factory = materialFactoryCache.get(d.getItemId());
|
||||||
|
if (factory == null) {
|
||||||
|
Map<String, Object> snapshot = matMaterialMapper.selectSnapshot(d.getItemId());
|
||||||
|
Object factoryObj = snapshot == null ? null : snapshot.get("factory");
|
||||||
|
factory = factoryObj == null ? "" : String.valueOf(factoryObj);
|
||||||
|
materialFactoryCache.put(d.getItemId(), factory);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(factory)) {
|
||||||
|
factoryMap.computeIfAbsent(d.getOrderId(), k -> new LinkedHashSet<>()).add(factory);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (GearStockIoOrderVo o : orders) {
|
for (GearStockIoOrderVo o : orders) {
|
||||||
if (o == null || o.getOrderId() == null) {
|
if (o == null || o.getOrderId() == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
LinkedHashSet<String> set = namesMap.get(o.getOrderId());
|
LinkedHashSet<String> set = namesMap.get(o.getOrderId());
|
||||||
if (set == null || set.isEmpty()) {
|
if (set != null && !set.isEmpty()) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
o.setMaterialNames(String.join("、", set));
|
o.setMaterialNames(String.join("、", set));
|
||||||
}
|
}
|
||||||
|
LinkedHashSet<String> factorySet = factoryMap.get(o.getOrderId());
|
||||||
|
if (factorySet != null && !factorySet.isEmpty()) {
|
||||||
|
o.setFactoryNames(String.join("、", factorySet));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private LambdaQueryWrapper<GearStockIoOrder> buildQueryWrapper(GearStockIoOrderBo bo) {
|
private LambdaQueryWrapper<GearStockIoOrder> buildQueryWrapper(GearStockIoOrderBo bo) {
|
||||||
@@ -148,6 +165,9 @@ public class GearStockIoOrderServiceImpl implements IGearStockIoOrderService {
|
|||||||
lqw.apply(bo.getSupplierId() != null,
|
lqw.apply(bo.getSupplierId() != null,
|
||||||
"exists (select 1 from gear_stock_io_order_detail d left join gear_purchase_plan_detail ppd on d.source_detail_no = ppd.detail_code and ppd.del_flag = 0 where d.del_flag = '0' and d.order_id = gear_stock_io_order.order_id and ppd.supplier_id = {0})",
|
"exists (select 1 from gear_stock_io_order_detail d left join gear_purchase_plan_detail ppd on d.source_detail_no = ppd.detail_code and ppd.del_flag = 0 where d.del_flag = '0' and d.order_id = gear_stock_io_order.order_id and ppd.supplier_id = {0})",
|
||||||
bo.getSupplierId());
|
bo.getSupplierId());
|
||||||
|
lqw.apply(bo.getMaterialTypeSnapshot() != null,
|
||||||
|
"exists (select 1 from gear_stock_io_order_detail d where d.del_flag = '0' and d.order_id = gear_stock_io_order.order_id and d.material_type_snapshot = {0})",
|
||||||
|
bo.getMaterialTypeSnapshot());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getDelayStatus()), GearStockIoOrder::getDelayStatus, bo.getDelayStatus());
|
lqw.eq(StringUtils.isNotBlank(bo.getDelayStatus()), GearStockIoOrder::getDelayStatus, bo.getDelayStatus());
|
||||||
lqw.orderByDesc(GearStockIoOrder::getCreateTime);
|
lqw.orderByDesc(GearStockIoOrder::getCreateTime);
|
||||||
return lqw;
|
return lqw;
|
||||||
@@ -168,6 +188,7 @@ public class GearStockIoOrderServiceImpl implements IGearStockIoOrderService {
|
|||||||
bo.getItemName());
|
bo.getItemName());
|
||||||
qw.like(StringUtils.isNotBlank(bo.getFactory()), "m.factory", bo.getFactory());
|
qw.like(StringUtils.isNotBlank(bo.getFactory()), "m.factory", bo.getFactory());
|
||||||
qw.eq(bo.getSupplierId() != null, "ppd.supplier_id", bo.getSupplierId());
|
qw.eq(bo.getSupplierId() != null, "ppd.supplier_id", bo.getSupplierId());
|
||||||
|
qw.eq(bo.getMaterialTypeSnapshot() != null, "d.material_type_snapshot", bo.getMaterialTypeSnapshot());
|
||||||
return qw;
|
return qw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
d.detail_code,
|
d.detail_code,
|
||||||
d.supplier_id,
|
d.supplier_id,
|
||||||
d.raw_material_name,
|
d.raw_material_name,
|
||||||
|
m.factory as factory,
|
||||||
d.owner,
|
d.owner,
|
||||||
d.quantity,
|
d.quantity,
|
||||||
d.unit,
|
d.unit,
|
||||||
@@ -44,6 +45,43 @@
|
|||||||
s.name as supplierName
|
s.name as supplierName
|
||||||
from gear_purchase_plan_detail d
|
from gear_purchase_plan_detail d
|
||||||
left join gear_supplier s on d.supplier_id = s.supplier_id and s.del_flag = 0
|
left join gear_supplier s on d.supplier_id = s.supplier_id and s.del_flag = 0
|
||||||
|
left join (
|
||||||
|
select material_name, max(factory) as factory
|
||||||
|
from mat_material
|
||||||
|
where del_flag = 0
|
||||||
|
group by material_name
|
||||||
|
) m on m.material_name = d.raw_material_name
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectVoListPlus" resultType="com.gear.oa.domain.vo.GearPurchasePlanDetailVo">
|
||||||
|
select d.detail_id,
|
||||||
|
d.detail_code,
|
||||||
|
d.supplier_id,
|
||||||
|
d.raw_material_name,
|
||||||
|
m.factory as factory,
|
||||||
|
d.owner,
|
||||||
|
d.quantity,
|
||||||
|
d.unit,
|
||||||
|
d.unit_price,
|
||||||
|
d.total_amount,
|
||||||
|
d.annex,
|
||||||
|
d.status,
|
||||||
|
d.remark,
|
||||||
|
d.del_flag,
|
||||||
|
d.create_time,
|
||||||
|
d.create_by,
|
||||||
|
d.update_time,
|
||||||
|
d.update_by,
|
||||||
|
s.name as supplierName
|
||||||
|
from gear_purchase_plan_detail d
|
||||||
|
left join gear_supplier s on d.supplier_id = s.supplier_id and s.del_flag = 0
|
||||||
|
left join (
|
||||||
|
select material_name, max(factory) as factory
|
||||||
|
from mat_material
|
||||||
|
where del_flag = 0
|
||||||
|
group by material_name
|
||||||
|
) m on m.material_name = d.raw_material_name
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,11 @@
|
|||||||
d.item_type AS itemType,
|
d.item_type AS itemType,
|
||||||
d.item_id AS itemId,
|
d.item_id AS itemId,
|
||||||
d.material_type_snapshot AS materialTypeSnapshot,
|
d.material_type_snapshot AS materialTypeSnapshot,
|
||||||
CASE WHEN d.material_type_snapshot = 2 THEN '主材' ELSE '辅材' END AS materialTypeName,
|
CASE
|
||||||
|
WHEN d.material_type_snapshot = 2 THEN '主材'
|
||||||
|
WHEN d.material_type_snapshot = 1 THEN '辅材'
|
||||||
|
ELSE '-'
|
||||||
|
END AS materialTypeName,
|
||||||
o.order_code AS orderCode,
|
o.order_code AS orderCode,
|
||||||
o.io_type AS ioType,
|
o.io_type AS ioType,
|
||||||
o.biz_type AS bizType,
|
o.biz_type AS bizType,
|
||||||
@@ -37,7 +41,7 @@
|
|||||||
COALESCE(d.unit, m.unit) AS unit,
|
COALESCE(d.unit, m.unit) AS unit,
|
||||||
d.batch_no AS batchNo,
|
d.batch_no AS batchNo,
|
||||||
d.unit_price AS unitPrice,
|
d.unit_price AS unitPrice,
|
||||||
d.amount AS amount,
|
COALESCE(d.amount, d.unit_price * d.quantity) AS amount,
|
||||||
d.source_detail_no AS sourceDetailNo,
|
d.source_detail_no AS sourceDetailNo,
|
||||||
d.remark AS remark
|
d.remark AS remark
|
||||||
FROM gear_stock_io_order_detail d
|
FROM gear_stock_io_order_detail d
|
||||||
@@ -52,4 +56,3 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
|
|||||||
}
|
}
|
||||||
FileUtils.setAttachmentResponseHeader(response, sysOss.getOriginalName());
|
FileUtils.setAttachmentResponseHeader(response, sysOss.getOriginalName());
|
||||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE + "; charset=UTF-8");
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE + "; charset=UTF-8");
|
||||||
OssClient storage = OssFactory.instance();
|
OssClient storage = OssFactory.instance(sysOss.getService());
|
||||||
try(InputStream inputStream = storage.getObjectContent(sysOss.getUrl())) {
|
try(InputStream inputStream = storage.getObjectContent(sysOss.getFileName())) {
|
||||||
int available = inputStream.available();
|
int available = inputStream.available();
|
||||||
IoUtil.copy(inputStream, response.getOutputStream(), available);
|
IoUtil.copy(inputStream, response.getOutputStream(), available);
|
||||||
response.setContentLength(available);
|
response.setContentLength(available);
|
||||||
@@ -150,7 +150,7 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
|
|||||||
List<SysOss> list = baseMapper.selectBatchIds(ids);
|
List<SysOss> list = baseMapper.selectBatchIds(ids);
|
||||||
for (SysOss sysOss : list) {
|
for (SysOss sysOss : list) {
|
||||||
OssClient storage = OssFactory.instance(sysOss.getService());
|
OssClient storage = OssFactory.instance(sysOss.getService());
|
||||||
storage.delete(sysOss.getUrl());
|
storage.delete(sysOss.getFileName());
|
||||||
}
|
}
|
||||||
return baseMapper.deleteBatchIds(ids) > 0;
|
return baseMapper.deleteBatchIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,15 @@
|
|||||||
<el-form-item label="供货商" prop="supplierId">
|
<el-form-item label="供货商" prop="supplierId">
|
||||||
<VendorSelect v-model="queryParams.supplierId" />
|
<VendorSelect v-model="queryParams.supplierId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="厂家" prop="factory">
|
||||||
|
<el-input v-model="queryParams.factory" placeholder="请输入厂家" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料类型" prop="materialTypeSnapshot">
|
||||||
|
<el-select v-model="queryParams.materialTypeSnapshot" placeholder="请选择" clearable style="width: 140px;">
|
||||||
|
<el-option label="主材" :value="2" />
|
||||||
|
<el-option label="辅材" :value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="入库时间" prop="timeRange">
|
<el-form-item label="入库时间" prop="timeRange">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.timeRange"
|
v-model="queryParams.timeRange"
|
||||||
@@ -45,6 +54,9 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="Download" size="mini" @click="handleExport">导出</el-button>
|
<el-button type="warning" plain icon="Download" size="mini" @click="handleExport">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="Download" size="mini" @click="handleExportOrder">导出单据</el-button>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="info" plain size="mini" @click="openFlow">统计/导出</el-button>
|
<el-button type="info" plain size="mini" @click="openFlow">统计/导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -69,6 +81,19 @@
|
|||||||
<span v-else>{{ scope.row.materialNames || '-' }}</span>
|
<span v-else>{{ scope.row.materialNames || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="厂家" align="center" min-width="220">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip v-if="scope.row.factoryNames && String(scope.row.factoryNames).length > 16" effect="dark" placement="top">
|
||||||
|
<template #content>
|
||||||
|
<div style="max-width: 420px; white-space: normal; word-break: break-all;">
|
||||||
|
{{ scope.row.factoryNames }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<span>{{ String(scope.row.factoryNames).slice(0, 16) + '…' }}</span>
|
||||||
|
</el-tooltip>
|
||||||
|
<span v-else>{{ scope.row.factoryNames || '-' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="业务类型" align="center" prop="bizType" min-width="120" />
|
<el-table-column label="业务类型" align="center" prop="bizType" min-width="120" />
|
||||||
<el-table-column label="责任人" align="center" prop="responsibleName" min-width="120" />
|
<el-table-column label="责任人" align="center" prop="responsibleName" min-width="120" />
|
||||||
<el-table-column label="状态" align="center" width="90">
|
<el-table-column label="状态" align="center" width="90">
|
||||||
@@ -369,6 +394,8 @@ export default {
|
|||||||
orderCode: undefined,
|
orderCode: undefined,
|
||||||
itemName: undefined,
|
itemName: undefined,
|
||||||
supplierId: undefined,
|
supplierId: undefined,
|
||||||
|
factory: undefined,
|
||||||
|
materialTypeSnapshot: undefined,
|
||||||
timeRange: undefined,
|
timeRange: undefined,
|
||||||
startTime: undefined,
|
startTime: undefined,
|
||||||
endTime: undefined,
|
endTime: undefined,
|
||||||
@@ -458,6 +485,10 @@ export default {
|
|||||||
this.queryParams.timeRange = undefined
|
this.queryParams.timeRange = undefined
|
||||||
this.queryParams.startTime = undefined
|
this.queryParams.startTime = undefined
|
||||||
this.queryParams.endTime = undefined
|
this.queryParams.endTime = undefined
|
||||||
|
this.queryParams.supplierId = undefined
|
||||||
|
this.queryParams.itemName = undefined
|
||||||
|
this.queryParams.factory = undefined
|
||||||
|
this.queryParams.materialTypeSnapshot = undefined
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
@@ -476,6 +507,16 @@ export default {
|
|||||||
`stockIoOrder_in_detail_${new Date().getTime()}.xlsx`
|
`stockIoOrder_in_detail_${new Date().getTime()}.xlsx`
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
handleExportOrder() {
|
||||||
|
this.syncTimeRange()
|
||||||
|
this.download(
|
||||||
|
'/gear/stockIoOrder/export',
|
||||||
|
{
|
||||||
|
...this.queryParams
|
||||||
|
},
|
||||||
|
`stockIoOrder_in_${new Date().getTime()}.xlsx`
|
||||||
|
)
|
||||||
|
},
|
||||||
syncTimeRange() {
|
syncTimeRange() {
|
||||||
const tr = this.queryParams.timeRange
|
const tr = this.queryParams.timeRange
|
||||||
if (tr && tr.length === 2) {
|
if (tr && tr.length === 2) {
|
||||||
|
|||||||
@@ -10,6 +10,15 @@
|
|||||||
<el-form-item label="供货商" prop="supplierId">
|
<el-form-item label="供货商" prop="supplierId">
|
||||||
<VendorSelect v-model="queryParams.supplierId" />
|
<VendorSelect v-model="queryParams.supplierId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="厂家" prop="factory">
|
||||||
|
<el-input v-model="queryParams.factory" placeholder="请输入厂家" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料类型" prop="materialTypeSnapshot">
|
||||||
|
<el-select v-model="queryParams.materialTypeSnapshot" placeholder="请选择" clearable style="width: 140px;">
|
||||||
|
<el-option label="主材" :value="2" />
|
||||||
|
<el-option label="辅材" :value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="出库时间" prop="timeRange">
|
<el-form-item label="出库时间" prop="timeRange">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.timeRange"
|
v-model="queryParams.timeRange"
|
||||||
@@ -42,6 +51,9 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="Download" size="mini" @click="handleExport">导出</el-button>
|
<el-button type="warning" plain icon="Download" size="mini" @click="handleExport">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="Download" size="mini" @click="handleExportOrder">导出单据</el-button>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="info" plain size="mini" @click="openFlow">统计/导出</el-button>
|
<el-button type="info" plain size="mini" @click="openFlow">统计/导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -66,6 +78,19 @@
|
|||||||
<span v-else>{{ scope.row.materialNames || '-' }}</span>
|
<span v-else>{{ scope.row.materialNames || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="厂家" align="center" min-width="220">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip v-if="scope.row.factoryNames && String(scope.row.factoryNames).length > 16" effect="dark" placement="top">
|
||||||
|
<template #content>
|
||||||
|
<div style="max-width: 420px; white-space: normal; word-break: break-all;">
|
||||||
|
{{ scope.row.factoryNames }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<span>{{ String(scope.row.factoryNames).slice(0, 16) + '…' }}</span>
|
||||||
|
</el-tooltip>
|
||||||
|
<span v-else>{{ scope.row.factoryNames || '-' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="业务类型" align="center" prop="bizType" min-width="120" />
|
<el-table-column label="业务类型" align="center" prop="bizType" min-width="120" />
|
||||||
<el-table-column label="责任人" align="center" prop="responsibleName" min-width="120" />
|
<el-table-column label="责任人" align="center" prop="responsibleName" min-width="120" />
|
||||||
<el-table-column label="状态" align="center" width="90">
|
<el-table-column label="状态" align="center" width="90">
|
||||||
@@ -350,6 +375,8 @@ export default {
|
|||||||
orderCode: undefined,
|
orderCode: undefined,
|
||||||
itemName: undefined,
|
itemName: undefined,
|
||||||
supplierId: undefined,
|
supplierId: undefined,
|
||||||
|
factory: undefined,
|
||||||
|
materialTypeSnapshot: undefined,
|
||||||
timeRange: undefined,
|
timeRange: undefined,
|
||||||
startTime: undefined,
|
startTime: undefined,
|
||||||
endTime: undefined,
|
endTime: undefined,
|
||||||
@@ -439,6 +466,10 @@ export default {
|
|||||||
this.queryParams.timeRange = undefined
|
this.queryParams.timeRange = undefined
|
||||||
this.queryParams.startTime = undefined
|
this.queryParams.startTime = undefined
|
||||||
this.queryParams.endTime = undefined
|
this.queryParams.endTime = undefined
|
||||||
|
this.queryParams.supplierId = undefined
|
||||||
|
this.queryParams.itemName = undefined
|
||||||
|
this.queryParams.factory = undefined
|
||||||
|
this.queryParams.materialTypeSnapshot = undefined
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
@@ -456,6 +487,16 @@ export default {
|
|||||||
`stockIoOrder_out_detail_${new Date().getTime()}.xlsx`
|
`stockIoOrder_out_detail_${new Date().getTime()}.xlsx`
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
handleExportOrder() {
|
||||||
|
this.syncTimeRange()
|
||||||
|
this.download(
|
||||||
|
'/gear/stockIoOrder/export',
|
||||||
|
{
|
||||||
|
...this.queryParams
|
||||||
|
},
|
||||||
|
`stockIoOrder_out_${new Date().getTime()}.xlsx`
|
||||||
|
)
|
||||||
|
},
|
||||||
syncTimeRange() {
|
syncTimeRange() {
|
||||||
const tr = this.queryParams.timeRange
|
const tr = this.queryParams.timeRange
|
||||||
if (tr && tr.length === 2) {
|
if (tr && tr.length === 2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user