This commit is contained in:
2022-12-26 20:16:28 +08:00
2 changed files with 15 additions and 12 deletions

View File

@@ -165,7 +165,10 @@ public class SapToLmsServiceImpl implements SapToLmsService {
jsonMst.put("receiptphone", json.getString("TEL_NUMBER")); // 联系电话
jsonMst.put("contractno", json.getString("BSTNK")); // 合同号
jsonMst.put("cust_code", json.getString("KUNNR")); // 客户
jsonMst.put("consignee", json.getString("NAMEM")); // 收货单位
jsonMst.put("receiptaddress", json.getString("ADRNRS")); // 收货地址
/*jsonMst.put("remark",json.getString("LGORT"));//库位*/
// 明细
JSONObject jsonMater = materTab.query("material_code = '" + json.getString("MATNR") + "'").uniqueResult(0);

View File

@@ -105,12 +105,12 @@
<el-table-column show-overflow-tooltip sortable prop="pcsn" label="子卷批次号" align="center" />
<el-table-column show-overflow-tooltip sortable prop="sap_pcsn" label="sap批次" align="center" />
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出重量" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" width="160" align="center">
<template scope="scope">
<el-input-number v-show="!scope.row.edit" v-model="scope.row.plan_qty" :precision="3" :max="100000000" />
<span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>
</template>
</el-table-column>
<!-- <el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" width="160" align="center">-->
<!-- <template scope="scope">-->
<!-- <el-input-number v-show="!scope.row.edit" v-model="scope.row.plan_qty" :precision="3" :max="100000000" />-->
<!-- <span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
<el-table-column align="center" label="操作" width="160" fixed="right">
<template scope="scope">
@@ -215,22 +215,22 @@ export default {
this.crud.notify('出库重量不能超过未分配数', CRUD.NOTIFICATION_TYPE.INFO)
return false
}*/
if (row.plan_qty > row.canuse_qty) {
/* if (row.plan_qty > row.canuse_qty) {
this.crud.notify('出库重量不能超过库存可出重量', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (row.plan_qty === 0) {
this.crud.notify('出库重量为0不能保存', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
}*/
}
row.edit = !row.edit
if (row.edit) {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - row.plan_qty
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + row.plan_qty
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.canuse_qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.canuse_qty)
} else {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + row.plan_qty
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - row.plan_qty
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty)
}
this.tableDtl.splice(index, 1, row) // 通过splice 替换数据 触发视图更新
},