Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
2b22485a41
|
|
@ -203,6 +203,12 @@ public class MaType extends BaseEntity {
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
private List<MaType> children = new ArrayList<>();
|
private List<MaType> children = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂家规格型号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "厂家规格型号")
|
||||||
|
private String facModel;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Long getTypeId() {
|
public Long getTypeId() {
|
||||||
|
|
@ -550,4 +556,12 @@ public class MaType extends BaseEntity {
|
||||||
public void setFinalPrice(String finalPrice) {
|
public void setFinalPrice(String finalPrice) {
|
||||||
this.finalPrice = finalPrice;
|
this.finalPrice = finalPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getFacModel() {
|
||||||
|
return facModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFacModel(String facModel) {
|
||||||
|
this.facModel = facModel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退料接收-app
|
* 退料接收-app
|
||||||
|
*
|
||||||
* @author bns_han
|
* @author bns_han
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
@ -32,8 +33,14 @@ public class BackReceiveController extends BaseController {
|
||||||
@GetMapping("getbackReceiveList")
|
@GetMapping("getbackReceiveList")
|
||||||
public AjaxResult getbackReceiveList(BackApplyInfo record) {
|
public AjaxResult getbackReceiveList(BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
|
if (record.getFlag() == 0) {
|
||||||
List<BackApplyInfo> list = backReceiveService.getbackReceiveList(record);
|
List<BackApplyInfo> list = backReceiveService.getbackReceiveList(record);
|
||||||
return success(list);
|
return success(list);
|
||||||
|
} else {
|
||||||
|
startPage();
|
||||||
|
List<BackApplyInfo> list = backReceiveService.getbackReceiveList(record);
|
||||||
|
return success(getDataTable(list));
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,10 @@ public class BackApplyInfo {
|
||||||
* 类型名称
|
* 类型名称
|
||||||
*/
|
*/
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
/**
|
||||||
|
* 协议号
|
||||||
|
*/
|
||||||
|
private String agreementCode;
|
||||||
/**
|
/**
|
||||||
* 规格编号
|
* 规格编号
|
||||||
*/
|
*/
|
||||||
|
|
@ -159,4 +163,7 @@ public class BackApplyInfo {
|
||||||
* 退料数量
|
* 退料数量
|
||||||
*/
|
*/
|
||||||
private String preNum;
|
private String preNum;
|
||||||
|
private String startTime;
|
||||||
|
private String endTime;
|
||||||
|
private Integer flag;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -583,35 +583,69 @@
|
||||||
SELECT
|
SELECT
|
||||||
bai.id,
|
bai.id,
|
||||||
bai.`code`,
|
bai.`code`,
|
||||||
bai.task_id as taskId,
|
bai.task_id AS taskId,
|
||||||
bai.back_person as backPerson,
|
bai.back_person AS backPerson,
|
||||||
bai.phone,
|
bai.phone,
|
||||||
bpl.lot_id,
|
bpl.lot_id,
|
||||||
bpl.lot_name as lotName,
|
bpl.lot_name AS lotName,
|
||||||
bui.unit_id as unitId,
|
bui.unit_id AS unitId,
|
||||||
bui.unit_name as unitName,
|
bui.unit_name AS unitName,
|
||||||
bai.back_time as backTime,
|
bai.back_time AS backTime,
|
||||||
tt.task_status as taskStatus,
|
bagi.agreement_code AS agreementCode,
|
||||||
tta.agreement_id as agreementId,
|
tt.task_status AS taskStatus,
|
||||||
GROUP_CONCAT(DISTINCT bad.type_id) as typeId,
|
sd.`name` AS taskName,
|
||||||
|
tta.agreement_id AS agreementId,
|
||||||
|
GROUP_CONCAT( DISTINCT bad.type_id ) AS typeId,
|
||||||
GROUP_CONCAT( mt2.type_name, '' ) AS typeName
|
GROUP_CONCAT( mt2.type_name, '' ) AS typeName
|
||||||
FROM
|
FROM
|
||||||
back_apply_info bai
|
back_apply_info bai
|
||||||
LEFT JOIN back_apply_details bad on bad.parent_id=bai.id
|
LEFT JOIN back_apply_details bad ON bad.parent_id = bai.id
|
||||||
LEFT JOIN tm_task tt on tt.task_id=bai.task_id
|
LEFT JOIN tm_task tt ON tt.task_id = bai.task_id
|
||||||
LEFT JOIN tm_task_agreement tta on tta.task_id=tt.task_id
|
LEFT JOIN tm_task_agreement tta ON tta.task_id = tt.task_id
|
||||||
LEFT JOIN bm_agreement_info bagi on bagi.agreement_id=tta.agreement_id
|
LEFT JOIN bm_agreement_info bagi ON bagi.agreement_id = tta.agreement_id
|
||||||
LEFT JOIN bm_project_lot bpl on bpl.lot_id=bagi.project_id
|
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bagi.project_id
|
||||||
LEFT JOIN bm_unit_info bui on bui.unit_id=bagi.unit_id
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = bagi.unit_id
|
||||||
LEFT JOIN sys_user us on us.user_id=bai.create_by
|
LEFT JOIN sys_user us ON us.user_id = bai.create_by
|
||||||
LEFT JOIN ma_type mt1 ON mt1.type_id = bad.type_id
|
LEFT JOIN ma_type mt1 ON mt1.type_id = bad.type_id
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||||
|
LEFT JOIN sys_dic sd ON sd.id = tt.task_status
|
||||||
WHERE
|
WHERE
|
||||||
tt.task_status in (38,39,40)
|
tt.task_status IN ( 37, 38, 39, 40 )
|
||||||
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
|
<if test="keyWord != null and keyWord != ''">
|
||||||
ORDER BY tt.task_status asc ,bai.create_time desc
|
and (bai.code like concat('%', #{keyWord}, '%') or
|
||||||
|
bagi.agreement_code like concat('%', #{keyWord}, '%'))
|
||||||
|
</if>
|
||||||
|
<if test="unitId != null and unitId != ''">
|
||||||
|
and bui.unit_id = #{unitId}
|
||||||
|
</if>
|
||||||
|
<if test="lotId != null and lotId != ''">
|
||||||
|
and bpl.lot_id = #{lotId}
|
||||||
|
</if>
|
||||||
|
<if test="agreementCode != null and agreementCode != ''">
|
||||||
|
and bagi.agreement_code like concat('%', #{agreementCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="taskStatus != null and taskStatus != ''">
|
||||||
|
and tt.task_status = #{taskStatus}
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
|
AND bai.back_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||||
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
bai.id,
|
||||||
|
us.user_name,
|
||||||
|
bai.phone,
|
||||||
|
bpl.lot_name,
|
||||||
|
bui.unit_name,
|
||||||
|
bagi.plan_start_time
|
||||||
|
<if test="typeId != null and typeId != ''">
|
||||||
|
HAVING
|
||||||
|
FIND_IN_SET(#{typeId}, GROUP_CONCAT(DISTINCT bad.type_id))
|
||||||
|
</if>
|
||||||
|
ORDER BY
|
||||||
|
tt.task_status ASC,
|
||||||
|
bai.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="receiveView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
<select id="receiveView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||||
|
|
@ -620,7 +654,8 @@
|
||||||
bai.task_id as taskId,
|
bai.task_id as taskId,
|
||||||
tta.agreement_id as agreementId,
|
tta.agreement_id as agreementId,
|
||||||
mt.type_id as typeId,
|
mt.type_id as typeId,
|
||||||
mt.type_name typeCode,
|
mt.type_name as typeCode,
|
||||||
|
mt.unit_name as unitName,
|
||||||
mt2.type_name AS typeName,
|
mt2.type_name AS typeName,
|
||||||
IFNULL(bad.audit_num,0)-(IFNULL(aa.back_num,0)) as num,
|
IFNULL(bad.audit_num,0)-(IFNULL(aa.back_num,0)) as num,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="isPlan != null">is_plan,</if>
|
<if test="isPlan != null">is_plan,</if>
|
||||||
<if test="isAncuo != null">is_ancuo,</if>
|
<if test="isAncuo != null">is_ancuo,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="facModel != null">fac_model,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="typeName != null and typeName != ''">#{typeName},</if>
|
<if test="typeName != null and typeName != ''">#{typeName},</if>
|
||||||
|
|
@ -98,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="isPlan != null">#{isPlan},</if>
|
<if test="isPlan != null">#{isPlan},</if>
|
||||||
<if test="isAncuo != null">#{isAncuo},</if>
|
<if test="isAncuo != null">#{isAncuo},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="facModel != null">#{facModel},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -154,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="isAncuo != null">is_ancuo = #{isAncuo},</if>
|
<if test="isAncuo != null">is_ancuo = #{isAncuo},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="companyId != null">company_id = #{companyId},</if>
|
<if test="companyId != null">company_id = #{companyId},</if>
|
||||||
|
<if test="facModel != null">fac_model = #{facModel},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where type_id = #{typeId}
|
where type_id = #{typeId}
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -273,13 +276,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="selectMaTypeByTypeId" resultMap="MaTypeResult">
|
<select id="selectMaTypeByTypeId" resultMap="MaTypeResult">
|
||||||
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.manage_type,
|
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id,m.unit_name, m.manage_type,
|
||||||
m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
||||||
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
||||||
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
|
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
|
||||||
su.nick_name keeperUserName, mtr.user_id repairUserId, su1.nick_name repairUserName, mpi.prop_name,
|
su.nick_name keeperUserName, mtr.user_id repairUserId, su1.nick_name repairUserName,mpi.prop_id as propId, mpi.prop_name as propName,
|
||||||
m.del_flag, m.create_by, m.create_time,
|
m.del_flag, m.create_by, m.create_time,
|
||||||
m.remark, m.company_id
|
m.remark, m.company_id,m.fac_model as facModel
|
||||||
from ma_type m
|
from ma_type m
|
||||||
left join ma_prop_set mps on m.type_id = mps.type_id
|
left join ma_prop_set mps on m.type_id = mps.type_id
|
||||||
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id
|
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id
|
||||||
|
|
@ -334,7 +337,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
||||||
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
|
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
|
||||||
su.nick_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time,
|
su.nick_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time,
|
||||||
m.remark, m.company_id
|
m.remark, m.company_id,m.fac_model as facModel
|
||||||
from ma_type m
|
from ma_type m
|
||||||
left join ma_prop_set mps on m.type_id = mps.type_id
|
left join ma_prop_set mps on m.type_id = mps.type_id
|
||||||
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id
|
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id
|
||||||
|
|
|
||||||
|
|
@ -84,11 +84,17 @@ public class BackApplyController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "退料申请(查看)")
|
@ApiOperation(value = "退料申请(查看)")
|
||||||
@GetMapping("/getViewByApply")
|
@GetMapping("/getViewByApply")
|
||||||
public TableDataInfo getViewByApply(BackApplyInfo bean) {
|
public AjaxResult getViewByApply(BackApplyInfo bean) {
|
||||||
|
if (bean.getViewWeb() == 1) {
|
||||||
|
bean.setFlag(0);
|
||||||
|
List<BackApplyInfo> list = backApplyService.getViewByApply(bean);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
} else {
|
||||||
startPage();
|
startPage();
|
||||||
bean.setFlag(0);
|
bean.setFlag(0);
|
||||||
List<BackApplyInfo> list = backApplyService.getViewByApply(bean);
|
List<BackApplyInfo> list = backApplyService.getViewByApply(bean);
|
||||||
return getDataTable(list);
|
return AjaxResult.success(getDataTable(list));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -245,4 +245,6 @@ public class BackApplyInfo extends BaseEntity {
|
||||||
/** 前端条件查询所传退料时间 */
|
/** 前端条件查询所传退料时间 */
|
||||||
private String time;
|
private String time;
|
||||||
|
|
||||||
|
private int viewWeb;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("保存入库盘点异常:{}",e.getMessage());
|
log.error("保存入库盘点异常:{}",e.getMessage());
|
||||||
// 添加事务回滚逻辑
|
// 添加事务回滚逻辑,保证入库全部成功或者全部失败
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
return AjaxResult.error(ExceptionEnum.SAVE_TO_DATABASE.getCode(), ExceptionEnum.SAVE_TO_DATABASE.getMsg());
|
return AjaxResult.error(ExceptionEnum.SAVE_TO_DATABASE.getCode(), ExceptionEnum.SAVE_TO_DATABASE.getMsg());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
GROUP BY mt.type_id) AS subquery4 ON subquery4.type_id = mt.type_id
|
GROUP BY mt.type_id) AS subquery4 ON subquery4.type_id = mt.type_id
|
||||||
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
||||||
WHERE mt.`level` = 4
|
WHERE mt.`level` = 4
|
||||||
|
and mt.del_flag = '0'
|
||||||
<if test="typeName != null and typeName != ''">
|
<if test="typeName != null and typeName != ''">
|
||||||
and mt2.type_name like concat('%',#{typeName},'%')
|
and mt2.type_name like concat('%',#{typeName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -278,9 +278,9 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label="检验时间" label-width="130px" prop="thisCheckFixTime" v-if="!isNumCheck">
|
<el-form-item label="检验时间" label-width="130px" prop="thisCheckTime" v-if="!isNumCheck">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="codeForm.thisCheckFixTime"
|
v-model="codeForm.thisCheckTime"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请输入检验时间"
|
placeholder="请输入检验时间"
|
||||||
style="width: 400px"
|
style="width: 400px"
|
||||||
|
|
@ -288,9 +288,9 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<el-form-item label="下次检验时间" label-width="130px" prop="nextCheckFixTime" v-if="!isNumCheck">
|
<el-form-item label="下次检验时间" label-width="130px" prop="nextCheckTime" v-if="!isNumCheck">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="codeForm.nextCheckFixTime"
|
v-model="codeForm.nextCheckTime"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请输入检验时间"
|
placeholder="请输入检验时间"
|
||||||
style="width: 13vw;"
|
style="width: 13vw;"
|
||||||
|
|
@ -383,20 +383,20 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检验日期" align="center" prop="thisCheckFixTime" :show-overflow-tooltip="true">
|
<el-table-column label="检验日期" align="center" prop="thisCheckTime" :show-overflow-tooltip="true">
|
||||||
<template v-slot:default="{ row }" v-if="!isNumCheck">
|
<template v-slot:default="{ row }" v-if="!isNumCheck">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="row.thisCheckFixTime"
|
v-model="row.thisCheckTime"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请输入检验时间"
|
placeholder="请输入检验时间"
|
||||||
style="width: 170px"
|
style="width: 170px"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="下次检验日期" align="center" prop="nextCheckFixTime" :show-overflow-tooltip="true">
|
<el-table-column label="下次检验日期" align="center" prop="nextCheckTime" :show-overflow-tooltip="true">
|
||||||
<template v-slot:default="{ row }" v-if="!isNumCheck">
|
<template v-slot:default="{ row }" v-if="!isNumCheck">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="row.nextCheckFixTime"
|
v-model="row.nextCheckTime"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请输入下次检验时间"
|
placeholder="请输入下次检验时间"
|
||||||
style="width: 170px"
|
style="width: 170px"
|
||||||
|
|
@ -603,8 +603,8 @@ export default {
|
||||||
codeSuffixEnd: undefined,
|
codeSuffixEnd: undefined,
|
||||||
buyPrice: undefined,
|
buyPrice: undefined,
|
||||||
codeFactory: undefined,
|
codeFactory: undefined,
|
||||||
thisCheckFixTime: undefined,
|
thisCheckTime: undefined,
|
||||||
nextCheckFixTime: undefined,
|
nextCheckTime: undefined,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
|
|
@ -676,6 +676,7 @@ export default {
|
||||||
this.numTableList = []
|
this.numTableList = []
|
||||||
this.$refs['codeForm'].clearValidate()
|
this.$refs['codeForm'].clearValidate()
|
||||||
this.codeOpen = false;
|
this.codeOpen = false;
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
|
|
@ -701,8 +702,8 @@ export default {
|
||||||
codeSuffixEnd: undefined,
|
codeSuffixEnd: undefined,
|
||||||
buyPrice: undefined,
|
buyPrice: undefined,
|
||||||
codeFactory: undefined,
|
codeFactory: undefined,
|
||||||
thisCheckFixTime: undefined,
|
thisCheckTime: undefined,
|
||||||
nextCheckFixTime: undefined,
|
nextCheckTime: undefined,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
}
|
}
|
||||||
|
|
@ -741,20 +742,18 @@ export default {
|
||||||
const outFacCode = ''
|
const outFacCode = ''
|
||||||
// 生产厂家
|
// 生产厂家
|
||||||
const maVender = this.supplierList.find(item => item.supplierId == this.codeForm.codeFactory)?.supplier || ''
|
const maVender = this.supplierList.find(item => item.supplierId == this.codeForm.codeFactory)?.supplier || ''
|
||||||
// 检验日期: codeForm.thisCheckFixTime, 时间格式为 yyyy-MM-dd
|
// 检验日期: codeForm.thisCheckTime
|
||||||
let thisCheckFixTime = new Date(this.codeForm.thisCheckFixTime).toLocaleDateString('zh-CN', {year: 'numeric', month: '2-digit', day: '2-digit'}).replace(/\//g, '-')
|
const thisCheckTime = this.codeForm.thisCheckTime
|
||||||
if (thisCheckFixTime == 'Invalid Date') thisCheckFixTime = ''
|
// 下次检验日期: codeForm.nextCheckTime
|
||||||
// 下次检验日期: codeForm.nextCheckFixTime
|
const nextCheckTime = this.codeForm.nextCheckTime
|
||||||
let nextCheckFixTime = new Date(this.codeForm.nextCheckFixTime).toLocaleDateString('zh-CN', {year: 'numeric', month: '2-digit', day: '2-digit'}).replace(/\//g, '-')
|
|
||||||
if (nextCheckFixTime == 'Invalid Date') nextCheckFixTime = ''
|
|
||||||
// 单价: codeForm.buyPrice
|
// 单价: codeForm.buyPrice
|
||||||
const buyPrice = this.codeForm.buyPrice || 0
|
const buyPrice = this.codeForm.buyPrice || 0
|
||||||
this.codeTableList.push({
|
this.codeTableList.push({
|
||||||
maCode,
|
maCode,
|
||||||
outFacCode,
|
outFacCode,
|
||||||
maVender,
|
maVender,
|
||||||
thisCheckFixTime,
|
thisCheckTime,
|
||||||
nextCheckFixTime,
|
nextCheckTime,
|
||||||
buyPrice
|
buyPrice
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -774,8 +773,8 @@ export default {
|
||||||
row.maCode = ''
|
row.maCode = ''
|
||||||
row.outFacCode = ''
|
row.outFacCode = ''
|
||||||
row.maVender = ''
|
row.maVender = ''
|
||||||
row.thisCheckFixTime = ''
|
row.thisCheckTime = ''
|
||||||
row.nextCheckFixTime = ''
|
row.nextCheckTime = ''
|
||||||
row.buyPrice = 0
|
row.buyPrice = 0
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -792,6 +791,9 @@ export default {
|
||||||
this.codeOpen = true;
|
this.codeOpen = true;
|
||||||
this.title = "数量盘点入库";
|
this.title = "数量盘点入库";
|
||||||
this.resetCodeForm()
|
this.resetCodeForm()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['codeForm'].clearValidate()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/** 新增编号盘点按钮操作 */
|
/** 新增编号盘点按钮操作 */
|
||||||
handleCodeAdd() {
|
handleCodeAdd() {
|
||||||
|
|
@ -800,6 +802,9 @@ export default {
|
||||||
this.codeOpen = true;
|
this.codeOpen = true;
|
||||||
this.title = "编码盘点入库";
|
this.title = "编码盘点入库";
|
||||||
this.resetCodeForm()
|
this.resetCodeForm()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['codeForm'].clearValidate()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
|
|
@ -822,9 +827,9 @@ export default {
|
||||||
this.$refs['codeForm'].validate(valid => {
|
this.$refs['codeForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let SavePutInfoDto = {}
|
let SavePutInfoDto = {}
|
||||||
console.log('🚀 ~ this.codeForm:', this.codeForm);
|
// console.log('🚀 ~ this.codeForm:', this.codeForm);
|
||||||
console.log('🚀 ~ this.codeTableList:', this.codeTableList);
|
// console.log('🚀 ~ this.numTableList:', this.numTableList);
|
||||||
console.log('🚀 ~ this.numTableList:', this.numTableList);
|
// console.log('🚀 ~ this.codeTableList:', this.codeTableList);
|
||||||
if (this.isNumCheck) {
|
if (this.isNumCheck) {
|
||||||
// 提交数据
|
// 提交数据
|
||||||
SavePutInfoDto = {
|
SavePutInfoDto = {
|
||||||
|
|
@ -844,6 +849,19 @@ export default {
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
// 统一处理时间格式为 yyyy-MM-dd
|
||||||
|
this.codeTableList.forEach(item => {
|
||||||
|
if (item.thisCheckTime) {
|
||||||
|
item.thisCheckTime = new Date(item.thisCheckTime).toLocaleDateString('zh-CN', {year: 'numeric', month: '2-digit', day: '2-digit'}).replace(/\//g, '-')
|
||||||
|
} else {
|
||||||
|
item.thisCheckTime = ''
|
||||||
|
}
|
||||||
|
if (item.nextCheckTime) {
|
||||||
|
item.nextCheckTime = new Date(item.nextCheckTime).toLocaleDateString('zh-CN', {year: 'numeric', month: '2-digit', day: '2-digit'}).replace(/\//g, '-')
|
||||||
|
} else {
|
||||||
|
item.nextCheckTime = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
// 提交数据
|
// 提交数据
|
||||||
SavePutInfoDto = {
|
SavePutInfoDto = {
|
||||||
isCode: true, // 是否编码盘点
|
isCode: true, // 是否编码盘点
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue