Merge remote-tracking branch 'origin/dev-cq-bug' into dev
This commit is contained in:
commit
834faeee43
|
|
@ -42,4 +42,11 @@ public interface MaMachineMapper {
|
|||
SltAgreementApply getLeaseProject(MaMachine ma);
|
||||
|
||||
SltAgreementApply getBackProject(MaMachine ma);
|
||||
|
||||
/**
|
||||
* 根据typeId修改库存
|
||||
* @param typeId
|
||||
* @return
|
||||
*/
|
||||
int updateNum(long typeId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,17 @@ public class MaMachineServiceImpl implements MaMachineService {
|
|||
|
||||
@Override
|
||||
public int remove(Long[] maIds) {
|
||||
return maMachineMapper.remove(maIds);
|
||||
int res = 0;
|
||||
if (maIds != null || maIds.length > 0) {
|
||||
for (Long maId : maIds) {
|
||||
MaMachine maMachine = maMachineMapper.selectMaMachineByMaId(maId);
|
||||
if (maMachine.getTypeId() != 0 && ("15").equals(maMachine.getMaStatus())) {
|
||||
res = maMachineMapper.updateNum(maMachine.getTypeId());
|
||||
}
|
||||
}
|
||||
}
|
||||
res += maMachineMapper.remove(maIds);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -262,6 +262,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
where ma_id = #{maId}
|
||||
</update>
|
||||
<update id="updateNum">
|
||||
update ma_type set num = num - 1 where type_id = #{typeId}
|
||||
</update>
|
||||
|
||||
<delete id="remove" parameterType="Long">
|
||||
delete from ma_machine where ma_id in
|
||||
|
|
|
|||
|
|
@ -154,6 +154,14 @@ export function unitTypeList(query) {
|
|||
params: query
|
||||
})
|
||||
}
|
||||
// 单位类型-列表-下拉
|
||||
export function unitTypeListAll(query) {
|
||||
return request({
|
||||
url: '/base/dic/lists',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 标签编号-列表
|
||||
export function getMaMachineLabelApi(query) {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@
|
|||
|
||||
<script>
|
||||
import { addUnit, delUnit, unitInfoAll, updateUnit } from "@/api/base/base";
|
||||
import { unitTypeList } from "@/api/base/base";
|
||||
import { unitTypeListAll } from "@/api/base/base";
|
||||
import { deptTreeSelect } from "@/api/system/user";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
|
@ -287,7 +287,7 @@ export default {
|
|||
methods: {
|
||||
//获取单位类型
|
||||
getType() {
|
||||
unitTypeList({ id: "1" }).then(response => {
|
||||
unitTypeListAll({ id: "1" }).then(response => {
|
||||
this.typeList = response.rows;
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -325,8 +325,8 @@ export default {
|
|||
proList: [], //工程集合
|
||||
statusList: [
|
||||
{ id: '33', name: '待出库' },
|
||||
{ id: '34', name: '出库中' },
|
||||
{ id: '35', name: '已出库' },
|
||||
{ id: '34', name: '出库进行中' },
|
||||
{ id: '35', name: '完成' },
|
||||
], //工程集合
|
||||
//搜索下拉数据
|
||||
typeList: [],
|
||||
|
|
|
|||
|
|
@ -430,7 +430,8 @@ export default {
|
|||
this.handleQuery()
|
||||
},
|
||||
resetDialogQuery() {
|
||||
this.resetForm('dialogQuery')
|
||||
// this.resetForm('dialogQuery')
|
||||
this.dialogQuery.startTime = ''
|
||||
this.handleDialogQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
|
|
|
|||
|
|
@ -482,6 +482,7 @@ export default {
|
|||
],
|
||||
parentId: [{ required: true, message: '所属上级不能为空', trigger: 'blur' }],
|
||||
manageType: [{ required: true, message: '请选择管理模式', trigger: 'change' }],
|
||||
leasePrice:[{required: true, message: '内部租赁价格不能为空', trigger: 'blur' }]
|
||||
// password: [
|
||||
// {required: true, message: "用户密码不能为空", trigger: "blur"},
|
||||
// {min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur'}
|
||||
|
|
|
|||
Loading…
Reference in New Issue