新购流程修改
This commit is contained in:
parent
c47cfa28d6
commit
75895eaa56
|
|
@ -29,6 +29,10 @@ public class PurchaseMacodeInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "任务ID")
|
||||
private Long taskId;
|
||||
|
||||
/** 任务状态 */
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private String taskStatus;
|
||||
|
||||
/** 类型ID */
|
||||
@ApiModelProperty(value = "类型ID")
|
||||
private Long typeId;
|
||||
|
|
@ -147,6 +151,14 @@ public class PurchaseMacodeInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "0,正常 1, 重复数据")
|
||||
private int statusFlag;
|
||||
|
||||
public String getTaskStatus() {
|
||||
return taskStatus;
|
||||
}
|
||||
|
||||
public void setTaskStatus(String taskStatus) {
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -375,6 +375,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pmi.fix_code fixCode,
|
||||
pcd.type_id typeId,
|
||||
pcd.task_id taskId,
|
||||
tt.task_status taskStatus,
|
||||
mt.code specsCode,
|
||||
mt1.code typeCode,
|
||||
CASE
|
||||
|
|
@ -393,6 +394,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
if(pmi.ma_code is not null, 1, pcd.check_num) checkNum
|
||||
from purchase_check_details pcd
|
||||
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
|
||||
LEFT JOIN tm_task tt on tt.task_id=pcd.task_id
|
||||
left join ma_machine mm on pmi.ma_code = mm.ma_code
|
||||
left join ma_type mt on pcd.type_id = mt.type_id
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
|
|
|
|||
|
|
@ -353,48 +353,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
<select id="selectPutinDetails" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
|
||||
SELECT
|
||||
pcd.production_time productionTime,
|
||||
mt.type_name specificationType,
|
||||
mt1.type_name typeName,
|
||||
mt.manage_type AS manageType,
|
||||
pmi.ma_code maCode,
|
||||
mm.assets_code assetsCode,
|
||||
pmi.fix_code fixCode,
|
||||
pcd.type_id typeId,
|
||||
pcd.task_id taskId,
|
||||
mt.CODE specsCode,
|
||||
mt1.CODE typeCode,
|
||||
CASE
|
||||
WHEN pmi.ma_code IS NULL THEN
|
||||
CASE
|
||||
pcd.production_time productionTime,
|
||||
mt.type_name specificationType,
|
||||
mt1.type_name typeName,
|
||||
mt.manage_type AS manageType,
|
||||
pmi.ma_code maCode,
|
||||
mm.assets_code assetsCode,
|
||||
pmi.fix_code fixCode,
|
||||
pcd.type_id typeId,
|
||||
pcd.task_id taskId,
|
||||
mt.CODE specsCode,
|
||||
mt1.CODE typeCode,
|
||||
GROUP_CONCAT( mtk.user_id ) AS userIds,
|
||||
CASE
|
||||
WHEN pmi.ma_code IS NULL THEN
|
||||
CASE
|
||||
|
||||
WHEN pcd.STATUS = 4 THEN
|
||||
1
|
||||
WHEN pcd.STATUS = 5 THEN
|
||||
2 ELSE 0
|
||||
END ELSE pmi.STATUS
|
||||
END AS STATUS,
|
||||
mm.qr_code qrCode,
|
||||
mm.ma_id maId,
|
||||
IF( pmi.ma_code IS NOT NULL, 1, pcd.check_num ) checkNum
|
||||
WHEN pcd.STATUS = 4 THEN
|
||||
1
|
||||
WHEN pcd.STATUS = 5 THEN
|
||||
2 ELSE 0
|
||||
END ELSE pmi.STATUS
|
||||
END AS STATUS,
|
||||
mm.qr_code qrCode,
|
||||
mm.ma_id maId,
|
||||
IF( pmi.ma_code IS NOT NULL, 1, pcd.check_num ) checkNum
|
||||
FROM
|
||||
purchase_check_details pcd
|
||||
LEFT JOIN purchase_macode_info pmi ON pmi.task_id = pcd.task_id
|
||||
AND pmi.type_id = pcd.type_id
|
||||
LEFT JOIN ma_machine mm ON pmi.ma_code = mm.ma_code
|
||||
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||
purchase_check_details pcd
|
||||
LEFT JOIN purchase_macode_info pmi ON pmi.task_id = pcd.task_id
|
||||
AND pmi.type_id = pcd.type_id
|
||||
LEFT JOIN ma_machine mm ON pmi.ma_code = mm.ma_code
|
||||
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||
LEFT JOIN ma_type_keeper mtk ON mtk.type_id = pcd.type_id
|
||||
WHERE
|
||||
pcd.task_id = #{taskId}
|
||||
AND pcd.`status` != 3
|
||||
AND pcd.`status` != 7
|
||||
pcd.task_id = #{taskId}
|
||||
AND pcd.`status` != 3
|
||||
AND pcd.`status` != 7
|
||||
<if test="dictName != null and dictName != ''">
|
||||
and (mt.type_name like concat('%',#{dictName},'%') or
|
||||
mt1.type_name like concat('%',#{dictName},'%'))
|
||||
</if>
|
||||
GROUP BY
|
||||
pcd.type_id
|
||||
ORDER BY
|
||||
STATUS,
|
||||
pmi.id
|
||||
STATUS,
|
||||
pmi.id
|
||||
</select>
|
||||
<select id="selectMaCode" resultType="java.lang.Integer">
|
||||
select count(ma_id) from ma_machine where ma_code = #{maCode}
|
||||
|
|
@ -447,7 +451,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||
WHERE
|
||||
pcd.task_id = #{taskId}
|
||||
AND pcd.`status` != 3
|
||||
AND pcd.`status` != '3' and pcd.`status`!='7'
|
||||
<if test="dictName != null and dictName != ''">
|
||||
and (mt.type_name like concat('%',#{dictName},'%') or
|
||||
mt1.type_name like concat('%',#{dictName},'%'))
|
||||
|
|
@ -456,8 +460,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
STATUS
|
||||
) aa
|
||||
WHERE
|
||||
`status` != 0
|
||||
AND `status` !=2
|
||||
`status` ='1'
|
||||
</select>
|
||||
<select id="selectPutinDetailsAddTypeId" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
|
||||
select pcd.production_time productionTime,
|
||||
|
|
@ -496,29 +499,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by status
|
||||
</select>
|
||||
<select id="isOperateAll" resultType="java.lang.Integer">
|
||||
SELECT count(*)
|
||||
FROM (SELECT CASE
|
||||
|
||||
WHEN
|
||||
pmi.ma_code IS NOT NULL THEN
|
||||
CASE
|
||||
|
||||
WHEN pmi.STATUS = 0 THEN
|
||||
1
|
||||
WHEN pmi.STATUS = 1 THEN
|
||||
4
|
||||
WHEN pmi.STATUS = 2 THEN
|
||||
5
|
||||
ELSE 1
|
||||
END
|
||||
ELSE pcd.STATUS
|
||||
END AS STATUS
|
||||
FROM purchase_check_details pcd
|
||||
LEFT JOIN purchase_macode_info pmi ON pmi.task_id = pcd.task_id
|
||||
AND pmi.type_id = pcd.type_id
|
||||
LEFT JOIN ma_machine mm ON pmi.ma_code = mm.ma_code
|
||||
WHERE pcd.task_id = #{taskId}) aa
|
||||
WHERE (STATUS = 1 OR STATUS = 6)
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
purchase_check_details
|
||||
WHERE
|
||||
`status` = '6'
|
||||
and task_id=#{taskId}
|
||||
</select>
|
||||
<select id="selectPurchaseCheckDetailsStatus" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
|
|
@ -551,6 +538,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectKeepUser" resultType="java.lang.String">
|
||||
SELECT user_id FROM ma_type_keeper WHERE type_id = #{typeId}
|
||||
</select>
|
||||
<select id="isOperateAllPurchaseMacodeInfo" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
purchase_macode_info
|
||||
WHERE
|
||||
task_id = #{taskId}
|
||||
AND type_id = #{typeId}
|
||||
AND `status` = '3'
|
||||
</select>
|
||||
<select id="selectPassAndNoPassNum" resultType="com.bonus.sgzb.material.domain.PurchaseCheckInfo">
|
||||
SELECT
|
||||
COUNT(pmi.id) as passNum,
|
||||
COUNT(pmi2.id) as noPassNum
|
||||
FROM
|
||||
purchase_macode_info pmi
|
||||
LEFT JOIN purchase_macode_info pmi2 on pmi.task_id=pmi2.task_id and pmi.type_id=pmi2.type_id and pmi2.`status`='2'
|
||||
WHERE
|
||||
pmi.task_id = #{taskId}
|
||||
and pmi.type_id = #{typeId}
|
||||
and pmi.`status`='1'
|
||||
</select>
|
||||
<select id="isOperateAllPass" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
purchase_macode_info
|
||||
WHERE
|
||||
task_id = #{taskId}
|
||||
AND `status` = '2'
|
||||
</select>
|
||||
|
||||
<update id="updateTypeByTypeId">
|
||||
update ma_type set num = #{num} where type_id = #{typeId}
|
||||
|
|
|
|||
|
|
@ -245,53 +245,38 @@
|
|||
@click="handleDialogQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8" v-if="showHandle">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="passAll"
|
||||
>批量通过</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
size="mini"
|
||||
@click="refusedAll"
|
||||
:disabled="multiple"
|
||||
>批量不通过</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="warning"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-download"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleExport"-->
|
||||
<!-- v-hasPermi="['system:dict:export']"-->
|
||||
<!-- >导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8" v-if="showBatchButtons">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="passAll"
|
||||
>通过</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
size="mini"
|
||||
@click="refusedAll"
|
||||
>不通过</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="detailTableList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="400"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
:selectable="selectable"
|
||||
/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- type="selection"-->
|
||||
<!-- width="55"-->
|
||||
<!-- align="center"-->
|
||||
<!-- :selectable="selectable"-->
|
||||
<!-- />-->
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
|
|
@ -346,37 +331,30 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
v-if="showHandle"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == '0'"
|
||||
@click="pass(scope.row)"
|
||||
>通过</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == '0'"
|
||||
@click="refused(scope.row)"
|
||||
>不通过</el-button
|
||||
>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['system:dict:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="操作"-->
|
||||
<!-- align="center"-->
|
||||
<!-- class-name="small-padding fixed-width"-->
|
||||
<!-- v-if="showHandle"-->
|
||||
<!-- width="150"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- v-if="scope.row.status == '0'"-->
|
||||
<!-- @click="pass(scope.row)"-->
|
||||
<!-- >通过</el-button-->
|
||||
<!-- >-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- v-if="scope.row.status == '0'"-->
|
||||
<!-- @click="refused(scope.row)"-->
|
||||
<!-- >不通过</el-button-->
|
||||
<!-- >-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
|
@ -593,6 +571,7 @@ export default {
|
|||
printData: {},
|
||||
printTableData: [],
|
||||
showHandle: true,
|
||||
showBatchButtons: true,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 查询参数
|
||||
|
|
@ -629,7 +608,13 @@ export default {
|
|||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
// 监听数据的变化,当 taskStatus 符合条件时显示批量按钮
|
||||
this.$watch('detailTableList', () => {
|
||||
this.showBatchButtons = this.detailTableList.some(item => item.taskStatus === '122');
|
||||
}, { deep: true });
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getTypeList()
|
||||
},
|
||||
|
|
@ -668,6 +653,7 @@ export default {
|
|||
this.detailTableList = response.rows
|
||||
this.dialogTotal = response.total
|
||||
this.loading = false
|
||||
this.ids = response.rows.map((item) => item)
|
||||
})
|
||||
},
|
||||
|
||||
|
|
@ -713,10 +699,12 @@ export default {
|
|||
}
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
handleSelectionChange() {
|
||||
console.log(this.ids)
|
||||
this.ids = this.detailTableList.map((item) => item) // 假设数据的唯一标识为 id
|
||||
console.log(this.ids)
|
||||
// this.single = selection.length != 1
|
||||
// this.multiple = !selection.length
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@
|
|||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="primary"
|
||||
type="success"
|
||||
v-if="scope.row.taskStatus == '28'"
|
||||
>已全部入库</el-tag
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue