Merge remote-tracking branch 'remotes/origin/b_lms' into master_merge
# Conflicts: # lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/rest/StructattrController.java # lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/StructattrService.java # lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/StructattrServiceImpl.java # lms/nladmin-ui/src/views/wms/basedata/st/struct/index.vue # lms/nladmin-ui/src/views/wms/basedata/st/struct/structattr.js
This commit is contained in:
@@ -106,6 +106,13 @@ public class StructattrController {
|
||||
@Log("校验前缀是否可用")
|
||||
public ResponseEntity<Object> blurQuery(@RequestBody JSONObject whereJson) {
|
||||
structattrService.blurQuery(whereJson);
|
||||
return new ResponseEntity<>( HttpStatus.OK);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/tunConfirm")
|
||||
@Log("二期禁用巷道")
|
||||
public ResponseEntity<Object> tunConfirm(@RequestBody JSONObject json) {
|
||||
structattrService.tunConfirm(json);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,4 +117,13 @@ public interface StructattrService {
|
||||
* }
|
||||
*/
|
||||
void blurQuery(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;
|
||||
@@ -686,4 +687,16 @@ public class StructattrServiceImpl implements StructattrService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
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'");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -104,8 +104,67 @@
|
||||
>
|
||||
一键生成
|
||||
</el-button>
|
||||
<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
|
||||
:close-on-click-modal="false"
|
||||
@@ -420,6 +479,16 @@ export default {
|
||||
{ 'label': '空位', 'value': '1' },
|
||||
{ 'label': '有货', 'value': '2' }
|
||||
],
|
||||
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' }
|
||||
@@ -531,6 +600,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()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,14 @@ export function oneCreate(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function tunConfirm(data) {
|
||||
return request({
|
||||
url: 'api/structattr/tunConfirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function blurQuery(data) {
|
||||
return request({
|
||||
url: 'api/structattr/blurQuery',
|
||||
@@ -48,4 +56,4 @@ export function blurQuery(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, oneCreate, blurQuery }
|
||||
export default { add, edit, del, changeActive, oneCreate, blurQuery, tunConfirm }
|
||||
|
||||
Reference in New Issue
Block a user