Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
maintain_service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘帅
maintain_service
Commits
c5024746
Commit
c5024746
authored
Jul 18, 2025
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.基础结构调整,增加仓库
2.物料库存改为动态计算
parent
51ce87e0
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
1861 additions
and
586 deletions
+1861
-586
ErpMaterialController.java
...m/maintain/business/controller/ErpMaterialController.java
+16
-0
ErpMaterialInventoryRecordController.java
...ness/controller/ErpMaterialInventoryRecordController.java
+101
-0
ErpMaterialInventoryRecord.java
.../maintain/business/domain/ErpMaterialInventoryRecord.java
+70
-0
ErpMaterialPickingInfo.java
.../com/maintain/business/domain/ErpMaterialPickingInfo.java
+9
-0
ErpMaterialBo.java
...n/java/com/maintain/business/domain/bo/ErpMaterialBo.java
+7
-0
ErpMaterialInventoryRecordBo.java
...tain/business/domain/bo/ErpMaterialInventoryRecordBo.java
+115
-0
ErpMaterialPickingInfoBo.java
...maintain/business/domain/bo/ErpMaterialPickingInfoBo.java
+11
-0
ErpSettlementMaintainBo.java
.../maintain/business/domain/bo/ErpSettlementMaintainBo.java
+0
-5
ErpMaterialInventoryRecordVo.java
...tain/business/domain/vo/ErpMaterialInventoryRecordVo.java
+206
-0
ErpMaterialPickingInfoVo.java
...maintain/business/domain/vo/ErpMaterialPickingInfoVo.java
+11
-0
ErpMaterialVo.java
...n/java/com/maintain/business/domain/vo/ErpMaterialVo.java
+5
-4
ErpMaterialInventoryRecordMapper.java
...ain/business/mapper/ErpMaterialInventoryRecordMapper.java
+52
-0
ErpMaterialMapper.java
.../java/com/maintain/business/mapper/ErpMaterialMapper.java
+10
-1
IErpMaterialInventoryRecordService.java
.../business/service/IErpMaterialInventoryRecordService.java
+54
-0
IErpMaterialService.java
...va/com/maintain/business/service/IErpMaterialService.java
+5
-0
ErpMaterialCheckServiceImpl.java
...in/business/service/impl/ErpMaterialCheckServiceImpl.java
+51
-19
ErpMaterialInventoryRecordServiceImpl.java
...s/service/impl/ErpMaterialInventoryRecordServiceImpl.java
+140
-0
ErpMaterialPickingServiceImpl.java
.../business/service/impl/ErpMaterialPickingServiceImpl.java
+136
-40
ErpMaterialPutawayServiceImpl.java
.../business/service/impl/ErpMaterialPutawayServiceImpl.java
+70
-27
ErpMaterialReturnsServiceImpl.java
.../business/service/impl/ErpMaterialReturnsServiceImpl.java
+59
-30
ErpMaterialServiceImpl.java
...aintain/business/service/impl/ErpMaterialServiceImpl.java
+26
-7
ErpSettlementMaintainServiceImpl.java
...siness/service/impl/ErpSettlementMaintainServiceImpl.java
+11
-1
ErpMaterialInventoryRecordMapper.xml
...ain/resources/mapper/ErpMaterialInventoryRecordMapper.xml
+133
-0
ErpMaterialMapper.xml
...-business/src/main/resources/mapper/ErpMaterialMapper.xml
+74
-8
ErpMaterialPickingInfoMapper.xml
...rc/main/resources/mapper/ErpMaterialPickingInfoMapper.xml
+3
-1
InventoryType.java
...rc/main/java/com/maintain/common/enums/InventoryType.java
+25
-0
material.js
maintain-ui/src/api/business/material.js
+36
-0
index.vue
maintain-ui/src/views/business/material/index.vue
+36
-37
index.vue
maintain-ui/src/views/business/materialCheck/index.vue
+141
-10
add.vue
maintain-ui/src/views/business/materialPicking/add.vue
+53
-170
index.vue
maintain-ui/src/views/business/materialPicking/index.vue
+69
-41
index.vue
maintain-ui/src/views/business/materialPickingInfo/index.vue
+11
-11
index.vue
maintain-ui/src/views/business/materialPutaway/index.vue
+2
-2
index.vue
maintain-ui/src/views/business/materialReturns/index.vue
+13
-13
index.vue
maintain-ui/src/views/business/materialStock/index.vue
+33
-88
index.vue
maintain-ui/src/views/business/pickingReturn/index.vue
+15
-7
info.vue
maintain-ui/src/views/business/repairForm/info.vue
+13
-13
add.vue
...ain-ui/src/views/business/settlementMaintain/info/add.vue
+24
-36
index1.vue
...-ui/src/views/business/settlementMaintain/info/index1.vue
+10
-10
index1.vue
...-ui/src/views/business/settlementMaterial/info/index1.vue
+5
-5
No files found.
maintain-business/src/main/java/com/maintain/business/controller/ErpMaterialController.java
View file @
c5024746
...
@@ -49,9 +49,25 @@ public class ErpMaterialController extends BaseController {
...
@@ -49,9 +49,25 @@ public class ErpMaterialController extends BaseController {
@SaCheckPermission
(
"business:material:list"
)
@SaCheckPermission
(
"business:material:list"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
<
ErpMaterialVo
>
list
(
ErpMaterialBo
bo
,
PageQuery
pageQuery
)
{
public
TableDataInfo
<
ErpMaterialVo
>
list
(
ErpMaterialBo
bo
,
PageQuery
pageQuery
)
{
return
iErpMaterialService
.
queryPageList
(
bo
,
pageQuery
);
}
/**
* 查询物资列表(库存大于0)
*/
@GetMapping
(
"/customList"
)
public
TableDataInfo
<
ErpMaterialVo
>
customList
(
ErpMaterialBo
bo
,
PageQuery
pageQuery
)
{
return
iErpMaterialService
.
customQueryPageList
(
bo
,
pageQuery
);
return
iErpMaterialService
.
customQueryPageList
(
bo
,
pageQuery
);
}
}
/**
* 查询物资列表(全部)
*/
@GetMapping
(
"/customListAll"
)
public
TableDataInfo
<
ErpMaterialVo
>
customListAll
(
ErpMaterialBo
bo
,
PageQuery
pageQuery
)
{
return
iErpMaterialService
.
customQueryPageListAll
(
bo
,
pageQuery
);
}
/**
/**
* 物料导入模板下载
* 物料导入模板下载
*/
*/
...
...
maintain-business/src/main/java/com/maintain/business/controller/ErpMaterialInventoryRecordController.java
0 → 100644
View file @
c5024746
package
com
.
maintain
.
business
.
controller
;
import
cn.dev33.satoken.annotation.SaCheckPermission
;
import
com.maintain.business.domain.bo.ErpMaterialInventoryRecordBo
;
import
com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo
;
import
com.maintain.business.service.IErpMaterialInventoryRecordService
;
import
com.maintain.common.annotation.Log
;
import
com.maintain.common.annotation.RepeatSubmit
;
import
com.maintain.common.core.controller.BaseController
;
import
com.maintain.common.core.domain.PageQuery
;
import
com.maintain.common.core.domain.R
;
import
com.maintain.common.core.page.TableDataInfo
;
import
com.maintain.common.core.validate.AddGroup
;
import
com.maintain.common.core.validate.EditGroup
;
import
com.maintain.common.enums.BusinessType
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* 物料库存记录
*
* @author liushuai
* @date 2025-07-16
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping
(
"/business/materialInventoryRecord"
)
public
class
ErpMaterialInventoryRecordController
extends
BaseController
{
private
final
IErpMaterialInventoryRecordService
iErpMaterialInventoryRecordService
;
/**
* 查询物料库存记录列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
<
ErpMaterialInventoryRecordVo
>
list
(
ErpMaterialInventoryRecordBo
bo
,
PageQuery
pageQuery
)
{
return
iErpMaterialInventoryRecordService
.
customQueryPageList
(
bo
,
pageQuery
);
}
/**
* 查询物料库存记录列表
*/
@GetMapping
(
"/listByMaterialId"
)
public
R
<
List
<
ErpMaterialInventoryRecordVo
>>
listByMaterialId
(
ErpMaterialInventoryRecordBo
bo
)
{
return
R
.
ok
(
iErpMaterialInventoryRecordService
.
queryListByMaterialId
(
bo
));
}
/**
* 获取物料库存记录详细信息
*
* @param id 主键
*/
@SaCheckPermission
(
"business:materialInventoryRecord:query"
)
@GetMapping
(
"/{id}"
)
public
R
<
ErpMaterialInventoryRecordVo
>
getInfo
(
@NotNull
(
message
=
"主键不能为空"
)
@PathVariable
Long
id
)
{
return
R
.
ok
(
iErpMaterialInventoryRecordService
.
queryById
(
id
));
}
/**
* 新增物料库存记录
*/
@SaCheckPermission
(
"business:materialInventoryRecord:add"
)
@Log
(
title
=
"物料库存记录"
,
businessType
=
BusinessType
.
INSERT
)
@RepeatSubmit
()
@PostMapping
()
public
R
<
Void
>
add
(
@Validated
(
AddGroup
.
class
)
@RequestBody
ErpMaterialInventoryRecordBo
bo
)
{
return
toAjax
(
iErpMaterialInventoryRecordService
.
insertByBo
(
bo
));
}
/**
* 修改物料库存记录
*/
@SaCheckPermission
(
"business:materialInventoryRecord:edit"
)
@Log
(
title
=
"物料库存记录"
,
businessType
=
BusinessType
.
UPDATE
)
@RepeatSubmit
()
@PutMapping
()
public
R
<
Void
>
edit
(
@Validated
(
EditGroup
.
class
)
@RequestBody
ErpMaterialInventoryRecordBo
bo
)
{
return
toAjax
(
iErpMaterialInventoryRecordService
.
updateByBo
(
bo
));
}
/**
* 删除物料库存记录
*
* @param ids 主键串
*/
@SaCheckPermission
(
"business:materialInventoryRecord:remove"
)
@Log
(
title
=
"物料库存记录"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
R
<
Void
>
remove
(
@NotEmpty
(
message
=
"主键不能为空"
)
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
iErpMaterialInventoryRecordService
.
deleteWithValidByIds
(
Arrays
.
asList
(
ids
),
true
));
}
}
maintain-business/src/main/java/com/maintain/business/domain/ErpMaterialInventoryRecord.java
0 → 100644
View file @
c5024746
package
com
.
maintain
.
business
.
domain
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.maintain.common.convert.ExcelDictConvert
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
com.maintain.common.core.domain.BaseEntity
;
/**
* 物料库存记录对象 erp_material_inventory_record
*
* @author liushuai
* @date 2025-07-16
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"erp_material_inventory_record"
)
public
class
ErpMaterialInventoryRecord
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
)
private
Long
id
;
/**
* 明细ID(入库|退货|出库|退料)
*/
private
Long
infoId
;
/**
* 物料ID
*/
private
Long
materialId
;
/**
* 部门ID
*/
private
Long
deptId
;
/**
* 仓库ID
*/
private
Long
warehouseId
;
/**
* 数量
*/
private
BigDecimal
number
;
/**
* 单价
*/
private
BigDecimal
price
;
/**
* 金额
*/
private
BigDecimal
money
;
/**
* 类型(1入库2退货3出库4退料)
*/
private
String
type
;
/**
* 创建部门(数据权限)
*/
private
Long
createDeptId
;
}
maintain-business/src/main/java/com/maintain/business/domain/ErpMaterialPickingInfo.java
View file @
c5024746
package
com
.
maintain
.
business
.
domain
;
package
com
.
maintain
.
business
.
domain
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
...
@@ -52,6 +53,14 @@ public class ErpMaterialPickingInfo extends BaseEntity {
...
@@ -52,6 +53,14 @@ public class ErpMaterialPickingInfo extends BaseEntity {
* 仓库货位ID
* 仓库货位ID
*/
*/
private
Long
warehouseLocationId
;
private
Long
warehouseLocationId
;
/**
* 仓库ID
*/
private
Long
warehouseId
;
/**
* 仓库名称
*/
private
String
warehouseName
;
/**
/**
* 供应商ID
* 供应商ID
*/
*/
...
...
maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialBo.java
View file @
c5024746
...
@@ -10,6 +10,8 @@ import javax.validation.constraints.*;
...
@@ -10,6 +10,8 @@ import javax.validation.constraints.*;
import
java.util.Date
;
import
java.util.Date
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
com.maintain.common.core.domain.BaseEntity
;
import
com.maintain.common.core.domain.BaseEntity
;
/**
/**
...
@@ -44,6 +46,11 @@ public class ErpMaterialBo extends BaseEntity {
...
@@ -44,6 +46,11 @@ public class ErpMaterialBo extends BaseEntity {
*/
*/
private
Long
deptId
;
private
Long
deptId
;
/**
* 仓库ID列表
*/
private
List
<
Long
>
warehouseIdList
;
/**
/**
* 仓库ID
* 仓库ID
*/
*/
...
...
maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialInventoryRecordBo.java
0 → 100644
View file @
c5024746
package
com
.
maintain
.
business
.
domain
.
bo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.maintain.common.convert.ExcelDictConvert
;
import
com.maintain.common.core.validate.AddGroup
;
import
com.maintain.common.core.validate.EditGroup
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.*
;
import
java.util.Date
;
import
java.math.BigDecimal
;
import
com.maintain.common.core.domain.BaseEntity
;
/**
* 物料库存记录业务对象 erp_material_inventory_record
*
* @author liushuai
* @date 2025-07-16
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
ErpMaterialInventoryRecordBo
extends
BaseEntity
{
/**
* 主键
*/
@NotNull
(
message
=
"主键不能为空"
,
groups
=
{
EditGroup
.
class
})
private
Long
id
;
/**
* 明细ID(入库|退货|出库|退料)
*/
@NotNull
(
message
=
"明细ID(入库|退货|出库|退料)不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
Long
infoId
;
/**
* 物料ID
*/
@NotNull
(
message
=
"物料ID不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
Long
materialId
;
/**
* 供应商名称
*/
private
String
vendorName
;
/**
* 物资编码
*/
@NotBlank
(
message
=
"物资编码不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
materialCode
;
/**
* 物资名称
*/
@NotBlank
(
message
=
"物资名称不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
materialName
;
/**
* 物资规格
*/
@NotBlank
(
message
=
"物资规格不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
materialSpecifications
;
/**
* 部门ID
*/
@NotNull
(
message
=
"部门ID不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
Long
deptId
;
/**
* 仓库ID
*/
@NotNull
(
message
=
"仓库ID不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
Long
warehouseId
;
/**
* 仓库ID
*/
private
String
warehouseName
;
/**
* 数量
*/
@NotNull
(
message
=
"数量不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
BigDecimal
number
;
/**
* 单价
*/
@NotNull
(
message
=
"单价不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
BigDecimal
price
;
/**
* 金额
*/
@NotNull
(
message
=
"金额不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
BigDecimal
money
;
/**
* 类型(1入库2退货3出库4退料)
*/
@NotBlank
(
message
=
"类型(1入库2退货3出库4退料)不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
type
;
/**
* 创建部门(数据权限)
*/
private
Long
createDeptId
;
}
maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialPickingInfoBo.java
View file @
c5024746
...
@@ -64,6 +64,17 @@ public class ErpMaterialPickingInfoBo extends BaseEntity {
...
@@ -64,6 +64,17 @@ public class ErpMaterialPickingInfoBo extends BaseEntity {
@NotNull
(
message
=
"仓库货位ID不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
@NotNull
(
message
=
"仓库货位ID不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
Long
warehouseLocationId
;
private
Long
warehouseLocationId
;
/**
* 仓库ID
*/
@NotNull
(
message
=
"仓库ID不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
Long
warehouseId
;
/**
* 仓库名称
*/
private
String
warehouseName
;
/**
/**
* 供应商ID
* 供应商ID
*/
*/
...
...
maintain-business/src/main/java/com/maintain/business/domain/bo/ErpSettlementMaintainBo.java
View file @
c5024746
...
@@ -47,31 +47,26 @@ public class ErpSettlementMaintainBo extends BaseEntity {
...
@@ -47,31 +47,26 @@ public class ErpSettlementMaintainBo extends BaseEntity {
/**
/**
* 客户名称
* 客户名称
*/
*/
@NotBlank
(
message
=
"客户名称不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
clientName
;
private
String
clientName
;
/**
/**
* 客户手机号
* 客户手机号
*/
*/
@NotBlank
(
message
=
"客户手机号不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
clientPhone
;
private
String
clientPhone
;
/**
/**
* 客户类型(1个人 2企业)
* 客户类型(1个人 2企业)
*/
*/
@NotNull
(
message
=
"客户类型(1个人 2企业)不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
Integer
clientType
;
private
Integer
clientType
;
/**
/**
* 证件类型(1居民身份证 2纳税识别号)
* 证件类型(1居民身份证 2纳税识别号)
*/
*/
@NotNull
(
message
=
"证件类型(1居民身份证 2纳税识别号)不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
Integer
clientCertificateType
;
private
Integer
clientCertificateType
;
/**
/**
* 证件号
* 证件号
*/
*/
@NotBlank
(
message
=
"证件号不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
clientCertificateNumber
;
private
String
clientCertificateNumber
;
/**
/**
...
...
maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialInventoryRecordVo.java
0 → 100644
View file @
c5024746
package
com
.
maintain
.
business
.
domain
.
vo
;
import
java.math.BigDecimal
;
import
com.alibaba.excel.annotation.ExcelIgnoreUnannotated
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.maintain.common.annotation.ExcelDictFormat
;
import
com.maintain.common.convert.ExcelDictConvert
;
import
lombok.Data
;
import
java.util.Date
;
import
java.io.Serializable
;
/**
* 物料库存记录视图对象 erp_material_inventory_record
*
* @author liushuai
* @date 2025-07-16
*/
@Data
@ExcelIgnoreUnannotated
public
class
ErpMaterialInventoryRecordVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
id
;
/**
* 明细ID(入库|退货|出库|退料)
*/
@ExcelProperty
(
value
=
"明细ID"
,
converter
=
ExcelDictConvert
.
class
)
@ExcelDictFormat
(
readConverterExp
=
"入=库|退货|出库|退料"
)
private
Long
infoId
;
/**
* 入库单号
*/
private
String
putawayCode
;
/**
* 报修单号
*/
private
String
repairNumber
;
/**
* 退货单号
*/
private
String
returnsCode
;
/**
* 出库单号
*/
private
String
outNumber
;
/**
* 退料单号
*/
private
String
returnNumber
;
/**
* 物料ID
*/
@ExcelProperty
(
value
=
"物料ID"
)
private
Long
materialId
;
/**
* 仓库
*/
@ExcelProperty
(
value
=
"仓库"
)
private
String
warehouseName
;
/**
* 物资编码
*/
@ExcelProperty
(
value
=
"物资编码"
)
private
String
materialCode
;
/**
* 物资名称
*/
@ExcelProperty
(
value
=
"物资名称"
)
private
String
materialName
;
/**
* 物资规格
*/
@ExcelProperty
(
value
=
"物资规格"
)
private
String
materialSpecifications
;
/**
* 物资单位
*/
@ExcelProperty
(
value
=
"物资单位"
)
private
String
materialUnit
;
/**
* 供应商ID
*/
private
Long
vendorId
;
/**
* 供应商名称
*/
@ExcelProperty
(
value
=
"供应商名称"
)
private
String
vendorName
;
/**
* 物资品牌
*/
@ExcelProperty
(
value
=
"物资品牌"
)
private
String
materialBrand
;
/**
* 采购标的
*/
@ExcelProperty
(
value
=
"采购标的"
)
private
String
procurementSubject
;
/**
* 适用车型
*/
@ExcelProperty
(
value
=
"适用车型"
)
private
String
compatibleWith
;
/**
* 物资图片
*/
private
String
materialUrl
;
/**
* 质保期(月)
*/
@ExcelProperty
(
value
=
"质保期(月)"
)
private
Integer
materialWarrantyPeriod
;
/**
* 参考价
*/
@ExcelProperty
(
value
=
"参考价"
)
private
BigDecimal
referencePrice
;
/**
* 销售价
*/
@ExcelProperty
(
value
=
"销售价"
)
private
BigDecimal
sellingPrice
;
/**
* 库存
*/
@ExcelProperty
(
value
=
"库存"
)
private
BigDecimal
inventory
;
/**
* 部门ID
*/
@ExcelProperty
(
value
=
"部门ID"
)
private
Long
deptId
;
/**
* 仓库ID
*/
@ExcelProperty
(
value
=
"仓库ID"
)
private
Long
warehouseId
;
/**
* 数量
*/
@ExcelProperty
(
value
=
"数量"
)
private
BigDecimal
number
;
/**
* 单价
*/
@ExcelProperty
(
value
=
"单价"
)
private
BigDecimal
price
;
/**
* 金额
*/
@ExcelProperty
(
value
=
"金额"
)
private
BigDecimal
money
;
/**
* 类型(1入库2退货3出库4退料)
*/
@ExcelProperty
(
value
=
"类型"
,
converter
=
ExcelDictConvert
.
class
)
@ExcelDictFormat
(
readConverterExp
=
"1=入库2退货3出库4退料"
)
private
String
type
;
/**
* 创建部门(数据权限)
*/
@ExcelProperty
(
value
=
"创建部门(数据权限)"
,
converter
=
ExcelDictConvert
.
class
)
private
Long
createDeptId
;
/**
* 创建人
*/
private
String
createBy
;
/**
* 创建时间
*/
private
Date
createTime
;
}
maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialPickingInfoVo.java
View file @
c5024746
...
@@ -53,6 +53,17 @@ public class ErpMaterialPickingInfoVo implements Serializable {
...
@@ -53,6 +53,17 @@ public class ErpMaterialPickingInfoVo implements Serializable {
*/
*/
private
Long
pickingId
;
private
Long
pickingId
;
/**
* 仓库ID
*/
private
Long
warehouseId
;
/**
* 仓库名称
*/
@ExcelProperty
(
value
=
"仓库名称"
)
private
String
warehouseName
;
/**
/**
* 供应商ID
* 供应商ID
*/
*/
...
...
maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialVo.java
View file @
c5024746
...
@@ -43,6 +43,11 @@ public class ErpMaterialVo implements Serializable {
...
@@ -43,6 +43,11 @@ public class ErpMaterialVo implements Serializable {
*/
*/
private
Long
warehouseLocationId
;
private
Long
warehouseLocationId
;
/**
* 物资ID
*/
private
Long
materialId
;
/**
/**
* 物资编码
* 物资编码
*/
*/
...
@@ -165,15 +170,11 @@ public class ErpMaterialVo implements Serializable {
...
@@ -165,15 +170,11 @@ public class ErpMaterialVo implements Serializable {
/**
/**
* 是否通用(0否 1是 默认1)
* 是否通用(0否 1是 默认1)
*/
*/
//@ExcelProperty(value = "是否通用", converter = ExcelDictConvert.class)
//@ExcelDictFormat(dictType = "sys_is_enable")
private
String
isUniversal
;
private
String
isUniversal
;
/**
/**
* 是否盘点中(0否 1是 默认0)
* 是否盘点中(0否 1是 默认0)
*/
*/
//@ExcelProperty(value = "是否盘点中", converter = ExcelDictConvert.class)
//@ExcelDictFormat(dictType = "sys_is_enable")
private
Integer
isCheck
;
private
Integer
isCheck
;
/**
/**
...
...
maintain-business/src/main/java/com/maintain/business/mapper/ErpMaterialInventoryRecordMapper.java
0 → 100644
View file @
c5024746
package
com
.
maintain
.
business
.
mapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.maintain.business.domain.ErpMaterial
;
import
com.maintain.business.domain.ErpMaterialInventoryRecord
;
import
com.maintain.business.domain.bo.ErpMaterialInventoryRecordBo
;
import
com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo
;
import
com.maintain.business.domain.vo.ErpMaterialVo
;
import
com.maintain.common.core.mapper.BaseMapperPlus
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 物料库存记录Mapper接口
*
* @author liushuai
* @date 2025-07-16
*/
public
interface
ErpMaterialInventoryRecordMapper
extends
BaseMapperPlus
<
ErpMaterialInventoryRecordMapper
,
ErpMaterialInventoryRecord
,
ErpMaterialInventoryRecordVo
>
{
/**
* 自定义分页查询
* @param page
* @param queryWrapper
* @return
*/
Page
<
ErpMaterialInventoryRecordVo
>
customQueryPageList
(
@Param
(
"page"
)
Page
<
ErpMaterialInventoryRecord
>
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
ErpMaterialInventoryRecord
>
queryWrapper
);
/**
* 自定义查询
* @param queryWrapper
* @return
*/
List
<
ErpMaterialInventoryRecordVo
>
customQueryList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
ErpMaterialInventoryRecord
>
queryWrapper
);
/**
* 查询物料库存列表
*/
List
<
ErpMaterialInventoryRecordVo
>
queryListByWarehouseIdAndMaterialId
(
@Param
(
"warehouseId"
)
Long
warehouseId
,
@Param
(
"materialId"
)
Long
materialId
,
@Param
(
"type"
)
String
type
);
/**
* 根据仓库ID以及物料ID动态计算物料库存
*/
ErpMaterialInventoryRecordVo
queryMaterialByWarehouseIdAndMaterialId
(
@Param
(
"warehouseId"
)
Long
warehouseId
,
@Param
(
"materialId"
)
Long
materialId
);
}
maintain-business/src/main/java/com/maintain/business/mapper/ErpMaterialMapper.java
View file @
c5024746
...
@@ -19,11 +19,20 @@ import org.apache.ibatis.annotations.Param;
...
@@ -19,11 +19,20 @@ import org.apache.ibatis.annotations.Param;
public
interface
ErpMaterialMapper
extends
BaseMapperPlus
<
ErpMaterialMapper
,
ErpMaterial
,
ErpMaterialVo
>
{
public
interface
ErpMaterialMapper
extends
BaseMapperPlus
<
ErpMaterialMapper
,
ErpMaterial
,
ErpMaterialVo
>
{
/**
/**
* 自定义分页查询
* 自定义分页查询
(查询存在库存的物料)
* @param page
* @param page
* @param queryWrapper
* @param queryWrapper
* @return
* @return
*/
*/
Page
<
ErpMaterialVo
>
customQueryPageList
(
@Param
(
"page"
)
Page
<
ErpMaterial
>
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
ErpMaterial
>
queryWrapper
);
Page
<
ErpMaterialVo
>
customQueryPageList
(
@Param
(
"page"
)
Page
<
ErpMaterial
>
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
ErpMaterial
>
queryWrapper
);
/**
* 自定义分页查询(查询全部物料)
* @param page
* @param queryWrapper
* @return
*/
Page
<
ErpMaterialVo
>
customQueryPageListByWarehouseId
(
@Param
(
"page"
)
Page
<
ErpMaterial
>
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
ErpMaterial
>
queryWrapper
,
@Param
(
"warehouseId"
)
Long
warehouseId
);
}
}
maintain-business/src/main/java/com/maintain/business/service/IErpMaterialInventoryRecordService.java
0 → 100644
View file @
c5024746
package
com
.
maintain
.
business
.
service
;
import
com.maintain.business.domain.ErpMaterialInventoryRecord
;
import
com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo
;
import
com.maintain.business.domain.bo.ErpMaterialInventoryRecordBo
;
import
com.maintain.common.core.page.TableDataInfo
;
import
com.maintain.common.core.domain.PageQuery
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 物料库存记录Service接口
*
* @author liushuai
* @date 2025-07-16
*/
public
interface
IErpMaterialInventoryRecordService
{
/**
* 查询物料库存记录
*/
ErpMaterialInventoryRecordVo
queryById
(
Long
id
);
/**
* 查询物料库存记录列表
*/
TableDataInfo
<
ErpMaterialInventoryRecordVo
>
queryPageList
(
ErpMaterialInventoryRecordBo
bo
,
PageQuery
pageQuery
);
/**
* 查询物料库存记录列表(自定义查询)
*/
TableDataInfo
<
ErpMaterialInventoryRecordVo
>
customQueryPageList
(
ErpMaterialInventoryRecordBo
bo
,
PageQuery
pageQuery
);
/**
* 查询物料库存记录列表
*/
List
<
ErpMaterialInventoryRecordVo
>
queryListByMaterialId
(
ErpMaterialInventoryRecordBo
bo
);
/**
* 新增物料库存记录
*/
Boolean
insertByBo
(
ErpMaterialInventoryRecordBo
bo
);
/**
* 修改物料库存记录
*/
Boolean
updateByBo
(
ErpMaterialInventoryRecordBo
bo
);
/**
* 校验并批量删除物料库存记录信息
*/
Boolean
deleteWithValidByIds
(
Collection
<
Long
>
ids
,
Boolean
isValid
);
}
maintain-business/src/main/java/com/maintain/business/service/IErpMaterialService.java
View file @
c5024746
...
@@ -33,6 +33,11 @@ public interface IErpMaterialService {
...
@@ -33,6 +33,11 @@ public interface IErpMaterialService {
*/
*/
TableDataInfo
<
ErpMaterialVo
>
customQueryPageList
(
ErpMaterialBo
bo
,
PageQuery
pageQuery
);
TableDataInfo
<
ErpMaterialVo
>
customQueryPageList
(
ErpMaterialBo
bo
,
PageQuery
pageQuery
);
/**
* 查询物资列表(自定义查询全部)
*/
TableDataInfo
<
ErpMaterialVo
>
customQueryPageListAll
(
ErpMaterialBo
bo
,
PageQuery
pageQuery
);
/**
/**
* 查询物资列表
* 查询物资列表
*/
*/
...
...
maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialCheckServiceImpl.java
View file @
c5024746
...
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
...
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.maintain.business.domain.*
;
import
com.maintain.business.domain.*
;
import
com.maintain.business.domain.bo.ErpMaterialCheckInfoBo
;
import
com.maintain.business.domain.bo.ErpMaterialCheckInfoBo
;
import
com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo
;
import
com.maintain.business.domain.vo.ErpWarehouseVo
;
import
com.maintain.business.domain.vo.ErpWarehouseVo
;
import
com.maintain.business.mapper.*
;
import
com.maintain.business.mapper.*
;
import
com.maintain.business.service.IErpMaterialService
;
import
com.maintain.business.service.IErpMaterialService
;
...
@@ -52,6 +53,7 @@ public class ErpMaterialCheckServiceImpl implements IErpMaterialCheckService {
...
@@ -52,6 +53,7 @@ public class ErpMaterialCheckServiceImpl implements IErpMaterialCheckService {
private
final
ErpMaterialPutawayInfoMapper
materialPutawayInfoMapper
;
private
final
ErpMaterialPutawayInfoMapper
materialPutawayInfoMapper
;
private
final
ErpMaterialPickingMapper
materialPickingMapper
;
private
final
ErpMaterialPickingMapper
materialPickingMapper
;
private
final
ErpMaterialPickingInfoMapper
materialPickingInfoMapper
;
private
final
ErpMaterialPickingInfoMapper
materialPickingInfoMapper
;
private
final
ErpMaterialInventoryRecordMapper
materialInventoryRecordMapper
;
/**
/**
* 查询物资盘点
* 查询物资盘点
*/
*/
...
@@ -133,10 +135,10 @@ public class ErpMaterialCheckServiceImpl implements IErpMaterialCheckService {
...
@@ -133,10 +135,10 @@ public class ErpMaterialCheckServiceImpl implements IErpMaterialCheckService {
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
checkInfoMapper
.
insertBatch
(
collect
);
checkInfoMapper
.
insertBatch
(
collect
);
// 将盘点所在仓库下的物料是否盘点状态更改为 是
// 将盘点所在仓库下的物料是否盘点状态更改为 是
LambdaUpdateWrapper
<
ErpMaterial
>
materialLambdaUpdateWrapper
=
Wrappers
.
lambdaUpdate
();
//
LambdaUpdateWrapper<ErpMaterial> materialLambdaUpdateWrapper = Wrappers.lambdaUpdate();
materialLambdaUpdateWrapper
.
eq
(
ErpMaterial:
:
getWarehouseId
,
add
.
getWarehouseId
());
//
materialLambdaUpdateWrapper.eq(ErpMaterial::getWarehouseId, add.getWarehouseId());
materialLambdaUpdateWrapper
.
set
(
ErpMaterial:
:
getIsCheck
,
IsEnableStatus
.
YES
.
getCode
());
//
materialLambdaUpdateWrapper.set(ErpMaterial::getIsCheck, IsEnableStatus.YES.getCode());
materialMapper
.
update
(
materialLambdaUpdateWrapper
);
//
materialMapper.update(materialLambdaUpdateWrapper);
}
}
return
flag
;
return
flag
;
}
}
...
@@ -170,15 +172,14 @@ public class ErpMaterialCheckServiceImpl implements IErpMaterialCheckService {
...
@@ -170,15 +172,14 @@ public class ErpMaterialCheckServiceImpl implements IErpMaterialCheckService {
materialCheck
.
setTaskEndTime
(
new
Date
());
materialCheck
.
setTaskEndTime
(
new
Date
());
materialCheck
.
setCheckState
(
CheckState
.
TWO
.
getCode
());
materialCheck
.
setCheckState
(
CheckState
.
TWO
.
getCode
());
// 将盘点的仓库状态改为 否
// 将盘点的仓库状态改为 否
ErpWarehouse
warehouse
=
new
ErpWarehouse
();
ErpWarehouse
warehouse
=
warehouseMapper
.
selectById
(
bo
.
getWarehouseId
());
warehouse
.
setId
(
bo
.
getWarehouseId
());
warehouse
.
setIsCheck
(
IsEnableStatus
.
NO
.
getCode
());
warehouse
.
setIsCheck
(
IsEnableStatus
.
NO
.
getCode
());
warehouseMapper
.
updateById
(
warehouse
);
warehouseMapper
.
updateById
(
warehouse
);
// 将盘点所在仓库下的物料是否盘点状态更改为 是
// 将盘点所在仓库下的物料是否盘点状态更改为 是
LambdaUpdateWrapper
<
ErpMaterial
>
materialLambdaUpdateWrapper
=
Wrappers
.
lambdaUpdate
();
//
LambdaUpdateWrapper<ErpMaterial> materialLambdaUpdateWrapper = Wrappers.lambdaUpdate();
materialLambdaUpdateWrapper
.
eq
(
ErpMaterial:
:
getWarehouseId
,
materialCheck
.
getWarehouseId
());
//
materialLambdaUpdateWrapper.eq(ErpMaterial::getWarehouseId, materialCheck.getWarehouseId());
materialLambdaUpdateWrapper
.
set
(
ErpMaterial:
:
getIsCheck
,
IsEnableStatus
.
NO
.
getCode
());
//
materialLambdaUpdateWrapper.set(ErpMaterial::getIsCheck, IsEnableStatus.NO.getCode());
materialMapper
.
update
(
materialLambdaUpdateWrapper
);
//
materialMapper.update(materialLambdaUpdateWrapper);
boolean
flag
=
baseMapper
.
updateById
(
materialCheck
)
>
0
;
boolean
flag
=
baseMapper
.
updateById
(
materialCheck
)
>
0
;
if
(
flag
)
{
if
(
flag
)
{
List
<
ErpMaterialPutawayInfo
>
putawayInfoList
=
new
ArrayList
<>();
List
<
ErpMaterialPutawayInfo
>
putawayInfoList
=
new
ArrayList
<>();
...
@@ -190,24 +191,26 @@ public class ErpMaterialCheckServiceImpl implements IErpMaterialCheckService {
...
@@ -190,24 +191,26 @@ public class ErpMaterialCheckServiceImpl implements IErpMaterialCheckService {
throw
new
RuntimeException
(
"盘点结束失败,盘点明细不能为空!"
);
throw
new
RuntimeException
(
"盘点结束失败,盘点明细不能为空!"
);
}
}
checkInfoList
.
forEach
(
item
->
{
checkInfoList
.
forEach
(
item
->
{
/* 查询物料 */
ErpMaterial
material
=
materialMapper
.
selectById
(
item
.
getMaterialId
());
ErpMaterial
material
=
materialMapper
.
selectById
(
item
.
getMaterialId
());
// 判断盘盈或盘亏
/* 查询物料库存 */
ErpMaterialInventoryRecordVo
recordVo
=
materialInventoryRecordMapper
.
queryMaterialByWarehouseIdAndMaterialId
(
bo
.
getWarehouseId
(),
item
.
getMaterialId
());
// 判断盘盈或盘亏 盘盈则新增入库、盘亏新增出库
if
(
item
.
getResultState
().
equals
(
CheckInfoState
.
ONE
.
getCode
()))
{
if
(
item
.
getResultState
().
equals
(
CheckInfoState
.
ONE
.
getCode
()))
{
ErpMaterialPutawayInfo
putawayInfo
=
BeanUtil
.
toBean
(
material
,
ErpMaterialPutawayInfo
.
class
);
ErpMaterialPutawayInfo
putawayInfo
=
BeanUtil
.
toBean
(
material
,
ErpMaterialPutawayInfo
.
class
);
putawayInfo
.
setPutawayNumber
(
item
.
getCheckNum
().
subtract
(
material
.
getInventory
()));
putawayInfo
.
setPutawayNumber
(
item
.
getCheckNum
().
subtract
(
recordVo
.
getInventory
()));
putawayInfo
.
setMaterialId
(
material
.
get
Id
());
putawayInfo
.
setMaterialId
(
recordVo
.
getMaterial
Id
());
putawayInfo
.
setId
(
null
);
putawayInfo
.
setId
(
null
);
putawayInfoList
.
add
(
putawayInfo
);
putawayInfoList
.
add
(
putawayInfo
);
}
else
if
(
item
.
getResultState
().
equals
(
CheckInfoState
.
TWO
.
getCode
()))
{
}
else
if
(
item
.
getResultState
().
equals
(
CheckInfoState
.
TWO
.
getCode
()))
{
ErpMaterialPickingInfo
pickingInfo
=
BeanUtil
.
toBean
(
material
,
ErpMaterialPickingInfo
.
class
);
ErpMaterialPickingInfo
pickingInfo
=
BeanUtil
.
toBean
(
material
,
ErpMaterialPickingInfo
.
class
);
pickingInfo
.
setCollectNumber
(
material
.
getInventory
().
subtract
(
item
.
getCheckNum
()));
pickingInfo
.
setCollectNumber
(
recordVo
.
getInventory
().
subtract
(
item
.
getCheckNum
()));
pickingInfo
.
setMaterialId
(
material
.
get
Id
());
pickingInfo
.
setMaterialId
(
recordVo
.
getMaterial
Id
());
pickingInfo
.
setId
(
null
);
pickingInfo
.
setId
(
null
);
pickingInfoList
.
add
(
pickingInfo
);
pickingInfoList
.
add
(
pickingInfo
);
}
}
material
.
setInventory
(
item
.
getCheckNum
());
materialMapper
.
updateById
(
material
);
});
});
/* 创建入库单 */
if
(!
putawayInfoList
.
isEmpty
())
{
if
(!
putawayInfoList
.
isEmpty
())
{
ErpMaterialPutaway
putaway
=
new
ErpMaterialPutaway
();
ErpMaterialPutaway
putaway
=
new
ErpMaterialPutaway
();
putaway
.
setPutawayCode
(
RedisUtils
.
generateNextNumber
(
"RK"
));
putaway
.
setPutawayCode
(
RedisUtils
.
generateNextNumber
(
"RK"
));
...
@@ -222,21 +225,50 @@ public class ErpMaterialCheckServiceImpl implements IErpMaterialCheckService {
...
@@ -222,21 +225,50 @@ public class ErpMaterialCheckServiceImpl implements IErpMaterialCheckService {
.
stream
()
.
stream
()
.
peek
(
item
->
item
.
setPutawayId
(
putaway
.
getId
()))
.
peek
(
item
->
item
.
setPutawayId
(
putaway
.
getId
()))
.
collect
(
Collectors
.
toList
()));
.
collect
(
Collectors
.
toList
()));
/* 新增物料库存记录 */
materialInventoryRecordMapper
.
insertBatch
(
putawayInfoList
.
stream
().
map
(
item
->
{
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
record
.
setWarehouseId
(
warehouse
.
getId
());
record
.
setDeptId
(
warehouse
.
getDeptId
());
record
.
setNumber
(
item
.
getPutawayNumber
());
record
.
setPrice
(
item
.
getPutawayPrice
());
record
.
setMoney
(
item
.
getPutawayMoney
());
record
.
setType
(
InventoryType
.
putaway
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
())
);
}
}
/* 创建出库单 */
if
(!
pickingInfoList
.
isEmpty
())
{
if
(!
pickingInfoList
.
isEmpty
())
{
ErpMaterialPicking
picking
=
new
ErpMaterialPicking
();
ErpMaterialPicking
picking
=
new
ErpMaterialPicking
();
picking
.
setOutNumber
(
RedisUtils
.
generateNextNumber
(
"CK"
));
picking
.
setOutNumber
(
RedisUtils
.
generateNextNumber
(
"CK"
));
picking
.
setType
(
PickingType
.
TWO
.
getCode
());
picking
.
setType
(
PickingType
.
TWO
.
getCode
());
picking
.
setState
(
PickingState
.
TWO
.
getCode
());
picking
.
setState
(
PickingState
.
TWO
.
getCode
());
picking
.
setOutTime
(
new
Date
());
picking
.
setOutTime
(
new
Date
());
// picking.setReceiveUserId(LoginHelper.getUserId());
// picking.setReceiveUserName(LoginHelper.getUsername());
materialPickingMapper
.
insert
(
picking
);
materialPickingMapper
.
insert
(
picking
);
materialPickingInfoMapper
.
insertBatch
(
materialPickingInfoMapper
.
insertBatch
(
pickingInfoList
pickingInfoList
.
stream
()
.
stream
()
.
peek
(
item
->
item
.
setPickingId
(
picking
.
getId
()))
.
peek
(
item
->
item
.
setPickingId
(
picking
.
getId
()))
.
collect
(
Collectors
.
toList
()));
.
collect
(
Collectors
.
toList
()));
/* 新增物料库存记录 */
materialInventoryRecordMapper
.
insertBatch
(
pickingInfoList
.
stream
().
map
(
item
->
{
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
record
.
setWarehouseId
(
warehouse
.
getId
());
record
.
setDeptId
(
warehouse
.
getDeptId
());
record
.
setNumber
(
item
.
getCollectNumber
());
record
.
setPrice
(
item
.
getPrice
());
record
.
setMoney
(
item
.
getMoney
());
record
.
setType
(
InventoryType
.
putaway
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
())
);
}
}
}
}
return
flag
;
return
flag
;
...
...
maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialInventoryRecordServiceImpl.java
0 → 100644
View file @
c5024746
package
com
.
maintain
.
business
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.maintain.common.utils.StringUtils
;
import
com.maintain.common.core.page.TableDataInfo
;
import
com.maintain.common.core.domain.PageQuery
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
com.maintain.business.domain.bo.ErpMaterialInventoryRecordBo
;
import
com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo
;
import
com.maintain.business.domain.ErpMaterialInventoryRecord
;
import
com.maintain.business.mapper.ErpMaterialInventoryRecordMapper
;
import
com.maintain.business.service.IErpMaterialInventoryRecordService
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Collection
;
/**
* 物料库存记录Service业务层处理
*
* @author liushuai
* @date 2025-07-16
*/
@RequiredArgsConstructor
@Service
public
class
ErpMaterialInventoryRecordServiceImpl
implements
IErpMaterialInventoryRecordService
{
private
final
ErpMaterialInventoryRecordMapper
baseMapper
;
/**
* 查询物料库存记录
*/
@Override
public
ErpMaterialInventoryRecordVo
queryById
(
Long
id
){
return
baseMapper
.
selectVoById
(
id
);
}
/**
* 查询物料库存记录列表
*/
@Override
public
TableDataInfo
<
ErpMaterialInventoryRecordVo
>
queryPageList
(
ErpMaterialInventoryRecordBo
bo
,
PageQuery
pageQuery
)
{
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
lqw
=
buildQueryWrapper
(
bo
);
Page
<
ErpMaterialInventoryRecordVo
>
result
=
baseMapper
.
selectVoPage
(
pageQuery
.
build
(),
lqw
);
return
TableDataInfo
.
build
(
result
);
}
/**
* 查询物料库存记录列表(自定义查询)
*
* @param bo
* @param pageQuery
*/
@Override
public
TableDataInfo
<
ErpMaterialInventoryRecordVo
>
customQueryPageList
(
ErpMaterialInventoryRecordBo
bo
,
PageQuery
pageQuery
)
{
Page
<
ErpMaterialInventoryRecordVo
>
queryPageList
=
baseMapper
.
customQueryPageList
(
pageQuery
.
build
(),
this
.
customBuildQueryWrapper
(
bo
));
return
TableDataInfo
.
build
(
queryPageList
);
}
private
QueryWrapper
<
ErpMaterialInventoryRecord
>
customBuildQueryWrapper
(
ErpMaterialInventoryRecordBo
bo
)
{
QueryWrapper
<
ErpMaterialInventoryRecord
>
query
=
Wrappers
.
query
();
query
.
eq
(
null
!=
bo
.
getMaterialId
(),
"t.material_id"
,
bo
.
getMaterialId
())
.
eq
(
null
!=
bo
.
getWarehouseId
(),
"t.warehouse_id"
,
bo
.
getWarehouseId
())
.
like
(
StringUtils
.
isNotBlank
(
bo
.
getMaterialName
()),
"t.material_name"
,
bo
.
getMaterialName
())
.
like
(
StringUtils
.
isNotBlank
(
bo
.
getMaterialCode
()),
"t.material_code"
,
bo
.
getMaterialCode
())
.
like
(
StringUtils
.
isNotBlank
(
bo
.
getMaterialSpecifications
()),
"t.material_specifications"
,
bo
.
getMaterialSpecifications
())
.
like
(
StringUtils
.
isNotBlank
(
bo
.
getVendorName
()),
"t.vendor_name"
,
bo
.
getVendorName
())
.
like
(
StringUtils
.
isNotBlank
(
bo
.
getWarehouseName
()),
"t.name"
,
bo
.
getWarehouseName
());
return
query
;
}
/**
* 查询物料库存记录列表
*/
@Override
public
List
<
ErpMaterialInventoryRecordVo
>
queryListByMaterialId
(
ErpMaterialInventoryRecordBo
bo
)
{
return
baseMapper
.
queryListByWarehouseIdAndMaterialId
(
bo
.
getWarehouseId
(),
bo
.
getMaterialId
(),
bo
.
getType
());
}
private
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
buildQueryWrapper
(
ErpMaterialInventoryRecordBo
bo
)
{
Map
<
String
,
Object
>
params
=
bo
.
getParams
();
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
bo
.
getInfoId
()
!=
null
,
ErpMaterialInventoryRecord:
:
getInfoId
,
bo
.
getInfoId
());
lqw
.
eq
(
bo
.
getMaterialId
()
!=
null
,
ErpMaterialInventoryRecord:
:
getMaterialId
,
bo
.
getMaterialId
());
lqw
.
eq
(
bo
.
getDeptId
()
!=
null
,
ErpMaterialInventoryRecord:
:
getDeptId
,
bo
.
getDeptId
());
lqw
.
eq
(
bo
.
getWarehouseId
()
!=
null
,
ErpMaterialInventoryRecord:
:
getWarehouseId
,
bo
.
getWarehouseId
());
lqw
.
eq
(
bo
.
getNumber
()
!=
null
,
ErpMaterialInventoryRecord:
:
getNumber
,
bo
.
getNumber
());
lqw
.
eq
(
bo
.
getPrice
()
!=
null
,
ErpMaterialInventoryRecord:
:
getPrice
,
bo
.
getPrice
());
lqw
.
eq
(
bo
.
getMoney
()
!=
null
,
ErpMaterialInventoryRecord:
:
getMoney
,
bo
.
getMoney
());
lqw
.
eq
(
StringUtils
.
isNotBlank
(
bo
.
getType
()),
ErpMaterialInventoryRecord:
:
getType
,
bo
.
getType
());
return
lqw
;
}
/**
* 新增物料库存记录
*/
@Override
public
Boolean
insertByBo
(
ErpMaterialInventoryRecordBo
bo
)
{
ErpMaterialInventoryRecord
add
=
BeanUtil
.
toBean
(
bo
,
ErpMaterialInventoryRecord
.
class
);
validEntityBeforeSave
(
add
);
boolean
flag
=
baseMapper
.
insert
(
add
)
>
0
;
if
(
flag
)
{
bo
.
setId
(
add
.
getId
());
}
return
flag
;
}
/**
* 修改物料库存记录
*/
@Override
public
Boolean
updateByBo
(
ErpMaterialInventoryRecordBo
bo
)
{
ErpMaterialInventoryRecord
update
=
BeanUtil
.
toBean
(
bo
,
ErpMaterialInventoryRecord
.
class
);
validEntityBeforeSave
(
update
);
return
baseMapper
.
updateById
(
update
)
>
0
;
}
/**
* 保存前的数据校验
*/
private
void
validEntityBeforeSave
(
ErpMaterialInventoryRecord
entity
){
//TODO 做一些数据校验,如唯一约束
}
/**
* 批量删除物料库存记录
*/
@Override
public
Boolean
deleteWithValidByIds
(
Collection
<
Long
>
ids
,
Boolean
isValid
)
{
if
(
isValid
){
//TODO 做一些业务上的校验,判断是否需要校验
}
return
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
}
}
maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialPickingServiceImpl.java
View file @
c5024746
...
@@ -5,13 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
...
@@ -5,13 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.maintain.business.domain.*
;
import
com.maintain.business.domain.*
;
import
com.maintain.business.domain.bo.ErpMaterialPickingInfoBo
;
import
com.maintain.business.domain.bo.ErpMaterialPickingInfoBo
;
import
com.maintain.business.domain.vo.ErpMaterialPickingInfoVo
;
import
com.maintain.business.domain.vo.*
;
import
com.maintain.business.domain.vo.ErpMaterialPutawayInfoVo
;
import
com.maintain.business.mapper.*
;
import
com.maintain.business.mapper.*
;
import
com.maintain.business.service.IErpMaterialService
;
import
com.maintain.business.service.IErpMaterialService
;
import
com.maintain.common.core.domain.BaseEntity
;
import
com.maintain.common.core.domain.BaseEntity
;
import
com.maintain.common.enums.InventoryType
;
import
com.maintain.common.enums.IsEnableStatus
;
import
com.maintain.common.enums.IsEnableStatus
;
import
com.maintain.common.enums.PickingState
;
import
com.maintain.common.enums.PickingState
;
import
com.maintain.common.exception.ServiceException
;
import
com.maintain.common.helper.LoginHelper
;
import
com.maintain.common.helper.LoginHelper
;
import
com.maintain.common.utils.StringUtils
;
import
com.maintain.common.utils.StringUtils
;
import
com.maintain.common.core.page.TableDataInfo
;
import
com.maintain.common.core.page.TableDataInfo
;
...
@@ -23,7 +24,6 @@ import com.maintain.common.utils.redis.RedisUtils;
...
@@ -23,7 +24,6 @@ import com.maintain.common.utils.redis.RedisUtils;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.maintain.business.domain.bo.ErpMaterialPickingBo
;
import
com.maintain.business.domain.bo.ErpMaterialPickingBo
;
import
com.maintain.business.domain.vo.ErpMaterialPickingVo
;
import
com.maintain.business.service.IErpMaterialPickingService
;
import
com.maintain.business.service.IErpMaterialPickingService
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -48,6 +48,8 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
...
@@ -48,6 +48,8 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
private
final
ErpCarMapper
carMapper
;
private
final
ErpCarMapper
carMapper
;
private
final
IErpMaterialService
materialService
;
private
final
IErpMaterialService
materialService
;
private
final
ErpMaterialMapper
materialMapper
;
private
final
ErpMaterialMapper
materialMapper
;
private
final
ErpMaterialInventoryRecordMapper
materialInventoryRecordMapper
;
private
final
ErpWarehouseMapper
warehouseMapper
;
/**
/**
* 查询报修单-领料出库单
* 查询报修单-领料出库单
...
@@ -152,23 +154,51 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
...
@@ -152,23 +154,51 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
validEntityBeforeSave
(
add
);
validEntityBeforeSave
(
add
);
boolean
flag
=
baseMapper
.
insert
(
add
)
>
0
;
boolean
flag
=
baseMapper
.
insert
(
add
)
>
0
;
if
(
flag
)
{
if
(
flag
)
{
List
<
ErpMaterialPickingInfoBo
>
infoBoList
=
bo
.
getMaterialList
();
List
<
ErpMaterialPickingInfo
>
collect
=
bo
.
getMaterialList
().
stream
().
map
(
item
->
{
List
<
ErpMaterialPickingInfo
>
collect
=
infoBoList
.
stream
().
map
(
item
->
{
ErpMaterialPickingInfo
info
=
BeanUtil
.
toBean
(
item
,
ErpMaterialPickingInfo
.
class
);
ErpMaterialPickingInfo
info
=
BeanUtil
.
toBean
(
item
,
ErpMaterialPickingInfo
.
class
);
ErpMaterial
material
=
materialMapper
.
selectById
(
item
.
getMaterialId
());
ErpMaterial
material
=
materialMapper
.
selectById
(
item
.
getMaterialId
());
BeanUtil
.
copyProperties
(
material
,
info
);
BeanUtil
.
copyProperties
(
material
,
info
);
info
.
setId
(
null
);
info
.
setId
(
null
);
info
.
setRepairFormId
(
bo
.
getRepairFormId
());
info
.
setRepairFormId
(
bo
.
getRepairFormId
());
info
.
setPickingId
(
add
.
getId
());
info
.
setPickingId
(
add
.
getId
());
info
.
setWarehouseId
(
item
.
getWarehouseId
());
info
.
setWarehouseName
(
item
.
getWarehouseName
());
info
.
setState
(
bo
.
getState
());
info
.
setState
(
bo
.
getState
());
// 更新物料库存
info
.
setPrice
(
item
.
getPrice
());
if
(
bo
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
info
.
setMoney
(
item
.
getMoney
());
materialService
.
modifyMaterialInventory
(
item
.
getMaterialId
(),
item
.
getCollectNumber
(),
false
);
}
return
info
;
return
info
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
pickingInfoMapper
.
insertBatch
(
collect
);
pickingInfoMapper
.
insertBatch
(
collect
);
bo
.
setId
(
add
.
getId
());
/* 创建物料库存记录表 */
if
(
bo
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
List
<
ErpMaterialInventoryRecord
>
inventoryRecordList
=
collect
.
stream
().
map
(
item
->
{
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
lambdaQueryWrapper
=
Wrappers
.
lambdaQuery
();
lambdaQueryWrapper
.
eq
(
ErpMaterialInventoryRecord:
:
getWarehouseId
,
item
.
getWarehouseId
())
.
eq
(
ErpMaterialInventoryRecord:
:
getMaterialId
,
item
.
getMaterialId
());
List
<
ErpMaterialInventoryRecordVo
>
recordVoList
=
materialInventoryRecordMapper
.
customQueryList
(
lambdaQueryWrapper
);
if
(
recordVoList
.
isEmpty
())
{
throw
new
ServiceException
(
"仓库["
+
item
.
getWarehouseName
()+
"]中物料["
+
item
.
getMaterialName
()+
"]库存异常,请联系管理员!"
);
}
ErpMaterialInventoryRecordVo
recordVo
=
recordVoList
.
get
(
0
);
if
(
item
.
getCollectNumber
().
compareTo
(
recordVo
.
getInventory
())
>
0
)
{
throw
new
ServiceException
(
"仓库["
+
item
.
getWarehouseName
()+
"]中物料["
+
item
.
getMaterialName
()+
"]库存不足,请调整后重试!"
);
}
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
ErpWarehouseVo
warehouseVo
=
warehouseMapper
.
selectVoById
(
item
.
getWarehouseId
());
record
.
setWarehouseId
(
warehouseVo
.
getId
());
record
.
setDeptId
(
warehouseVo
.
getDeptId
());
record
.
setNumber
(
item
.
getCollectNumber
());
record
.
setPrice
(
item
.
getPrice
());
record
.
setMoney
(
item
.
getMoney
());
record
.
setType
(
InventoryType
.
picking
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
());
materialInventoryRecordMapper
.
insertBatch
(
inventoryRecordList
);
}
}
}
return
flag
;
return
flag
;
}
}
...
@@ -204,14 +234,44 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
...
@@ -204,14 +234,44 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
info
.
setId
(
null
);
info
.
setId
(
null
);
info
.
setPickingId
(
update
.
getId
());
info
.
setPickingId
(
update
.
getId
());
info
.
setRepairFormId
(
update
.
getRepairFormId
());
info
.
setRepairFormId
(
update
.
getRepairFormId
());
info
.
setWarehouseId
(
item
.
getWarehouseId
());
info
.
setWarehouseName
(
item
.
getWarehouseName
());
info
.
setState
(
bo
.
getState
());
info
.
setState
(
bo
.
getState
());
// 更新物料库存
info
.
setPrice
(
item
.
getPrice
());
if
(
bo
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
info
.
setMoney
(
item
.
getMoney
());
materialService
.
modifyMaterialInventory
(
item
.
getMaterialId
(),
item
.
getCollectNumber
(),
false
);
}
return
info
;
return
info
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
pickingInfoMapper
.
insertBatch
(
collect
);
pickingInfoMapper
.
insertBatch
(
collect
);
/* 创建物料库存记录表 */
if
(
bo
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
List
<
ErpMaterialInventoryRecord
>
inventoryRecordList
=
collect
.
stream
().
map
(
item
->
{
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
lambdaQueryWrapper
=
Wrappers
.
lambdaQuery
();
lambdaQueryWrapper
.
eq
(
ErpMaterialInventoryRecord:
:
getWarehouseId
,
item
.
getWarehouseId
())
.
eq
(
ErpMaterialInventoryRecord:
:
getMaterialId
,
item
.
getMaterialId
());
List
<
ErpMaterialInventoryRecordVo
>
recordVoList
=
materialInventoryRecordMapper
.
customQueryList
(
lambdaQueryWrapper
);
if
(
recordVoList
.
isEmpty
())
{
throw
new
ServiceException
(
"仓库["
+
item
.
getWarehouseName
()+
"]中物料["
+
item
.
getMaterialName
()+
"]库存异常,请联系管理员!"
);
}
ErpMaterialInventoryRecordVo
recordVo
=
recordVoList
.
get
(
0
);
if
(
item
.
getCollectNumber
().
compareTo
(
recordVo
.
getInventory
())
>
0
)
{
throw
new
ServiceException
(
"仓库["
+
item
.
getWarehouseName
()+
"]中物料["
+
item
.
getMaterialName
()+
"]库存不足,请调整后重试!"
);
}
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
ErpWarehouseVo
warehouseVo
=
warehouseMapper
.
selectVoById
(
item
.
getWarehouseId
());
record
.
setWarehouseId
(
warehouseVo
.
getId
());
record
.
setDeptId
(
warehouseVo
.
getDeptId
());
record
.
setNumber
(
item
.
getCollectNumber
());
record
.
setPrice
(
item
.
getPrice
());
record
.
setMoney
(
item
.
getMoney
());
record
.
setType
(
InventoryType
.
picking
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
());
materialInventoryRecordMapper
.
insertBatch
(
inventoryRecordList
);
}
}
}
return
flag
;
return
flag
;
}
}
...
@@ -235,14 +295,14 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
...
@@ -235,14 +295,14 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
// 删除领料出库单
// 删除领料出库单
boolean
flag
=
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
boolean
flag
=
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
if
(
flag
)
{
if
(
flag
)
{
//
更新物料库存
//
删除物料库存记录数据
LambdaQueryWrapper
<
ErpMaterialPickingInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
ErpMaterialPickingInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
in
(
ErpMaterialPickingInfo:
:
getPickingId
,
ids
);
queryWrapper
.
in
(
ErpMaterialPickingInfo:
:
getPickingId
,
ids
);
List
<
ErpMaterialPickingInfoVo
>
pickingInfoVoList
=
pickingInfoMapper
.
selectVoList
(
queryWrapper
);
List
<
ErpMaterialPickingInfoVo
>
pickingInfoVoList
=
pickingInfoMapper
.
selectVoList
(
queryWrapper
);
for
(
ErpMaterialPickingInfoVo
infoVo
:
pickingInfoVoList
)
{
if
(!
pickingInfoVoList
.
isEmpty
()
)
{
if
(
infoVo
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
lambdaQueryWrapper
=
Wrappers
.
lambdaQuery
();
materialService
.
modifyMaterialInventory
(
infoVo
.
getMaterialId
(),
infoVo
.
getCollectNumber
(),
false
);
lambdaQueryWrapper
.
eq
(
ErpMaterialInventoryRecord:
:
getInfoId
,
pickingInfoVoList
.
stream
().
map
(
ErpMaterialPickingInfoVo:
:
getId
).
collect
(
Collectors
.
toList
())
);
}
materialInventoryRecordMapper
.
delete
(
lambdaQueryWrapper
);
}
}
// 删除领料出库单明细
// 删除领料出库单明细
LambdaUpdateWrapper
<
ErpMaterialPickingInfo
>
updateWrapper
=
Wrappers
.
lambdaUpdate
();
LambdaUpdateWrapper
<
ErpMaterialPickingInfo
>
updateWrapper
=
Wrappers
.
lambdaUpdate
();
...
@@ -267,18 +327,40 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
...
@@ -267,18 +327,40 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
lqw
.
set
(
ErpMaterialPicking:
:
getState
,
PickingState
.
TWO
.
getCode
());
lqw
.
set
(
ErpMaterialPicking:
:
getState
,
PickingState
.
TWO
.
getCode
());
boolean
flag
=
baseMapper
.
update
(
lqw
)
>
0
;
boolean
flag
=
baseMapper
.
update
(
lqw
)
>
0
;
if
(
flag
)
{
if
(
flag
)
{
LambdaQueryWrapper
<
ErpMaterialPickingInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
in
(
ErpMaterialPickingInfo:
:
getPickingId
,
ids
).
eq
(
ErpMaterialPickingInfo:
:
getState
,
PickingState
.
ONE
.
getCode
());
List
<
ErpMaterialPickingInfoVo
>
pickingInfoVoList
=
pickingInfoMapper
.
selectVoList
(
queryWrapper
);
List
<
ErpMaterialInventoryRecord
>
inventoryRecordList
=
pickingInfoVoList
.
stream
().
map
(
item
->
{
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
lambdaQueryWrapper
=
Wrappers
.
lambdaQuery
();
lambdaQueryWrapper
.
eq
(
ErpMaterialInventoryRecord:
:
getWarehouseId
,
item
.
getWarehouseId
())
.
eq
(
ErpMaterialInventoryRecord:
:
getMaterialId
,
item
.
getMaterialId
());
List
<
ErpMaterialInventoryRecordVo
>
recordVoList
=
materialInventoryRecordMapper
.
customQueryList
(
lambdaQueryWrapper
);
if
(
recordVoList
.
isEmpty
())
{
throw
new
ServiceException
(
"仓库["
+
item
.
getWarehouseName
()+
"]中物料["
+
item
.
getMaterialName
()+
"]库存异常,请联系管理员!"
);
}
ErpMaterialInventoryRecordVo
recordVo
=
recordVoList
.
get
(
0
);
if
(
item
.
getCollectNumber
().
compareTo
(
recordVo
.
getInventory
())
>
0
)
{
throw
new
ServiceException
(
"仓库["
+
item
.
getWarehouseName
()+
"]中物料["
+
item
.
getMaterialName
()+
"]库存不足,请调整后重试!"
);
}
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
ErpWarehouseVo
warehouseVo
=
warehouseMapper
.
selectVoById
(
item
.
getWarehouseId
());
record
.
setWarehouseId
(
warehouseVo
.
getId
());
record
.
setDeptId
(
warehouseVo
.
getDeptId
());
record
.
setNumber
(
item
.
getCollectNumber
());
record
.
setPrice
(
item
.
getPrice
());
record
.
setMoney
(
item
.
getMoney
());
record
.
setType
(
InventoryType
.
picking
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
());
materialInventoryRecordMapper
.
insertBatch
(
inventoryRecordList
);
// 更新出库明细状态
// 更新出库明细状态
LambdaUpdateWrapper
<
ErpMaterialPickingInfo
>
updateWrapper
=
Wrappers
.
lambdaUpdate
();
LambdaUpdateWrapper
<
ErpMaterialPickingInfo
>
updateWrapper
=
Wrappers
.
lambdaUpdate
();
updateWrapper
.
in
(
ErpMaterialPickingInfo:
:
getPickingId
,
ids
).
set
(
ErpMaterialPickingInfo:
:
getState
,
PickingState
.
TWO
.
getCode
());
updateWrapper
.
in
(
ErpMaterialPickingInfo:
:
getPickingId
,
ids
).
set
(
ErpMaterialPickingInfo:
:
getState
,
PickingState
.
TWO
.
getCode
());
pickingInfoMapper
.
update
(
updateWrapper
);
pickingInfoMapper
.
update
(
updateWrapper
);
// 更新物料库存
LambdaQueryWrapper
<
ErpMaterialPickingInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
in
(
ErpMaterialPickingInfo:
:
getPickingId
,
ids
).
eq
(
ErpMaterialPickingInfo:
:
getState
,
PickingState
.
ONE
.
getCode
());
List
<
ErpMaterialPickingInfoVo
>
pickingInfoVoList
=
pickingInfoMapper
.
selectVoList
(
queryWrapper
);
for
(
ErpMaterialPickingInfoVo
infoVo
:
pickingInfoVoList
)
{
materialService
.
modifyMaterialInventory
(
infoVo
.
getMaterialId
(),
infoVo
.
getCollectNumber
(),
false
);
}
}
}
return
flag
;
return
flag
;
}
}
...
@@ -293,23 +375,37 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
...
@@ -293,23 +375,37 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
ErpMaterialPicking
materialPicking
=
baseMapper
.
selectById
(
bo
.
getId
());
ErpMaterialPicking
materialPicking
=
baseMapper
.
selectById
(
bo
.
getId
());
materialPicking
.
setReturnNumber
(
RedisUtils
.
generateNextNumber
(
"TL"
));
materialPicking
.
setReturnNumber
(
RedisUtils
.
generateNextNumber
(
"TL"
));
materialPicking
.
setReturnTime
(
new
Date
());
materialPicking
.
setReturnTime
(
new
Date
());
// 如果领料单状态已完成,if需要更新物料库存以及领料出库明细状态,else只需要更新领料出库明细状态
// 更新领料出库单状态
LambdaUpdateWrapper
<
ErpMaterialPickingInfo
>
updateWrapper
=
Wrappers
.
lambdaUpdate
();
materialPicking
.
setState
(
PickingState
.
THREE
.
getCode
());
updateWrapper
.
eq
(
ErpMaterialPickingInfo:
:
getPickingId
,
bo
.
getId
());
boolean
flag
=
baseMapper
.
updateById
(
materialPicking
)
>
0
;
updateWrapper
.
set
(
ErpMaterialPickingInfo:
:
getState
,
PickingState
.
THREE
.
getCode
());
if
(
flag
)
{
if
(
materialPicking
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
// 更新领料出库明细状态
LambdaUpdateWrapper
<
ErpMaterialPickingInfo
>
updateWrapper
=
Wrappers
.
lambdaUpdate
();
updateWrapper
.
eq
(
ErpMaterialPickingInfo:
:
getPickingId
,
bo
.
getId
())
.
set
(
ErpMaterialPickingInfo:
:
getState
,
PickingState
.
THREE
.
getCode
());
pickingInfoMapper
.
update
(
updateWrapper
);
// 创建物料库存记录数据
LambdaQueryWrapper
<
ErpMaterialPickingInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
ErpMaterialPickingInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
eq
(
ErpMaterialPickingInfo:
:
getPickingId
,
bo
.
getId
());
queryWrapper
.
eq
(
ErpMaterialPickingInfo:
:
getPickingId
,
bo
.
getId
());
List
<
ErpMaterialPickingInfoVo
>
pickingInfoVoList
=
pickingInfoMapper
.
selectVoList
(
queryWrapper
);
List
<
ErpMaterialPickingInfoVo
>
pickingInfoVoList
=
pickingInfoMapper
.
selectVoList
(
queryWrapper
);
for
(
ErpMaterialPickingInfoVo
infoVo
:
pickingInfoVoList
)
{
if
(!
pickingInfoVoList
.
isEmpty
())
{
// 更新物料库存
List
<
ErpMaterialInventoryRecord
>
inventoryRecordList
=
pickingInfoVoList
.
stream
().
map
(
item
->
{
materialService
.
modifyMaterialInventory
(
infoVo
.
getMaterialId
(),
infoVo
.
getCollectNumber
(),
true
);
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
ErpWarehouseVo
warehouseVo
=
warehouseMapper
.
selectVoById
(
item
.
getWarehouseId
());
record
.
setWarehouseId
(
warehouseVo
.
getId
());
record
.
setDeptId
(
warehouseVo
.
getDeptId
());
record
.
setNumber
(
item
.
getCollectNumber
());
record
.
setPrice
(
item
.
getPrice
());
record
.
setMoney
(
item
.
getMoney
());
record
.
setType
(
InventoryType
.
back
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
());
materialInventoryRecordMapper
.
insertBatch
(
inventoryRecordList
);
}
}
}
}
// 更新领料出库明细状态
return
flag
;
pickingInfoMapper
.
update
(
updateWrapper
);
// 更新领料出库单状态
materialPicking
.
setState
(
PickingState
.
THREE
.
getCode
());
return
baseMapper
.
updateById
(
materialPicking
)
>
0
;
}
}
}
}
maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialPutawayServiceImpl.java
View file @
c5024746
...
@@ -10,11 +10,13 @@ import com.maintain.business.domain.bo.ErpMaterialPutawayBo;
...
@@ -10,11 +10,13 @@ import com.maintain.business.domain.bo.ErpMaterialPutawayBo;
import
com.maintain.business.domain.bo.ErpMaterialPutawayInfoBo
;
import
com.maintain.business.domain.bo.ErpMaterialPutawayInfoBo
;
import
com.maintain.business.domain.vo.*
;
import
com.maintain.business.domain.vo.*
;
import
com.maintain.business.mapper.*
;
import
com.maintain.business.mapper.*
;
import
com.maintain.business.service.IErpMaterialInventoryRecordService
;
import
com.maintain.business.service.IErpMaterialPutawayService
;
import
com.maintain.business.service.IErpMaterialPutawayService
;
import
com.maintain.business.service.IErpMaterialService
;
import
com.maintain.business.service.IErpMaterialService
;
import
com.maintain.common.core.domain.BaseEntity
;
import
com.maintain.common.core.domain.BaseEntity
;
import
com.maintain.common.core.domain.PageQuery
;
import
com.maintain.common.core.domain.PageQuery
;
import
com.maintain.common.core.page.TableDataInfo
;
import
com.maintain.common.core.page.TableDataInfo
;
import
com.maintain.common.enums.InventoryType
;
import
com.maintain.common.enums.PickingState
;
import
com.maintain.common.enums.PickingState
;
import
com.maintain.common.helper.LoginHelper
;
import
com.maintain.common.helper.LoginHelper
;
import
com.maintain.common.utils.StringUtils
;
import
com.maintain.common.utils.StringUtils
;
...
@@ -44,6 +46,7 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
...
@@ -44,6 +46,7 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
private
final
ErpMaterialPutawayInfoMapper
putawayInfoMapper
;
private
final
ErpMaterialPutawayInfoMapper
putawayInfoMapper
;
private
final
ErpMaterialMapper
materialMapper
;
private
final
ErpMaterialMapper
materialMapper
;
private
final
IErpMaterialService
materialService
;
private
final
IErpMaterialService
materialService
;
private
final
ErpMaterialInventoryRecordMapper
materialInventoryRecordMapper
;
/**
/**
* 查询物料入库
* 查询物料入库
...
@@ -108,6 +111,7 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
...
@@ -108,6 +111,7 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
add
.
setCreateDeptId
(
LoginHelper
.
getDeptId
());
add
.
setCreateDeptId
(
LoginHelper
.
getDeptId
());
boolean
flag
=
baseMapper
.
insert
(
add
)
>
0
;
boolean
flag
=
baseMapper
.
insert
(
add
)
>
0
;
if
(
flag
)
{
if
(
flag
)
{
/* 保存明细 */
List
<
ErpMaterialPutawayInfoBo
>
infoBoList
=
bo
.
getPutawayInfoList
();
List
<
ErpMaterialPutawayInfoBo
>
infoBoList
=
bo
.
getPutawayInfoList
();
List
<
ErpMaterialPutawayInfo
>
collect
=
infoBoList
.
stream
().
map
(
item
->
{
List
<
ErpMaterialPutawayInfo
>
collect
=
infoBoList
.
stream
().
map
(
item
->
{
ErpMaterialPutawayInfo
putawayInfo
=
BeanUtil
.
toBean
(
item
,
ErpMaterialPutawayInfo
.
class
);
ErpMaterialPutawayInfo
putawayInfo
=
BeanUtil
.
toBean
(
item
,
ErpMaterialPutawayInfo
.
class
);
...
@@ -115,15 +119,27 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
...
@@ -115,15 +119,27 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
BeanUtil
.
copyProperties
(
material
,
putawayInfo
);
BeanUtil
.
copyProperties
(
material
,
putawayInfo
);
putawayInfo
.
setId
(
null
);
putawayInfo
.
setId
(
null
);
putawayInfo
.
setPutawayId
(
add
.
getId
());
putawayInfo
.
setPutawayId
(
add
.
getId
());
if
(
bo
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
// 更新物料库存
materialService
.
modifyMaterialInventory
(
item
.
getMaterialId
(),
item
.
getPutawayNumber
(),
true
);
}
putawayInfo
.
setState
(
bo
.
getState
());
putawayInfo
.
setState
(
bo
.
getState
());
return
putawayInfo
;
return
putawayInfo
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
bo
.
setId
(
add
.
getId
());
putawayInfoMapper
.
insertBatch
(
collect
);
putawayInfoMapper
.
insertBatch
(
collect
);
/* 创建物料库存记录表 */
if
(
bo
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
List
<
ErpMaterialInventoryRecord
>
inventoryRecordList
=
collect
.
stream
().
map
(
item
->
{
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
record
.
setWarehouseId
(
warehouseVo
.
getId
());
record
.
setDeptId
(
warehouseVo
.
getDeptId
());
record
.
setNumber
(
item
.
getPutawayNumber
());
record
.
setPrice
(
item
.
getPutawayPrice
());
record
.
setMoney
(
item
.
getPutawayMoney
());
record
.
setType
(
InventoryType
.
putaway
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
());
materialInventoryRecordMapper
.
insertBatch
(
inventoryRecordList
);
}
}
}
return
flag
;
return
flag
;
}
}
...
@@ -148,12 +164,30 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
...
@@ -148,12 +164,30 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
updateWrapper
.
in
(
ErpMaterialPutawayInfo:
:
getPutawayId
,
ids
).
set
(
ErpMaterialPutawayInfo:
:
getState
,
PickingState
.
TWO
.
getCode
());
updateWrapper
.
in
(
ErpMaterialPutawayInfo:
:
getPutawayId
,
ids
).
set
(
ErpMaterialPutawayInfo:
:
getState
,
PickingState
.
TWO
.
getCode
());
putawayInfoMapper
.
update
(
updateWrapper
);
putawayInfoMapper
.
update
(
updateWrapper
);
/
/ 更新物料库存
/
* 创建物料库存记录表 */
LambdaQueryWrapper
<
ErpMaterialPutawayInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
ErpMaterialPutawayInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
in
(
ErpMaterialPutawayInfo:
:
getPutawayId
,
ids
)
.
eq
(
ErpMaterialPutawayInfo:
:
getState
,
PickingState
.
ONE
.
getCode
())
;
queryWrapper
.
in
(
ErpMaterialPutawayInfo:
:
getPutawayId
,
ids
);
List
<
ErpMaterialPutawayInfo
>
putawayInfoList
=
putawayInfoMapper
.
selectList
(
queryWrapper
);
List
<
ErpMaterialPutawayInfo
>
putawayInfoList
=
putawayInfoMapper
.
selectList
(
queryWrapper
);
for
(
ErpMaterialPutawayInfo
info
:
putawayInfoList
)
{
if
(!
putawayInfoList
.
isEmpty
())
{
materialService
.
modifyMaterialInventory
(
info
.
getMaterialId
(),
info
.
getPutawayNumber
(),
false
);
List
<
ErpMaterialInventoryRecord
>
inventoryRecordList
=
putawayInfoList
.
stream
().
map
(
item
->
{
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
// 查出入库单
ErpMaterialPutaway
materialPutaway
=
baseMapper
.
selectById
(
item
.
getPutawayId
());
record
.
setWarehouseId
(
materialPutaway
.
getWarehouseId
());
// 查出仓库
ErpWarehouseVo
warehouseVo
=
warehouseMapper
.
selectVoById
(
materialPutaway
.
getWarehouseId
());
if
(
null
!=
warehouseVo
)
{
record
.
setDeptId
(
warehouseVo
.
getDeptId
());
}
record
.
setNumber
(
item
.
getPutawayNumber
());
record
.
setPrice
(
item
.
getPutawayPrice
());
record
.
setMoney
(
item
.
getPutawayMoney
());
record
.
setType
(
InventoryType
.
putaway
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
());
materialInventoryRecordMapper
.
insertBatch
(
inventoryRecordList
);
}
}
}
}
return
flag
;
return
flag
;
...
@@ -174,30 +208,42 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
...
@@ -174,30 +208,42 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
// 删除原有进货明细
// 删除原有进货明细
LambdaQueryWrapper
<
ErpMaterialPutawayInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
ErpMaterialPutawayInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
eq
(
ErpMaterialPutawayInfo:
:
getPutawayId
,
bo
.
getId
());
queryWrapper
.
eq
(
ErpMaterialPutawayInfo:
:
getPutawayId
,
bo
.
getId
());
/* 删除物料库存记录数据 */
List
<
ErpMaterialPutawayInfoVo
>
putawayInfoVoList
=
putawayInfoMapper
.
selectVoList
(
queryWrapper
);
List
<
ErpMaterialPutawayInfoVo
>
putawayInfoVoList
=
putawayInfoMapper
.
selectVoList
(
queryWrapper
);
for
(
ErpMaterialPutawayInfoVo
infoVo
:
putawayInfoVoList
)
{
if
(!
putawayInfoVoList
.
isEmpty
()
&&
update
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
if
(
infoVo
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
lambdaQueryWrapper
=
Wrappers
.
lambdaQuery
();
// 更新物料库存
lambdaQueryWrapper
.
in
(
ErpMaterialInventoryRecord:
:
getInfoId
,
putawayInfoVoList
.
stream
().
map
(
ErpMaterialPutawayInfoVo:
:
getId
).
collect
(
Collectors
.
toList
()));
materialService
.
modifyMaterialInventory
(
infoVo
.
getMaterialId
(),
infoVo
.
getPutawayNumber
(),
false
);
materialInventoryRecordMapper
.
delete
(
lambdaQueryWrapper
);
}
}
}
putawayInfoMapper
.
delete
(
queryWrapper
);
putawayInfoMapper
.
delete
(
queryWrapper
);
// 绑定新的进货明细
// 绑定新的进货明细
List
<
ErpMaterialPutawayInfoBo
>
infoBoList
=
bo
.
getPutawayInfoList
();
List
<
ErpMaterialPutawayInfo
>
collect
=
bo
.
getPutawayInfoList
().
stream
().
map
(
item
->
{
List
<
ErpMaterialPutawayInfo
>
collect
=
infoBoList
.
stream
().
map
(
item
->
{
ErpMaterialPutawayInfo
putawayInfo
=
BeanUtil
.
toBean
(
item
,
ErpMaterialPutawayInfo
.
class
);
ErpMaterialPutawayInfo
putawayInfo
=
BeanUtil
.
toBean
(
item
,
ErpMaterialPutawayInfo
.
class
);
ErpMaterial
material
=
materialMapper
.
selectById
(
item
.
getMaterialId
());
ErpMaterial
material
=
materialMapper
.
selectById
(
item
.
getMaterialId
());
BeanUtil
.
copyProperties
(
material
,
putawayInfo
);
BeanUtil
.
copyProperties
(
material
,
putawayInfo
);
putawayInfo
.
setId
(
null
);
putawayInfo
.
setId
(
null
);
putawayInfo
.
setPutawayId
(
update
.
getId
());
putawayInfo
.
setPutawayId
(
update
.
getId
());
if
(
bo
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
// 更新物料库存
materialService
.
modifyMaterialInventory
(
item
.
getMaterialId
(),
item
.
getPutawayNumber
(),
true
);
}
putawayInfo
.
setState
(
bo
.
getState
());
putawayInfo
.
setState
(
bo
.
getState
());
return
putawayInfo
;
return
putawayInfo
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
putawayInfoMapper
.
insertBatch
(
collect
);
putawayInfoMapper
.
insertBatch
(
collect
);
/* 创建物料库存记录表 */
if
(
update
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
List
<
ErpMaterialInventoryRecord
>
inventoryRecordList
=
collect
.
stream
().
map
(
item
->
{
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
record
.
setWarehouseId
(
warehouseVo
.
getId
());
record
.
setDeptId
(
warehouseVo
.
getDeptId
());
record
.
setNumber
(
item
.
getPutawayNumber
());
record
.
setPrice
(
item
.
getPutawayPrice
());
record
.
setMoney
(
item
.
getPutawayMoney
());
record
.
setType
(
InventoryType
.
putaway
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
());
materialInventoryRecordMapper
.
insertBatch
(
inventoryRecordList
);
}
}
}
return
flag
;
return
flag
;
}
}
...
@@ -222,13 +268,10 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
...
@@ -222,13 +268,10 @@ public class ErpMaterialPutawayServiceImpl implements IErpMaterialPutawayService
LambdaQueryWrapper
<
ErpMaterialPutawayInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
ErpMaterialPutawayInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
in
(
ErpMaterialPutawayInfo:
:
getPutawayId
,
ids
);
queryWrapper
.
in
(
ErpMaterialPutawayInfo:
:
getPutawayId
,
ids
);
List
<
ErpMaterialPutawayInfoVo
>
putawayInfoVoList
=
putawayInfoMapper
.
selectVoList
(
queryWrapper
);
List
<
ErpMaterialPutawayInfoVo
>
putawayInfoVoList
=
putawayInfoMapper
.
selectVoList
(
queryWrapper
);
// 遍历处理明细数据
// 删除物料库存记录
for
(
ErpMaterialPutawayInfoVo
infoVo
:
putawayInfoVoList
)
{
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
lambdaQueryWrapper
=
Wrappers
.
lambdaQuery
();
if
(
infoVo
.
getState
().
equals
(
PickingState
.
TWO
.
getCode
()))
{
lambdaQueryWrapper
.
in
(
ErpMaterialInventoryRecord:
:
getInfoId
,
putawayInfoVoList
.
stream
().
map
(
ErpMaterialPutawayInfoVo:
:
getId
).
collect
(
Collectors
.
toList
()));
// 更新物料库存
materialInventoryRecordMapper
.
delete
(
lambdaQueryWrapper
);
materialService
.
modifyMaterialInventory
(
infoVo
.
getMaterialId
(),
infoVo
.
getPutawayNumber
(),
false
);
}
}
// 删除入库明细
// 删除入库明细
putawayInfoMapper
.
delete
(
queryWrapper
);
putawayInfoMapper
.
delete
(
queryWrapper
);
// 删除入库单
// 删除入库单
...
...
maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialReturnsServiceImpl.java
View file @
c5024746
...
@@ -3,16 +3,17 @@ package com.maintain.business.service.impl;
...
@@ -3,16 +3,17 @@ package com.maintain.business.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.maintain.business.domain.ErpMaterialInventoryRecord
;
import
com.maintain.business.domain.ErpMaterialPutawayInfo
;
import
com.maintain.business.domain.ErpMaterialPutawayInfo
;
import
com.maintain.business.domain.ErpMaterialReturnsInfo
;
import
com.maintain.business.domain.ErpMaterialReturnsInfo
;
import
com.maintain.business.domain.bo.ErpMaterialReturnsInfoBo
;
import
com.maintain.business.domain.bo.ErpMaterialReturnsInfoBo
;
import
com.maintain.business.domain.vo.ErpMaterialPutawayVo
;
import
com.maintain.business.domain.vo.ErpMaterialPutawayVo
;
import
com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo
;
import
com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo
;
import
com.maintain.business.mapper.ErpMaterialPutawayInfoMapper
;
import
com.maintain.business.domain.vo.ErpWarehouseVo
;
import
com.maintain.business.mapper.ErpMaterialPutawayMapper
;
import
com.maintain.business.mapper.*
;
import
com.maintain.business.mapper.ErpMaterialReturnsInfoMapper
;
import
com.maintain.business.service.IErpMaterialService
;
import
com.maintain.business.service.IErpMaterialService
;
import
com.maintain.common.core.domain.BaseEntity
;
import
com.maintain.common.core.domain.BaseEntity
;
import
com.maintain.common.enums.InventoryType
;
import
com.maintain.common.enums.IsEnableStatus
;
import
com.maintain.common.enums.IsEnableStatus
;
import
com.maintain.common.helper.LoginHelper
;
import
com.maintain.common.helper.LoginHelper
;
import
com.maintain.common.utils.StringUtils
;
import
com.maintain.common.utils.StringUtils
;
...
@@ -27,7 +28,6 @@ import org.springframework.stereotype.Service;
...
@@ -27,7 +28,6 @@ import org.springframework.stereotype.Service;
import
com.maintain.business.domain.bo.ErpMaterialReturnsBo
;
import
com.maintain.business.domain.bo.ErpMaterialReturnsBo
;
import
com.maintain.business.domain.vo.ErpMaterialReturnsVo
;
import
com.maintain.business.domain.vo.ErpMaterialReturnsVo
;
import
com.maintain.business.domain.ErpMaterialReturns
;
import
com.maintain.business.domain.ErpMaterialReturns
;
import
com.maintain.business.mapper.ErpMaterialReturnsMapper
;
import
com.maintain.business.service.IErpMaterialReturnsService
;
import
com.maintain.business.service.IErpMaterialReturnsService
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -51,6 +51,8 @@ public class ErpMaterialReturnsServiceImpl implements IErpMaterialReturnsService
...
@@ -51,6 +51,8 @@ public class ErpMaterialReturnsServiceImpl implements IErpMaterialReturnsService
private
final
ErpMaterialPutawayMapper
materialPutawayMapper
;
private
final
ErpMaterialPutawayMapper
materialPutawayMapper
;
private
final
ErpMaterialPutawayInfoMapper
materialPutawayInfoMapper
;
private
final
ErpMaterialPutawayInfoMapper
materialPutawayInfoMapper
;
private
final
IErpMaterialService
materialService
;
private
final
IErpMaterialService
materialService
;
private
final
ErpMaterialInventoryRecordMapper
erpMaterialInventoryRecordMapper
;
private
final
ErpWarehouseMapper
warehouseMapper
;
/**
/**
* 查询物料退货
* 查询物料退货
...
@@ -130,12 +132,26 @@ public class ErpMaterialReturnsServiceImpl implements IErpMaterialReturnsService
...
@@ -130,12 +132,26 @@ public class ErpMaterialReturnsServiceImpl implements IErpMaterialReturnsService
BeanUtil
.
copyProperties
(
putawayInfo
,
returnsInfo
);
BeanUtil
.
copyProperties
(
putawayInfo
,
returnsInfo
);
returnsInfo
.
setId
(
null
);
returnsInfo
.
setId
(
null
);
returnsInfo
.
setReturnsId
(
materialReturns
.
getId
());
returnsInfo
.
setReturnsId
(
materialReturns
.
getId
());
// 更新物料库存
materialService
.
modifyMaterialInventory
(
item
.
getMaterialId
(),
item
.
getReturnsNumber
(),
false
);
return
returnsInfo
;
return
returnsInfo
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
materialReturnsInfoMapper
.
insertBatch
(
collect
);
materialReturnsInfoMapper
.
insertBatch
(
collect
);
// 处理入库明细状态
// 创建物料库存记录
ErpWarehouseVo
warehouseVo
=
warehouseMapper
.
selectVoById
(
materialReturns
.
getWarehouseId
());
List
<
ErpMaterialInventoryRecord
>
inventoryRecordList
=
collect
.
stream
().
map
(
item
->
{
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
record
.
setWarehouseId
(
warehouseVo
.
getId
());
record
.
setDeptId
(
warehouseVo
.
getDeptId
());
record
.
setNumber
(
item
.
getReturnsNumber
());
record
.
setPrice
(
item
.
getReturnsPrice
());
record
.
setMoney
(
item
.
getReturnsMoney
());
record
.
setType
(
InventoryType
.
returns
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
());
erpMaterialInventoryRecordMapper
.
insertBatch
(
inventoryRecordList
);
// 处理入库明细状态(记录已退数量)
List
<
ErpMaterialPutawayInfo
>
putawayInfoList
=
infoBoList
.
stream
().
map
(
item
->
{
List
<
ErpMaterialPutawayInfo
>
putawayInfoList
=
infoBoList
.
stream
().
map
(
item
->
{
ErpMaterialPutawayInfo
putawayInfo
=
materialPutawayInfoMapper
.
selectById
(
item
.
getPutawayInfoId
());
ErpMaterialPutawayInfo
putawayInfo
=
materialPutawayInfoMapper
.
selectById
(
item
.
getPutawayInfoId
());
putawayInfo
.
setIsReturns
(
IsEnableStatus
.
YES
.
getCode
());
putawayInfo
.
setIsReturns
(
IsEnableStatus
.
YES
.
getCode
());
...
@@ -160,35 +176,48 @@ public class ErpMaterialReturnsServiceImpl implements IErpMaterialReturnsService
...
@@ -160,35 +176,48 @@ public class ErpMaterialReturnsServiceImpl implements IErpMaterialReturnsService
materialReturns
.
setReturnsTime
(
bo
.
getReturnsTime
());
materialReturns
.
setReturnsTime
(
bo
.
getReturnsTime
());
boolean
flag
=
baseMapper
.
updateById
(
materialReturns
)
>
0
;
boolean
flag
=
baseMapper
.
updateById
(
materialReturns
)
>
0
;
if
(
flag
)
{
if
(
flag
)
{
// 删除原有退货明细
LambdaQueryWrapper
<
ErpMaterialReturnsInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
ErpMaterialReturnsInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
eq
(
ErpMaterialReturnsInfo:
:
getReturnsId
,
bo
.
getId
());
queryWrapper
.
eq
(
ErpMaterialReturnsInfo:
:
getReturnsId
,
bo
.
getId
());
List
<
ErpMaterialReturnsInfoVo
>
returnsInfoVoList
=
materialReturnsInfoMapper
.
selectVoList
(
queryWrapper
);
List
<
ErpMaterialReturnsInfoVo
>
returnsInfoVoList
=
materialReturnsInfoMapper
.
selectVoList
(
queryWrapper
);
for
(
ErpMaterialReturnsInfoVo
infoVo
:
returnsInfoVoList
)
{
// 删除物料库存记录数据
// 更新物料库存
if
(!
returnsInfoVoList
.
isEmpty
())
{
materialService
.
modifyMaterialInventory
(
infoVo
.
getMaterialId
(),
infoVo
.
getReturnsNumber
(),
true
);
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
lambdaQuery
=
Wrappers
.
lambdaQuery
();
lambdaQuery
.
in
(
ErpMaterialInventoryRecord:
:
getInfoId
,
returnsInfoVoList
.
stream
().
map
(
ErpMaterialReturnsInfoVo:
:
getId
).
collect
(
Collectors
.
toList
()));
erpMaterialInventoryRecordMapper
.
delete
(
lambdaQuery
);
}
}
// 删除原有退货明细
List
<
ErpMaterialReturnsInfoBo
>
infoBoList
=
bo
.
getReturnsInfoBoList
(
);
materialReturnsInfoMapper
.
delete
(
queryWrapper
);
// 绑定新的退货明细
// 绑定新的退货明细
List
<
ErpMaterialReturnsInfoBo
>
infoBoList
=
bo
.
getReturnsInfoBoList
();
List
<
ErpMaterialReturnsInfo
>
collect
=
infoBoList
.
stream
().
map
(
item
->
{
List
<
ErpMaterialReturnsInfo
>
collect
=
infoBoList
.
stream
().
map
(
item
->
{
ErpMaterialReturnsInfo
returnsInfo
=
BeanUtil
.
toBean
(
item
,
ErpMaterialReturnsInfo
.
class
);
ErpMaterialReturnsInfo
returnsInfo
=
BeanUtil
.
toBean
(
item
,
ErpMaterialReturnsInfo
.
class
);
ErpMaterialPutawayInfo
putawayInfo
=
materialPutawayInfoMapper
.
selectById
(
item
.
getPutawayInfoId
());
ErpMaterialPutawayInfo
putawayInfo
=
materialPutawayInfoMapper
.
selectById
(
item
.
getPutawayInfoId
());
BeanUtil
.
copyProperties
(
putawayInfo
,
returnsInfo
);
BeanUtil
.
copyProperties
(
putawayInfo
,
returnsInfo
);
returnsInfo
.
setId
(
null
);
returnsInfo
.
setId
(
null
);
returnsInfo
.
setReturnsId
(
materialReturns
.
getId
());
returnsInfo
.
setReturnsId
(
materialReturns
.
getId
());
// 更新物料库存
materialService
.
modifyMaterialInventory
(
item
.
getMaterialId
(),
item
.
getReturnsNumber
(),
false
);
return
returnsInfo
;
return
returnsInfo
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
materialReturnsInfoMapper
.
insertBatch
(
collect
);
materialReturnsInfoMapper
.
insertBatch
(
collect
);
// 还原入库明细状态
// 创建物料库存记录
ErpWarehouseVo
warehouseVo
=
warehouseMapper
.
selectVoById
(
materialReturns
.
getWarehouseId
());
List
<
ErpMaterialInventoryRecord
>
inventoryRecordList
=
collect
.
stream
().
map
(
item
->
{
ErpMaterialInventoryRecord
record
=
new
ErpMaterialInventoryRecord
();
record
.
setInfoId
(
item
.
getId
());
record
.
setMaterialId
(
item
.
getMaterialId
());
record
.
setWarehouseId
(
warehouseVo
.
getId
());
record
.
setDeptId
(
warehouseVo
.
getDeptId
());
record
.
setNumber
(
item
.
getReturnsNumber
());
record
.
setPrice
(
item
.
getReturnsPrice
());
record
.
setMoney
(
item
.
getReturnsMoney
());
record
.
setType
(
InventoryType
.
returns
.
getCode
());
return
record
;
}).
collect
(
Collectors
.
toList
());
erpMaterialInventoryRecordMapper
.
insertBatch
(
inventoryRecordList
);
// 还原入库明细状态(是否存在退货改为否)
LambdaUpdateWrapper
<
ErpMaterialPutawayInfo
>
updateWrapper
=
Wrappers
.
lambdaUpdate
();
LambdaUpdateWrapper
<
ErpMaterialPutawayInfo
>
updateWrapper
=
Wrappers
.
lambdaUpdate
();
updateWrapper
.
eq
(
ErpMaterialPutawayInfo:
:
getPutawayId
,
bo
.
getPutawayId
());
updateWrapper
.
eq
(
ErpMaterialPutawayInfo:
:
getPutawayId
,
bo
.
getPutawayId
()).
set
(
ErpMaterialPutawayInfo:
:
getIsReturns
,
IsEnableStatus
.
NO
.
getCode
());
updateWrapper
.
set
(
ErpMaterialPutawayInfo:
:
getIsReturns
,
IsEnableStatus
.
NO
.
getCode
());
materialPutawayInfoMapper
.
update
(
updateWrapper
);
materialPutawayInfoMapper
.
update
(
updateWrapper
);
// 处理入库明细状态(是否存在退货改为是)
// 处理入库明细状态
List
<
ErpMaterialPutawayInfo
>
putawayInfoList
=
infoBoList
.
stream
().
map
(
item
->
{
List
<
ErpMaterialPutawayInfo
>
putawayInfoList
=
infoBoList
.
stream
().
map
(
item
->
{
ErpMaterialPutawayInfo
putawayInfo
=
new
ErpMaterialPutawayInfo
();
ErpMaterialPutawayInfo
putawayInfo
=
new
ErpMaterialPutawayInfo
();
putawayInfo
.
setId
(
item
.
getId
());
putawayInfo
.
setId
(
item
.
getId
());
...
@@ -219,17 +248,17 @@ public class ErpMaterialReturnsServiceImpl implements IErpMaterialReturnsService
...
@@ -219,17 +248,17 @@ public class ErpMaterialReturnsServiceImpl implements IErpMaterialReturnsService
LambdaQueryWrapper
<
ErpMaterialReturnsInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
ErpMaterialReturnsInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
in
(
ErpMaterialReturnsInfo:
:
getReturnsId
,
ids
);
queryWrapper
.
in
(
ErpMaterialReturnsInfo:
:
getReturnsId
,
ids
);
List
<
ErpMaterialReturnsInfoVo
>
returnsInfoVoList
=
materialReturnsInfoMapper
.
selectVoList
(
queryWrapper
);
List
<
ErpMaterialReturnsInfoVo
>
returnsInfoVoList
=
materialReturnsInfoMapper
.
selectVoList
(
queryWrapper
);
// 处理入库明细状态(取消入库明细是否存在退货标记)
// 处理入库明细状态(取消入库明细是否存在退货标记,回退已退数量)
List
<
ErpMaterialPutawayInfo
>
putawayInfoList
=
returnsInfoVoList
.
stream
().
map
(
item
->
{
for
(
ErpMaterialReturnsInfoVo
returnsInfoVo
:
returnsInfoVoList
)
{
ErpMaterialPutawayInfo
putawayInfo
=
new
ErpMaterialPutawayInfo
();
ErpMaterialPutawayInfo
putawayInfo
=
materialPutawayInfoMapper
.
selectById
(
returnsInfoVo
.
getPutawayInfoId
());
putawayInfo
.
setId
(
item
.
getId
());
putawayInfo
.
setIsReturns
(
IsEnableStatus
.
NO
.
getCode
());
putawayInfo
.
setIsReturns
(
IsEnableStatus
.
NO
.
getCode
());
// 更新物料库存
putawayInfo
.
setReturnedNumber
(
putawayInfo
.
getReturnedNumber
().
subtract
(
returnsInfoVo
.
getReturnsNumber
()));
materialService
.
modifyMaterialInventory
(
item
.
getMaterialId
(),
item
.
getReturnsNumber
(),
true
);
materialPutawayInfoMapper
.
updateById
(
putawayInfo
);
return
putawayInfo
;
}
}).
collect
(
Collectors
.
toList
());
// 删除物料库存记录
// 更新入库明细列表
LambdaQueryWrapper
<
ErpMaterialInventoryRecord
>
lambdaQuery
=
Wrappers
.
lambdaQuery
();
materialPutawayInfoMapper
.
updateBatchById
(
putawayInfoList
);
lambdaQuery
.
in
(
ErpMaterialInventoryRecord:
:
getInfoId
,
returnsInfoVoList
.
stream
().
map
(
ErpMaterialReturnsInfoVo:
:
getId
).
collect
(
Collectors
.
toList
()));
erpMaterialInventoryRecordMapper
.
delete
(
lambdaQuery
);
// 删除退货明细
// 删除退货明细
materialReturnsInfoMapper
.
delete
(
queryWrapper
);
materialReturnsInfoMapper
.
delete
(
queryWrapper
);
return
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
return
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
...
...
maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialServiceImpl.java
View file @
c5024746
...
@@ -68,6 +68,24 @@ public class ErpMaterialServiceImpl implements IErpMaterialService {
...
@@ -68,6 +68,24 @@ public class ErpMaterialServiceImpl implements IErpMaterialService {
return
TableDataInfo
.
build
(
result
);
return
TableDataInfo
.
build
(
result
);
}
}
/**
* 查询物资列表(自定义查询全部)
*
* @param bo
* @param pageQuery
*/
@Override
public
TableDataInfo
<
ErpMaterialVo
>
customQueryPageListAll
(
ErpMaterialBo
bo
,
PageQuery
pageQuery
)
{
QueryWrapper
<
ErpMaterial
>
query
=
Wrappers
.
query
();
query
.
eq
(
"m.is_delete"
,
IsDeleteStatus
.
NO
.
getCode
())
.
like
(
bo
.
getMaterialCode
()
!=
null
,
"m.material_code"
,
bo
.
getMaterialCode
())
.
like
(
bo
.
getMaterialName
()
!=
null
,
"m.material_name"
,
bo
.
getMaterialName
())
.
like
(
bo
.
getMaterialSpecifications
()
!=
null
,
"m.material_specifications"
,
bo
.
getMaterialSpecifications
())
.
like
(
bo
.
getVendorName
()
!=
null
,
"vendor_name"
,
bo
.
getVendorName
());
Page
<
ErpMaterialVo
>
result
=
baseMapper
.
customQueryPageListByWarehouseId
(
pageQuery
.
build
(),
query
,
bo
.
getWarehouseId
());
return
TableDataInfo
.
build
(
result
);
}
/**
/**
* 查询物资列表
* 查询物资列表
*/
*/
...
@@ -79,13 +97,14 @@ public class ErpMaterialServiceImpl implements IErpMaterialService {
...
@@ -79,13 +97,14 @@ public class ErpMaterialServiceImpl implements IErpMaterialService {
private
QueryWrapper
<
ErpMaterial
>
customBuildQueryWrapper
(
ErpMaterialBo
bo
)
{
private
QueryWrapper
<
ErpMaterial
>
customBuildQueryWrapper
(
ErpMaterialBo
bo
)
{
QueryWrapper
<
ErpMaterial
>
query
=
Wrappers
.
query
();
QueryWrapper
<
ErpMaterial
>
query
=
Wrappers
.
query
();
query
.
like
(
null
!=
bo
.
getVendorName
(),
"vendor_name"
,
bo
.
getVendorName
())
query
.
like
(
null
!=
bo
.
getVendorName
(),
"t.vendor_name"
,
bo
.
getVendorName
())
.
like
(
null
!=
bo
.
getMaterialName
(),
"material_name"
,
bo
.
getMaterialName
())
.
like
(
null
!=
bo
.
getMaterialName
(),
"t.material_name"
,
bo
.
getMaterialName
())
.
like
(
null
!=
bo
.
getMaterialCode
(),
"material_code"
,
bo
.
getMaterialCode
())
.
like
(
null
!=
bo
.
getMaterialCode
(),
"t.material_code"
,
bo
.
getMaterialCode
())
.
like
(
null
!=
bo
.
getMaterialSpecifications
(),
"material_specifications"
,
bo
.
getMaterialSpecifications
())
.
like
(
null
!=
bo
.
getMaterialSpecifications
(),
"t.material_specifications"
,
bo
.
getMaterialSpecifications
())
.
eq
(
null
!=
bo
.
getIsEnable
(),
"is_enable"
,
bo
.
getIsEnable
())
.
like
(
null
!=
bo
.
getWarehouseName
(),
"t.name"
,
bo
.
getWarehouseName
())
.
eq
(
null
!=
bo
.
getIsCheck
(),
"is_check"
,
bo
.
getIsCheck
())
.
eq
(
null
!=
bo
.
getWarehouseId
(),
"t.warehouse_id"
,
bo
.
getWarehouseId
())
.
eq
(
null
!=
bo
.
getIsUniversal
(),
"is_universal"
,
bo
.
getIsUniversal
());
.
in
(
null
!=
bo
.
getWarehouseIdList
(),
"t.warehouse_id"
,
bo
.
getWarehouseIdList
())
.
ge
(
null
!=
bo
.
getInventory
(),
"t.inventory"
,
bo
.
getInventory
());
return
query
;
return
query
;
}
}
...
...
maintain-business/src/main/java/com/maintain/business/service/impl/ErpSettlementMaintainServiceImpl.java
View file @
c5024746
...
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
...
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import
com.maintain.business.domain.ErpRepairForm
;
import
com.maintain.business.domain.ErpRepairForm
;
import
com.maintain.business.domain.ErpSettlementMaintainRepairForm
;
import
com.maintain.business.domain.ErpSettlementMaintainRepairForm
;
import
com.maintain.business.domain.bo.ErpSettlementMaintainRepairFormBo
;
import
com.maintain.business.domain.bo.ErpSettlementMaintainRepairFormBo
;
import
com.maintain.business.domain.vo.ErpClientVo
;
import
com.maintain.business.mapper.ErpClientMapper
;
import
com.maintain.business.mapper.ErpRepairFormMapper
;
import
com.maintain.business.mapper.ErpRepairFormMapper
;
import
com.maintain.business.mapper.ErpSettlementMaintainRepairFormMapper
;
import
com.maintain.business.mapper.ErpSettlementMaintainRepairFormMapper
;
import
com.maintain.common.enums.RepairFormSettlementState
;
import
com.maintain.common.enums.RepairFormSettlementState
;
...
@@ -46,6 +48,7 @@ public class ErpSettlementMaintainServiceImpl implements IErpSettlementMaintainS
...
@@ -46,6 +48,7 @@ public class ErpSettlementMaintainServiceImpl implements IErpSettlementMaintainS
private
final
ErpSettlementMaintainMapper
baseMapper
;
private
final
ErpSettlementMaintainMapper
baseMapper
;
private
final
ErpSettlementMaintainRepairFormMapper
settlementMaintainRepairFormMapper
;
private
final
ErpSettlementMaintainRepairFormMapper
settlementMaintainRepairFormMapper
;
private
final
ErpRepairFormMapper
repairFormMapper
;
private
final
ErpRepairFormMapper
repairFormMapper
;
private
final
ErpClientMapper
clientMapper
;
/**
/**
* 查询结算维修单
* 查询结算维修单
...
@@ -96,13 +99,20 @@ public class ErpSettlementMaintainServiceImpl implements IErpSettlementMaintainS
...
@@ -96,13 +99,20 @@ public class ErpSettlementMaintainServiceImpl implements IErpSettlementMaintainS
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
@Override
public
Boolean
insertByBo
(
ErpSettlementMaintainBo
bo
)
{
public
Boolean
insertByBo
(
ErpSettlementMaintainBo
bo
)
{
ErpClientVo
clientVo
=
clientMapper
.
selectVoById
(
bo
.
getClientId
());
ErpSettlementMaintain
add
=
BeanUtil
.
toBean
(
bo
,
ErpSettlementMaintain
.
class
);
ErpSettlementMaintain
add
=
BeanUtil
.
toBean
(
bo
,
ErpSettlementMaintain
.
class
);
validEntityBeforeSave
(
add
);
validEntityBeforeSave
(
add
);
add
.
setClientName
(
clientVo
.
getName
());
add
.
setClientPhone
(
clientVo
.
getPhone
());
add
.
setClientType
(
clientVo
.
getType
());
add
.
setClientCertificateType
(
clientVo
.
getCertificateType
());
add
.
setClientCertificateNumber
(
clientVo
.
getCertificateNumber
());
add
.
setSettlementNumber
(
RedisUtils
.
generateNextNumber
(
"BXJS"
));
add
.
setSettlementNumber
(
RedisUtils
.
generateNextNumber
(
"BXJS"
));
add
.
setCreateDeptId
(
LoginHelper
.
getDeptId
());
add
.
setCreateDeptId
(
LoginHelper
.
getDeptId
());
boolean
flag
=
baseMapper
.
insert
(
add
)
>
0
;
boolean
flag
=
baseMapper
.
insert
(
add
)
>
0
;
if
(
flag
)
{
if
(
flag
)
{
settlementMaintainRepairFormMapper
.
insertBatch
(
bo
.
getRepairFormIds
().
stream
().
map
(
item
->
{
settlementMaintainRepairFormMapper
.
insertBatch
(
bo
.
getRepairFormIds
().
stream
().
map
(
item
->
{
ErpSettlementMaintainRepairForm
repairForm
=
new
ErpSettlementMaintainRepairForm
();
ErpSettlementMaintainRepairForm
repairForm
=
new
ErpSettlementMaintainRepairForm
();
repairForm
.
setRepairFormId
(
item
);
repairForm
.
setRepairFormId
(
item
);
repairForm
.
setSettlementMaintainId
(
add
.
getId
());
repairForm
.
setSettlementMaintainId
(
add
.
getId
());
...
...
maintain-business/src/main/resources/mapper/ErpMaterialInventoryRecordMapper.xml
0 → 100644
View file @
c5024746
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.maintain.business.mapper.ErpMaterialInventoryRecordMapper"
>
<resultMap
type=
"com.maintain.business.domain.ErpMaterialInventoryRecord"
id=
"ErpMaterialInventoryRecordResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"infoId"
column=
"info_id"
/>
<result
property=
"materialId"
column=
"material_id"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"warehouseId"
column=
"warehouse_id"
/>
<result
property=
"number"
column=
"number"
/>
<result
property=
"price"
column=
"price"
/>
<result
property=
"money"
column=
"money"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<resultMap
type=
"com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo"
id=
"ErpMaterialInventoryRecordResultVo"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"infoId"
column=
"info_id"
/>
<result
property=
"materialId"
column=
"material_id"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"warehouseId"
column=
"warehouse_id"
/>
<result
property=
"number"
column=
"number"
/>
<result
property=
"price"
column=
"price"
/>
<result
property=
"money"
column=
"money"
/>
<result
property=
"type"
column=
"type"
/>
</resultMap>
<sql
id=
"custom"
>
SELECT t.* FROM (SELECT r.warehouse_id,
r.type,
w.name as warehouseName,
r.material_id,
m.material_code,
m.material_name,
m.material_specifications,
m.vendor_id,
m.vendor_name,
m.material_unit,
m.material_brand,
m.procurement_subject,
m.compatible_with,
m.material_warranty_period,
m.reference_price,
m.selling_price,
m.material_url,
IFNULL(put.putNumber, 0) AS putNumber,
IFNULL(ret.retNumber, 0) AS retNumber,
IFNULL(pic.picNumber, 0) AS picNumber,
IFNULL(bac.bacNumber, 0) AS bacNumber,
IFNULL(put.putNumber, 0) - IFNULL(ret.retNumber, 0) - IFNULL(pic.picNumber, 0) +
IFNULL(bac.bacNumber, 0) AS inventory
FROM erp_material_inventory_record r
LEFT JOIN erp_material m ON r.material_id = m.id
LEFT JOIN erp_warehouse w ON r.warehouse_id = w.id
LEFT JOIN(SELECT warehouse_id, material_id, SUM(number) AS putNumber
FROM erp_material_inventory_record
WHERE type = '1'
GROUP BY warehouse_id, material_id) put
ON r.warehouse_id = put.warehouse_id AND r.material_id = put.material_id
LEFT JOIN(SELECT warehouse_id, material_id, SUM(number) AS retNumber
FROM erp_material_inventory_record
WHERE type = '2'
GROUP BY warehouse_id, material_id) ret
ON r.warehouse_id = ret.warehouse_id AND r.material_id = ret.material_id
LEFT JOIN(SELECT warehouse_id, material_id, SUM(number) AS picNumber
FROM erp_material_inventory_record
WHERE type = '3'
GROUP BY warehouse_id, material_id) pic
ON r.warehouse_id = pic.warehouse_id AND r.material_id = pic.material_id
LEFT JOIN(SELECT warehouse_id, material_id, SUM(number) AS bacNumber
FROM erp_material_inventory_record
WHERE type = '4'
GROUP BY warehouse_id, material_id) bac
ON r.warehouse_id = bac.warehouse_id AND r.material_id = bac.material_id
GROUP BY r.warehouse_id, r.material_id
) t
</sql>
<select
id=
"customQueryPageList"
resultType=
"com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo"
>
<include
refid=
"custom"
/>
${ew.getCustomSqlSegment}
</select>
<select
id=
"queryListByWarehouseIdAndMaterialId"
resultType=
"com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo"
>
SELECT r.id, r.number, r.price, r.money, r.create_by, r.create_time,
<if
test=
"type != null and type == 1"
>
p.putaway_code
</if>
<if
test=
"type != null and type == 2"
>
mr.returns_code, mr.putaway_code
</if>
<if
test=
"type != null and type == 3"
>
mp.out_number, mp.repair_number
</if>
<if
test=
"type != null and type == 4"
>
mp.out_number, mp.repair_number, mp.return_number
</if>
FROM erp_material_inventory_record r
<if
test=
"type != null and type == 1"
>
LEFT JOIN erp_material_putaway_info i ON r.info_id = i.id
LEFT JOIN erp_material_putaway p ON i.putaway_id = p.id
</if>
<if
test=
"type != null and type == 2"
>
LEFT JOIN erp_material_returns_info ri ON r.info_id = ri.id
LEFT JOIN erp_material_returns mr ON ri.returns_id = mr.id
</if>
<if
test=
"type != null and type == 3"
>
LEFT JOIN erp_material_picking_info pi ON r.info_id = pi.id
LEFT JOIN erp_material_picking mp ON pi.picking_id = mp.id
</if>
<if
test=
"type != null and type == 4"
>
LEFT JOIN erp_material_picking_info pi ON r.info_id = pi.id
LEFT JOIN erp_material_picking mp ON pi.picking_id = mp.id
</if>
WHERE r.warehouse_id = #{warehouseId} AND r.material_id = #{materialId} and r.type = #{type}
</select>
<select
id=
"customQueryList"
resultType=
"com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo"
>
<include
refid=
"custom"
/>
${ew.getCustomSqlSegment}
</select>
<select
id=
"queryMaterialByWarehouseIdAndMaterialId"
resultType=
"com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo"
>
<include
refid=
"custom"
/>
WHERE t.warehouse_id = #{warehouseId} AND t.material_id = #{materialId}
</select>
</mapper>
maintain-business/src/main/resources/mapper/ErpMaterialMapper.xml
View file @
c5024746
...
@@ -10,6 +10,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -10,6 +10,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"materialTypeName"
column=
"material_type_name"
/>
<result
property=
"materialTypeName"
column=
"material_type_name"
/>
<result
property=
"warehouseLocationId"
column=
"warehouse_location_id"
/>
<result
property=
"warehouseLocationId"
column=
"warehouse_location_id"
/>
<result
property=
"warehouseLocationType"
column=
"warehouse_location_type"
/>
<result
property=
"warehouseLocationType"
column=
"warehouse_location_type"
/>
<result
property=
"warehouseId"
column=
"warehouse_id"
/>
<result
property=
"warehouseName"
column=
"warehouse_name"
/>
<result
property=
"vendorId"
column=
"vendor_id"
/>
<result
property=
"vendorId"
column=
"vendor_id"
/>
<result
property=
"vendorName"
column=
"vendor_name"
/>
<result
property=
"vendorName"
column=
"vendor_name"
/>
<result
property=
"materialCode"
column=
"material_code"
/>
<result
property=
"materialCode"
column=
"material_code"
/>
...
@@ -26,19 +28,83 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -26,19 +28,83 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
</resultMap>
<sql
id=
"customQuerySql"
>
<sql
id=
"customQuerySql"
>
SELECT DISTINCT m.*
SELECT
FROM erp_material m
t.*
LEFT JOIN erp_material_picking_info p ON m.id = p.material_id
FROM(
LEFT JOIN erp_material_putaway_info pu ON m.id = pu.material_id
SELECT
LEFT JOIN erp_material_returns_info r ON m.id = r.material_id
r.warehouse_id, w.name as warehouse_name, r.material_id, m.material_code, m.material_name, m.material_specifications,
WHERE p.material_id IS NOT NULL
m.vendor_id, m.vendor_name, m.material_unit, m.material_brand, m.procurement_subject, m.compatible_with,
OR pu.material_id IS NOT NULL
m.material_warranty_period,m.reference_price, m.selling_price, m.material_url,
OR r.material_id IS NOT NULL
IFNULL(put.putNumber,0) AS putNumber, IFNULL(ret.retNumber,0) AS retNumber,
IFNULL(pic.picNumber,0) AS picNumber, IFNULL(bac.bacNumber,0) AS bacNumber,
IFNULL(put.putNumber,0) - IFNULL(ret.retNumber,0) - IFNULL(pic.picNumber,0) + IFNULL(bac.bacNumber,0) AS inventory
FROM erp_material_inventory_record r
LEFT JOIN erp_material m ON r.material_id = m.id
LEFT JOIN erp_warehouse w ON r.warehouse_id = w.id
LEFT JOIN(
SELECT warehouse_id, material_id, SUM(number) AS putNumber
FROM erp_material_inventory_record
WHERE type = '1'
GROUP BY warehouse_id, material_id
) put ON r.warehouse_id = put.warehouse_id AND r.material_id = put.material_id
LEFT JOIN(
SELECT warehouse_id, material_id, SUM(number) AS retNumber
FROM erp_material_inventory_record
WHERE type = '2'
GROUP BY warehouse_id, material_id
) ret ON r.warehouse_id = ret.warehouse_id AND r.material_id = ret.material_id
LEFT JOIN(
SELECT warehouse_id, material_id, SUM(number) AS picNumber
FROM erp_material_inventory_record
WHERE type = '3'
GROUP BY warehouse_id, material_id
) pic ON r.warehouse_id = pic.warehouse_id AND r.material_id = pic.material_id
LEFT JOIN(
SELECT warehouse_id, material_id, SUM(number) AS bacNumber
FROM erp_material_inventory_record
WHERE type = '4'
GROUP BY warehouse_id, material_id
) bac ON r.warehouse_id = bac.warehouse_id AND r.material_id = bac.material_id
GROUP BY r.warehouse_id, r.material_id
) t
</sql>
</sql>
<select
id=
"customQueryPageList"
resultType=
"com.maintain.business.domain.vo.ErpMaterialVo"
>
<select
id=
"customQueryPageList"
resultType=
"com.maintain.business.domain.vo.ErpMaterialVo"
>
<include
refid=
"customQuerySql"
/>
<include
refid=
"customQuerySql"
/>
${ew.getCustomSqlSegment}
${ew.getCustomSqlSegment}
</select>
</select>
<select
id=
"customQueryPageListByWarehouseId"
resultType=
"com.maintain.business.domain.vo.ErpMaterialVo"
>
SELECT
m.id as material_id, m.material_code, m.material_name, m.material_specifications,m.vendor_id, m.vendor_name,
m.material_unit, m.material_brand, m.procurement_subject, m.compatible_with,
m.material_warranty_period,m.reference_price, m.selling_price, m.material_url,
IFNULL(put.putNumber,0) - IFNULL(ret.retNumber,0) - IFNULL(pic.picNumber,0) + IFNULL(bac.bacNumber,0) AS inventory
FROM erp_material m
LEFT JOIN(
SELECT warehouse_id, material_id, SUM(number) AS putNumber
FROM erp_material_inventory_record
WHERE type = '1' AND warehouse_id = #{warehouseId}
GROUP BY warehouse_id, material_id
) put ON m.id = put.material_id
LEFT JOIN(
SELECT warehouse_id, material_id, SUM(number) AS retNumber
FROM erp_material_inventory_record
WHERE type = '2' AND warehouse_id = #{warehouseId}
GROUP BY warehouse_id, material_id
) ret ON m.id = ret.material_id
LEFT JOIN(
SELECT warehouse_id, material_id, SUM(number) AS picNumber
FROM erp_material_inventory_record
WHERE type = '3' AND warehouse_id = #{warehouseId}
GROUP BY warehouse_id, material_id
) pic ON m.id = pic.material_id
LEFT JOIN(
SELECT warehouse_id, material_id, SUM(number) AS bacNumber
FROM erp_material_inventory_record
WHERE type = '4' AND warehouse_id = #{warehouseId}
GROUP BY warehouse_id, material_id
) bac ON m.id = bac.material_id
${ew.getCustomSqlSegment}
</select>
</mapper>
</mapper>
maintain-business/src/main/resources/mapper/ErpMaterialPickingInfoMapper.xml
View file @
c5024746
...
@@ -8,6 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -8,6 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"repairFormId"
column=
"repair_form_id"
/>
<result
property=
"repairFormId"
column=
"repair_form_id"
/>
<result
property=
"pickingId"
column=
"picking_id"
/>
<result
property=
"pickingId"
column=
"picking_id"
/>
<result
property=
"warehouseId"
column=
"warehouse_id"
/>
<result
property=
"warehouseName"
column=
"warehouse_name"
/>
<result
property=
"vendorId"
column=
"vendor_id"
/>
<result
property=
"vendorId"
column=
"vendor_id"
/>
<result
property=
"vendorName"
column=
"vendor_name"
/>
<result
property=
"vendorName"
column=
"vendor_name"
/>
<result
property=
"materialId"
column=
"material_id"
/>
<result
property=
"materialId"
column=
"material_id"
/>
...
@@ -30,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -30,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
</resultMap>
<sql
id=
"info"
>
<sql
id=
"info"
>
SELECT
SELECT
empi.id, empi.repair_form_id, empi.picking_id, empi.vendor_id, empi.vendor_name, empi.material_id, empi.material_code,
empi.id, empi.repair_form_id, empi.picking_id, empi.
warehouse_id, empi.warehouse_name, empi.
vendor_id, empi.vendor_name, empi.material_id, empi.material_code,
empi.material_name,empi.material_specifications, empi.material_unit, empi.material_warranty_period, empi.reference_price, empi.selling_price, empi.collect_number,
empi.material_name,empi.material_specifications, empi.material_unit, empi.material_warranty_period, empi.reference_price, empi.selling_price, empi.collect_number,
empi.price, empi.money, empi.state, empi.create_by, empi.create_time, emp.return_number, emp.repair_number, emp.out_number
empi.price, empi.money, empi.state, empi.create_by, empi.create_time, emp.return_number, emp.repair_number, emp.out_number
FROM erp_material_picking_info empi
FROM erp_material_picking_info empi
...
...
maintain-common/src/main/java/com/maintain/common/enums/InventoryType.java
0 → 100644
View file @
c5024746
package
com
.
maintain
.
common
.
enums
;
import
lombok.Getter
;
/**
* 物料库存类型
*
* @author liushuai
*/
@Getter
public
enum
InventoryType
{
putaway
(
"1"
,
"入库"
),
returns
(
"2"
,
"退货"
),
picking
(
"3"
,
"出库"
),
back
(
"4"
,
"退料"
);
private
final
String
code
;
private
final
String
info
;
InventoryType
(
String
code
,
String
info
)
{
this
.
code
=
code
;
this
.
info
=
info
;
}
}
maintain-ui/src/api/business/material.js
View file @
c5024746
...
@@ -9,6 +9,42 @@ export function listMaterial(query) {
...
@@ -9,6 +9,42 @@ export function listMaterial(query) {
})
})
}
}
// 查询物资列表(自定义查询用于查询库存大于0的物料)
export
function
customListMaterial
(
query
)
{
return
request
({
url
:
'
/business/material/customList
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询物资列表(自定义查询用于物料盘点)
export
function
customListAll
(
query
)
{
return
request
({
url
:
'
/business/material/customListAll
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询物资库存列表
export
function
listMaterialInventory
(
query
)
{
return
request
({
url
:
'
/business/materialInventoryRecord/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询物资库存列表
export
function
listByMaterialId
(
query
)
{
return
request
({
url
:
'
/business/materialInventoryRecord/listByMaterialId
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询物资详细
// 查询物资详细
export
function
getMaterial
(
id
)
{
export
function
getMaterial
(
id
)
{
return
request
({
return
request
({
...
...
maintain-ui/src/views/business/material/index.vue
View file @
c5024746
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
<el-table-column
label=
"物资规格"
align=
"center"
fixed=
"left"
prop=
"materialSpecifications"
/>
<el-table-column
label=
"物资规格"
align=
"center"
fixed=
"left"
prop=
"materialSpecifications"
/>
<el-table-column
label=
"物资品牌"
align=
"center"
fixed=
"left"
prop=
"materialBrand"
/>
<el-table-column
label=
"物资品牌"
align=
"center"
fixed=
"left"
prop=
"materialBrand"
/>
<el-table-column
label=
"物资单位"
align=
"center"
fixed=
"left"
prop=
"materialUnit"
/>
<el-table-column
label=
"物资单位"
align=
"center"
fixed=
"left"
prop=
"materialUnit"
/>
<el-table-column
label=
"所在仓库"
align=
"center"
prop=
"warehouseName"
/
>
<!--
<el-table-column
label=
"所在仓库"
align=
"center"
prop=
"warehouseName"
/>
--
>
<!--
<el-table-column
label=
"分类名称"
align=
"center"
prop=
"materialTypeName"
/>
-->
<!--
<el-table-column
label=
"分类名称"
align=
"center"
prop=
"materialTypeName"
/>
-->
<el-table-column
label=
"供应商"
align=
"center"
prop=
"vendorName"
show-overflow-tooltip
/>
<el-table-column
label=
"供应商"
align=
"center"
prop=
"vendorName"
show-overflow-tooltip
/>
<el-table-column
label=
"采购标的"
align=
"center"
prop=
"procurementSubject"
/>
<el-table-column
label=
"采购标的"
align=
"center"
prop=
"procurementSubject"
/>
...
@@ -159,11 +159,11 @@
...
@@ -159,11 +159,11 @@
<dict-tag
:options=
"dict.type.sys_is_enable"
:value=
"scope.row.isEnable"
/>
<dict-tag
:options=
"dict.type.sys_is_enable"
:value=
"scope.row.isEnable"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"盘点中"
align=
"center"
prop=
"isCheck"
>
<!-- <el-table-column label="盘点中" align="center" prop="isCheck">--
>
<
template
slot-scope=
"scope"
>
<!-- <template slot-scope="scope">--
>
<dict-tag
:options=
"dict.type.sys_is_enable"
:value=
"String(scope.row.isCheck)"
/
>
<!-- <dict-tag :options="dict.type.sys_is_enable" :value="String(scope.row.isCheck)"/>--
>
</
template
>
<!-- </template>--
>
</el-table-column
>
<!-- </el-table-column>--
>
<el-table-column
label=
"是否通用"
align=
"center"
prop=
"isUniversal"
>
<el-table-column
label=
"是否通用"
align=
"center"
prop=
"isUniversal"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_is_enable"
:value=
"scope.row.isUniversal"
/>
<dict-tag
:options=
"dict.type.sys_is_enable"
:value=
"scope.row.isUniversal"
/>
...
@@ -218,13 +218,13 @@
...
@@ -218,13 +218,13 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"8"
>
<!-- <el-col :span="8">--
>
<el-form-item
label=
"仓库"
prop=
"warehouseId"
>
<!-- <el-form-item label="仓库" prop="warehouseId">--
>
<el-select
v-model=
"form.warehouseId"
filterable
placeHolder=
"请选择仓库"
>
<!-- <el-select v-model="form.warehouseId" filterable placeHolder="请选择仓库">--
>
<el-option
v-for=
"item in warehouseList"
:key=
"item.id"
:value=
"item.id"
:label=
"item.name"
/
>
<!-- <el-option v-for="item in warehouseList" :key="item.id" :value="item.id" :label="item.name" />--
>
</el-select
>
<!-- </el-select>--
>
</el-form-item
>
<!-- </el-form-item>--
>
</el-col
>
<!-- </el-col>--
>
<!-- <el-col :span="8">-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="物资分类" prop="materialTypeId">-->
<!-- <el-form-item label="物资分类" prop="materialTypeId">-->
<!-- <treeselect v-model="form.materialTypeId" :options="materialTypeList" :show-count="true" @select="materialTypeIdChange" :normalizer="normalizer" placeholder="请选择" />-->
<!-- <treeselect v-model="form.materialTypeId" :options="materialTypeList" :show-count="true" @select="materialTypeIdChange" :normalizer="normalizer" placeholder="请选择" />-->
...
@@ -238,29 +238,34 @@
...
@@ -238,29 +238,34 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"物资品牌"
prop=
"materialBrand"
>
<el-form-item
label=
"物资单位"
prop=
"materialUnit"
>
<el-input
v-model=
"form.materialBrand"
placeholder=
"请输入物资品牌"
/>
<el-input
v-model=
"form.materialUnit"
placeholder=
"请输入物资单位"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"质保期(月)"
prop=
"materialWarrantyPeriod"
>
<el-input-number
v-model=
"form.materialWarrantyPeriod"
:min=
"1"
style=
"width: 100%"
placeholder=
"请输入质保期"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"
采购标的"
prop=
"procurementSubject
"
>
<el-form-item
label=
"
参考价"
prop=
"referencePrice
"
>
<el-input
v-model=
"form.procurementSubject"
placeholder=
"请输入采购标的
"
/>
<el-input
-number
v-model=
"form.referencePrice"
:min=
"0"
style=
"width: 100%"
placeholder=
"请输入参考价
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"
适用车型"
prop=
"compatibleWith
"
>
<el-form-item
label=
"
销售价"
prop=
"sellingPrice
"
>
<el-input
v-model=
"form.compatibleWith"
placeholder=
"请输入适用车型
"
/>
<el-input
-number
v-model=
"form.sellingPrice"
:min=
"0"
style=
"width: 100%"
placeholder=
"请输入销售价
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"
物资单位"
prop=
"materialUnit
"
>
<el-form-item
label=
"
适用车型"
prop=
"compatibleWith
"
>
<el-input
v-model=
"form.
materialUnit"
placeholder=
"请输入物资单位
"
/>
<el-input
v-model=
"form.
compatibleWith"
placeholder=
"请输入适用车型
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<!-- <el-col :span="8">-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="仓库货位" prop="warehouseLocationId">-->
<!-- <el-form-item label="仓库货位" prop="warehouseLocationId">-->
...
@@ -270,35 +275,29 @@
...
@@ -270,35 +275,29 @@
<!-- </el-form-item>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-col>-->
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"质保期(月)"
prop=
"materialWarrantyPeriod"
>
<el-form-item
label=
"是否启用"
prop=
"isEnable"
>
<el-input-number
v-model=
"form.materialWarrantyPeriod"
:min=
"1"
style=
"width: 100%"
placeholder=
"请输入质保期"
/>
<el-select
v-model=
"form.isEnable"
style=
"width: 100%"
placeholder=
"请选择是否启用"
>
<el-option
v-for=
"dict in dict.type.sys_is_enable"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"
参考价"
prop=
"referencePrice
"
>
<el-form-item
label=
"
物资品牌"
prop=
"materialBrand
"
>
<el-input
-number
v-model=
"form.referencePrice"
:min=
"0"
style=
"width: 100%"
placeholder=
"请输入参考价
"
/>
<el-input
v-model=
"form.materialBrand"
placeholder=
"请输入物资品牌
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"
销售价"
prop=
"sellingPrice
"
>
<el-form-item
label=
"
采购标的"
prop=
"procurementSubject
"
>
<el-input
-number
v-model=
"form.sellingPrice"
:min=
"0"
style=
"width: 100%"
placeholder=
"请输入销售价
"
/>
<el-input
v-model=
"form.procurementSubject"
placeholder=
"请输入采购标的
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<!-- <el-col :span="8">-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="库存数量" prop="inventory">-->
<!-- <el-form-item label="库存数量" prop="inventory">-->
<!-- <el-input-number v-model="form.inventory" :min="0" style="width: 100%" :disabled="form.id != null" placeholder="请输入库存数量" />-->
<!-- <el-input-number v-model="form.inventory" :min="0" style="width: 100%" :disabled="form.id != null" placeholder="请输入库存数量" />-->
<!-- </el-form-item>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-col>-->
<el-col
:span=
"8"
>
<el-form-item
label=
"是否启用"
prop=
"isEnable"
>
<el-select
v-model=
"form.isEnable"
style=
"width: 100%"
placeholder=
"请选择是否启用"
>
<el-option
v-for=
"dict in dict.type.sys_is_enable"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"是否通用"
prop=
"isUniversal"
>
<el-form-item
label=
"是否通用"
prop=
"isUniversal"
>
<el-select
v-model=
"form.isUniversal"
style=
"width: 100%"
placeholder=
"请选择是否通用"
>
<el-select
v-model=
"form.isUniversal"
style=
"width: 100%"
placeholder=
"请选择是否通用"
>
...
@@ -436,7 +435,7 @@ export default {
...
@@ -436,7 +435,7 @@ export default {
// 表单校验
// 表单校验
rules
:
{
rules
:
{
warehouseId
:
[
warehouseId
:
[
{
required
:
tru
e
,
message
:
"
仓库不能为空
"
,
trigger
:
"
change
"
}
{
required
:
fals
e
,
message
:
"
仓库不能为空
"
,
trigger
:
"
change
"
}
],
],
vendorId
:
[
vendorId
:
[
{
required
:
true
,
message
:
"
供应商不能为空
"
,
trigger
:
"
change
"
}
{
required
:
true
,
message
:
"
供应商不能为空
"
,
trigger
:
"
change
"
}
...
...
maintain-ui/src/views/business/materialCheck/index.vue
View file @
c5024746
...
@@ -244,16 +244,18 @@
...
@@ -244,16 +244,18 @@
<
/el-col
>
<
/el-col
>
<
/el-row
>
<
/el-row
>
<
/el-form
>
<
/el-form
>
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
盘点明细
<
/span
>
<
el
-
row
:
gutter
=
"
10
"
class
=
"
mb8
"
>
<
el
-
col
:
span
=
"
1.5
"
>
<
el
-
button
v
-
loading
=
"
infoLoading
"
type
=
"
primary
"
plain
icon
=
"
el-icon-plus
"
size
=
"
mini
"
@
click
=
"
openMaterialModel
"
>
新增
<
/el-button
>
<
/el-col
>
<
/el-row
>
<
el
-
divider
/>
<
el
-
divider
/>
<
el
-
table
v
-
loading
=
"
infoLoading
"
:
data
=
"
form.checkInfoList
"
>
<
el
-
table
v
-
loading
=
"
infoLoading
"
:
data
=
"
form.checkInfoList
"
>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
/>
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
/>
<
el
-
table
-
column
label
=
"
实盘数量
"
align
=
"
center
"
prop
=
"
checkNum
"
width
=
"
140px
"
>
<
el
-
table
-
column
label
=
"
实盘数量
"
align
=
"
center
"
prop
=
"
checkNum
"
width
=
"
140px
"
>
...
@@ -279,6 +281,60 @@
...
@@ -279,6 +281,60 @@
<
/div
>
<
/div
>
<
/el-dialog
>
<
/el-dialog
>
<!--
物料列表对话框
-->
<
el
-
dialog
title
=
"
选择盘点物料
"
:
visible
.
sync
=
"
open2
"
width
=
"
65%
"
append
-
to
-
body
>
<
el
-
form
:
model
=
"
queryMaterialParams
"
ref
=
"
queryMaterialForm
"
size
=
"
small
"
:
inline
=
"
true
"
v
-
show
=
"
showSearch
"
label
-
width
=
"
80px
"
>
<!--
<
el
-
form
-
item
label
=
"
仓库
"
prop
=
"
warehouseId
"
>-->
<!--
<
el
-
input
v
-
model
=
"
queryMaterialParams.warehouseId
"
placeHolder
=
"
请选择仓库
"
/>-->
<!--
<
/el-form-item>--
>
<
el
-
form
-
item
label
=
"
物资编码
"
prop
=
"
materialCode
"
>
<
el
-
input
v
-
model
=
"
queryMaterialParams.materialCode
"
placeholder
=
"
请输入物资编码
"
clearable
@
keyup
.
enter
.
native
=
"
handleMaterialQuery
"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
物资名称
"
prop
=
"
materialName
"
>
<
el
-
input
v
-
model
=
"
queryMaterialParams.materialName
"
placeholder
=
"
请输入物资名称
"
clearable
@
keyup
.
enter
.
native
=
"
handleMaterialQuery
"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
供应商
"
prop
=
"
vendorName
"
>
<
el
-
input
v
-
model
=
"
queryMaterialParams.vendorName
"
placeholder
=
"
请输入供应商名称
"
clearable
@
keyup
.
enter
.
native
=
"
handleMaterialQuery
"
/>
<
/el-form-item
>
<
el
-
form
-
item
>
<
el
-
button
type
=
"
primary
"
icon
=
"
el-icon-search
"
size
=
"
mini
"
@
click
=
"
handleMaterialQuery
"
>
搜索
<
/el-button
>
<
el
-
button
icon
=
"
el-icon-refresh
"
size
=
"
mini
"
@
click
=
"
resetMaterialQuery
"
>
重置
<
/el-button
>
<
/el-form-item
>
<
/el-form
>
<
el
-
table
v
-
loading
=
"
materialLoading
"
:
data
=
"
materialList
"
ref
=
"
selectionTable
"
max
-
height
=
"
450
"
row
-
key
=
"
materialId
"
@
selection
-
change
=
"
handleMaterialSelectionChange
"
>
<
el
-
table
-
column
type
=
"
selection
"
width
=
"
55
"
align
=
"
center
"
reserve
-
selection
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
/>
<
/el-table
>
<
pagination
v
-
show
=
"
materialTotal>0
"
:
total
=
"
materialTotal
"
:
page
.
sync
=
"
queryMaterialParams.pageNum
"
:
limit
.
sync
=
"
queryMaterialParams.pageSize
"
@
pagination
=
"
getMaterialList
"
/>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
confirmSelection
"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"
cancelMaterial
"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<!--
物资盘点详情对话框
-->
<!--
物资盘点详情对话框
-->
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open1
"
width
=
"
80%
"
append
-
to
-
body
>
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open1
"
width
=
"
80%
"
append
-
to
-
body
>
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
盘点信息
<
/span
>
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
盘点信息
<
/span
>
...
@@ -304,8 +360,6 @@
...
@@ -304,8 +360,6 @@
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
盘点明细
<
/span
>
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
盘点明细
<
/span
>
<
el
-
divider
/>
<
el
-
divider
/>
<
el
-
table
:
data
=
"
form.checkInfoList
"
>
<
el
-
table
:
data
=
"
form.checkInfoList
"
>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
...
@@ -338,7 +392,7 @@ import Treeselect from '@riophae/vue-treeselect'
...
@@ -338,7 +392,7 @@ import Treeselect from '@riophae/vue-treeselect'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
import
{
getSiteTree
}
from
'
@/api/business/unit
'
import
{
getSiteTree
}
from
'
@/api/business/unit
'
import
{
listSiteWarehouse
}
from
'
@/api/business/siteWarehouse
'
import
{
listSiteWarehouse
}
from
'
@/api/business/siteWarehouse
'
import
{
listMaterial
}
from
'
@/api/business/material
'
import
{
customListAll
,
listMaterial
}
from
'
@/api/business/material
'
import
{
formatDate
}
from
'
@/utils
'
import
{
formatDate
}
from
'
@/utils
'
export
default
{
export
default
{
...
@@ -347,6 +401,8 @@ export default {
...
@@ -347,6 +401,8 @@ export default {
dicts
:
[
'
check_state
'
,
'
check_type
'
,
'
check_state
'
,
'
check_info_state
'
],
dicts
:
[
'
check_state
'
,
'
check_type
'
,
'
check_state
'
,
'
check_info_state
'
],
data
()
{
data
()
{
return
{
return
{
// 按钮loading
materialLoading
:
false
,
// 按钮loading
// 按钮loading
buttonLoading
:
false
,
buttonLoading
:
false
,
// 遮罩层
// 遮罩层
...
@@ -366,11 +422,25 @@ export default {
...
@@ -366,11 +422,25 @@ export default {
materialCheckList
:
[],
materialCheckList
:
[],
deptTreeData
:
[],
deptTreeData
:
[],
warehouseList
:
[],
warehouseList
:
[],
warehouseId
:
undefined
,
tempSelection
:
[],
// 物料列表
materialList
:
[],
materialTotal
:
0
,
queryMaterialParams
:
{
pageNum
:
1
,
pageSize
:
10
,
materialCode
:
undefined
,
materialName
:
undefined
,
materialSpecifications
:
undefined
,
vendorName
:
undefined
,
}
,
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
open1
:
false
,
open1
:
false
,
open2
:
false
,
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
...
@@ -457,14 +527,18 @@ export default {
...
@@ -457,14 +527,18 @@ export default {
listSiteWarehouse
({
deptId
:
e
.
deptId
,
pageNum
:
0
,
pageSize
:
100
}
).
then
(
response
=>
{
listSiteWarehouse
({
deptId
:
e
.
deptId
,
pageNum
:
0
,
pageSize
:
100
}
).
then
(
response
=>
{
this
.
warehouseList
=
response
.
rows
;
this
.
warehouseList
=
response
.
rows
;
}
);
}
);
this
.
form
.
checkInfoList
=
[]
this
.
materialList
=
[];
this
.
warehouseId
=
undefined
;
}
,
}
,
// 仓库变更
// 仓库变更
warehouseChange
(
id
)
{
warehouseChange
(
id
)
{
this
.
infoLoading
=
true
this
.
infoLoading
=
true
this
.
form
.
checkInfoList
=
[]
this
.
form
.
checkInfoList
=
[]
listMaterial
({
pageNum
:
1
,
pageSize
:
1000
,
warehouseId
:
id
}
).
then
(
response
=>
{
this
.
warehouseId
=
id
;
this
.
form
.
checkInfoList
=
response
.
rows
;
customListAll
({
...
this
.
queryMaterialParams
,
warehouseId
:
this
.
warehouseId
}
).
then
(
response
=>
{
this
.
$forceUpdate
()
this
.
materialList
=
response
.
rows
;
this
.
materialTotal
=
response
.
total
;
this
.
infoLoading
=
false
this
.
infoLoading
=
false
}
);
}
);
}
,
}
,
...
@@ -536,6 +610,63 @@ export default {
...
@@ -536,6 +610,63 @@ export default {
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
}
,
}
,
/** 打开物料列表 */
openMaterialModel
()
{
if
(
!
this
.
warehouseId
)
{
this
.
$modal
.
msgError
(
"
请先选择要盘点的仓库
"
);
return
}
this
.
open2
=
true
this
.
getMaterialList
()
}
,
/** 搜索按钮操作 */
handleMaterialQuery
()
{
this
.
queryMaterialParams
.
pageNum
=
1
;
this
.
getMaterialList
();
}
,
/** 重置按钮操作 */
resetMaterialQuery
()
{
this
.
resetForm
(
"
queryMaterialForm
"
);
this
.
handleMaterialQuery
();
}
,
/** 查询物资列表 */
getMaterialList
()
{
this
.
materialLoading
=
true
;
customListAll
({
...
this
.
queryMaterialParams
,
warehouseId
:
this
.
warehouseId
}
).
then
(
response
=>
{
this
.
materialList
=
response
.
rows
;
this
.
materialTotal
=
response
.
total
;
this
.
materialLoading
=
false
;
}
).
then
(()
=>
{
this
.
$nextTick
(()
=>
{
// 清空临时勾选
this
.
tempSelection
=
[];
// 手动设置勾选(匹配外部已选数据)
this
.
materialList
.
forEach
(
row
=>
{
const
isSelected
=
this
.
form
.
checkInfoList
.
some
(
item
=>
item
.
materialId
===
row
.
materialId
);
this
.
$refs
.
selectionTable
.
toggleRowSelection
(
row
,
isSelected
);
}
);
}
);
}
)
}
,
// 多选框选中数据
handleMaterialSelectionChange
(
selection
)
{
console
.
log
(
'
selection
'
,
selection
)
this
.
tempSelection
=
selection
console
.
log
(
'
tempSelection
'
,
this
.
tempSelection
)
}
,
confirmSelection
()
{
console
.
log
(
'
this.tempSelection
'
,
this
.
tempSelection
)
console
.
log
(
'
this.form.checkInfoList
'
,
this
.
form
.
checkInfoList
)
this
.
form
.
checkInfoList
=
this
.
tempSelection
.
map
(
item
=>
{
return
item
}
)
this
.
open2
=
false
}
,
// 取消按钮
cancelMaterial
()
{
this
.
open2
=
false
;
}
,
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
...
...
maintain-ui/src/views/business/materialPicking/add.vue
View file @
c5024746
...
@@ -59,13 +59,14 @@
...
@@ -59,13 +59,14 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-table
:data=
"form.pickingInfoList"
>
<el-table
:data=
"form.pickingInfoList"
>
<el-table-column
label=
"分类名称"
align=
"center"
prop=
"materialTypeName"
/
>
<!--
<el-table-column
label=
"分类名称"
align=
"center"
prop=
"materialTypeName"
/>
--
>
<el-table-column
label=
"货位类型"
align=
"center"
prop=
"warehouseLocationType"
/
>
<!--
<el-table-column
label=
"货位类型"
align=
"center"
prop=
"warehouseLocationType"
/>
--
>
<el-table-column
label=
"
供应商"
align=
"center"
prop=
"vendor
Name"
/>
<el-table-column
label=
"
仓库"
align=
"center"
prop=
"warehouse
Name"
/>
<el-table-column
label=
"物资编码"
align=
"center"
prop=
"materialCode"
/>
<el-table-column
label=
"物资编码"
align=
"center"
prop=
"materialCode"
/>
<el-table-column
label=
"物资名称"
align=
"center"
prop=
"materialName"
/>
<el-table-column
label=
"物资名称"
align=
"center"
prop=
"materialName"
/>
<el-table-column
label=
"物资规格"
align=
"center"
prop=
"materialSpecifications"
/>
<el-table-column
label=
"物资规格"
align=
"center"
prop=
"materialSpecifications"
/>
<el-table-column
label=
"物资单位"
align=
"center"
prop=
"materialUnit"
/>
<el-table-column
label=
"物资单位"
align=
"center"
prop=
"materialUnit"
/>
<el-table-column
label=
"供应商"
align=
"center"
prop=
"vendorName"
/>
<el-table-column
label=
"质保期"
align=
"center"
prop=
"materialWarrantyPeriod"
/>
<el-table-column
label=
"质保期"
align=
"center"
prop=
"materialWarrantyPeriod"
/>
<el-table-column
label=
"参考价"
align=
"center"
prop=
"referencePrice"
/>
<el-table-column
label=
"参考价"
align=
"center"
prop=
"referencePrice"
/>
<el-table-column
label=
"销售价"
align=
"center"
prop=
"sellingPrice"
/>
<el-table-column
label=
"销售价"
align=
"center"
prop=
"sellingPrice"
/>
...
@@ -75,14 +76,14 @@
...
@@ -75,14 +76,14 @@
<el-input-number
v-model=
"scope.row.collectNumber"
@
change=
"collectNumberChange"
controls-position=
"right"
size=
"mini"
:min=
"1"
:precision=
"0"
style=
"width: 100%"
placeholder=
"数量"
/>
<el-input-number
v-model=
"scope.row.collectNumber"
@
change=
"collectNumberChange"
controls-position=
"right"
size=
"mini"
:min=
"1"
:precision=
"0"
style=
"width: 100%"
placeholder=
"数量"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"销售单价"
align=
"center"
prop=
"price"
width=
"120px"
>
<!-- <el-table-column label="销售单价" align="center" prop="price" width="120px">--
>
<
template
slot-scope=
"scope"
>
<!-- <template slot-scope="scope">--
>
<el-input-number
v-model=
"scope.row.price"
disabled
controls-position=
"right"
size=
"mini"
:min=
"1"
:precision=
"2"
style=
"width: 100%"
placeholder=
"单价"
/
>
<!-- <el-input-number v-model="scope.row.price" disabled controls-position="right" size="mini" :min="1" :precision="2" style="width: 100%" placeholder="单价"/>--
>
</
template
>
<!-- </template>--
>
</el-table-column
>
<!-- </el-table-column>--
>
<el-table-column
label=
"领料金额"
align=
"center"
prop=
"money"
width=
"120px"
>
<el-table-column
label=
"领料金额"
align=
"center"
prop=
"money"
width=
"120px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input-number
v-model=
"scope.row.money"
disabled
controls-position=
"right"
size=
"mini"
:min=
"
1
"
style=
"width: 100%"
placeholder=
"金额"
/>
<el-input-number
v-model=
"scope.row.money"
disabled
controls-position=
"right"
size=
"mini"
:min=
"
0
"
style=
"width: 100%"
placeholder=
"金额"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
@@ -130,24 +131,20 @@
...
@@ -130,24 +131,20 @@
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetMaterialQuery"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetMaterialQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
v-loading=
"materialLoading"
:data=
"materialList"
ref=
"selectionTable"
max-height=
"
30
0"
@
selection-change=
"handleMaterialSelectionChange"
>
<el-table
v-loading=
"materialLoading"
:data=
"materialList"
ref=
"selectionTable"
max-height=
"
45
0"
@
selection-change=
"handleMaterialSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"分类名称"
align=
"center"
prop=
"materialTypeName"
/
>
<!-- <el-table-column label="分类名称" align="center" prop="materialTypeName" />--
>
<el-table-column
label=
"货位类型"
align=
"center"
prop=
"warehouseLocationType"
/
>
<!-- <el-table-column label="货位类型" align="center" prop="warehouseLocationType" />--
>
<el-table-column
label=
"
供应商"
align=
"center"
prop=
"vendor
Name"
/>
<el-table-column
label=
"
仓库"
align=
"center"
prop=
"warehouse
Name"
/>
<el-table-column
label=
"物资编码"
align=
"center"
prop=
"materialCode"
/>
<el-table-column
label=
"物资编码"
align=
"center"
prop=
"materialCode"
/>
<el-table-column
label=
"物资名称"
align=
"center"
prop=
"materialName"
/>
<el-table-column
label=
"物资名称"
align=
"center"
prop=
"materialName"
/>
<el-table-column
label=
"物资规格"
align=
"center"
prop=
"materialSpecifications"
/>
<el-table-column
label=
"物资规格"
align=
"center"
prop=
"materialSpecifications"
/>
<el-table-column
label=
"物资单位"
align=
"center"
prop=
"materialUnit"
/>
<el-table-column
label=
"物资单位"
align=
"center"
prop=
"materialUnit"
/>
<el-table-column
label=
"供应商"
align=
"center"
prop=
"vendorName"
/>
<el-table-column
label=
"质保期"
align=
"center"
prop=
"materialWarrantyPeriod"
/>
<el-table-column
label=
"质保期"
align=
"center"
prop=
"materialWarrantyPeriod"
/>
<el-table-column
label=
"参考价"
align=
"center"
prop=
"referencePrice"
/>
<el-table-column
label=
"参考价"
align=
"center"
prop=
"referencePrice"
/>
<el-table-column
label=
"销售价"
align=
"center"
prop=
"sellingPrice"
/>
<el-table-column
label=
"销售价"
align=
"center"
prop=
"sellingPrice"
/>
<el-table-column
label=
"库存"
align=
"center"
prop=
"inventory"
/>
<el-table-column
label=
"库存"
align=
"center"
prop=
"inventory"
/>
<el-table-column
label=
"是否启用"
align=
"center"
prop=
"isEnable"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_is_enable"
:value=
"scope.row.isEnable"
/>
</
template
>
</el-table-column>
</el-table>
</el-table>
<pagination
v-show=
"materialTotal>0"
:total=
"materialTotal"
:page.sync=
"queryMaterialParams.pageNum"
:limit.sync=
"queryMaterialParams.pageSize"
@
pagination=
"getMaterialList"
/>
<pagination
v-show=
"materialTotal>0"
:total=
"materialTotal"
:page.sync=
"queryMaterialParams.pageNum"
:limit.sync=
"queryMaterialParams.pageSize"
@
pagination=
"getMaterialList"
/>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -168,7 +165,8 @@ import {
...
@@ -168,7 +165,8 @@ import {
updateMaterialPicking
updateMaterialPicking
}
from
'
@/api/business/materialPicking
'
}
from
'
@/api/business/materialPicking
'
import
{
getRepairForm
}
from
'
@/api/business/repairForm
'
import
{
getRepairForm
}
from
'
@/api/business/repairForm
'
import
{
listMaterial
}
from
'
@/api/business/material
'
import
{
customListMaterial
,
listMaterial
}
from
'
@/api/business/material
'
import
{
listWarehouseAll
}
from
"
@/api/business/siteWarehouse
"
;
export
default
{
export
default
{
name
:
"
MaterialPickingAdd
"
,
name
:
"
MaterialPickingAdd
"
,
...
@@ -227,7 +225,9 @@ export default {
...
@@ -227,7 +225,9 @@ export default {
outTime
:
undefined
,
outTime
:
undefined
,
},
},
// 表单参数
// 表单参数
form
:
{},
form
:
{
pickingInfoList
:
[]
},
open1
:
false
,
open1
:
false
,
open2
:
false
,
open2
:
false
,
materialLoading
:
false
,
materialLoading
:
false
,
...
@@ -235,13 +235,18 @@ export default {
...
@@ -235,13 +235,18 @@ export default {
// 物料列表
// 物料列表
materialList
:
[],
materialList
:
[],
materialTotal
:
0
,
materialTotal
:
0
,
// 仓库列表
warehouseOpt
:
[],
// 查询参数
// 查询参数
queryMaterialParams
:
{
queryMaterialParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
vendorName
:
undefined
,
vendorName
:
undefined
,
warehouseId
:
undefined
,
warehouseIdList
:
[],
materialCode
:
undefined
,
materialCode
:
undefined
,
materialName
:
undefined
,
materialName
:
undefined
,
inventory
:
0
,
},
},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
...
@@ -256,8 +261,16 @@ export default {
...
@@ -256,8 +261,16 @@ export default {
},
},
created
()
{
created
()
{
this
.
form
=
{...
this
.
$route
.
params
}
this
.
form
=
{...
this
.
$route
.
params
}
this
.
getWarehouseList
(
this
.
form
.
repairerDeptId
)
},
},
methods
:
{
methods
:
{
/** 查询仓库列表 */
getWarehouseList
(
deptId
)
{
listWarehouseAll
({
deptId
}).
then
(
response
=>
{
this
.
warehouseOpt
=
response
.
data
;
this
.
queryMaterialParams
.
warehouseIdList
=
response
.
data
.
map
(
item
=>
item
.
id
);
});
},
/** 查询物料出库列表 */
/** 查询物料出库列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
@@ -267,17 +280,6 @@ export default {
...
@@ -267,17 +280,6 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
// 报修单更改
repairFormChange
(
id
)
{
getRepairForm
(
id
).
then
(
res
=>
{
this
.
form
.
clientName
=
res
.
data
.
clientName
this
.
form
.
repairerDeptId
=
res
.
data
.
repairerDeptId
this
.
form
.
repairerDeptName
=
res
.
data
.
repairerDeptName
this
.
form
.
repairerGroupName
=
res
.
data
.
repairerGroupName
this
.
form
.
plateNumber
=
res
.
data
.
car
.
plateNumber
this
.
form
.
carId
=
res
.
data
.
carId
})
},
/** 打开物料列表 */
/** 打开物料列表 */
openMaterialModel
()
{
openMaterialModel
()
{
if
(
!
this
.
form
.
repairerDeptId
)
{
if
(
!
this
.
form
.
repairerDeptId
)
{
...
@@ -290,6 +292,7 @@ export default {
...
@@ -290,6 +292,7 @@ export default {
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleMaterialQuery
()
{
handleMaterialQuery
()
{
this
.
queryMaterialParams
.
pageNum
=
1
;
this
.
queryMaterialParams
.
pageNum
=
1
;
this
.
queryMaterialParams
.
warehouseIdList
=
this
.
warehouseOpt
.
map
(
item
=>
item
.
id
);
this
.
getMaterialList
();
this
.
getMaterialList
();
},
},
/** 重置按钮操作 */
/** 重置按钮操作 */
...
@@ -300,7 +303,7 @@ export default {
...
@@ -300,7 +303,7 @@ export default {
/** 查询物资列表 */
/** 查询物资列表 */
getMaterialList
()
{
getMaterialList
()
{
this
.
materialLoading
=
true
;
this
.
materialLoading
=
true
;
listMaterial
({
...
this
.
queryMaterialParams
,
deptId
:
this
.
repairerDeptId
}).
then
(
response
=>
{
customListMaterial
({
...
this
.
queryMaterialParams
}).
then
(
response
=>
{
this
.
materialList
=
response
.
rows
;
this
.
materialList
=
response
.
rows
;
this
.
materialTotal
=
response
.
total
;
this
.
materialTotal
=
response
.
total
;
this
.
materialLoading
=
false
;
this
.
materialLoading
=
false
;
...
@@ -309,24 +312,25 @@ export default {
...
@@ -309,24 +312,25 @@ export default {
// 清空临时勾选
// 清空临时勾选
this
.
tempSelection
=
[];
this
.
tempSelection
=
[];
// 手动设置勾选(匹配外部已选数据)
// 手动设置勾选(匹配外部已选数据)
if
(
this
.
form
.
pickingInfoList
&&
this
.
form
.
pickingInfoList
.
length
>
0
&&
this
.
materialList
.
length
>
0
)
{
this
.
materialList
.
forEach
(
row
=>
{
this
.
materialList
.
forEach
(
row
=>
{
const
isSelected
=
this
.
form
.
pickingInfoList
.
some
(
item
=>
item
.
warehouseId
===
row
.
warehouseId
&&
item
.
materialId
===
row
.
materialId
);
const
isSelected
=
this
.
form
.
pickingInfoList
.
some
(
item
=>
item
.
id
===
row
.
id
||
item
.
materialId
===
row
.
id
);
this
.
$refs
.
selectionTable
.
toggleRowSelection
(
row
,
isSelected
);
this
.
$refs
.
selectionTable
.
toggleRowSelection
(
row
,
isSelected
);
});
});
}
});
});
})
})
},
},
// 入库明细删除
// 入库明细删除
handleRowDelete
(
row
)
{
handleRowDelete
(
row
)
{
this
.
form
.
pickingInfoList
=
this
.
form
.
pickingInfoList
.
filter
(
item
=>
item
.
id
!==
row
.
id
);
this
.
form
.
pickingInfoList
=
this
.
form
.
pickingInfoList
.
filter
(
item
=>
!
(
item
.
materialId
===
row
.
materialId
&&
item
.
warehouseId
===
row
.
warehouseId
)
);
this
.
$forceUpdate
();
},
},
// 入库数量变动
// 入库数量变动
collectNumberChange
()
{
collectNumberChange
()
{
this
.
form
.
outMoney
=
this
.
form
.
pickingInfoList
.
reduce
((
sum
,
item
)
=>
{
this
.
form
.
outMoney
=
this
.
form
.
pickingInfoList
.
reduce
((
sum
,
item
)
=>
{
item
.
money
=
item
.
collectNumber
*
item
.
p
rice
item
.
money
=
item
.
collectNumber
*
item
.
sellingP
rice
return
sum
+
(
item
.
collectNumber
*
item
.
p
rice
);
return
sum
+
(
item
.
collectNumber
*
item
.
sellingP
rice
);
},
0
)
},
0
)
},
},
// 多选框选中数据
// 多选框选中数据
...
@@ -349,104 +353,6 @@ export default {
...
@@ -349,104 +353,6 @@ export default {
cancel
()
{
cancel
()
{
this
.
$tab
.
closeOpenPage
({
name
:
"
repairFormEdit
"
,
params
:{
repairFormId
:
this
.
form
.
repairFormId
,
flag
:
this
.
form
.
flag
,
isDelivery
:
this
.
form
.
isDelivery
}});
this
.
$tab
.
closeOpenPage
({
name
:
"
repairFormEdit
"
,
params
:{
repairFormId
:
this
.
form
.
repairFormId
,
flag
:
this
.
form
.
flag
,
isDelivery
:
this
.
form
.
isDelivery
}});
},
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
undefined
,
repairFormId
:
undefined
,
repairNumber
:
undefined
,
outNumber
:
undefined
,
returnNumber
:
undefined
,
carId
:
undefined
,
plateNumber
:
undefined
,
outMoney
:
undefined
,
receiveUserId
:
undefined
,
receiveUserName
:
undefined
,
receiveTime
:
undefined
,
state
:
undefined
,
outTime
:
undefined
,
pickingInfoList
:
[]
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
let
isTrue
=
false
this
.
ids
=
selection
.
map
(
item
=>
{
if
(
item
.
state
!==
1
)
{
isTrue
=
true
}
return
item
.
id
})
if
(
selection
.
length
>
0
)
{
this
.
isTrue
=
isTrue
}
else
{
this
.
isTrue
=
true
}
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加物料出库
"
;
this
.
form
.
repairFormId
=
this
.
repairFormId
this
.
form
.
repairNumber
=
this
.
repairNumber
this
.
form
.
carId
=
this
.
carId
this
.
form
.
plateNumber
=
this
.
plateNumber
this
.
form
.
clientName
=
this
.
clientName
this
.
form
.
repairerDeptId
=
this
.
repairerDeptId
this
.
form
.
repairerDeptName
=
this
.
repairerDeptName
this
.
form
.
repairerGroupName
=
this
.
repairerGroupName
},
// 详情按钮
handleDetail
(
row
)
{
getMaterialPicking
(
row
.
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
getRepairForm
(
response
.
data
.
repairFormId
).
then
(
res
=>
{
this
.
loading
=
false
;
this
.
form
.
clientName
=
res
.
data
.
clientName
this
.
form
.
repairerDeptId
=
res
.
data
.
repairerDeptId
this
.
form
.
repairerDeptName
=
res
.
data
.
repairerDeptName
this
.
form
.
repairerGroupName
=
res
.
data
.
repairerGroupName
this
.
form
.
plateNumber
=
res
.
data
.
car
.
plateNumber
this
.
form
.
carId
=
res
.
data
.
carId
this
.
open2
=
true
;
this
.
title
=
"
物料出库详情
"
;
})
});
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
loading
=
true
;
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getMaterialPicking
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
getRepairForm
(
response
.
data
.
repairFormId
).
then
(
res
=>
{
this
.
loading
=
false
;
this
.
form
.
clientName
=
res
.
data
.
clientName
this
.
form
.
repairerDeptId
=
res
.
data
.
repairerDeptId
this
.
form
.
repairerDeptName
=
res
.
data
.
repairerDeptName
this
.
form
.
repairerGroupName
=
res
.
data
.
repairerGroupName
this
.
form
.
plateNumber
=
res
.
data
.
car
.
plateNumber
this
.
form
.
carId
=
res
.
data
.
carId
this
.
open
=
true
;
this
.
title
=
"
修改物料出库
"
;
})
});
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
(
state
)
{
submitForm
(
state
)
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
...
@@ -466,7 +372,14 @@ export default {
...
@@ -466,7 +372,14 @@ export default {
return
return
}
}
this
.
form
.
materialList
=
this
.
form
.
pickingInfoList
.
map
(
item
=>
{
this
.
form
.
materialList
=
this
.
form
.
pickingInfoList
.
map
(
item
=>
{
return
{
materialId
:
item
.
materialId
||
item
.
id
,
collectNumber
:
item
.
collectNumber
,
price
:
item
.
price
,
money
:
item
.
money
,
}
return
{
warehouseId
:
item
.
warehouseId
,
warehouseName
:
item
.
warehouseName
,
materialId
:
item
.
materialId
,
collectNumber
:
item
.
collectNumber
,
price
:
item
.
price
,
money
:
item
.
money
,
}
})
})
this
.
buttonLoading
=
true
;
this
.
buttonLoading
=
true
;
this
.
form
.
state
=
state
this
.
form
.
state
=
state
...
@@ -496,36 +409,6 @@ export default {
...
@@ -496,36 +409,6 @@ export default {
}
}
});
});
},
},
/** 出库按钮操作 */
handleConfirm
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'
是否确认物料出库?
'
).
then
(()
=>
{
this
.
loading
=
true
;
return
confirmMaterialPicking
(
ids
);
}).
then
(()
=>
{
this
.
loading
=
false
;
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
出库成功
"
);
}).
catch
(()
=>
{
}).
finally
(()
=>
{
this
.
loading
=
false
;
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'
是否确认删除物料出库编号为"
'
+
ids
+
'
"的数据项?
'
).
then
(()
=>
{
this
.
loading
=
true
;
return
delMaterialPicking
(
ids
);
}).
then
(()
=>
{
this
.
loading
=
false
;
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{
}).
finally
(()
=>
{
this
.
loading
=
false
;
});
},
}
}
};
};
</
script
>
</
script
>
...
...
maintain-ui/src/views/business/materialPicking/index.vue
View file @
c5024746
...
@@ -246,34 +246,33 @@
...
@@ -246,34 +246,33 @@
<
/el-form
>
<
/el-form
>
<
el
-
row
:
gutter
=
"
10
"
class
=
"
mb8
"
>
<
el
-
row
:
gutter
=
"
10
"
class
=
"
mb8
"
>
<
el
-
col
:
span
=
"
1.5
"
>
<
el
-
col
:
span
=
"
1.5
"
>
<
el
-
button
type
=
"
primary
"
plain
icon
=
"
el-icon-plus
"
size
=
"
mini
"
@
click
=
"
openMaterialModel
"
>
新增
<
/el-button
>
<
el
-
button
v
-
loading
=
"
addLoading
"
type
=
"
primary
"
plain
icon
=
"
el-icon-plus
"
size
=
"
mini
"
@
click
=
"
openMaterialModel
"
>
新增
<
/el-button
>
<
/el-col
>
<
/el-col
>
<
/el-row
>
<
/el-row
>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>
<
el
-
table
-
column
label
=
"
仓库名称
"
align
=
"
center
"
prop
=
"
warehouseName
"
/>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<!--
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
/>--
>
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
/
>
<
el
-
table
-
column
label
=
"
领料数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
width
=
"
120px
"
>
<
el
-
table
-
column
label
=
"
领料数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
width
=
"
120px
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
input
-
number
v
-
model
=
"
scope.row.collectNumber
"
@
change
=
"
collectNumberChange
"
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
:
precision
=
"
0
"
style
=
"
width: 100%
"
placeholder
=
"
数量
"
/>
<
el
-
input
-
number
v
-
model
=
"
scope.row.collectNumber
"
@
change
=
"
collectNumberChange
"
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
:
max
=
"
parseInt(scope.row.inventory)
"
:
precision
=
"
0
"
style
=
"
width: 100%
"
placeholder
=
"
数量
"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
销售单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
input
-
number
v
-
model
=
"
scope.row.price
"
disabled
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
:
precision
=
"
2
"
style
=
"
width: 100%
"
placeholder
=
"
单价
"
/>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<!--
<
el
-
table
-
column
label
=
"
销售单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
>-->
<!--
<
template
slot
-
scope
=
"
scope
"
>-->
<!--
<
el
-
input
-
number
v
-
model
=
"
scope.row.price
"
disabled
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
:
precision
=
"
2
"
style
=
"
width: 100%
"
placeholder
=
"
单价
"
/>-->
<!--
<
/template>--
>
<!--
<
/el-table-column>--
>
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
>
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
input
-
number
v
-
model
=
"
scope.row.money
"
disabled
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
style
=
"
width: 100%
"
placeholder
=
"
金额
"
/>
<
el
-
input
-
number
v
-
model
=
"
scope.row.money
"
disabled
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
0
"
style
=
"
width: 100%
"
placeholder
=
"
金额
"
/>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
操作
"
align
=
"
center
"
class
-
name
=
"
small-padding fixed-width
"
>
<
el
-
table
-
column
label
=
"
操作
"
align
=
"
center
"
class
-
name
=
"
small-padding fixed-width
"
>
...
@@ -292,6 +291,11 @@
...
@@ -292,6 +291,11 @@
<!--
物料列表对话框
-->
<!--
物料列表对话框
-->
<
el
-
dialog
title
=
"
物料列表
"
:
visible
.
sync
=
"
open1
"
width
=
"
65%
"
append
-
to
-
body
>
<
el
-
dialog
title
=
"
物料列表
"
:
visible
.
sync
=
"
open1
"
width
=
"
65%
"
append
-
to
-
body
>
<
el
-
form
:
model
=
"
queryMaterialParams
"
ref
=
"
queryMaterialForm
"
size
=
"
small
"
:
inline
=
"
true
"
v
-
show
=
"
showSearch
"
label
-
width
=
"
80px
"
>
<
el
-
form
:
model
=
"
queryMaterialParams
"
ref
=
"
queryMaterialForm
"
size
=
"
small
"
:
inline
=
"
true
"
v
-
show
=
"
showSearch
"
label
-
width
=
"
80px
"
>
<!--
<
el
-
form
-
item
label
=
"
仓库
"
prop
=
"
warehouseId
"
>-->
<!--
<
el
-
select
v
-
model
=
"
queryMaterialParams.warehouseId
"
placeHolder
=
"
请选择仓库
"
>-->
<!--
<
el
-
option
v
-
for
=
"
item in warehouseOpt
"
:
key
=
"
item.id
"
:
value
=
"
item.id
"
:
label
=
"
item.name
"
/>-->
<!--
<
/el-select>--
>
<!--
<
/el-form-item>--
>
<
el
-
form
-
item
label
=
"
供应商
"
prop
=
"
vendorName
"
>
<
el
-
form
-
item
label
=
"
供应商
"
prop
=
"
vendorName
"
>
<
el
-
input
<
el
-
input
v
-
model
=
"
queryMaterialParams.vendorName
"
v
-
model
=
"
queryMaterialParams.vendorName
"
...
@@ -321,24 +325,20 @@
...
@@ -321,24 +325,20 @@
<
el
-
button
icon
=
"
el-icon-refresh
"
size
=
"
mini
"
@
click
=
"
resetMaterialQuery
"
>
重置
<
/el-button
>
<
el
-
button
icon
=
"
el-icon-refresh
"
size
=
"
mini
"
@
click
=
"
resetMaterialQuery
"
>
重置
<
/el-button
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-form
>
<
/el-form
>
<
el
-
table
v
-
loading
=
"
materialLoading
"
:
data
=
"
materialList
"
ref
=
"
selectionTable
"
max
-
height
=
"
30
0
"
@
selection
-
change
=
"
handleMaterialSelectionChange
"
>
<
el
-
table
v
-
loading
=
"
materialLoading
"
:
data
=
"
materialList
"
ref
=
"
selectionTable
"
max
-
height
=
"
45
0
"
@
selection
-
change
=
"
handleMaterialSelectionChange
"
>
<
el
-
table
-
column
type
=
"
selection
"
width
=
"
55
"
align
=
"
center
"
/>
<
el
-
table
-
column
type
=
"
selection
"
width
=
"
55
"
align
=
"
center
"
/>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/
>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>--
>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/
>
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>--
>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendor
Name
"
/>
<
el
-
table
-
column
label
=
"
仓库名称
"
align
=
"
center
"
prop
=
"
warehouse
Name
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
/>
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
/>
<
el
-
table
-
column
label
=
"
是否启用
"
align
=
"
center
"
prop
=
"
isEnable
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
dict
-
tag
:
options
=
"
dict.type.sys_is_enable
"
:
value
=
"
scope.row.isEnable
"
/>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
/el-table
>
<
pagination
v
-
show
=
"
materialTotal>0
"
:
total
=
"
materialTotal
"
:
page
.
sync
=
"
queryMaterialParams.pageNum
"
:
limit
.
sync
=
"
queryMaterialParams.pageSize
"
@
pagination
=
"
getMaterialList
"
/>
<
pagination
v
-
show
=
"
materialTotal>0
"
:
total
=
"
materialTotal
"
:
page
.
sync
=
"
queryMaterialParams.pageNum
"
:
limit
.
sync
=
"
queryMaterialParams.pageSize
"
@
pagination
=
"
getMaterialList
"
/>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
...
@@ -372,18 +372,19 @@
...
@@ -372,18 +372,19 @@
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
出库明细
<
/span
>
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
出库明细
<
/span
>
<
el
-
divider
/>
<
el
-
divider
/>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/
>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>--
>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/
>
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>--
>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendor
Name
"
/>
<
el
-
table
-
column
label
=
"
仓库名称
"
align
=
"
center
"
prop
=
"
warehouse
Name
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
销售单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
/
>
<!--
<
el
-
table
-
column
label
=
"
销售单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
/>--
>
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
/>
<
/el-table
>
<
/el-table
>
<
/el-dialog
>
<
/el-dialog
>
...
@@ -400,16 +401,20 @@ import {
...
@@ -400,16 +401,20 @@ import {
confirmMaterialPicking
confirmMaterialPicking
}
from
'
@/api/business/materialPicking
'
}
from
'
@/api/business/materialPicking
'
import
{
getRepairForm
,
listRepairForm
}
from
'
@/api/business/repairForm
'
import
{
getRepairForm
,
listRepairForm
}
from
'
@/api/business/repairForm
'
import
{
listMaterial
}
from
'
@/api/business/material
'
import
{
customListMaterial
,
listMaterial
}
from
'
@/api/business/material
'
import
{
formatDate
}
from
'
@/utils
'
import
{
formatDate
}
from
'
@/utils
'
import
{
listSiteWarehouse
,
listWarehouseAll
}
from
"
@/api/business/siteWarehouse
"
;
export
default
{
export
default
{
name
:
"
MaterialPicking
"
,
name
:
"
MaterialPicking
"
,
dicts
:
[
'
sys_is_enable
'
,
'
picking_state
'
,
'
picking_type
'
],
dicts
:
[
'
sys_is_enable
'
,
'
picking_state
'
,
'
picking_type
'
],
data
()
{
data
()
{
return
{
return
{
// 新增loading
addLoading
:
false
,
// 按钮loading
// 按钮loading
buttonLoading
:
false
,
buttonLoading
:
false
,
materialLoading
:
false
,
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
// 选中数组
// 选中数组
...
@@ -427,6 +432,7 @@ export default {
...
@@ -427,6 +432,7 @@ export default {
// 物料出库表格数据
// 物料出库表格数据
materialPickingList
:
[],
materialPickingList
:
[],
repairFormOpt
:
[],
repairFormOpt
:
[],
warehouseOpt
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
// 是否显示弹出层
// 是否显示弹出层
...
@@ -452,7 +458,6 @@ export default {
...
@@ -452,7 +458,6 @@ export default {
form
:
{
}
,
form
:
{
}
,
open1
:
false
,
open1
:
false
,
open2
:
false
,
open2
:
false
,
materialLoading
:
false
,
tempSelection
:
[],
tempSelection
:
[],
// 物料列表
// 物料列表
materialList
:
[],
materialList
:
[],
...
@@ -462,9 +467,14 @@ export default {
...
@@ -462,9 +467,14 @@ export default {
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
vendorName
:
undefined
,
vendorName
:
undefined
,
warehouseId
:
undefined
,
warehouseIdList
:
[],
materialCode
:
undefined
,
materialCode
:
undefined
,
materialName
:
undefined
,
materialName
:
undefined
,
inventory
:
0
,
}
,
}
,
warehouseId
:
undefined
,
warehouseName
:
undefined
,
// 表单校验
// 表单校验
rules
:
{
rules
:
{
repairFormId
:
[
repairFormId
:
[
...
@@ -480,7 +490,6 @@ export default {
...
@@ -480,7 +490,6 @@ export default {
this
.
getList
();
this
.
getList
();
}
,
}
,
methods
:
{
methods
:
{
confirmMaterialPicking
,
/** 查询物料出库列表 */
/** 查询物料出库列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
@@ -490,14 +499,15 @@ export default {
...
@@ -490,14 +499,15 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
}
);
}
);
}
,
}
,
/** 查询
物料出库
列表 */
/** 查询
报修单
列表 */
getRepairList
()
{
getRepairList
()
{
listRepairForm
({
pageNum
:
1
,
pageSize
:
100
,
state
:
1
}
).
then
(
response
=>
{
listRepairForm
({
pageNum
:
1
,
pageSize
:
100
0
,
state
:
1
}
).
then
(
response
=>
{
this
.
repairFormOpt
=
response
.
rows
;
this
.
repairFormOpt
=
response
.
rows
;
}
);
}
);
}
,
}
,
// 报修单更改
// 报修单更改
repairFormChange
(
id
)
{
repairFormChange
(
id
)
{
this
.
addLoading
=
true
;
getRepairForm
(
id
).
then
(
res
=>
{
getRepairForm
(
id
).
then
(
res
=>
{
this
.
form
.
clientName
=
res
.
data
.
clientName
this
.
form
.
clientName
=
res
.
data
.
clientName
this
.
form
.
repairerDeptId
=
res
.
data
.
repairerDeptId
this
.
form
.
repairerDeptId
=
res
.
data
.
repairerDeptId
...
@@ -505,13 +515,22 @@ export default {
...
@@ -505,13 +515,22 @@ export default {
this
.
form
.
repairerGroupName
=
res
.
data
.
repairerGroupName
this
.
form
.
repairerGroupName
=
res
.
data
.
repairerGroupName
this
.
form
.
plateNumber
=
res
.
data
.
car
.
plateNumber
this
.
form
.
plateNumber
=
res
.
data
.
car
.
plateNumber
this
.
form
.
carId
=
res
.
data
.
carId
this
.
form
.
carId
=
res
.
data
.
carId
console
.
log
(
this
.
form
)
this
.
form
.
pickingInfoList
=
[]
this
.
getWarehouseList
(
res
.
data
.
repairerDeptId
)
}
)
}
)
}
,
}
,
/** 查询仓库列表 */
getWarehouseList
(
deptId
)
{
listWarehouseAll
({
deptId
}
).
then
(
response
=>
{
this
.
warehouseOpt
=
response
.
data
;
this
.
queryMaterialParams
.
warehouseIdList
=
response
.
data
.
map
(
item
=>
item
.
id
);
this
.
addLoading
=
false
;
}
);
}
,
/** 打开物料列表 */
/** 打开物料列表 */
openMaterialModel
()
{
openMaterialModel
()
{
if
(
!
this
.
form
.
repairerDeptId
)
{
if
(
!
this
.
form
.
repairerDeptId
)
{
this
.
$modal
.
msgError
(
"
请选择报修单
"
);
this
.
$modal
.
msgError
(
"
请
先
选择报修单
"
);
return
return
}
}
this
.
open1
=
true
this
.
open1
=
true
...
@@ -530,7 +549,7 @@ export default {
...
@@ -530,7 +549,7 @@ export default {
/** 查询物资列表 */
/** 查询物资列表 */
getMaterialList
()
{
getMaterialList
()
{
this
.
materialLoading
=
true
;
this
.
materialLoading
=
true
;
listMaterial
({
...
this
.
queryMaterialParams
,
deptId
:
this
.
form
.
repairerDeptId
}
).
then
(
response
=>
{
customListMaterial
({
...
this
.
queryMaterialParams
}
).
then
(
response
=>
{
this
.
materialList
=
response
.
rows
;
this
.
materialList
=
response
.
rows
;
this
.
materialTotal
=
response
.
total
;
this
.
materialTotal
=
response
.
total
;
this
.
materialLoading
=
false
;
this
.
materialLoading
=
false
;
...
@@ -540,7 +559,7 @@ export default {
...
@@ -540,7 +559,7 @@ export default {
this
.
tempSelection
=
[];
this
.
tempSelection
=
[];
// 手动设置勾选(匹配外部已选数据)
// 手动设置勾选(匹配外部已选数据)
this
.
materialList
.
forEach
(
row
=>
{
this
.
materialList
.
forEach
(
row
=>
{
const
isSelected
=
this
.
form
.
pickingInfoList
.
some
(
item
=>
item
.
id
===
row
.
id
||
item
.
materialId
===
row
.
i
d
);
const
isSelected
=
this
.
form
.
pickingInfoList
.
some
(
item
=>
item
.
warehouseId
===
row
.
warehouseId
&&
item
.
materialId
===
row
.
materialI
d
);
this
.
$refs
.
selectionTable
.
toggleRowSelection
(
row
,
isSelected
);
this
.
$refs
.
selectionTable
.
toggleRowSelection
(
row
,
isSelected
);
}
);
}
);
}
);
}
);
...
@@ -548,7 +567,9 @@ export default {
...
@@ -548,7 +567,9 @@ export default {
}
,
}
,
// 入库明细删除
// 入库明细删除
handleRowDelete
(
row
)
{
handleRowDelete
(
row
)
{
this
.
form
.
pickingInfoList
=
this
.
form
.
pickingInfoList
.
filter
(
item
=>
item
.
id
!==
row
.
id
);
this
.
form
.
pickingInfoList
=
this
.
form
.
pickingInfoList
.
filter
(
item
=>
!
(
item
.
materialId
===
row
.
materialId
&&
item
.
warehouseId
===
row
.
warehouseId
)
);
}
,
}
,
// 入库数量变动
// 入库数量变动
collectNumberChange
()
{
collectNumberChange
()
{
...
@@ -571,8 +592,8 @@ export default {
...
@@ -571,8 +592,8 @@ export default {
//
}
//
}
//
}
);
//
}
);
this
.
form
.
pickingInfoList
=
this
.
tempSelection
.
map
(
item
=>
{
this
.
form
.
pickingInfoList
=
this
.
tempSelection
.
map
(
item
=>
{
item
.
price
=
item
.
sellingPrice
item
.
price
=
item
.
sellingPrice
return
item
return
item
}
)
}
)
this
.
open1
=
false
this
.
open1
=
false
}
,
}
,
...
@@ -644,10 +665,8 @@ export default {
...
@@ -644,10 +665,8 @@ export default {
// 详情按钮
// 详情按钮
handleDetail
(
row
)
{
handleDetail
(
row
)
{
getMaterialPicking
(
row
.
id
).
then
(
response
=>
{
getMaterialPicking
(
row
.
id
).
then
(
response
=>
{
this
.
open2
=
true
;
this
.
title
=
"
物料出库详情
"
;
this
.
title
=
"
物料出库详情
"
;
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
this
.
getRepairList
()
if
(
response
.
data
.
repairFormId
)
{
if
(
response
.
data
.
repairFormId
)
{
getRepairForm
(
response
.
data
.
repairFormId
).
then
(
res
=>
{
getRepairForm
(
response
.
data
.
repairFormId
).
then
(
res
=>
{
this
.
form
.
clientName
=
res
.
data
.
clientName
this
.
form
.
clientName
=
res
.
data
.
clientName
...
@@ -656,6 +675,7 @@ export default {
...
@@ -656,6 +675,7 @@ export default {
this
.
form
.
repairerGroupName
=
res
.
data
.
repairerGroupName
this
.
form
.
repairerGroupName
=
res
.
data
.
repairerGroupName
this
.
form
.
plateNumber
=
res
.
data
.
car
.
plateNumber
this
.
form
.
plateNumber
=
res
.
data
.
car
.
plateNumber
this
.
form
.
carId
=
res
.
data
.
carId
this
.
form
.
carId
=
res
.
data
.
carId
this
.
open2
=
true
;
}
)
}
)
}
}
}
);
}
);
...
@@ -678,6 +698,7 @@ export default {
...
@@ -678,6 +698,7 @@ export default {
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
修改物料出库
"
;
this
.
title
=
"
修改物料出库
"
;
this
.
getRepairList
()
this
.
getRepairList
()
this
.
getWarehouseList
(
res
.
data
.
repairerDeptId
)
}
)
}
)
}
);
}
);
}
,
}
,
...
@@ -686,11 +707,18 @@ export default {
...
@@ -686,11 +707,18 @@ export default {
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
pickingInfoList
.
length
<
1
)
{
if
(
this
.
form
.
pickingInfoList
.
length
<
1
)
{
this
.
$modal
.
msgError
(
'
出库
明细
列表不能为空
'
)
this
.
$modal
.
msgError
(
'
出库
物料
列表不能为空
'
)
return
return
}
}
this
.
form
.
materialList
=
this
.
form
.
pickingInfoList
.
map
(
item
=>
{
this
.
form
.
materialList
=
this
.
form
.
pickingInfoList
.
map
(
item
=>
{
return
{
materialId
:
item
.
materialId
||
item
.
id
,
collectNumber
:
item
.
collectNumber
,
price
:
item
.
price
,
money
:
item
.
money
,
}
return
{
warehouseId
:
item
.
warehouseId
,
warehouseName
:
item
.
warehouseName
,
materialId
:
item
.
materialId
,
collectNumber
:
item
.
collectNumber
,
price
:
item
.
price
,
money
:
item
.
money
,
}
}
)
}
)
this
.
buttonLoading
=
true
;
this
.
buttonLoading
=
true
;
this
.
form
.
state
=
state
this
.
form
.
state
=
state
...
...
maintain-ui/src/views/business/materialPickingInfo/index.vue
View file @
c5024746
...
@@ -161,11 +161,11 @@
...
@@ -161,11 +161,11 @@
<
el
-
input
-
number
v
-
model
=
"
scope.row.collectNumber
"
@
change
=
"
collectNumberChange
"
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
:
precision
=
"
0
"
style
=
"
width: 100%
"
placeholder
=
"
数量
"
/>
<
el
-
input
-
number
v
-
model
=
"
scope.row.collectNumber
"
@
change
=
"
collectNumberChange
"
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
:
precision
=
"
0
"
style
=
"
width: 100%
"
placeholder
=
"
数量
"
/>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
销售单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
>
<!--
<
el
-
table
-
column
label
=
"
销售单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
>--
>
<
template
slot
-
scope
=
"
scope
"
>
<!--
<
template
slot
-
scope
=
"
scope
"
>--
>
<
el
-
input
-
number
v
-
model
=
"
scope.row.price
"
disabled
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
:
precision
=
"
2
"
style
=
"
width: 100%
"
placeholder
=
"
单价
"
/
>
<!--
<
el
-
input
-
number
v
-
model
=
"
scope.row.price
"
disabled
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
:
precision
=
"
2
"
style
=
"
width: 100%
"
placeholder
=
"
单价
"
/>--
>
<
/template
>
<!--
<
/template>--
>
<
/el-table-column
>
<!--
<
/el-table-column>--
>
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
>
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
input
-
number
v
-
model
=
"
scope.row.money
"
disabled
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
style
=
"
width: 100%
"
placeholder
=
"
金额
"
/>
<
el
-
input
-
number
v
-
model
=
"
scope.row.money
"
disabled
controls
-
position
=
"
right
"
size
=
"
mini
"
:
min
=
"
1
"
style
=
"
width: 100%
"
placeholder
=
"
金额
"
/>
...
@@ -216,7 +216,7 @@
...
@@ -216,7 +216,7 @@
<
el
-
button
icon
=
"
el-icon-refresh
"
size
=
"
mini
"
@
click
=
"
resetMaterialQuery
"
>
重置
<
/el-button
>
<
el
-
button
icon
=
"
el-icon-refresh
"
size
=
"
mini
"
@
click
=
"
resetMaterialQuery
"
>
重置
<
/el-button
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-form
>
<
/el-form
>
<
el
-
table
v
-
loading
=
"
materialLoading
"
:
data
=
"
materialList
"
ref
=
"
selectionTable
"
max
-
height
=
"
30
0
"
@
selection
-
change
=
"
handleMaterialSelectionChange
"
>
<
el
-
table
v
-
loading
=
"
materialLoading
"
:
data
=
"
materialList
"
ref
=
"
selectionTable
"
max
-
height
=
"
45
0
"
@
selection
-
change
=
"
handleMaterialSelectionChange
"
>
<
el
-
table
-
column
type
=
"
selection
"
width
=
"
55
"
align
=
"
center
"
/>
<
el
-
table
-
column
type
=
"
selection
"
width
=
"
55
"
align
=
"
center
"
/>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>
...
@@ -261,8 +261,8 @@
...
@@ -261,8 +261,8 @@
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
出库明细
<
/span
>
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
出库明细
<
/span
>
<
el
-
divider
/>
<
el
-
divider
/>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/
>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>--
>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/
>
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>--
>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
...
@@ -272,7 +272,7 @@
...
@@ -272,7 +272,7 @@
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
领料数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
领料数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
销售单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
/
>
<!--
<
el
-
table
-
column
label
=
"
销售单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
/>--
>
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
/>
<
/el-table
>
<
/el-table
>
<
/el-dialog
>
<
/el-dialog
>
...
@@ -445,8 +445,8 @@ export default {
...
@@ -445,8 +445,8 @@ export default {
// 入库数量变动
// 入库数量变动
collectNumberChange
()
{
collectNumberChange
()
{
this
.
form
.
outMoney
=
this
.
form
.
pickingInfoList
.
reduce
((
sum
,
item
)
=>
{
this
.
form
.
outMoney
=
this
.
form
.
pickingInfoList
.
reduce
((
sum
,
item
)
=>
{
item
.
money
=
item
.
collectNumber
*
item
.
p
rice
item
.
money
=
item
.
collectNumber
*
item
.
sellingP
rice
return
sum
+
(
item
.
collectNumber
*
item
.
p
rice
);
return
sum
+
(
item
.
collectNumber
*
item
.
sellingP
rice
);
}
,
0
)
}
,
0
)
}
,
}
,
// 多选框选中数据
// 多选框选中数据
...
...
maintain-ui/src/views/business/materialPutaway/index.vue
View file @
c5024746
...
@@ -315,7 +315,7 @@
...
@@ -315,7 +315,7 @@
<
el
-
button
icon
=
"
el-icon-refresh
"
size
=
"
mini
"
@
click
=
"
resetMaterialQuery
"
>
重置
<
/el-button
>
<
el
-
button
icon
=
"
el-icon-refresh
"
size
=
"
mini
"
@
click
=
"
resetMaterialQuery
"
>
重置
<
/el-button
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-form
>
<
/el-form
>
<
el
-
table
v
-
loading
=
"
materialLoading
"
:
data
=
"
materialList
"
ref
=
"
selectionTable
"
max
-
height
=
"
30
0
"
@
selection
-
change
=
"
handleMaterialSelectionChange
"
>
<
el
-
table
v
-
loading
=
"
materialLoading
"
:
data
=
"
materialList
"
ref
=
"
selectionTable
"
max
-
height
=
"
45
0
"
@
selection
-
change
=
"
handleMaterialSelectionChange
"
>
<
el
-
table
-
column
type
=
"
selection
"
width
=
"
55
"
align
=
"
center
"
/>
<
el
-
table
-
column
type
=
"
selection
"
width
=
"
55
"
align
=
"
center
"
/>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>-->
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>-->
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>-->
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>-->
...
@@ -327,7 +327,7 @@
...
@@ -327,7 +327,7 @@
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
/
>
<!--
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
/>--
>
<
el
-
table
-
column
label
=
"
是否启用
"
align
=
"
center
"
prop
=
"
isEnable
"
>
<
el
-
table
-
column
label
=
"
是否启用
"
align
=
"
center
"
prop
=
"
isEnable
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
dict
-
tag
:
options
=
"
dict.type.sys_is_enable
"
:
value
=
"
scope.row.isEnable
"
/>
<
dict
-
tag
:
options
=
"
dict.type.sys_is_enable
"
:
value
=
"
scope.row.isEnable
"
/>
...
...
maintain-ui/src/views/business/materialReturns/index.vue
View file @
c5024746
...
@@ -9,9 +9,9 @@
...
@@ -9,9 +9,9 @@
@
keyup.enter.native=
"handleQuery"
@
keyup.enter.native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"入库单号"
prop=
"putaway
Number
"
>
<el-form-item
label=
"入库单号"
prop=
"putaway
Code
"
>
<el-input
<el-input
v-model=
"queryParams.putaway
Number
"
v-model=
"queryParams.putaway
Code
"
placeholder=
"请输入入库单号"
placeholder=
"请输入入库单号"
clearable
clearable
@
keyup.enter.native=
"handleQuery"
@
keyup.enter.native=
"handleQuery"
...
@@ -80,8 +80,8 @@
...
@@ -80,8 +80,8 @@
<el-table
v-loading=
"loading"
:data=
"materialReturnsList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"materialReturnsList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
label=
"仓库名称"
align=
"center"
prop=
"warehouseName"
/>
<el-table-column
label=
"仓库名称"
align=
"center"
prop=
"warehouseName"
/>
<el-table-column
label=
"退货单号"
align=
"center"
prop=
"returns
Number
"
width=
"160px"
/>
<el-table-column
label=
"退货单号"
align=
"center"
prop=
"returns
Code
"
width=
"160px"
/>
<el-table-column
label=
"入库单号"
align=
"center"
prop=
"putaway
Number
"
width=
"160px"
/>
<el-table-column
label=
"入库单号"
align=
"center"
prop=
"putaway
Code
"
width=
"160px"
/>
<el-table-column
label=
"到货单号"
align=
"center"
prop=
"arrivalNumber"
/>
<el-table-column
label=
"到货单号"
align=
"center"
prop=
"arrivalNumber"
/>
<el-table-column
label=
"订单单号"
align=
"center"
prop=
"orderNumber"
/>
<el-table-column
label=
"订单单号"
align=
"center"
prop=
"orderNumber"
/>
<el-table-column
label=
"退货金额"
align=
"center"
prop=
"returnsMoney"
/>
<el-table-column
label=
"退货金额"
align=
"center"
prop=
"returnsMoney"
/>
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
<
el
-
col
:
span
=
"
8
"
>
<
el
-
col
:
span
=
"
8
"
>
<
el
-
form
-
item
label
=
"
入库单号
"
prop
=
"
putawayId
"
>
<
el
-
form
-
item
label
=
"
入库单号
"
prop
=
"
putawayId
"
>
<
el
-
select
clearable
v
-
model
=
"
form.putawayId
"
filterable
placeholder
=
"
请选择入库单
"
@
change
=
"
putawayChange
"
style
=
"
width:100%
"
>
<
el
-
select
clearable
v
-
model
=
"
form.putawayId
"
filterable
placeholder
=
"
请选择入库单
"
@
change
=
"
putawayChange
"
style
=
"
width:100%
"
>
<
el
-
option
v
-
for
=
"
(item,index) of materialPutawayOpt
"
:
key
=
"
index
"
:
label
=
"
item.putaway
Number
"
:
value
=
"
item.id
"
>
{{
item
.
putawayNumber
}}
<
/el-option
>
<
el
-
option
v
-
for
=
"
(item,index) of materialPutawayOpt
"
:
key
=
"
index
"
:
label
=
"
item.putaway
Code
"
:
value
=
"
item.id
"
>
{{
item
.
putawayCode
}}
<
/el-option
>
<
/el-select
>
<
/el-select
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
...
@@ -217,9 +217,9 @@
...
@@ -217,9 +217,9 @@
<
/el-form
>
<
/el-form
>
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
物料信息
<
/span
>
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
物料信息
<
/span
>
<
el
-
divider
/>
<
el
-
divider
/>
<
el
-
table
:
data
=
"
materialList
"
ref
=
"
selectionTable
"
max
-
height
=
"
30
0
"
>
<
el
-
table
:
data
=
"
materialList
"
ref
=
"
selectionTable
"
max
-
height
=
"
45
0
"
>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/
>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>--
>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/
>
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>--
>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
...
@@ -261,7 +261,7 @@
...
@@ -261,7 +261,7 @@
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open1
"
width
=
"
80%
"
append
-
to
-
body
>
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open1
"
width
=
"
80%
"
append
-
to
-
body
>
<
span
style
=
"
font-size: 16px; font-weight: bold; margin-bottom: 20px
"
>
退货信息
<
/span
>
<
span
style
=
"
font-size: 16px; font-weight: bold; margin-bottom: 20px
"
>
退货信息
<
/span
>
<
el
-
descriptions
class
=
"
margin-top
"
:
column
=
"
3
"
border
>
<
el
-
descriptions
class
=
"
margin-top
"
:
column
=
"
3
"
border
>
<
el
-
descriptions
-
item
label
=
"
入库单号
"
>
{{
form
.
putaway
Number
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
入库单号
"
>
{{
form
.
putaway
Code
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
仓库名称
"
>
{{
form
.
warehouseName
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
仓库名称
"
>
{{
form
.
warehouseName
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
入库时间
"
>
{{
form
.
putawayTime
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
入库时间
"
>
{{
form
.
putawayTime
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
订单单号
"
>
{{
form
.
orderNumber
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
订单单号
"
>
{{
form
.
orderNumber
}}
<
/el-descriptions-item
>
...
@@ -270,7 +270,7 @@
...
@@ -270,7 +270,7 @@
<
dict
-
tag
:
options
=
"
dict.type.putaway_type
"
:
value
=
"
form.putawayType
"
/>
<
dict
-
tag
:
options
=
"
dict.type.putaway_type
"
:
value
=
"
form.putawayType
"
/>
<
/el-descriptions-item
>
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
入库金额
"
>
{{
form
.
putawayMoney
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
入库金额
"
>
{{
form
.
putawayMoney
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
退货单号
"
>
{{
form
.
returns
Number
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
退货单号
"
>
{{
form
.
returns
Code
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
退货金额
"
>
{{
form
.
returnsMoney
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
退货金额
"
>
{{
form
.
returnsMoney
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
退货时间
"
>
{{
form
.
returnsTime
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
退货时间
"
>
{{
form
.
returnsTime
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
创建人
"
>
{{
form
.
createBy
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
创建人
"
>
{{
form
.
createBy
}}
<
/el-descriptions-item
>
...
@@ -278,8 +278,8 @@
...
@@ -278,8 +278,8 @@
<
/el-descriptions
>
<
/el-descriptions
>
<
span
style
=
"
font-size: 16px; font-weight: bold; margin-bottom: 20px
"
>
退货明细
<
/span
>
<
span
style
=
"
font-size: 16px; font-weight: bold; margin-bottom: 20px
"
>
退货明细
<
/span
>
<
el
-
table
:
data
=
"
form.returnsInfoList
"
>
<
el
-
table
:
data
=
"
form.returnsInfoList
"
>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/
>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>--
>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/
>
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>--
>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
...
@@ -406,7 +406,7 @@ export default {
...
@@ -406,7 +406,7 @@ export default {
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
id
:
undefined
,
id
:
undefined
,
returns
Number
:
undefined
,
returns
Code
:
undefined
,
returnsMoney
:
undefined
,
returnsMoney
:
undefined
,
returnsTime
:
undefined
,
returnsTime
:
undefined
,
putawayId
:
undefined
,
putawayId
:
undefined
,
...
...
maintain-ui/src/views/business/materialStock/index.vue
View file @
c5024746
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"
供应商名称"
prop=
"vendor
Name"
>
<el-form-item
label=
"
仓库名称"
prop=
"warehouse
Name"
>
<el-input
<el-input
v-model=
"queryParams.
vendor
Name"
v-model=
"queryParams.
warehouse
Name"
placeholder=
"请输入
供应商
名称"
placeholder=
"请输入
仓库
名称"
clearable
clearable
@
keyup.enter.native=
"handleQuery"
@
keyup.enter.native=
"handleQuery"
/>
/>
...
@@ -33,36 +33,6 @@
...
@@ -33,36 +33,6 @@
@
keyup.enter.native=
"handleQuery"
@
keyup.enter.native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"isEnable"
>
<el-select
v-model=
"queryParams.isEnable"
placeholder=
"是否启用"
clearable
>
<el-option
v-for=
"dict in dict.type.sys_is_enable"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"是否盘点"
prop=
"isCheck"
>
<el-select
v-model=
"queryParams.isCheck"
placeholder=
"是否盘点"
clearable
>
<el-option
v-for=
"dict in dict.type.sys_is_enable"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"是否通用"
prop=
"isUniversal"
>
<el-select
v-model=
"queryParams.isUniversal"
placeholder=
"是否通用"
clearable
>
<el-option
v-for=
"dict in dict.type.sys_is_enable"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<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>
...
@@ -74,13 +44,12 @@
...
@@ -74,13 +44,12 @@
</el-row>
</el-row>
<el-table
v-loading=
"loading"
:data=
"materialList"
>
<el-table
v-loading=
"loading"
:data=
"materialList"
>
<el-table-column
label=
"仓库"
align=
"center"
fixed=
"left"
prop=
"warehouseName"
/>
<el-table-column
label=
"物资编码"
align=
"center"
fixed=
"left"
prop=
"materialCode"
/>
<el-table-column
label=
"物资编码"
align=
"center"
fixed=
"left"
prop=
"materialCode"
/>
<el-table-column
label=
"物资名称"
align=
"center"
fixed=
"left"
prop=
"materialName"
/>
<el-table-column
label=
"物资名称"
align=
"center"
fixed=
"left"
prop=
"materialName"
/>
<el-table-column
label=
"物资规格"
align=
"center"
fixed=
"left"
prop=
"materialSpecifications"
/>
<el-table-column
label=
"物资规格"
align=
"center"
fixed=
"left"
prop=
"materialSpecifications"
/>
<el-table-column
label=
"物资品牌"
align=
"center"
fixed=
"left"
prop=
"materialBrand"
/>
<el-table-column
label=
"物资品牌"
align=
"center"
fixed=
"left"
prop=
"materialBrand"
/>
<el-table-column
label=
"物资单位"
align=
"center"
fixed=
"left"
prop=
"materialUnit"
/>
<el-table-column
label=
"物资单位"
align=
"center"
fixed=
"left"
prop=
"materialUnit"
/>
<el-table-column
label=
"所在仓库"
align=
"center"
prop=
"warehouseName"
/>
<!--
<el-table-column
label=
"分类名称"
align=
"center"
prop=
"materialTypeName"
/>
-->
<el-table-column
label=
"供应商"
align=
"center"
prop=
"vendorName"
show-overflow-tooltip
/>
<el-table-column
label=
"供应商"
align=
"center"
prop=
"vendorName"
show-overflow-tooltip
/>
<el-table-column
label=
"采购标的"
align=
"center"
prop=
"procurementSubject"
/>
<el-table-column
label=
"采购标的"
align=
"center"
prop=
"procurementSubject"
/>
<el-table-column
label=
"适用车型"
align=
"center"
prop=
"compatibleWith"
/>
<el-table-column
label=
"适用车型"
align=
"center"
prop=
"compatibleWith"
/>
...
@@ -93,11 +62,6 @@
...
@@ -93,11 +62,6 @@
<el-table-column
label=
"参考价"
align=
"center"
prop=
"referencePrice"
/>
<el-table-column
label=
"参考价"
align=
"center"
prop=
"referencePrice"
/>
<el-table-column
label=
"销售价"
align=
"center"
prop=
"sellingPrice"
/>
<el-table-column
label=
"销售价"
align=
"center"
prop=
"sellingPrice"
/>
<el-table-column
label=
"库存"
align=
"center"
prop=
"inventory"
/>
<el-table-column
label=
"库存"
align=
"center"
prop=
"inventory"
/>
<el-table-column
label=
"是否启用"
align=
"center"
prop=
"isEnable"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_is_enable"
:value=
"scope.row.isEnable"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"90px"
fixed=
"right"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
width=
"90px"
fixed=
"right"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
...
@@ -125,38 +89,33 @@
...
@@ -125,38 +89,33 @@
<el-tab-pane
label=
"入库记录"
name=
"1"
>
<el-tab-pane
label=
"入库记录"
name=
"1"
>
<el-table
:data=
"materialPutawayInfoList"
>
<el-table
:data=
"materialPutawayInfoList"
>
<el-table-column
label=
"入库单号"
align=
"center"
prop=
"putawayCode"
/>
<el-table-column
label=
"入库单号"
align=
"center"
prop=
"putawayCode"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"state"
>
<el-table-column
label=
"入库数量"
align=
"center"
prop=
"number"
/>
<
template
slot-scope=
"scope"
>
<el-table-column
label=
"入库单价"
align=
"center"
prop=
"price"
/>
<dict-tag
:options=
"dict.type.putaway_info_state"
:value=
"scope.row.state"
/>
<el-table-column
label=
"入库金额"
align=
"center"
prop=
"money"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"入库数量"
align=
"center"
prop=
"putawayNumber"
/>
<el-table-column
label=
"入库单价"
align=
"center"
prop=
"putawayPrice"
/>
<el-table-column
label=
"入库金额"
align=
"center"
prop=
"putawayMoney"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"150px"
/>
</el-table>
</el-table>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"退货记录"
name=
"2"
>
<el-tab-pane
label=
"退货记录"
name=
"2"
>
<el-table
:data=
"materialReturnsInfoList"
>
<el-table
:data=
"materialReturnsInfoList"
>
<el-table-column
label=
"退货单号"
align=
"center"
prop=
"returns
Number
"
/>
<el-table-column
label=
"退货单号"
align=
"center"
prop=
"returns
Code
"
/>
<el-table-column
label=
"入库单号"
align=
"center"
prop=
"putawayCode"
/>
<el-table-column
label=
"入库单号"
align=
"center"
prop=
"putawayCode"
/>
<el-table-column
label=
"退货数量"
align=
"center"
prop=
"
returnsN
umber"
/>
<el-table-column
label=
"退货数量"
align=
"center"
prop=
"
n
umber"
/>
<el-table-column
label=
"退货单价"
align=
"center"
prop=
"
returnsP
rice"
/>
<el-table-column
label=
"退货单价"
align=
"center"
prop=
"
p
rice"
/>
<el-table-column
label=
"退货金额"
align=
"center"
prop=
"
returnsM
oney"
/>
<el-table-column
label=
"退货金额"
align=
"center"
prop=
"
m
oney"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"150px"
/>
</el-table>
</el-table>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"出库记录"
name=
"3"
>
<el-tab-pane
label=
"出库记录"
name=
"3"
>
<el-table
:data=
"materialPickingInfoList"
>
<el-table
:data=
"materialPickingInfoList"
>
<el-table-column
label=
"报修单号"
align=
"center"
prop=
"repairNumber"
/>
<el-table-column
label=
"报修单号"
align=
"center"
prop=
"repairNumber"
/>
<el-table-column
label=
"出库单号"
align=
"center"
prop=
"outNumber"
/>
<el-table-column
label=
"出库单号"
align=
"center"
prop=
"outNumber"
/>
<el-table-column
label=
"出库数量"
align=
"center"
prop=
"
collectN
umber"
/>
<el-table-column
label=
"出库数量"
align=
"center"
prop=
"
n
umber"
/>
<el-table-column
label=
"出库单价"
align=
"center"
prop=
"price"
/>
<el-table-column
label=
"出库单价"
align=
"center"
prop=
"price"
/>
<el-table-column
label=
"出库金额"
align=
"center"
prop=
"money"
/>
<el-table-column
label=
"出库金额"
align=
"center"
prop=
"money"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"150px"
/>
</el-table>
</el-table>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"退料记录"
name=
"4"
>
<el-tab-pane
label=
"退料记录"
name=
"4"
>
...
@@ -164,11 +123,11 @@
...
@@ -164,11 +123,11 @@
<el-table-column
label=
"报修单号"
align=
"center"
prop=
"repairNumber"
/>
<el-table-column
label=
"报修单号"
align=
"center"
prop=
"repairNumber"
/>
<el-table-column
label=
"出库单号"
align=
"center"
prop=
"outNumber"
/>
<el-table-column
label=
"出库单号"
align=
"center"
prop=
"outNumber"
/>
<el-table-column
label=
"退料单号"
align=
"center"
prop=
"returnNumber"
/>
<el-table-column
label=
"退料单号"
align=
"center"
prop=
"returnNumber"
/>
<el-table-column
label=
"退料数量"
align=
"center"
prop=
"
collectN
umber"
/>
<el-table-column
label=
"退料数量"
align=
"center"
prop=
"
n
umber"
/>
<el-table-column
label=
"退料单价"
align=
"center"
prop=
"price"
/>
<el-table-column
label=
"退料单价"
align=
"center"
prop=
"price"
/>
<el-table-column
label=
"退料金额"
align=
"center"
prop=
"money"
/>
<el-table-column
label=
"退料金额"
align=
"center"
prop=
"money"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"150px"
/>
</el-table>
</el-table>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
...
@@ -177,12 +136,9 @@
...
@@ -177,12 +136,9 @@
</template>
</template>
<
script
>
<
script
>
import
{
list
Material
}
from
"
@/api/business/material
"
;
import
{
list
ByMaterialId
,
listMaterialInventory
}
from
"
@/api/business/material
"
;
import
Treeselect
from
'
@riophae/vue-treeselect
'
import
Treeselect
from
'
@riophae/vue-treeselect
'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
import
{
listMaterialPutawayInfoAll
}
from
"
@/api/business/materialPutawayInfo
"
;
import
{
listMaterialReturnsInfoAll
}
from
"
@/api/business/materialReturnsInfo
"
;
import
{
listMaterialPickingInfoAll
}
from
"
@/api/business/materialPickingInfo
"
;
export
default
{
export
default
{
name
:
"
Material
"
,
name
:
"
Material
"
,
...
@@ -224,23 +180,11 @@ export default {
...
@@ -224,23 +180,11 @@ export default {
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
materialTypeId
:
undefined
,
materialTypeName
:
undefined
,
warehouseLocationId
:
undefined
,
warehouseLocationType
:
undefined
,
vendorId
:
undefined
,
vendorName
:
undefined
,
vendorName
:
undefined
,
materialCode
:
undefined
,
materialCode
:
undefined
,
materialName
:
undefined
,
materialName
:
undefined
,
materialSpecifications
:
undefined
,
materialSpecifications
:
undefined
,
materialUnit
:
undefined
,
warehouseName
:
undefined
materialWarrantyPeriod
:
undefined
,
referencePrice
:
undefined
,
sellingPrice
:
undefined
,
inventory
:
undefined
,
isEnable
:
undefined
,
isUniversal
:
undefined
,
isCheck
:
undefined
,
},
},
// 表单参数
// 表单参数
form
:
{},
form
:
{},
...
@@ -253,7 +197,7 @@ export default {
...
@@ -253,7 +197,7 @@ export default {
/** 查询物资列表 */
/** 查询物资列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
listMaterial
(
this
.
queryParams
).
then
(
response
=>
{
listMaterial
Inventory
(
this
.
queryParams
).
then
(
response
=>
{
this
.
materialList
=
response
.
rows
;
this
.
materialList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
this
.
loading
=
false
;
...
@@ -313,32 +257,33 @@ export default {
...
@@ -313,32 +257,33 @@ export default {
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
`物资【
${
row
.
materialName
}
】库存记录`
;
this
.
title
=
`物资【
${
row
.
materialName
}
】库存记录`
;
this
.
getPutawayInfoList
(
row
.
id
)
let
{
warehouseId
,
materialId
,
type
}
=
row
this
.
getReturnsInfoList
(
row
.
id
)
this
.
getPutawayInfoList
(
warehouseId
,
materialId
)
this
.
getPickingInfoList
(
row
.
id
)
this
.
getReturnsInfoList
(
warehouseId
,
materialId
)
this
.
getBackInfoList
(
row
.
id
)
this
.
getPickingInfoList
(
warehouseId
,
materialId
)
this
.
getBackInfoList
(
warehouseId
,
materialId
)
},
},
/** 查询物料入库明细列表 */
/** 查询物料入库明细列表 */
getPutawayInfoList
(
materialId
)
{
getPutawayInfoList
(
warehouseId
,
materialId
)
{
list
MaterialPutawayInfoAll
({
materialId
}).
then
(
response
=>
{
list
ByMaterialId
({
warehouseId
,
materialId
,
type
:
1
}).
then
(
response
=>
{
this
.
materialPutawayInfoList
=
response
.
data
;
this
.
materialPutawayInfoList
=
response
.
data
;
});
});
},
},
/** 查询物料退货明细列表 */
/** 查询物料退货明细列表 */
getReturnsInfoList
(
materialId
)
{
getReturnsInfoList
(
warehouseId
,
materialId
)
{
list
MaterialReturnsInfoAll
({
materialId
}).
then
(
response
=>
{
list
ByMaterialId
({
warehouseId
,
materialId
,
type
:
2
}).
then
(
response
=>
{
this
.
materialReturnsInfoList
=
response
.
data
;
this
.
materialReturnsInfoList
=
response
.
data
;
});
});
},
},
/** 查询物料出库列表 */
/** 查询物料出库列表 */
getPickingInfoList
(
materialId
)
{
getPickingInfoList
(
warehouseId
,
materialId
)
{
list
MaterialPickingInfoAll
({
materialId
,
stateList
:[
1
,
2
]
}).
then
(
response
=>
{
list
ByMaterialId
({
warehouseId
,
materialId
,
type
:
3
}).
then
(
response
=>
{
this
.
materialPickingInfoList
=
response
.
data
;
this
.
materialPickingInfoList
=
response
.
data
;
});
});
},
},
/** 查询物料退料列表 */
/** 查询物料退料列表 */
getBackInfoList
(
materialId
)
{
getBackInfoList
(
warehouseId
,
materialId
)
{
list
MaterialPickingInfoAll
({
materialId
,
stateList
:[
3
]
}).
then
(
response
=>
{
list
ByMaterialId
({
warehouseId
,
materialId
,
type
:
4
}).
then
(
response
=>
{
this
.
materialBackInfoList
=
response
.
data
;
this
.
materialBackInfoList
=
response
.
data
;
});
});
},
},
...
...
maintain-ui/src/views/business/pickingReturn/index.vue
View file @
c5024746
...
@@ -190,15 +190,18 @@
...
@@ -190,15 +190,18 @@
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
退料明细
<
/span
>
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
退料明细
<
/span
>
<
el
-
divider
/>
<
el
-
divider
/>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>-->
<
el
-
table
-
column
label
=
"
仓库名称
"
align
=
"
center
"
prop
=
"
warehouseName
"
/>
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>-->
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
退料数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
width
=
"
120px
"
/>
<!--
<
el
-
table
-
column
label
=
"
销售单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
/>-->
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
/>
<
/el-table
>
<
/el-table
>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
<
el
-
button
:
loading
=
"
buttonLoading
"
type
=
"
primary
"
@
click
=
"
submitForm
"
>
提
交
<
/el-button
>
<
el
-
button
:
loading
=
"
buttonLoading
"
type
=
"
primary
"
@
click
=
"
submitForm
"
>
提
交
<
/el-button
>
...
@@ -227,13 +230,18 @@
...
@@ -227,13 +230,18 @@
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>-->
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>-->
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>-->
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>-->
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendor
Name
"
/>
<
el
-
table
-
column
label
=
"
仓库名称
"
align
=
"
center
"
prop
=
"
warehouse
Name
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>
<
el
-
table
-
column
label
=
"
退料数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
width
=
"
120px
"
/>
<!--
<
el
-
table
-
column
label
=
"
销售单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
/>-->
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
/>
<
/el-table
>
<
/el-table
>
<
/el-dialog
>
<
/el-dialog
>
<
/div
>
<
/div
>
...
@@ -322,7 +330,7 @@ export default {
...
@@ -322,7 +330,7 @@ export default {
}
,
}
,
/** 查询报修单列表 */
/** 查询报修单列表 */
getRepairList
()
{
getRepairList
()
{
listRepairForm
({
pageNum
:
1
,
pageSize
:
100
,
state
:
1
}
).
then
(
response
=>
{
listRepairForm
({
pageNum
:
1
,
pageSize
:
100
0
,
state
:
1
}
).
then
(
response
=>
{
this
.
repairFormOpt
=
response
.
rows
;
this
.
repairFormOpt
=
response
.
rows
;
}
);
}
);
}
,
}
,
...
...
maintain-ui/src/views/business/repairForm/info.vue
View file @
c5024746
...
@@ -468,24 +468,24 @@
...
@@ -468,24 +468,24 @@
</template>
</template>
<
script
>
<
script
>
import
{
addRepairForm
,
getRepairForm
,
updateRepairForm
}
from
'
@/api/business/repairForm
'
import
{
addRepairForm
,
getRepairForm
,
updateRepairForm
}
from
'
@/api/business/repairForm
'
import
Treeselect
from
'
@riophae/vue-treeselect
'
import
Treeselect
from
'
@riophae/vue-treeselect
'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
import
examineProject
from
'
../examineProject/index
'
import
examineProject
from
'
../examineProject/index
'
import
malfunctionProject
from
'
../malfunctionProject/index
'
import
malfunctionProject
from
'
../malfunctionProject/index
'
import
{
listCar
}
from
'
@/api/business/car
'
import
{
listCar
}
from
'
@/api/business/car
'
import
{
listClient
}
from
'
@/api/business/client
'
import
{
listClient
}
from
'
@/api/business/client
'
import
{
listMaintainCause
}
from
'
@/api/business/maintainCause
'
import
{
listMaintainCause
}
from
'
@/api/business/maintainCause
'
import
{
getSiteTree
}
from
'
@/api/business/unit
'
import
{
getSiteTree
}
from
'
@/api/business/unit
'
import
{
listSiteGroup
}
from
'
@/api/business/siteGroup
'
import
{
listSiteGroup
}
from
'
@/api/business/siteGroup
'
import
{
getVehicleModel
}
from
'
@/api/business/vehicleModel
'
import
{
getVehicleModel
}
from
'
@/api/business/vehicleModel
'
import
repairFormProject
from
'
@/views/business/repairFormProject/index.vue
'
import
repairFormProject
from
'
@/views/business/repairFormProject/index.vue
'
import
MaterialPickingInfo
from
'
@/views/business/materialPickingInfo/index.vue
'
import
MaterialPickingInfo
from
'
@/views/business/materialPickingInfo/index.vue
'
import
{
addRepairFormDelivery
,
updateRepairFormDelivery
}
from
'
@/api/business/repairFormDelivery
'
import
{
addRepairFormDelivery
,
updateRepairFormDelivery
}
from
'
@/api/business/repairFormDelivery
'
import
{
listUser
}
from
'
@/api/business/user
'
import
{
listUser
}
from
'
@/api/business/user
'
import
RepairFormClaim
from
'
@/views/business/repairFormClaim/index.vue
'
import
RepairFormClaim
from
'
@/views/business/repairFormClaim/index.vue
'
import
{
authCarNumber
,
authPhone
}
from
'
@/utils/ruoyi
'
import
{
authCarNumber
}
from
'
@/utils/ruoyi
'
import
{
formatDate
}
from
'
@/utils
'
import
{
formatDate
}
from
'
@/utils
'
export
default
{
export
default
{
name
:
"
Detail
"
,
name
:
"
Detail
"
,
...
@@ -680,12 +680,12 @@ export default {
...
@@ -680,12 +680,12 @@ export default {
},
},
created
()
{
created
()
{
this
.
repairFormId
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
repairFormId
this
.
repairFormId
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
repairFormId
this
.
flag
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
flag
;
this
.
isDelivery
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
isDelivery
;
this
.
isDelivery
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
isDelivery
;
this
.
getCarList
();
this
.
getCarList
();
this
.
getClientList
();
this
.
getClientList
();
this
.
getReason
();
this
.
getReason
();
this
.
getTreeData
();
this
.
getTreeData
();
this
.
flag
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
flag
;
if
(
this
.
flag
&&
this
.
flag
!=
0
)
{
if
(
this
.
flag
&&
this
.
flag
!=
0
)
{
this
.
getDetail
();
this
.
getDetail
();
this
.
getMaintainUserList
()
this
.
getMaintainUserList
()
...
@@ -717,7 +717,7 @@ export default {
...
@@ -717,7 +717,7 @@ export default {
response
.
data
.
isFindMaintain
=
''
+
response
.
data
.
isFindMaintain
;
response
.
data
.
isFindMaintain
=
''
+
response
.
data
.
isFindMaintain
;
response
.
data
.
isByoPart
=
''
+
response
.
data
.
isByoPart
;
response
.
data
.
isByoPart
=
''
+
response
.
data
.
isByoPart
;
response
.
data
.
repairerGroupId
=
''
+
response
.
data
.
repairerGroupId
;
response
.
data
.
repairerGroupId
=
''
+
response
.
data
.
repairerGroupId
;
this
.
carList
.
push
(
response
.
data
.
car
);
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
this
.
deliveryForm
=
response
.
data
.
deliveryVo
this
.
deliveryForm
=
response
.
data
.
deliveryVo
...
...
maintain-ui/src/views/business/settlementMaintain/info/add.vue
View file @
c5024746
...
@@ -6,20 +6,18 @@
...
@@ -6,20 +6,18 @@
<el-divider
/>
<el-divider
/>
<el-row>
<el-row>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"客户"
prop=
"clientId"
>
<el-form-item
label=
"客户"
prop=
"clientName"
>
<el-select
v-model=
"form.clientId"
disabled
filterable
@
change=
"clientChange"
placeholder=
"请选择客户"
>
<el-input
v-model=
"form.clientName"
disabled
placeholder=
"请选择客户"
/>
<el-option
v-for=
"item in clientOpt"
:key=
"item.id"
:value=
"item.id"
:label=
"item.name"
/>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"客户手机号"
prop=
"clientPhone"
>
<el-form-item
label=
"客户手机号"
prop=
"clientPhone"
>
<el-input
v-model=
"form.clientPhone"
disabled
placeholder=
"
请输入
客户手机号"
/>
<el-input
v-model=
"form.clientPhone"
disabled
placeholder=
"客户手机号"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"证件类型"
prop=
"clientCertificateType"
>
<el-form-item
label=
"证件类型"
prop=
"clientCertificateType"
>
<el-select
v-model=
"form.clientCertificateType"
disabled
placeholder=
"
请选择
证件类型"
>
<el-select
v-model=
"form.clientCertificateType"
disabled
placeholder=
"证件类型"
>
<el-option
v-for=
"item in dict.type.zhengjianleixing"
:key=
"item.value"
:value=
"parseInt(item.value)"
:label=
"item.label"
/>
<el-option
v-for=
"item in dict.type.zhengjianleixing"
:key=
"item.value"
:value=
"parseInt(item.value)"
:label=
"item.label"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -33,18 +31,17 @@
...
@@ -33,18 +31,17 @@
<span
style=
"font-weight: bold; font-size: 18px"
>
报修信息
</span>
<span
style=
"font-weight: bold; font-size: 18px"
>
报修信息
</span>
<el-divider
/>
<el-divider
/>
<el-table
v-loading=
"loading"
:data=
"form.settlementRepairFormList"
>
<el-table
v-loading=
"loading"
:data=
"form.settlementRepairFormList"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
label=
"序号"
align=
"center"
type=
"index"
fixed=
"left"
/>
<el-table-column
label=
"序号"
align=
"center"
type=
"index"
/>
<el-table-column
label=
"报修单号"
align=
"center"
prop=
"repairNumber"
width=
"140px"
fixed=
"left"
/>
<el-table-column
label=
"报修单号"
align=
"center"
prop=
"repairNumber"
/>
<el-table-column
label=
"客户类型"
align=
"center"
prop=
"repairNumber"
fixed=
"left"
>
<el-table-column
label=
"客户类型"
align=
"center"
prop=
"repairNumber"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.client_type"
:value=
"scope.row.client.type"
/>
<dict-tag
:options=
"dict.type.client_type"
:value=
"scope.row.client.type"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"client.name"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"client.name"
width=
"120px"
fixed=
"left"
show-overflow-tooltip
/>
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"client.phone"
min-width=
"130px"
show-overflow-tooltip
/>
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"client.phone"
min-width=
"130px"
show-overflow-tooltip
/>
<el-table-column
label=
"车辆品牌"
align=
"center"
prop=
"car.carBrand"
/>
<el-table-column
label=
"车辆品牌"
align=
"center"
prop=
"car.carBrand"
/>
<el-table-column
label=
"车牌号"
align=
"center"
prop=
"car.plateNumber"
/>
<el-table-column
label=
"车牌号"
align=
"center"
prop=
"car.plateNumber"
width=
"110"
/>
<el-table-column
label=
"总工时"
align=
"center"
prop=
"totalActualTime"
/>
<el-table-column
label=
"总工时"
align=
"center"
prop=
"totalActualTime"
/>
<el-table-column
label=
"工时费用(元)"
align=
"center"
prop=
"totalActualTimeMoney"
min-width=
"120px"
/>
<el-table-column
label=
"工时费用(元)"
align=
"center"
prop=
"totalActualTimeMoney"
min-width=
"120px"
/>
<el-table-column
label=
"材料费用(元)"
align=
"center"
prop=
"totalMaterialMoney"
min-width=
"120px"
/>
<el-table-column
label=
"材料费用(元)"
align=
"center"
prop=
"totalMaterialMoney"
min-width=
"120px"
/>
...
@@ -124,7 +121,7 @@
...
@@ -124,7 +121,7 @@
<el-row>
<el-row>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"支付方式"
prop=
"paymentMethod"
>
<el-form-item
label=
"支付方式"
prop=
"paymentMethod"
>
<el-select
v-model=
"form.paymentMethod"
placeholder=
"请选择支付方式"
>
<el-select
v-model=
"form.paymentMethod"
placeholder=
"请选择支付方式"
style=
"width: 100%"
>
<el-option
v-for=
"item in dict.type.settlement_payment_method"
:key=
"item.value"
:value=
"parseInt(item.value)"
:label=
"item.label"
/>
<el-option
v-for=
"item in dict.type.settlement_payment_method"
:key=
"item.value"
:value=
"parseInt(item.value)"
:label=
"item.label"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -251,19 +248,19 @@ export default {
...
@@ -251,19 +248,19 @@ export default {
{
required
:
true
,
message
:
"
客户不能为空
"
,
trigger
:
"
blur
"
}
{
required
:
true
,
message
:
"
客户不能为空
"
,
trigger
:
"
blur
"
}
],
],
clientName
:
[
clientName
:
[
{
required
:
tru
e
,
message
:
"
客户名称不能为空
"
,
trigger
:
"
blur
"
}
{
required
:
fals
e
,
message
:
"
客户名称不能为空
"
,
trigger
:
"
blur
"
}
],
],
clientPhone
:
[
clientPhone
:
[
{
required
:
tru
e
,
message
:
"
客户手机号不能为空
"
,
trigger
:
"
blur
"
}
{
required
:
fals
e
,
message
:
"
客户手机号不能为空
"
,
trigger
:
"
blur
"
}
],
],
clientType
:
[
clientType
:
[
{
required
:
tru
e
,
message
:
"
客户类型不能为空
"
,
trigger
:
"
change
"
}
{
required
:
fals
e
,
message
:
"
客户类型不能为空
"
,
trigger
:
"
change
"
}
],
],
clientCertificateType
:
[
clientCertificateType
:
[
{
required
:
tru
e
,
message
:
"
证件类型不能为空
"
,
trigger
:
"
change
"
}
{
required
:
fals
e
,
message
:
"
证件类型不能为空
"
,
trigger
:
"
change
"
}
],
],
clientCertificateNumber
:
[
clientCertificateNumber
:
[
{
required
:
tru
e
,
message
:
"
证件号不能为空
"
,
trigger
:
"
blur
"
}
{
required
:
fals
e
,
message
:
"
证件号不能为空
"
,
trigger
:
"
blur
"
}
],
],
manHourDiscountMoney
:
[
manHourDiscountMoney
:
[
{
required
:
true
,
message
:
"
工时费优惠不能为空
"
,
trigger
:
"
blur
"
}
{
required
:
true
,
message
:
"
工时费优惠不能为空
"
,
trigger
:
"
blur
"
}
...
@@ -300,13 +297,15 @@ export default {
...
@@ -300,13 +297,15 @@ export default {
getClientList
()
{
getClientList
()
{
listClient
().
then
(
res
=>
{
listClient
().
then
(
res
=>
{
this
.
clientOpt
=
res
.
rows
this
.
clientOpt
=
res
.
rows
let
client
=
this
.
clientOpt
.
find
(
item
=>
item
.
id
===
this
.
form
.
clientId
)
if
(
this
.
clientOpt
.
length
>
0
)
{
// this.form.clientId = client.id
let
client
=
this
.
clientOpt
.
find
(
item
=>
item
.
id
===
this
.
form
.
clientId
)
this
.
form
.
clientType
=
client
.
type
// this.form.clientId = client.id
this
.
form
.
clientName
=
client
.
name
this
.
form
.
clientType
=
client
.
type
this
.
form
.
clientPhone
=
client
.
phone
this
.
form
.
clientName
=
client
.
name
this
.
form
.
clientCertificateType
=
client
.
certificateType
this
.
form
.
clientPhone
=
client
.
phone
this
.
form
.
clientCertificateNumber
=
client
.
certificateNumber
this
.
form
.
clientCertificateType
=
client
.
certificateType
this
.
form
.
clientCertificateNumber
=
client
.
certificateNumber
}
})
})
},
},
// 取消按钮
// 取消按钮
...
@@ -339,16 +338,6 @@ export default {
...
@@ -339,16 +338,6 @@ export default {
};
};
this
.
resetForm
(
"
form
"
);
this
.
resetForm
(
"
form
"
);
},
},
// 客户改变
clientChange
(
id
)
{
let
client
=
this
.
clientOpt
.
find
(
item
=>
item
.
id
===
id
)
this
.
form
.
clientId
=
client
.
id
this
.
form
.
clientType
=
client
.
type
this
.
form
.
clientName
=
client
.
name
this
.
form
.
clientPhone
=
client
.
phone
this
.
form
.
clientCertificateType
=
client
.
certificateType
this
.
form
.
clientCertificateNumber
=
client
.
certificateNumber
},
// 工时费或原料费优惠金额更改
// 工时费或原料费优惠金额更改
moneyChange
()
{
moneyChange
()
{
this
.
form
.
practicalMoney
=
this
.
form
.
receivableMoney
-
this
.
form
.
manHourDiscountMoney
-
this
.
form
.
materialDiscountMoney
this
.
form
.
practicalMoney
=
this
.
form
.
receivableMoney
-
this
.
form
.
manHourDiscountMoney
-
this
.
form
.
materialDiscountMoney
...
@@ -391,7 +380,6 @@ export default {
...
@@ -391,7 +380,6 @@ export default {
this
.
buttonLoading
=
false
;
this
.
buttonLoading
=
false
;
this
.
$tab
.
closeOpenPage
({
path
:
'
/settlement/settlementMaintain?clientType=1
'
})
this
.
$tab
.
closeOpenPage
({
path
:
'
/settlement/settlementMaintain?clientType=1
'
})
});
});
}
}
});
});
},
},
...
...
maintain-ui/src/views/business/settlementMaintain/info/index1.vue
View file @
c5024746
...
@@ -87,17 +87,17 @@
...
@@ -87,17 +87,17 @@
<el-table
v-loading=
"loading"
:data=
"repairFormList"
ref=
"table"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"repairFormList"
ref=
"table"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
fixed=
"left"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
fixed=
"left"
/>
<el-table-column
label=
"序号"
align=
"center"
type=
"index"
/>
<el-table-column
label=
"序号"
align=
"center"
type=
"index"
fixed=
"left"
/>
<el-table-column
label=
"报修单号"
align=
"center"
prop=
"repairNumber"
/>
<el-table-column
label=
"报修单号"
align=
"center"
prop=
"repairNumber"
fixed=
"left"
/>
<el-table-column
label=
"客户类型"
align=
"center"
prop=
"client.type"
>
<el-table-column
label=
"客户类型"
align=
"center"
prop=
"client.type"
fixed=
"left"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.client_type"
:value=
"scope.row.client.type"
/>
<dict-tag
:options=
"dict.type.client_type"
:value=
"scope.row.client.type"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"client.name"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"client.name"
width=
"120"
fixed=
"left"
show-overflow-tooltip
/>
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"client.phone"
min-width=
"130px"
show-overflow-tooltip
/>
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"client.phone"
min-width=
"130px"
show-overflow-tooltip
/>
<el-table-column
label=
"车辆品牌"
align=
"center"
prop=
"car.carBrand"
/>
<el-table-column
label=
"车辆品牌"
align=
"center"
prop=
"car.carBrand"
/>
<el-table-column
label=
"车牌号"
align=
"center"
prop=
"car.plateNumber"
/>
<el-table-column
label=
"车牌号"
align=
"center"
prop=
"car.plateNumber"
width=
"100"
/>
<el-table-column
label=
"总工时"
align=
"center"
prop=
"totalActualTime"
/>
<el-table-column
label=
"总工时"
align=
"center"
prop=
"totalActualTime"
/>
<el-table-column
label=
"工时费用(元)"
align=
"center"
prop=
"totalActualTimeMoney"
min-width=
"120px"
/>
<el-table-column
label=
"工时费用(元)"
align=
"center"
prop=
"totalActualTimeMoney"
min-width=
"120px"
/>
<el-table-column
label=
"材料费用(元)"
align=
"center"
prop=
"totalMaterialMoney"
min-width=
"120px"
/>
<el-table-column
label=
"材料费用(元)"
align=
"center"
prop=
"totalMaterialMoney"
min-width=
"120px"
/>
...
@@ -107,17 +107,17 @@
...
@@ -107,17 +107,17 @@
<el-table-column
label=
"结算时间"
align=
"center"
prop=
"settlementTime"
min-width=
"150px"
/>
<el-table-column
label=
"结算时间"
align=
"center"
prop=
"settlementTime"
min-width=
"150px"
/>
<el-table-column
label=
"登记时间"
align=
"center"
prop=
"createTime"
min-width=
"150px"
/>
<el-table-column
label=
"登记时间"
align=
"center"
prop=
"createTime"
min-width=
"150px"
/>
<el-table-column
label=
"登记人员"
align=
"center"
prop=
"createBy"
min-width=
"100px"
/>
<el-table-column
label=
"登记人员"
align=
"center"
prop=
"createBy"
min-width=
"100px"
/>
<el-table-column
label=
"是否交车"
align=
"center"
prop=
"isDelivery"
fixed=
"right"
>
<el-table-column
label=
"是否交车"
align=
"center"
prop=
"isDelivery"
width=
"50"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.repair_form_is_delivery"
:value=
"scope.row.isDelivery"
/>
<dict-tag
:options=
"dict.type.repair_form_is_delivery"
:value=
"scope.row.isDelivery"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
prop=
"state"
fixed=
"right"
>
<el-table-column
label=
"状态"
align=
"center"
prop=
"state"
width=
"60"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.repair_form_state"
:value=
"scope.row.state"
/>
<dict-tag
:options=
"dict.type.repair_form_state"
:value=
"scope.row.state"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"结算状态"
align=
"center"
prop=
"settlementState"
fixed=
"right"
>
<el-table-column
label=
"结算状态"
align=
"center"
prop=
"settlementState"
width=
"60"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.repair_form_settlement_state"
:value=
"scope.row.settlementState"
/>
<dict-tag
:options=
"dict.type.repair_form_settlement_state"
:value=
"scope.row.settlementState"
/>
</
template
>
</
template
>
...
@@ -263,7 +263,6 @@
...
@@ -263,7 +263,6 @@
<el-input-number
v-model=
"form.practicalMoney"
disabled
:min=
"0"
style=
"width: 100%"
placeholder=
"请输入结算金额"
/>
<el-input-number
v-model=
"form.practicalMoney"
disabled
:min=
"0"
style=
"width: 100%"
placeholder=
"请输入结算金额"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
>
<el-row
>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
...
@@ -309,7 +308,6 @@
...
@@ -309,7 +308,6 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
</el-scrollbar>
</el-scrollbar>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -534,7 +532,9 @@ export default {
...
@@ -534,7 +532,9 @@ export default {
return
;
return
;
}
}
const
firstCustomerId
=
selectedRows
[
0
].
clientId
;
const
firstCustomerId
=
selectedRows
[
0
].
clientId
;
const
clientName
=
selectedRows
[
0
].
client
.
name
;
this
.
form
.
clientId
=
firstCustomerId
this
.
form
.
clientId
=
firstCustomerId
this
.
form
.
clientName
=
clientName
const
allSame
=
selectedRows
.
every
(
row
=>
row
.
clientId
===
firstCustomerId
);
const
allSame
=
selectedRows
.
every
(
row
=>
row
.
clientId
===
firstCustomerId
);
if
(
!
allSame
)
{
if
(
!
allSame
)
{
this
.
$modal
.
msgError
(
'
请勾选相同客户报修单
'
)
this
.
$modal
.
msgError
(
'
请勾选相同客户报修单
'
)
...
...
maintain-ui/src/views/business/settlementMaterial/info/index1.vue
View file @
c5024746
...
@@ -183,8 +183,8 @@
...
@@ -183,8 +183,8 @@
<
el
-
table
-
column
type
=
"
expand
"
>
<
el
-
table
-
column
type
=
"
expand
"
>
<
template
slot
-
scope
=
"
props
"
>
<
template
slot
-
scope
=
"
props
"
>
<
el
-
table
:
data
=
"
props.row.pickingInfoList
"
>
<
el
-
table
:
data
=
"
props.row.pickingInfoList
"
>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/
>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>--
>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/
>
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>--
>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
...
@@ -255,8 +255,8 @@
...
@@ -255,8 +255,8 @@
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
出库明细
<
/span
>
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
出库明细
<
/span
>
<
el
-
divider
/>
<
el
-
divider
/>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<
el
-
table
:
data
=
"
form.pickingInfoList
"
>
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/
>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>--
>
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/
>
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>--
>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
...
@@ -266,7 +266,7 @@
...
@@ -266,7 +266,7 @@
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
领料数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
领料数量
"
align
=
"
center
"
prop
=
"
collectNumber
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
销售
单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
入库
单价
"
align
=
"
center
"
prop
=
"
price
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
/>
<
el
-
table
-
column
label
=
"
领料金额
"
align
=
"
center
"
prop
=
"
money
"
width
=
"
120px
"
/>
<
/el-table
>
<
/el-table
>
<
/el-dialog
>
<
/el-dialog
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment