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