opt:提交修改bom木箱类型功能
This commit is contained in:
@@ -80,5 +80,11 @@ public class BstIvtStockingivtController {
|
||||
return new ResponseEntity<>(bstIvtStockingivtService.showDetail2(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("查询bom记录")
|
||||
@GetMapping("/showBom2")
|
||||
public ResponseEntity<Object> showBom2(@RequestParam Map param) {
|
||||
return new ResponseEntity<>(bstIvtStockingivtService.showBom2(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.MdPbPapervehicle;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dto.ShowStockVo;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.BhTubeMovePointDto;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.BhTubePointDto;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
@@ -103,4 +104,6 @@ public interface IBstIvtStockingivtService extends IService<BstIvtStockingivt> {
|
||||
List<List<ShowStockVo>> showDetail(JSONObject param);
|
||||
|
||||
List<MdPbPapervehicle> showDetail2(Map param);
|
||||
|
||||
PdmBiOrderbominfo showBom2(Map param);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ import org.nl.b_lms.bst.ivt.stockingivt.service.IBstIvtStockingivtService;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.mapper.BstIvtStockingivtMapper;
|
||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dto.ShowStockVo;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiOrderbominfoService;
|
||||
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterConstant;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.BhTubeMovePointDto;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.BhTubePointDto;
|
||||
@@ -52,6 +54,8 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
|
||||
private WmsToAcsService wmsToAcsService;
|
||||
@Autowired
|
||||
private MaterialbaseService materialbaseService;
|
||||
@Autowired
|
||||
private IPdmBiOrderbominfoService pdmBiOrderbominfoService;
|
||||
|
||||
@Override
|
||||
public IPage<BstIvtStockingivt> queryAll(Map whereJson, PageQuery page) {
|
||||
@@ -351,4 +355,12 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
|
||||
.orderByAsc(MdPbPapervehicle::getRow_num));
|
||||
return papers;
|
||||
}
|
||||
@Override
|
||||
public PdmBiOrderbominfo showBom2(Map param){
|
||||
String mfg_order_name = String.valueOf(param.get("mfg_order_name"));
|
||||
LambdaQueryWrapper<PdmBiOrderbominfo> lam = new LambdaQueryWrapper<>();
|
||||
lam.eq(PdmBiOrderbominfo::getMfgOrder,mfg_order_name);
|
||||
PdmBiOrderbominfo order = pdmBiOrderbominfoService.getOne(lam);
|
||||
return order;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,4 +67,18 @@ public class MdpbBoxtypeController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/confirmBox")
|
||||
@Log("保存bom")
|
||||
public ResponseEntity<Object> confirmBox(@RequestBody JSONObject whereJson) {
|
||||
iMdpbBoxtypeService.confirmBox(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getBoxTypes")
|
||||
@Log("查询木箱类型")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson) {
|
||||
return new ResponseEntity<>(iMdpbBoxtypeService.list(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,4 +50,10 @@ public interface IMdpbBoxtypeService extends IService<MdpbBoxtype> {
|
||||
* @param whereJson: {需要修改的参数}
|
||||
*/
|
||||
void confirmUpdate(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 一键修改
|
||||
* @param whereJson: {需要修改的参数}
|
||||
*/
|
||||
void confirmBox(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -9,11 +9,14 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiOrderbominfoService;
|
||||
import org.nl.b_lms.storage_manage.database.service.IMdpbBoxtypeService;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.MdpbBoxtype;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.mapper.MdpbBoxtypeMapper;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -31,6 +34,8 @@ import java.util.Set;
|
||||
@Service
|
||||
public class MdpbBoxtypeServiceImpl extends ServiceImpl<MdpbBoxtypeMapper, MdpbBoxtype> implements IMdpbBoxtypeService {
|
||||
|
||||
@Autowired
|
||||
private IPdmBiOrderbominfoService pdmBiOrderbominfoService;
|
||||
@Override
|
||||
public IPage<MdpbBoxtype> queryAll(Map whereJson, PageQuery page) {
|
||||
// 查询条件
|
||||
@@ -81,4 +86,23 @@ public class MdpbBoxtypeServiceImpl extends ServiceImpl<MdpbBoxtypeMapper, MdpbB
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void confirmBox(JSONObject whereJson) {
|
||||
if (ObjectUtil.isEmpty(whereJson.getString("mfgOrder"))) {
|
||||
throw new BadRequestException("bom 订单号不能为空!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(whereJson.getString("productName"))) {
|
||||
throw new BadRequestException("bom 木箱编码不能为空!");
|
||||
}
|
||||
MdpbBoxtype boxtype = this.getById(whereJson.getString("productName"));
|
||||
if (ObjectUtil.isEmpty(boxtype)) {
|
||||
throw new BadRequestException("木箱编码:"+whereJson.getString("productName")+"查询木箱类型失败!");
|
||||
}
|
||||
pdmBiOrderbominfoService.update(new UpdateWrapper<PdmBiOrderbominfo>().lambda()
|
||||
.eq(PdmBiOrderbominfo::getMfgOrder,whereJson.getString("mfgOrder"))
|
||||
.set(PdmBiOrderbominfo::getProductName, whereJson.getString("productName"))
|
||||
.set(PdmBiOrderbominfo::getDescription, boxtype.getBox_name())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,5 +39,12 @@ export function showDetail2(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
export function showBom2(params) {
|
||||
return request({
|
||||
url: 'api/bstIvtStockingivt/showBom2',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, showDetail, showDetail2 }
|
||||
export default { add, edit, del, showDetail, showDetail2, showBom2 }
|
||||
|
||||
@@ -31,5 +31,18 @@ export function confirmUpdate(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, confirmUpdate }
|
||||
export function getBoxTypes(params) {
|
||||
return request({
|
||||
url: 'api/boxtype/getBoxTypes',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function confirmBox(data) {
|
||||
return request({
|
||||
url: 'api/boxtype/confirmBox',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, confirmUpdate, getBoxTypes, confirmBox }
|
||||
|
||||
@@ -488,7 +488,11 @@
|
||||
<el-table-column v-if="false" prop="workorder_id" label="分切计划标识" />
|
||||
<el-table-column prop="status" label="状态" :formatter="formatStatusName" />
|
||||
<el-table-column prop="order_type" label="订单类型" :formatter="formatTypeName" />
|
||||
<el-table-column prop="mfg_order_name" label="订单号" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="mfg_order_name" label="订单号" min-width="200" >
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" @click="toView2(scope.$index, scope.row)">{{ scope.row.mfg_order_name }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="container_name" label="子卷号" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="parent_container_name" label="母卷号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="ware_house" label="来源位置" :formatter="formatHouseName" width="120px" />
|
||||
@@ -557,6 +561,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<tube-dialog2 :dialog-show.sync="showView2" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -565,8 +570,8 @@ import crudSlittingproductionplan from '@/views/wms/pdm/order/slittingplan/slitt
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import TubeDialog2 from '@/views/wms/pdm/order/slittingplan/tubeDialog2.vue'
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
@@ -619,7 +624,7 @@ const defaultForm = {
|
||||
export default {
|
||||
name: 'Slittingproductionplan',
|
||||
dicts: ['product_area', 'order_type', 'cut_product_status', 'ware_house', 'paper_tube_or_frp', 'IS_OR_NOT'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation, TubeDialog2 },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -640,6 +645,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
showView2: false,
|
||||
mstrow: {},
|
||||
rules: {
|
||||
order_type: [
|
||||
{ required: true, message: '分切订单类型不能为空', trigger: 'blur' }
|
||||
@@ -679,6 +686,14 @@ export default {
|
||||
hand() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
toView2(index, row) {
|
||||
this.showView2 = true
|
||||
this.mstrow = row
|
||||
},
|
||||
querytable() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
upMaterFinish() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = {
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
title="订单BOM信息"
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="600px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="100px" label-suffix=":">
|
||||
<el-form-item label="id" prop="id">
|
||||
<label slot="label">id:</label>
|
||||
<el-input v-model="form.id" disabled placeholder="系统生成" clearable style="width: 300px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工单号" prop="mfgOrder">
|
||||
<label slot="label">工单号:</label>
|
||||
<el-input v-model="form.mfgOrder" disabled clearable style="width: 300px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="木箱编码" prop="productName">
|
||||
<label slot="label">木箱编码:</label>
|
||||
<el-input v-model="form.productName" disabled clearable style="width: 300px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="木箱描述" prop="description">
|
||||
<el-select
|
||||
v-model="form.description"
|
||||
placeholder="木箱描述"
|
||||
style="width: 400px"
|
||||
class="filter-item"
|
||||
clearable
|
||||
filterable
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typelist"
|
||||
:key="item.box_type"
|
||||
:label="item.box_name"
|
||||
:value="item.box_type"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="管芯编码" prop="carrierName">
|
||||
<label slot="label">管芯编码:</label>
|
||||
<el-input v-model="form.carrierName" disabled clearable style="width: 300px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="管芯描述" prop="carrierDescription">
|
||||
<label slot="label">管芯描述:</label>
|
||||
<el-input v-model="form.carrierDescription" disabled clearable style="width: 300px" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="close">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">保 存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBstIvtStockingivt from '@/views/b_lms/bst/ivt/stockingivt/bstIvtStockingivt'
|
||||
import crudBoxtype from '@/views/wms/basedata/st/boxType/boxtype'
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
|
||||
export default {
|
||||
name: 'TubeDialog2',
|
||||
components: {},
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
typelist: [],
|
||||
form: {},
|
||||
row: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.row = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.queryTableDtl()
|
||||
this.getBoxTypes()
|
||||
},
|
||||
hand(value) {
|
||||
this.form.productName = value
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.form = {}
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
getBoxTypes() {
|
||||
crudBoxtype.getBoxTypes().then(res => {
|
||||
this.typelist = res
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
crudBoxtype.confirmBox(this.form).then(res => {
|
||||
this.typelist = res
|
||||
this.crud.notify('保存成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
})
|
||||
},
|
||||
queryTableDtl() {
|
||||
crudBstIvtStockingivt.showBom2({ 'mfg_order_name': this.row.mfg_order_name }).then(res => {
|
||||
this.form = res
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
Reference in New Issue
Block a user