north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryPrinting.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue
New file @@ -0,0 +1,246 @@ <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 delivery = ref([]) let money = ref("") 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){ produceList.value = deepClone(res.data.data) delivery.value=deepClone(res.data.delivery) money.value=deepClone(res.data.money) }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> <div id="sheet" style="width: 100%;height: 100%"> <div style="font-size: 30px;text-align: center;font-weight: bold;">{{company.companyName}}</div> <el-row :gutter="20"> <el-col :span="7"><div></div></el-col> <el-col :span="10"><div style="font-size: 25px;text-align: center;font-weight: bold;">销售发货单</div></el-col> <el-col :span="7"> <div style="display: flex;margin-top: 10px;"> <div style="font-weight: bold;font-size: 15px">发货单号:</div> <div style="font-weight: bold;font-size: 15px">{{delivery.deliveryId}}</div> </div> </el-col> </el-row> <div style="border: 1px solid #d3dce6;border-collapse: collapse;width: 100%;height: 100%;"> <table id="table1" style="border: 1px solid #d3dce6;border-collapse: collapse;width: 100%;height: 100%;"> <tr> <th style="text-align: left;border:none;" colspan="3">客户名称:<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="6">送货地址:<span>{{delivery.deliveryAddress}}</span></th> <th style="text-align: left;border:none;" colspan="2">联系电话:<span>{{delivery.contactNumber}}</span></th> </tr> <tr> <th style="width: 6%;">序号</th> <th style="width: 20%;">楼层编号</th> <th style="width: 20%;">宽(弧度)*高</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%;">加工要求</th> </tr> <template v-for="(item, index) in produceList" :key="index" > <tr> <td style="font-size: 15px;font-weight: bold;" colspan="3">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td> <td style="font-size: 15px;font-weight: bold;" colspan="3">对方单号:</td> <td style="font-size: 15px;font-weight: bold;" colspan="2">订单编号:<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 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>{{items.processingNote}}</td> </tr> <tr class="day-in" > <td style="font-size: 15px;font-weight: bold;" colspan="3">小计:</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;font-weight: bold;" colspan="3">合计:</td> <td>{{delivery.quantity}}</td> <td>{{delivery.area}}</td> <td></td> <td>{{delivery.money}}</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="3"> <div style="display: flex;font-size: 10px;"> <div>加工费用</div> <div style="margin-left: 20%">单价</div> <div style="margin-left: 20%">数量</div> <div style="margin-left: 20%">金额</div> </div> </td> <td style="text-align: left;border:none;font-size: 15px;font-weight: bold;" 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="3"></td> <td style="text-align: left;border:none;font-size: 15px;font-weight: bold;" colspan="5">大写金额: {{money}}</td> </tr> </table> </div> <el-row :gutter="20"> <el-col :span="3"><div class="bottom">制单员:<span style="font-size: 10px">{{delivery.creator}}</span></div></el-col> <el-col :span="5"><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="4"><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="3"><div class="bottom">架子 只</div></el-col> <el-col :span="21"><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> </div> </div> </template> <style scoped> #sheet{ } #table1 tr{ height: 30px; } #table1 th{ height: 30px; border: 1px solid #d3dce6; border-collapse: collapse; font-size: 15px; font-weight: bold; } .day-in td{ text-align: center; } #table1 td{ border: 1px solid #d3dce6; border-collapse: collapse; } #deliveryPrinting .el-dialog__header{ visibility:hidden } .title-1{ width: 76px; } .title-s,.title-s th{ border:0 } .hr-border{ height: 2px; width: 100%; background-color: black; color: black; } </style> north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
@@ -114,16 +114,16 @@ <div id="entirety" v-for="(item,id) in produceList" > <div class="row1">{{ item.customer_name }}</div> <div class="row2"> <span>{{ item.order_id }}</span> <span>{{ item.order_id }}</span> <span>{{ item.type_name }}</span> </div> <div class="row3">{{item.width}}*{{item.height}}={{item.quantity}}</div> <div class="row5"> <span>{{item.project}}</span> <span>{{item.project}}</span> <span>{{ item.building_number }}</span> </div> <div class="row6"> <span>{{item.glass_child}}</span> <span>{{item.glass_child}}</span> <span>{{item.processing_note}}</span> </div> </div> north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryPrinting.vue
@@ -69,25 +69,6 @@ onMounted(()=>{ /*if(props.deliveryId===null || props.deliveryId===undefined || props.deliveryId===''){ return } form.value.deliveryId = props.deliveryId*/ /*form.value.orderId='NG24060501' request.post(`/Delivery/getSelectOrderPrinting`,form.value).then((res) => { if(res.code==200){ produceList.value = deepClone(res.data.data) delivery.value=deepClone(res.data.delivery) money.value=deepClone(res.data.money) console.log(res.data.data) }else{ ElMessage.warning(res.msg) router.push("/login") } })*/ if(route.query.deliveryID===null || route.query.deliveryID===undefined || route.query.deliveryID===''){ return @@ -236,119 +217,6 @@ </div> </div> <!-- <div> <el-button @click="Printing" style="margin-top: -5px" id="searchButton" type="primary" >打印</el-button> <div id="pis" style="width: 100%;height: 100%"> <div style="font-size: 30px;text-align: center;font-weight: bold;">常州市吉利玻璃有限公司</div> <el-row :gutter="20"> <el-col :span="7"><div></div></el-col> <el-col :span="10"><div style="font-size: 25px;text-align: center;font-weight: bold;">销售发货单</div></el-col> <el-col :span="7"> <div style="display: flex;margin-top: 10px;"> <div style="font-weight: bold;font-size: 15px">发货单号:</div> <div style="font-weight: bold;font-size: 15px">{{delivery.deliveryId}}</div> </div> </el-col> </el-row> <div style="border: 1px solid #d3dce6;border-collapse: collapse;width: 100%;height: 100%;"> <table id="table1" style="border: 1px solid #d3dce6;border-collapse: collapse;width: 100%;height: 100%;"> <tr> <th style="text-align: left;border:none;" colspan="3">客户名称:<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="6">送货地址:<span>{{delivery.deliveryAddress}}</span></th> <th style="text-align: left;border:none;" colspan="2">联系电话:<span>{{delivery.contactNumber}}</span></th> </tr> <tr> <th style="width: 6%;">序号</th> <th style="width: 20%;">楼层编号</th> <th style="width: 20%;">宽(弧度)*高</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%;">加工要求</th> </tr> <template v-for="(item, index) in produceList" :key="index" > <tr> <td style="font-size: 15px;font-weight: bold;" colspan="3">产品名称:<span>{{item.DeliveryDetail.productName}}</span></td> <td style="font-size: 15px;font-weight: bold;" colspan="3">对方单号:</td> <td style="font-size: 15px;font-weight: bold;" colspan="2">订单编号:<span>{{item.DeliveryDetail.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 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>{{items.processingNote}}</td> </tr> <tr class="day-in" > <td style="font-size: 15px;font-weight: bold;" colspan="3">小计:</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;font-weight: bold;" colspan="3">合计:</td> <td>{{delivery.quantity}}</td> <td>{{delivery.area}}</td> <td></td> <td>{{delivery.money}}</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="3"> <div style="display: flex;font-size: 10px;"> <div>加工费用</div> <div style="margin-left: 20%">单价</div> <div style="margin-left: 20%">数量</div> <div style="margin-left: 20%">金额</div> </div> </td> <td style="text-align: left;border:none;font-size: 15px;font-weight: bold;" 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="3"></td> <td style="text-align: left;border:none;font-size: 15px;font-weight: bold;" colspan="5">大写金额: {{money}}</td> </tr> </table> </div> <el-row :gutter="20"> <el-col :span="3"><div class="bottom">制单员:<span style="font-size: 10px">{{delivery.creator}}</span></div></el-col> <el-col :span="5"><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="4"><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="3"><div class="bottom">架子 只</div></el-col> <el-col :span="21"><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> </div> </div>--> </template> <style> north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -10,6 +10,8 @@ import { useI18n } from 'vue-i18n' import DeliveryPrinting from "@/views/sd/delivery/DeliveryPrinting.vue"; import footSum from "@/hook/footSum" import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global"; import PrintSheet1 from "@/components/sd/delivery/PrintSheet1.vue"; //语言获取 const { t } = useI18n() @@ -18,6 +20,7 @@ const username = userStore.user.userName const userid = userStore.user.userId const dialogTableVisible = ref(false) let sheetIndex = ref(-1) let rowClickIndex = ref(null) let produceList = ref([]) const getTableRow = (row,type) =>{ @@ -187,7 +190,16 @@ dialogTableVisible.value = true break } case 'sheet1': { if(rowClickIndex.value===null){ ElMessage.warning(t('searchOrder.msgList.checkOrder')) return } console.log(rowClickIndex.value.deliveryId) dialogTableVisible.value = true sheetIndex.value=1 break } } } }, @@ -228,7 +240,7 @@ body: { options: [ [ { code: 'getProcessList', name: t('basicData.print'), prefixIcon: 'vxe-icon-file-txt', visible: true} { code: 'sheet1', name: t('basicData.print'), prefixIcon: 'vxe-icon-file-txt', visible: true}, ] ] } @@ -282,6 +294,10 @@ } }) const printContent = ref({ id: 'child', }) </script> @@ -329,7 +345,7 @@ <el-button @click="getTableRow(row,'edit')" v-if="userStore.user.permissions.indexOf('selectDelivery.edit') > -1" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> <el-button @click="getTableRow(row,'printing')" :disabled="row.deliveryState!==2" link type="primary" size="small">打印</el-button> <!-- <el-button @click="getTableRow(row,'printing')" :disabled="row.deliveryState!==2" link type="primary" size="small">打印</el-button>--> <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')"> <template #reference> <el-button :disabled="row.deliveryState===2" link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> @@ -360,15 +376,43 @@ </vxe-grid> <el-dialog :key="dialogKey" id="print" v-model="dialogTableVisible" destroy-on-close id="deliveryPrinting" style="width: 100%;height:100%;margin-top: 0; "> <DeliveryPrinting :deliveryId="rowClickIndex.deliveryId" style="width: 100%;height: 100%;" /> style="width: 75%;height:75% " > <template #header="{ close, titleId, titleClass }"> <el-button v-print="printContent" :icon="Printer" circle /> </template> <print-sheet1 id="child" v-if="sheetIndex===1" :deliveryId="rowClickIndex.deliveryId" /> </el-dialog> </div> </template> <style scoped> :deep(.el-tabs__content) { width: 100%; height: 86%; } .el-tab-pane{ width: 100%; height: 100%; } :deep(#print .el-dialog__body){ height: 85%; width: 100%; overflow-y: auto; } #child{ width:100%; height: 100%; } </style> north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml
@@ -908,7 +908,7 @@ dd.money, dd.area, ifnull(od.processing_note,"") as processingNote, ifnull(od.buildingNumber,"") as buildingNumber, ifnull(od.building_number,"") as buildingNumber, od.price from delivery_detail dd left join order_detail od on dd.order_id = od.order_id and dd.order_number = od.order_number