| | |
| | | export default { |
| | | serverUrl:"localhost:8086" |
| | | serverUrl:"localhost:8086", |
| | | //serverUrl:"192.168.1.199:8086" |
| | | } |
New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {computed, onMounted, ref} from "vue" |
| | | |
| | | let props = defineProps({ |
| | | orderId:null |
| | | }) |
| | | let data = ref({ |
| | | order:{ |
| | | processingNote:'' |
| | | }, |
| | | orderProductDetail:[] |
| | | }) |
| | | const grossNum = ref({ |
| | | quantity: 0, |
| | | grossArea: 0, |
| | | perimeter: 0 |
| | | }) |
| | | const getData = () => { |
| | | request.get(`/order/printOrderProductDetail/${props.orderId}`).then(res => { |
| | | data.value= res.data |
| | | res.data.orderProductDetail.forEach(item => { |
| | | grossNum.value.quantity += getQuantity(item.productDetail) |
| | | grossNum.value.grossArea += getArea(item.productDetail) |
| | | grossNum.value.perimeter += getPerimeter(item.productDetail) |
| | | |
| | | }) |
| | | |
| | | grossNum.value.quantity = parseFloat(grossNum.value.quantity.toFixed(3)) |
| | | grossNum.value.grossArea = parseFloat(grossNum.value.grossArea.toFixed(3)) |
| | | grossNum.value.perimeter = parseFloat(grossNum.value.perimeter.toFixed(3)) |
| | | |
| | | }) |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getData() |
| | | }) |
| | | |
| | | 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)) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | |
| | | <template> |
| | | <div id="sheet"> |
| | | |
| | | <el-row style="margin-bottom: 0.5rem;"> |
| | | <img src="../../../assets/northGlass.ico" alt="" style="max-width: 60px;max-height: 60px"> |
| | | <h1>天津北玻玻璃工业技术有限公司(THBB-QR7.1-01)</h1> |
| | | </el-row > |
| | | <el-row style="text-align: left"> |
| | | <el-col :span="2" ></el-col> |
| | | <el-col :span="8" >地址:天津宝坻区节能环保工业区天兴路西侧宝中道南侧</el-col> |
| | | <el-col :span="2"></el-col> |
| | | <el-col :span="5" >电话:022-59280088</el-col> |
| | | <el-col :span="5" >传真:022-59280066</el-col> |
| | | </el-row> |
| | | <hr> |
| | | <hr class="hr-border"> |
| | | |
| | | <el-row > |
| | | <h3>玻璃加工单</h3> |
| | | </el-row> |
| | | |
| | | <table border="1"> |
| | | <tr> |
| | | <th class="title-1">客户名称</th> |
| | | <th colspan="3"></th> |
| | | <th class="title-1">工程名称</th> |
| | | <th colspan="3"></th> |
| | | </tr> |
| | | <tr> |
| | | <th class="title-1">生产单号</th> |
| | | <th></th> |
| | | <th class="title-1">下单日期</th> |
| | | <th></th> |
| | | <th class="title-1">订单类型</th> |
| | | <th></th> |
| | | <th class="title-1">跟单员</th> |
| | | <th></th> |
| | | </tr> |
| | | <tr> |
| | | <th>磨边</th> |
| | | <th></th> |
| | | <th>完工日期</th> |
| | | <th></th> |
| | | <th>商标</th> |
| | | <th></th> |
| | | <th>包装</th> |
| | | <th></th> |
| | | </tr> |
| | | |
| | | </table> |
| | | <table border="1" > |
| | | <thead> |
| | | <tr> |
| | | <th class="title-1">玻璃图号</th> |
| | | <th>彩釉图号</th> |
| | | <th>编号</th> |
| | | <th>规格(宽W*高H)</th> |
| | | <th>片数</th> |
| | | <th>面积</th> |
| | | <th>延米</th> |
| | | <th>交货日期</th> |
| | | <th>序号</th> |
| | | <th>箱架号</th> |
| | | <th>备注1</th> |
| | | <th>备注2</th> |
| | | <th>磨边/备注/加工内容</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody v-for="(item,index) in data.orderProductDetail" :key="index"> |
| | | <tr> |
| | | <td class="no-change-row">品 种</td> |
| | | <td colspan="9">{{item.productName}}</td> |
| | | <td class="no-change-row">产品描述</td> |
| | | <td colspan="3"></td> |
| | | </tr> |
| | | <tr v-for="(item1,index1) in item.productDetail" :key="index1"> |
| | | <td>{{}}</td> |
| | | <td></td> |
| | | <td></td> |
| | | <td>{{item1.width +'*'+item1.height}}</td> |
| | | <td>{{item1.quantity}}</td> |
| | | <td>{{item1.grossArea}}</td> |
| | | <td>{{item1.perimeter}}</td> |
| | | <td></td> |
| | | <td>{{item1.orderNumber}}</td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td colspan="4">小计</td> |
| | | <td>{{getQuantity(item.productDetail)}}</td> |
| | | <td>{{getArea(item.productDetail)}}</td> |
| | | <td>{{getPerimeter(item.productDetail)}}</td> |
| | | <td colspan="6"></td> |
| | | </tr> |
| | | |
| | | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td colspan="4">总计</td> |
| | | <td>{{grossNum.quantity}}</td> |
| | | <td>{{grossNum.grossArea}}</td> |
| | | <td>{{grossNum.perimeter}}</td> |
| | | <td colspan="6"></td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="13"> |
| | | <!-- v-model=""--> |
| | | <el-input |
| | | v-model="data.order.processingNote" |
| | | :rows="2" |
| | | type="textarea" |
| | | placeholder="" |
| | | readonly |
| | | autosize |
| | | resize="none" |
| | | |
| | | /> |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | <el-row style="text-align: left "> |
| | | <el-col :span="4">下单员:</el-col> |
| | | <el-col :span="4">审核人:</el-col> |
| | | <el-col :span="4">校对:</el-col> |
| | | </el-row> |
| | | <el-row style="text-align: left "> |
| | | <el-col :span="4">创建时间:</el-col> |
| | | <el-col :span="4">审核时间:</el-col> |
| | | <el-col :span="4">打印时间:</el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #sheet{ |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: center; |
| | | } |
| | | 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; |
| | | border: 1px solid black; |
| | | width: 100%; |
| | | } |
| | | th,.no-change-row { |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .title-1{ |
| | | width: 76px; |
| | | } |
| | | |
| | | .hr-border{ |
| | | height: 2px; |
| | | width: 100%; |
| | | background-color: black; |
| | | color: black; |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {computed, onMounted, ref} from "vue" |
| | | |
| | | let props = defineProps({ |
| | | orderId:null |
| | | }) |
| | | let data = ref({ |
| | | order:{ |
| | | processingNote:'' |
| | | }, |
| | | orderProductDetail:[] |
| | | }) |
| | | const grossNum = ref({ |
| | | quantity: 0, |
| | | grossArea: 0, |
| | | perimeter: 0 |
| | | }) |
| | | const getData = () => { |
| | | request.get(`/order/printOrderProductGlassDetail/${props.orderId}`).then(res => { |
| | | data.value= res.data |
| | | console.log(data.value) |
| | | res.data.orderDetail.forEach(item => { |
| | | grossNum.value.quantity += getQuantity(item.productDetail) |
| | | grossNum.value.grossArea += getArea(item.productDetail) |
| | | grossNum.value.perimeter += getPerimeter(item.productDetail) |
| | | }) |
| | | |
| | | |
| | | grossNum.value.quantity = parseFloat(grossNum.value.quantity.toFixed(3)) |
| | | grossNum.value.grossArea = parseFloat(grossNum.value.grossArea.toFixed(3)) |
| | | grossNum.value.perimeter = parseFloat(grossNum.value.perimeter.toFixed(3)) |
| | | |
| | | }) |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getData() |
| | | }) |
| | | |
| | | 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)) |
| | | } |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | |
| | | <template> |
| | | <div id="sheet"> |
| | | |
| | | <el-row style="margin-bottom: 0.5rem;"> |
| | | <img src="../../../assets/northGlass.ico" alt="" style="max-width: 60px;max-height: 60px"> |
| | | <h1>天津北玻玻璃工业技术有限公司(THBB-QR7.1-01)</h1> |
| | | </el-row > |
| | | <el-row style="text-align: left"> |
| | | <el-col :span="2" ></el-col> |
| | | <el-col :span="8" >地址:天津宝坻区节能环保工业区天兴路西侧宝中道南侧</el-col> |
| | | <el-col :span="2"></el-col> |
| | | <el-col :span="5" >电话:022-59280088</el-col> |
| | | <el-col :span="5" >传真:022-59280066</el-col> |
| | | </el-row> |
| | | <hr> |
| | | <hr class="hr-border"> |
| | | |
| | | <el-row > |
| | | <h3>玻璃加工单</h3> |
| | | </el-row> |
| | | |
| | | <table> |
| | | <tr> |
| | | <th class="title-1">客户名称</th> |
| | | <th colspan="3"></th> |
| | | <th class="title-1">工程名称</th> |
| | | <th colspan="3"></th> |
| | | </tr> |
| | | <tr> |
| | | <th class="title-1">生产单号</th> |
| | | <th></th> |
| | | <th class="title-1">下单日期</th> |
| | | <th></th> |
| | | <th class="title-1">订单类型</th> |
| | | <th></th> |
| | | <th class="title-1">跟单员</th> |
| | | <th></th> |
| | | </tr> |
| | | <tr> |
| | | <th>磨边</th> |
| | | <th></th> |
| | | <th>完工日期</th> |
| | | <th></th> |
| | | <th>商标</th> |
| | | <th></th> |
| | | <th>包装</th> |
| | | <th></th> |
| | | </tr> |
| | | |
| | | </table> |
| | | <table > |
| | | <thead> |
| | | <tr> |
| | | <th >序号</th> |
| | | <th >图号</th> |
| | | <th>彩釉图号</th> |
| | | <th>编号</th> |
| | | <th>规格(宽W*高H)</th> |
| | | <th>片数</th> |
| | | <th>面积</th> |
| | | <th>延米</th> |
| | | <th>交货日期</th> |
| | | <th>序号</th> |
| | | <th>箱架号</th> |
| | | <th>备注1</th> |
| | | <th>备注2</th> |
| | | <th>磨边/备注/加工内容</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody v-for="(item,index) in data.orderDetail" :key="index"> |
| | | <tr> |
| | | <td colspan="2" class="no-change-row">产品名称</td> |
| | | <td colspan="8">{{item.productName}}</td> |
| | | <td class="no-change-row">产品描述</td> |
| | | <td colspan="3"></td> |
| | | </tr> |
| | | <template v-for="(item1,index1) in item.productDetail" :key="index1"> |
| | | <tr > |
| | | <td>{{item1.orderNumber}}</td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td>{{item1.width}}*{{item1.height}}</td> |
| | | <td>{{item1.quantity}}</td> |
| | | <td>{{item1.grossArea}}</td> |
| | | <td>{{item1.perimeter}}</td> |
| | | <td>{{item1.bendRadius}}</td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td></td> |
| | | <td>标记</td> |
| | | <td colspan="4">半成品名称</td> |
| | | <td>下料-宽</td> |
| | | <td>弧长</td> |
| | | <td>下料-高</td> |
| | | <td>拱高</td> |
| | | |
| | | <td colspan="4"></td> |
| | | </tr> |
| | | <tr v-for="(item2,index2) in item1.orderGlassDetails" :key="index2" > |
| | | |
| | | <td></td> |
| | | <td>{{ item2.technologyNumber }}</td> |
| | | <td colspan="4"> {{item2.glassChild}}</td> |
| | | <td>{{item2.childWidth}}</td> |
| | | <td>{{item1.bendRadius}}</td> |
| | | <td>{{item2.childHeight}}</td> |
| | | <td>{{item2.archRise}}</td> |
| | | <td colspan="4"></td> |
| | | |
| | | </tr> |
| | | </template> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <tr> |
| | | <td colspan="5">小计</td> |
| | | <td>{{getQuantity(item.productDetail)}}</td> |
| | | <td>{{getArea(item.productDetail)}}</td> |
| | | <td>{{getPerimeter(item.productDetail)}}</td> |
| | | <td colspan="6"></td> |
| | | </tr> |
| | | |
| | | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td colspan="5">总计</td> |
| | | <td>{{grossNum.quantity}}</td> |
| | | <td>{{grossNum.grossArea}}</td> |
| | | <td>{{grossNum.perimeter}}</td> |
| | | <td colspan=""></td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="14"> |
| | | <!-- v-model=""--> |
| | | <el-input |
| | | v-model="data.order.processingNote" |
| | | :rows="2" |
| | | type="textarea" |
| | | placeholder="" |
| | | readonly |
| | | autosize |
| | | resize="none" |
| | | |
| | | /> |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | <el-row style="text-align: left "> |
| | | <el-col :span="4">下单员:</el-col> |
| | | <el-col :span="4">审核人:</el-col> |
| | | <el-col :span="4">校对:</el-col> |
| | | </el-row> |
| | | <el-row style="text-align: left "> |
| | | <el-col :span="4">创建时间:</el-col> |
| | | <el-col :span="4">审核时间:</el-col> |
| | | <el-col :span="4">打印时间:</el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #sheet{ |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: center; |
| | | } |
| | | 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; |
| | | border: 1px solid black; |
| | | width: 100%; |
| | | } |
| | | table, th, td { |
| | | border: 1px solid black; |
| | | border-collapse: collapse; |
| | | } |
| | | th,.no-change-row { |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .title-1{ |
| | | width: 76px; |
| | | } |
| | | |
| | | .hr-border{ |
| | | height: 2px; |
| | | width: 100%; |
| | | background-color: black; |
| | | color: black; |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div> |
| | | <table border="1"> |
| | | <tr v-for="(outerItem, outerIndex) in outerArray" :key="outerIndex"> |
| | | <td :rowspan="outerItem.rowspan">{{ outerItem.name }}</td> |
| | | <template v-for="(middleItem, middleIndex) in outerItem.middleArray"> |
| | | <tr v-for="(innerItem, innerIndex) in middleItem.innerArray" :key="innerIndex"> |
| | | <td v-for="(deepItem, deepIndex) in innerItem.deepArray" :key="deepIndex"> |
| | | {{ deepItem }} |
| | | </td> |
| | | </tr> |
| | | </template> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | outerArray: [ |
| | | { |
| | | name: 'Outer 1', |
| | | middleArray: [ |
| | | { |
| | | innerArray: [ |
| | | { deepArray: ['Deep 1.1', 'Deep 1.2', 'Deep 1.3'] }, |
| | | { deepArray: ['Deep 1.4', 'Deep 1.5', 'Deep 1.6'] } |
| | | ] |
| | | }, |
| | | { |
| | | innerArray: [ |
| | | { deepArray: ['Deep 2.1', 'Deep 2.2', 'Deep 2.3'] }, |
| | | { deepArray: ['Deep 2.4', 'Deep 2.5', 'Deep 2.6'] } |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | // ... 更多 outer items |
| | | ] |
| | | }; |
| | | } |
| | | }; |
| | | </script> |
New file |
| | |
| | | import {defineStore} from "pinia"; |
| | | |
| | | export default defineStore('companyInfo', { |
| | | |
| | | state: () => ({ |
| | | companyName: '天津北玻玻璃工业技术有限公司', |
| | | address:'天津宝坻区节能环保工业区天兴路西侧宝中道南侧', |
| | | telephone:'022-59280088', |
| | | fax:'022-59280066', |
| | | }), |
| | | actions: { |
| | | // |
| | | } |
| | | }) |
| | |
| | | } |
| | | }} |
| | | ], |
| | | bendRadius:[ |
| | | { |
| | | validator ({ cellValue }) { |
| | | const regex = /^(0(\.\d{1,2})?|([1-9]\d{0,4})(\.\d{1,2})?|99999(\.9{1,2})?)$/ |
| | | if (cellValue && !regex.test(cellValue)) { |
| | | return new Error(t('basicData.msg.range99999Dec2')) |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | width:[ |
| | | { |
| | | validator ({ cellValue }) { |
| | |
| | | width: 100%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | import footSum from "@/hook/footSum" |
| | | import OrderDetail from "@/components/sd/order/OrderDetail.vue" |
| | | import OrderCraftDetail from "@/components/sd/order/OrderCraftDetail.vue" |
| | | import OrderProcess from "@/components/sd/order/OrderProcess.vue"; |
| | | import OrderProcess from "@/components/sd/order/OrderProcess.vue" |
| | | import PrintSheet1 from "@/components/sd/order/PrintSheet1.vue" |
| | | import PrintSheet2 from "@/components/sd/order/PrintSheet2.vue" |
| | | import PrintSheet3 from "@/components/sd/order/PrintSheet3.vue" |
| | | import {useI18n} from "vue-i18n" |
| | | import {columnDrop2, sortable2} from "@/hook/columnMove"; |
| | | const { t } = useI18n() |
| | |
| | | const router = useRouter() |
| | | let rowClickIndex = ref(null) |
| | | const dialogTableVisible = ref(false) |
| | | let sheetIndex = ref(-1) |
| | | let orderType = ref("2") |
| | | let selectDate = ref(["",""]) |
| | | let filterData = ref({}) |
| | |
| | | dataTotal : 0, |
| | | pageSize : 100 |
| | | }) |
| | | |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | [ |
| | | { code: 'copy', name: t('searchOrder.copy'), prefixIcon: 'vxe-icon-copy', visible: true}, |
| | | { code: 'copyTitle', name: t('searchOrder.copyTitle'), prefixIcon: 'vxe-icon-copy', visible: true}, |
| | | { |
| | | prefixIcon: 'vxe-icon-print', |
| | | name: '加工单', |
| | | children: [ |
| | | { code: 'sheet1', name: '横版-普通' }, |
| | | { code: 'sheet2', name: '横版-多层明细' }, |
| | | { code: 'sheet3', name: '横版-多层弯钢' } |
| | | ] |
| | | } |
| | | // { code: 'getProcessList', name: t('searchOrder.processFlows'), prefixIcon: 'vxe-icon-file-txt', visible: true} |
| | | ] |
| | | ] |
| | |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | | case 'getProcessList': { |
| | | case 'sheet1': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | dialogTableVisible.value = true |
| | | sheetIndex.value=1 |
| | | break |
| | | } |
| | | case 'sheet2': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | dialogTableVisible.value = true |
| | | sheetIndex.value=2 |
| | | break |
| | | } |
| | | case 'sheet3': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | dialogTableVisible.value = true |
| | | sheetIndex.value=3 |
| | | break |
| | | } |
| | | case 'copy': { |
| | |
| | | orderId:rowClickIndex.value.orderId, |
| | | type:'copyTitle' |
| | | }}) |
| | | break |
| | | } |
| | | case 'print':{ |
| | | |
| | | break |
| | | } |
| | | |
| | |
| | | |
| | | </div> |
| | | |
| | | |
| | | <!-- <el-dialog |
| | | <el-dialog |
| | | id="print" |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | :title="$t('searchOrder.processFlows')" |
| | | style="width: 80%;height:75% "> |
| | | <ProcessCardProgress |
| | | :orderId="rowClickIndex.orderId" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog>--> |
| | | style="width: 75%;height:75% " |
| | | > |
| | | <print-sheet1 v-if="sheetIndex===1" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet2 v-else-if="sheetIndex===2" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet3 v-else :orderId="rowClickIndex.orderId" /> |
| | | |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | :deep(#print .el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | return Result.seccess(orderService.getOrderProductDetailTag(orderId)); |
| | | } |
| | | |
| | | @ApiOperation("订单加工单打印-成品") |
| | | @GetMapping ("/printOrderProductDetail/{orderId}") |
| | | public Result printOrderProductDetail(@PathVariable String orderId) { |
| | | |
| | | return Result.seccess(orderService.printOrderProductDetail(orderId)); |
| | | } |
| | | |
| | | @ApiOperation("订单加工单打印-小片明细") |
| | | @GetMapping ("/printOrderProductGlassDetail/{orderId}") |
| | | public Result printOrderProductGlassDetail(@PathVariable String orderId) { |
| | | |
| | | return Result.seccess(orderService.printOrderProductGlassDetail(orderId)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class OrderDetail { |
| | |
| | | private DeliveryDetail deliveryDetail; |
| | | @TableField(select = false,exist= false) |
| | | private FinishedGoodsInventory finishedGoodsInventory; |
| | | @TableField(select = false,exist= false) |
| | | private List<OrderGlassDetail> orderGlassDetails; |
| | | |
| | | @TableField(exist= false) |
| | | private String levelOne; |
| | | @TableField(exist= false) |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PrintSetup; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.sql.Date; |
| | |
| | | List<OrderDTO> exportOrderProductSummary(List<LocalDate> dates); |
| | | |
| | | Map<String, String> getOrderProductDetailTag(String orderId); |
| | | |
| | | List<Map<String,Object>> getOrderProductDistinctById(String orderId); |
| | | |
| | | List<OrderDetail> getOrderProductByProductId(Object productId, String orderId); |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PrintSetup; |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | |
| | | public List<OrderGlassDetail> getOrderCraftDetailById(String id) { |
| | | return orderGlassDetailMapper.selectOrderGlassDetailByOrderId(id); |
| | | } |
| | | |
| | | public Object printOrderProductDetail(String orderId) { |
| | | List<Map<String,Object>> orderProductDistinct = orderDetailMapper.getOrderProductDistinctById(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<OrderDetail> orderDetails = orderDetailMapper.getOrderProductByProductId(map.get("productId"),orderId); |
| | | orderDetails.forEach(orderDetail->{ |
| | | orderDetail.setGrossArea( |
| | | Double.parseDouble(String.format("%.3f", |
| | | orderDetail.getWidth()*orderDetail.getHeight()/1000000) |
| | | ) * orderDetail.getQuantity() |
| | | ); |
| | | }); |
| | | |
| | | orderProductDetailMap.put("productDetail",orderDetails); |
| | | orderProductDetail.add(orderProductDetailMap); |
| | | }); |
| | | |
| | | Map<String,Object> returns = new HashMap<>(); |
| | | |
| | | returns.put("orderProductDetail",orderProductDetail); |
| | | returns.put("order",orderMapper.selectOne(new QueryWrapper<Order>().eq("order_id",orderId))); |
| | | 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))); |
| | | |
| | | List<Map<String,Object>> orderProductDistinct = orderDetailMapper.getOrderProductDistinctById(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<OrderDetail> orderDetails = orderDetailMapper.getOrderProductByProductId(map.get("productId"),orderId); |
| | | orderDetails.forEach(orderDetail->{ |
| | | orderDetail.setGrossArea( |
| | | Double.parseDouble(String.format("%.3f", |
| | | orderDetail.getWidth()*orderDetail.getHeight()/1000000) |
| | | ) * orderDetail.getQuantity() |
| | | ); |
| | | |
| | | List<OrderGlassDetail> orderGlassDetails = |
| | | orderGlassDetailMapper.selectList( |
| | | new QueryWrapper<OrderGlassDetail>(). |
| | | eq("order_id",orderId). |
| | | eq("order_number",orderDetail.getOrderNumber()) |
| | | ); |
| | | orderDetail.setOrderGlassDetails(orderGlassDetails); |
| | | }); |
| | | |
| | | orderProductDetailMap.put("productDetail",orderDetails); |
| | | orderProductDetail.add(orderProductDetailMap); |
| | | }); |
| | | returns.put("orderDetail",orderProductDetail); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | return returns; |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | group by a.glass_child,a.child_width,a.child_height |
| | | </select> |
| | | |
| | | <select id="getOrderProductDistinctById"> |
| | | select |
| | | |
| | | (a.product_id) as 'productId', |
| | | a.product_name as 'productName', |
| | | a.order_number as 'orderNumber' |
| | | from order_detail as a |
| | | where a.order_id = #{orderId} |
| | | group by a.product_id |
| | | </select> |
| | | |
| | | <select id="getOrderProductByProductId"> |
| | | select |
| | | * |
| | | from order_detail as a |
| | | where a.order_id = #{orderId} |
| | | and a.product_id = #{productId} |
| | | order by id; |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |