Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | |
| | | request.post(`/Delivery/getSelectDeliveryPrinting`,form.value).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | | produceList.value = deepClone(res.data.data) |
| | | delivery.value=deepClone(res.data.delivery) |
| | | money.value=deepClone(res.data.money) |
| | |
| | | |
| | | <template> |
| | | <div id="sheet"> |
| | | <table border="1" > |
| | | <table > |
| | | <thead> |
| | | <tr class="title-s"> |
| | | <th colspan="13"> |
| | | <h1> |
| | | {{company.companyName}} |
| | | </h1> |
| | | </th> |
| | | </tr> |
| | | |
| | | <tr class="title-s"> |
| | | <th colspan="2"></th> |
| | | <th colspan="5"> |
| | | <h3>销售发货单</h3> |
| | | </th> |
| | | <th colspan="2" style="text-align: left;">发货单号:<span>{{delivery.deliveryId}}</span></th> |
| | | </tr> |
| | | <tr> |
| | | <th style="text-align: left;border:none;" colspan="4">客户名称:<span>{{delivery.customerName}}</span></th> |
| | | <th style="text-align: left;border:none;" colspan="3">项目名称:<span>{{delivery.project}}</span></th> |
| | | <th style="text-align: left;border:none;" colspan="2">联系人:<span>{{delivery.contacts}}</span></th> |
| | | </tr> |
| | | <tr> |
| | | <th style="text-align: left;border:none;" colspan="7">送货地址:<span>{{delivery.deliveryAddress}}</span></th> |
| | | <th style="text-align: left;border:none;" colspan="2">联系电话:<span>{{delivery.contactNumber}}</span></th> |
| | | </tr> |
| | | |
| | | |
| | | </thead> |
| | | <tr style="border-style: none"> |
| | | <td colspan="9" style="border-style: none"> |
| | | <table style="border-style: none;width: 100%;height: 100%"> |
| | | <template v-for="(item, index) in produceList" :key="index" > |
| | | <thead> |
| | | <tr v-if="index===0"> |
| | | <th style="width: 6%;">序号</th> |
| | | <th style="width: 20%;">楼层编号</th> |
| | | <th style="width: 20%;" colspan="2">宽X高</th> |
| | | <th style="width: 10%;">数量</th> |
| | | <th style="width: 10%;">面积</th> |
| | | <th style="width: 10%;">单价</th> |
| | | <th style="width: 12%;">金额</th> |
| | | <th style="width: 12%;" colspan="2">加工要求</th> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td style="font-size: 15px;text-align: left" colspan="4">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td> |
| | | <td style="font-size: 15px;text-align: left" colspan="3">对方单号:</td> |
| | | <td style="font-size: 15px;text-align: left" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td> |
| | | </tr> |
| | | </thead> |
| | | |
| | | <tr class="day-in" v-for="(items, index1) in item.DeliveryDetailList" :key="index1"> |
| | | <td>{{items.order_number}}</td> |
| | | <td>{{items.buildingNumber}}</td> |
| | | <td colspan="2" style="font-size: 15px;font-weight: bold;">{{items.width}}x{{items.height}}</td> |
| | | <td>{{items.quantity}}</td> |
| | | <td>{{items.area}}</td> |
| | | <td>{{items.price}}</td> |
| | | <td>{{items.money}}</td> |
| | | <td colspan="2">{{items.processingNote}}</td> |
| | | </tr> |
| | | <tr class="day-in" > |
| | | <td style="font-size: 15px;" colspan="4">小计:</td> |
| | | <td>{{item.DeliveryDetail.quantity}}</td> |
| | | <td>{{item.DeliveryDetail.area}}</td> |
| | | <td></td> |
| | | <td>{{item.DeliveryDetail.money}}</td> |
| | | <td></td> |
| | | </tr> |
| | | |
| | | </template> |
| | | <tr class="day-in"> |
| | | <td style="font-size: 15px;" colspan="4">合计:</td> |
| | | <td>{{delivery.quantity}}</td> |
| | | <td>{{delivery.area}}</td> |
| | | <td></td> |
| | | <td>{{delivery.money-otherMoneys-delivery.freight}}</td> |
| | | <td></td> |
| | | </tr> |
| | | <tr class="day-in"> |
| | | <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6" colspan="4"> |
| | | <div style="display: flex;font-size: 10px;text-align: center;"> |
| | | <div style="width: 25%">加工费用</div> |
| | | <div style="width: 25%">单价</div> |
| | | <div style="width: 25%">数量</div> |
| | | <div style="width: 25%">金额</div> |
| | | </div> |
| | | </td> |
| | | <td style="text-align: left;border:none;font-size: 15px;" colspan="5">总金额: {{delivery.money}}</td> |
| | | </tr> |
| | | <tr class="day-in"> |
| | | <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6;" colspan="4" > |
| | | <div style="display: flex;font-size: 10px;text-align: center" v-for="(item, index2) in otherMoney" :key="index2"> |
| | | <div style="width: 25%">{{item.DeliveryDetailOtherMoney.alias}}</div> |
| | | <div style="width: 25%">{{item.DeliveryDetailOtherMoney.price}}</div> |
| | | <div style="width: 25%">{{item.DeliveryDetailOtherMoney.count}}</div> |
| | | <div style="width: 25%">{{item.DeliveryDetailOtherMoney.monery}}</div> |
| | | </div> |
| | | <div style="display: flex;font-size: 10px;text-align: center" v-if="delivery.freight>0"> |
| | | <div style="width: 25%">运费</div> |
| | | <div style="width: 25%">{{delivery.freightPrice}}</div> |
| | | <div style="width: 25%">{{delivery.freightQuantity}}</div> |
| | | <div style="width: 25%">{{delivery.freight}}</div> |
| | | </div> |
| | | </td> |
| | | <td style="text-align: left;border:none;font-size: 15px;" colspan="5">大写金额: {{money}}</td> |
| | | </tr> |
| | | |
| | | |
| | | <!-- <el-row :gutter="24"> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">制单员:{{data.order.creator}}<span style="font-size: 10px"></span></div></el-col> |
| | | <el-col :span="6"><div style="font-size: 12px" class="bottom">制单日期:{{data.order.createTime}}<span style="font-size: 10px"></span></div></el-col> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">审核员:{{data.order.verifier}}</div></el-col> |
| | | <el-col :span="6"><div style="font-size: 12px" class="bottom">审核日期:{{data.order.updateTime}}</div></el-col> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">打印人:{{username}}</div></el-col> |
| | | |
| | | </el-row>--> |
| | | <tr class="day-in" style="border: 0;"> |
| | | <td colspan="9" style="border: 0;"> |
| | | <div style="display:flex;;text-align: left" class="bottom"> |
| | | <div style="width: 15%">制单员:{{ delivery.creator }}</div> |
| | | <div style="width: 25%">制单日期:{{ delivery.createTime }}</div> |
| | | <div style="width: 10%">发货员:</div> |
| | | <div style="width: 10%">司机:</div> |
| | | <div style="width: 15%">客户签字:</div> |
| | | <div style="width: 15%">签收日期:</div> |
| | | </div> |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | <tr class="day-in" style="border: 0;"> |
| | | <td colspan="9" style="border: 0;"> |
| | | <div style="display:flex;" class="bottom"> |
| | | 架子 只 |
| | | {{takeCare}} |
| | | </div> |
| | | |
| | | </td> |
| | | </tr> |
| | | <tr class="day-in" style="border: 0;"> |
| | | <td colspan="9" style="border: 0;"> |
| | | <div style="display:flex;" class="bottom"> |
| | | {{remark}} |
| | | </div> |
| | | |
| | | </td> |
| | | </tr> |
| | | |
| | | </table> |
| | | </td> |
| | | </tr> |
| | | |
| | | </table> |
| | | |
| | | <!-- <table border="1" > |
| | | <thead> |
| | | <tr class="title-s"> |
| | | <th colspan="13"> |
| | | <h1> |
| | |
| | | <th style="width: 12%;">金额</th> |
| | | <th style="width: 12%;" colspan="2">加工要求</th> |
| | | </tr> |
| | | </thead> |
| | | <template v-for="(item, index) in produceList" :key="index" > |
| | | <tr> |
| | | <td style="font-size: 15px;text-align: left" colspan="4">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td> |
| | |
| | | <td style="text-align: left;border:none;font-size: 15px;" colspan="5">大写金额: {{money}}</td> |
| | | </tr> |
| | | |
| | | </table> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="4"><div class="bottom">制单员:<span style="font-size: 10px">{{delivery.creator}}</span></div></el-col> |
| | | <el-col :span="4"><div class="bottom">制单日期:<span style="font-size: 10px">{{delivery.createTime}}</span></div></el-col> |
| | | <el-col :span="4"><div class="bottom">发货员:</div></el-col> |
| | | <el-col :span="3"><div class="bottom">司机:</div></el-col> |
| | | <el-col :span="4"><div class="bottom">客户签字:</div></el-col> |
| | | <el-col :span="4"><div class="bottom">签收日期:</div></el-col> |
| | | |
| | | </el-row> |
| | | <el-row :gutter="20" style="margin-top: 20px;"> |
| | | <el-col :span="4"><div class="bottom">架子 只</div></el-col> |
| | | <el-col :span="20"><div class="bottom">{{takeCare}}</div></el-col> |
| | | </el-row> |
| | | <el-row :gutter="20" style="margin-top: 20px;"> |
| | | <el-col :span="24"><div class="bottom">{{remark}}</div></el-col> |
| | | </el-row> |
| | | <tfoot style="border: 0"> |
| | | <!– <el-row :gutter="24"> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">制单员:{{data.order.creator}}<span style="font-size: 10px"></span></div></el-col> |
| | | <el-col :span="6"><div style="font-size: 12px" class="bottom">制单日期:{{data.order.createTime}}<span style="font-size: 10px"></span></div></el-col> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">审核员:{{data.order.verifier}}</div></el-col> |
| | | <el-col :span="6"><div style="font-size: 12px" class="bottom">审核日期:{{data.order.updateTime}}</div></el-col> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">打印人:{{username}}</div></el-col> |
| | | |
| | | </el-row>–> |
| | | <tr class="day-in" style="border: 0;"> |
| | | <td colspan="9" style="border: 0;"> |
| | | <div style="display:flex;"> |
| | | <div style="width: 15%">制单员:{{ delivery.creator }}</div> |
| | | <div style="width: 25%">制单日期:{{ delivery.createTime }}</div> |
| | | <div style="width: 10%">发货员:</div> |
| | | <div style="width: 10%">司机:</div> |
| | | <div style="width: 15%">客户签字:</div> |
| | | <div style="width: 15%">签收日期:</div> |
| | | </div> |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="9" style="border: 0;"> |
| | | <div style="display:flex;" class="bottom">架子 只</div> |
| | | <div style="display:flex;" class="bottom"> |
| | | {{takeCare}} |
| | | </div> |
| | | |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="9" style="border: 0;"> |
| | | <div style="display:flex;" class="bottom"> |
| | | {{remark}} |
| | | </div> |
| | | |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | |
| | | </table>--> |
| | | |
| | | </div> |
| | | |
| | |
| | | .title-s,.title-s th{ |
| | | border:0 |
| | | } |
| | | table { |
| | | border-collapse: collapse; |
| | | width: 100%; |
| | | |
| | | } |
| | | td > table { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | .hr-border{ |
| | | height: 2px; |
| | |
| | | background-color: black; |
| | | color: black; |
| | | } |
| | | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 8mm 16mm 16mm 16mm /* this affects the margin in the printer settings */ |
| | | size: auto; |
| | | margin: 8mm 16mm 16mm 16mm |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {computed, onMounted, ref} from "vue" |
| | | import PrintFoot from "@/components/sd/order/PrintFoot.vue" |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | const company = companyInfo() |
| | | let produceList = ref([]) |
| | | let otherMoney = ref([]) |
| | | let delivery = ref([]) |
| | | let money = ref("") |
| | | let otherMoneys = 0 |
| | | let takeCare = "注意:请妥善保管好我司的玻璃架,如有丢失或损坏,按1500元只赔偿。谢谢配合!" |
| | | let remark = "备注:本批玻璃为优等合格品,请在卸货时,当面消点验收、如有质量问题在一周内与本公司联系,否则概不负责!" |
| | | |
| | | |
| | | |
| | | let props = defineProps({ |
| | | deliveryId:null |
| | | }) |
| | | const form = ref({ |
| | | }) |
| | | const getData = () => { |
| | | if(props.deliveryId===null || props.deliveryId===undefined || props.deliveryId===''){ |
| | | return |
| | | } |
| | | form.value.deliveryId=props.deliveryId |
| | | |
| | | |
| | | request.post(`/Delivery/getSelectDeliveryPrinting`,form.value).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | | produceList.value = deepClone(res.data.data) |
| | | delivery.value=deepClone(res.data.delivery) |
| | | money.value=deepClone(res.data.money) |
| | | otherMoney.value=deepClone(res.data.otherMoney) |
| | | otherMoney.value.forEach(item => { |
| | | otherMoneys+=item.DeliveryDetailOtherMoney.monery |
| | | }) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getData() |
| | | }) |
| | | |
| | | const stringToJson = (productList) => { |
| | | productList.forEach(item => { |
| | | item.otherColumns = JSON.parse(item.otherColumns) |
| | | }) |
| | | } |
| | | |
| | | const getQuantity = (productList) => { |
| | | let quantity = 0 |
| | | productList.forEach(item => { |
| | | quantity += item.quantity |
| | | }) |
| | | return parseFloat(quantity.toFixed(3)) |
| | | |
| | | } |
| | | |
| | | const getArea = (productList) => { |
| | | let area = 0 |
| | | productList.forEach(item => { |
| | | area += item.grossArea |
| | | }) |
| | | return parseFloat(area.toFixed(3)) |
| | | |
| | | } |
| | | |
| | | const getPerimeter = (productList) => { |
| | | let perimeter = 0 |
| | | productList.forEach(item => { |
| | | perimeter += item.perimeter |
| | | }) |
| | | return parseFloat(perimeter.toFixed(3)) |
| | | } |
| | | |
| | | const printSheet = () => { |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | defineExpose({ |
| | | printSheet |
| | | }); |
| | | </script> |
| | | |
| | | <template> |
| | | <div id="sheet"> |
| | | <table > |
| | | <thead> |
| | | <tr class="title-s"> |
| | | <th colspan="13"> |
| | | <h1> |
| | | {{company.companyName}} |
| | | </h1> |
| | | </th> |
| | | </tr> |
| | | |
| | | <tr class="title-s"> |
| | | <th colspan="2"></th> |
| | | <th colspan="5"> |
| | | <h3>销售发货单</h3> |
| | | </th> |
| | | <th colspan="2" style="text-align: left;">发货单号:<span>{{delivery.deliveryId}}</span></th> |
| | | </tr> |
| | | <tr> |
| | | <th style="text-align: left;border:none;" colspan="4">客户名称:<span>{{delivery.customerName}}</span></th> |
| | | <th style="text-align: left;border:none;" colspan="3">项目名称:<span>{{delivery.project}}</span></th> |
| | | <th style="text-align: left;border:none;" colspan="2">联系人:<span>{{delivery.contacts}}</span></th> |
| | | </tr> |
| | | <tr> |
| | | <th style="text-align: left;border:none;" colspan="7">送货地址:<span>{{delivery.deliveryAddress}}</span></th> |
| | | <th style="text-align: left;border:none;" colspan="2">联系电话:<span>{{delivery.contactNumber}}</span></th> |
| | | </tr> |
| | | |
| | | |
| | | </thead> |
| | | <tr style="border-style: none"> |
| | | <td colspan="9" style="border-style: none"> |
| | | <table style="border-style: none;width: 100%;height: 100%"> |
| | | <template v-for="(item, index) in produceList" :key="index" > |
| | | <thead> |
| | | <tr v-if="index===0"> |
| | | <th style="width: 6%;">序号</th> |
| | | <th style="width: 20%;">楼层编号</th> |
| | | <th style="width: 20%;" colspan="2">宽X高</th> |
| | | <th style="width: 10%;">数量</th> |
| | | <th style="width: 10%;">面积</th> |
| | | <th style="width: 32%;" colspan="3">加工要求</th> |
| | | </tr> |
| | | |
| | | |
| | | </thead> |
| | | <tr> |
| | | <td style="font-size: 15px;text-align: left" colspan="4">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td> |
| | | <td style="font-size: 15px;text-align: left" colspan="2">对方单号:</td> |
| | | <td style="font-size: 15px;text-align: left" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td> |
| | | </tr> |
| | | |
| | | <tr class="day-in" v-for="(items, index1) in item.DeliveryDetailList" :key="index1"> |
| | | <td>{{items.order_number}}</td> |
| | | <td>{{items.buildingNumber}}</td> |
| | | <td colspan="2" style="font-size: 15px;font-weight: bold;">{{items.width}}x{{items.height}}</td> |
| | | <td>{{items.quantity}}</td> |
| | | <td>{{items.area}}</td> |
| | | <td colspan="3">{{items.processingNote}}</td> |
| | | </tr> |
| | | <tr class="day-in" > |
| | | <td style="font-size: 15px;" colspan="4">小计:</td> |
| | | <td>{{item.DeliveryDetail.quantity}}</td> |
| | | <td>{{item.DeliveryDetail.area}}</td> |
| | | </tr> |
| | | |
| | | </template> |
| | | <tr class="day-in"> |
| | | <td style="font-size: 15px;" colspan="4">合计:</td> |
| | | <td>{{delivery.quantity}}</td> |
| | | <td>{{delivery.area}}</td> |
| | | </tr> |
| | | |
| | | |
| | | |
| | | <!-- <el-row :gutter="24"> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">制单员:{{data.order.creator}}<span style="font-size: 10px"></span></div></el-col> |
| | | <el-col :span="6"><div style="font-size: 12px" class="bottom">制单日期:{{data.order.createTime}}<span style="font-size: 10px"></span></div></el-col> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">审核员:{{data.order.verifier}}</div></el-col> |
| | | <el-col :span="6"><div style="font-size: 12px" class="bottom">审核日期:{{data.order.updateTime}}</div></el-col> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">打印人:{{username}}</div></el-col> |
| | | |
| | | </el-row>--> |
| | | <tr class="day-in" style="border: 0;"> |
| | | <td colspan="9" style="border: 0;"> |
| | | <div style="display:flex;;text-align: left" class="bottom"> |
| | | <div style="width: 15%">制单员:{{ delivery.creator }}</div> |
| | | <div style="width: 25%">制单日期:{{ delivery.createTime }}</div> |
| | | <div style="width: 10%">发货员:</div> |
| | | <div style="width: 10%">司机:</div> |
| | | <div style="width: 15%">客户签字:</div> |
| | | <div style="width: 15%">签收日期:</div> |
| | | </div> |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | <tr class="day-in" style="border: 0;"> |
| | | <td colspan="9" style="border: 0;"> |
| | | <div style="display:flex;" class="bottom"> |
| | | 架子 只 |
| | | {{takeCare}} |
| | | </div> |
| | | |
| | | </td> |
| | | </tr> |
| | | <tr class="day-in" style="border: 0;"> |
| | | <td colspan="9" style="border: 0;"> |
| | | <div style="display:flex;" class="bottom"> |
| | | {{remark}} |
| | | </div> |
| | | |
| | | </td> |
| | | </tr> |
| | | |
| | | </table> |
| | | </td> |
| | | </tr> |
| | | |
| | | </table> |
| | | |
| | | </div> |
| | | |
| | | |
| | | </template> |
| | | |
| | | |
| | | |
| | | |
| | | <style scoped> |
| | | #child{ |
| | | margin-top: 20px; |
| | | } |
| | | h1,h3{ |
| | | left:0; |
| | | right:0; |
| | | top:0; |
| | | bottom:0; |
| | | margin:auto; |
| | | } |
| | | h1{ |
| | | font-size: 1.5rem; |
| | | } |
| | | h3{ |
| | | font-size: 1.2rem; |
| | | } |
| | | |
| | | |
| | | table{ |
| | | border-collapse: collapse; |
| | | width: 100%; |
| | | text-align: center; |
| | | } |
| | | tr,td,th{ |
| | | border: 1px solid black; |
| | | } |
| | | |
| | | th,.no-change-row { |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .title-1{ |
| | | width: 76px; |
| | | } |
| | | .title-s,.title-s th{ |
| | | border:0 |
| | | } |
| | | table { |
| | | border-collapse: collapse; |
| | | width: 100%; |
| | | |
| | | } |
| | | td > table { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | .hr-border{ |
| | | height: 2px; |
| | | width: 100%; |
| | | background-color: black; |
| | | color: black; |
| | | } |
| | | @page { |
| | | size: auto; |
| | | margin: 8mm 16mm 16mm 16mm |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | const getArea = (productList) => { |
| | | let area = 0 |
| | | productList.forEach(item => { |
| | | area += item.computeGrossArea |
| | | area += item.grossArea |
| | | }) |
| | | return parseFloat(area.toFixed(2)) |
| | | |
| | |
| | | <th style="width: 17%;font-weight: bold;" colspan="3">加工要求</th> |
| | | </tr> |
| | | |
| | | |
| | | </thead> |
| | | <tr style="border-style: none"> |
| | | <td style="font-size: 15px;font-weight: bold;text-align: left" colspan="9"> |
| | | 产品名称:<span>{{item.productName}}</span> |
| | | 产品名称:<span>{{data.orderProductDetail[index].productName}}</span> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | |
| | | <tr class="day-in" v-for="(items, index1) in item.productDetail" :key="index1"> |
| | | <td>{{items.orderNumber}}</td> |
| | | <td>{{items.buildingNumber}}</td> |
| New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {computed, onMounted, ref} from "vue" |
| | | import PrintFoot from "@/components/sd/order/PrintFoot.vue" |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {Bottom, Burger, Food} from "@element-plus/icons-vue"; |
| | | const company = companyInfo() |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | let dialogVisible = ref(false) |
| | | |
| | | |
| | | let props = defineProps({ |
| | | orderId:null |
| | | }) |
| | | let productId=ref({ |
| | | |
| | | }) |
| | | let data = ref({ |
| | | order:{ |
| | | processingNote:'' |
| | | }, |
| | | orderProductDetail:[] |
| | | }) |
| | | let productIdData = ref({ |
| | | }) |
| | | const selectedValues = ref([]) |
| | | |
| | | const grossNum = ref({ |
| | | quantity: 0, |
| | | grossArea: 0, |
| | | perimeter: 0 |
| | | }) |
| | | const getData = () => { |
| | | console.log(selectedValues.value) |
| | | request.post(`/order/printOrderProductGlassDetailMonolithic/${props.orderId}`,selectedValues.value).then(res => { |
| | | data.value= res.data |
| | | productIdData.value=data.value.orderDetail |
| | | data.value.orderDetail.forEach(item => { |
| | | item.productDetail.forEach(items => { |
| | | grossNum.value.quantity += getQuantity(items.orderGlassDetails) |
| | | grossNum.value.grossArea += getArea(items.orderGlassDetails) |
| | | grossNum.value.perimeter += getPerimeter(items.orderGlassDetails) |
| | | }) |
| | | |
| | | |
| | | }) |
| | | 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)) |
| | | |
| | | |
| | | |
| | | }) |
| | | } |
| | | |
| | | const handleChange = () => { |
| | | |
| | | request.post(`/order/printOrderProductGlassDetailMonolithic/${props.orderId}`,selectedValues.value).then(res => { |
| | | grossNum.value.quantity=0 |
| | | grossNum.value.grossArea=0 |
| | | grossNum.value.perimeter=0 |
| | | data.value= res.data |
| | | data.value.orderDetail.forEach(item => { |
| | | item.productDetail.forEach(items => { |
| | | grossNum.value.quantity += getQuantity(items.orderGlassDetails) |
| | | grossNum.value.grossArea += getArea(items.orderGlassDetails) |
| | | grossNum.value.perimeter += getPerimeter(items.orderGlassDetails) |
| | | }) |
| | | |
| | | |
| | | }) |
| | | 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)) |
| | | |
| | | }) |
| | | |
| | | } |
| | | |
| | | const handleDoubleClick = () => { |
| | | dialogVisible.value=true |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getData() |
| | | }) |
| | | |
| | | const stringToJson = (productList) => { |
| | | productList.forEach(item => { |
| | | item.otherColumns = JSON.parse(item.otherColumns) |
| | | }) |
| | | } |
| | | |
| | | const getQuantity = (productList) => { |
| | | let quantity = 0 |
| | | productList.forEach(item => { |
| | | |
| | | quantity += item.quantity |
| | | }) |
| | | return parseFloat(quantity.toFixed(2)) |
| | | |
| | | } |
| | | |
| | | const getArea = (productList) => { |
| | | let area = 0 |
| | | productList.forEach(item => { |
| | | area += item.gross_area |
| | | }) |
| | | return parseFloat(area.toFixed(2)) |
| | | |
| | | } |
| | | |
| | | const getPerimeter = (productList) => { |
| | | let perimeter = 0 |
| | | productList.forEach(item => { |
| | | perimeter += parseFloat(item.perimeter) |
| | | }) |
| | | return parseFloat(perimeter.toFixed(2)) |
| | | } |
| | | |
| | | const printSheet = () => { |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | defineExpose({ |
| | | printSheet |
| | | }); |
| | | </script> |
| | | |
| | | |
| | | <template> |
| | | |
| | | <div id="sheet" @dblclick="handleDoubleClick" > |
| | | <table style="border-style: none;" > |
| | | <thead> |
| | | <tr class="title-s"> |
| | | <th colspan="13"> |
| | | <h1> |
| | | {{ company.companyName }} |
| | | </h1> |
| | | </th> |
| | | </tr> |
| | | |
| | | <tr class="title-s"> |
| | | <th colspan="2"></th> |
| | | <th colspan="5" > |
| | | <h3 style="margin-left: 25%">生成任务单(单品)</h3> |
| | | </th> |
| | | <th colspan="2" style="text-align: center;font-weight: bold;">订单编号:<span>{{ data.order.orderId }}</span></th> |
| | | </tr> |
| | | <tr> |
| | | <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="4"> |
| | | 客户名称:<span>{{ data.order.customerName }}</span></th> |
| | | <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="3"> |
| | | 项目名称:<span>{{ data.order.project }}</span></th> |
| | | <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="2"> |
| | | 发货日期:<span>{{ data.order.deliveryDate }}</span></th> |
| | | </tr> |
| | | <tr> |
| | | <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="7"> |
| | | 送货地址:<span>{{ data.order.deliveryAddress }}</span></th> |
| | | <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="2"> |
| | | 联系电话:<span>{{ data.order.contactNumber }}</span></th> |
| | | </tr> |
| | | |
| | | </thead> |
| | | <tr style="border-style: none"> |
| | | <td colspan="9" style="border-style: none"> |
| | | <table style="border-style: none;width: 100%;height: 100%"> |
| | | <template v-for="(item, index) in data.orderDetail" :key="index" > |
| | | <thead> |
| | | <tr v-if="index===0"> |
| | | <th style="width: 6%;font-weight: bold;">序</th> |
| | | <th style="width: 10%;font-weight: bold;" >楼层编号</th> |
| | | <th style="width: 20%;font-weight: bold;" colspan="1">宽(弧长)X高</th> |
| | | <th style="width: 20%;font-weight: bold;" colspan="2">切割宽(弧长)*高</th> |
| | | <th style="width: 10%;font-weight: bold;">数量</th> |
| | | <th style="width: 10%;font-weight: bold;">面积</th> |
| | | <th style="width: 10%;font-weight: bold;">周长</th> |
| | | <th style="width: 17%;font-weight: bold;" colspan="2">加工要求</th> |
| | | </tr> |
| | | |
| | | |
| | | </thead> |
| | | <tr style="border-style: none"> |
| | | <td style="font-size: 15px;font-weight: bold;text-align: left" colspan="9"> |
| | | 产品名称:<span>{{item.productName}}</span> |
| | | </td> |
| | | </tr> |
| | | <template v-for="(items, index1) in item.productDetail" :key="index1" > |
| | | <tr style="border-style: none"> |
| | | <td style="font-size: 15px;font-weight: bold;text-align: left" colspan="9"> |
| | | 单片名称:<span>{{items.detail}}</span> |
| | | </td> |
| | | </tr> |
| | | <tr class="day-in" v-for="(items2, index2) in items.orderGlassDetails" :key="index2"> |
| | | |
| | | <td>{{items2.order_number}}/{{items2.technology_number}}</td> |
| | | <td>{{items2.building_number}}</td> |
| | | <td colspan="1" style="font-size: 15px;font-weight: bold;" >{{items2.width}}x{{items2.height}}</td> |
| | | <td colspan="2" style="font-size: 15px;font-weight: bold;" >{{items2.child_width}}x{{items2.child_height}}/R={{items2.bend_radius}}</td> |
| | | <td>{{items2.quantity}}</td> |
| | | <td>{{items2.gross_area.toFixed(2)}}</td> |
| | | <td>{{parseFloat(items2.perimeter).toFixed(2)}}</td> |
| | | <td colspan="2">{{items2.processing_note}}</td> |
| | | </tr> |
| | | <tr class="day-in" > |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="5">小计:</td> |
| | | <td>{{getQuantity(items.orderGlassDetails)}}</td> |
| | | <td>{{getArea(items.orderGlassDetails)}}</td> |
| | | <td>{{getPerimeter(items.orderGlassDetails)}}</td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | |
| | | </template> |
| | | |
| | | </template> |
| | | <tr class="day-in"> |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="5">合计:</td> |
| | | <td>{{grossNum.quantity}}</td> |
| | | <td>{{grossNum.grossArea}}</td> |
| | | <td>{{grossNum.perimeter}}</td> |
| | | <td colspan="3"></td> |
| | | </tr> |
| | | <tr class="day-in"> |
| | | <td style="text-align: left;border-width: 0 0 0 0; border-style: solid; border-color: #d3dce6" colspan="9"> |
| | | <template v-for="(item,index) in data.order.processingNote.split('\n')"> |
| | | {{item}} |
| | | <br> |
| | | </template> |
| | | </td> |
| | | </tr> |
| | | |
| | | <tfoot style="border: 0"> |
| | | <!-- <el-row :gutter="24"> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">制单员:{{data.order.creator}}<span style="font-size: 10px"></span></div></el-col> |
| | | <el-col :span="6"><div style="font-size: 12px" class="bottom">制单日期:{{data.order.createTime}}<span style="font-size: 10px"></span></div></el-col> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">审核员:{{data.order.verifier}}</div></el-col> |
| | | <el-col :span="6"><div style="font-size: 12px" class="bottom">审核日期:{{data.order.updateTime}}</div></el-col> |
| | | <el-col :span="4"><div style="font-size: 12px" class="bottom">打印人:{{username}}</div></el-col> |
| | | |
| | | </el-row>--> |
| | | <tr class="day-in" style="border: 0;"> |
| | | <td colspan="9" style="border: 0;"> |
| | | <div style="display:flex;"> |
| | | <div style="width: 15%">制单员:{{ data.order.creator }}</div> |
| | | <div style="width: 25%">制单日期:{{ data.order.createTime }}</div> |
| | | <div style="width: 15%">审核员:{{ data.order.verifier }}</div> |
| | | <div style="width: 25%">审核日期:{{ data.order.updateTime }}</div> |
| | | <div style="width: 15%">打印人:{{ username }}</div> |
| | | </div> |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </td> |
| | | </tr> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </table> |
| | | |
| | | <el-dialog v-model="dialogVisible" style="width: 40%;height: 20%;margin-top: 10%" > |
| | | <el-select v-model="selectedValues" style="width: 100%" @change="handleChange" multiple placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in productIdData" |
| | | :key="item" |
| | | :label='item.productId+" "+item.productName' |
| | | :value="item.productId"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | h1,h3{ |
| | | left:0; |
| | | right:0; |
| | | top:0; |
| | | bottom:0; |
| | | margin:auto; |
| | | } |
| | | h1{ |
| | | font-size: 1.5rem; |
| | | } |
| | | h3{ |
| | | font-size: 1.2rem; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | |
| | | table{ |
| | | border-collapse: collapse; |
| | | width: 100%; |
| | | text-align: center; |
| | | } |
| | | tr,td,th{ |
| | | border: 1px solid black; |
| | | } |
| | | |
| | | th,.no-change-row { |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .title-1{ |
| | | width: 76px; |
| | | } |
| | | .title-s,.title-s th{ |
| | | border:0 |
| | | } |
| | | |
| | | .hr-border{ |
| | | height: 2px; |
| | | width: 100%; |
| | | background-color: black; |
| | | color: black; |
| | | } |
| | | table { |
| | | border-collapse: collapse; |
| | | width: 100%; |
| | | |
| | | } |
| | | td > table { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | computeArea:'结算单片面积', |
| | | computeGrossArea:'结算总面积', |
| | | shape:'形状', |
| | | bendRadius:'弯钢弧度', |
| | | bendRadius:'弯钢半径', |
| | | edgingType:'磨边类型', |
| | | import:'导入', |
| | | template:'模板', |
| | |
| | | <div class="row1"> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.type_name.includes('中空')">中空</span> |
| | | <span v-else-if="item.type_name.includes('夹层')">夹层</span> |
| | | <span v-else-if="item.type_name.includes('夹胶')">夹胶</span> |
| | | <span v-if="item.process.includes('夹胶')">夹胶</span> |
| | | <span v-else-if="item.process.includes('中空')">中空</span> |
| | | <span v-else></span> |
| | | </div> |
| | | |
| | |
| | | justify-content: left; |
| | | flex-wrap: wrap; |
| | | margin-left: 5px; |
| | | margin-top: 15px; |
| | | } |
| | | |
| | | #entirety{ |
| | |
| | | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 8mm 4mm 0mm 6mm /* this affects the margin in the printer settings */ |
| | | margin: 13mm 4mm 0mm 6mm /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | |
| | |
| | | justify-content: left; |
| | | flex-wrap: wrap; |
| | | margin-left: 5px; |
| | | margin-top: 15px; |
| | | } |
| | | |
| | | #entirety{ |
| | |
| | | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 8mm 4mm 0mm 6mm /* this affects the margin in the printer settings */ |
| | | margin: 13mm 4mm 0mm 6mm /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | |
| | |
| | | //{field: 'buildingNumber',width:120, title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'productId',width:120, title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'productName',width:120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'price',width:120, title: t('order.price'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'price',width:120, title: t('order.price'),editRender: { name: 'input' },filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'finishedGoodsInventory.storageRegion',width:120, title: t('productStock.inventoryArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'deliveryDetail.money',width:120, title: t('order.grossAmount'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'width',width:120, title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | |
| | | import footSum from "@/hook/footSum" |
| | | import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global"; |
| | | import PrintSheet1 from "@/components/sd/delivery/PrintSheet1.vue"; |
| | | import PrintSheet2 from "@/components/sd/delivery/PrintSheet2.vue"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | sheetIndex.value=1 |
| | | break |
| | | } |
| | | case 'sheet2': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | dialogTableVisible.value = true |
| | | sheetIndex.value=2 |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | options: [ |
| | | [ |
| | | { code: 'sheet1', name: t('basicData.print'), prefixIcon: 'vxe-icon-file-txt', visible: true}, |
| | | { code: 'sheet2', name: t('basicData.print')+'无金额', prefixIcon: 'vxe-icon-file-txt', visible: true}, |
| | | ] |
| | | ] |
| | | } |
| | |
| | | <el-button v-print="printContent" :icon="Printer" circle /> |
| | | </template> |
| | | <print-sheet1 id="child" v-if="sheetIndex===1" :deliveryId="rowClickIndex.deliveryId" /> |
| | | <print-sheet2 id="child" v-if="sheetIndex===2" :deliveryId="rowClickIndex.deliveryId" /> |
| | | |
| | | </el-dialog> |
| | | </div> |
| | |
| | | return |
| | | } |
| | | if($grid.getTableData().tableData.length!=$grid.getTableData().fullData.length){ |
| | | ElMessage.error("请先取消筛选") |
| | | ElMessage.error(t('order.msg.pleaseCancelTheFilteringFirst')) |
| | | return |
| | | } |
| | | //xGrid.value.clearSort() |
| | |
| | | } |
| | | }) |
| | | } |
| | | computedMoney() |
| | | break |
| | | } |
| | | case 'copyChecked' :{ |
| | |
| | | }) |
| | | } |
| | | } |
| | | computedMoney() |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | |
| | | } |
| | | }) |
| | | }else{ |
| | | console.log(dataList) |
| | | const val = getNestedProperty(dataList[result.start],result.cell) |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start ){ |
| | | setNestedValue(item,result.cell,val) |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | | } |
| | | computedMoney() |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | |
| | | } |
| | | }) |
| | | } |
| | | computedMoney() |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | |
| | | import { saveAs } from "file-saver" |
| | | import PrintSheet3 from "@/components/sd/order/PrintSheet3.vue"; |
| | | import PrintSheet4 from "@/components/sd/order/PrintSheet4.vue"; |
| | | import PrintSheet5 from "@/components/sd/order/PrintSheet5.vue"; |
| | | const { t } = useI18n() |
| | | const userStore = useUserInfoStore() |
| | | const company = companyInfo() |
| | |
| | | { code: 'sheet1', name: '横版-普通' }, |
| | | { code: 'sheet2', name: '横版-多层明细' }, |
| | | { code: 'sheet4', name: '生产加工单纵版' }, |
| | | { code: 'sheet3', name: '浏览发货信息' } |
| | | { code: 'sheet3', name: '浏览发货信息' }, |
| | | { code: 'sheet5', name: '生产加工单弯钢(单片)' }, |
| | | |
| | | ] |
| | | }, |
| | |
| | | {field: 'quantity',width:120, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'goodsQuantity',width:120, title: t('searchOrder.inventoryNum'), sortable: true}, |
| | | {field: 'area',width:120, title: t('order.computeGrossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'money',width:120, title: t('order.money'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'createTime',width:120, title: t('basicData.reportData'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'packType',width:120, title: t('order.packType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderType',width:120, title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity",'goodsQuantity','area','perimeter'] |
| | | const List = ["quantity",'goodsQuantity','area','perimeter','money'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | |
| | | ElMessage.warning(t('order.printingNumber')+rowClickIndex.value.printingNumber) |
| | | dialogTableVisible.value = true |
| | | sheetIndex.value=4 |
| | | if(rowClickIndex.value.processReview===2 && rowClickIndex.value.orderReview===0){ |
| | | reviewDisabled.value=false |
| | | } |
| | | break |
| | | } |
| | | case 'sheet5': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | ElMessage.warning(t('order.printingNumber')+rowClickIndex.value.printingNumber) |
| | | dialogTableVisible.value = true |
| | | sheetIndex.value=5 |
| | | if(rowClickIndex.value.processReview===2 && rowClickIndex.value.orderReview===0){ |
| | | reviewDisabled.value=false |
| | | } |
| | |
| | | } |
| | | |
| | | const printingNumber = ()=>{ |
| | | request.post(`/order/updateOrderPrintNumber/${rowClickIndex.value.orderId}`).then(res =>{ |
| | | if(sheetIndex.value===4){ |
| | | request.post(`/order/updateOrderPrintNumber/${rowClickIndex.value.orderId}`).then(res =>{ |
| | | |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |
| | | const closeDialog = ()=>{ |
| | | selectOrderList() |
| | | /*selectOrderList() |
| | | console.log(xGrid.value.getTableData())*/ |
| | | |
| | | } |
| | | |
| | | </script> |
| | |
| | | <print-sheet2 id="child" v-else-if="sheetIndex===2" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet3 id="child" v-else-if="sheetIndex===3" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet4 id="child" v-else-if="sheetIndex===4" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet5 id="child" v-else-if="sheetIndex===5" :orderId="rowClickIndex.orderId" /> |
| | | |
| | | </el-dialog> |
| | | |
| | |
| | | @ApiOperation("订单加工单打印-小片明细") |
| | | @GetMapping ("/printOrderProductGlassDetail/{orderId}") |
| | | public Result printOrderProductGlassDetail(@PathVariable String orderId) { |
| | | |
| | | return Result.seccess(orderService.printOrderProductGlassDetail(orderId)); |
| | | } |
| | | @ApiOperation("订单加工单打印-小片明细1") |
| | | @PostMapping ("/printOrderProductGlassDetailMonolithic/{orderId}") |
| | | public Result printOrderProductGlassDetailMonolithic(@PathVariable String orderId,@RequestBody List<String> selectedValues) { |
| | | return Result.seccess(orderService.printOrderProductGlassDetailMonolithic(orderId,selectedValues)); |
| | | } |
| | | @ApiOperation("订单加工单打印-成品2") |
| | | @GetMapping ("/printOrderProductDetail/{orderId}/{selectedValues}") |
| | | public Result printOrderProductDetail(@PathVariable String orderId,@PathVariable List<String> selectedValues) { |
| | |
| | | private String levelTwo; |
| | | @ExcelProperty("总厚度") |
| | | private String totalThickness; |
| | | @ExcelProperty("客户简称") |
| | | private String customerAbbreviation; |
| | | } |
| | |
| | | private Double area; |
| | | private Integer quantity; |
| | | private Double money; |
| | | private Double price; |
| | | private String deliveryDetailRemakes; |
| | | private Integer deliveryDetailState; |
| | | private String otherColumns; |
| | |
| | | |
| | | List<OrderDetail> getOrderProductByProductId(Object productId, String orderId); |
| | | |
| | | List<Map<String,Object>> getOrderProductByProductIds(Object productId, String orderId); |
| | | |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface OrderGlassDetailMapper extends BaseMapper<OrderGlassDetail> { |
| | |
| | | void updateSizeAndProcess(@Param("orderGlassDetails")List<OrderGlassDetail> orderGlassDetails); |
| | | |
| | | Integer getDifferentSizeNumber(String orderId, Integer orderNumber); |
| | | |
| | | List<Map<String,Object>> getOrderGlassDetailByProductId(String orderId, String glassChild,Long productId); |
| | | |
| | | List<OrderGlassDetail> getOrderGlassDetailByProductIdGlassChild(String orderId, Integer orderNumber); |
| | | } |
| | |
| | | } |
| | | double deliveryDetailMoney = 0.0; |
| | | if (calculateType==1){ |
| | | deliveryDetailMoney=Double.valueOf(String.format("%.2f",Double.valueOf(String.format("%.2f", (orderDetail.getWidth()*orderDetail.getHeight()/1000000))) |
| | | deliveryDetailMoney=Double.valueOf(String.format("%.2f",orderDetail.getComputeArea() |
| | | *orderDetail.getDeliveryDetail().getQuantity()*orderDetail.getPrice())); |
| | | }else if (calculateType==2){ |
| | | deliveryDetailMoney=Double.valueOf(String.format("%.2f",Double.valueOf( |
| | | String.format("%.2f", (orderDetail.getWidth()*orderDetail.getHeight()/1000000)*orderDetail.getDeliveryDetail().getQuantity()) |
| | | String.format("%.2f", (orderDetail.getComputeArea())*orderDetail.getDeliveryDetail().getQuantity()) |
| | | )*orderDetail.getPrice())); |
| | | }else if (calculateType==3){ |
| | | deliveryDetailMoney=Double.valueOf(String.format("%.2f",orderDetail.getPrice() * orderDetail.getDeliveryDetail().getQuantity())); |
| | |
| | | if (delivery.getFreightPrice()!=null&&delivery.getFreightQuantity()!=null){ |
| | | freight=delivery.getFreightPrice()*delivery.getFreightQuantity(); |
| | | } |
| | | |
| | | int intMoney= (int) Math.floor(money+freight+otherMoneys); |
| | | //修改发货明细累加面积数量金额 |
| | | deliveryMapper.updatedelivery(Double.valueOf(String.format("%.2f", area)), quantity, Double.valueOf(intMoney), otherMoney.get(), oddNumber); |
| | |
| | | return returns; |
| | | } |
| | | |
| | | public Object printOrderProductGlassDetailMonolithic(String orderId,List<String> productId) { |
| | | List<Map<String,Object>> orderProductDistinct; |
| | | if (productId.size()>0){ |
| | | orderProductDistinct = orderDetailMapper.getOrderProductDistinctByIds(orderId,productId); |
| | | }else{ |
| | | orderProductDistinct = orderDetailMapper.getOrderProductDistinctById(orderId); |
| | | } |
| | | |
| | | Map<String,Object> returns = new HashMap<>(); |
| | | returns.put("order",orderMapper.selectOne(new QueryWrapper<Order>().eq("order_id",orderId))); |
| | | |
| | | List<Map<String,Object>> orderProductDetail = new ArrayList<>(); |
| | | |
| | | orderProductDistinct.forEach(map->{ |
| | | Map<String,Object> orderProductDetailMap = new HashMap<>(); |
| | | orderProductDetailMap.put("productId",map.get("productId")); |
| | | orderProductDetailMap.put("productName",map.get("productName")); |
| | | List<Map<String,Object>> orderDetails = orderDetailMapper.getOrderProductByProductIds(map.get("productId"),orderId); |
| | | List<Map<String,Object>> orderProductDetail1 = new ArrayList<>(); |
| | | |
| | | for(Map<String,Object> objectMap:orderDetails){ |
| | | Map<String,Object> orderProductDetailMap1 = new HashMap<>(); |
| | | orderProductDetailMap1.put("detail",objectMap.get("detail").toString()); |
| | | List<Map<String,Object>> orderGlassDetails =orderGlassDetailMapper.getOrderGlassDetailByProductId(objectMap.get("order_id").toString(), |
| | | objectMap.get("detail").toString(), Long.valueOf(objectMap.get("product_id").toString())); |
| | | orderProductDetailMap1.put("orderGlassDetails",orderGlassDetails); |
| | | orderProductDetail1.add(orderProductDetailMap1); |
| | | } |
| | | |
| | | /*orderDetails.forEach(orderDetail->{ |
| | | List<OrderGlassDetail> glassChildList=orderGlassDetailMapper.getOrderGlassDetailByProductIdGlassChild(orderDetail.getOrderId(),orderDetail.getOrderNumber()); |
| | | |
| | | for (OrderGlassDetail glassChildLists:glassChildList){ |
| | | orderProductDetailMap1.put("glassChild",glassChildLists.getGlassChild()); |
| | | List<OrderGlassDetail> orderGlassDetails =orderGlassDetailMapper.getOrderGlassDetailByProductId(orderDetail.getOrderId(),orderDetail.getOrderNumber(),glassChildLists.getGlassChild()); |
| | | Integer differentSize = orderGlassDetailMapper.getDifferentSizeNumber(orderId,orderDetail.getOrderNumber()); |
| | | orderDetail.setDifferentSize(differentSize); |
| | | orderDetail.setOrderGlassDetails(orderGlassDetails); |
| | | orderProductDetailMap1.put("orderGlassDetail",orderGlassDetails); |
| | | } |
| | | orderProductDetail1.add(orderProductDetailMap1); |
| | | |
| | | });*/ |
| | | orderProductDetailMap.put("productDetail",orderProductDetail1); |
| | | orderProductDetail.add(orderProductDetailMap); |
| | | }); |
| | | returns.put("orderDetail",orderProductDetail); |
| | | return returns; |
| | | } |
| | | |
| | | public Object printOrderProductGlassDetail(String orderId) { |
| | | Map<String,Object> returns = new HashMap<>(); |
| | | returns.put("order",orderMapper.selectOne(new QueryWrapper<Order>().eq("order_id",orderId))); |
| | |
| | | od.width, |
| | | od.height, |
| | | ogd.glass_child, |
| | | ogd.process, |
| | | e.type_name, |
| | | opd.stock_id, |
| | | od.quantity, |
| | |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | ogd.glass_child, |
| | | ogd.process, |
| | | c.customer_abbreviation as customer_name, |
| | | ifnull(od.processing_note,'') as processing_note, |
| | | bgt.type_name, |
| | |
| | | |
| | | <insert id="insertDeliveryDetail" useGeneratedKeys="true" > |
| | | insert into sd.delivery_detail (delivery_id,delivery_number,order_number, |
| | | area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,other_columns,create_time) |
| | | area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,other_columns,create_time,price) |
| | | values ( |
| | | #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeArea}*#{orderDetail.deliveryDetail.quantity}, |
| | | #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity}, |
| | | #{deliveryDetailMoney},'',1,#{orderDetail.otherColumns},now() |
| | | #{deliveryDetailMoney},'',1,#{orderDetail.otherColumns},now(),#{orderDetail.price} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | od.building_number, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.price, |
| | | dd.price, |
| | | fgi.storage_region, |
| | | dd.money, |
| | | od.width, |
| | |
| | | </if> |
| | | |
| | | </where> |
| | | order by dd.id desc |
| | | order by dd.id |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | dd.area, |
| | | ifnull(od.processing_note,"") as processingNote, |
| | | ifnull(od.building_number,"") as buildingNumber, |
| | | od.price, |
| | | dd.price, |
| | | od.other_columns |
| | | from delivery_detail dd |
| | | left join order_detail od on dd.order_id = od.order_id and dd.order_number = od.order_number |
| | |
| | | b.delivery, |
| | | b.create_time, |
| | | b.update_time, |
| | | d.type_name as level_one, e.type_name as level_two |
| | | d.type_name as level_one, |
| | | e.type_name as level_two, |
| | | f.customer_abbreviation |
| | | from sd.order_detail as a |
| | | left join sd.`order` as b |
| | | on b.order_id = a.order_id |
| | | left join sd.customer as f |
| | | on f.id = b.customer_id |
| | | left join sd.product as c |
| | | on c.id = a.product_id |
| | | left join sd.basic_glass_type as d |
| | |
| | | order by id; |
| | | </select> |
| | | |
| | | <select id="getOrderProductByProductIds"> |
| | | select * |
| | | from sd.order_detail od |
| | | left join sd.product_detail pd on od.product_id = pd.prod_id |
| | | where od.order_id = #{orderId} and od.product_id=#{productId} |
| | | and pd.detail_type = 'glass' |
| | | group by od.product_id,pd.detail |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | |
| | | group by child_width,child_height) as c |
| | | </select> |
| | | |
| | | <select id="getOrderGlassDetailByProductIdGlassChild" > |
| | | select a.glass_child |
| | | from sd.order_glass_detail as a |
| | | where a.order_id = #{orderId} |
| | | and a.order_number = #{orderNumber} |
| | | group by a.glass_child |
| | | </select> |
| | | |
| | | <select id="getOrderGlassDetailByProductId" > |
| | | select * |
| | | from sd.order_detail od |
| | | LEFT join sd.order_glass_detail ogd on ogd.order_id=od.order_id and ogd.order_number=od.order_number |
| | | where od.order_id = #{orderId} and od.product_id=#{productId} |
| | | and ogd.glass_child=#{glassChild} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and o.delivery_address REGEXP #{order.deliveryAddress} |
| | | </if> |
| | | order by o.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | | <update id="reviewOrderById"> |