add:仓位页面新增 巷道管理
This commit is contained in:
@@ -94,4 +94,11 @@ public class StructattrController {
|
||||
public ResponseEntity<Object> unLockPoint(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(structattrService.unLockPoint(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/tunConfirm")
|
||||
@Log("二期禁用巷道")
|
||||
public ResponseEntity<Object> tunConfirm(@RequestBody JSONObject json) {
|
||||
structattrService.tunConfirm(json);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,4 +98,13 @@ public interface StructattrService {
|
||||
* @return
|
||||
*/
|
||||
JSONObject unLockPoint(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 二期禁用巷道
|
||||
* @param json :{
|
||||
* block_num: 巷道
|
||||
* is_used: 0-禁用,1-启用
|
||||
* }
|
||||
*/
|
||||
void tunConfirm(JSONObject json);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.common.utils.MapOf;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
@@ -513,4 +514,17 @@ public class StructattrServiceImpl implements StructattrService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void tunConfirm(JSONObject json) {
|
||||
WQLObject tab = WQLObject.getWQLObject("st_ivt_structattr");
|
||||
|
||||
// 将这一巷道的所有仓位都禁用
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("is_used", json.getString("is_used"));
|
||||
|
||||
tab.update(param,"sect_id = '"+IOSEnum.SECT_ID.code("二期主存区")+"' AND block_num = '"+json.getString("block_num")+"' AND is_delete = '0'");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,67 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
v-if="query.stor_id === '1582991156504039455'"
|
||||
@click="closeTun"
|
||||
>
|
||||
巷道管理
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible2"
|
||||
:show-close="true"
|
||||
width="550px"
|
||||
@close="close"
|
||||
>
|
||||
<el-form ref="form2" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="巷道选择:">
|
||||
<el-select
|
||||
v-model="formMst.block_num"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tunlist"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16" style="border: 1px solid white">
|
||||
<span/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="tunClose">禁用</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="tunOpen">启用</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -362,6 +422,16 @@ export default {
|
||||
sects: [],
|
||||
invtypelist: [],
|
||||
permission: {},
|
||||
dialogVisible2: false,
|
||||
formMst: {},
|
||||
tunlist: [
|
||||
{ 'label': '1巷道', 'value': '1' },
|
||||
{ 'label': '2巷道', 'value': '2' },
|
||||
{ 'label': '3巷道', 'value': '3' },
|
||||
{ 'label': '4巷道', 'value': '4' },
|
||||
{ 'label': '5巷道', 'value': '5' },
|
||||
{ 'label': '6巷道', 'value': '6' }
|
||||
],
|
||||
rules: {
|
||||
struct_id: [
|
||||
{ required: true, message: '仓位标识不能为空', trigger: 'blur' }
|
||||
@@ -470,6 +540,33 @@ export default {
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
closeTun() {
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
tunOpen() {
|
||||
if (!this.formMst.block_num) {
|
||||
this.crud.notify('请选择巷道!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.formMst.is_used = '1'
|
||||
crudStructattr.tunConfirm(this.formMst).then(res => {
|
||||
this.$refs['form2'].resetFields()
|
||||
this.dialogVisible2 = false
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
tunClose() {
|
||||
if (!this.formMst.block_num) {
|
||||
this.crud.notify('请选择巷道!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.formMst.is_used = '0'
|
||||
crudStructattr.tunConfirm(this.formMst).then(res => {
|
||||
this.$refs['form2'].resetFields()
|
||||
this.dialogVisible2 = false
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,4 +32,12 @@ export function changeActive(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive }
|
||||
export function tunConfirm(data) {
|
||||
return request({
|
||||
url: 'api/structattr/tunConfirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, tunConfirm }
|
||||
|
||||
Reference in New Issue
Block a user