Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | export default { |
| | | serverUrl:"localhost:8086" |
| | | serverUrl:"localhost:8086", |
| | | //serverUrl:"192.168.1.199:8086" |
| | | } |
| | |
| | | "vue-draggable-plus": "^0.5.0", |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-router": "^4.2.4", |
| | | "vue3-print-nb": "^0.1.4", |
| | | "vxe-table": "^4.5.15", |
| | | "xe-utils": "^3.5.14", |
| | | "xlsx": "^0.18.5" |
| | |
| | | "vue": "^3.2.0" |
| | | } |
| | | }, |
| | | "node_modules/vue3-print-nb": { |
| | | "version": "0.1.4", |
| | | "resolved": "https://registry.npmmirror.com/vue3-print-nb/-/vue3-print-nb-0.1.4.tgz", |
| | | "integrity": "sha512-LExI7viEzplR6ZKQ2b+V4U0cwGYbVD4fut/XHvk3UPGlT5CcvIGs6VlwGp107aKgk6P8Pgx4rco3Rehv2lti3A==", |
| | | "dependencies": { |
| | | "vue": "^3.0.5" |
| | | } |
| | | }, |
| | | "node_modules/vxe-table": { |
| | | "version": "4.5.15", |
| | | "resolved": "https://registry.npmjs.org/vxe-table/-/vxe-table-4.5.15.tgz", |
| | |
| | | "@vue/devtools-api": "^6.5.0" |
| | | } |
| | | }, |
| | | "vue3-print-nb": { |
| | | "version": "0.1.4", |
| | | "resolved": "https://registry.npmmirror.com/vue3-print-nb/-/vue3-print-nb-0.1.4.tgz", |
| | | "integrity": "sha512-LExI7viEzplR6ZKQ2b+V4U0cwGYbVD4fut/XHvk3UPGlT5CcvIGs6VlwGp107aKgk6P8Pgx4rco3Rehv2lti3A==", |
| | | "requires": { |
| | | "vue": "^3.0.5" |
| | | } |
| | | }, |
| | | "vxe-table": { |
| | | "version": "4.5.15", |
| | | "resolved": "https://registry.npmjs.org/vxe-table/-/vxe-table-4.5.15.tgz", |
| | |
| | | "vue-draggable-plus": "^0.5.0", |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-router": "^4.2.4", |
| | | "vue3-print-nb": "^0.1.4", |
| | | "vxe-table": "^4.5.15", |
| | | "xe-utils": "^3.5.14", |
| | | "xlsx": "^0.18.5" |
| New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {computed, onMounted, ref} from "vue" |
| | | |
| | | //这里是打印的配置项 |
| | | const print=ref({ |
| | | id: 'printBox',//这里的id就是上面我们的打印区域id,实现指哪打哪 |
| | | popTitle: '配置页眉标题', // 打印配置页上方的标题 |
| | | extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割 |
| | | preview: false, // 是否启动预览模式,默认是false |
| | | previewTitle: '预览的标题', // 打印预览的标题 |
| | | previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印 |
| | | zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高 |
| | | previewBeforeOpenCallback() { console.log('正在加载预览窗口!'); }, // 预览窗口打开之前的callback |
| | | previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback |
| | | beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback |
| | | openCallback() { console.log('执行打印了!') }, // 调用打印时的callback |
| | | closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消) |
| | | clickMounted() { console.log('点击v-print绑定的按钮了!') }, |
| | | |
| | | }) |
| | | |
| | | 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)) |
| | | } |
| | | |
| | | const printSheet = () => { |
| | | // printJS({ |
| | | // printable:'sheet', |
| | | // type:'html', |
| | | // //style:styleAll(), |
| | | // targetStyles: ['*'] |
| | | // //scanStyles:false |
| | | // }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | defineExpose({ |
| | | printSheet |
| | | }); |
| | | </script> |
| | | |
| | | |
| | | <template> |
| | | <div id="sheet"> |
| | | |
| | | <el-row style="margin-bottom: 0.5rem;"> |
| | | <el-col :span="24"> |
| | | <h1> |
| | | <img src="../../../assets/northGlass.ico" alt="" style="float: left;max-width: 60px;max-height: 60px"> |
| | | 天津北玻玻璃工业技术有限公司(THBB-QR7.1-01) |
| | | </h1> |
| | | </el-col> |
| | | |
| | | </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 > |
| | | <el-col :span="24"><h3>玻璃加工单</h3></el-col> |
| | | |
| | | </el-row> |
| | | |
| | | <table > |
| | | <tr> |
| | | <th class="title-1">客户名称</th> |
| | | <th colspan="3">{{data.order.customerName}}</th> |
| | | <th class="title-1">工程名称</th> |
| | | <th colspan="3">{{data.order.project}}</th> |
| | | </tr> |
| | | <tr> |
| | | <th class="title-1">生产单号</th> |
| | | <th>{{data.order.orderId}}</th> |
| | | <th class="title-1">下单日期</th> |
| | | <th>{{data.order.createTime}}</th> |
| | | <th class="title-1">订单类型</th> |
| | | <th>{{data.order.orderType}}</th> |
| | | <th class="title-1">跟单员</th> |
| | | <th>{{data.order.creator}}</th> |
| | | </tr> |
| | | <tr> |
| | | <th>磨边</th> |
| | | <th></th> |
| | | <th>完工日期</th> |
| | | <th>{{data.order.deliveryDate}}</th> |
| | | <th>商标</th> |
| | | <th>{{data.order.icon}}</th> |
| | | <th>包装</th> |
| | | <th>{{data.order.packType}}</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 |
| | |
| | | <script setup> |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | import VXETable from 'vxe-table' |
| | | import 'vxe-table/lib/style.css' |
| | | import i18n from "@/lang" |
| | | import print from 'vue3-print-nb' |
| | | |
| | | |
| | | |
| | |
| | | locale: zhCn, |
| | | }) |
| | | app.use(i18n) |
| | | app.use(print) |
| | | |
| | | app.mount('#app') |
| New file |
| | |
| | | import {defineStore} from "pinia"; |
| | | |
| | | export default defineStore('companyInfo', { |
| | | |
| | | state: () => ({ |
| | | companyName: '天津北玻玻璃工业技术有限公司', |
| | | address:'天津宝坻区节能环保工业区天兴路西侧宝中道南侧', |
| | | telephone:'022-59280088', |
| | | fax:'022-59280066', |
| | | }), |
| | | actions: { |
| | | // |
| | | } |
| | | }) |
| | |
| | | otherMoneyRemarks:'', |
| | | processingNote:'', |
| | | createOrder:0, |
| | | creatorId:userStore.user.userName, |
| | | creator:userStore.user.userId, |
| | | creatorId:userStore.user.userId, |
| | | creator:userStore.user.userName, |
| | | }) |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | |
| | | },//表头参数 |
| | | columns:[ |
| | | {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 }, |
| | | // {field: 'buildingNumber',width:120, title: '楼号',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'buildingNumber',width:120, title: '楼号',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'productId',width:140, title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'productName',width:300, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'price',width:140, title: t('order.price'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | |
| | | return new Error(t('basicData.msg.greater0')) |
| | | } |
| | | }} |
| | | ], |
| | | 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:[ |
| | | { |
| | |
| | | |
| | | // 审核订单 |
| | | const reviewOrder = (state) => { |
| | | request.post(`/order/reviewOrderById/${titleUploadData.value.orderId}/${state}`).then(res =>{ |
| | | request.post(`/order/reviewOrderById/${titleUploadData.value.orderId}/${state}/${userStore.user.userId}/${userStore.user.userName}`).then(res =>{ |
| | | if(res.code==200){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | if(state==2){ |
| | |
| | | width: 100%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from "vue-router" |
| | | import {computed, nextTick, onUnmounted, reactive, ref} from "vue" |
| | | import ProcessCardProgress from '@/views/pp/report/ProcessCardProgress.vue' |
| | | import {computed, reactive, ref} from "vue" |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElMessage} from "element-plus" |
| | | import {VXETable} from "vxe-table" |
| | | import {Edit, VXETable} from "vxe-table" |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | 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"; |
| | | import {Download, Printer} from "@element-plus/icons-vue/global"; |
| | | const { t } = useI18n() |
| | | const userStore = useUserInfoStore() |
| | | const tabsValue=ref('1') |
| | | 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 |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // let initTime = null |
| | | // nextTick(() => { |
| | | // // 加载完成之后在绑定拖动事件 |
| | | // initTime = setTimeout(() => { |
| | | // columnDrop2(xGrid.value) |
| | | // }, 500) |
| | | // }) |
| | | // |
| | | // onUnmounted(() => { |
| | | // clearTimeout(initTime) |
| | | // if (sortable2) { |
| | | // sortable2.destroy() |
| | | // } |
| | | // }) |
| | | const printContent = ref({ |
| | | id: 'child', |
| | | }) |
| | | |
| | | </script> |
| | | |
| | |
| | | |
| | | </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% " |
| | | > |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContent" :icon="Printer" circle /> |
| | | <el-button :icon="Download" circle /> |
| | | </template> |
| | | |
| | | <print-sheet1 id="child" v-if="sheetIndex===1" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet2 id="child" v-else-if="sheetIndex===2" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet3 id="child" v-else :orderId="rowClickIndex.orderId" /> |
| | | |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | :deep(#print .el-dialog__body){ |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | } |
| | | @ApiOperation("审核订单") |
| | | @SaCheckPermission("createOrder.review") |
| | | @PostMapping("/reviewOrderById/{id}/{status}") |
| | | public Result reviewOrderById(@PathVariable String id,@PathVariable Integer status) { |
| | | return Result.seccess(orderService.reviewOrderById(id,status)); |
| | | @PostMapping("/reviewOrderById/{id}/{status}/{userId}/{userName}") |
| | | public Result reviewOrderById(@PathVariable String id, |
| | | @PathVariable Integer status |
| | | ,@PathVariable String userId,@PathVariable String userName) { |
| | | return Result.seccess(orderService.reviewOrderById(id,status,userId,userName)); |
| | | } |
| | | |
| | | @ApiOperation("审核工艺") |
| | |
| | | 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) |
| | |
| | | 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.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.Product; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | List<Order> getOrderList(Integer offset, Integer pageSize, String startDate, String endDate, Order order, Integer orderType); |
| | | Map<String,Integer> getPageTotal(Integer offset, Integer pageSize, String startDate, String endDate, Order order , Integer orderType); |
| | | |
| | | boolean reviewOrderById(String id,Integer status); |
| | | boolean reviewOrderById(String id, Integer status, String userId, String userName); |
| | | |
| | | boolean reviewProcessById(String id, Integer status); |
| | | |
| | |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import com.sun.org.apache.regexp.internal.RE; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | |
| | | return map; |
| | | } |
| | | //订单审核 |
| | | public boolean reviewOrderById(String id,Integer status) { |
| | | public boolean reviewOrderById(String id, Integer status, String userId, String userName) { |
| | | Order order = orderMapper.selectOne(new QueryWrapper<Order>().eq("order_id",id)); |
| | | if(order.getProcessReview()!=2){ |
| | | throw new ServiceException(Constants.Code_600,"该订单还未审核"); |
| | | } |
| | | return orderMapper.reviewOrderById(id,status); |
| | | return orderMapper.reviewOrderById(id,status,userId,userName); |
| | | } |
| | | //工艺审核界面审核更新数据 |
| | | public boolean reviewProcessById(String id, Integer status,List<OrderGlassDetail> orderGlassDetails) { |
| | |
| | | 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> |
| | |
| | | </select> |
| | | |
| | | <update id="reviewOrderById"> |
| | | update `order` set order_review = #{status} where order_id = #{id} |
| | | update `order` set order_review = #{status}, |
| | | verifier_id = #{userId}, |
| | | verifier = #{userName} |
| | | where order_id = #{id} |
| | | </update> |
| | | |
| | | <update id="reviewProcessById"> |