产线看板修改增加生产的产线筛选

Signed-off-by: Yangwl <1726150332@qq.com>
master
Yangwl 1 month ago
parent 0288f1f15a
commit 2592b06982

@ -110,7 +110,7 @@
<td style="width: 16%">产品名称</td> <td style="width: 16%">产品名称</td>
<td style="width: 14%">批次号</td> <td style="width: 14%">批次号</td>
<td style="width: 8%">计划数量</td> <td style="width: 8%">计划数量</td>
<td style="width: 8%">完成数量</td> <td style="width: 8%">报工数量</td>
</tr> </tr>
</thead> </thead>
</table> </table>
@ -519,6 +519,7 @@ export default {
getDictData({ getDictData({
factoryCode: "ds_" + _this.selectxt, factoryCode: "ds_" + _this.selectxt,
equipmentTypeCode: "equ_type_bzx", equipmentTypeCode: "equ_type_bzx",
isqua: "1"
}).then((response) => { }).then((response) => {
if (response) { if (response) {
this.dictDatatype = response; this.dictDatatype = response;
@ -571,6 +572,7 @@ export default {
factoryCode: "ds_" + _this.selectxt, factoryCode: "ds_" + _this.selectxt,
workorderCodeSap: item, workorderCodeSap: item,
}).then((response) => { }).then((response) => {
console.log(response);
if (response) { if (response) {
_this.workOrder = response.data.workOrder; _this.workOrder = response.data.workOrder;
_this.taskNum = response.data.taskNum; _this.taskNum = response.data.taskNum;
@ -607,13 +609,37 @@ export default {
workorderCode: _this.workOrder.workorderCode workorderCode: _this.workOrder.workorderCode
}).then((response) => { }).then((response) => {
if (response) { if (response) {
let strQty = response.data.qty_total.toString(); // let strQty = response.data.qty_total.toString();
// if (strQty.length < 6) {
// strQty = String(
// strQty
// ).padStart(6, "0");
// }
// this.actProduction = strQty.split("");
// //
// const totalProduction = _this.orderdetail.reduce((sum, item) => {
// return sum + (item.quantityProduced || 0);
// }, Number(this.actProduction.join("")));
// console.log(':', totalProduction);
// 6
const baseQty = Number(response.data.qty_build);
let strQty = baseQty.toString();
if (strQty.length < 6) { if (strQty.length < 6) {
strQty = String( strQty = strQty.padStart(6, "0");
strQty
).padStart(6, "0");
} }
this.actProduction = strQty.split("");
// orderdetail
const detailTotal = _this.orderdetail.reduce((sum, item) => {
return sum + (item.quantityProduced || 0);
}, 0);
// 6
const total = baseQty + detailTotal;
const totalStr = total.toString().padStart(6, "0");
// actProduction
this.actProduction = totalStr.split("");
console.log('总产量:', total);
} }
}) })
}, },

Loading…
Cancel
Save