领料模块新增单位类型字段-退料模块相关优化

This commit is contained in:
76164 2024-07-29 17:12:07 +08:00
parent 5eed3fb545
commit c979a28e26
9 changed files with 93 additions and 13 deletions

View File

@ -538,6 +538,7 @@ public class TmTaskServiceImpl implements TmTaskService {
List<TmTask> tmTaskList;
if (roles.contains(STRING_ADMIN)) {
tmTaskList = tmTaskMapper.getAuditListByLeaseTmTask(record);
// System.out.println(record.getTypeId());
} else if (deptId != null) {
record.setCompanyId(deptId.intValue());
tmTaskList = tmTaskMapper.getAuditListByLeaseTmTaskByPeople(record);
@ -1572,4 +1573,4 @@ public class TmTaskServiceImpl implements TmTaskService {
public LeaseApplyInfo getListSomeol(LeaseApplyInfo info) {
return tmTaskMapper.getListSomeol(info);
}
}
}

View File

@ -24,7 +24,7 @@ public class BmUnitInfo {
/**单位类型*/
@ApiModelProperty(value = "类型ID")
private long typeId;
private String typeId;
/**联系人*/
@Excel(name = "联系人")
@ApiModelProperty(value = "联系人")
@ -108,11 +108,11 @@ public class BmUnitInfo {
}
public long getTypeId() {
public String getTypeId() {
return typeId;
}
public void setTypeId(long typeId) {
public void setTypeId(String typeId) {
this.typeId = typeId;
}

View File

@ -47,6 +47,11 @@ public class BmUnitInfoServiceImpl implements BmUnitInfoService {
@Override
public AjaxResult unitInfoAdd(BmUnitInfo bmUnitInfo) {
BmUnitInfo info = bmUnitInfoMapper.selectByName(bmUnitInfo.getUnitName());
// if (bmUnitInfo.getTypeId().equals("0")){
// bmUnitInfo.setTypeId("内部单位");
// }else {
// bmUnitInfo.setTypeId("外部单位");
// }
if (StringUtils.isNotNull(info)) {
return AjaxResult.error("新增往来单位名称重复,请重新提交!!!");
}

View File

@ -480,6 +480,7 @@
<select id="getAuditListByLeaseTmTask" resultType="com.bonus.sgzb.app.domain.TmTask">
SELECT DISTINCT
bui.type_id,
tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,su.nick_name as nickName,
bpl.lot_id as proId,bpl.lot_name as proName,
bui.unit_id as unitId,bui.unit_name as unitName,
@ -536,6 +537,7 @@
<select id="getAuditManageListByLeaseTmTask" resultType="com.bonus.sgzb.app.domain.TmTask">
SELECT DISTINCT
bui.type_id,
tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,
bpl.lot_id as proId,bpl.lot_name as proName,
bui.unit_id as unitId,bui.unit_name as unitName,
@ -945,6 +947,7 @@
</select>
<select id="getAuditListByLeaseTmTaskByPeople" resultType="com.bonus.sgzb.app.domain.TmTask">
SELECT DISTINCT
bui.type_id,
tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,su.nick_name as nickName,su.user_id as userId,
bpl.lot_id as proId,bpl.lot_name as proName,
bui.unit_id as unitId,bui.unit_name as unitName,

View File

@ -102,7 +102,7 @@
<el-table-column
label="单位类型"
align="center"
prop="typeName"
prop="typeId"
:show-overflow-tooltip="true"
/>
<el-table-column
@ -190,8 +190,11 @@
/>
</el-form-item>
<el-form-item label="单位类型" prop="typeId">
<!-- <el-input v-model="form.typeId " placeholder="请选择单位类型" /> -->
<el-select
<el-radio-group v-model="form.typeId">
<el-radio :label="0">内部单位</el-radio>
<el-radio :label="1">外部单位</el-radio>
</el-radio-group>
<!-- <el-select
v-model="form.typeId"
placeholder="请选择单位类型"
style="width: 100%"
@ -205,7 +208,7 @@
:value="item.id"
v-show="item.status != '1'"
></el-option>
</el-select>
</el-select>-->
</el-form-item>
<el-form-item label="所属上级" prop="deptId">
<treeselect
@ -371,6 +374,17 @@ export default {
getList() {
this.loading = true
unitInfoAll(this.queryParams).then((response) => {
console.log(response)
response.rows.forEach(item => {
switch (item.typeId) {
case '0':
item.typeId = '内部单位';
break;
case '1':
item.typeId = '外部单位';
break;
}
})
this.unitList = response.rows
this.total = response.total
this.loading = false
@ -386,6 +400,7 @@ export default {
this.form = {
unitId: undefined,
unitName: undefined,
typeId: undefined,
dictType: undefined,
status: '0',
remark: undefined,
@ -434,7 +449,8 @@ export default {
if (valid) {
this.isLoading = true
if (this.form.unitId != undefined) {
updateUnit(this.form)
console.log(this.form)
/*updateUnit(this.form)
.then((response) => {
this.$modal.msgSuccess('修改成功')
this.open = false
@ -443,8 +459,9 @@ export default {
})
.catch(() => {
this.isLoading = false
})
})*/
} else {
console.log(this.form)
addUnit(this.form)
.then((response) => {
this.$modal.msgSuccess('新增成功')

View File

@ -171,6 +171,12 @@
prop="unitName"
show-overflow-tooltip
/>
<el-table-column
label="单位类型"
align="center"
prop="typeId"
show-overflow-tooltip
/>
<el-table-column
label="领料工程"
align="center"
@ -430,6 +436,16 @@ export default {
}
const res = await getLeaseAuditListAll(params)
res.data.rows.forEach(item => {
switch (item.typeId) {
case '0':
item.typeId = '内部单位';
break;
case '1':
item.typeId = '外部单位';
break;
}
})
this.loading = false
this.leaseAuditList = res.data.rows
this.total = res.data.total

View File

@ -166,6 +166,12 @@
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位类型"
align="center"
prop="typeId"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料工程"
align="center"
@ -619,6 +625,16 @@ export default {
const res = await getLeaseManageListAll(params)
this.loading = false
console.log('getList ============', res, '列表查询')
res.data.rows.forEach(item => {
switch (item.typeId) {
case '0':
item.typeId = '内部单位';
break;
case '1':
item.typeId = '外部单位';
break;
}
})
this.leaseAuditList = res.data.rows
// this.leaseAuditList.forEach((item,index)=>{
// console.log(item.leaseApplyInfoList)

View File

@ -171,7 +171,7 @@
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<!-- <template slot-scope="scope">
<span>
{{
(scope.row.partNum =
@ -181,6 +181,17 @@
: scope.row.partNum)
}}
</span>
</template>-->
<template slot-scope="scope">
<el-input
v-model.number="scope.row.num"
placeholder="请输入待退料数量"
type="number"
min="1"
clearable
@input="checkNum(scope.row)"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column
@ -1467,6 +1478,18 @@ export default {
this.selChangeList = list
console.log(list, '复选框选中的数据!')
},
// 退
checkNum(row) {
// console.log(row)
let maxNum = row.preNum
if (row.num <= 1) {
row.num = 1
} else if (row.num >= maxNum) {
row.num = maxNum
}
},
},
watch: {
innerVisible: {

View File

@ -225,7 +225,6 @@
icon="el-icon-d-arrow-right"
v-hasPermi="['return:receive:handler']"
v-if="
scope.row.taskStatus == 38 ||
scope.row.taskStatus == 39
"
>
@ -260,7 +259,7 @@
></dialogForm>
</div>
</template>
<script>
import {
getBackAuditList,