| | |
| | | const grossNum = ref({ |
| | | quantity: 0, |
| | | grossArea: 0, |
| | | perimeter: 0 |
| | | perimeter: 0, |
| | | weight:0 |
| | | }) |
| | | const getData = () => { |
| | | request.get(`/order/printOrderProductDetail/${props.orderId}/${selectedValues.value}`).then(res => { |
| | |
| | | grossNum.value.quantity += getQuantity(item.productDetail) |
| | | grossNum.value.grossArea += getArea(item.productDetail) |
| | | grossNum.value.perimeter += getPerimeter(item.productDetail) |
| | | grossNum.value.weight += getWeight(item.productDetail) |
| | | stringToJson(item.productDetail) |
| | | }) |
| | | |
| | | grossNum.value.quantity = parseFloat(grossNum.value.quantity.toFixed(2)) |
| | | grossNum.value.grossArea = parseFloat(grossNum.value.grossArea.toFixed(2)) |
| | | grossNum.value.perimeter = parseFloat(grossNum.value.perimeter.toFixed(2)) |
| | | grossNum.value.weight = parseFloat(grossNum.value.weight.toFixed(2)) |
| | | |
| | | }) |
| | | } |
| | |
| | | grossNum.value.quantity=0 |
| | | grossNum.value.grossArea=0 |
| | | grossNum.value.perimeter=0 |
| | | grossNum.value.weight=0 |
| | | data.value= res.data |
| | | |
| | | data.value.orderProductDetail.forEach(item => { |
| | | grossNum.value.quantity += getQuantity(item.productDetail) |
| | | grossNum.value.grossArea += getArea(item.productDetail) |
| | | grossNum.value.perimeter += getPerimeter(item.productDetail) |
| | | grossNum.value.weight += getWeight(item.productDetail) |
| | | stringToJson(item.productDetail) |
| | | }) |
| | | grossNum.value.quantity = parseFloat(grossNum.value.quantity.toFixed(2)) |
| | | grossNum.value.grossArea = parseFloat(grossNum.value.grossArea.toFixed(2)) |
| | | grossNum.value.perimeter = parseFloat(grossNum.value.perimeter.toFixed(2)) |
| | | grossNum.value.weight = parseFloat(grossNum.value.weight.toFixed(2)) |
| | | |
| | | }) |
| | | |
| | |
| | | return parseFloat(perimeter.toFixed(2)) |
| | | } |
| | | |
| | | const getWeight = (productList) => { |
| | | let weight = 0 |
| | | productList.forEach(item => { |
| | | weight += item.weight |
| | | }) |
| | | return parseFloat(weight.toFixed(2)) |
| | | } |
| | | |
| | | const printSheet = () => { |
| | | } |
| | | |
| | |
| | | </tr> |
| | | |
| | | <tr class="title-s"> |
| | | <th colspan="2" style="width: 30%"></th> |
| | | <th colspan="2" style="width: 30%;text-align: left;"><span>总重量:{{ grossNum.weight }}</span></th> |
| | | <th colspan="5" style="width: 40%;"> |
| | | <h3 >生产任务单(成品)</h3> |
| | | </th> |