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

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

View File

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

View File

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

View File

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

View File

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

View File

@ -171,6 +171,12 @@
prop="unitName" prop="unitName"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column
label="单位类型"
align="center"
prop="typeId"
show-overflow-tooltip
/>
<el-table-column <el-table-column
label="领料工程" label="领料工程"
align="center" align="center"
@ -430,6 +436,16 @@ export default {
} }
const res = await getLeaseAuditListAll(params) 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.loading = false
this.leaseAuditList = res.data.rows this.leaseAuditList = res.data.rows
this.total = res.data.total this.total = res.data.total

View File

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

View File

@ -171,7 +171,7 @@
align="center" align="center"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<span> <span>
{{ {{
(scope.row.partNum = (scope.row.partNum =
@ -181,6 +181,17 @@
: scope.row.partNum) : scope.row.partNum)
}} }}
</span> </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> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -1467,6 +1478,18 @@ export default {
this.selChangeList = list this.selChangeList = list
console.log(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: { watch: {
innerVisible: { innerVisible: {

View File

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