修改自动开单(新料、改配)加库存等级查询、排序
This commit is contained in:
@@ -464,12 +464,17 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
String is_need_move = bomdlt.getString("is_need_move");
|
||||
String bomdtl_material_id = bomdlt.getString("material_id");
|
||||
String bomdtl_material_code = bomdlt.getString("material_code");
|
||||
String prior_level = bomdlt.getString("prior_level");
|
||||
if (StrUtil.isEmpty(prior_level)) {
|
||||
prior_level = "03";
|
||||
}
|
||||
if("1".equals(is_need_move)){
|
||||
//查询库存
|
||||
JSONArray bom_materials = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",bomdtl_material_id)
|
||||
.addParam("workorder_id",workorder_id)
|
||||
.addParam("quality_scode","01")
|
||||
.addParam("prior_level",prior_level)
|
||||
.addParam("flag","22")
|
||||
.process().getResultJSONArray(0);
|
||||
if(bom_materials.size()==0){
|
||||
@@ -1308,12 +1313,17 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
}
|
||||
String is_need_move = bomdlt.getString("is_need_move");
|
||||
String bomdtl_material_id = bomdlt.getString("material_id");
|
||||
String prior_level = bomdlt.getString("prior_level");
|
||||
if (StrUtil.isEmpty(prior_level)) {
|
||||
prior_level = "03";
|
||||
}
|
||||
if(nedd_qty>0 && "1".equals(is_need_move)){
|
||||
//查询库存
|
||||
JSONArray bom_materials = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",bomdtl_material_id)
|
||||
.addParam("quality_scode","01")
|
||||
.addParam("workorder_id",workorder_id)
|
||||
.addParam("prior_level",prior_level)
|
||||
.addParam("flag","22")
|
||||
.process().getResultJSONArray(0);
|
||||
if(bom_materials.size()==0){
|
||||
@@ -2525,9 +2535,14 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
//获取Y1、X1、X2….剩余>0的物料
|
||||
if(left_qty>0){
|
||||
if(is_need_move.equals("1")){
|
||||
String prior_level = bomdlt.getString("prior_level");
|
||||
if (StrUtil.isEmpty(prior_level)) {
|
||||
prior_level = "03";
|
||||
}
|
||||
JSONArray now_ivts = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",bomdtl_material_id)
|
||||
.addParam("quality_scode","01")
|
||||
.addParam("prior_level",prior_level)
|
||||
.addParam("workorder_id",workorder_id)
|
||||
.addParam("flag","22")
|
||||
.process().getResultJSONArray(0);
|
||||
@@ -3426,11 +3441,16 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
String bomdtl_material_id = bomdlts_plan.getString("material_id");
|
||||
double left_qty = bomdlts_plan.getDouble("formula_qty");
|
||||
String is_need_move = bomdlts_plan.getString("is_need_move");
|
||||
String prior_level = bomdlts_plan.getString("prior_level");
|
||||
if (StrUtil.isEmpty(prior_level)) {
|
||||
prior_level = "03";
|
||||
}
|
||||
if(is_need_move.equals("1")){
|
||||
//二次分配新料库存
|
||||
JSONArray now_ivts = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",bomdtl_material_id)
|
||||
.addParam("quality_scode","01")
|
||||
.addParam("prior_level",prior_level)
|
||||
.addParam("workorder_id",workorder_id)
|
||||
.addParam("flag","22")
|
||||
.process().getResultJSONArray(0);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.quality_scode TYPEAS s_string
|
||||
输入.prior_level TYPEAS s_string
|
||||
输入.material_id TYPEAS s_string
|
||||
输入.material_code TYPEAS s_string
|
||||
输入.is_need_manage TYPEAS s_string
|
||||
@@ -186,10 +187,13 @@
|
||||
OPTION 输入.quality_scode <> ""
|
||||
structivt.quality_scode = 输入.quality_scode
|
||||
ENDOPTION
|
||||
OPTION 输入.prior_level <> ""
|
||||
structivt.ivt_level <= 输入.prior_level
|
||||
ENDOPTION
|
||||
OPTION 输入.is_pure <> ""
|
||||
stockmaterialext.is_pure = 输入.is_pure
|
||||
ENDOPTION
|
||||
ORDER BY structivt.material_id,structivt.pcsn, structivt.sum_qty desc
|
||||
ORDER BY structivt.material_id,structivt.ivt_level desc,structivt.pcsn, structivt.sum_qty desc
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
182
mes/qd/src/views/wms/st/core/outbill/wastewashoutbill/AddDtl.vue
Normal file
182
mes/qd/src/views/wms/st/core/outbill/wastewashoutbill/AddDtl.vue
Normal file
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="到货单物料选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
width="1200px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
<el-input
|
||||
v-model="query.receive_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="订单编号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.source_bill_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="到货单号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
style="width: 230px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in receiveStatusList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码或名称"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<rrOperation />
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="receive_code" width="150" label="订单编号" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_code" width="150" label="到货单号" />
|
||||
<el-table-column show-overflow-tooltip prop="source_name" label="供应商" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" width="150" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" />
|
||||
<el-table-column show-overflow-tooltip prop="receive_qty" :formatter="crud.formatNum3" width="120" label="到货重量" />
|
||||
<el-table-column show-overflow-tooltip prop="instor_qty" :formatter="crud.formatNum3" label="入库重量" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="检测重量" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" />
|
||||
<el-table-column show-overflow-tooltip prop="status" label="状态" :formatter="stateFormat" />
|
||||
<el-table-column show-overflow-tooltip prop="input_optname" label="创建人" />
|
||||
<el-table-column show-overflow-tooltip prop="receive_date" width="120" label="到货日期" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button slot="left" type="primary" @click="submit">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudReceivemst from '@/api/wms/pcs/receivemst'
|
||||
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
components: { rrOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({ title: '用户', url: 'api/returnoutbill/addDtl',
|
||||
query: { receive_code: '', source_bill_code: '', status: '', search: '', mater_type: '' },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
reset: false,
|
||||
download: false
|
||||
}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
receiveStatusList: [],
|
||||
opendtlParam: '',
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
openParam: {
|
||||
handler(newValue, oldValue) {
|
||||
this.opendtlParam = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudReceivemst.getStatus().then(res => {
|
||||
this.receiveStatusList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.crud.query.mater_type = this.opendtlParam
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
open() {
|
||||
this.crud.query.mater_type = this.opendtlParam
|
||||
this.crud.toQuery()
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
for (const item of this.receiveStatusList) {
|
||||
if (item.code === row.status) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user