rev:仓储基础管理维护
This commit is contained in:
@@ -29,7 +29,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "仓库管理")
|
||||
@RequestMapping("/api/Storattr")
|
||||
@RequestMapping("/api/stIvtBsrealstorattr")
|
||||
@Slf4j
|
||||
public class StorattrController {
|
||||
|
||||
|
||||
@@ -92,21 +92,21 @@ public class StIvtBsrealstorattrServiceImpl extends ServiceImpl<StIvtBsrealstora
|
||||
Assert.notNull(new Object[]{form,form.get("is_used"),form.get("stor_id")},"参数不能为空");
|
||||
|
||||
this.update(new UpdateWrapper<StIvtBsrealstorattr>()
|
||||
.set("is_used",form.getString("is_used"))
|
||||
.set("is_used",form.getBoolean("is_used"))
|
||||
.set("update_id",SecurityUtils.getCurrentUserId())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.set("update_time",new Date())
|
||||
.eq("stor_id",form.getString("stor_id")));
|
||||
|
||||
sectattrService.update(new UpdateWrapper<StIvtSectattr>()
|
||||
.set("is_used",form.getString("is_used"))
|
||||
.set("is_used",form.getBoolean("is_used"))
|
||||
.set("update_id",SecurityUtils.getCurrentUserId())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.set("update_time",new Date())
|
||||
.eq("stor_id",form.getString("stor_id")));
|
||||
|
||||
structattrService.update(new UpdateWrapper<StIvtStructattr>()
|
||||
.set("is_used",form.getString("is_used"))
|
||||
.set("is_used",form.getBoolean("is_used"))
|
||||
.set("update_id",SecurityUtils.getCurrentUserId())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.set("update_time",new Date())
|
||||
|
||||
@@ -78,6 +78,7 @@ public class StIvtSectattrServiceImpl extends ServiceImpl<StIvtSectattrMapper, S
|
||||
sectattr.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
sectattr.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
sectattr.setUpdate_time(new Date());
|
||||
this.updateById(sectattr);
|
||||
return sect_id;
|
||||
}
|
||||
|
||||
@@ -92,14 +93,14 @@ public class StIvtSectattrServiceImpl extends ServiceImpl<StIvtSectattrMapper, S
|
||||
}
|
||||
|
||||
this.update(new UpdateWrapper<StIvtSectattr>()
|
||||
.set("is_used",form.getString("is_used"))
|
||||
.set("is_used",form.getBoolean("is_used"))
|
||||
.set("update_id",SecurityUtils.getCurrentUserId())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.set("update_time",new Date())
|
||||
.eq("sect_id",form.getString("sect_id")));
|
||||
|
||||
structattrService.update(new UpdateWrapper<StIvtStructattr>()
|
||||
.set("is_used",form.getString("is_used"))
|
||||
.set("is_used",form.getBoolean("is_used"))
|
||||
.set("update_id",SecurityUtils.getCurrentUserId())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.set("update_time",new Date())
|
||||
|
||||
@@ -90,7 +90,7 @@ public class StIvtStructattrServiceImpl extends ServiceImpl<StIvtStructattrMappe
|
||||
}
|
||||
|
||||
this.update(new UpdateWrapper<StIvtStructattr>()
|
||||
.set("is_used",form.getString("is_used"))
|
||||
.set("is_used",form.getBoolean("is_used"))
|
||||
.set("update_id",SecurityUtils.getCurrentUserId())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.set("update_time",new Date())
|
||||
|
||||
@@ -164,7 +164,7 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
||||
mst.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
mst.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
this.updateById(mst);
|
||||
//更新仓位
|
||||
//更新库存
|
||||
StIvtStructivtBcp struct = structivtBcpService.getOne(new QueryWrapper<StIvtStructivtBcp>().eq("struct_code", mst.getStruct_code()));
|
||||
//插入库存变动表
|
||||
structivtflowService.recordStructivtFlow(
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/stIvtStructattr',
|
||||
url: 'api/structattr',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/stIvtStructattr/',
|
||||
url: 'api/structattr/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function del(ids) {
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/stIvtStructattr',
|
||||
url: 'api/structattr',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
@@ -26,7 +26,7 @@ export function edit(data) {
|
||||
|
||||
export function changeActive(data) {
|
||||
return request({
|
||||
url: 'api/stIvtStructattr/stIvtStructattr',
|
||||
url: 'api/structattr/changeActive',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
@@ -34,7 +34,7 @@ export function changeActive(data) {
|
||||
|
||||
export function getSectCascader(data) {
|
||||
return request({
|
||||
url: '/api/stIvtStructattr/getSectCascader',
|
||||
url: '/api/structattr/getSectCascader',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
:value="format_is_used(scope.row.is_used)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeEnabled(scope.row, scope.row.is_used)"
|
||||
@change="changeEnabled(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -213,12 +213,12 @@ const defaultForm = {
|
||||
back_ground_pic: null,
|
||||
font_direction_scode: null,
|
||||
floor_no: null,
|
||||
is_used: '',
|
||||
is_used: true,
|
||||
ext_id: null
|
||||
}
|
||||
export default {
|
||||
name: 'Sectattr',
|
||||
dicts: ['st_sect_type', 'is_used'],
|
||||
dicts: ['st_sect_type'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -294,18 +294,20 @@ export default {
|
||||
},
|
||||
// 改变状态
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
return is_used === true
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
changeEnabled(data) {
|
||||
let msg = '此操作将停用,是否继续!'
|
||||
if (val !== '1') {
|
||||
if (data.is_used === false) {
|
||||
msg = '此操作将启用,是否继续!'
|
||||
}
|
||||
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
data.is_used = !data.is_used
|
||||
crudSectattr.changeActive(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
@@ -313,6 +315,7 @@ export default {
|
||||
data.is_used = !data.is_used
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
:value="format_is_used(scope.row.is_used)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeEnabled(scope.row, scope.row.is_used)"
|
||||
@change="changeEnabled(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -292,7 +292,7 @@ const defaultForm = {
|
||||
front_ground_color: null,
|
||||
back_ground_pic: null,
|
||||
font_direction_scode: null,
|
||||
is_used: null,
|
||||
is_used: true,
|
||||
is_zdepth: null,
|
||||
storagevehicle_id: null,
|
||||
storagevehicle_code: null,
|
||||
@@ -306,7 +306,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Structattr',
|
||||
dicts: ['ST_HEIGHT_TYPE', 'is_used', 'd_lock_type', 'SCH_TASK_TYPE_DTL'],
|
||||
dicts: ['ST_HEIGHT_TYPE', 'd_lock_type', 'SCH_TASK_TYPE_DTL'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -427,18 +427,20 @@ export default {
|
||||
},
|
||||
// 改变状态
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
return is_used === true
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
let msg = '此操作将停用,是否继续!'
|
||||
if (val !== '1') {
|
||||
msg = '此操作将启用,是否继续!'
|
||||
changeEnabled(data) {
|
||||
let msg = '此操作将停用,是否继续2!'
|
||||
if (data.is_used === false) {
|
||||
msg = '此操作将启用,是否继续2!'
|
||||
}
|
||||
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
data.is_used = !data.is_used
|
||||
crudStructattr.changeActive(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
|
||||
Reference in New Issue
Block a user