Merge branch 'master' of http://bore.pub:10439/r/ERP_override
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 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> |
| | |
| | | <td>{{ item2.technologyNumber }}</td> |
| | | <td colspan="4"> {{item2.glassChild}}</td> |
| | | <td>{{item2.childWidth}}</td> |
| | | <td>{{item1.bendRadius}}</td> |
| | | <td>{{item2.arc}}</td> |
| | | <td>{{item2.childHeight}}</td> |
| | | <td>{{item1.archRise}}</td> |
| | | <td colspan="4"></td> |
| | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'print', name: t('processCard.print'), status: 'primary'}, |
| | | {code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'}, |
| | | {code: 'customLabel', name: t('processCard.customLabelPrinting'), status: 'primary'}, |
| | | |
| | | ], |
| | |
| | | let produceList = ref([]) |
| | | let labelList = ref([]) |
| | | let list = ref([]) |
| | | let projectNo = ref([]) |
| | | |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | projectNo.value = route.query.projectNo |
| | | onMounted(() => { |
| | | |
| | | request.post(`/processCard/getSelectPrintLabel`, data.value).then((res) => { |
| | | request.post(`/processCard/getSelectPrintLabel/${projectNo.value}`).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | console.log(res.data.data) |
| | | produceList.value = deepClone(res.data.data) |
| | | |
| | | console.log(produceList.value) |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | /*for (let i = 0; i < produceList.value.length; i++) { |
| | | let count= produceList.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | for (let k = 0; k < produceList.value[i].data[j].quantity; k++){ |
| | |
| | | |
| | | } |
| | | } |
| | | console.log(labelList.value) |
| | | console.log(labelList.value)*/ |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <div id="entirety" v-for="(item,id) in labelList" > |
| | | <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.child_width}}*{{item.child_height}}={{item.quantity}}</div> |
| | | <div class="row3">{{item.width}}*{{item.height}}={{item.quantity}}</div> |
| | | <div class="row5"> |
| | | <span>{{item.project}}</span> |
| | | <span>{{ item.remarks }}</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> |
| | |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: { orderId: row.order_id }}) |
| | | router.push({path: '/main/processCard/PrintLabel', query: { projectNo: row.project_no }}) |
| | | break |
| | | } |
| | | } |
| | |
| | | request.post(`/processCard/selectPrintPrintProject/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | produceList.value = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList.value) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | {title: t('basicData.operate'), width: 80, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'order_id', |
| | | field: 'project_no', |
| | | title: '工程号', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'quantity', |
| | | field: 'glass_total', |
| | | title: t('order.quantity'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'area', |
| | | field: 'glass_total_area', |
| | | title: t('order.area'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'}, |
| | | ], |
| | | |
| | | zoom: true, |
| | |
| | | |
| | | |
| | | 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 |
| | |
| | | </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> |
| | |
| | | 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() |
| | |
| | | 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) =>{ |
| | |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | 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}, |
| | | ] |
| | | ] |
| | | } |
| | |
| | | } |
| | | |
| | | }) |
| | | const printContent = ref({ |
| | | id: 'child', |
| | | |
| | | }) |
| | | |
| | | |
| | | </script> |
| | |
| | | <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> |
| | |
| | | </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> |
| | | |
| | |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true,gt:13 },//开启虚拟滚动 |
| | | scrollX:{ enabled: true,gt:7 },//开启虚拟滚动 |
| | | scrollY:{ enabled: true,gt:0 },//开启虚拟滚动 |
| | | scrollX:{ enabled: true,gt:0 },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | menuConfig: { |
| | | body: { |
| | |
| | | ElMessage.error( t('order.msg.tableLengthNot')) |
| | | return |
| | | } |
| | | computedMoney() |
| | | if(!gridOptions.menuConfig.body.options[0][5].disabled){ |
| | | ElMessage.error(t('order.msg.amountReset')) |
| | | return |
| | |
| | | break |
| | | } |
| | | case 'computedMoney' :{ |
| | | const dataList = xGrid.value.getTableData().fullData |
| | | dataList.forEach((item,index) =>{ |
| | | item.area = area(item) |
| | | item.grossArea = countArea(item) |
| | | item.computeArea = item.area |
| | | item.computeGrossArea = item.grossArea |
| | | item.grossAmount=parseFloat((item.price * item.computeGrossArea).toFixed(2)) |
| | | }) |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | computedMoney() |
| | | |
| | | gridOptions.menuConfig.body.options[0][5].disabled=true |
| | | break |
| | | } |
| | | case 'errorArea' :{ |
| | |
| | | } |
| | | }) |
| | | } |
| | | const computedMoney = () => { |
| | | const dataList = xGrid.value.getTableData().fullData |
| | | dataList.forEach((item,index) =>{ |
| | | item.area = area(item) |
| | | item.grossArea = countArea(item) |
| | | item.computeArea = item.area |
| | | item.computeGrossArea = item.grossArea |
| | | item.grossAmount=parseFloat((item.price * item.computeGrossArea).toFixed(2)) |
| | | }) |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | |
| | | gridOptions.menuConfig.body.options[0][5].disabled=true |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //页面第一次加载执行 |
| | |
| | | const data = event.target ? event.target.result : '' |
| | | const workbook = XLXS.read(data, { type: 'binary' }) |
| | | let jsonData = XLXS.utils.sheet_to_json(workbook.Sheets.Sheet1).slice(1) |
| | | |
| | | if(jsonData.length>maxTableLen.value){ |
| | | ElMessage.error(`${t('order.msg.importMaxCheckFailFirst')} |
| | | ${jsonData.length} |
| | |
| | | return |
| | | } |
| | | jsonData.forEach((item,index) => { |
| | | for(let key in item){ |
| | | if(key.indexOf('.')!==-1){ |
| | | const value = item[key]; |
| | | delete item[key]; // 删除原有的属性 |
| | | setNestedProperty(item, key, value); |
| | | } |
| | | } |
| | | |
| | | |
| | | if(item.computeArea === undefined){ |
| | | item.computeArea = area(item) |
| | | } |
| | |
| | | downLoadFile('/importTemplate.xlsx','importTemplate.xlsx') |
| | | } |
| | | |
| | | function setNestedProperty(obj, path, value) { |
| | | const keys = path.split('.'); |
| | | const lastKey = keys.pop(); |
| | | let cursor = obj; |
| | | |
| | | keys.forEach(key => { |
| | | cursor = cursor[key] !== undefined ? cursor[key] : (cursor[key] = {}); |
| | | }); |
| | | |
| | | cursor[lastKey] = value; |
| | | } |
| | | |
| | | |
| | | //字符串转object |
| | | |
| | | function getNestedProperty(obj, path) { |
| | |
| | | } |
| | | |
| | | @ApiOperation("打印标签数据查询接口") |
| | | @PostMapping("/getSelectPrintLabel") |
| | | public Result getSelectPrintLabel(@RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.getSelectPrintLabelSv(object)); |
| | | @PostMapping("/getSelectPrintLabel/{projectNo}") |
| | | public Result getSelectPrintLabel(@PathVariable String projectNo) { |
| | | return Result.seccess(flowCardService.getSelectPrintLabelSv(projectNo)); |
| | | } |
| | | |
| | | @ApiOperation("打印自定义标签数据查询接口") |
| | |
| | | return Result.seccess(flowCardService.getCustomLabelDetailSv(name,form,id, flowCard)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("工程打印查询接口") |
| | | @SaCheckPermission("SelectPrintFlowCard.search") |
| | | @PostMapping("/selectPrintPrintProject/{selectTime1}/{selectTime2}") |
| | | public Result selectPrintFlowCard( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2) { |
| | | return Result.seccess(flowCardService.selectPrintFlowCard(selectTime1, selectTime2)); |
| | | } |
| | | } |
| | |
| | | private Double childHeight; |
| | | private Double area; |
| | | private Double totalArea; |
| | | private Double arc;//弧长 |
| | | private String icon; |
| | | private String process; |
| | | private String productionId; |
| | |
| | | |
| | | List<Map<String, String>> selectPrintFlowCardMp(Date selectTime1, Date selectTime2, String orderId, String project, FlowCard flowCard); |
| | | |
| | | List<Map<String, String>> selectPrintFlowCard(Date selectTime1, Date selectTime2); |
| | | |
| | | List<Map<String, String>> selectPrintMp(String orderId, FlowCard flowCard); |
| | | |
| | | List<Map<String, String>> getPrimaryList(String processId, Integer technologyNumber); |
| | |
| | | |
| | | Boolean updateComposing(String processId); |
| | | |
| | | List<Map<String, String>> getPrintLabel(String processId, Integer technologyNumber); |
| | | List<Map<String, String>> getPrintLabel(String projectNo); |
| | | |
| | | List<Map<String, String>> printFlowCardDetailsMp(String processId, String technologyNumber, FlowCard flowCard); |
| | | |
| | |
| | | |
| | | import java.io.StringReader; |
| | | import java.sql.Date; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | |
| | | import static com.example.erp.service.sd.OrderService.getOrderProcessDetails; |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Object selectPrintFlowCard(Date selectTime1, Date selectTime2) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectPrintFlowCard(selectTime1, selectTime2)); |
| | | return map; |
| | | } |
| | | |
| | | public Object selectPrintSv(String orderId, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectPrintMp(orderId, flowCard)); |
| | |
| | | } |
| | | } |
| | | |
| | | public Map<String, Object> getSelectPrintLabelSv(Map<String, Object> object) { |
| | | public Map<String, Object> getSelectPrintLabelSv(String projectNo) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.getPrintLabel(projectNo)); |
| | | return map; |
| | | /* Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | |
| | | } |
| | | |
| | | map.put("data", list); |
| | | return map; |
| | | return map;*/ |
| | | } |
| | | |
| | | public Map<String, Object> printFlowCardDetailsSv(String processId, String technologyNumber, FlowCard flowCard) { |
| | |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectPrintFlowCard"> |
| | | select * from pp.optimize_project where create_time between #{selectTime1} and #{selectTime2} and state>=20 |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectPrintMp"> |
| | | select fc.id, |
| | | fc.order_id, |
| | |
| | | </update> |
| | | |
| | | <select id="getPrintLabel"> |
| | | select c.customer_name, |
| | | c.order_id, |
| | | select o.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | od.building_number, |
| | | od.processing_note, |
| | | od.width, |
| | | od.height, |
| | | ogd.glass_child, |
| | | e.type_name, |
| | | b.remarks, |
| | | c.project, |
| | | a.child_width, |
| | | a.child_height, |
| | | sum(b.quantity) as quantity, |
| | | a.glass_child, |
| | | b.processing_note |
| | | from sd.order_glass_detail as a |
| | | left join sd.order_detail as b |
| | | on a.order_id = b.order_id |
| | | and a.order_number = b.order_number |
| | | left join sd.`order` as c |
| | | on c.order_id = a.order_id |
| | | left join flow_card as d |
| | | on d.order_id = a.order_id and d.order_number = a.order_number and |
| | | d.technology_number = a.technology_number |
| | | left join sd.basic_glass_type e |
| | | on e.type_id = b.product_id |
| | | where d.process_id = #{processId} |
| | | and d.technology_number = #{technologyNumber} |
| | | group by a.glass_child, a.child_width, a.child_height |
| | | order by d.technology_number |
| | | opd.stock_id, |
| | | od.quantity |
| | | from pp.optimize_detail opd |
| | | left join sd.`order` o on SUBSTR(opd.process_id,1,10)=o.order_id |
| | | left join sd.order_detail od on SUBSTR(opd.process_id,1,10)=od.order_id and opd.order_sort=od.order_number |
| | | left join sd.order_glass_detail ogd on SUBSTR(opd.process_id,1,10)=ogd.order_id and opd.order_sort=ogd.order_number |
| | | left join sd.product p on od.product_id = p.id |
| | | left join sd.basic_glass_type e on e.type_id = p.type_id |
| | | where opd.project_no=#{projectNo} order by opd.stock_id |
| | | </select> |
| | | |
| | | <select id="printFlowCardDetailsMp"> |
| | |
| | | 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 |
| | |
| | | total_area, |
| | | |
| | | process, |
| | | `group`) |
| | | `group` |
| | | ,arc) |
| | | select |
| | | od.order_id, |
| | | od.order_number, |
| | |
| | | if(pd.glass_sort=1,'(外)',if(pd2.glass_sort=pd.glass_sort,'(内)','')), |
| | | pd.detail, |
| | | if( od.bend_radius!='', |
| | | round(od.width*(od.bend_radius-round(sum(t.thicknessCount),2))/od.bend_radius,1), |
| | | round(od.width* |
| | | (od.bend_radius-round( |
| | | sum(t.thicknessCount)-t1.thicknessCount/2 |
| | | ,2)) |
| | | /od.bend_radius |
| | | ,1), |
| | | od.width |
| | | ), |
| | | ) |
| | | , |
| | | |
| | | od.height, |
| | | od.area, |
| | | od.gross_area, |
| | | pd.process, |
| | | pd.glass_group |
| | | pd.glass_group, |
| | | if( od.bend_radius!='', |
| | | round((od.width*(od.bend_radius-(sum(t.thicknessCount)-t1.thicknessCount)))/od.bend_radius,1) |
| | | ,null) as 'arc' |
| | | |
| | | |
| | | from sd.product_detail as pd |
| | | left join order_detail as od |
| | | on od.product_id = pd.prod_id and pd.detail_type='glass' |
| | |
| | | a.prod_id, |
| | | a.sort_num, |
| | | a.glass_sort, |
| | | (case |
| | | when a.sort_num=1 |
| | | then left(detail,LOCATE('mm',detail)-1)/2 |
| | | else |
| | | left(detail,LOCATE('mm',detail)-1) |
| | | end) as 'thicknessCount' |
| | | left(detail,LOCATE('mm',detail)-1) as 'thicknessCount' |
| | | |
| | | from product_detail as a |
| | | group by prod_id,a.sort_num |
| | | ) as t |
| | | ON t.prod_id = od.product_id and t.sort_num <=pd.sort_num |
| | | left join ( |
| | | select |
| | | a.prod_id, |
| | | a.sort_num, |
| | | a.glass_sort, |
| | | left(detail,LOCATE('mm',detail)-1) as 'thicknessCount' |
| | | |
| | | from product_detail as a |
| | | group by prod_id,a.sort_num |
| | | ) as t1 |
| | | ON t1.prod_id = od.product_id and t1.sort_num =pd.sort_num |
| | | |
| | | where od.order_id = #{orderId} |
| | | group by od.order_number,pd.glass_sort |