rev:改切计划新增木箱字段

This commit is contained in:
2024-03-22 09:38:51 +08:00
parent 461781c5d8
commit baf3ceb384
6 changed files with 24 additions and 99 deletions

View File

@@ -182,6 +182,7 @@ public class SapToLmsServiceImpl implements SapToLmsService {
} }
dtl.put("qty_unit_id", unit.getString("measure_unit_id")); dtl.put("qty_unit_id", unit.getString("measure_unit_id"));
dtl.put("qty_unit_name", unit.getString("unit_name")); dtl.put("qty_unit_name", unit.getString("unit_name"));
dtl.put("package_box_sn", sub_jo.getString("package_box_sn"));
dtl.put("qty", sub_jo.getString("net_weight")); dtl.put("qty", sub_jo.getString("net_weight"));
dtls.add(dtl); dtls.add(dtl);
} }

View File

@@ -131,6 +131,7 @@ public class RecutPlanServiceImpl implements RecutPlanService {
jsonDtl.put("plan_id", jsonMst.getLongValue("plan_id")); jsonDtl.put("plan_id", jsonMst.getLongValue("plan_id"));
jsonDtl.put("seq_no", i); jsonDtl.put("seq_no", i);
jsonDtl.put("material_id", json.getLongValue("material_id")); jsonDtl.put("material_id", json.getLongValue("material_id"));
jsonDtl.put("package_box_sn", json.getLongValue("package_box_sn"));
jsonDtl.put("pcsn", json.getString("sap_pcsn")); jsonDtl.put("pcsn", json.getString("sap_pcsn"));
jsonDtl.put("qty_unit_id", json.getString("qty_unit_id")); jsonDtl.put("qty_unit_id", json.getString("qty_unit_id"));
jsonDtl.put("qty_unit_name", json.getString("qty_unit_name")); jsonDtl.put("qty_unit_name", json.getString("qty_unit_name"));

View File

@@ -98,11 +98,13 @@
SELECT SELECT
dtl.*, dtl.*,
mater.material_code, mater.material_code,
mater.material_name mater.material_name,
sub.package_box_sn
FROM FROM
st_ivt_productplandtl dtl st_ivt_productplandtl dtl
LEFT JOIN st_ivt_productplanmst mst ON mst.plan_id = dtl.plan_id LEFT JOIN st_ivt_productplanmst mst ON mst.plan_id = dtl.plan_id
LEFT JOIN md_me_materialbase mater ON mater.material_id = dtl.material_id LEFT JOIN md_me_materialbase mater ON mater.material_id = dtl.material_id
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.sap_pcsn = dtl.pcsn
WHERE WHERE
1 = 1 1 = 1
OPTION 输入.plan_id <> "" OPTION 输入.plan_id <> ""
@@ -116,8 +118,7 @@
OPTION 输入.status <> "" OPTION 输入.status <> ""
dtl.status = 输入.status dtl.status = 输入.status
ENDOPTION ENDOPTION
order by sub.package_box_sn
order by dtl.seq_no
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF

View File

@@ -114,7 +114,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="crud-opts2"> <div class="crud-opts2">
<span class="role-span">不合格品明细</span> <span class="role-span">改切明细</span>
<span v-if="crud.status.cu > 0" class="crud-opts-right2"> <span v-if="crud.status.cu > 0" class="crud-opts-right2">
<!--左侧插槽--> <!--左侧插槽-->
@@ -143,6 +143,7 @@
<el-table-column key="1" type="index" label="序号" width="50" align="center" /> <el-table-column key="1" type="index" label="序号" width="50" align="center" />
<el-table-column key="3" prop="material_code" label="产品编码" width="150" align="center" /> <el-table-column key="3" prop="material_code" label="产品编码" width="150" align="center" />
<el-table-column key="4" prop="material_name" label="产品名称" align="center" min-width="200" /> <el-table-column key="4" prop="material_name" label="产品名称" align="center" min-width="200" />
<el-table-column key="5" prop="package_box_sn" label="木箱码" align="center" min-width="200" />
<el-table-column key="6" prop="pcsn" label="改切批次号" align="center" min-width="150" /> <el-table-column key="6" prop="pcsn" label="改切批次号" align="center" min-width="150" />
<el-table-column <el-table-column
key="10" key="10"
@@ -165,7 +166,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged"/> <AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged"/>
<StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="structChanged"/>
</el-dialog> </el-dialog>
</template> </template>
@@ -205,8 +205,6 @@ export default {
return { return {
dialogVisible: false, dialogVisible: false,
dtlShow: false, dtlShow: false,
structShow: false,
structShow2: false,
flagnow: false, flagnow: false,
nowrow: {}, nowrow: {},
nowindex: '', nowindex: '',
@@ -272,22 +270,6 @@ export default {
} }
}) })
}, },
custNameInput(val) {
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].storagevehicle_code === val.storagevehicle_code) {
this.$set(this.form.tableData[i], 'remark', val.remark)
this.form.tableData.splice(i, 1, this.form.tableData[i]) // 通过splice 替换数据 触发视图更新
}
}
},
custNameInput2(val) {
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].storagevehicle_code === val.storagevehicle_code) {
this.$set(this.form.tableData[i], 'fail_source', val.fail_source)
this.form.tableData.splice(i, 1, this.form.tableData[i]) // 通过splice 替换数据 触发视图更新
}
}
},
async queryDtl() { async queryDtl() {
if (!this.form.stor_id) { if (!this.form.stor_id) {
return this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO) return this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
@@ -295,19 +277,6 @@ export default {
this.storId = this.form.stor_id this.storId = this.form.stor_id
this.dtlShow = true this.dtlShow = true
}, },
allSend() {
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
for (let i = 0; i < this.form.tableData.length; i++) {
// this.$set(this.form.tableData[i], 'fail_source', this.form.fail_source)
if (this.form.tableData[i].is_used === '1') {
this.$set(this.form.tableData[i], 'remark', this.form.dtl_remark)
this.form.tableData.splice(i, 1, this.form.tableData[i]) // 通过splice 替换数据 触发视图更新
}
}
},
tableChanged(rows) { tableChanged(rows) {
const tablemap = new Map() const tablemap = new Map()
rows.forEach((item) => { rows.forEach((item) => {
@@ -322,29 +291,16 @@ export default {
} }
if (!this.flagnow) { if (!this.flagnow) {
this.$set(item, 'edit', false) this.$set(item, 'edit', false)
this.$set(item, 'work_status', '10') tablemap.set(item.pcsn, item)
this.$set(item, 'turnin_sect_id', '')
this.$set(item, 'turnin_struct_id', '')
this.$set(item, 'turnin_sect_code', '')
this.$set(item, 'turnin_sect_name', '')
this.$set(item, 'turnin_struct_code', '')
this.$set(item, 'turnin_struct_name', '')
tablemap.set(item.stockrecord_id, item)
} }
} else { } else {
this.$set(item, 'edit', false) this.$set(item, 'edit', false)
this.$set(item, 'work_status', '10') tablemap.set(item.pcsn, item)
this.$set(item, 'turnin_sect_id', '')
this.$set(item, 'turnin_struct_id', '')
this.$set(item, 'turnin_sect_code', '')
this.$set(item, 'turnin_sect_name', '')
this.$set(item, 'turnin_struct_code', '')
this.$set(item, 'turnin_struct_name', '')
tablemap.set(item.stockrecord_id, item)
} }
}) })
for (const value of tablemap.values()) { for (const value of tablemap.values()) {
value.pcsn = value.sap_pcsn value.pcsn = value.sap_pcsn
value.package_box_sn = value.storagevehicle_code
this.form.tableData.push(value) this.form.tableData.push(value)
} }
this.form.detail_count = this.form.tableData.length this.form.detail_count = this.form.tableData.length
@@ -354,32 +310,6 @@ export default {
} }
this.form.total_qty = qty this.form.total_qty = qty
}, },
structChanged(row) {
debugger
let structflag = false
for (let i = 0; i < this.form.tableData.length; i++) {
if ((this.form.tableData[i].turnin_struct_id === row.struct_id) || (this.form.tableData[i].turnout_struct_id === row.struct_id)) {
structflag = true
}
}
if (structflag) {
this.crud.notify('该货位已被设置,不允许重复设置!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].storagevehicle_code === this.nowrow.storagevehicle_code) {
this.form.tableData[i].turnin_struct_id = row.struct_id
this.form.tableData[i].turnin_struct_code = row.struct_code
this.form.tableData[i].turnin_struct_name = row.struct_name
this.form.tableData[i].turnin_sect_id = row.sect_id
this.form.tableData[i].turnin_sect_code = row.sect_code
this.form.tableData[i].turnin_sect_name = row.sect_name
this.form.tableData.splice(i, 1, this.form.tableData[i]) // 通过splice 替换数据 触发视图更新
}
}
console.log(this.form.tableData)
},
deleteRow(index, rows) { deleteRow(index, rows) {
const storagevehicle_code = rows[index].storagevehicle_code const storagevehicle_code = rows[index].storagevehicle_code
let len = rows.length let len = rows.length
@@ -402,15 +332,6 @@ export default {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false return false
} }
},
changeIsUsed(item) {
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]
if (item.storagevehicle_code === row.storagevehicle_code) {
row.is_used = item.is_used
this.form.tableData.splice(i, 1, this.form.tableData[i])
}
}
} }
} }
} }

View File

@@ -116,16 +116,16 @@
<!--左侧插槽--> <!--左侧插槽-->
<slot name="left"/> <slot name="left"/>
<!-- <el-button <!-- <el-button
slot="left" slot="left"
class="filter-item" class="filter-item"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="queryDtl()" @click="queryDtl()"
> >
添加库存物料 添加库存物料
</el-button>--> </el-button>-->
</span> </span>
</div> </div>
@@ -140,8 +140,9 @@
<el-table-column key="1" type="selection" width="55"/> <el-table-column key="1" type="selection" width="55"/>
<el-table-column key="2" type="index" label="序号" width="50" align="center"/> <el-table-column key="2" type="index" label="序号" width="50" align="center"/>
<el-table-column key="3" prop="material_code" label="产品编码" width="150" align="center"/> <el-table-column key="3" prop="material_code" label="产品编码" width="150" align="center"/>
<el-table-column key="4" prop="material_name" label="产品名称" align="center" min-width="200"/> <el-table-column key="4" prop="material_name" label="产品名称" align="center"/>
<el-table-column key="6" prop="pcsn" label="改切批次号" align="center" min-width="150"/> <el-table-column key="5" prop="package_box_sn" label="号" align="center"/>
<el-table-column key="6" prop="pcsn" label="改切批次号" align="center"/>
<el-table-column <el-table-column
key="10" key="10"
prop="qty" prop="qty"