From cc6c23214508017230f9166cff4a64da4e339867 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期四, 11 七月 2024 15:44:17 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue | 2
north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue | 2
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue | 204 ++++++++--------
north-glass-erp/northglass-erp/src/views/pp/rework/Rework.vue | 2
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java | 2
north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue | 444 +++++++++++++++++++++++++++++++++++++
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 18
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java | 1
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 26 ++
9 files changed, 585 insertions(+), 116 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
index 3f89757..119805b 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -183,7 +183,7 @@
<thead>
<tr v-for="(itemFlow,index) in item.detail" :key="index">
<td colspan="24">
- <div style="float: left;"><input style="border: none;font-size: 28px;width: 40px "/></div>
+ <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px "/></div>
<div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div>
<div>{{company.companyName}}</div>
<div>鐢熶骇娴佺▼鍗�</div>
diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue
new file mode 100644
index 0000000..2fb8aea
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue
@@ -0,0 +1,444 @@
+<script setup>
+import request from "@/utils/request"
+import {ElDatePicker, ElMessage} from "element-plus"
+import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
+import {Search} from "@element-plus/icons-vue"
+import {useRouter} from 'vue-router'
+import {changeFilterEvent, filterChanged} from "@/hook"
+import {useI18n} from 'vue-i18n'
+import deepClone from "@/utils/deepClone";
+import QRCode from "qrcode";
+import companyInfo from "@/stores/sd/companyInfo";
+//璇█鑾峰彇
+const company = companyInfo()
+const {t} = useI18n()
+let router = useRouter()
+let produceList = ref([])
+let list = ref()
+const details = ref([])
+
+
+const data = ref({
+ printList: []
+})
+
+let props = defineProps({
+ printList:null,
+ printMerge:null
+})
+
+const {currentRoute} = useRouter()
+const route = currentRoute.value
+const printMerge = props.printMerge
+let merge=props.printMerge
+if (merge == '') {
+ merge = null
+}
+data.value.printList = JSON.parse(props.printList)
+let flowCardCount = data.value.printList.length
+onMounted(() => {
+ request.post(`/processCard/getSelectPrinting/${merge}`, data.value).then((res) => {
+ if (res.code == 200) {
+ produceList.value = deepClone(res.data.data)
+ //澶勭悊鍗曠墖鍘氬害
+
+ for (let j = 0; j < produceList.value.length; j++) {
+ let sumWeight = 0
+ produceList.value[j].detailList.forEach((item, index) => {
+ // 瑙f瀽 separation 瀛楁鐨� JSON 瀛楃涓�
+ let separationObj = JSON.parse(item.separation);
+
+ // 鑾峰彇 thickness 鐨勫師濮嬪��
+ let thicknessValue = separationObj.thickness;
+
+ // 鍘婚櫎 'mm' 鍗曚綅
+ let thicknessWithoutUnit = thicknessValue.replace('mm', '');
+
+ item.separation=thicknessWithoutUnit
+
+ sumWeight += item.width*item.height*item.quantity/1000000*item.separation*2.5*1;
+
+ });
+ produceList.value[j].detail[0].weight=sumWeight
+ }
+ //澶勭悊鍚堝苟鎵撳嵃
+ if (printMerge !== null && printMerge !== undefined && printMerge !== "") {
+
+ produceList.value.forEach(item => {
+ item.detail[0].technologyNumber = printMerge;
+ });
+
+ //鍚堝苟鎵撳嵃宸ヨ壓娴佺▼澶勭悊
+ let process = produceList.value[0].detail[0].process
+ let indexOfJiaJiao = process.indexOf('澶硅兌');
+ if (indexOfJiaJiao !== -1) {
+ // 浣跨敤 substring 鎴彇 "澶硅兌" 鍚庨潰鐨勯儴鍒嗭紝鍖呮嫭 "澶硅兌" 鏈韩
+ let afterJiaJiao = process.substring(indexOfJiaJiao).trim();
+ produceList.value.forEach(item =>{
+ item.detail[0].process = afterJiaJiao
+ })
+ }
+
+ let indexOfProceList=produceList.value[0].processList
+ let getProceList = indexOfProceList.findIndex(item => item.process === '澶硅兌');
+
+ if (getProceList !== -1) {
+ // 浣跨敤 filter 鏂规硶杩囨护鍑� "澶硅兌" 鍙婂叾涔嬪悗鐨勫璞�
+ produceList.value[0].processList = indexOfProceList.filter((item, index) => index >= getProceList);
+ }
+ }
+
+ produceList.value.forEach(item =>{
+ let technologyNumberMerge = printMerge.split('').join(',');
+ item.detail[0].technologyNumberMerge = technologyNumberMerge
+ })
+ //澶勭悊缂栧彿鍒�
+ //瀹氫箟瀛樻斁缂栧彿鏁扮粍
+ const s01Values = [];
+ for (let i = 0; i < produceList.value.length; i++) {
+ const s01Values = [];
+ // 閬嶅巻 detailList 鏁扮粍锛屾彁鍙� S01 鍊煎埌 s01Values 鏁扮粍
+ if (produceList.value[i].detailList[0].other_columns!=null
+ || produceList.value[i].detailList[0].other_columns!=undefined){
+ produceList.value[i].detailList.forEach(element => {
+ const otherColumnsObject = JSON.parse(element.other_columns);
+ const s01Value = otherColumnsObject.S01;
+ s01Values.push(s01Value || ''); // 濡傛灉 S01 鍊间负绌猴紝娣诲姞绌哄瓧绗︿覆鎴栬�呭叾浠栭粯璁ゅ��
+ });
+
+ // 灏� s01Values 涓殑鍊艰祴缁欐瘡涓鍗曡鎯呭璞$殑 s01Value 灞炴��
+ produceList.value[i].detailList.forEach((detail, index) => {
+ detail.s01Value = index < s01Values.length ? s01Values[index] : ''; // 璧嬪�肩粰 s01Value 灞炴��
+ });
+ }
+
+ }
+
+
+ handleGetQRCode()
+ } else {
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+
+ }
+)
+
+
+const handleGetQRCode = async () => {
+ for (let i = 0; i < produceList.value.length; i++) {
+ const technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 杞崲涓哄瓧绗︿覆浠ヤ究澶勭悊姣忎釜瀛楃
+ produceList.value[i].detail[0]["qrcodeList"] = []; // 鍒濆鍖栦竴涓┖鏁扮粍鐢ㄦ潵瀛樺偍 QR Code
+
+ for (let j = 0; j < technologyNumber.length; j++) {
+ const processId = produceList.value[i].detail[0].process_id;
+ const url = `${processId}/${technologyNumber[j]}`;
+
+ // 鐢熸垚 QR Code 骞跺瓨鍌ㄥ埌鏁扮粍涓�
+ const qrcodeData = await QRCode.toDataURL(url);
+ produceList.value[i].detail[0]["qrcodeList"].push({
+ qrcode: qrcodeData,
+ technologyNumber: technologyNumber[j]
+ });
+
+ }
+ }
+};
+
+
+//鏍规嵁杈撳叆鐨勬暟閲忛噸鏂版眹鎬�
+const handleSummary = () => {
+ for (let i = 0; i < produceList.value.length; i++) {
+ //鏁伴噺
+ let totalQuantity = 0;
+ //闈㈢Н
+ let totalArea = 0;
+ //閲嶉噺
+ let totalWeight = 0;
+ // 瀵规瘡涓泦鍚堜腑鐨� detailList 杩涜璁$畻
+ produceList.value[i].detailList.forEach(collection => {
+ totalQuantity += collection.quantity*1;
+ //姣忎釜搴忓彿闈㈢Н
+ collection.total_area=parseFloat((collection.width*collection.height*collection.quantity/1000000).toFixed(2))
+ totalArea += collection.total_area*1;
+ totalWeight += collection.width*collection.height*collection.quantity/1000000*collection.separation*2.5*1;
+ //姣忎釜搴忓彿鍛ㄩ暱
+ collection.perimeter= (collection.width*2+collection.height*2)*collection.quantity/1000
+ });
+ // 杈撳嚭姣忎釜闆嗗悎涓殑鎬绘暟閲�
+ produceList.value[i].detail[0].quantity=totalQuantity
+ produceList.value[i].detail[0].gross_area=totalArea
+ produceList.value[i].detail[0].weight=totalWeight
+ }
+}
+
+
+</script>
+
+<template>
+<!-- <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button>-->
+ <div id="printFlowCard">
+ <table v-for="(item,id) in produceList" id="contentTable" :key="id">
+ <thead>
+ <tr v-for="(itemFlow,index) in item.detail" :key="index">
+ <td colspan="24">
+ <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px "/></div>
+ <div id="bj" style="float: right;font-size: 28px">琛� {{ id + 1 }}</div>
+ <div>{{company.companyName}}</div>
+ <div>鐢熶骇娴佺▼鍗�</div>
+ <div v-if="itemFlow.technologyNumberMerge!=''" style="text-align: right;font-weight: bolder">娴佺▼鍗″彿锛� {{
+ itemFlow.process_id
+ }}/{{ itemFlow.technologyNumberMerge }} 鍏� {{ flowCardCount }} 鏋�
+ </div>
+ <div v-else style="text-align: right;font-weight: bolder">娴佺▼鍗″彿锛� {{
+ itemFlow.process_id
+ }}/{{ itemFlow.technologyNumber }} 鍏� {{ flowCardCount }} 鏋�
+ </div>
+ </td>
+ </tr>
+ <tr v-for="(items,index) in item.detail" :key="index">
+ <td class="tdNowrap">瀹㈡埛鍚嶇О锛�</td>
+ <td colspan="2">{{ items.customer_name }}</td>
+ <td class="tdNowrap">椤圭洰鍚嶇О锛�</td>
+ <td colspan="2">{{ items.project }}</td>
+ <td class="tdNowrap">宸ヨ壓娴佺▼锛�</td>
+ <td colspan="17" style="width: 500px">{{ items.process }}</td>
+ </tr>
+ <tr v-for="(itemTr,index) in item.detail" :key="index">
+ <td class="tdNowrap">纾ㄨ竟绫诲瀷锛�</td>
+ <td colspan="2">{{ itemTr.edging_type }}</td>
+ <td class="tdNowrap">鍗曠墖鍚嶇О锛�</td>
+ <td colspan="2">{{ itemTr.glass_child }}</td>
+ <td class="tdNowrap">浜у搧鍚嶇О锛�</td>
+ <td colspan="17">{{ itemTr.product_name }}</td>
+ </tr>
+ <tr>
+ <td rowspan='2'>搴忓彿</td>
+ <td rowspan='2'>缂栧彿</td>
+ <td rowspan='2'>瀹�*楂�</td>
+ <td rowspan='2'>鏁伴噺</td>
+ <td rowspan='2'>闈㈢Н</td>
+ <td rowspan='2'>鍛ㄩ暱</td>
+ <td rowspan='2'>鍗婂緞</td>
+ <td rowspan='2'>澶囨敞</td>
+ <td v-for="(itemPr,index) in item.processList" :key="index" colspan="2">{{ itemPr.process }}</td>
+ </tr>
+ <tr>
+
+ <td>{{company.printLabel.printFlowCard.patch}}</td>
+ <td>{{company.printLabel.printFlowCard.lackOf}}</td>
+ <td>{{company.printLabel.printFlowCard.patch}}</td>
+ <td>{{company.printLabel.printFlowCard.lackOf}}</td>
+ <td>{{company.printLabel.printFlowCard.patch}}</td>
+ <td>{{company.printLabel.printFlowCard.lackOf}}</td>
+ <td>{{company.printLabel.printFlowCard.patch}}</td>
+ <td>{{company.printLabel.printFlowCard.lackOf}}</td>
+ <td>{{company.printLabel.printFlowCard.patch}}</td>
+ <td>{{company.printLabel.printFlowCard.lackOf}}</td>
+ <td>{{company.printLabel.printFlowCard.patch}}</td>
+ <td>{{company.printLabel.printFlowCard.lackOf}}</td>
+ <td>{{company.printLabel.printFlowCard.patch}}</td>
+ <td>{{company.printLabel.printFlowCard.lackOf}}</td>
+ <td>{{company.printLabel.printFlowCard.patch}}</td>
+ <td>{{company.printLabel.printFlowCard.lackOf}}</td>
+ </tr>
+ </thead>
+ <tbody>
+
+ <tr v-for="(itemDatile,index) in item.detailList" :key="index">
+ <td>{{ itemDatile.order_number }}</td>
+ <td>{{itemDatile.s01Value}}</td>
+ <td>{{ itemDatile.child_width }}</td>
+ <td class="item" style="width: 5%;height: 100%;"><el-input @keyup="handleSummary()" style="border: none" v-model="itemDatile.quantity"></el-input></td>
+ <td>{{ itemDatile.total_area }}</td>
+ <td>{{ itemDatile.perimeter }}</td>
+ <td>{{ itemDatile.bend_radius }}</td>
+ <td>{{ itemDatile.remarks }}</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr style="height: 14px">
+ <td v-for="(itemsum,index) in item.detail" :key="index" colspan="24">
+ 鏁伴噺锛�
+ <label>{{ itemsum.quantity }}</label>
+ 闈㈢Н锛�
+ <label>{{ parseFloat(itemsum.gross_area.toFixed(2)) }}</label>
+ 閲嶉噺锛�
+ <label>{{ parseFloat(itemsum.weight.toFixed(2)) }}</label>
+ </td>
+ </tr>
+ <tr v-for="(itemtextarea,index) in item.detail" :key="index">
+ <td colspan="6" rowspan="6" style="width: 480px;height: 100px ">
+<!-- <div style="width: 100%;height: 100%"><textarea style="height: 99%;width: 99%;font-size: 11px">{{ itemtextarea.processing_note }}</textarea>-->
+<!-- </div>-->
+ <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px">{{company.printLabel.printFlowCard.processingNote(itemtextarea)}}</textarea>
+ </div>
+ </td>
+ <td>瀹屽伐绛惧悕</td>
+ <td></td>
+
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ </tr>
+ <tr>
+ <td>鐢熶骇鏃ユ湡</td>
+ <td></td>
+
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ </tr>
+ <tr>
+ <td>璐ㄦ绛惧悕</td>
+ <td></td>
+
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ </tr>
+ <tr v-for="(qrCodeItem,index) in item.detail" :key="index">
+ <td colspan="19">
+ <span style="display: flex;">
+ <span v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index" style="display: flex;width: 35%">
+ <div class='qrCode' style="width: 80px;height: 80px;">
+ <img :src=qrCodeItems.qrcode>
+ </div>
+ <span style="float: left;font-weight: bolder">{{
+ qrCodeItem.process_id + "/" + qrCodeItems.technologyNumber
+ }}</span>
+ </span>
+ </span>
+ </td>
+
+ </tr>
+ </tfoot>
+ </table>
+ </div>
+
+</template>
+
+<style scoped>
+* {
+ margin: 0;
+ padding: 0;
+ text-align: center;
+}
+
+#printButton {
+ margin-top: -40px;
+ width: 100px;
+}
+
+#printFlowCard {
+ text-align: center;
+//font-weight: bolder; height: 600px;
+}
+
+#contentTable {
+ border-collapse: collapse;
+ border: 1px solid black;
+ width: 100%;
+
+}
+
+#contentTable thead {
+ font-size: 13px;
+ font-weight: bolder;
+}
+
+#contentTable thead div {
+ font-size: 15px;
+ font-weight: bolder;
+}
+
+#contentTable tr td {
+ border: 1px solid black;
+ height: 18px;
+ font-weight: bolder;
+}
+
+#contentTable tbody {
+ white-space: nowrap;
+
+}
+
+.tdNowrap {
+ white-space: nowrap;
+
+}
+
+#contentTable tfoot {
+ font-size: 12px;
+ font-weight: bolder;
+}
+
+@page {
+ size: auto; /* auto is the initial value */
+ margin: 2mm 0mm 0mm 1mm /* this affects the margin in the printer settings */
+
+}
+
+@media print {
+
+ tbody {
+ display: table-row-group;
+ }
+
+ table {
+ page-break-before: always;
+ }
+
+ table {
+ page-break-inside: auto;
+ }
+
+ thead {
+ display: table-header-group;
+ }
+
+ tfoot {
+ display: table-footer-group;
+ page-break-inside: avoid;
+ }
+}
+
+.qrCode img {
+ width: 100%;
+ height: 100%;
+}
+
+
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
index 538d84e..f97e922 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
@@ -9,7 +9,7 @@
import {changeFilterEvent, filterChanged} from "@/hook"
import {VXETable} from "vxe-table";
import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove";
-import PrintProcess from '@/components/pp/PrintProcess.vue'
+import PrintProcess from '@/components/pp/PrintProcessReplenish.vue'
import PrintLabel from '@/views/pp/processCard/PrintLabel.vue'
import PrintCustomLabel from '@/views/pp/processCard/PrintCustomLabel.vue'
import footSum from "@/hook/footSum"
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
index 0a3268c..02ee91d 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -20,27 +20,6 @@
let router = useRouter()
const userStore = useUserInfoStore()
const username = userStore.user.userName
-const getTableRow = (row, type) => {
- switch (type) {
- case 'edit' : {
- router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}})
- break
- }
- case 'delete': {
- request.post(`/processCard/deleteFlowCard/${row.orderId}/${row.processId}`).then((res) => {
- if (res.code == 200) {
- ElMessage.success(t('workOrder.deleteOk'))
- location.reload();
- } else {
- ElMessage.warning(res.msg)
- // router.push("/login")
- }
- })
- break
- }
- }
-}
-
let flag = $ref(true)
function intoCreateProduct() {
@@ -92,6 +71,8 @@
let orderId = route.query.orderId
let productionId = route.query.productionId
+const orderOtherMoney = ref(null)
+
//绗竴娆″姞杞芥暟鎹�
@@ -99,6 +80,19 @@
if (res.code == 200) {
pageTotal.value = res.data.total
+ orderOtherMoney.value = res.data.orderOtherMoney
+ orderOtherMoney.value.forEach(item => {
+ let column = {
+ field: `${item.column}`,
+ width: 60,
+ title: item.alias,
+ }
+
+ //columns.push(column)
+ console.log(column)
+ gridOptions.columns.push(column)
+
+ })
produceList = produceList.value.concat(deepClone(res.data.data))
xGrid.value.reloadData(produceList)
gridOptions.loading = false
@@ -154,13 +148,13 @@
useKey: true
},
filterConfig: { //绛涢�夐厤缃」
- //remote: true
+ //remote: true
},
customConfig: {
storage: true
},
- sortConfig:{
- multiple:true
+ sortConfig: {
+ multiple: true
},
editConfig: {
trigger: 'click',
@@ -168,13 +162,14 @@
showStatus: true
},//琛ㄥご鍙傛暟
columns: [
- {type: 'checkbox', fixed: "left", title: t('basicData.check')},
+ {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: '80px'},
{
field: 'orderNumber',
title: t('order.OrderNum'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged
+ filterMethod: filterChanged,
+ width: '100px'
},
{
field: 'shape',
@@ -182,7 +177,8 @@
showOverflow: "ellipsis",
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged
+ filterMethod: filterChanged,
+ width: '70px'
},
{
field: 'width',
@@ -191,7 +187,7 @@
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
filterMethod: filterChanged,
- width: '60px'
+ width: '78px'
},
{
field: 'height',
@@ -200,13 +196,13 @@
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
filterMethod: filterChanged,
- width: '60px'
+ width: '78px'
},
- {field: 'baiscQuantity', title: t('processCard.quantityToDivided'), showOverflow: "ellipsis", width: '60px'},
- {field: 'computeGrossArea', title: t('processCard.areaToDivided'), width: '60px'},
+ {field: 'baiscQuantity', title: t('processCard.quantityToDivided'), showOverflow: "ellipsis", width: '80px'},
+ {field: 'computeGrossArea', title: t('processCard.areaToDivided'), width: '80px'},
{field: 'totalThickness', title: t('processCard.totalThickness'), width: '80px'},
- {field: 'thickness', title: t('processCard.glassThickness'), width: '60px'},
- {field: 'weight', title: t('processCard.weight'),slots:{default:'weight_sum'}}
+ {field: 'thickness', title: t('processCard.glassThickness'), width: '80px'},
+ {field: 'weight', title: t('processCard.weight'), slots: {default: 'weight_sum'}, width: '85px'}
],//琛ㄥご鎸夐挳
toolbarConfig: {
@@ -222,23 +218,23 @@
data: [],//table body瀹為檯鏁版嵁
//鑴氶儴姹傚拰
- footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ footerMethod({columns, data}) {//椤佃剼鍑芥暟
let count = 0
- return[
+ return [
columns.map((column, columnIndex) => {
if (columnIndex === 0) {
return t('basicData.total')
}
- const List = ["baiscQuantity",'computeGrossArea']
+ const List = ["baiscQuantity", 'computeGrossArea']
if (List.includes(column.field)) {
return footSum(data, column.field)
}
- if (column.field === 'weight'){
+ if (column.field === 'weight') {
data.forEach(row => {
count += weightSum(row)
})
- return parseFloat(count.toFixed(2))
+ return parseFloat(count.toFixed(2))
}
return ''
@@ -268,7 +264,7 @@
useKey: true
},
filterConfig: { //绛涢�夐厤缃」
- //remote: true
+ //remote: true
},
customConfig: {
storage: true
@@ -279,14 +275,14 @@
showStatus: true
},//琛ㄥご鍙傛暟
columns: [
- {type: 'checkbox', fixed: "left", title: t('basicData.check')},
+ {type: 'checkbox', fixed: "left", title: t('basicData.check'),width: 78},
{
field: 'processId',
title: t('processCard.processId'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- width: 100,
- filterMethod: filterChanged
+ width: 135,
+ filterMethod: filterChanged,
},
{
field: 'orderNumber',
@@ -294,26 +290,29 @@
showOverflow: "ellipsis",
filters: [{data: ''}],
slots: {filter: 'num1_filter'}
- , filterMethod: filterChanged
+ , filterMethod: filterChanged,
+ width: 98
},
{
field: 'landingSequence',
title: t('processCard.landingSequence'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged
+ filterMethod: filterChanged,
+ width: 99
},
{
field: 'shape',
title: t('order.shape'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged
+ filterMethod: filterChanged,
+ width:70
},
- {field: 'width', title: t('order.width'), showOverflow: "ellipsis"},
- {field: 'height', title: t('order.height')},
- {field: 'quantity', title: t('order.quantity')},
- {field: 'totalThickness', title: t('processCard.totalThickness')},
+ {field: 'width', title: t('order.width'), showOverflow: "ellipsis",width:70},
+ {field: 'height', title: t('order.height'),width:70},
+ {field: 'quantity', title: t('order.quantity'),width:70},
+ {field: 'totalThickness', title: t('processCard.totalThickness'),width:70},
],//琛ㄥご鎸夐挳
toolbarConfig: {
@@ -328,13 +327,13 @@
},
data: [],//table body瀹為檯鏁版嵁
//鑴氶儴姹傚拰
- footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
- return[
+ footerMethod({columns, data}) {//椤佃剼鍑芥暟
+ return [
columns.map((column, columnIndex) => {
if (columnIndex === 0) {
return t('basicData.total')
}
- const List = ["quantity",'goodsQuantity','area']
+ const List = ["quantity", 'goodsQuantity', 'area']
if (List.includes(column.field)) {
return footSum(data, column.field)
}
@@ -439,11 +438,11 @@
//瀵归�変腑鐨勫乏杈硅〃鏍兼暟鎹繘琛屽惊鐜�
checkedList.forEach((item) => {
//鍒ゆ柇鍙敤鏁伴噺鏄惁澶т簬绛変簬杈撳叆鐨勬暟閲�,涓嶆弧瓒冲垯鎶涘嚭寮傚父
- // if (item.quantity < checkedNum.value*1) throw new Error(t('processCard.schedulingQuantity'));
- if (item.quantity < checkedNum.value*1){
+ // if (item.quantity < checkedNum.value*1) throw new Error(t('processCard.schedulingQuantity'));
+ if (item.quantity < checkedNum.value * 1) {
ElMessage.warning(t('processCard.schedulingQuantity'))
}
- //宸﹁竟琛ㄦ牸鍙敤鏁伴噺鍑忓幓杈撳叆鐨勬暟閲�
+ //宸﹁竟琛ㄦ牸鍙敤鏁伴噺鍑忓幓杈撳叆鐨勬暟閲�
item.quantity = item.quantity - checkedNum.value
//鍙宠竟琛ㄦ牸鏁版嵁
let rightData = $grid.getTableData().fullData
@@ -454,7 +453,7 @@
//鏁伴噺
rightData[filterIndex].baiscQuantity = rightData[filterIndex].baiscQuantity * 1 + checkedNum.value * 1
//闈㈢Н
- rightData[filterIndex].computeGrossArea=(rightData[filterIndex].width*rightData[filterIndex].height*rightData[filterIndex].baiscQuantity/1000000).toFixed(2)
+ rightData[filterIndex].computeGrossArea = (rightData[filterIndex].width * rightData[filterIndex].height * rightData[filterIndex].baiscQuantity / 1000000).toFixed(2)
//濡傛灉宸﹁竟鏁伴噺涓�0鏃跺垹闄ゆ鏉℃暟鎹�
//鍒犻櫎key
let key = item._X_ROW_KEY
@@ -466,7 +465,7 @@
} else {
//鍙宠竟琛ㄦ牸娌℃湁姝ゆ潯鏁版嵁鍒欏線鍙宠竟琛ㄦ牸鎻掑叆鏁版嵁
item.baiscQuantity = checkedNum.value
- item.computeGrossArea=(item.width*item.height*checkedNum.value/1000000).toFixed(2)
+ item.computeGrossArea = (item.width * item.height * checkedNum.value / 1000000).toFixed(2)
if (item.quantity === 0) {
$gridLeft.remove(item)
}
@@ -489,7 +488,7 @@
if (filterIndex > -1) {
rightData[filterIndex].baiscQuantity = rightData[filterIndex].baiscQuantity * 1 + item.quantity * 1
//闈㈢Н
- rightData[filterIndex].computeGrossArea=(rightData[filterIndex].width*rightData[filterIndex].height*rightData[filterIndex].baiscQuantity/1000000).toFixed(2)
+ rightData[filterIndex].computeGrossArea = (rightData[filterIndex].width * rightData[filterIndex].height * rightData[filterIndex].baiscQuantity / 1000000).toFixed(2)
} else {
@@ -505,8 +504,8 @@
// }
// }
- delete item._X_ROW_KEY
- $grid.insert(item)
+ delete item._X_ROW_KEY
+ $grid.insert(item)
}
@@ -554,7 +553,7 @@
//鍒ゆ柇鍙敤鏁伴噺鏄惁澶т簬绛変簬杈撳叆鐨勬暟閲�,涓嶆弧瓒冲垯鎶涘嚭寮傚父
if (item.baiscQuantity * 1 < checkedNum.value * 1) throw new Error("璇疯緭鍏ュ皬浜庣瓑浜庡緟鍒嗘暟閲忕殑鏁板瓧");
item.baiscQuantity = item.baiscQuantity - checkedNum.value
- item.computeGrossArea=(item.computeGrossArea-item.width*item.height*checkedNum.value/1000000).toFixed(2)
+ item.computeGrossArea = (item.computeGrossArea - item.width * item.height * checkedNum.value / 1000000).toFixed(2)
//瀹氫箟key鍊间繚鎸�
let key = item._X_ROW_KEY
//宸﹁竟琛ㄦ牸鏁版嵁
@@ -567,7 +566,7 @@
//濡傛灉鍙宠竟琛ㄦ牸鏁版嵁涓瓨鍦ㄥ綋鍓嶆暟鎹垯鏁伴噺鐩稿姞
if (filterIndex >= 0) {
leftData[filterIndex].quantity = leftData[filterIndex].quantity * 1 + checkedNum.value * 1
- leftData[filterIndex].computeGrossArea=(leftData[filterIndex].computeGrossArea-leftData[filterIndex].width*leftData[filterIndex].height*leftData[filterIndex].baiscQuantity/1000000).toFixed(2)
+ leftData[filterIndex].computeGrossArea = (leftData[filterIndex].computeGrossArea - leftData[filterIndex].width * leftData[filterIndex].height * leftData[filterIndex].baiscQuantity / 1000000).toFixed(2)
if (item.baiscQuantity === 0) {
$grid.remove(item)
@@ -577,7 +576,7 @@
item.quantity = checkedNum.value
item.processId = checkedListLeft[0].processId
item.landingSequence = checkedListLeft[0].landingSequence
- item.computeGrossArea=(item.computeGrossArea-checkedListLeft[0].width*checkedListLeft[0].height*checkedNum.value/1000000).toFixed(2)
+ item.computeGrossArea = (item.computeGrossArea - checkedListLeft[0].width * checkedListLeft[0].height * checkedNum.value / 1000000).toFixed(2)
delete item._X_ROW_KEY
$gridLeft.insert(item)
item._X_ROW_KEY = key
@@ -596,7 +595,7 @@
for (let i = 0; i < leftData.length; i++) {
if (leftData[i].orderNumber === item.orderNumber && leftData[i].processId === item.processId) {
leftData[i].quantity = leftData[i].quantity * 1 + checkedNum.value * 1
- leftData[i].computeGrossArea=(leftData[i].computeGrossArea-leftData[i].width*leftData[i].height*leftData[i].baiscQuantity/1000000).toFixed(2)
+ leftData[i].computeGrossArea = (leftData[i].computeGrossArea - leftData[i].width * leftData[i].height * leftData[i].baiscQuantity / 1000000).toFixed(2)
break
} else if (leftData[i].orderNumber === item.orderNumber && leftData[i].processId !== item.processId) {
delete item._X_ROW_KEY
@@ -608,7 +607,7 @@
$gridLeft.insert(item)
item._X_ROW_KEY = key
break
- }else if (leftData[i].orderNumber !== item.orderNumber && leftData[i].processId == item.processId) {
+ } else if (leftData[i].orderNumber !== item.orderNumber && leftData[i].processId == item.processId) {
delete item._X_ROW_KEY
$gridLeft.insert(item)
item._X_ROW_KEY = key
@@ -624,7 +623,7 @@
item.processId = checkedListLeft[0].processId
item.landingSequence = checkedListLeft[0].landingSequence
item.quantity = checkedListLeft[0].baiscQuantity
- item.computeGrossArea=(item.computeGrossArea-checkedListLeft[0].width*checkedListLeft[0].height*checkedListLeft[0].baiscQuantity/1000000).toFixed(2)
+ item.computeGrossArea = (item.computeGrossArea - checkedListLeft[0].width * checkedListLeft[0].height * checkedListLeft[0].baiscQuantity / 1000000).toFixed(2)
delete item._X_ROW_KEY
})
@@ -696,18 +695,18 @@
},
}
-const weightSum = (row) =>{
- return parseFloat((row.baiscQuantity*row.thickness*row.width*row.height*2.5/1000000).toFixed(2))
+const weightSum = (row) => {
+ return parseFloat((row.baiscQuantity * row.thickness * row.width * row.height * 2.5 / 1000000).toFixed(2))
}
let quantit = ref('')
let weight = ref('')
-const handleCheckboxChange=({ row}) =>{
+const handleCheckboxChange = ({row}) => {
const $grid = xGrid.value
//鑾峰彇鍙宠竟琛ㄦ牸checkbox閫変腑鐨勬暟鎹�
const checkedList = $grid.getCheckboxRecords()
let quantitySum = 0;
- let weightsum=0;
+ let weightsum = 0;
checkedList.forEach(item => {
quantitySum += item.baiscQuantity;
weightsum += weightSum(item);
@@ -718,36 +717,31 @@
</script>
<template>
- <div style="width: 100%;height: 100%">
+ <div style="width: 75%;height: 90%">
<div class="common-layout" style="width: 100%;height: 100%">
- <div class="header" style="height: 5%;width: 100%">
- <el-button
- id="searchButton1"
- :icon="ArrowLeftBold"
- round
- style="float: left"
- type="primary"
- @click="intoCreateProduct">
- {{ flag ? t('processCard.return') : t('processCard.return') }}
- </el-button>
- <!-- <el-button type="primary">淇濆瓨鍒嗘灦</el-button>-->
- <!-- <el-button type="primary" :hidden="true">鍒嗘灦姹囨��</el-button>-->
- <div style="width: 100px;">
+ <el-button
+ id="searchButton1"
+ :icon="ArrowLeftBold"
+ round
+ style="float: left"
+ type="primary"
+ @click="intoCreateProduct">
+ {{ flag ? t('processCard.return') : t('processCard.return') }}
+ </el-button>
+ <!-- <el-button type="primary">淇濆瓨鍒嗘灦</el-button>-->
+ <!-- <el-button type="primary" :hidden="true">鍒嗘灦姹囨��</el-button>-->
- </div>
- </div>
<el-container style="height: 100%;width: 100%">
- <el-aside style="width: 44%;height: 100%">
+ <el-aside style="width: 52%;height: 100%">
<vxe-grid
ref="xGridLeft"
+ checkbox-config="{ reserve: true, strict: true }"
class="mytable-scrollbar"
- height="650px"
- max-height="100%"
+ height="100%"
v-bind="gridLeftOptions"
v-on="gridEvents"
- checkbox-config="{ reserve: true, strict: true }"
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
@@ -771,25 +765,22 @@
</div>
</div>
</template>
-
-
-
</vxe-grid>
</el-aside>
- <div width="12%">
+ <div height="100%" style="margin: 5px" width="11%">
<el-main style="">
<div>
- <span><el-input v-model="quantit" style="width: 80px;"/></span>
- <span><el-input v-model="weight" style="width: 80px;"/></span>
+ <span><el-input v-model="quantit" style="width: 80px;"/></span>
+ <span><el-input v-model="weight" style="width: 80px;"/></span>
</div>
<span>{{ $t('processCard.selectedQuantity') }}:<el-input v-model="checkedNum" clearable
type="number"></el-input></span><br>
- <el-button type="primary" @click="addRight"> 鈫�</el-button>
+ <el-button style="width: 40px;" type="primary" @click="addRight"> 鈫�</el-button>
<br>
<br>
- <el-button type="primary" @click="addLeft"> 鈫�</el-button>
+ <el-button style="width: 40px;" type="primary" @click="addLeft"> 鈫�</el-button>
<br>
<br>
<el-button type="primary" @click="createProcessCard">{{ $t('processCard.establishProcessCards') }}
@@ -799,17 +790,16 @@
<!-- 鍙充晶-->
- <div style="height: 100%;width: 100%">
+ <div style="height: 100%;width: 70%">
<el-aside style="width: 100%;height: 100%">
<vxe-grid
-
+ id="rightTable"
ref="xGrid"
- class="mytable-scrollbar"
- height="650px"
- max-height="100%"
- v-bind="gridOptions"
checkbox-config="{ reserve: true, strict: true }"
+ class="mytable-scrollbar"
+ height="100%"
+ v-bind="gridOptions"
@checkbox-change="handleCheckboxChange"
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
@@ -847,6 +837,11 @@
</template>
<style scoped>
+* {
+ margin: 0;
+ padding: 0;
+}
+
.common-layout {
height: 100%;
}
@@ -867,4 +862,5 @@
}
+
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
index 4ec5525..400d39f 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -202,12 +202,12 @@
isChecked: true
},
editConfig: {
- trigger: 'click',
+ trigger: 'dblclick',
mode: 'row',
showStatus: true
},
menuConfig: {
- /*body: {
+ body: {
//鍙抽敭鑿滃崟
options: [
[
@@ -234,7 +234,7 @@
},
]
]
- }*/
+ }
},
//琛ㄥご鍙傛暟
columns: [
@@ -519,6 +519,7 @@
showStatus: true
},//琛ㄥご鍙傛暟
columns: [
+ {type: 'checkbox', fixed: "left", title: t('basicData.check'),width: 78},
{type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 },
// {
// field: 'order_number',
@@ -634,9 +635,10 @@
break
}
case 'removeRow': {
- let result = toolbarButtonClickEvent()
- if(result){
- $grid.remove(result.row)
+ const $grid = brokenGrid.value
+ const checkedList = $grid.getCheckboxRecords()
+ if(checkedList){
+ $grid.remove(checkedList)
}
break
}
@@ -645,7 +647,7 @@
}
}
const openedBrokenTable = () => {
- addListener(brokenGrid.value,brokenGridOptions)
+ //addListener(brokenGrid.value,brokenGridOptions)
let damage =ref(brokenRow.value.damageDetails)
brokenGrid.value.reloadData(damage.value)
}
@@ -1120,7 +1122,7 @@
}
onMounted(() => {
window.addEventListener('keypress', qrcodeScanner);
- //addListener(xGrid.value, gridOptions)
+ addListener(xGrid.value, gridOptions)
})
// 鍦ㄧ粍浠跺嵏杞芥椂绉婚櫎閿洏浜嬩欢鐩戝惉
diff --git a/north-glass-erp/northglass-erp/src/views/pp/rework/Rework.vue b/north-glass-erp/northglass-erp/src/views/pp/rework/Rework.vue
index 63c9e9a..b45df9e 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/rework/Rework.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/rework/Rework.vue
@@ -25,7 +25,7 @@
<el-breadcrumb :separator-icon="ArrowRight">
<el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/rework/SelectRework' }">{{$t('rework.reworkManagement')}}</el-breadcrumb-item>
<el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/rework/AddRework' }">{{$t('rework.addRework')}}</el-breadcrumb-item>
- <el-breadcrumb-item :to="{ path: '/main/processCard/SelectPrintFlowCard' }" style="display: none">{{$t('rework.printRework')}}</el-breadcrumb-item>
+<!-- <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/processCard/SelectPrintFlowCard' }" >{{$t('rework.printRework')}}</el-breadcrumb-item>-->
<el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item>
</el-breadcrumb>
</div>
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
index d9a9fb0..26a4639 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -113,4 +113,6 @@
Boolean printOrderSortMp(String processId, Integer orderNumber, Integer technologyNumber, Integer sort);
List<Map<String, String>> getPrimaryListMerge(String processId, String technologyNumber);
+
+ List<Map<String, String>> selectorderOtherMoney();
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
index 4a4b507..18d398f 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -101,6 +101,7 @@
public Map<String, Object> selectNoCardSv(String orderId, String productionId, FlowCard flowCard) {
Map<String, Object> map = new HashMap<>();
map.put("data", flowCardMapper.selectNoCardMp(orderId, productionId, flowCard));
+ map.put("orderOtherMoney", flowCardMapper.selectorderOtherMoney());
return map;
}
diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index 7ebb414..ad51460 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -246,11 +246,31 @@
od.compute_gross_area as 'computeGrossArea',
p.total_thickness AS 'totalThickness',
p.thickness,
- od.weight
+ od.weight,
+ od.weight,
+ ods.S01,
+ ods.S02,
+ ods.S03,
+ ods.S04,
+ ods.S05
from sd.order_detail as od
left join sd.order_glass_detail as ogd
on od.order_id = ogd.order_id and od.order_number = ogd.order_number
left join sd.product as p on od.product_name = p.product_name
+ left join (
+ SELECT
+ order_id,
+ order_number,
+ JSON_UNQUOTE( JSON_EXTRACT( other_columns, '$.S01' )) AS S01,
+ JSON_UNQUOTE( JSON_EXTRACT( other_columns, '$.S02' )) AS S02,
+ JSON_UNQUOTE( JSON_EXTRACT( other_columns, '$.S03' )) AS S03,
+ JSON_UNQUOTE( JSON_EXTRACT( other_columns, '$.S04' )) AS S04,
+ JSON_UNQUOTE( JSON_EXTRACT( other_columns, '$.S05' )) AS S05
+ FROM
+ sd.order_detail
+ WHERE
+ order_id = #{orderId}
+ ) as ods on ods.order_id=od.order_id and ods.order_number=od.order_number
where od.order_id = #{orderId}
and ogd.production_id = #{productionId}
and ogd.splitting_status = 0
@@ -875,4 +895,8 @@
and position(fc.technology_number in #{technologyNumber}) and ogdc.concatenated_glass_child is NOT null
group by fc.process_id, fc.technology_number
</select>
+
+ <select id="selectorderOtherMoney">
+ select * from sd.basic_other_money where (id=21 or id>31)
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0